RasppleII / a2server

AppleTalk server for Apple II computers
Other
31 stars 8 forks source link

ER: sciibin wrapper that removes ^M from end of line #38

Open IvanExpert opened 8 years ago

IvanExpert commented 8 years ago

Some BinSCII files have CRLF at the end of the line, and sciibin is too stupid to handle them. Sciibin itself could probably be fixed, or it could be called by a wrapper which performs tr -d '\r' first, if "file xxx.bsq | grep -q CRLF" is true

knghtbrd commented 8 years ago

Can sciibin handle blank lines in the input? ie, \r\r? Or long lines?

I've encountered too many combinations of CR, LF, CRLF, and random mixes to think that the wrapper is quite that easy. :) A tool to normalize text file line endings to CR, LF, or CRLF that more or less didn't care about which was on the input might be useful in general. Certainly such a tool would be useful if trying to use git with Apple // or Macintosh source code. The compiler SHOULDN'T care about CR/LF/CRLF, but it possibly does, and the editor definitely will. One of the reasons I like vim so much despite being a vi-type editor with "typing" and "beep" modes is that it will attempt to be intelligent regarding line endings and work regardless of which one you use, as long as you're consistent about it.

Which reminds me that I need to test a few Linux editors other than vim and make sure that one of those is available on A2CLOUD. Nano might have the feature. Or it might just support LF and CRLF. A patch may be accepted if needed, but that won't be in wheezy or jessie. Willing to provide our own packages for that when we get there.

That'd be an issue for A2CLOUD I suppose. In fact it is, rasppleii/a2cloud#6.