Jim Meyering [Sat, 16 Feb 2002 09:04:30 +0000 (09:04 +0000)]
Add support for _POSIX2_VERSION, which lets you pick which POSIX
version you want the utilities to conform to. Remove warnings about
failure to conform to a future POSIX version.
(ISO_8601_OPTION): Remove; no longer needed.
All uses changed to back to the corresponding short options.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(usage): Document only the intersection of the
old and new behaviors, to encourage portability.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 09:03:12 +0000 (09:03 +0000)]
Add support for _POSIX2_VERSION, which lets you pick which POSIX
version you want the utilities to conform to. Remove warnings about
failure to conform to a future POSIX version.
(usage): Document only the intersection of the
old and new behaviors, to encourage portability.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 08:16:26 +0000 (08:16 +0000)]
Add support for _POSIX2_VERSION, which lets you pick which POSIX
version you want the utilities to conform to. Remove warnings about
failure to conform to a future POSIX version.
Jim Meyering [Sat, 16 Feb 2002 08:11:50 +0000 (08:11 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 08:10:10 +0000 (08:10 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main, parse_obsolescent_option): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 08:04:12 +0000 (08:04 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 08:00:46 +0000 (08:00 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 07:44:20 +0000 (07:44 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 07:42:52 +0000 (07:42 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(SEP_STRING_OPTION): Remove; no longer needed.
All uses changed to back to the corresponding short options.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 07:39:17 +0000 (07:39 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main): Revert to previous behavior, except report
an error and exit if the obsolete syntax is used and if conforming
to the new standard.
Jim Meyering [Sat, 16 Feb 2002 07:37:15 +0000 (07:37 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(STRINGS_OPTION, WIDTH_OPTION): Remove; no longer needed.
All uses changed to back to the corresponding short options.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
Jim Meyering [Sat, 16 Feb 2002 07:31:27 +0000 (07:31 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main): Revert to previous behavior, except report
an error and exit if the obsolete syntax is used and if conforming
to the new standard.
Jim Meyering [Sat, 16 Feb 2002 07:29:18 +0000 (07:29 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Revert to previous behavior, except report
an error and exit if the obsolete syntax is used and if conforming
to the new standard.
Jim Meyering [Tue, 12 Feb 2002 15:44:16 +0000 (15:44 +0000)]
Include "dirname.h".
(outbase): Now a global var.
(outfile_end): Remove.
(suffix_length): New var.
(shortopts, longopts, main): Add -a or --suffix-length.
(next_file_name): Implement -a. Do not extend the suffix length.
Check for file names that are too long.
(main): Move outfile initialization to next_file_name.
Jim Meyering [Mon, 11 Feb 2002 23:25:34 +0000 (23:25 +0000)]
Add more support for POSIX 1003.1-2001, which requires removal
for support of obsolete "-DIGITS" option syntax in nice, and
which prohibits options with optional arguments like date's
-I option.
Jim Meyering [Mon, 11 Feb 2002 23:23:42 +0000 (23:23 +0000)]
(main): Conform to POSIX 1003.1-2001 if
POSIX2_VERSION says to, otherwise warn of obsolete usage if
OBSOLETE_OPTION_WARNINGS is nonzero and if not POSIXLY_CORRECT.
Jim Meyering [Mon, 11 Feb 2002 22:58:59 +0000 (22:58 +0000)]
Add more support for POSIX 1003.1-2001, which requires removal
for support of obsolete "-DIGITS" option syntax in nice, and
which prohibits options with optional arguments like date's
-I option.
(ISO_8601_OPTION): New enum value.
(long_options): Use it.
(short_options): New constant.
(usage): Document the change.
(main): Conform to POSIX 1003.1-2001 if
POSIX2_VERSION says to, otherwise warn of obsolete usage if
OBSOLETE_OPTION_WARNINGS is nonzero and if not POSIXLY_CORRECT.
Jim Meyering [Mon, 11 Feb 2002 15:11:05 +0000 (15:11 +0000)]
Add more support for POSIX 1003.1-2001, which requires removal for
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
Jim Meyering [Mon, 11 Feb 2002 14:28:35 +0000 (14:28 +0000)]
2002-02-02 Paul Eggert <eggert@twinsun.com>
Bruno Haible <bruno@clisp.org>
* unicodeio.c (unicode_to_mb): New function, extracted from
print_unicode_char. Call failure callback instead of error.
(fwrite_success_callback): New function.
(exit_failure_callback): New function.
(fallback_failure_callback): New function.
(print_unicode_char): Call unicode_to_mb.
Jim Meyering [Mon, 11 Feb 2002 14:28:09 +0000 (14:28 +0000)]
2002-02-02 Paul Eggert <eggert@twinsun.com>
Bruno Haible <bruno@clisp.org>
* unicodeio.c (unicode_to_mb): New function, extracted from
print_unicode_char. Call failure callback instead of error.
(fwrite_success_callback): New function.
(exit_failure_callback): New function.
(fallback_failure_callback): New function.
(print_unicode_char): Call unicode_to_mb.
Jim Meyering [Mon, 11 Feb 2002 11:00:00 +0000 (11:00 +0000)]
(head_lines): If we have read too much data, try
to seek back to the position we would have gotten to had we
been reading one byte at a time. POSIX currently doesn't
require this, but it's easy to do and some software relies on it.
Jim Meyering [Sat, 2 Feb 2002 09:53:26 +0000 (09:53 +0000)]
Add more support for POSIX 1003.1-2001, which requires removal for
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
(usage): Document this.
(shortopts): New constant.
(main): Check for obsolete options.
Jim Meyering [Sat, 2 Feb 2002 09:47:57 +0000 (09:47 +0000)]
Add more support for POSIX 1003.1-2001, which requires removal for
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
(usage): Document this.
(shortopts): New constant.
(main): Check for obsolete options.
Jim Meyering [Sat, 2 Feb 2002 09:40:50 +0000 (09:40 +0000)]
Add more support for POSIX 1003.1-2001, which requires removal for
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
(usage): Document this.
(main): Check for obsolete options.
(shortopts): New constant.
(main): Use -1, not EOF, for getopt_long.
Jim Meyering [Sat, 2 Feb 2002 09:37:12 +0000 (09:37 +0000)]
Add more support for POSIX 1003.1-2001, which requires removal for
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
(main): Check for obsolete options.
(short_options): New constant.