Why?? (prog question)
kline at thought.org
Mon Mar 30 19:57:33 PDT 2009
people, i've been under the weather for days and will probably be for a few more.
new and TEMPORARY meds dont like me, ugh.
can anybody clue me in why the followin joinline program fails to catch if argc == 1?
* simple prog to join all | very nearly all lines of a text file that
* make up one paragraph into one LONG line.
* paragraphs are delimiated by a single \n break.
main(int argc, char argv)
if (argc == 1)
printf("Usage: %s < file > newfile\n", argv);
while (fgets(buf, sizeof buf, stdin) )
if (*buf == '\n')
buf[strlen(buf)-1] = ' ';
Gary Kline kline at thought.org http://www.thought.org Public Service Unix
The 2.41a release of Jottings: http://jottings.thought.org/index.php
More information about the freebsd-questions