9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] libbio and CR-LF
@ 2003-02-24 10:00 Saroj Mahapatra
  2003-02-24 10:54 ` [9fans] " Douglas A. Gwyn
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Saroj Mahapatra @ 2003-02-24 10:00 UTC (permalink / raw)
  To: 9fans

I have been thinking about adapting libbio for Windows platform. There
are basically two approaches. One can remove CR-LF when reading from
the file, or one can keep the CR-LF and Bget can return a '\n' when it
sees CR-LF. Neither approach is perfect. In the first case, file
offset + icount is messed up. In the second case, Bunget will have to
change '\n' to CR-LF. It (Bunget) still can not handle mixed line
terminators 'CR-LF' and CR (See 'getcsv' in "Practice Of Programming"
for an example). Leaving the handling of CR-LF to the application
programs is one option (though not very pleasing). Still a different
approach is to use programs like dos2unix and unix2dos. But if you are
dealing with a network protocol like http or New York Stock Exchange
CMS format messages, dos2unix and unix2dos do not help. What do guys
here think about this?

Thanks,
Saroj Mahapatra


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-02-24 21:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24 10:00 [9fans] libbio and CR-LF Saroj Mahapatra
2003-02-24 10:54 ` [9fans] " Douglas A. Gwyn
2003-02-24 14:49 ` [9fans] " Russ Cox
2003-02-24 15:09   ` Lucio De Re
2003-02-24 15:14     ` Russ Cox
2003-02-24 15:27       ` Boyd Roberts
2003-02-24 15:29       ` Lucio De Re
2003-02-24 21:54 ` [9fans] CRLFication (was: libbio and CR-LF) Geoff Collyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).