summaryrefslogtreecommitdiff
path: root/src/tac.c
AgeCommit message (Collapse)Author
2005-07-11(copy_to_temp, tac_file, main):Paul Eggert
Avoid setmode; use POSIX-specified routines instead.
2005-07-03Include stdlib--.h rather than unistd-safer.h.Paul Eggert
(copy_to_temp): Don't call fd_safer; no longer needed now that we include stdlib--.h.
2005-06-19(tac_mem, tac_stdin_to_mem): Remove #if-0'd functions.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-11Include unistd-safer.h.Paul Eggert
(copy_to_temp): Use fd_safer. (tac_file): Don't assume fopen cannot return stdin.
2005-03-28(main): Use NULL, not `0'.Jim Meyering
2004-12-14 [DONT_UNLINK_WHILE_OPEN]: Add a FIXME comment explaining thatJim Meyering
using atexit like this is wrong.
2004-12-14(tac_nonseekable): Return false also if copy_to_temp fails.Jim Meyering
2004-12-14Include quotearg.h.Jim Meyering
Use quotearg_colon in most diagnostics. (copy_to_temp): Rewrite not to exit upon I/O or temp-file-creation failure. Before, this command (with /full/tmp being a full partition) TMPDIR=/full/tmp ./tac /proc/modules tac.c would exit immediately upon the write error while trying to copy non-seekable /proc/modules to the full partition. Now it still reports the failure but continues on with the remaining file.
2004-11-03quote(...) file names in diagnostics.Jim Meyering
2004-10-29 * src/tac.c (tac_file): Remove temporary prototype and move thisJim Meyering
function `down' so that it precedes definition of tac_nonseekable.
2004-10-29`tac /proc/modules' would print nothingJim Meyering
(copy_to_temp): Renamed from save_stdin, since now it copies a general file descriptor, not just stdin. (tac_nonseekable): Renamed/adapted from tac_stdin. (tac_file): Get fd via `open' directly rather than via fopen/fileno, since we never used the stream. Perform "-" to stdin mapping here rather than in main. Determine whether a file is seekable, by trying to `lseek' to its end, and dispatch to tac_seekable or tac_nonseekable accordingly. (main): Rewrite argument handling now that it uses only tac_file. Reported by Harald Dunkel in http://bugs.debian.org/278604.
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-03(separator_ends_record, tac_seekable, tac_file,Paul Eggert
tac_stdin, tac_stdin_to_mem, main): Use bool for booleans. (match_length, G_buffer_size, tac_seekable, main): Use size_t for sizes. (tac_seekable): Use ptrdiff_t for pointer subtraction. Report an error if the result is out of range. (tac_seekable, main): Check for integer overflow in buffer size calculations. (main): Remove unnecessary casts.
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.
2003-11-04(memrchr): Remove #if-0'd function.Jim Meyering
(tac_stdin_to_mem): Clean up #if-0'd code.
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-22(tac_mem): Don't return a value; nobody uses it.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-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-11(tac_seekable): Enclose diagnostic in _(...).Jim Meyering
2003-06-17(main): Call initialize_main.Jim Meyering
2002-11-23(output): Declare some local variables to be of type size_t,Jim Meyering
rather than `int' to avoid warnings from gcc.
2002-10-08(save_stdin, tac_stdin_to_mem): Adapt to new safe_read ABI.Jim Meyering
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-08-25(main): Close STDIN_FILENO rather than a literal `0'.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-01-22(save_stdin): Report proper errno value afterJim Meyering
fwrite failures. Do not bother to rewind the temp file, as it'll be read backwards anyway.
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\''
2001-08-13(AUTHORS): Mark string for translation, since it contains the English word ↵Jim Meyering
`and'.
2001-03-12(save_stdin): Use mkstemp to create temporary file.Jim Meyering
2000-05-20Arrange to call close_stdout upon exit. Don't close stdout explicitly.Jim Meyering
1999-07-04(memrchr): Ifdef out this unused function.Jim Meyering
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-13(tac_mem): `#if-0'-out this unused function.Jim Meyering
(tac_stdin_to_mem): Likewise.
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.
1999-01-25(DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.Jim Meyering
1999-01-14Don't prototype usage as static.Jim Meyering
1999-01-11All of the following new code is protected by `#if DONT_UNLINK_WHILE_OPEN'Jim Meyering
(file_to_remove): New global. (fp_to_close): New global. (unlink_tempfile): New function. (record_tempfile): New function. (save_stdin): Call record_tempfile. Use SET_BINARY. (main): Use SET_BINARY and SET_BINARY2. From Eli Zaretskii.