We could check if get_string works or not. | |||
|
test-lootin |
||
v | get_string | found_enter_002 | |
v | get_char | found_enter_001 | |
// // // char* get_string ( STRUCT_FILE structure_fp, int num ) { long diff; char c; printf("get_char starts.\r\n"); diff = (long)structure_fp.fp - (long)structure_fp.file_start; // set //(long)structure_fp.file_start + (long)structure_fp.index; // fseek(fp,0,SEEK_END); // fseek(fp,0,SEEK_CUR); printf("struct_fp.fp |%d| struct_fp.index |%d|\r\n", structure_fp.fp , structure_fp.index); fseek( structure_fp.fp, structure_fp.index, SEEK_SET); fread ( g_dummy, 1, num, structure_fp.fp ); printf("struct_fp.fp |%d|\r\n", structure_fp.fp ); printf("get_char ends.\r\n"); return g_dummy; }