diff options
-rw-r--r-- | old/textutils/ChangeLog | 9 | ||||
-rw-r--r-- | old/textutils/NEWS | 2 | ||||
-rw-r--r-- | src/fold.c | 8 | ||||
-rw-r--r-- | src/join.c | 6 |
4 files changed, 19 insertions, 6 deletions
diff --git a/old/textutils/ChangeLog b/old/textutils/ChangeLog index 90827b891..af63383b6 100644 --- a/old/textutils/ChangeLog +++ b/old/textutils/ChangeLog @@ -1,3 +1,12 @@ +Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com) + + * fold.c (fold_file): Don't get stuck in an endless loop when + width is smaller than 8 and there are TABs in the input. + +Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com) + + * join.c: Remove now-unused dcls of show_help and show_version. + Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com) * csplit.c [INT_MAX]: Make sure it's defined. diff --git a/old/textutils/NEWS b/old/textutils/NEWS index 6a48434c8..c68b1c58c 100644 --- a/old/textutils/NEWS +++ b/old/textutils/NEWS @@ -1,4 +1,6 @@ Major changes in release 1.9: +* the command `printf '\t\n' |fold -w n' now terminates. + Before, it wouldn't stop for n less than 8. * sort accepts and ignores -y[string] options for compatibilty with Solaris. * cat -v /dev/null works on more systems * od's --compatible (-C) flag renamed to --traditional (no short option) diff --git a/src/fold.c b/src/fold.c index 9f9f0c8c5..eda7e039f 100644 --- a/src/fold.c +++ b/src/fold.c @@ -254,6 +254,14 @@ fold_file (filename, width) goto rescan; } } + else + { + if (offset_out == 0) + { + line_out[offset_out++] = c; + continue; + } + } line_out[offset_out++] = '\n'; fwrite (line_out, sizeof (char), offset_out, stdout); column = offset_out = 0; diff --git a/src/join.c b/src/join.c index 0b323ec4a..21ed852a6 100644 --- a/src/join.c +++ b/src/join.c @@ -105,12 +105,6 @@ static struct outlist *outlist_end; tab character. */ static char tab; -/* If non-zero, display usage information and exit. */ -static int show_help; - -/* If non-zero, print the version on standard output then exit. */ -static int show_version; - /* When using getopt_long_only, no long option can start with a character that is a short option. */ static struct option const longopts[] = |