jeff@ISI-VAXA.ARPA (Jeffery A. Cavallaro) (09/07/85)
HOLD IT, HOLD IT !!! Sorry to start such a war by suggesting: #define EOL '\0' I had used this definition a couple of times when manipulating text coming from human-type interfaces (i.e. computer control of human interfaces). Programs fielding input from such interfaces must not depend on the presence of format characters (e.g. \n or \r) because these human interfaces are very loose and dynamic from version to version. While manipulating such "lines" of text, I would remove format characters and terminate the string with an EOL (\0). #define EOS '\0' #define EOL '\n' These are not wrong, but \n as EOL has a bad taste when dealing with such interfaces. They are fine as long as you stay within the VAX-11 4.2BSD (or similar) environment. Jeff
peter@graffiti.UUCP (Peter da Silva) (09/17/85)
> HOLD IT, HOLD IT !!! > > Sorry to start such a war by suggesting: > > #define EOL '\0' > > I had used this definition a couple of times when manipulating text coming > from human-type interfaces (i.e. computer control of human interfaces). > While manipulating such "lines" > of text, I would remove format characters and terminate the string with an > EOL (\0). Why not call it an EOS? As you point out, what you're dealing with aren't really lines anyway.