9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Saroj Mahapatra <saroj@optonline.net>
To: 9fans@cse.psu.edu
Subject: [9fans] libbio and CR-LF
Date: Mon, 24 Feb 2003 10:00:32 +0000	[thread overview]
Message-ID: <6d3220b4.0302221754.17fc79a@posting.google.com> (raw)

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


             reply	other threads:[~2003-02-24 10:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-24 10:00 Saroj Mahapatra [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d3220b4.0302221754.17fc79a@posting.google.com \
    --to=saroj@optonline.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).