summaryrefslogtreecommitdiff
path: root/lib/closeout.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-2/+2
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-3/+3
|
* Add an option for ignoring EPIPE during close_stdout.Bruno Haible2008-10-061-2/+41
|
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|
* [ChangeLog]Jim Meyering2006-10-061-1/+6
| | | | | | | * modules/closeout (Description): Mention stderr too. [lib/ChangeLog] * closeout.c (close_stdout): Also close stderr. * closeout.h: Update comment.
* * _fpending.c: Include <config.h> unconditionally, since we noPaul Eggert2006-09-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | longer worry about uses that don't define HAVE_CONFIG_H. * acl.c, alloca.c, argmatch.c, atexit.c, backupfile.c: * basename.c, c-stack.c, c-strtod.c, calloc.c, canon-host.c: * canonicalize.c, chdir-long.c, chdir-safer.c, chown.c: * cloexec.c, close-stream.c, closeout.c, creat-safer.c: * cycle-check.c, diacrit.c, dirchownmod.c, dirfd.c, dirname.c: * dup-safer.c, dup2.c, error.c, euidaccess.c, exclude.c: * exitfail.c, fchmodat.c, fchown-stub.c, fd-safer.c: * file-type.c, fileblocks.c, filemode.c, filenamecat.c: * fnmatch.c, fopen-safer.c, fprintftime.c, free.c, fsusage.c: * ftruncate.c, fts-cycle.c, fts.c, full-write.c, gai_strerror.c: * getcwd.c, getdate.y, getdomainname.c, getgroups.c: * gethostname.c, gethrxtime.c, getloadavg.c, getlogin_r.c: * getndelim2.c, getnline.c, getopt.c, getopt1.c, getpass.c: * gettime.c, gettimeofday.c, getugroups.c, getusershell.c: * glob.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c: * human.c, idcache.c, inet_ntop.c, inet_pton.c, inttostr.c: * isdir.c, lchown.c, linebuffer.c, long-options.c, lstat.c: * malloc.c, md5.c, memcasecmp.c, memchr.c, memcmp.c, memcoll.c: * memcpy.c, memmove.c, memrchr.c, mkancesdirs.c, mkdir-p.c: * mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c, modechange.c: * mountlist.c, nanosleep.c, obstack.c, open-safer.c: * openat-die.c, openat.c, pagealign_alloc.c, physmem.c: * pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c: * quotearg.c, raise.c, readtokens.c, readtokens0.c, readutmp.c: * realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c: * same.c, save-cwd.c, savedir.c, setenv.c, settime.c, sha1.c: * sig2str.c, snprintf.c, strdup.c, strerror.c, strftime.c: * stripslash.c, strndup.c, strnlen.c, strpbrk.c, strtod.c: * strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c: * timegm.c, tmpfile-safer.c, unlinkdir.c, userspec.c, utime.c: * utimecmp.c, utimens.c, version-etc-fsf.c, version-etc.c: * xalloc-die.c, xgetcwd.c, xgethostname.c, xmalloc.c: * xmemcoll.c, xnanosleep.c, xreadlink.c, xstrtod.c: * xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c: Likewise.
* * modules/close-stream: New file.Paul Eggert2006-07-221-44/+26
| | | | | | | | | * modules/closeout (Description): Make it clear that it exits with a diagnostic on error. (Depends-on): Add close-stream. Remove fpending, stdbool. * MODULES.html.sh (File stream based Input/Output): Add close-stream. * lib/close-stream.c, lib/close-stream.h: New files. * m4/close-stream.m4: New file.
* * closeout.c (close_stdout): Don't assume 'bool' converts nonzeroPaul Eggert2006-02-081-5/+5
| | | | ints to 0 or 1, as this isn't true for the stdbool.h substitute.
* Use a consistent style for including <config.h>.Paul Eggert2005-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * __fpending.c, acl.c, argmatch.c, argp-help.c, argp-parse.c, argp-pvh.c, backupfile.c, basename.c, c-stack.c, calloc.c, check-version.c, cloexec.c, closeout.c, copy-file.c, creat-safer.c, cycle-check.c, dirfd.c, dirname.c, dup-safer.c, dup2.c, euidaccess.c, exclude.c, exitfail.c, fatal-signal.c, fd-safer.c, file-type.c, fileblocks.c, filemode.c, filenamecat.c, findprog.c, fnmatch.c, fopen-safer.c, free.c, fsusage.c, ftruncate.c, full-write.c, fwriteerror.c, getaddrinfo.c, getcwd.c, getdelim.c, getline.c, getlogin_r.c, getndelim2.c, getnline.c, getopt1.c, getpass.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c, human.c, idcache.c, inet_ntop.c, isdir.c, long-options.c, malloc.c, memcasecmp.c, memcmp.c, memcoll.c, memcpy.c, memmove.c, mkdir-p.c, modechange.c, mountlist.c, open-safer.c, physmem.c, pipe-safer.c, pipe.c, poll.c, posixver.c, progname.c, progreloc.c, putenv.c, quote.c, quotearg.c, readline.c, readlink.c, realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c, same.c, save-cwd.c, savedir.c, sig2str.c, strcspn.c, strerror.c, stripslash.c, strncasecmp.c, strndup.c, strnlen.c, strnlen1.c, strsep.c, strstr.c, strtod.c, strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c, userspec.c, utimecmp.c, version-etc-fsf.c, version-etc.c, wait-process.c, xalloc-die.c, xgetcwd.c, xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xsetenv.c, xstrndup.c, xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c: Standardize inclusion of config.h. * __fpending.h, dirfd.h, getdate.h, human.h, inttostr.h: Removed inclusion of config.h from header files. * inttostr.c: Adjusted in-tree users. * timespec.h: Remove superfluous warning to include config.h. * atexit.c, chdir-long.c chown.c, fchown-stub.c, getgroups.c, gettimeofday.c, lchown.c, lstat.c, mkdir.c, mkstemp.c, nanosleep.c, openat.c, raise.c, readtokens0.c, readutmp.c, unlinkdir.c: Guard inclusion of config.h with HAVE_CONFIG_H.
* *** empty log message ***Paul Eggert2005-05-141-1/+1
|
* Include "__fpending.h" once again.Jim Meyering2004-11-151-6/+19
| | | | | | | | | | Include <stdbool.h>. (close_stdout): Don't fail just because stdout was closed initially, since some programs don't write to stdout in the normal course of operation (other than --version and --help), and we don't want this function to make e.g. `touch file >&-' fail. But do fail if it was closed and someone has tried to write to it. E.g., `printf foo >&-' must fail.
* Ensure that no close failure goes unreported.Jim Meyering2004-11-101-12/+4
| | | | | | (close_stdout): Always close stdout. I.e., don't return early when it seems there's nothing to flush. Don't include __fpending.h.
* Remove dependencies on unlocked-io.Paul Eggert2004-10-041-1/+4
|
* Merge from coreutils.Paul Eggert2004-08-071-5/+3
|
* (close_stdout_set_status, close_stdout_status): Remove.Jim Meyering2003-07-201-29/+8
| | | | | | | Include "closeout.h" right after config.h, to test that it can stand by itself. Include "exitfail.h". Clients should set exit_failure instead. (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>.
* Include gettext.h instead of <libintl.h> with #ifdefs.Bruno Haible2002-11-051-8/+4
|
* (close_stdout_status): If ferror (stdout), doJim Meyering2001-12-201-1/+3
| | | | | not silently exit merely because the output buffer happens to have nothing pending.
* Include unlocked-io.h.Jim Meyering2001-11-171-1/+2
|
* Include "__fpending.h".Jim Meyering2000-08-261-0/+5
| | | | (close_stdout_status): Return right away if there's nothing to flush.
* <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):Jim Meyering2000-05-161-27/+9
| | | | | | | | | | | Remove; no longer needed. "quotearg.h": Add include. (file_name): Do not bother to explicitly initialize to NULL; it's less efficient on some hosts. (close_stdout_status): Remove test as to whether stdout was already closed; it breaks for the case "echo x | sort >&-". Quote file name colons. Do not assume that _("write error") lacks format strings.
* (close_stdout_set_file_name): New function.Jim Meyering2000-05-151-3/+41
| | | | | (close_stdout_status): Use new file-scoped global. Return right away if fstat says the stdout file descriptor is invalid.
* [default_exit_status]: New file-scoped variable.Jim Meyering2000-05-101-2/+13
| | | | (close_stdout_set_status): New function.
* fix commentsFILEUTILS-4_0eJim Meyering1999-04-041-8/+13
| | | | add FIXME
* Add comments.Jim Meyering1999-01-251-2/+18
|
* Use #if, not #ifdef with HAVE_ macrosJim Meyering1998-03-151-1/+1
|
* .Jim Meyering1998-01-041-0/+60