Blob


1 /*
2 *
3 * A few definitions that shouldn't have to change. Used by most programs in
4 * this package.
5 *
6 */
8 #define PROGRAMVERSION "3.3.2"
10 /* XXX: replace tempnam with something safer, but leaky */
11 extern char* safe_tempnam(char*, char*);
12 #define tempnam safe_tempnam
14 #define NON_FATAL 0
15 #define FATAL 1
16 #define USER_FATAL 2
18 #define OFF 0
19 #define ON 1
21 #define FALSE 0
22 #define TRUE 1
24 #define BYTE 8
25 #define BMASK 0377
27 #define POINTS 72.3
29 #ifndef PI
30 #define PI 3.141592654
31 #endif
33 #define ONEBYTE 0
34 #define UTFENCODING 1
36 #define READING ONEBYTE
37 #define WRITING ONEBYTE
39 /*
40 *
41 * DOROUND controls whether some translators include file ROUNDPAGE (path.h)
42 * after the prologue. Used to round page dimensions obtained from the clippath
43 * to know paper sizes. Enabled by setting DOROUND to TRUE (or 1).
44 *
45 */
47 #define DOROUND TRUE
49 /*
50 *
51 * Default resolution and the height and width of a page (in case we need to get
52 * to upper left corner) - only used in BoundingBox calculations!!
53 *
54 */
56 #define DEFAULT_RES 72
57 #define PAGEHEIGHT 11.0 * DEFAULT_RES
58 #define PAGEWIDTH 8.5 * DEFAULT_RES
60 /*
61 *
62 * Simple macros.
63 *
64 */
66 #define ABS(A) ((A) >= 0 ? (A) : -(A))
67 #define MIN(A, B) ((A) < (B) ? (A) : (B))
68 #define MAX(A, B) ((A) > (B) ? (A) : (B))