multipage_hp2ps
[ghc.git] / utils / hp2ps / Main.h
1 #ifndef MAIN_H
2 #define MAIN_H
3
4 #include "../includes/ghcconfig.h"
5 #include <stdio.h>
6
7 #ifdef __STDC__
8 #define PROTO(x) x
9 #else
10 #define PROTO(x) ()
11 #endif
12
13 /* our own ASSERT macro (for C) */
14 #ifndef DEBUG
15 #define ASSERT(predicate) /*nothing*/
16
17 #else
18 void _ghcAssert PROTO((char *, unsigned int));
19
20 #define ASSERT(predicate) \
21 if (predicate) \
22 /*null*/; \
23 else \
24 _ghcAssert(__FILE__, __LINE__)
25 #endif
26
27 /* partain: some ubiquitous types: floatish & intish.
28 Dubious to use float/int, but that is what it used to be...
29 (WDP 95/03)
30 */
31 typedef double floatish;
32 typedef double doublish; /* higher precision, if anything; little used */
33 typedef int boolish;
34
35 /* Use "long long" if we have it: the numbers in profiles can easily
36 * overflow 32 bits after a few seconds execution.
37 */
38 #ifdef HAVE_LONG_LONG
39 typedef long long int intish;
40 #else
41 typedef long int intish;
42 #endif
43
44 extern intish nsamples;
45 extern intish nmarks;
46 extern intish nidents;
47
48 extern floatish maxcombinedheight;
49 extern floatish areabelow;
50 extern floatish epsfwidth;
51
52 extern floatish xrange;
53 extern floatish yrange;
54
55 extern floatish auxxrange;
56 extern floatish auxyrange;
57
58 extern boolish eflag;
59 extern boolish gflag;
60 extern boolish yflag;
61 extern boolish bflag;
62 extern boolish sflag;
63 extern int mflag;
64 extern boolish tflag;
65 extern boolish cflag;
66
67 extern boolish multipageflag;
68
69 extern char *programname;
70
71 extern char *hpfile;
72 extern char *psfile;
73 extern char *auxfile;
74
75 extern FILE *hpfp;
76 extern FILE *psfp;
77 extern FILE *auxfp;
78
79 #endif /* MAIN_H */