rename base to base_id since flex defines a function with the argument base
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15426 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -46,7 +46,7 @@ extern FILE *yyin;
|
||||
|
||||
extern void yyparse(void);
|
||||
|
||||
long base;
|
||||
long base_id;
|
||||
int number;
|
||||
char *prefix;
|
||||
char *id_str;
|
||||
@@ -156,13 +156,13 @@ generate_h(void)
|
||||
fprintf(h_file, "typedef enum %s_error_number{\n", name);
|
||||
|
||||
for(ec = codes; ec; ec = ec->next) {
|
||||
fprintf(h_file, "\t%s = %ld%s\n", ec->name, base + ec->number,
|
||||
fprintf(h_file, "\t%s = %ld%s\n", ec->name, base_id + ec->number,
|
||||
(ec->next != NULL) ? "," : "");
|
||||
}
|
||||
|
||||
fprintf(h_file, "} %s_error_number;\n", name);
|
||||
fprintf(h_file, "\n");
|
||||
fprintf(h_file, "#define ERROR_TABLE_BASE_%s %ld\n", name, base);
|
||||
fprintf(h_file, "#define ERROR_TABLE_BASE_%s %ld\n", name, base_id);
|
||||
fprintf(h_file, "\n");
|
||||
fprintf(h_file, "#endif /* %s */\n", fn);
|
||||
|
||||
|
@@ -48,7 +48,7 @@
|
||||
#include <ctype.h>
|
||||
#include <roken.h>
|
||||
|
||||
extern long base;
|
||||
extern long base_id;
|
||||
extern int number;
|
||||
extern char *prefix;
|
||||
extern char name[128];
|
||||
|
@@ -77,13 +77,13 @@ id : ID STRING
|
||||
|
||||
et : ET STRING
|
||||
{
|
||||
base = name2number($2);
|
||||
base_id = name2number($2);
|
||||
strlcpy(name, $2, sizeof(name));
|
||||
free($2);
|
||||
}
|
||||
| ET STRING STRING
|
||||
{
|
||||
base = name2number($2);
|
||||
base_id = name2number($2);
|
||||
strlcpy(name, $3, sizeof(name));
|
||||
free($2);
|
||||
free($3);
|
||||
|
Reference in New Issue
Block a user