diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-19 23:49:56 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-19 23:49:56 +0200 |
commit | 781969994b5381ba4bed03beef217f9bde6e7c58 (patch) | |
tree | aede27c7532f0fbe82f03dc0c04c9316be510fd5 /pl/pltop.c | |
parent | 0b17959f31afe3baffbc328e7f92e88e634ad8b8 (diff) |
Indent with spaces and strip trailing whitespace.
Diffstat (limited to 'pl/pltop.c')
-rw-r--r-- | pl/pltop.c | 105 |
1 files changed, 51 insertions, 54 deletions
diff --git a/pl/pltop.c b/pl/pltop.c index bed6c8c56..0e421415c 100644 --- a/pl/pltop.c +++ b/pl/pltop.c @@ -23,13 +23,12 @@ #include "gsdevice.h" #include "pltop.h" - /* Get implemtation's characteristics */ const pl_interp_characteristics_t * /* always returns a descriptor */ pl_characteristics( const pl_interp_implementation_t *impl /* implementation of interpereter to alloc */ ) -{ +{ return impl->proc_characteristics(impl); } @@ -41,11 +40,11 @@ pl_allocate_interp( gs_memory_t *mem /* allocator to allocate interp from */ ) { - int code = impl->proc_allocate_interp(interp, impl, mem); - if (code < 0) - return code; - (*interp)->implementation = impl; - return code; + int code = impl->proc_allocate_interp(interp, impl, mem); + if (code < 0) + return code; + (*interp)->implementation = impl; + return code; } /* Do per-instance interpreter allocation/init. No device is set yet */ @@ -56,15 +55,15 @@ pl_allocate_interp_instance( gs_memory_t *mem /* allocator to allocate instance from */ ) { - pl_interp_instance_t *pli; - int code - = interp->implementation->proc_allocate_interp_instance(instance, interp, mem); - if (code < 0) - return code; - pli = *instance; - pli->interp = interp; + pl_interp_instance_t *pli; + int code + = interp->implementation->proc_allocate_interp_instance(instance, interp, mem); + if (code < 0) + return code; + pli = *instance; + pli->interp = interp; - return code; + return code; } /* Set a client language into an interperter instance */ @@ -75,8 +74,8 @@ pl_set_client_instance( pl_interp_instance_clients_t which_client ) { - return instance->interp->implementation->proc_set_client_instance - (instance, client, which_client); + return instance->interp->implementation->proc_set_client_instance + (instance, client, which_client); } /* Set an interpreter instance's pre-page action */ @@ -87,8 +86,8 @@ pl_set_pre_page_action( void *closure /* closure to call action with */ ) { - return instance->interp->implementation->proc_set_pre_page_action - (instance, action, closure); + return instance->interp->implementation->proc_set_pre_page_action + (instance, action, closure); } /* Set an interpreter instance's post-page action */ @@ -99,18 +98,17 @@ pl_set_post_page_action( void *closure /* closure to call action with */ ) { - return instance->interp->implementation->proc_set_post_page_action - (instance, action, closure); + return instance->interp->implementation->proc_set_post_page_action + (instance, action, closure); } - int /* ret 0 ok, else -ve err */ pl_get_device_memory( pl_interp_instance_t *instance, /* interp instance to use */ gs_memory_t **memory ) { - return instance->interp->implementation->proc_get_device_memory(instance, memory); + return instance->interp->implementation->proc_get_device_memory(instance, memory); } /* Get and interpreter prefered device memory allocator if any */ @@ -120,16 +118,16 @@ pl_set_device( gx_device *device /* device to set (open or closed) */ ) { - return instance->interp->implementation->proc_set_device(instance, device); + return instance->interp->implementation->proc_set_device(instance, device); } /* Prepare interp instance for the next "job" */ int /* ret 0 ok, else -ve error code */ pl_init_job( - pl_interp_instance_t *instance /* interp instance to start job in */ + pl_interp_instance_t *instance /* interp instance to start job in */ ) { - return instance->interp->implementation->proc_init_job(instance); + return instance->interp->implementation->proc_init_job(instance); } /* Parse a random access seekable file. @@ -139,8 +137,8 @@ pl_init_job( */ int pl_process_file( - pl_interp_instance_t *instance, - char *filename + pl_interp_instance_t *instance, + char *filename ) { return instance->interp->implementation->proc_process_file(instance, filename); @@ -155,54 +153,54 @@ int /* The parser reads data from the input * other <0 value - an error was detected. */ pl_process( - pl_interp_instance_t *instance, /* interp instance to process data job in */ - stream_cursor_read *cursor /* data to process */ + pl_interp_instance_t *instance, /* interp instance to process data job in */ + stream_cursor_read *cursor /* data to process */ ) { - return instance->interp->implementation->proc_process(instance, cursor); + return instance->interp->implementation->proc_process(instance, cursor); } /* Skip to end of job ret 1 if done, 0 ok but EOJ not found, else -ve error code */ int pl_flush_to_eoj( - pl_interp_instance_t *instance, /* interp instance to flush for */ - stream_cursor_read *cursor /* data to process */ + pl_interp_instance_t *instance, /* interp instance to flush for */ + stream_cursor_read *cursor /* data to process */ ) { - return instance->interp->implementation->proc_flush_to_eoj(instance, cursor); + return instance->interp->implementation->proc_flush_to_eoj(instance, cursor); } /* Parser action for end-of-file (also resets after unexpected EOF) */ int /* ret 0 or +ve if ok, else -ve error code */ pl_process_eof( - pl_interp_instance_t *instance /* interp instance to process data job in */ + pl_interp_instance_t *instance /* interp instance to process data job in */ ) { - return instance->interp->implementation->proc_process_eof(instance); + return instance->interp->implementation->proc_process_eof(instance); } /* Report any errors after running a job */ int /* ret 0 ok, else -ve error code */ pl_report_errors(pl_interp_instance_t *instance, /* interp instance to wrap up job in */ - int code, /* prev termination status */ - long file_position, /* file position of error, -1 if unknown */ - bool force_to_cout /* force errors to cout */ + int code, /* prev termination status */ + long file_position, /* file position of error, -1 if unknown */ + bool force_to_cout /* force errors to cout */ ) { - return instance->interp->implementation->proc_report_errors - (instance, code, file_position, force_to_cout); + return instance->interp->implementation->proc_report_errors + (instance, code, file_position, force_to_cout); } /* Wrap up interp instance after a "job" */ int /* ret 0 ok, else -ve error code */ pl_dnit_job( - pl_interp_instance_t *instance /* interp instance to wrap up job in */ + pl_interp_instance_t *instance /* interp instance to wrap up job in */ ) { - if ( instance ) - return instance->interp->implementation->proc_dnit_job(instance); + if ( instance ) + return instance->interp->implementation->proc_dnit_job(instance); else - return 0; + return 0; } /* Remove a device from an interperter instance */ @@ -211,8 +209,8 @@ pl_remove_device( pl_interp_instance_t *instance /* interp instance to use */ ) { - int code = instance->interp->implementation->proc_remove_device(instance); - return code; + int code = instance->interp->implementation->proc_remove_device(instance); + return code; } /* Deallocate a interpreter instance */ @@ -221,9 +219,9 @@ pl_deallocate_interp_instance( pl_interp_instance_t *instance /* instance to dealloc */ ) { - int code - = instance->interp->implementation->proc_deallocate_interp_instance(instance); - return code; + int code + = instance->interp->implementation->proc_deallocate_interp_instance(instance); + return code; } /* Do static deinit of interpreter */ @@ -232,8 +230,7 @@ pl_deallocate_interp( pl_interp_t *interp /* interpreter to deallocate */ ) { - int code - = interp->implementation->proc_deallocate_interp(interp); - return code; + int code + = interp->implementation->proc_deallocate_interp(interp); + return code; } - |