[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: literal newlines in source of cvs

From: Larry Jones
Subject: Re: literal newlines in source of cvs
Date: Mon, 12 May 2003 17:40:03 -0400 (EDT)

Terrence Enger writes:
> Looking at the cvs source, I see literal newlines represented by a mixture
> of '\n' and '\012', and I have not found a reason for the difference.
> Similarly, the source uses both '\r' and '\015' to represent carriage
> return.  Am I missing something?

Yes.  In theory, CVS has been carefully coded to work right in non-ASCII
environments.  '\n' is used where the local character set's newline is
wanted, '\012' is used where the ASCII newline is required, even on
non-ASCII platforms.  In reality, as you've discovered, it doesn't work
because all of the other characters are always in the local character

If you're just interested in getting CVS working in a purely EBCDIC
environment and don't care about interoperability with ASCII
environments, then just replacing all of the octal escape sequences with
the regular escape sequences should suffice.  If you do want
interoperability,  however, you have a lot more work ahead of you.  At a
minimum, the client/server protocol is supposed to be in ASCII.  Whether
local RCS files' metadata is in ASCII or EBCDIC is open for debate;
there are plusses and minuses each way.  Similarly whether the actual
deltatext is ASCII or EBCDIC and whether it's different for text vs.
binary files.

-Larry Jones

I suppose if I had two X chromosomes, I'd feel hostile too. -- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]