Mail Archives: djgpp/1996/01/24/09:38:03
On Tue, 23 Jan 1996, Andrea Tasso wrote:
> The output is:
>
> 1
>
>
> While I expected to see
> 1
> 3
>
> That is what I see if I write
>
> fseek ( fp , +2 , SEEK_SET ) ;
>
> The problem remains also if I open the file in text mode; I tried to open it
> in binary mode because I read in djgpp documentation that fseek doesn't work
> properly with DOS in text mode (no one-to-one correspondence chars-bytes).
> I am afraid the problem is pesent also in binary mode, isn't it ?
Your test program works for me as you'd expect: it prints 1 and 3. Which
version of DJGPP do you use? What happens if you replace SEEK_CUR with 1?
- Raw text -