all repos — openbox @ b3b0926fe1bda80b8695f53d961902a9c3927c3e

openbox fork - make it a bit more like ryudo

spit an error when no config file is found, to avoid confusing lex and the user.
Marius Nita marius@cs.pdx.edu
commit

b3b0926fe1bda80b8695f53d961902a9c3927c3e

parent

da0b76803d94e3f6b7548de6ae9933ac8dfcc685

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M util/epist/parser.ccutil/epist/parser.cc

@@ -54,9 +54,13 @@ extern FILE *yyin;

yyin = fopen(rc_file.c_str(), "r"); - yyparse(this); + if (yyin) { + yyparse(this); + fclose(yyin); + } else { + std::cerr << "ERROR: Configuration file could not be opened/found.\n"; + } - fclose(yyin); _kt->reset(); _kt->initialize(); }