delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/11/23/23:32:48

From: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters)
Subject: Re: Problem with fsetpos
23 Nov 1997 23:32:48 -0800 :
Message-ID: <01bcf88b$c91b8da0$fa173185.cygnus.gnu-win32@gbird0.fu.is.saga-u.ac.jp>
Reply-To: "Colin Peters" <colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp>
Mime-Version: 1.0
To: <fseibel AT cfa DOT harvard DOT edu>
Cc: "GNU-Win32" <gnu-win32 AT cygnus DOT com>

From: Earnie Boyd <earnie_boyd AT hotmail DOT com>
Date: Saturday, November 22, 1997 12:17 PM
>>From: "Fred Seibel" <fseibel AT cfa DOT harvard DOT edu>
>>To: <gnu-win32 AT cygnus DOT com>
>>Date: Thu, 20 Nov 1997 08:20:40 -0500
[snip]
>>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);
[snip]
>
>This looks like the infamous Y2K problem to me. ;^} Ha, Ha, Ha.


:-) What he really means is change

fp = fopen("foo.txt", "r");

to

fp = fopen("foo.txt", "rb");

(or, possibly, mount the directory as text=binary).

Colin.

-- Colin Peters -- colin at fu.is.saga-u.ac.jp
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin
-- http://www.geocities.com/Tokyo/Towers/6162


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019