⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dscparse.h.svn-base

📁 okular
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
/* Copyright (C) 2000-2001, Ghostgum Software Pty Ltd.  All rights reserved.      This file is part of GSview.     This file is distributed in the hope that it will be useful, but  WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility  to anyone for the consequences of using it or for whether it serves any  particular purpose or works at all, unless he says so in writing.  Refer  to the GNU General Public Licence for full details.     Everyone is granted permission to copy, modify and redistribute this  file, but only under the conditions described in the GNU General  Public Licence.  A copy of this license is supposed to have been given  to you along with this file so you can know your rights and  responsibilities.  It should be in a file named COPYING.  Among other  things, the copyright notice and this notice must be preserved on all  copies.*//* $Id: dscparse.h 420737 2005-06-01 09:09:35Z wgreven $ *//* dscparse.h *//* Interface for the DSC parser. */#ifndef _DSCPARSE_H_#define _DSCPARSE_H_/* Some local types that may need modification */typedef bool GSBOOL;typedef unsigned long GSDWORD;	/* must be at least 32 bits */typedef unsigned int GSWORD;	/* must be at least 16 bits */#ifndef FALSE# define FALSE ((GSBOOL)0)# define TRUE ((GSBOOL)(!FALSE))#endif#ifndef dsc_private# ifdef private#  define dsc_private private# else#  define dsc_private static# endif#endif#ifndef min# define min(a,b)  ((a) < (b) ? (a) : (b))#endif/* macros to allow conversion of function declarations to K&R */#ifndef P0#define P0() void#define P1(t1) t1#define P2(t1,t2) t1,t2#define P3(t1,t2,t3) t1,t2,t3#define P4(t1,t2,t3,t4) t1,t2,t3,t4#define P5(t1,t2,t3,t4,t5) t1,t2,t3,t4,t5#define P6(t1,t2,t3,t4,t5,t6) t1,t2,t3,t4,t5,t6#endif/* maximum legal length of lines in a DSC compliant file */#define DSC_LINE_LENGTH 255/* memory for strings is allocated in chunks of this length */#define CDSC_STRING_CHUNK 4096/* page array is allocated in chunks of this many pages */#define CDSC_PAGE_CHUNK 128	/* buffer length for storing lines passed to dsc_scan_data() *//* must be at least 2 * DSC_LINE_LENGTH *//* We choose 8192 as twice the length passed to us by GSview */#define CDSC_DATA_LENGTH 8192/* Return codes from dsc_scan_data() *  < 0     = error *  >=0     = OK * *  -1      = error, usually insufficient memory. *  0-9     = normal *  10-99   = internal codes, should not be seen. *  100-999 = identifier of last DSC comment processed. */typedef enum {  CDSC_ERROR		= -1,	/* Fatal error, usually insufficient memory */  CDSC_OK		= 0,	/* OK, no DSC comment found */  CDSC_NOTDSC	 	= 1,	/* Not DSC, or DSC is being ignored *//* Any section */  CDSC_UNKNOWNDSC	= 100,	/* DSC comment not recognised *//* Header section */  CDSC_PSADOBE		= 200,	/* %!PS-Adobe- */  CDSC_BEGINCOMMENTS	= 201,	/* %%BeginComments */  CDSC_ENDCOMMENTS	= 202,	/* %%EndComments */  CDSC_PAGES		= 203,	/* %%Pages: */  CDSC_CREATOR		= 204,	/* %%Creator: */  CDSC_CREATIONDATE	= 205,	/* %%CreationDate: */  CDSC_TITLE		= 206,	/* %%Title: */  CDSC_FOR		= 207,	/* %%For: */  CDSC_LANGUAGELEVEL	= 208,	/* %%LanguageLevel: */  CDSC_BOUNDINGBOX	= 209,	/* %%BoundingBox: */  CDSC_ORIENTATION	= 210,	/* %%Orientation: */  CDSC_PAGEORDER	= 211,	/* %%PageOrder: */  CDSC_DOCUMENTMEDIA	= 212,	/* %%DocumentMedia: */  CDSC_DOCUMENTPAPERSIZES    = 213,	/* %%DocumentPaperSizes: */  CDSC_DOCUMENTPAPERFORMS    = 214,	/* %%DocumentPaperForms: */  CDSC_DOCUMENTPAPERCOLORS   = 215,	/* %%DocumentPaperColors: */  CDSC_DOCUMENTPAPERWEIGHTS  = 216,	/* %%DocumentPaperWeights: */  CDSC_DOCUMENTDATA	     = 217,	/* %%DocumentData: */  CDSC_REQUIREMENTS	     = 218,	/* IGNORED %%Requirements: */  CDSC_DOCUMENTNEEDEDFONTS   = 219,	/* IGNORED %%DocumentNeededFonts: */  CDSC_DOCUMENTSUPPLIEDFONTS = 220,	/* IGNORED %%DocumentSuppliedFonts: */  CDSC_HIRESBOUNDINGBOX	     = 221,	/* %%HiResBoundingBox: */  CDSC_CROPBOX	     	     = 222,	/* %%CropBox: */// added 02 August 2005  CDSC_COPYRIGHT             = 223, /* %%Copyright: *//* Preview section */  CDSC_BEGINPREVIEW	= 301,	/* %%BeginPreview */  CDSC_ENDPREVIEW	= 302,	/* %%EndPreview *//* Defaults section */  CDSC_BEGINDEFAULTS	= 401,	/* %%BeginDefaults */  CDSC_ENDDEFAULTS	= 402,	/* %%EndDefaults *//* also %%PageMedia, %%PageOrientation, %%PageBoundingBox *//* Prolog section */  CDSC_BEGINPROLOG	= 501,	/* %%BeginProlog */  CDSC_ENDPROLOG	= 502,	/* %%EndProlog */  CDSC_BEGINFONT	= 503,	/* IGNORED %%BeginFont */  CDSC_ENDFONT		= 504,	/* IGNORED %%EndFont */  CDSC_BEGINFEATURE	= 505,	/* IGNORED %%BeginFeature */  CDSC_ENDFEATURE	= 506,	/* IGNORED %%EndFeature */  CDSC_BEGINRESOURCE	= 507,	/* IGNORED %%BeginResource */  CDSC_ENDRESOURCE	= 508,	/* IGNORED %%EndResource */  CDSC_BEGINPROCSET	= 509,	/* IGNORED %%BeginProcSet */  CDSC_ENDPROCSET	= 510,	/* IGNORED %%EndProcSet *//* Setup section */  CDSC_BEGINSETUP	= 601,	/* %%BeginSetup */  CDSC_ENDSETUP		= 602,	/* %%EndSetup */  CDSC_FEATURE		= 603,	/* IGNORED %%Feature: */  CDSC_PAPERCOLOR	= 604,	/* IGNORED %%PaperColor: */  CDSC_PAPERFORM	= 605,	/* IGNORED %%PaperForm: */  CDSC_PAPERWEIGHT	= 606,	/* IGNORED %%PaperWeight: */  CDSC_PAPERSIZE	= 607,	/* %%PaperSize: *//* also %%Begin/EndFeature, %%Begin/EndResource *//* Page section */  CDSC_PAGE		= 700,	/* %%Page: */  CDSC_PAGETRAILER	= 701,	/* IGNORED %%PageTrailer */  CDSC_BEGINPAGESETUP	= 702,	/* IGNORED %%BeginPageSetup */  CDSC_ENDPAGESETUP	= 703,	/* IGNORED %%EndPageSetup */  CDSC_PAGEMEDIA	= 704,	/* %%PageMedia: *//* also %%PaperColor, %%PaperForm, %%PaperWeight, %%PaperSize */  CDSC_PAGEORIENTATION	= 705,	/* %%PageOrientation: */  CDSC_PAGEBOUNDINGBOX	= 706,	/* %%PageBoundingBox: *//* also %%Begin/EndFont, %%Begin/EndFeature *//* also %%Begin/EndResource, %%Begin/EndProcSet */  CDSC_INCLUDEFONT	= 707,	/* IGNORED %%IncludeFont: */  CDSC_VIEWINGORIENTATION = 708, /* %%ViewingOrientation: *//* Trailer section */  CDSC_TRAILER		= 800,	/* %%Trailer *//* also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder, %%DocumentMedia */ /* %%Page is recognised as an error *//* also %%DocumentNeededFonts, %%DocumentSuppliedFonts *//* End of File */  CDSC_EOF		= 900	/* %%EOF */} CDSC_RETURN_CODE;/* stored in dsc->preview */ typedef enum {    CDSC_NOPREVIEW = 0,    CDSC_EPSI = 1,    CDSC_TIFF = 2,    CDSC_WMF = 3,    CDSC_PICT = 4} CDSC_PREVIEW_TYPE;/* stored in dsc->page_order */ typedef enum {    CDSC_ORDER_UNKNOWN = 0,    CDSC_ASCEND = 1,    CDSC_DESCEND = 2,    CDSC_SPECIAL = 3} CDSC_PAGE_ORDER;/* stored in dsc->page_orientation and dsc->page[pagenum-1].orientation */ typedef enum {    CDSC_ORIENT_UNKNOWN = 0,    CDSC_PORTRAIT = 1,    CDSC_LANDSCAPE = 2,    CDSC_UPSIDEDOWN = 3,    CDSC_SEASCAPE = 4} CDSC_ORIENTATION_ENUM;/* stored in dsc->document_data */typedef enum {    CDSC_DATA_UNKNOWN = 0,    CDSC_CLEAN7BIT = 1,    CDSC_CLEAN8BIT = 2,    CDSC_BINARY = 3} CDSC_DOCUMENT_DATA ;typedef struct CDSCBBOX_S {    int llx;    int lly;    int urx;    int ury;} CDSCBBOX;typedef struct CDSCFBBOX_S {    float fllx;    float flly;    float furx;    float fury;} CDSCFBBOX;typedef struct CDSCMEDIA_S {    const char *name;    float width;	/* PostScript points */    float height;    float weight;	/* GSM */    const char *colour;    const char *type;    CDSCBBOX *mediabox;	/* Used by GSview for PDF MediaBox */} CDSCMEDIA;#define CDSC_KNOWN_MEDIA 46extern const CDSCMEDIA dsc_known_media[CDSC_KNOWN_MEDIA];typedef struct CDSCCTM_S { /* used for %%ViewingOrientation */    float xx;    float xy;    float yx;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -