Gadget
gadget.h
Go to the documentation of this file.
1 #ifndef gadget_h
2 #define gadget_h
3 
18 /* A list of the standard header files that are needed for Gadget */
19 /* Older compilers need these to be declared in the old format */
20 #include <cassert>
21 #include <cctype>
22 #include <cstdio>
23 #include <cstdlib>
24 #include <cstring>
25 #include <iostream>
26 #include <fstream>
27 #include <sstream>
28 #include <iomanip>
29 #include <cmath>
30 #include <ctime>
31 #include <vector>
32 #include <signal.h>
33 #include <unistd.h>
34 #ifdef NOT_WINDOWS
35 #include <sys/utsname.h>
36 #endif
37 #include <sys/param.h>
38 
39 /* This is a nasty hack to use the functions in the std namespace */
40 /* it would be much better to explicitly state the std namespace */
41 /* when using the functions - eg std::strcmp() not just strcmp() */
42 /* Older compilers will reject this so it needs to be removed */
43 using namespace std;
44 
45 /* Some compilers define the values for EXIT_SUCCESS and EXIT_FAILURE */
46 /* but to be sure that they are defined, they are also included here. */
47 #ifndef EXIT_SUCCESS
48 #define EXIT_SUCCESS 0
49 #endif
50 #ifndef EXIT_FAILURE
51 #define EXIT_FAILURE 1
52 #endif
53 
54 /* Also defined are some of the constants used by Gadget */
55 const int MaxStrLength = 1025; /* 128 + 1 */
56 const int LongString = 16385; /* 16Kb + 1 */
57 const double verybig = 1e+10;
58 const double rathersmall = 1e-10;
59 /* machine accuracy for doubles is apparently 2.2204460492503131e-16 */
60 //const double verysmall = 4.4408921e-16; /* twice machine accuracy */
61 const double verysmall = 1e-20;
62 const char chrComment = ';';
63 const char sep = ' ';
64 
65 #ifndef TAB
66 #define TAB '\t'
67 #endif
68 
69 /* Also defined are some of the printer constants used by Gadget */
70 const int lowprecision = 1;
71 const int smallprecision = 4;
72 const int printprecision = 6;
73 const int largeprecision = 8;
74 const int fullprecision = 15;
75 const int lowwidth = 4;
76 const int smallwidth = 8;
77 const int printwidth = 10;
78 const int largewidth = 12;
79 const int fullwidth = 18;
80 
81 #endif
82 
const int smallwidth
Definition: gadget.h:76
const int fullprecision
Definition: gadget.h:74
const double verybig
Definition: gadget.h:57
const int fullwidth
Definition: gadget.h:79
const int LongString
Definition: gadget.h:56
const int largeprecision
Definition: gadget.h:73
const char chrComment
Definition: gadget.h:62
const double verysmall
Definition: gadget.h:61
const int largewidth
Definition: gadget.h:78
const int smallprecision
Definition: gadget.h:71
const int printprecision
Definition: gadget.h:72
const int lowwidth
Definition: gadget.h:75
const double rathersmall
Definition: gadget.h:58
const int MaxStrLength
Definition: gadget.h:55
const int printwidth
Definition: gadget.h:77
const char sep
Definition: gadget.h:63
const int lowprecision
Definition: gadget.h:70