X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fclosein.c;h=beff8bb53a7e40fedc9d83a25b4931a74ec64816;hb=c3dbfe95b16dfd35bba520c1d90275e9622e1a46;hp=bca7711baed8eac446c9ed7c9061a14e0f87368e;hpb=7042775894700f8be0e6bc2a5ff3c49fc77296bc;p=gnulib.git diff --git a/lib/closein.c b/lib/closein.c index bca7711ba..beff8bb53 100644 --- a/lib/closein.c +++ b/lib/closein.c @@ -1,11 +1,11 @@ /* Close standard input, rewinding seekable stdin if necessary. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ #include @@ -87,22 +86,22 @@ close_stdin (void) if (freadahead (stdin) > 0) { /* Only attempt flush if stdin is seekable, as fflush is entitled to - fail on non-seekable streams. */ + fail on non-seekable streams. */ if (fseeko (stdin, 0, SEEK_CUR) == 0 && fflush (stdin) != 0) - fail = true; + fail = true; } if (close_stream (stdin) != 0) fail = true; if (fail) { /* Report failure, but defer exit until after closing stdout, - since the failure report should still be flushed. */ + since the failure report should still be flushed. */ char const *close_error = _("error closing file"); if (file_name) - error (0, errno, "%s: %s", quotearg_colon (file_name), - close_error); + error (0, errno, "%s: %s", quotearg_colon (file_name), + close_error); else - error (0, errno, "%s", close_error); + error (0, errno, "%s", close_error); } close_stdout ();