mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-07-29 08:35:00 +02:00
Print error to stderr when we can't read DEFCONFIG file.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@463 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
5782235ecf
commit
70dcf4486d
@ -552,18 +552,18 @@ create_config ()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef DEFCONFIG
|
#ifdef DEFCONFIG
|
||||||
/* fprintf(stderr, "DEFCONFIG: %s\n", DEFCONFIG);*/
|
|
||||||
config = DEFCONFIG;
|
config = DEFCONFIG;
|
||||||
if ((config_file = fopen(DEFCONFIG, "r")) != NULL)
|
if ((config_file = fopen(DEFCONFIG, "r")) != NULL)
|
||||||
{
|
{
|
||||||
yyin = config_file;
|
yyin = config_file;
|
||||||
/* fprintf(stderr, "PARSING\n");*/
|
|
||||||
yyparse();
|
yyparse();
|
||||||
/* fprintf(stderr, "PARSED\n");*/
|
|
||||||
fclose(config_file);
|
fclose(config_file);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "ERROR: can't find or open %s for reading\n", config);
|
||||||
|
graceful_exit(104);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* fprintf(stderr, "NO DEFCONFIG\n");*/
|
|
||||||
num_games = 0;
|
num_games = 0;
|
||||||
myconfig = calloc(1, sizeof(myconfig[0]));
|
myconfig = calloc(1, sizeof(myconfig[0]));
|
||||||
myconfig[0] = &defconfig;
|
myconfig[0] = &defconfig;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user