MASTER.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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) \
  222. do \
  223. { \
  224. OutputDebugStringA(str); \
  225. } while (0)
  226. #define TRACE1(str, a1) \
  227. do \
  228. { \
  229. char s[5000]; \
  230. sprintf(s, str, a1); \
  231. OutputDebugStringA(s); \
  232. } while (0)
  233. #define TRACE2(str, a1, a2) \
  234. do \
  235. { \
  236. char s[5000]; \
  237. sprintf(s, str, a1, a2); \
  238. OutputDebugStringA(s); \
  239. } while (0)
  240. #define TRACE3(str, a1, a2, a3) \
  241. do \
  242. { \
  243. char s[5000]; \
  244. sprintf(s, str, a1, a2, a3); \
  245. OutputDebugStringA(s); \
  246. } while (0)
  247. #define TRACE4(str, a1, a2, a3, a4) \
  248. do \
  249. { \
  250. char s[5000]; \
  251. sprintf(s, str, a1, a2, a3, a4); \
  252. OutputDebugStringA(s); \
  253. } while (0)
  254. #define TRACE5(str, a1, a2, a3, a4, a5) \
  255. do \
  256. { \
  257. char s[5000]; \
  258. sprintf(s, str, a1, a2, a3, a4, a5); \
  259. OutputDebugStringA(s); \
  260. } while (0)
  261. #define TRACE6(str, a1, a2, a3, a4, a5, a6) \
  262. do \
  263. { \
  264. char s[5000]; \
  265. sprintf(s, str, a1, a2, a3, a4, a5, a6); \
  266. OutputDebugStringA(s); \
  267. } while (0)
  268. #define TRACE0(str) TRACE(str)
  269. #else
  270. #define TRACE printf
  271. #define TRACE0 printf
  272. #define TRACE1 printf
  273. #define TRACE2 printf
  274. #define TRACE3 printf
  275. #define TRACE4 printf
  276. #define TRACE5 printf
  277. #define TRACE6 printf
  278. #endif
  279. #endif
  280. #endif
  281. #if !defined MAX_SIZEOFUTF8CHAR
  282. #define MAX_SIZEOFUTF8CHAR 1
  283. #endif
  284. #if !defined(MaxCharsFilePath)
  285. #if defined(MSWIN)
  286. #define MaxCharsFilePath (_MAX_PATH * MAX_SIZEOFUTF8CHAR + 1)
  287. #else
  288. #define MaxCharsFilePath 2047
  289. #endif
  290. #endif
  291. #if defined MSWIN && defined NDEBUG && !defined NO_ASSERTS && !defined CHECKED_BUILD
  292. #error "define NO_ASSERTS for release builds"
  293. #endif
  294. #if defined MSWIN && defined CHECKED_BUILD && !defined NDEBUG
  295. #error "CHECKED_BUILDS must also be release builds! NDEBUG should be defined but isn't."
  296. #endif
  297. #if defined NO_ASSERTS
  298. #if !defined USE_MACROS_FOR_FUNCTIONS
  299. #define USE_MACROS_FOR_FUNCTIONS
  300. #endif
  301. #endif
  302. #if defined LINUX && defined NULL
  303. #undef NULL
  304. #define NULL 0
  305. #endif
  306. #if defined MSWIN || defined LINUX || defined DARWIN
  307. #define ___1823
  308. #endif
  309. #if defined __GNUC__ && !defined ___1545
  310. #define ___1545 (__GNUC__ * 10000 + \
  311. __GNUC_MINOR__ * 100 + \
  312. __GNUC_PATCHLEVEL__)
  313. #endif
  314. #if defined MSWIN && defined max
  315. #undef max
  316. #endif
  317. #if defined MSWIN && defined min
  318. #undef min
  319. #endif
  320. #endif