summaryrefslogtreecommitdiff
path: root/gs/src/gscparam.c
AgeCommit message (Collapse)AuthorFilesLines
2004-08-04Addition of a Library Context to start the process of removing globals.Stefan Kemper1-1/+1
DETAILS : The goals is to remove globals from the system, this includes static globals that would hinder multiple threads from running at once. gs_lib_ctx is intended to be used as the opaque "handle" object that a client would use to associate with a thread running through the library. Independent of a gs or a language switch build, this needs a new iapi2.h that allows the use of better job control from the client side. gs_lib_ctx is stashed under the gs_memory_t object and all memory objects used by a thread refer to the same gs_lib_ctx. This storage location was choosen as a convenence since a memory_t pointer is common throughout the system. Most of the turmoil is adding memory_t pointers to functions that used global variables but didn't have a memory pointer. FILE stdin, stdout, stderr are one per process by default. stdin and stdout may be changed but stderr may not. FILE stderr is one per process and shouldn't be changed. Note the stderr_fn is also one per process, changing this function pointer will not help as most users of stderr printing do not have a thread handle. Changing to a thread local storage mechanism can solve this. gs_id's are currently per thread with each thread starting over at 1. This can be moved to per process with mutexes if so desired. A library context has a pointer to the top_of_system the intent is that this a void handle avaliable to make top of the system calls without knowing the data type. In a postscript only build this would be gs_main_instance but in a language switched build this would be an object above that main_universe. Other members of gs_lib_ctx_t are nothing more than global objects relocated to this "bag". gs_name_table, dict_autoexpand are examples of this. There are a few more globals that will be moved. At the moment iapi is still constrained to one thread, since some of the globals haven't been removed yet. The display device's callback function setting is supported for now but this interface should be changed to a sDEVICE style call. gs_memory_t is the base type the abstract type gs_raw_memory_t is gone, this means that all memory types must derive from gs_memory_t. In addition to a pointer to the gs_lib_ctx there is a pointer to a non_gc_memory this will always point to a non garbage collected memory, it maybe the current object or an object below the current gargabe collected memory space. This can be used were the previous code used the global gs_malloc_memory. gs_malloc() now takes a memory pointer, it finds the non-gc memory from a valid memory pointer and allocates from it. The gdevbit device has an improved algorthym for converting from cmyk to rgb, this is never used by postscript but for pcl rops it puts the k plane into rgb. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@5215 a1074d23-0009-0410-80fe-cf8c14f379e6
2002-02-21Reverts to marking files with the single Id cvs tag instead of theRalph Giles1-1/+1
RCSfile and Revision pair. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@2241 a1074d23-0009-0410-80fe-cf8c14f379e6
2002-02-21Update banner to the new format common to all releases (AFPL, GPL andRay Johnston1-13/+11
Artifex Software's commercial release). References file LICENSE. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@2234 a1074d23-0009-0410-80fe-cf8c14f379e6
2001-07-06Fix: Prevent non-persistent name_arrays of size==0 from causing a VMerrorRay Johnston1-7/+9
if alloc of size 0 returns a NULL. Detected with SeparationColorNames from the PCL code. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@1579 a1074d23-0009-0410-80fe-cf8c14f379e6
2000-09-19Updates the license notices to reflect the name change from AladdinL Peter Deutsch1-16/+16
Ghostscript to AFPL Ghostscript, as well as some internal references to the program name. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@729 a1074d23-0009-0410-80fe-cf8c14f379e6
2000-08-19Fix: Parameter lists didn't have proper GC descriptors; garbage collectionL Peter Deutsch1-5/+64
could mangle keys and collection values in non-transient parameter lists (such as distiller parameters). git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@647 a1074d23-0009-0410-80fe-cf8c14f379e6
2000-03-19Changes the key type returned by parameter list enumeration to include aL Peter Deutsch1-13/+38
persistence flag, makes C parameter lists support non-persistent keys, and upgrades GC descriptors so that parameter lists can be used non-transiently; updates implementors of parameter lists to call gs_param_list_init to initialize the common members, which is now required. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@148 a1074d23-0009-0410-80fe-cf8c14f379e6
2000-03-19Undoes a premature change that depends on an update not yet checked in.L Peter Deutsch1-3/+2
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@146 a1074d23-0009-0410-80fe-cf8c14f379e6
2000-03-19Adds a procedure for allocating a C parameter list.L Peter Deutsch1-1/+8
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@145 a1074d23-0009-0410-80fe-cf8c14f379e6
2000-03-09Populate repository with gs 6.0 files.ghostscript-6.0L Peter Deutsch1-3/+15
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@2 a1074d23-0009-0410-80fe-cf8c14f379e6
2000-02-15Update to Aladdin 6.0 - Only license block formatting changed.Ray Johnston1-2/+3
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@1089 06663e23-700e-0410-b217-a244a6096597
1999-12-12Imports Aladdin's 596.Henry Stiles1-16/+3
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@1040 06663e23-700e-0410-b217-a244a6096597
1999-10-03This is the first gs593 integration it is *NOT* a release. NormallyHenry Stiles1-3/+3
each file is checked in with an associated log entry, in order to check in all of the code simultaneously we batch all of the file name's modified and change descriptions here (Note: Aladdin code changes are documented in gs/doc/News.htm) - pcstate.h - removes show enumeration from pcl state. - pctop.c, pxtop.c - gs_grestore_no_wraparound()'s is now gs_grestore_only(). - pxgstate.c - ENUM_RETURN_CONST_STRING_PTR() now takes a gs string argument instead of the string's data as it did previously. - plmain.c - - The library no longer initializes io devices. Adds gs_iodev_init() to main() procedure. Also, gs_c_param_list_rewrite() is renamed to gs_c_param_list_write_more(). - pcltop.mak - adds pipe.dev for operating system pipe support. - pctext.c, pglabel.c, pxfont.c, plfont.c - extensive modifications to support the text api (gstext.h) - use gs_text_enum_t instead of gs_show_enum. - removes enumeration allocation, this is now done by the text "begin" functions. - update "next_char" procs and "encode char" procs to take a glyph argument and the character argument is now passed by value (pcl nor xl make use of the glyph argument). - char_path_n_init() replaced with gs_charpath_begin(). - gs_show_n_init() replaced with gs_show_begin(). - gs_show_next() is now handled by gs_process_text(). - gs_release_text() added. - gs_xyshow_n_init() replace with gs_xyshow_begin(). Passing of x and y coordinates modified to support the new interface. Unfortunately, we need to transform the coordinates into the space of the font scaling matrix, that is the current ctm for xl when the the text is processed. This differs from postscript which appears to have the regular user->device matrix in the graphics state during processing. - (plfont.c) - gs_notify_init() is now part of the pfont initialization procedure, related TODO: cut over to gs_font_alloc() and gs_font_base_alloc(). - all gs files - removes uninitialized rcs identifiers. KNOWN PROBLEMS: occassional pxl and pcl crashes in gdev_mem_set_line_ptrs() when running in color due to null base (data) pointer. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@985 06663e23-700e-0410-b217-a244a6096597
1999-06-02Initial checkin for multiple language support, shared devices,John Desrosiers1-2/+10
interpreter instances, interpreter initialization/de-initialization, etc. A todo list of unfinished work is in pctop.c and pxtop.c. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@873 06663e23-700e-0410-b217-a244a6096597
1999-05-24initial gs5.84 checkin with pcl and xl compiling.Henry Stiles1-9/+10
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@857 06663e23-700e-0410-b217-a244a6096597
1999-03-25Add logic to chain lists using 'target' element. Also add 'set_target'Ray Johnston1-5/+26
function that allows chaining two lists. Params on first list will supercede parameters on the second, target, list. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@786 06663e23-700e-0410-b217-a244a6096597
1998-08-22filters out the id string.Henry Stiles1-1/+1
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@321 06663e23-700e-0410-b217-a244a6096597
1998-08-19gs 5.34 checkin.Henry Stiles1-1/+1
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@318 06663e23-700e-0410-b217-a244a6096597
1998-08-08Initial revisionHenry Stiles1-0/+474
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@277 06663e23-700e-0410-b217-a244a6096597