summaryrefslogtreecommitdiff
path: root/src/unexpand.c
AgeCommit message (Collapse)Author
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2006-07-09(unexpand): Don't assume that isprint etc. returnPaul Eggert
booleans (needed for pre-C99 hosts).
2006-02-06(usage): Use two spaces (not one) to separate theJim Meyering
--first-only option string from its description, so help2man formats the derived man page properly.
2005-10-24* src/expand.c (parse_tab_stops): Add comment to make this functionJim Meyering
identical to the one in unexpand.c. * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function identical to the one in expand.c.
2005-08-12Cosmetic: use X2NREALLOC (only two arguments) rather than x2nrealloc (with ↵Jim Meyering
three).
2005-07-11(unexpand): Always copy in text mode. POSIX saysPaul Eggert
the input and output must be text.
2005-07-05Adjust to the change to DECIMAL_DIGIT_ACCUMULATE: its last arg is nowPaul Eggert
a type, not a value.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-26Remove posixver.h and its uses.Paul Eggert
(main): Don't complain about -TAB.
2005-04-11(next_file): Don't assume fopen cannot return stdin.Paul Eggert
2005-03-25(parse_tab_stops, main): Update use of DECIMAL_DIGIT_ACCUMULATE.Jim Meyering
2005-03-17(parse_tab_stops, main): Use DECIMAL_DIGIT_ACCUMULATE macro inJim Meyering
place of nearly-equivalent code.
2005-01-11(main): Check for overflow in tabstop valuesJim Meyering
specified via the obsolete form. E.g., now this command fails: _POSIX2_VERSION=1 ./unexpand -$(echo '2^64+1'|bc) Before it would act like `_POSIX2_VERSION=1 ./unexpand -1'.
2005-01-11(add_tab_stop): Properly diagnose a tabstop list with decreasing values.Jim Meyering
2004-09-22Remove trailing blanks.Jim Meyering
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-24(add_tab_stop): Renamed from add_tabstop. All uses changed.Paul Eggert
(parse_tab_stop): Renamed from parse_tabstop. All uses changed. (validate_tab_stop): Renamed from validate_tabstop. All uses changed. (next_file, main): Check fclose against 0, not EOF. (unexpand): Remove unnecessary casts. Add another loop nesting level, for lines, so that per-line variables are initialized cleanly. Revamp tab checking. Check for write error immediately, rather than just once at the end of the program. (TAB_STOP_SENTINEL): Remove. (tab_size): Now size_t, not uintmax_t, since we need to store the sequences of blanks. (max_column_width): New var. (usage): Say "blank" where POSIX requires this. (add_tab_stop): Calculate maximum column width. (unexpand): Store the pending blanks, instead of merely counting them. Follow POSIX's rules about -a requiring two blanks before a tab stop. Get rid of internal label and goto.
2004-08-03Int cleanup and minor reorganization to be more like src/expand.c.Paul Eggert
Include quote.h, xstrndup.h. (TAB_STOP_SENTINEL): Increase from INT_MAX to INTMAX_MAX. (convert_entire_line, have_read_stdin, parse_tabstops, next_file, unexpand, main): Use bool for booleans. (tab_size, tab_list, add_tabstop, validate_tabstops, unexpand): Use uintmax_t for column counts. (first_free_tab, validate_tabstops, unexpand): Use size_t for sizes. (add_tabstop, parse_tabstops, main): Don't reserve UINTMAX_MAX as a tab stop. (parse_tabstops): Don't use ISBLANK on possibly-signed char. Detect overflow in tab stop string. (next_file, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0. (unexpand): Concatenate input files the same way expand does.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(usage): Don't bother normalizing exit status since the arg is already the correct exit status now.
2004-01-04(n_tabs_allocated): New global.Jim Meyering
(add_tabstop): Use x2nrealloc rather than xrealloc.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-23(unexpand): Save errno after input error, to report proper errno value.Jim Meyering
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-05-10(main): Handle argc < optind.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-01-12(usage): Document --first-only and mention that --tabs=N (-t) enables --all ↵Jim Meyering
(-a).
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-02Add more support for POSIX 1003.1-2001, which requires removal forJim Meyering
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.
2001-12-01Reflect renaming to, and new usage of these macros:Jim Meyering
HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION.
2001-12-01(usage): Use new macros, EMIT_HELP_DESCRIPTION and EMIT_VERSION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23Factor out some common strings to make translation easier.Jim Meyering
Split usage strings so that --help and --version descriptions are alone in their own string. Likewise for the one that says: Mandatory arguments to long options are mandatory for short options too.
2001-11-11(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-11-04(usage): Say thatJim Meyering
``Mandatory arguments to long options are mandatory for short options too.\n\''
2000-05-20Arrange to call close_stdout upon exit. Don't close stdout explicitly.Jim Meyering
2000-05-12New option: --first-onlyJim Meyering
(anonymous enum) [CONVERT_FIRST_ONLY_OPTION]: Define. (long_options): Add `first-only'. (main): Handle new option.
2000-01-15(TAB_STOP_SENTINEL): Define.Jim Meyering
(unexpand): Use it instead of INT_MAX. Declare column and pending to be `unsigned'. Increment pending and column counters only if column is smaller than TAB_STOP_SENTINEL.
1999-04-04Standardize --help and --version processing.Jim Meyering
1999-04-03Use AUTHORS in place of string in parse_long_options call.Jim Meyering
1999-04-03Insert AUTHORS definition.Jim Meyering
1999-04-03Use PROGRAM_NAME in place of string in parse_long_options call.Jim Meyering
1999-04-03define PROGRAM_NAMEJim Meyering
1999-03-04Include long-options.hJim Meyering
[long_options]: Remove the "help" and "version" entries. Remove declarations of show_help and show_version. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.