From c7ebcc8326dfe8b9455ec8995a38b73826538928 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 30 Oct 1993 15:57:46 +0000 Subject: [PATCH] merge with 1.8.1a --- old/textutils/ChangeLog | 6 ++++++ old/textutils/NEWS | 2 +- src/csplit.c | 6 ++++++ src/od.c | 10 +++++----- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/old/textutils/ChangeLog b/old/textutils/ChangeLog index 5017ddd..90827b8 100644 --- a/old/textutils/ChangeLog +++ b/old/textutils/ChangeLog @@ -1,3 +1,9 @@ +Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com) + + * csplit.c [INT_MAX]: Make sure it's defined. + [not HAVE_LIMITS_H]: Don't include limits.h. + From Kaveh R. Ghazi (ghazi@noc.rutgers.edu). + Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com) * Version 1.8.1. diff --git a/old/textutils/NEWS b/old/textutils/NEWS index 544c64d..6a48434 100644 --- a/old/textutils/NEWS +++ b/old/textutils/NEWS @@ -1,7 +1,7 @@ Major changes in release 1.9: * 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 --backward-compatible (-B) +* od's --compatible (-C) flag renamed to --traditional (no short option) * --help and --version exit successfully * --help gives a one-line description of each option and shows the correspondence between short and long-named options. diff --git a/src/csplit.c b/src/csplit.c index aad7f31..f27290b 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -33,7 +33,9 @@ #include #include #include +#ifdef HAVE_LIMITS_H #include +#endif /* HAVE_LIMITS_H */ #include "regex.h" #include "system.h" #include "version.h" @@ -49,6 +51,10 @@ char *realloc (); #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif +#ifndef INT_MAX +#define INT_MAX (~(1 << (sizeof (int) * 8 - 1))) +#endif /* INT_MAX */ + void error (); diff --git a/src/od.c b/src/od.c index c772fa6..3b4ffca 100644 --- a/src/od.c +++ b/src/od.c @@ -215,7 +215,7 @@ static unsigned long int flag_dump_strings; /* Non-zero if we should recognize the pre-POSIX non-option arguments that specified at most one file and optional arguments specifying offset and pseudo-start address. */ -static int backward_compatibility; +static int traditional; /* Non-zero if an old-style `pseudo-address' was specified. */ static long int flag_pseudo_start; @@ -298,8 +298,8 @@ static struct option const long_options[] = {"output-duplicates", no_argument, NULL, 'v'}, /* non-POSIX options. */ - {"backward-compatible", no_argument, NULL, 'B'}, {"strings", optional_argument, NULL, 's'}, + {"traditional", no_argument, NULL, 'B'}, {"width", optional_argument, NULL, 'w'}, {"help", no_argument, &show_help, 1}, {"version", no_argument, &show_version, 1}, @@ -1732,7 +1732,7 @@ main (argc, argv) address_pad_len = 7; flag_dump_strings = 0; - while ((c = getopt_long (argc, argv, "abBcdfhilos::xw::A:j:N:t:v", + while ((c = getopt_long (argc, argv, "abcdfhilos::xw::A:j:N:t:v", long_options, (int *) 0)) != EOF) { @@ -1810,7 +1810,7 @@ main (argc, argv) break; case 'B': - backward_compatibility = 1; + traditional = 1; break; /* The next several cases map the old, pre-POSIX format @@ -1880,7 +1880,7 @@ main (argc, argv) od [file] [[+]offset[.][b] [[+]label[.][b]]] The offset and pseudo_start have the same syntax. */ - if (backward_compatibility) + if (traditional) { long int offset; -- 2.7.4