Initialize the muscle table before parsing the command line.

* src/getargs.c (quotearg.h, muscle_tab.h): Include.
	(getargs): Define file_name.
	* src/main.c (main): Initialize muscle_tab before calling
	getargs.
	* src/muscle_tab.c (muscle_init): No longer define file_name, as
	its value is not available yet.
This commit is contained in:
Akim Demaille
2008-07-29 12:47:41 +02:00
committed by Joel E. Denny
parent 33d2a86079
commit 75c21b618d
4 changed files with 17 additions and 6 deletions

View File

@@ -26,6 +26,7 @@
#include <c-strcase.h>
#include <configmake.h>
#include <error.h>
#include <quotearg.h>
/* Hack to get <getopt.h> to declare getopt with a prototype. */
#if lint && ! defined __GNU_LIBRARY__
@@ -43,6 +44,7 @@
#include "complain.h"
#include "files.h"
#include "getargs.h"
#include "muscle_tab.h"
#include "uniqstr.h"
bool debug_flag;
@@ -623,4 +625,5 @@ getargs (int argc, char *argv[])
}
current_file = grammar_file = uniqstr_new (argv[optind]);
MUSCLE_INSERT_C_STRING ("file_name", grammar_file);
}