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

Re: [MacPerl-Porters] Need authoritative Apple refs for EOL == CR



> At 13.04 -0500 1999.03.01, Arved Sandstrom wrote:
>I need a good, solid authoritative ref
>from Apple docs (more than one is even better) saying that the line
>terminator for Mac apps is a CR (\xD), which I can refer him to. I've
>looked at IM:Text, IM:Printing, IM:Files, searched on the Apple Developers
>site, and I can't find a thing, except one ancient Tech Note pertaining to
>A/UX <=> HFS file translations.

It seemed so odd to me that this should even be a question that I gave some
thought to the issue of what it means to say that on a Mac, \n == \xD.

Three possibilities:

1) Majority vote.  Then all you need to do is list all the applications you
know of that use \xD as \n.  [Counter example: I use BBEdit as my primary
text editor, and it is happy to use \xD, \xA, or \xD\xA as \n.  However, it
allows you to save with Unix, Mac, or PC line ends, with the expected
definitions thereof, so BBEdit could be used as an explicit example as
well.]

2) There is an Apple guideline somewhere that urges developers to use this
convention.  I have not been able to locate such, but I don't have ready
access to much of this information.

3) TextEdit uses this convention.  Since TextEdit is used so extensively in
the MacOS interaction with text, this would effectively mandate that \xD ==
\n.  Looking at my very, very old version of IM (the "phone book"
promotional version of the original IM draft), I come across the following
two quotes:

(Under discussion of Destination and View Rectangles for text display)

"Normally, at the right edge of the destination rectangle, the text
automatically wraps around to the left edge to begin a new line.  A new
line also begins where explicitly specified by a Return character in the
text."

(Under discussion of the TERec Data Type)

"The crOnly field specifies whether or not text wraps around at the right
edge of the destination rectagle, as shown in Figure 5.  If crOnly is
positive, text does wrap around.  If crOnly is negative, text lines are
specified explicitly by the Return characters only."

(It is clear from context that the plural in "Return characterS", above,
refers to multiple instances of \xD in the text, not multiple possible
values for \n.)

Does this help?

-David-

David Steffen, Ph.D.
President, Biomedical Computing, Inc. <http://www.biomedcomp.com/>
Phone: (713) 610-9770 FAX: (713) 610-9769 E-mail: steffen@biomedcomp.com



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org