diff options
author | Ralph Giles <ralph.giles@artifex.com> | 2008-08-21 08:50:04 +0000 |
---|---|---|
committer | Ralph Giles <ralph.giles@artifex.com> | 2008-08-21 08:50:04 +0000 |
commit | 8a046ceb9a9c625ecfb06fd99e4a5423690a8bc0 (patch) | |
tree | dacfa6a2d7551557d74ac551a24da05037dd2b74 /xps | |
parent | 944762f257153de2973d93d60f5de1cda61685ae (diff) | |
download | ghostpdl-8a046ceb9a9c625ecfb06fd99e4a5423690a8bc0.tar.gz |
Add copyright and description banners to the xps and svg code.
Bug 690008.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@9011 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'xps')
-rw-r--r-- | xps/ghostxps.h | 15 | ||||
-rw-r--r-- | xps/xps.mak | 14 | ||||
-rw-r--r-- | xps/xps_gcc.mak | 14 | ||||
-rw-r--r-- | xps/xps_msvc.mak | 16 | ||||
-rw-r--r-- | xps/xpscff.c | 15 | ||||
-rw-r--r-- | xps/xpscolor.c | 15 | ||||
-rw-r--r-- | xps/xpscommon.c | 15 | ||||
-rw-r--r-- | xps/xpscrc.c | 17 | ||||
-rw-r--r-- | xps/xpsdoc.c | 20 | ||||
-rw-r--r-- | xps/xpsfont.c | 15 | ||||
-rw-r--r-- | xps/xpsglyphs.c | 45 | ||||
-rw-r--r-- | xps/xpsgradient.c | 15 | ||||
-rw-r--r-- | xps/xpshdp.c | 17 | ||||
-rw-r--r-- | xps/xpsimage.c | 15 | ||||
-rw-r--r-- | xps/xpsjpeg.c | 15 | ||||
-rw-r--r-- | xps/xpsmem.c | 15 | ||||
-rw-r--r-- | xps/xpsopacity.c | 15 | ||||
-rw-r--r-- | xps/xpspage.c | 17 | ||||
-rw-r--r-- | xps/xpspath.c | 15 | ||||
-rw-r--r-- | xps/xpspng.c | 15 | ||||
-rw-r--r-- | xps/xpsresource.c | 15 | ||||
-rw-r--r-- | xps/xpstiff.c | 19 | ||||
-rw-r--r-- | xps/xpstile.c | 15 | ||||
-rw-r--r-- | xps/xpstop.c | 31 | ||||
-rw-r--r-- | xps/xpsttf.c | 17 | ||||
-rw-r--r-- | xps/xpsutf.c | 17 | ||||
-rw-r--r-- | xps/xpsvisual.c | 15 | ||||
-rw-r--r-- | xps/xpsxml.c | 30 | ||||
-rw-r--r-- | xps/xpszip.c | 17 |
29 files changed, 462 insertions, 54 deletions
diff --git a/xps/ghostxps.h b/xps/ghostxps.h index f6939db86..99ff8458d 100644 --- a/xps/ghostxps.h +++ b/xps/ghostxps.h @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* combined internal header for the XPS interpreter */ + #include "memory_.h" #include "math_.h" diff --git a/xps/xps.mak b/xps/xps.mak index 21b384fbe..77a954b50 100644 --- a/xps/xps.mak +++ b/xps/xps.mak @@ -1,3 +1,17 @@ +# Copyright (C) 2006-2008 Artifex Software, Inc. +# All Rights Reserved. +# +# This software is provided AS-IS with no warranty, either express or +# implied. +# +# This software is distributed under license and may not be copied, modified +# or distributed except as expressly authorized under the terms of that +# license. Refer to licensing information at http://www.artifex.com/ +# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, +# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +# +# Platform-independent makefile for the XPS interpreter + XPSSRC = $(XPSSRCDIR)$(D) XPSGEN = $(XPSGENDIR)$(D) XPSOBJ = $(XPSOBJDIR)$(D) diff --git a/xps/xps_gcc.mak b/xps/xps_gcc.mak index 60583b09c..794c775c8 100644 --- a/xps/xps_gcc.mak +++ b/xps/xps_gcc.mak @@ -1,3 +1,17 @@ +# Copyright (C) 2006-2008 Artifex Software, Inc. +# All Rights Reserved. +# +# This software is provided AS-IS with no warranty, either express or +# implied. +# +# This software is distributed under license and may not be copied, modified +# or distributed except as expressly authorized under the terms of that +# license. Refer to licensing information at http://www.artifex.com/ +# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, +# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +# +# GNU makefile for the XPS interpreter + # The "?=" style of this makefile is designed to facilitate "deriving" # your own make file from it by setting your own custom options, then include'ing # this file. In its current form, this file will compile using default options diff --git a/xps/xps_msvc.mak b/xps/xps_msvc.mak index b362b1738..ef99ad1d5 100644 --- a/xps/xps_msvc.mak +++ b/xps/xps_msvc.mak @@ -1,3 +1,17 @@ +# Copyright (C) 2006-2008 Artifex Software, Inc. +# All Rights Reserved. +# +# This software is provided AS-IS with no warranty, either express or +# implied. +# +# This software is distributed under license and may not be copied, modified +# or distributed except as expressly authorized under the terms of that +# license. Refer to licensing information at http://www.artifex.com/ +# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, +# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +# +# 'nmake' build file for the XPS interpreter + # Define the name of this makefile. MAKEFILE= $(MAKEFILE) ..\xps\xps_msvc.mak @@ -129,4 +143,4 @@ GX_COLOR_INDEX_DEFINE=-DGX_COLOR_INDEX_TYPE="unsigned long long" # Subsystems # this is already in pcl6_gcc.mak #include $(XPSSRCDIR)\xps.mak -!include $(PSSRCDIR)\expat.mak
\ No newline at end of file +!include $(PSSRCDIR)\expat.mak diff --git a/xps/xpscff.c b/xps/xpscff.c index 2fdd598ac..1a2860408 100644 --- a/xps/xpscff.c +++ b/xps/xpscff.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - cff font support */ + #include "ghostxps.h" /* diff --git a/xps/xpscolor.c b/xps/xpscolor.c index 75fa28b45..eb214760e 100644 --- a/xps/xpscolor.c +++ b/xps/xpscolor.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - color functions */ + #include "ghostxps.h" #include "stream.h" /* for sizeof(stream) to work */ diff --git a/xps/xpscommon.c b/xps/xpscommon.c index d96444dd4..afe42be7c 100644 --- a/xps/xpscommon.c +++ b/xps/xpscommon.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - common parse functions */ + #include "ghostxps.h" int diff --git a/xps/xpscrc.c b/xps/xpscrc.c index 633f40625..b2675b7cc 100644 --- a/xps/xpscrc.c +++ b/xps/xpscrc.c @@ -1,6 +1,17 @@ -/* - * Compute the CRC-32 of a data buffer - */ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - CRC-32 implementation */ #include "ghostxps.h" diff --git a/xps/xpsdoc.c b/xps/xpsdoc.c index c16440463..b62dd11ff 100644 --- a/xps/xpsdoc.c +++ b/xps/xpsdoc.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - document parsing */ + #include "ghostxps.h" #include <expat.h> @@ -408,7 +423,7 @@ xps_free_used_parts(xps_context_t *ctx) xps_part_t *part = ctx->first_part; while (part) - { + { xps_part_t *next = part->next; xps_free_part_caches(ctx, part); part = next; @@ -681,7 +696,7 @@ xps_parse_content_relations_imp(void *zp, char *ns_name, char **atts) char path[1024]; char *name; int i; - + name = strchr(ns_name, ' '); if (name) name ++; @@ -950,4 +965,3 @@ xps_process_part(xps_context_t *ctx, xps_part_t *part) return 0; } - diff --git a/xps/xpsfont.c b/xps/xpsfont.c index fa3e0ca3f..7b04166a1 100644 --- a/xps/xpsfont.c +++ b/xps/xpsfont.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - general font functions */ + #include "ghostxps.h" /* diff --git a/xps/xpsglyphs.c b/xps/xpsglyphs.c index f8c6cc8ae..19ecbf9f4 100644 --- a/xps/xpsglyphs.c +++ b/xps/xpsglyphs.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - */ + #include "ghostxps.h" #include <ctype.h> @@ -32,12 +47,12 @@ void xps_debug_path(xps_context_t *ctx) switch (seg->type) { case s_start: - dprintf2("%g %g moveto\n", + dprintf2("%g %g moveto\n", fixed2float(seg->pt.x) * 0.001, fixed2float(seg->pt.y) * 0.001); break; case s_line: - dprintf2("%g %g lineto\n", + dprintf2("%g %g lineto\n", fixed2float(seg->pt.x) * 0.001, fixed2float(seg->pt.y) * 0.001); break; @@ -46,7 +61,7 @@ void xps_debug_path(xps_context_t *ctx) break; case s_curve: cseg = (curve_segment*)seg; - dprintf6("%g %g %g %g %g %g curveto\n", + dprintf6("%g %g %g %g %g %g curveto\n", fixed2float(cseg->p1.x) * 0.001, fixed2float(cseg->p1.y) * 0.001, fixed2float(cseg->p2.x) * 0.001, @@ -234,18 +249,18 @@ int xps_flush_text_buffer(xps_context_t *ctx, xps_font_t *font, * * Indices syntax: - GlyphIndices = GlyphMapping ( ";" GlyphMapping ) - GlyphMapping = ( [ClusterMapping] GlyphIndex ) [GlyphMetrics] - ClusterMapping = "(" ClusterCodeUnitCount [":" ClusterGlyphCount] ")" - ClusterCodeUnitCount = * DIGIT - ClusterGlyphCount = * DIGIT - GlyphIndex = * DIGIT - GlyphMetrics = "," AdvanceWidth ["," uOffset ["," vOffset]] - AdvanceWidth = ["+"] RealNum - uOffset = ["+" | "-"] RealNum - vOffset = ["+" | "-"] RealNum - RealNum = ((DIGIT ["." DIGIT]) | ("." DIGIT)) [Exponent] - Exponent = ( ("E"|"e") ("+"|"-") DIGIT ) + GlyphIndices = GlyphMapping ( ";" GlyphMapping ) + GlyphMapping = ( [ClusterMapping] GlyphIndex ) [GlyphMetrics] + ClusterMapping = "(" ClusterCodeUnitCount [":" ClusterGlyphCount] ")" + ClusterCodeUnitCount = * DIGIT + ClusterGlyphCount = * DIGIT + GlyphIndex = * DIGIT + GlyphMetrics = "," AdvanceWidth ["," uOffset ["," vOffset]] + AdvanceWidth = ["+"] RealNum + uOffset = ["+" | "-"] RealNum + vOffset = ["+" | "-"] RealNum + RealNum = ((DIGIT ["." DIGIT]) | ("." DIGIT)) [Exponent] + Exponent = ( ("E"|"e") ("+"|"-") DIGIT ) */ diff --git a/xps/xpsgradient.c b/xps/xpsgradient.c index 9bcc9cdc3..acbafee05 100644 --- a/xps/xpsgradient.c +++ b/xps/xpsgradient.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - gradient support */ + #include "ghostxps.h" #include "../icclib/icc.h" diff --git a/xps/xpshdp.c b/xps/xpshdp.c index dcfa9f0ee..33cc2aeb0 100644 --- a/xps/xpshdp.c +++ b/xps/xpshdp.c @@ -1,8 +1,23 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - HD-Photo support */ + #include "ghostxps.h" /* HD-Photo decoder should go here. */ -int +int xps_decode_hdphoto(gs_memory_t *mem, byte *buf, int len, xps_image_t *image) { return gs_throw(-1, "HD-Photo codec is not available"); diff --git a/xps/xpsimage.c b/xps/xpsimage.c index a8b3518ad..36795010a 100644 --- a/xps/xpsimage.c +++ b/xps/xpsimage.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - image support */ + #include "ghostxps.h" static void diff --git a/xps/xpsjpeg.c b/xps/xpsjpeg.c index 55b9c99e2..07df77349 100644 --- a/xps/xpsjpeg.c +++ b/xps/xpsjpeg.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - JPEG image support */ + #include "ghostxps.h" #include "stream.h" diff --git a/xps/xpsmem.c b/xps/xpsmem.c index df79ceb3f..fa34f0c08 100644 --- a/xps/xpsmem.c +++ b/xps/xpsmem.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - string manipulation functions */ + #include "ghostxps.h" static inline int diff --git a/xps/xpsopacity.c b/xps/xpsopacity.c index 59613bcb0..0b83344b5 100644 --- a/xps/xpsopacity.c +++ b/xps/xpsopacity.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - transparency support */ + #include "ghostxps.h" int diff --git a/xps/xpspage.c b/xps/xpspage.c index e76c4d10b..19df52b8d 100644 --- a/xps/xpspage.c +++ b/xps/xpspage.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - page parsing */ + #include "ghostxps.h" int xps_parse_canvas(xps_context_t *ctx, xps_resource_t *dict, xps_item_t *root) @@ -139,7 +154,7 @@ xps_parse_fixed_page(xps_context_t *ctx, xps_part_t *part) code = param_write_float_array((gs_param_list *)&list, ".MediaSize", &fa); if ( code >= 0 ) - { + { gs_c_param_list_read(&list); code = gs_putdeviceparams(dev, (gs_param_list *)&list); } diff --git a/xps/xpspath.c b/xps/xpspath.c index 5d33e0ec2..ecbbf6e94 100644 --- a/xps/xpspath.c +++ b/xps/xpspath.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - path (vector drawing) support */ + #include "ghostxps.h" static void diff --git a/xps/xpspng.c b/xps/xpspng.c index b464a51fe..b039952d5 100644 --- a/xps/xpspng.c +++ b/xps/xpspng.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - PNG image support */ + #include "ghostxps.h" #include "stream.h" diff --git a/xps/xpsresource.c b/xps/xpsresource.c index f5858f86f..7c8f8d747 100644 --- a/xps/xpsresource.c +++ b/xps/xpsresource.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - resource functions */ + #include "ghostxps.h" int diff --git a/xps/xpstiff.c b/xps/xpstiff.c index a1ffcc45f..1412be918 100644 --- a/xps/xpstiff.c +++ b/xps/xpstiff.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - TIFF image support */ + #include "ghostxps.h" #include "stream.h" @@ -774,7 +789,7 @@ xps_read_tiff_tag_value(unsigned *p, xps_tiff_t *tiff, unsigned type, unsigned o } } -static int +static int xps_read_tiff_tag(gs_memory_t *mem, xps_tiff_t *tiff, unsigned offset) { unsigned tag; @@ -906,7 +921,7 @@ xps_swap_byte_order(byte *buf, int n) } } -int +int xps_decode_tiff(gs_memory_t *mem, byte *buf, int len, xps_image_t *image) { int error; diff --git a/xps/xpstile.c b/xps/xpstile.c index 5a02a5db8..baca5f45f 100644 --- a/xps/xpstile.c +++ b/xps/xpstile.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - tiles for pattern rendering */ + #include "ghostxps.h" /* diff --git a/xps/xpstop.c b/xps/xpstop.c index 715834e17..1730a816a 100644 --- a/xps/xpstop.c +++ b/xps/xpstop.c @@ -1,16 +1,15 @@ -/* Portions Copyright (C) 2001 artofcode LLC. - Portions Copyright (C) 1996, 2001 Artifex Software Inc. - Portions Copyright (C) 1988, 2000 Aladdin Enterprises. - This software is based in part on the work of the Independent JPEG Group. +/* Copyright (C) 2006-2008 Artifex Software, Inc. All Rights Reserved. + This software is provided AS-IS with no warranty, either express or + implied. + This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that - license. Refer to licensing information at http://www.artifex.com/ or - contact Artifex Software, Inc., 101 Lucas Valley Road #110, - San Rafael, CA 94903, (415)492-9861, for further information. */ - -/*$Id$*/ + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ /* Top-level API implementation of XML Paper Specification */ @@ -56,7 +55,7 @@ xps_imp_characteristics(const pl_interp_implementation_t *pimpl) { static pl_interp_characteristics_t xps_characteristics = { - "XPS", + "XPS", "PK", /* string to recognize XPS files */ "Artifex", XPS_VERSION, @@ -66,7 +65,7 @@ xps_imp_characteristics(const pl_interp_implementation_t *pimpl) return &xps_characteristics; } -static int +static int xps_imp_allocate_interp(pl_interp_t **ppinterp, const pl_interp_implementation_t *pimpl, gs_memory_t *pmem) @@ -212,7 +211,7 @@ cleanup_setdevice: return code; } -static int +static int xps_imp_get_device_memory(pl_interp_instance_t *pinstance, gs_memory_t **ppmem) { /* huh? we do nothing here */ @@ -223,7 +222,7 @@ xps_imp_get_device_memory(pl_interp_instance_t *pinstance, gs_memory_t **ppmem) static int xps_imp_process(pl_interp_instance_t *pinstance, stream_cursor_read *pcursor) { - xps_interp_instance_t *instance = (xps_interp_instance_t *)pinstance; + xps_interp_instance_t *instance = (xps_interp_instance_t *)pinstance; xps_context_t *ctx = instance->ctx; return xps_process_data(ctx, pcursor); } @@ -422,7 +421,7 @@ const pl_interp_implementation_t xps_implementation = xps_imp_get_device_memory, }; -/* +/* * End-of-page function called by XPS parser. */ int @@ -448,7 +447,7 @@ xps_show_page(xps_context_t *ctx, int num_copies, int flush) if (code < 0) return code; - /* do post-page action */ + /* do post-page action */ if (instance->post_page_action) { code = instance->post_page_action(pinstance, instance->post_page_closure); @@ -530,5 +529,3 @@ xps_install_halftone(xps_context_t *ctx, gx_device *pdevice) return 0; } - - diff --git a/xps/xpsttf.c b/xps/xpsttf.c index 275dccd07..cfac65349 100644 --- a/xps/xpsttf.c +++ b/xps/xpsttf.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - truetype font support */ + #include "ghostxps.h" #include <gxfont.h> @@ -132,7 +147,7 @@ xps_true_callback_glyph_name(gs_font *pfont, gs_glyph glyph, gs_const_string *ps } else { - return gs_throw1(-1, "glyph index %d out of range", glyph); + return gs_throw1(-1, "glyph index %d out of range", glyph); } } diff --git a/xps/xpsutf.c b/xps/xpsutf.c index fa972942a..76af7a653 100644 --- a/xps/xpsutf.c +++ b/xps/xpsutf.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - unicode text functions */ + #include "ghostxps.h" /* @@ -49,6 +64,6 @@ int xps_utf8_to_ucs(int *p, const char *ss, int n) bad: *p = 0x80; - return 1; + return 1; } diff --git a/xps/xpsvisual.c b/xps/xpsvisual.c index 3d42df57d..45f245138 100644 --- a/xps/xpsvisual.c +++ b/xps/xpsvisual.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - visual brush functions */ + #include "ghostxps.h" enum { TILE_NONE, TILE_TILE, TILE_FLIP_X, TILE_FLIP_Y, TILE_FLIP_X_Y }; diff --git a/xps/xpsxml.c b/xps/xpsxml.c index f1fff4b0c..d71fbee74 100644 --- a/xps/xpsxml.c +++ b/xps/xpsxml.c @@ -1,3 +1,16 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + /* Recursive descent XML parsing API on top of Expat. */ #include "ghostxps.h" @@ -51,30 +64,30 @@ static void on_open_tag(void *zp, const char *ns_name, const char **atts) if (parser->error) return; - + /* check namespace */ - + name = NULL; - + p = strstr(ns_name, NS_XPS); if (p == ns_name) { name = strchr(ns_name, ' ') + 1; } - + p = strstr(ns_name, NS_MC); if (p == ns_name) { name = strchr(ns_name, ' ') + 1; parser->compat = 1; } - + if (!name) { dprintf1("unknown namespace: %s\n", ns_name); name = ns_name; } - + /* count size to alloc */ namelen = strlen(name) + 1; /* zero terminated */ @@ -236,7 +249,7 @@ xps_parse_xml(xps_context_t *ctx, char *buf, int len) } XML_ParserFree(xp); - + if (parser.compat) xps_process_compatibility(ctx, parser.root); @@ -321,7 +334,7 @@ xps_debug_item_imp(xps_item_t *item, int level, int loop) } item = item->next; - + if (!loop) return; } @@ -332,3 +345,4 @@ xps_debug_item(xps_item_t *item, int level) { xps_debug_item_imp(item, level, 0); } + diff --git a/xps/xpszip.c b/xps/xpszip.c index 410d1e868..8f6bc6251 100644 --- a/xps/xpszip.c +++ b/xps/xpszip.c @@ -1,3 +1,18 @@ +/* Copyright (C) 2006-2008 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, modified + or distributed except as expressly authorized under the terms of that + license. Refer to licensing information at http://www.artifex.com/ + or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, + San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + +/* XPS interpreter - zip container parsing */ + #include "ghostxps.h" #define ZIP_LOCAL_FILE_SIG 0x04034b50 @@ -68,7 +83,7 @@ xps_zip_alloc_items(xps_context_t *ctx, int items, int size) return xps_alloc(ctx, items * size); } -static void +static void xps_zip_free(xps_context_t *ctx, void *ptr) { xps_free(ctx, ptr); |