summaryrefslogtreecommitdiff
path: root/base/gdevprn.h
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2019-03-07 18:03:00 +0000
committerChris Liddell <chris.liddell@artifex.com>2019-05-29 09:39:36 +0100
commit9de16a6637b73e35f79d2d622de403b24e6502f2 (patch)
treebc6fba44e03e9caab75968fda94a0cea73caf5e3 /base/gdevprn.h
parent808021913baf763e07cc9eabc3716bfa507380ff (diff)
downloadghostpdl-9de16a6637b73e35f79d2d622de403b24e6502f2.tar.gz
Move FILE * operations behind new gp_file * API.
(squash of commits from filesec branch) Most of this commit is donkeywork conversions of calls from FILE * -> gp_file *, fwrite -> gp_fwrite etc. Pretty much every device is touched, along with the clist and parsing code. The more interesting changes are within gp.h (where the actual new API is defined), gpmisc.c (where the basic implementations live), and the platform specific levels (gp_mswin.c, gp_unifs.c etc where the platform specific implementations have been tweaked/renamed). File opening path validation All file opening routines now call a central routine for path validation. This then consults new entries in gs_lib_ctx to see if validation is enabled or not. If so, it validates the paths by seeing if they match. Simple C level functions for adding/removing/clearing paths, exposed through the gsapi level. Add 2 postscript operators for path control. <name> <string> .addcontrolpath - Add the given <string> (path) to the list of paths for controlset <name>, where <name> can be: /PermitFileReading /PermitFileWriting /PermitFileControl (Anything else -> rangecheck) - .activatepathcontrol - Enable path control. At this point PS cannot make any more changes, and all file access is checked.
Diffstat (limited to 'base/gdevprn.h')
-rw-r--r--base/gdevprn.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/gdevprn.h b/base/gdevprn.h
index a76496e27..1d05b9c9d 100644
--- a/base/gdevprn.h
+++ b/base/gdevprn.h
@@ -67,7 +67,7 @@ typedef struct gx_printer_device_procs_s {
*/
#define prn_dev_proc_print_page(proc)\
- int proc(gx_device_printer *, FILE *)
+ int proc(gx_device_printer *, gp_file *)
prn_dev_proc_print_page((*print_page));
/* BACKWARD COMPATIBILITY */
#define dev_proc_print_page(proc) prn_dev_proc_print_page(proc)
@@ -75,7 +75,7 @@ typedef struct gx_printer_device_procs_s {
/* Print the page on the output file, with a given # of copies. */
#define prn_dev_proc_print_page_copies(proc)\
- int proc(gx_device_printer *, FILE *, int)
+ int proc(gx_device_printer *, gp_file *, int)
prn_dev_proc_print_page_copies((*print_page_copies));
/* BACKWARD COMPATIBILITY */
#define dev_proc_print_page_copies(proc) prn_dev_proc_print_page_copies(proc)
@@ -140,7 +140,7 @@ typedef struct bg_print_s {
int Duplex_set; /* -1 = not supported */\
/* ------ End of parameters ------ */\
bool file_is_new; /* true iff file just opened */\
- FILE *file; /* output file */\
+ gp_file *file; /* output file */\
long buffer_space; /* amount of space for clist buffer, */\
/* 0 means not using clist */\
byte *buf; /* buffer for rendering */\