summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--old/textutils/ChangeLog29
-rw-r--r--old/textutils/NEWS1
-rw-r--r--src/cat.c8
-rw-r--r--src/csplit.c9
-rw-r--r--src/od.c8
-rw-r--r--src/split.c2
-rw-r--r--src/tr.c10
-rw-r--r--src/wc.c10
8 files changed, 48 insertions, 29 deletions
diff --git a/old/textutils/ChangeLog b/old/textutils/ChangeLog
index 02cafcda2..7a85cf233 100644
--- a/old/textutils/ChangeLog
+++ b/old/textutils/ChangeLog
@@ -1,8 +1,35 @@
+Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com)
+
+ * Version 1.5.
+
+ * od.c (main): Remove set-but-not-used variable, `usage_error'.
+
+ * split.c (main): Call usage with an argument.
+
+Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com)
+
+ * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
+ for 8-bit clean memcmp.
+
+ * cat.c (usage, main): Remove unused argument.
+
+ * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
+ (check_for_offset): Remove unused argument `argnum.'
+
+ * configure.in: Add AC_SIZE_T.
+
Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com)
- * uniq.c (main.c): Interpret non-option arguments with a leading `+'
+ * uniq.c (main): Interpret non-option arguments with a leading `+'
only if we haven't seen `--'.
+ * tr.c (main): Change variable name to avoid shadowed dcl.
+ * wc.c (write_counts): Ditto.
+
+ * sum.1: Make documentation agree with the code.
+
+ * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
+
Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com)
* configure.in [AC_HAVE_HEADERS]: Add limits.h.
diff --git a/old/textutils/NEWS b/old/textutils/NEWS
index 4b98a3c10..c63422fe5 100644
--- a/old/textutils/NEWS
+++ b/old/textutils/NEWS
@@ -1,5 +1,6 @@
Major changes in release 1.5:
* sort is 8-bit clean
+* sort's -n and -M options no longer imply -b
* several bugs in sort have been fixed
* all programs accept --help and --version options
* od --compatible accepts pre-POSIX arguments
diff --git a/src/cat.c b/src/cat.c
index 044c9a971..98da7c971 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -74,12 +74,8 @@ static int newlines2 = 0;
static int exit_stat = 0;
static void
-usage (reason)
- char *reason;
+usage ()
{
- if (reason != NULL)
- fprintf (stderr, "%s: %s\n", program_name, reason);
-
fprintf (stderr, "\
Usage: %s [-benstuvAET] [--number] [--number-nonblank] [--squeeze-blank]\n\
[--show-nonprinting] [--show-ends] [--show-tabs] [--show-all]\n\
@@ -224,7 +220,7 @@ main (argc, argv)
break;
default:
- usage ((char *) 0);
+ usage ();
}
}
diff --git a/src/csplit.c b/src/csplit.c
index e5b6ed68d..eaea8c314 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -599,7 +599,6 @@ static struct cstring *
remove_line ()
{
struct cstring *line; /* Return value. */
- unsigned line_got; /* Number of the line retrieved. */
struct line *l; /* For convenience. */
if (head == NULL && !load_buffer ())
@@ -608,7 +607,7 @@ remove_line ()
if (current_line < head->first_available)
current_line = head->first_available;
- line_got = head->first_available++;
+ ++(head->first_available);
l = head->curr_line;
@@ -1076,13 +1075,11 @@ string_to_number (result, num)
/* Check if there is a numeric offset after a regular expression.
STR is the entire command line argument.
- ARGNUM is the index in ARGV of STR.
P is the control record for this regular expression.
NUM is the numeric part of STR. */
static void
-check_for_offset (argnum, p, str, num)
- int argnum;
+check_for_offset (p, str, num)
struct control *p;
char *str;
char *num;
@@ -1163,7 +1160,7 @@ extract_regexp (argnum, ignore, str)
}
if (closing_delim[1])
- check_for_offset (argnum, p, str, closing_delim + 1);
+ check_for_offset (p, str, closing_delim + 1);
return p;
}
diff --git a/src/od.c b/src/od.c
index a6967d1fb..ea4f12b39 100644
--- a/src/od.c
+++ b/src/od.c
@@ -43,7 +43,7 @@ char *alloca ();
#include <float.h>
#endif
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
+#ifdef HAVE_LONG_DOUBLE
typedef long double LONG_DOUBLE;
#else
typedef double LONG_DOUBLE;
@@ -553,7 +553,7 @@ print_double (n_bytes, block, fmt_string)
}
}
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
+#ifdef HAVE_LONG_DOUBLE
static void
print_long_double (n_bytes, block, fmt_string)
long unsigned int n_bytes;
@@ -885,7 +885,7 @@ decode_one_format (s, next, tspec)
DBL_DIG + 8, DBL_DIG);
break;
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
+#ifdef HAVE_LONG_DOUBLE
case FP_LONG_DOUBLE:
print_function = print_long_double;
pre_fmt_string = "%%%d.%dle%%c";
@@ -1808,7 +1808,6 @@ main (argc, argv)
if (flag_compatibility)
{
long int offset;
- int usage_error = 0;
if (n_files == 1)
{
@@ -1840,7 +1839,6 @@ main (argc, argv)
}
else
{
- usage_error = 1;
error (0, 0,
"invalid second operand in compatibility mode `%s'",
argv[optind + 1]);
diff --git a/src/split.c b/src/split.c
index 07b37aef9..addddd982 100644
--- a/src/split.c
+++ b/src/split.c
@@ -188,7 +188,7 @@ main (argc, argv)
fprintf (stderr, "%s\n", version_string);
if (flag_help)
- usage ();
+ usage ((char *)0);
/* Handle default case. */
if (split_type == type_undef)
diff --git a/src/tr.c b/src/tr.c
index 9010f4500..f2a3fac76 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -371,7 +371,7 @@ is_char_class_member (char_class, c)
case CC_XDIGIT:
return ISXDIGIT (c);
break;
- case CC_NO_CLASS:
+ default:
abort ();
break;
}
@@ -1759,15 +1759,15 @@ deleting and squeezing repeats");
{
if (!in_s1[i])
{
- int c = get_next (s2, NULL);
- assert (c != -1 || truncate_set1);
- if (c == -1)
+ int ch = get_next (s2, NULL);
+ assert (ch != -1 || truncate_set1);
+ if (ch == -1)
{
/* This will happen when tr is invoked like e.g.
tr -cs A-Za-z0-9 '\012'. */
break;
}
- xlate[i] = c;
+ xlate[i] = ch;
}
}
assert (get_next (s2, NULL) == -1 || truncate_set1);
diff --git a/src/wc.c b/src/wc.c
index 678e179ae..22aa53333 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -234,23 +234,23 @@ wc (fd, file)
}
static void
-write_counts (lc, wc, cc, file)
- unsigned long lc, wc, cc;
+write_counts (lines, words, chars, file)
+ unsigned long lines, words, chars;
char *file;
{
if (print_lines)
- printf ("%7lu", lc);
+ printf ("%7lu", lines);
if (print_words)
{
if (print_lines)
putchar (' ');
- printf ("%7lu", wc);
+ printf ("%7lu", words);
}
if (print_chars)
{
if (print_lines || print_words)
putchar (' ');
- printf ("%7lu", cc);
+ printf ("%7lu", chars);
}
if (*file)
printf (" %s", file);