equal
deleted
inserted
replaced
57 const char *s = strchr(path, ':'); |
57 const char *s = strchr(path, ':'); |
58 return s[1] == '\0'; |
58 return s[1] == '\0'; |
59 #endif |
59 #endif |
60 } |
60 } |
61 |
61 |
62 void FiosGetDrives(void) |
62 void FiosGetDrives() |
63 { |
63 { |
64 return; |
64 return; |
65 } |
65 } |
66 |
66 |
67 bool FiosGetDiskFreeSpace(const char *path, uint32 *tot) |
67 bool FiosGetDiskFreeSpace(const char *path, uint32 *tot) |
128 fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf); |
128 fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf); |
129 #endif |
129 #endif |
130 } |
130 } |
131 |
131 |
132 #ifdef WITH_COCOA |
132 #ifdef WITH_COCOA |
133 void cocoaSetWorkingDirectory(void); |
133 void cocoaSetWorkingDirectory(); |
134 void cocoaSetupAutoreleasePool(void); |
134 void cocoaSetupAutoreleasePool(); |
135 void cocoaReleaseAutoreleasePool(void); |
135 void cocoaReleaseAutoreleasePool(); |
136 #endif |
136 #endif |
137 |
137 |
138 int CDECL main(int argc, char* argv[]) |
138 int CDECL main(int argc, char* argv[]) |
139 { |
139 { |
140 int ret; |
140 int ret; |
166 #endif |
166 #endif |
167 |
167 |
168 return ret; |
168 return ret; |
169 } |
169 } |
170 |
170 |
171 void DeterminePaths(void) |
171 void DeterminePaths() |
172 { |
172 { |
173 char *s; |
173 char *s; |
174 |
174 |
175 _paths.game_data_dir = MallocT<char>(MAX_PATH); |
175 _paths.game_data_dir = MallocT<char>(MAX_PATH); |
176 ttd_strlcpy(_paths.game_data_dir, GAME_DATA_DIR, MAX_PATH); |
176 ttd_strlcpy(_paths.game_data_dir, GAME_DATA_DIR, MAX_PATH); |
297 #define INTERNALCODE "UTF-8" |
297 #define INTERNALCODE "UTF-8" |
298 |
298 |
299 /** Try and try to decipher the current locale from environmental |
299 /** Try and try to decipher the current locale from environmental |
300 * variables. MacOSX is hardcoded, other OS's are dynamic. If no suitable |
300 * variables. MacOSX is hardcoded, other OS's are dynamic. If no suitable |
301 * locale can be found, don't do any conversion "" */ |
301 * locale can be found, don't do any conversion "" */ |
302 static const char *GetLocalCode(void) |
302 static const char *GetLocalCode() |
303 { |
303 { |
304 #if defined(__APPLE__) |
304 #if defined(__APPLE__) |
305 return "UTF-8-MAC"; |
305 return "UTF-8-MAC"; |
306 #else |
306 #else |
307 /* Strip locale (eg en_US.UTF-8) to only have UTF-8 */ |
307 /* Strip locale (eg en_US.UTF-8) to only have UTF-8 */ |