blob: 5fa954eb4d449223b6dea7c99fab57d8a193c80d [file] [log] [blame]
nethercote5912c812004-02-15 15:38:08 +00001/* This file is part of hp2ps, a graph drawer for memory profiles.
2 Copyright (C) 2002 The University Court of the University of Glasgow.
3 This program is governed by the license contained in the file LICENSE. */
4
nethercotec9f36922004-02-14 16:40:02 +00005#ifndef MAIN_H
6#define MAIN_H
7
8//#include "config.h"
9
10#ifdef __STDC__
11#define PROTO(x) x
12#else
13#define PROTO(x) ()
14#endif
15
16/* our own ASSERT macro (for C) */
17#ifndef DEBUG
18#define ASSERT(predicate) /*nothing*/
19
20#else
21void _ghcAssert PROTO((char *, unsigned int));
22
23#define ASSERT(predicate) \
24 if (predicate) \
25 /*null*/; \
26 else \
27 _ghcAssert(__FILE__, __LINE__)
28#endif
29
30/* partain: some ubiquitous types: floatish & intish.
31 Dubious to use float/int, but that is what it used to be...
32 (WDP 95/03)
33*/
34typedef double floatish;
35typedef double doublish; /* higher precision, if anything; little used */
36typedef int boolish;
37
38/* Use "long long" if we have it: the numbers in profiles can easily
39 * overflow 32 bits after a few seconds execution.
40 */
41#define HAVE_LONG_LONG 1 // --added by njn, because config.h removed
42
43#ifdef HAVE_LONG_LONG
44typedef long long int intish;
45#else
46typedef long int intish;
47#endif
48
49extern intish nsamples;
50extern intish nmarks;
51extern intish nidents;
52
53extern floatish maxcombinedheight;
54extern floatish areabelow;
55extern floatish epsfwidth;
56
57extern floatish xrange;
58extern floatish yrange;
59
60extern floatish auxxrange;
61extern floatish auxyrange;
62
63extern boolish eflag;
64extern boolish gflag;
65extern boolish yflag;
66extern boolish bflag;
67extern boolish sflag;
68extern int mflag;
69extern boolish tflag;
70extern boolish cflag;
71
72extern char *programname;
73
74extern char *hpfile;
75extern char *psfile;
76extern char *auxfile;
77
78extern FILE *hpfp;
79extern FILE *psfp;
80extern FILE *g_auxfp;
81
82#endif /* MAIN_H */