diff options
Diffstat (limited to 'src/Type1/objects.h')
-rw-r--r-- | src/Type1/objects.h | 129 |
1 files changed, 100 insertions, 29 deletions
diff --git a/src/Type1/objects.h b/src/Type1/objects.h index 30a9773..984ccbd 100644 --- a/src/Type1/objects.h +++ b/src/Type1/objects.h @@ -26,49 +26,119 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ +/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. + * + * The contents of this file are subject to the CID Font Code Public Licence + * Version 1.0 (the "License"). You may not use this file except in compliance + * with the Licence. You may obtain a copy of the License at Silicon Graphics, + * Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA + * 94043 or at http://www.sgi.com/software/opensource/cid/license.html. + * + * Software distributed under the License is distributed on an "AS IS" basis. + * ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED + * WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF + * NON-INFRINGEMENT. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Software is CID font code that was developed by Silicon + * Graphics, Inc. + */ +/* $XFree86: xc/lib/font/Type1/objects.h,v 1.14 2002/12/24 17:42:59 tsi Exp $ */ /*SHARED*/ /*END SHARED*/ +#include <Xdefs.h> +#include <Xfuncproto.h> +#ifndef FONTMODULE +#include <stdlib.h> +#endif /*SHARED*/ #define Permanent(obj) t1_Permanent(obj) +#ifdef notused #define Temporary(obj) t1_Temporary(obj) +#endif #define Destroy(obj) t1_Destroy(obj) #define Dup(obj) t1_Dup(obj) -#define InitImager() t1_InitImager() -#define TermImager() t1_TermImager() +#define InitImager t1_InitImager +#define TermImager t1_TermImager #define Pragmatics(f,v) t1_Pragmatics(f,v) -#define ErrorMsg() t1_ErrorMsg() +#define ErrorMsg t1_ErrorMsg -struct xobject *t1_Permanent(); /* make an object permanent */ -struct xobject *t1_Temporary(); /* make an object temporary */ -struct xobject *t1_Destroy(); /* destroy an object */ -struct xobject *t1_Dup(); /* duplicate an object */ -void t1_InitImager(); /* initialize TYPE1IMAGER */ -void t1_TermImager(); /* terminate TYPE1IMAGER */ -void t1_Pragmatics(); /* set debug flags, etc. */ -char *t1_ErrorMsg(); /* return last TYPE1IMAGER error message */ +/* make an object permanent */ +extern struct xobject *t1_Permanent ( pointer obj ); + +#ifdef notused +/* make an object temporary */ +extern struct xobject *t1_Temporary( pointer obj ); +#endif + +/* destroy an object */ +extern struct xobject *t1_Destroy ( pointer obj ); + +/* duplicate an object */ +extern struct xobject *t1_Dup ( pointer obj ); + + +extern void t1_InitImager ( void ); /* initialize TYPE1IMAGER */ +extern void t1_TermImager ( void ); /* terminate TYPE1IMAGER */ +/* set debug flags, etc. */ +extern void t1_Pragmatics ( char *username, int value ); + +/* return last TYPE1IMAGER error message */ +extern char *t1_ErrorMsg ( void ); /*END SHARED*/ /*SHARED*/ - -#define abort(line) FatalError(line) +extern void xiFree ( long *addr ); +extern char *xiMalloc ( unsigned Size ); +extern void addmemory ( long *addr, long size ); +extern void delmemory ( void ); + +#ifndef OS_H +extern void FatalError(const char *f, ...) +#if defined(__GNUC__) && \ + ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) +__attribute((noreturn)) +#endif +; + +extern void ErrorF(const char *f, ...); +#endif + +#define Abort(line) FatalError(line) #define Allocate(n,t,s) t1_Allocate(n,t,s) #define Free(obj) t1_Free(obj) -#define NonObjectFree(a) xiFree(a) +#define NonObjectFree(a) xiFree((long *)(a)) #define Consume t1_Consume #define ArgErr(s,o,r) t1_ArgErr(s,o,r) #define TypeErr(n,o,e,r) t1_TypeErr(n,o,e,r) #define Copy(obj) t1_Copy(obj) #define Unique(obj) t1_Unique(obj) -struct xobject *t1_Allocate(); /* allocate memory */ -void t1_Free(); /* free memory */ -struct xobject *t1_Unique(); /* make a unique temporary copy of an object */ -struct xobject *t1_ArgErr(); /* handle argument errors */ -struct xobject *t1_TypeErr(); /* handle 'bad type' argument errors */ -void t1_Consume(); /* consume a variable number of arguments */ -struct xobject *t1_Copy(); /* make a new copy, not reference bump PNM */ +/* allocate memory */ +extern struct xobject *t1_Allocate( int size, pointer template, + int extra ); + +/* free memory */ +extern void t1_Free ( pointer obj ); + +/* make a unique temporary copy of an object */ +extern struct xobject *t1_Unique ( pointer obj ); + +/* handle argument errors */ +extern struct xobject *t1_ArgErr ( char *string, pointer obj, pointer ret ); + +/* handle 'bad type' argument errors */ +extern struct xobject *t1_TypeErr ( char *name, pointer obj, + int expect, pointer ret ); + +/* consume a variable number of arguments */ +extern void t1_Consume ( int n, ... ); + +/* make a new copy, not reference bump PNM */ +extern struct xobject *t1_Copy ( pointer obj ); + /*END SHARED*/ /*SHARED*/ @@ -82,7 +152,7 @@ struct xobject *t1_Copy(); /* make a new copy, not reference bump PNM */ #endif #ifndef NULL -#define NULL 0 +#include <stddef.h> /* The NULL pointer is system specific. (Most systems, however, use 0.) TYPE1IMAGER could have its own NULL, independent of the rest of the system, @@ -223,9 +293,10 @@ struct xobject { #define IfTrace5(condition,model,arg0,arg1,arg2,arg3,arg4) #define IfTrace6(condition,model,arg0,arg1,arg2,arg3,arg4,arg5) - +#if 0 void Trace0(); char *Trace1(),*Trace2(),*Trace3(),*Trace4(),*Trace5(),*Trace6(); +#endif #ifdef GLOBALS @@ -240,7 +311,11 @@ char *Trace1(),*Trace2(),*Trace3(),*Trace4(),*Trace5(),*Trace6(); extern char MustCheckArgs INITIALIZED(TRUE); extern char MustTraceCalls INITIALIZED(FALSE); +#ifdef BUILDCID +extern char MustCrash INITIALIZED(FALSE); +#else extern char MustCrash INITIALIZED(TRUE); +#endif extern char InternalTrace INITIALIZED(TRUE); extern char LineIOTrace INITIALIZED(TRUE); @@ -281,11 +356,7 @@ We define other routines formatting parameters #define DumpEdges(e) t1_DumpEdges(e) #define FormatFP(s,p) t1_FormatFP(s,p) -void t1_DumpArea(); /* dump a region structure */ -void t1_DumpText(); /* dump a textpath structure */ -void t1_DumpPath(); /* dump a path list */ -void t1_DumpSpace(); /* dump a coordinate space structure */ -void t1_DumpEdges(); /* dump a region's edge list */ -void t1_FormatFP(); /* dump a format a "fractpel" coordinate */ +/* dump a textpath structure */ +extern void t1_DumpText(void); /*END SHARED*/ |