2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
12 #include <sys/types.h>
19 extern int game_main(const char *szCmdLine);
22 int main(int argc, char **argv)
30 // make sure we create files with user access only
31 umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
34 for (i = 1; i < argc; i++) {
35 len += strlen(argv[i]) + 1;
39 argptr = (char *)malloc(len+5);
42 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error!", "Ran out of memory in main()!", NULL);
46 memset(argptr, 0, len+5);
48 for (i = 1; i < argc; i++) {
49 strcat(argptr, argv[i]);
55 retr = game_main(argptr);
57 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error!", "Exception caught in main()!", NULL);