/* convert raw 2-byte data to numerical */ #include FILE *input_file, *output_file; int i,j; int main(int argc, char *argv[]) { if ( argc < 5 ) { printf("\nUsage: raw2num \n"); printf("Exampel: ./raw2num adc_data adc_num 65536 32768\n"); exit(1); } if ( (input_file = fopen(argv[1],"r")) == NULL ) { perror("Input file"); exit(1); } if ( (output_file = fopen(argv[2],"w")) == NULL ) { perror("Output file"); exit(1); } fseek(input_file,atoi(argv[3]),SEEK_SET); for (i=0;i