void MateParseTrace(FILE*,char*);
#define MAX_INCLUDE_DEPTH 10
- YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
- int include_stack_ptr = 0;
+ static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+ static int include_stack_ptr = 0;
- void* pParser;
- mate_config_frame* current_frame;
+ static void* pParser;
+ static mate_config_frame* current_frame;
- mate_config* mc;
+ static mate_config* mc;
#define MATE_PARSE(token_type) MateParser(pParser, (token_type), g_strdup(yytext), mc );
%%
-extern gboolean mate_load_config(gchar* filename, mate_config* matecfg) {
- gboolean state;
+extern gboolean mate_load_config(const gchar* filename, mate_config* matecfg) {
+ volatile gboolean state = TRUE;
mc = matecfg;
yyin = fopen(filename,"r");
g_free(current_frame);
g_ptr_array_free(mc->config_stack,FALSE);
- state = TRUE;
} CATCH(MateConfigError) {
state = FALSE;
} CATCH_ALL {