This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with fsetpos




>From: "Fred Seibel" <fseibel@cfa.harvard.edu>
>To: <gnu-win32@cygnus.com>
>Subject: Problem with fsetpos
>Date: Thu, 20 Nov 1997 08:20:40 -0500
>
>I have a UNIX program that makes extensive use of fgetpos and fsetpos 
to
>move around a file.
>
>I have discovered that fsetpos with values of offset greater than ~ 
2000L
>misses the corrrect value.  The
>error is 16 at 2000 and 179 at 10000.  I am running WindowsNT 4.0
>Workstation, with Service Patch 3.
>I am running b18.
>
>This error can be detected by inspection using gdb.
>Open a text file a trivial program.
>
>main(){
>fp = fopen("foo.txt", "r");
>fsetpos(fp, 2000L, SEEK_SET);
>
><breakpoint>
>
>gdb>print *fp
>shows the next text that will be read.
>Open file in emacs and position to char 2000.
>

This looks like the infamous Y2K problem to me. ;^} Ha, Ha, Ha.

>Observe that the file seems to be positioned at 1984. hmmmm.


-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]