45 #include "botstuff.h" |
45 #include "botstuff.h" |
46 #include "tokens.h" |
46 #include "tokens.h" |
47 |
47 |
48 // Application name and version |
48 // Application name and version |
49 #define APPNAME "botc" |
49 #define APPNAME "botc" |
50 #define VERSION_MAJOR 0 |
50 #define VERSION_MAJOR 1 |
51 #define VERSION_MINOR 999 |
51 #define VERSION_MINOR 0 |
|
52 #define VERSION_PATCH 0 |
|
53 |
|
54 #define MAKE_VERSION_NUMBER(MAJ, MIN, PAT) ((MAJ * 10000) + (MIN * 100) + PAT) |
|
55 #define VERSION_NUMBER MAKE_VERSION_NUMBER (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH) |
52 |
56 |
53 // On Windows, files are case-insensitive |
57 // On Windows, files are case-insensitive |
54 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) |
58 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) |
55 #define FILE_CASEINSENSITIVE |
59 #define FILE_CASEINSENSITIVE |
56 #endif |
60 #endif |
88 #define assign_autocast(A,B) a = autocast(A) b |
92 #define assign_autocast(A,B) a = autocast(A) b |
89 |
93 |
90 // Shortcut for zeroing something |
94 // Shortcut for zeroing something |
91 #define ZERO(obj) memset (&obj, 0, sizeof (obj)); |
95 #define ZERO(obj) memset (&obj, 0, sizeof (obj)); |
92 |
96 |
|
97 enum form_length_e { e_long_form, e_short_form }; |
|
98 |
93 string ObjectFileName (string s); |
99 string ObjectFileName (string s); |
94 bool fexists (string path); |
100 bool fexists (string path); |
95 type_e GetTypeByName (string token); |
101 type_e GetTypeByName (string token); |
96 string GetTypeName (type_e type); |
102 string GetTypeName (type_e type); |
|
103 string get_version_string (form_length_e len); |
|
104 string make_version_string (int major, int minor, int patch); |
97 |
105 |
98 // Make the parser's variables globally available |
106 // Make the parser's variables globally available |
99 extern int g_NumStates; |
107 extern int g_NumStates; |
100 extern int g_NumEvents; |
108 extern int g_NumEvents; |
101 extern parsermode_e g_current_mode; |
109 extern parsermode_e g_current_mode; |