Michele La Monaca scripsit: > AFAICT, Posix systems treat text files as binaries even if you don't > explicitly say so. Windows does not.
That's true, but the only difference is that CR-LF is mapped to CR in text mode input and the other way around in text mode output, and ^Z is treated as EOF in text mode input. > > In practice the only non-Posix system is raw Windows (i.e. non-Cygwin), > > and ftell and fseek work fine. > > Microsoft doesn't think so: > http://msdn.microsoft.com/en-us/library/0ys3hc0b.aspx and I believe my > example was a clear indication of that. You're right that seeking to an arbitrary place (as opposed to a place returned by ftell) in a text file won't work, but then it is hardly ever useful to do so anyway, because text files typically contain variable length lines. In addition, it's unreliable to seek on current-{in,out}put anyway, and IMO they should be consistent with open-{in,out}put-file. > > Regards, > Michele > > > > > -- > > John Cowan http://www.ccil.org/~cowan co...@ccil.org > > We want more school houses and less jails; more books and less arsenals; > > more learning and less vice; more constant work and less crime; more > > leisure and less greed; more justice and less revenge; in fact, more of > > the opportunities to cultivate our better natures. --Samuel Gompers -- John Cowan http://www.ccil.org/~cowan co...@ccil.org But no living man am I! You look upon a woman. Eowyn I am, Eomund's daughter. You stand between me and my lord and kin. Begone, if you be not deathless. For living or dark undead, I will smite you if you touch him. _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users