summaryrefslogtreecommitdiff
path: root/gs/src/gdevpsu.h
diff options
context:
space:
mode:
authorAlex Cherepanov <alex.cherepanov@artifex.com>2003-03-20 20:27:46 +0000
committerAlex Cherepanov <alex.cherepanov@artifex.com>2003-03-20 20:27:46 +0000
commitf74e02a4aa23c0ef5b164a2dab31ac2f511ef369 (patch)
treec10bd6d5ca0547da72b63b522b356305f4b3ae66 /gs/src/gdevpsu.h
parent7b53c06039f8203951a5bfa0b2eda8f19cd736e8 (diff)
Check i/o errors in PS and EPS generation drivers. Return ioerror soon
after the error is encountered in the output stream. Fixes bug #686741 DETAILS: To simplify the code errors are checked only at the critical places: before seeking, inside loops, before returning from functions. Stream error status is checked by direct access to the stream structure because both macro and extern_inline based solutions were declined. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@3728 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gdevpsu.h')
-rw-r--r--gs/src/gdevpsu.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gs/src/gdevpsu.h b/gs/src/gdevpsu.h
index 30b3fbf7a..62a9d5b29 100644
--- a/gs/src/gdevpsu.h
+++ b/gs/src/gdevpsu.h
@@ -34,7 +34,7 @@ typedef struct gx_device_pswrite_common_s {
/* ---------------- Low level ---------------- */
/* Write a 0-terminated array of strings as lines. */
-void psw_print_lines(FILE *f, const char *const lines[]);
+int psw_print_lines(FILE *f, const char *const lines[]);
/* ---------------- File level ---------------- */
@@ -42,15 +42,15 @@ void psw_print_lines(FILE *f, const char *const lines[]);
* Write the file header, up through the BeginProlog. This must write to a
* file, not a stream, because it may be called during finalization.
*/
-void psw_begin_file_header(FILE *f, const gx_device *dev,
+int psw_begin_file_header(FILE *f, const gx_device *dev,
const gs_rect *pbbox,
gx_device_pswrite_common_t *pdpc, bool ascii);
/* End the file header.*/
-void psw_end_file_header(FILE *f);
+int psw_end_file_header(FILE *f);
/* End the file. */
-void psw_end_file(FILE *f, const gx_device *dev,
+int psw_end_file(FILE *f, const gx_device *dev,
const gx_device_pswrite_common_t *pdpc,
const gs_rect *pbbox, int page_count);
@@ -59,14 +59,14 @@ void psw_end_file(FILE *f, const gx_device *dev,
/*
* Write the page header.
*/
-void psw_write_page_header(stream *s, const gx_device *dev,
+int psw_write_page_header(stream *s, const gx_device *dev,
const gx_device_pswrite_common_t *pdpc,
bool do_scale, long page_ord, int dictsize);
/*
* Write the page trailer. We do this directly to the file, rather than to
* the stream, because we may have to do it during finalization.
*/
-void psw_write_page_trailer(FILE *f, int num_copies, int flush);
+int psw_write_page_trailer(FILE *f, int num_copies, int flush);
#endif /* gdevpsu_INCLUDED */