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