1. EOF
- Posted by encephalon1 at msn.com Jun 21, 2002
- 420 views
------=_NextPart_001_0000_01C21917.873C66A0 I'm having a little problem reading certain kinds of files using getc(); = I can read pure text files, and bitmap files that aren't 24-bit, but I ca= n only read a very small first part of exe's, jpegs, gifs, 24-bit bmps.. = nearly everything else. Does this have anything to do with the way the E= OF is determined? Any suggestions on how to overcome it (getting length = of file and keeping track??) ? Any help appreciated, NathanGet more from the Web. FREE MSN Explorer download : http://explore= r.msn.com ------=_NextPart_001_0000_01C21917.873C66A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <HTML><BODY STYLE=3D"font:10pt verdana; border:none;"><DIV>I'm having a l= ittle problem reading certain kinds of files using getc(); I can read pur= e text files, and bitmap files that aren't 24-bit, but I can only read a = very small first part of exe's, jpegs, gifs, 24-bit bmps.. nearly everyth= ing else. Does this have anything to do with the way the EOF i= s determined? Any suggestions on how to overcome it (getting length= of file and keeping track??) ?</DIV> <DIV> </DIV> <DIV>Any hel= HTML><br clear=3Dall><hr>Get more from the Web. FREE MSN Explorer downlo= ad : <a href=3D'http://explorer.msn.com'>http://explorer.msn.com</a><br><= /p> ------=_NextPart_001_0000_01C21917.873C66A0--
2. Re: EOF
- Posted by "Carl W." <euphoria at cyreksoft.yorks.com> Jun 21, 2002
- 422 views
Nathan wrote: > I'm having a little problem reading certain kinds of files using getc(); > I can read pure text files, and bitmap files that aren't 24-bit, but I > can only read a very small first part of exe's, jpegs, gifs, 24-bit > bmps.. nearly everything else. Does this have anything to do with the > way the EOF is determined? You're probably using "r" as the second parameter to open(). "r" is the read-mode intended for text files and related things. This means that as soon as your file hits a value of 26 (Control-Z) Euphoria thinks it's an EOF. > Any suggestions on how to overcome it (getting length of file and keeping > track??) ? Use "rb" [read binary] as the second parameter to open(). :) Look here: http://www.rapideuphoria.com/lib_h_o.htm#open Carl
3. Re: EOF
- Posted by encephalon1 at msn.com Jun 21, 2002
- 414 views
------=_NextPart_001_0001_01C21921.45050FD0 hah.. I feel stupid. =20 Thanks Nathan ----- Original Message ----- From: Carl W. Subject: Re: EOF Nathan wrote: > I'm having a little problem reading certain kinds of files using getc()= ; > I can read pure text files, and bitmap files that aren't 24-bit, but I > can only read a very small first part of exe's, jpegs, gifs, 24-bit > bmps.. nearly everything else. Does this have anything to do with the > way the EOF is determined? You're probably using "r" as the second parameter to open(). "r" is the read-mode intended for text files and related things. This means that as soon as your file hits a value of 26 (Control-Z) Euphoria thinks it's an EOF. > Any suggestions on how to overcome it (getting length of file and keepi= ng > track??) ? Use "rb" [read binary] as the second parameter to open(). :) Look here: http://www.rapideuphoria.com/lib_h_o.htm#open Carl FREE MSN Explorer download : http://explorer.msn.com ------=_NextPart_001_0001_01C21921.45050FD0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <HTML><BODY STYLE=3D"font:10pt verdana; border:none;"><DIV> </DIV> <= DIV>hah.. I feel stupid. </DIV> <DIV> </DIV> <DIV>Thanks</DIV>= <DIV> </DIV> <DIV>Nathan</DIV> <BLOCKQUOTE style=3D"PADDING-RIGHT: = 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid;= MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt Arial">----- Original Messa= ge -----</DIV> <DIV style=3D"BACKGROUND: #e4e4e4; FONT: 10pt Arial; COLOR= : black"><B>From:</B> Carl W.</DIV> <DIV style=3D"FONT: 10pt Arial"><B>Se= nt:</B> Friday, June 21, 2002 12:05 PM</DIV> <DIV style=3D"FONT: 10pt Ari= al"><B>To:</B> EUforum</DIV> <DIV style=3D"FONT: 10pt Arial"><B>Subject:<= /B> Re: EOF</DIV> <DIV> </DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D T= he Euphoria Mailing List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR><BR>Nath= an wrote:<BR><BR>> I'm having a little problem reading certain kinds o= f files using getc();<BR>> I can read pure text files, and bitmap file= s that aren't 24-bit, but I<BR>> can only read a very small first part= of exe's, jpegs, gifs, 24-bit<BR>> bmps.. nearly everything else.&nbs= p; Does this have anything to do with the<BR>> way the EOF is determin= ed?<BR><BR>You're probably using "r" as the second parameter to open(). "= r" is the<BR>read-mode intended for text files and related things. This m= eans that as<BR>soon as your file hits a value of 26 (Control-Z) Euphoria= thinks it's an<BR>EOF.<BR><BR>> Any suggestions on how to overcome it= (getting length of file and keeping<BR>> track??) ?<BR><BR>Use "rb" [= read binary] as the second parameter to open(). :)<BR><BR>Look here:<BR>&= nbsp; http://www.rapideuphoria.com/lib_h_o.htm#open<BR><BR>Carl<BR><BR>=3D= =3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>This email was sent t= o: encephalon1 at msn.com<BR><BR>EASY UNSUBSCRIBE click here: http://topica.= com/u/?b1dd66.b2PHWj<BR>Or send an email to: EUforum-unsubscribe at topica.c= om<BR><BR>T O P I C A -- Register now to manage your mail!<BR>http://www.= topica.com/partner/tag02/register<BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= re from the Web. FREE MSN Explorer download : <a href=3D'http://explorer= .msn.com'>http://explorer.msn.com</a><br></p> ------=_NextPart_001_0001_01C21921.45050FD0--