ftp.nice.ch/peanuts/GeneralData/Documents/adobe/DPS.Purple.ImportAdv.tar.gz#/NX_ImportAdv/epsfstruct.h

This is epsfstruct.h in view mode; [Download] [Up]

/*
 * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
 *
 * (b)  If this Sample Code is distributed as part of the Display PostScript
 *	System Software Development Kit from Adobe Systems Incorporated,
 *	then this copy is designated as Development Software and its use is
 *	subject to the terms of the License Agreement attached to such Kit.
 *
 * (c)  If this Sample Code is distributed independently, then the following
 *	terms apply:
 *
 * (d)  This file may be freely copied and redistributed as long as:
 *	1) Parts (a), (d), (e) and (f) continue to be included in the file,
 *	2) If the file has been modified in any way, a notice of such
 *      modification is conspicuously indicated.
 *
 * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
 *	Adobe Systems Incorporated.
 * 
 * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
 *	CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
 *	AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
 *	ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
 *	OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
 *	WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
 *	WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
 *	DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
 *	FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
 *	OF THIRD PARTY RIGHTS.
 */

/*
 *	epsfstruct.h
 *
 *	This file contains the structure that is shared between the parser
 *	and the invoker of the parser. It holds a pointer to the data, a float
 *	array for the bounding box and pointers to the fonts lists. The fonts
 *	lists are a block of char pointers to the font names. The block ends
 *	with a null pointer. (When freeing, free each font name pointer then
 *	free the block that held the pointers.)
 *
 *	This file also contains the definitions for the error codes.
 *
 *	Version:	2.0
 *	Author:	Ken Fromm
 *	History:
 *			03-19-91		Added this comment.
 *			03-28-91		Removed the resources part to a separate file.
 */
 
#import  <objc/objc.h>
#import  <objc/hashtable.h>
#import "resources.h"

#define EPSF_MAXCOMMENTSUB		40	
#define EPSF_MAXCOMMENT			100
#define EPSF_MAXLINE				255

#define InclusionDescription				"{%*i}"

typedef struct _Inclusion {
	NXAtom		filename;			/* Name of the file. */
	int			offset;			/* Offset of the %%IncludeFile comment. */
	int			len;				/* Length of the %%IncludeFile comment. */
} Inclusion;

typedef struct _EpsfStruct {
	char				*data;
	char				*enddata;
	char				*filedata;
	int				filelen;			
	float				bbox[4];
	Resource		resources[RES_NUMTYPES];
	id				inclusions;
}  EpsfStruct;


/* The header for an eps binary file */
#define  EPSF_BINARYID				0xC5D0D3C6
#define  EPSF_BINARYCHECKSUM		0xFFFFFFFF
typedef struct _EpsfBinaryHeader {
	long		idbytes,			/* Should be 0xC5D0D3C6 */
			ps_start,			/* Byte position of PostScript section */
			ps_length,		/* Byte length of PostScipt section */
			meta_start,		/* Byte position of Metafile section */
			meta_length,		/* Byte length of Metafile section */
			tiff_start,			/* Byte position of TIFF section */
			tiff_length;		/* Byte length of TIFF section */

	long		checksum;		/* Checksum of header */
}  EpsfBinaryHeader;


/* EPSF error definitions */
#define EPSF_OK						0
#define EPSF_INVALIDPS				1
#define EPSF_INVALIDPAGECOUNT		2
#define EPSF_INVALIDBBOX			3
#define EPSF_INVALIDDOCUMENT		4
#define EPSF_ENDFILE				5
#define EPSF_WRITEERROR			6
#define EPSF_UNDEFINED				7

#define EPSF_ERRORCOUNT			(EPSF_UNDEFINED)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.