MASTER.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. #ifndef _MASTER_H_
  2. #define _MASTER_H_
  3. #if defined TP_ACQUIRES || \
  4. defined TP_RELEASES || \
  5. defined TP_OUT || \
  6. defined TP_IN_OUT || \
  7. defined TP_ARRAY_OUT || \
  8. defined TP_ARRAY_IN_OUT || \
  9. defined TP_GIVES || \
  10. defined TP_RECEIVES || \
  11. defined TP_RECEIVES_GIVES || \
  12. defined TP_ARRAY_GIVES || \
  13. defined TP_ARRAY_RECEIVES || \
  14. defined TP_ARRAY_RECEIVES_GIVES
  15. #error "Tecplot's parameter life-cycle keywords are in direct conflict with other meanings."
  16. #endif
  17. #if defined ___1918
  18. #define TP_ACQUIRES __attribute((___1546("acquires","in")))
  19. #define TP_RELEASES __attribute((___1546("releases","in")))
  20. #define TP_OUT __attribute((___1546("out")))
  21. #define TP_IN_OUT __attribute((___1546("in","out")))
  22. #define TP_ARRAY_OUT __attribute((___1546("array","out")))
  23. #define TP_ARRAY_IN_OUT __attribute((___1546("array","in","out")))
  24. #define TP_GIVES __attribute((___1546("gives","out")))
  25. #define TP_RECEIVES __attribute((___1546("receives","in")))
  26. #define TP_RECEIVES_GIVES __attribute((___1546("receives","in","gives","out")))
  27. #define TP_ARRAY_GIVES __attribute((___1546("array","gives","out")))
  28. #define TP_ARRAY_RECEIVES __attribute((___1546("array","receives","in")))
  29. #define TP_ARRAY_RECEIVES_GIVES __attribute((___1546("array","receives","in","gives","out")))
  30. #else
  31. #define TP_ACQUIRES
  32. #define TP_RELEASES
  33. #define TP_OUT
  34. #define TP_IN_OUT
  35. #define TP_ARRAY_OUT
  36. #define TP_ARRAY_IN_OUT
  37. #define TP_GIVES
  38. #define TP_RECEIVES
  39. #define TP_RECEIVES_GIVES
  40. #define TP_ARRAY_GIVES
  41. #define TP_ARRAY_RECEIVES
  42. #define TP_ARRAY_RECEIVES_GIVES
  43. #endif
  44. #if defined TP_QUERY
  45. #error "Tecplot's parameter annotation keywords are in direct conflict with other meanings."
  46. #endif
  47. #define TP_QUERY
  48. #ifdef NO_ASSERTS
  49. #define ___3587 ___1529
  50. #define ___3233
  51. #endif
  52. #include "stdafx.h"
  53. #include <string>
  54. #include <map>
  55. #include <vector>
  56. #include <queue>
  57. #if defined _WIN32
  58. #if !defined TECPLOTKERNEL
  59. #if !defined MSWIN
  60. #define MSWIN
  61. #endif
  62. #if !defined WINDOWS
  63. #define WINDOWS
  64. #endif
  65. #if !defined _WINDOWS
  66. #define _WINDOWS
  67. #endif
  68. #if !defined WIN32
  69. #define WIN32
  70. #endif
  71. #if defined _DEBUG
  72. #if !defined DEBUG
  73. #define DEBUG
  74. #endif
  75. #elif defined CHECKED_BUILD
  76. #if defined NO_ASSERTS
  77. #undef NO_ASSERTS
  78. #endif
  79. #if !defined NDEBUG
  80. #define NDEBUG
  81. #endif
  82. #else
  83. #if !defined NDEBUG
  84. #define NDEBUG
  85. #endif
  86. #if !defined NO_ASSERTS
  87. #define NO_ASSERTS
  88. #endif
  89. #endif
  90. #endif
  91. #if _MSC_VER >= 1400
  92. #define ___4444
  93. #endif
  94. #if !defined TECPLOTKERNEL && defined ___4444
  95. #if !defined _CRT_SECURE_NO_DEPRECATE
  96. #define _CRT_SECURE_NO_DEPRECATE
  97. #endif
  98. #endif
  99. #endif
  100. #ifdef NDEBUG
  101. # ifdef _DEBUG
  102. # error "Both NDEBUG and _DEBUG defined"
  103. # endif
  104. #elif defined TECPLOTKERNEL
  105. # ifndef _DEBUG
  106. # define _DEBUG
  107. # endif
  108. #endif
  109. #include "TranslatedString.h"
  110. #define ___4281
  111. #ifndef THREED
  112. # define THREED
  113. #endif
  114. #include <stdio.h>
  115. #include <ctype.h>
  116. #include <math.h>
  117. #if defined ___3260
  118. #define ___961
  119. #endif
  120. #if defined ___2467
  121. #define ___1100
  122. #endif
  123. #if defined CRAYX
  124. #define CRAY
  125. #endif
  126. #if defined ___1995
  127. #define ___1994
  128. #endif
  129. #if defined HPX
  130. #define HPUX
  131. #define ___1831
  132. #endif
  133. #if defined IBMRS6000X
  134. #define ___1833
  135. #endif
  136. #if defined COMPAQALPHAX
  137. #define ___534
  138. #define COMPAQX
  139. #define COMPAQ
  140. #endif
  141. #if defined DECALPHAX
  142. #define DECALPHA
  143. #define DECX
  144. #endif
  145. #if defined DECX
  146. #define DEC
  147. #endif
  148. #if defined ___3892 || defined ___3891
  149. #define ___3893
  150. #endif
  151. #if defined ___3893
  152. #define ___3886
  153. #endif
  154. #if defined ___1995 || defined CRAYX || defined HPX || defined ___3893 || defined ___657
  155. #define UNIXX
  156. #define ___3922
  157. #endif
  158. #if defined DECX || defined LINUX || defined IBMRS6000X || defined COMPAQX || defined DARWIN
  159. #define UNIXX
  160. #endif
  161. #include <stdarg.h>
  162. #define OEM_INVALID_CHECKSUM (___2227) -1
  163. #if defined MSWIN
  164. #define USE_TRUETYPEFONTS
  165. #endif
  166. #ifdef MSWIN
  167. #if defined ___4444
  168. #define Widget ___2322
  169. #else
  170. #define Widget long
  171. #endif
  172. #endif
  173. #if defined UNIXX
  174. typedef void *Widget;
  175. #endif
  176. #include <string.h>
  177. #if !defined ___3922 && !defined MSWIN
  178. #include <strings.h>
  179. #endif
  180. #if defined (___2467)
  181. #include <stdlib.h>
  182. #define ___1199
  183. #ifndef ___1306
  184. #define ___1306
  185. #endif
  186. #define VOID void
  187. #endif
  188. #include <sys/types.h>
  189. #include <stdlib.h>
  190. #if defined UNIXX
  191. #define ___1306
  192. #define ___2690
  193. #include <unistd.h>
  194. #endif
  195. #if defined MSWIN
  196. #include <windows.h>
  197. #endif
  198. #if !defined (TRACE)
  199. #if defined NDEBUG
  200. #if defined MSWIN
  201. #define TRACE __noop
  202. #define TRACE0(s) __noop
  203. #define TRACE1(S,a1) __noop
  204. #define TRACE2(s,a1,a2) __noop
  205. #define TRACE3(s,a1,a2,a3) __noop
  206. #define TRACE4(s,a1,a2,a3,a4) __noop
  207. #define TRACE5(s,a1,a2,a3,a4,a5) __noop
  208. #define TRACE6(s,a1,a2,a3,a4,a5,a6) __noop
  209. #else
  210. #define TRACE(str) ((void)0)
  211. #define TRACE0(str) ((void)0)
  212. #define TRACE1(str,a1) ((void)0)
  213. #define TRACE2(str,a1,a2) ((void)0)
  214. #define TRACE3(str,a1,a2,a3) ((void)0)
  215. #define TRACE4(str,a1,a2,a3,a4) ((void)0)
  216. #define TRACE5(str,a1,a2,a3,a4,a5) ((void)0)
  217. #define TRACE6(str,a1,a2,a3,a4,a5,a6) ((void)0)
  218. #endif
  219. #else
  220. #if defined MSWIN
  221. # define TRACE(str) do { OutputDebugStringA(str); } while (0)
  222. # define TRACE1(str,a1) do { char s[5000]; sprintf(s,str,a1); OutputDebugStringA(s); } while (0)
  223. # define TRACE2(str,a1,a2) do { char s[5000]; sprintf(s,str,a1,a2); OutputDebugStringA(s); } while (0)
  224. # define TRACE3(str,a1,a2,a3) do { char s[5000]; sprintf(s,str,a1,a2,a3); OutputDebugStringA(s); } while (0)
  225. # define TRACE4(str,a1,a2,a3,a4) do { char s[5000]; sprintf(s,str,a1,a2,a3,a4); OutputDebugStringA(s); } while (0)
  226. # define TRACE5(str,a1,a2,a3,a4,a5) do { char s[5000]; sprintf(s,str,a1,a2,a3,a4,a5); OutputDebugStringA(s); } while (0)
  227. # define TRACE6(str,a1,a2,a3,a4,a5,a6) do { char s[5000]; sprintf(s,str,a1,a2,a3,a4,a5,a6); OutputDebugStringA(s); } while (0)
  228. # define TRACE0(str) TRACE(str)
  229. #else
  230. #define TRACE printf
  231. #define TRACE0 printf
  232. #define TRACE1 printf
  233. #define TRACE2 printf
  234. #define TRACE3 printf
  235. #define TRACE4 printf
  236. #define TRACE5 printf
  237. #define TRACE6 printf
  238. #endif
  239. #endif
  240. #endif
  241. #if !defined MAX_SIZEOFUTF8CHAR
  242. #define MAX_SIZEOFUTF8CHAR 1
  243. #endif
  244. #if !defined (MaxCharsFilePath)
  245. # if defined (MSWIN)
  246. # define MaxCharsFilePath (_MAX_PATH*MAX_SIZEOFUTF8CHAR+1)
  247. # else
  248. # define MaxCharsFilePath 2047
  249. # endif
  250. #endif
  251. #if defined MSWIN && defined NDEBUG && !defined NO_ASSERTS && !defined CHECKED_BUILD
  252. # error "define NO_ASSERTS for release builds"
  253. #endif
  254. #if defined MSWIN && defined CHECKED_BUILD && !defined NDEBUG
  255. # error "CHECKED_BUILDS must also be release builds! NDEBUG should be defined but isn't."
  256. #endif
  257. #if defined NO_ASSERTS
  258. # if !defined USE_MACROS_FOR_FUNCTIONS
  259. # define USE_MACROS_FOR_FUNCTIONS
  260. # endif
  261. #endif
  262. #if defined LINUX && defined NULL
  263. # undef NULL
  264. # define NULL 0
  265. #endif
  266. #if defined MSWIN || defined LINUX || defined DARWIN
  267. #define ___1823
  268. #endif
  269. #if defined __GNUC__ && !defined ___1545
  270. #define ___1545 (__GNUC__ * 10000 + \
  271. __GNUC_MINOR__ * 100 + \
  272. __GNUC_PATCHLEVEL__)
  273. #endif
  274. #if defined MSWIN && defined max
  275. # undef max
  276. #endif
  277. #if defined MSWIN && defined min
  278. # undef min
  279. #endif
  280. #endif