+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.
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
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\
break;
default:
- usage ((char *) 0);
+ usage ();
}
}
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 ())
if (current_line < head->first_available)
current_line = head->first_available;
- line_got = head->first_available++;
+ ++(head->first_available);
l = head->curr_line;
/* 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;
}
if (closing_delim[1])
- check_for_offset (argnum, p, str, closing_delim + 1);
+ check_for_offset (p, str, closing_delim + 1);
return p;
}
#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;
}
}
-#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;
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";
if (flag_compatibility)
{
long int offset;
- int usage_error = 0;
if (n_files == 1)
{
}
else
{
- usage_error = 1;
error (0, 0,
"invalid second operand in compatibility mode `%s'",
argv[optind + 1]);
fprintf (stderr, "%s\n", version_string);
if (flag_help)
- usage ();
+ usage ((char *)0);
/* Handle default case. */
if (split_type == type_undef)
case CC_XDIGIT:
return ISXDIGIT (c);
break;
- case CC_NO_CLASS:
+ default:
abort ();
break;
}
{
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);
}
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);