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>
17 extern int game_main(const char *szCmdLine);
21 int main(int argc, char *argv[])
29 // make sure we create files with user access only
30 umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
33 for (i = 1; i < argc; i++) {
34 len += strlen(argv[i]) + 1;
38 argptr = (char *)SDL_malloc(len+5);
41 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error!", "Ran out of memory in main()!", NULL);
45 memset(argptr, 0, len+5);
47 for (i = 1; i < argc; i++) {
48 strcat(argptr, argv[i]);
54 retr = game_main(argptr);
56 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error!", "Exception caught in main()!", NULL);