[comp.sys.apple] Binscii CR/LF

tomg@deceds.dec.com (Tom Gallo) (05/05/89)

	I'm planning on uploading a program to the binaries group in
	Binscii format. One of the questions Binscii asks is whether I
	want CR (Unix) or LF (Apple). 

	Could someone clarify what this question means and tell me
	what the approriate response is?

	Thanks

	Tom Gallo

-- 
| (UUCP)       {decvax, ucbvax, allegra}!decwrl!fstvax.dec.com!gallo |
| (ARPA)       gallo%fstvax.DEC@decwrl.ARPA                          |
| (BITNET)     gallo@fstvax.dec.com                                  |
| Opinions expressed here are my own,not those of my employer!!!     |

blochowi@cat28.CS.WISC.EDU (Jason Blochowiak) (05/05/89)

In article <387@deceds.dec.com> tomg@deceds.dec.com (Tom Gallo) writes:
>	I'm planning on uploading a program to the binaries group in
>	Binscii format. One of the questions Binscii asks is whether I
>	want CR (Unix) or LF (Apple). 
	           ^            ^
		   |		|
		   --------------
			 |
		Reverse these...

	Text files on the Apple have lines that are terminated with a
carriage return (CR), ASCII code 13 ($0D). Unix text files, on the other
hand, are terminated with a linefeed (LF), ASCII code 10 ($0A). MS-DOS and
GEM-DOS (on the Atari ST) text files are terminated with a CR/LF (basically
just both of them...).
	The major interest of yours is whether you'll be sending to your
unix host in text (ascii) or binary (image) mode - if you send in text mode,
a Cr will be translated to a Lf, which would be good if that what was on the
end of each line (which it would be, if it were an "Apple" text file), but
strange things can sometimes happen if the text file isn't an Apple text file.
On the other hand, if you created the file with Cr's, and then sent a raw
image to the unix machine (no translation), the file wouldn't be a proper
unix text file, and so the machine might get confused.
	So, if you'll be doing a binary send to a unix machine, use the LF
mode, but if you'll be doing a text send to a unix machine (or any other
machine, for that matter), use the CR mode.
	I personally use the Cr mode because 1) I use a Kermit text transfer
to the unix boxes I use, and 2) Apple programs can manipulate the files.
	Hope this helps...
>	Tom Gallo

 ------------------------------------------------------------------------------
		Jason Blochowiak (blochowi@garfield.cs.wisc.edu)
			"Not your average iconoclast..."
 ------------------------------------------------------------------------------