Re: Linefeeds

[prev] [thread] [next] [lurker] [Date index for 2005/06/20]

From: Dave Vandervies
Subject: Re: Linefeeds
Date: 16:17 on 20 Jun 2005
Somebody claiming to be Robert G. Werner wrote:
> 
> sabrina downard wrote:

> > p.s. Yes, iTunes -- exporting files that vi/awk/et al. on the same
> > bedamned machine sees as two extremely long lines, and that only because
> > one of the MP3s contained a comment which had a linefeed in it -- I'm
> > looking at you.
> > 
> line\n\r
> feeds\m
> are^m
> hard&return;

out=fopen("foo","w");
fputs("Nope, line\n",out);
fputs("feeds are\n",out);
fputs("actually\n",out);
fputs("really easy\n",out);
fclose(out);

Any system that runs general-purpose programs has a C I/O library that
knows exactly how to do line feeds for that system, and most non-C
languages either have C at the back-end anyways or can easily be
coerced to use the C library for I/O.

The hard part is finding a cluestick big enough for all of the people
who think all the world's a unix system and bypass the C stdio library
"for efficiency" because "It doesn't really matter, text and binary are
the same".  (Yeah, and the bugs and idiocies you're introducing are
really worth the few nanoseconds you save on millisecond-timed I/O
operations.)

The OP indicates that apparently not even all unix systems are unix in
this respect anymore...


dave

-- 
Dave Vandervies
dj3vande@xxxxxx.xxx

Plan your future!  Make God laugh!

Generated at 00:00 on 28 Jun 2005 by mariachi 0.52