40 #define CODEVERSION 20100
41 #define MAGICNUMBER 516114521
45 #define MAXID 31 //(2.00.11 - LR)
56 #define MISSING -1.E10
57 #define PI 3.141592654
61 #define GPMperCFS 448.831
62 #define AFDperCFS 1.9837
63 #define MGDperCFS 0.64632
64 #define IMGDperCFS 0.5382
65 #define LPSperCFS 28.317
66 #define LPMperCFS 1699.0
67 #define CMHperCFS 101.94
68 #define CMDperCFS 2446.6
69 #define MLDperCFS 2.4466
70 #define M3perFT3 0.028317
71 #define LperFT3 28.317
73 #define PSIperFT 0.4333
74 #define KPAperPSI 6.895
75 #define KWperHP 0.7457
76 #define SECperDAY 86400
83 #define SEPSTR " \t\n\r"
90 #define MEMCHECK(x) (((x) == NULL) ? 101 : 0 )
91 #define FREE(x) (free((x)))
98 #define INT(x) ((int)(x))
99 #define FRAC(x) ((x)-(int)(x))
100 #define ABS(x) (((x)<0) ? -(x) : (x))
101 #define MIN(x,y) (((x)<=(y)) ? (x) : (y))
102 #define MAX(x,y) (((x)>=(y)) ? (x) : (y))
103 #define ROUND(x) (((x)>=0) ? (int)((x)+.5) : (int)((x)-.5))
105 #define MOD(x,y) ((x)%(y))
106 #define SQR(x) ((x)*(x))
107 #define SGN(x) (((x)<0) ? (-1) : (1))
108 #define UCHAR(x) (((x) >= 'a' && (x) <= 'z') ? ((x)&~32) : (x))
116 #define ERRCODE(x) (errcode = ((errcode>100) ? (errcode) : (x)))
124 #define PUMPINDEX(x) (ROUND(Link[(x)].Diam))
453 enum SectType {_TITLE,_JUNCTIONS,_RESERVOIRS,_TANKS,_PIPES,_PUMPS,
454 _VALVES,_CONTROLS,_RULES,_DEMANDS,_SOURCES,_EMITTERS,
455 _PATTERNS,_CURVES,_QUALITY,_STATUS,_ROUGHNESS,_ENERGY,
456 _REACTIONS,_MIXING,_REPORT,_TIMES,_OPTIONS,
457 _COORDS,_VERTICES,_LABELS,_BACKDROP,_TAGS,_END};