summaryrefslogtreecommitdiff
path: root/pcl/pgmisc.h
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>1998-07-23 03:43:11 +0000
committerHenry Stiles <henry.stiles@artifex.com>1998-07-23 03:43:11 +0000
commitaf50662c0953f3846d629a5433538f88e9e4ea15 (patch)
tree70e8c7d86ad68a6389a637590a5073aff97e88aa /pcl/pgmisc.h
parentf22e4bc9c41214034054dec241146032e318ea10 (diff)
This commit was generated by cvs2svn to compensate for changes in r100,
which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@101 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'pcl/pgmisc.h')
-rw-r--r--pcl/pgmisc.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/pcl/pgmisc.h b/pcl/pgmisc.h
index 046b76d80..589124fb8 100644
--- a/pcl/pgmisc.h
+++ b/pcl/pgmisc.h
@@ -21,22 +21,19 @@ extern void hpgl_set_lost_mode(P2(hpgl_state_t *pgls, hpgl_lost_mode_t lost_mode
#ifdef DEBUG
extern void hpgl_error(P0());
+extern int hpgl_print_error(P4(const char *function, const char *file, int line, int code));
# ifdef __GNUC__
-# define hpgl_call_note_error()\
- dprintf4("hpgl call failed\n\tcalled from: %s\n\tfile: %s\n\tline: %d\n\terror code: %d\n",\
- __FUNCTION__, __FILE__, __LINE__, code);\
- hpgl_error();
+# define hpgl_call_note_error(code)\
+ hpgl_print_error(__FUNCTION__, __FILE__, __LINE__, code)
# else
-# define hpgl_call_note_error()\
- dprintf3("hpgl call failed\n\tcalled from:\n\tfile: %s\n\tline: %d\n\terror code: %d\n",\
- __FILE__, __LINE__, code);\
- hpgl_error();
+# define hpgl_call_note_error(code)\
+ hpgl_print_error((const char *)0, __FILE__, __LINE__, code)
# endif
#else /* !DEBUG */
-#define hpgl_call_note_error() /* */
+#define hpgl_call_note_error(code) (code)
#endif
@@ -48,9 +45,7 @@ do { \
int code; \
if ((code = (call)) < 0) \
{ if_check_else() \
- { hpgl_call_note_error(); \
- return(code); \
- } \
+ return hpgl_call_note_error(code); \
} \
} while (0)