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);
24 int main(int argc, char **argv)
32 // make sure we create files with user access only
33 umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
36 for (i = 1; i < argc; i++) {
37 len += strlen(argv[i]) + 1;
41 argptr = (char *)malloc(len+5);
44 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error!", "Ran out of memory in main()!", NULL);
48 memset(argptr, 0, len+5);
50 for (i = 1; i < argc; i++) {
51 strcat(argptr, argv[i]);
57 retr = game_main(argptr);
59 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error!", "Exception caught in main()!", NULL);