summaryrefslogtreecommitdiff
path: root/windows
Commit message (Collapse)AuthorAgeFilesLines
* MSVC: Fix Debug-contrib and Release-contrib configurations.Robin Watts2023-01-031-4/+4
|
* Move gp_wutf8 functions to be gp_utf8.Robin Watts2022-11-212-4/+8
| | | | | | Promote previously windows specific functions to be generically available (and give them names that reflect that).
* Add text file interpreter for gpdl.Robin Watts2022-10-212-0/+4
| | | | | | | Spots ascii/utf8/utf16 and feeds to PCL interpreter. May need further tweaking with both text file spotting and font selection, but it's a decent start.
* Add gpdl support for SmartOffice integration.Robin Watts2022-09-192-0/+4
| | | | | No actual SmartOffice code here, just the framework for adding the (private) "SO" interpreter.
* Updates for latest extract.Julian Smith2022-03-292-1/+9
| | | | | | | | Extract has two new source files, src/boxer.c and src/rect.c, plus extra rect args in extract_page_begin() and extract_add_char(). For now we pass dummy (0, 0, 0, 0) rect args as they are only used for page layout analysis, which we don't ask extract to do.
* Coverity 375485: Initialise variable.Robin Watts2022-02-182-0/+4
| | | | | Technically, probably not actually required, as no one ever uses total_in, but this doesn't hurt.
* Move base files away from gs_sprintf to gs_snprintf.Robin Watts2022-02-162-0/+8
|
* Move pdfi warning and error definitions into their own file.Robin Watts2022-02-162-1/+9
| | | | | This avoids having 2 tables of errors (enum and error strings) defined in 2 separate files that need to be kept in sync. Same for warnings.
* MSVC: Fix target name for gpdf builds.Robin Watts2022-02-071-14/+14
|
* MSVC Solution: Fixes.Robin Watts2021-11-123-64/+15
| | | | | Fix mistaken inclusion of multi_test.vcxproj, and incorrect target name of gpdf binarys.
* Bug 704701: Split clist handling of screen_phase and tile_phase.Robin Watts2021-11-081-0/+49
| | | | | | | | | | | The clist attempts to send both screen phase (derived from color) and tile phase (for strip_copy_rop) etc using the same command. Unfortunately, there are instances (for example, when using PCL transparency) where we need to send both screen and tile phase through, but with different values. For correctness (and just as importantly, simplicity and sanity), move to sending tile and screen phases through separately.
* Runtime safety of non threadsafe devices and rework globals.Robin Watts2021-11-052-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices within Ghostscript (currently the x11 devices, uniprint and opvp/oprp) use non const static variables, so cannot be run in multiple instances at a time. We now maintain a core "count" of how many non-threadsafe devices are being used at any time. This value can be atomically adjusted by calls to gs_lib_ctx_nts_adjust. Non threadsafe devices now call gx_init_non_threadsafe_device either as or as part of their initialise_device proc. This function attempts to increment the non-threadsafe count and fails to init if there is already a non-threadsafe device running. On success, the device finalize method is modified so that it will decrement the count at the end. The known non-threadsafe devices are updated to call this. In order to have somewhere safe to store this count, we introduce a gs_globals structure, shared between instances. Setting this up without race conditions requires some new gp_ functions that can make use of platform specific threading primitives. We have these implemented for both windows and pthread based platforms. On other platforms, we drop back to the old unsafe mechanism for counting instances. While we do this work, we take the opportunity to push the gs_memory_t pointer used for non-threadsafe debug printing into thread local storage. This enables us to remove the remaining GS_THREADSAFE guarded compilation from the source code. What is left is broadly down to allowing debugging collection for statistics, and these are now controlled by specific COLLECT_STATS_XXX defines. It is assumed that anyone wanting to collect such stats is smart enough to not try to do so while using Ghostscript in a multi-instance environment.
* Consolidate AGL definitions in CChris Liddell2021-08-234-20/+21
| | | | | | | | | | | | Previously, the only C code that required access to the Adobe Glyph List was in the vector devices, so we kept the AGL definition with those. Otherwise it was always in Postscript. The PDF interpreter in C also requires the AGL, so move the AGL into base, and give it its own ".dev". Still to do: Remove the Postscript definition, and create the Postscript definition(s) in PS VM from the C definition.
* Commit pdfi to master.Robin Watts2021-08-127-66/+1470
| | | | | | | | | | | This is a commit of the pdfi branch to master, eliminating the traditional merge step. The full history of the pdfi branch can be seen in the repo, and that branch is effectively frozen from this point onwards. This commit actually differs from pdfi in a small number of whitespace changes (trailing spaces etc).
* MSVC: Fix rebuild option of Debug-contrib configuration.Robin Watts2021-06-241-1/+1
|
* VS solution: Put extract files into correct filters.Robin Watts2021-06-081-23/+68
|
* MSVC: Add freetype objects to project.Robin Watts2021-05-122-2/+1302
| | | | | Makes no difference other than us being able to search for things within the project.
* Enable many more devices on Windows builds.Robin Watts2021-04-132-0/+8
| | | | Match Unix as best we can.
* MSVC Solution: Add extract files, remove luratech leftovers.Robin Watts2021-04-131-3/+17
|
* Work with latest Extract library.Julian Smith2021-04-131-0/+4
| | | | | | | | | devices/vector/gdevdocxw.c: Pass extract_format_DOCX to extract_begin(). devices/extract.mak: windows/ghostscript.vcxproj: Added new extract source files.
* MSVC: Add missing gdevnup entries.Robin Watts2021-03-312-0/+8
|
* Remove Luratech integration code/makefilesChris Liddell2021-02-224-37/+0
|
* Windows gpcl6/ufst project: use better/correct targetsChris Liddell2021-02-181-4/+4
| | | | | | | | Firstly, the recursive call to nmake was using the wrong target name (an internal use target), so fix that to use the "real" target. Secondly, give the "real" target a better name, more in keeping with other equivalents.
* Added docxwrite device; uses extract library to write docx output.Julian Smith2021-02-154-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a new docxwrite device which generates docx files. Unlike the txtwrite device, we don't output xml for later use by extract-exe or store information about spans in arrays. Instead we call extract functions such as extract_add_char() directly. Code changes: Have moved txtwrite and docxwrite common code into new devices/vector/doc_common.{c,h}. Shared types and functions are currently: txt_glyph_width_t txt_glyph_widths_t txt_glyph_widths() txt_get_unicode() txt_char_widths_to_uts() txt_calculate_text_size() Building: By default we do not build with Extract and there will be no docxwrite device in the final executables. To build with Extract, specify the location of the extract checkout to build and link with. Unix: ./autogen.sh --with-extract-dir=<extract-dir> Windows: Set environmental variable EXTRACT_DIR=<extract-dir> when building, e.g.: EXTRACT_DIR=<extract-dir> devenv.com windows/GhostPDL.sln /Build Debug /Project ghostscript On both Unix and Windows we exit with an error message if the specified location does not exist.
* Add a VS project to build gpcl6 with ufstChris Liddell2021-02-111-0/+130
| | | | (stemmed from Bug 703415)
* MSVC: Add sanitize configurations/targets.Robin Watts2020-11-116-8/+222
| | | | | While we have 64bit configurations, these will only work for 32 bit builds at the moment, due to MSVC not supporting 64bit builds.
* Bug 702192 Map text to blackMichael Vrhel2020-10-122-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Map all text to black. This is achieved by altering the color space to DeviceGray with a fill of black during gs_text_begin. When gs_text_release occurs, the color space is restored. This will only occur with the option -dBlackText and if the text is actually to be drawn. When going to a raster device, the stroke and stroke fill of the text is handled with a stroke or stroke fill command. My original plan of storing the old color spaces and client color in the text enumerator will not work in this situation as it the enumerator will have already been destroyed when the stroke or stroke/fill command occurs. For this reason I store the old color space information for the current and alternate color spaces in the graphic state. The structure holding the information is garbage collected as it is holding objects that may be garbage collected. We also need to know if the target was a high level device like pdfwrite, as that device will handle the fill AND stroke, and we will need to restore the color space when we tear down the text enumerator. gs_text_release needed to have the pgs added as a parameter to allow the possible release of the blacktext structure when the text is released from the other languages. This did not seem to be too big of an issue as gs_text_begin passes the pgs also. If the pgs is not available, NULL can be passed, and that is done in several locations. A new special op was added to let us avoid doing the black text setting if we are constructing a soft mask. If we did not do this the mask could result in the loss of the text. Finally, Type 3 fonts will NOT be affected by this process. Type 3 fonts are often used for actual graphic logos etc. Ken Sharp suggested we not have them affected by this setting. There were also issues with trying to do type 3 fonts in in that the PDF interpreter does some color space settings of its state when dealing with type 3 fonts and this put the interpreter's state out of sync with the graphic library state. This was tested with a forced setting of black text enabled. No seg faults or errors occurred. There were obviously a lot of differences reported (over 33,000). All the images that were available to me with bmpcmp were gone through. Problems were found and addressed (the soft mask issue for example was found, as were issues with color spaces not getting properly restored).
* Rejig PCL/PXL to call graphics library rather than device functions.Robin Watts2020-09-082-9/+1
| | | | | | | | Also remove pl_begin_image2/pl_image_data2/pl_end_image2 etc functions - might as well just call direct. This leaves pldraw.c and pldraw.h empty, so remove them. Also, take the opportunity to fix some potential cleanup problems.
* Add a couple of files missing from VS Solution.Robin Watts2020-08-142-0/+12
|
* Add gs_param list parsing functions.Robin Watts2020-07-292-0/+4
| | | | | | | | | | | | Actually, steal the existing functions from the PJL code, move them into the graphics library, and refactor slightly. 2 functions; the first one, gs_param_list_add_tokens reads a string of key/value pairs and adds them to the list. The second one, gs_param_list_add_parsed_value takes a key and a string for the value, and just adds that pair to the list.
* Remove displaydev_test project from GhostPDL.sln.Robin Watts2020-06-261-45/+0
| | | | | It should never have been added in git. I added it locally and then it slipped through and got committed by accidently.
* Simple test app for driving the display device.Robin Watts2020-06-251-1/+45
|
* Tesseract based OCR devices.Robin Watts2020-06-032-0/+2669
| | | | | | pdfocr8/24/32, ocr and hocr devices. Use OCRLanguage to set languages to use ("eng" by default).
* Remove pgs->alphaMichael Vrhel2020-04-012-10/+2
| | | | | The alpha value in the graphic state is not used and will only lead to confusion for people working on transparency.
* Remove unused base/gsalphac.[ch]Chris Liddell2020-03-244-19/+1
| | | | | | | | | This was the compositing device used for Display Postscript/NeXT specific alpha blending. Since we haven't supported DPS properly for many years, and officially dropped it completely a couple of years ago, and this compositing device has not been included in the build for several years.... ....just delete the files and remove references to them.
* Fix VS2019 project getting many x64 builds wrong.Robin Watts2020-01-061-54/+12
|
* Update Visual Studio solution to VS2019.Robin Watts2020-01-0210-7/+12505
| | | | | | | | | | | | | | | | | | | | Our belief is that this should work in all versions of VS from 2010 onwards. By moving to VS2019, we lose support totally for Windows XP prior to SP3. If this is a problem, either build using the Makefile, or pull the old VS2005 solution out of git and use that. If customers find this to be a problem, we can maintain the old VS2005 solution alongside the new one with minimal effort. Default builds lose support for Windows XP SP3/Windows Server 2003, but the new "ReleaseXP", "DebugXP" and "MementoXP" configurations will target these platforms (assuming the v141 tools have been installed too). These "XP" binaries will be build into {,debug,mem}objxp directories and will produce binaries with an 'XP' suffix: i.e. {,debug,mem}bin/{gs,gpcl6,gxps,gpdl}win{32,32}{,c}xp.exe.
* GPDL PNG supportRobin Watts2019-11-271-0/+4
|
* Add Jpeg2000 "language" interpreter for gpdl.Robin Watts2019-11-251-0/+4
|
* gpdl: Add 'jbig2' language implementation.Robin Watts2019-11-211-0/+4
|
* Remove gproof device.Robin Watts2019-11-201-4/+0
|
* gpdl: Add tiff "interpreter" to gpdl.Robin Watts2019-11-191-1/+5
|
* Slight reorganisation of gpdl interpreter files.Robin Watts2019-11-191-21/+5
| | | | | | | | | Rather than having each different "language" have a 'top' file in gpdl/foo/footop.c, move them to be gpdl/foo.c. Extra directories seem overkill at this point, and it simplifies the Makefile slightly. Also, rename IMG to JPG.
* Add simple PWG "interpreter" for gpdl.Robin Watts2019-11-151-1/+9
|
* img language implementationRobin Watts2019-11-131-1/+9
| | | | JPEGs only at this point.
* Public build changes to accommodate private URF support.Robin Watts2019-11-132-0/+28
| | | | | | | | | | | | This includes build rubrik for devices to generate URF files (urfgray, urfrgb, urfcmyk), a decompression filter for the rle variant used in URF files and a urf "language" interpreter implementation for gpdl. Note, this is only the build framework for these things. The actual implementation code lives in the private 'urf' git module, and will be activated automatically as part of the build if it is in position at configure time.
* jbig2dec: Avoid duplicate declarations of Huffman tables in test code.Sebastian Rasmussen2019-09-052-0/+5
| | | | | This is done by moving the tables into a separate compilation module and declaring the tables extern in the header file that is used elsewhere.
* Initial import of CAL.Robin Watts2019-06-251-0/+4
|
* Move FILE * operations behind new gp_file * API.Robin Watts2019-05-291-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* Bug 700986: Remove the crazy md5 file copying nonsenseChris Liddell2019-04-182-5/+0
| | | | | | | | To preserve building as a standalone test exe, we avoided using Ghostscript includes in the md5 source and header files, but dynamically add them to copies of the files during the build. Since we no longer need/care for the stand alone exe, remove the build complication, and just include the header file normally.