Hmm. How about just rewinding like:
fseek(fpInFileNext,-(cnt+3),SEEK_CUR);
I think the problem comes from new-line character (\r\n in Windows, \n in *nix) so you need to rewind past those also. I'm not sure where the third character comes from (too little coffeiine, can't think straight). If you are writing portable code you propably need to do some evil precompilter thingy:
#if _WIN32_
fseek(fpInFileNext,-(cnt+3),SEEK_CUR);
#else
fseek(fpInFileNext,-(cnt+2),SEEK_CUR);
#endif
Or something like that.
|