projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoupdates
[pspp]
/
lib
/
fwriteerror.h
diff --git
a/lib/fwriteerror.h
b/lib/fwriteerror.h
index 570023778875a4942ddac8461fedcb688e1ee474..6a3edc6d1bde0a0fa4b5cd6b9cb3783f38753ee2 100644
(file)
--- a/
lib/fwriteerror.h
+++ b/
lib/fwriteerror.h
@@
-1,11
+1,11
@@
/* Detect write error on a stream.
/* Detect write error on a stream.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005
-2006, 2009-2010
Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
Written by Bruno Haible <bruno@clisp.org>, 2003.
- 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
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
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
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* There are two approaches for detecting a write error on a stream opened
for writing:
/* There are two approaches for detecting a write error on a stream opened
for writing:
@@
-40,6
+39,10
@@
#include <stdio.h>
#include <stdio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Write out the not yet written buffered contents of the stream FP, close
the stream FP, and test whether some error occurred on the stream FP.
FP must be a stream opened for writing.
/* Write out the not yet written buffered contents of the stream FP, close
the stream FP, and test whether some error occurred on the stream FP.
FP must be a stream opened for writing.
@@
-49,3
+52,11
@@
For any given stream FP other than stdout, fwriteerror (FP) may only be
called once. */
extern int fwriteerror (FILE *fp);
For any given stream FP other than stdout, fwriteerror (FP) may only be
called once. */
extern int fwriteerror (FILE *fp);
+
+/* Likewise, but don't consider it an error if FP has an invalid file
+ descriptor and no output was done to FP. */
+extern int fwriteerror_no_ebadf (FILE *fp);
+
+#ifdef __cplusplus
+}
+#endif