]> skyeroc.xyz Git - dgamelaunch/commitdiff
Print error to stderr when we can't read DEFCONFIG file.
authorPasi Kallinen <paxed@alt.org>
Sat, 26 Sep 2009 19:33:50 +0000 (19:33 +0000)
committerPasi Kallinen <paxed@alt.org>
Sat, 26 Sep 2009 19:33:50 +0000 (19:33 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@463 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgl-common.c

index d46638b49f46f516f1548f0290b5488c731b0d60..09c2fbc1dd56f8eaa774c886f23dca1e4dd13a6e 100644 (file)
@@ -552,18 +552,18 @@ create_config ()
   else
   {
 #ifdef DEFCONFIG
-      /*      fprintf(stderr, "DEFCONFIG: %s\n", DEFCONFIG);*/
     config = DEFCONFIG;
     if ((config_file = fopen(DEFCONFIG, "r")) != NULL)
     {
       yyin = config_file;
-      /*      fprintf(stderr, "PARSING\n");*/
       yyparse();
-      /*      fprintf(stderr, "PARSED\n");*/
       fclose(config_file);
+    } else {
+       fprintf(stderr, "ERROR: can't find or open %s for reading\n", config);
+       graceful_exit(104);
+       return;
     }
 #else
-    /*      fprintf(stderr, "NO DEFCONFIG\n");*/
     num_games = 0;
     myconfig = calloc(1, sizeof(myconfig[0]));
     myconfig[0] = &defconfig;