aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/htadd.c
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-05-22 20:17:01 +0000
committerdos-reis <gdr@axiomatics.org>2008-05-22 20:17:01 +0000
commit66bf12078133726c7b95d9708472f2032ba458db (patch)
treeadfa2695394f64cfe89fee6fc8aafaeca6329628 /src/hyper/htadd.c
parentd8a4d498a6a0d1d34e25b6838b6450bd7d3e646f (diff)
downloadopen-axiom-66bf12078133726c7b95d9708472f2032ba458db.tar.gz
* hyper/token.h: Avoid numeric constants macros.
Prefix enumerations with "openaxiom_". * hyper/cond.c: Adjust. * hyper/display.c: Likewise. * hyper/event.c: Likewise. * hyper/extent1.c: Likewise. * hyper/extent2.c: Likewise. * hyper/htadd.c: Likewise. * hyper/htinp.c: Likewise. * hyper/macro.c: Likewise. * hyper/mem.c: Likewise. * hyper/parse-aux.c: Likewise. * hyper/parse-input.c: Likewise. * hyper/parse-paste.c: Likewise. * hyper/parse-types.c: Likewise. * hyper/parse.c: Likewise. * hyper/scrollbar.c: Likewise. * hyper/show-types.c: Likewise. * hyper/spadint.c: Likewise. * hyper/titlebar.c: Likewise.
Diffstat (limited to 'src/hyper/htadd.c')
-rw-r--r--src/hyper/htadd.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/hyper/htadd.c b/src/hyper/htadd.c
index 533824b5..eb6103bb 100644
--- a/src/hyper/htadd.c
+++ b/src/hyper/htadd.c
@@ -367,7 +367,10 @@ update_db(FILE *db, FILE *temp_db, FILE *new_file,
}
}
-#define Special(t) (( t == Page || t == NewCommand || t == Patch )?(1):(0))
+#define Special(t) \
+ (( t == openaxiom_Page_token \
+ || t == openaxiom_NewCommand_token \
+ || t == openaxiom_Patch_token )?(1):(0))
#define ptype(c, t) (strcpy(c, t));
static void
@@ -389,25 +392,28 @@ add_new_pages(FILE *temp_db, FILE *new_file, char *addname, char *fullname)
present_type = token.type;
pos = keyword_fpos;
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
fprintf(stderr, "missing left brace after a page, macro or patch \
declaration\n");
fprintf(stderr, "In the file %s on line %d\n", fullname, line_number);
exit(-1);
}
get_token();
- if (present_type == Page && token.type != Word) {
+ if (present_type == openaxiom_Page_token
+ && token.type != openaxiom_Word_token) {
fprintf(stderr, "missing page name after \\begin{page}\n");
fprintf(stderr, "In the file %s on line %d\n", fullname, line_number);
exit(-1);
}
- else if (present_type == Macro && token.type != Macro) {
+ else if (present_type == openaxiom_Macro_token
+ && token.type != openaxiom_Macro_token) {
fprintf(stderr, "Expected a \\macro name after newcommand, got %s\n",
token.id);
fprintf(stderr, "In the file %s on line %d\n", fullname, line_number);
exit(-1);
}
- else if (present_type == Patch && token.type != Word) {
+ else if (present_type == openaxiom_Patch_token
+ && token.type != openaxiom_Word_token) {
fprintf(stderr, "Missing patch name after a \\begin{patch}\n");
fprintf(stderr, "In the file %s on line %d\n", fullname, line_number);
exit(-1);
@@ -470,7 +476,7 @@ get_filename(void)
} while ((c = get_char()) != EOF && !delim(c));
unget_char(c);
*buf = '\0';
- token.type = Word;
+ token.type = openaxiom_Word_token;
token.id = buffer;
break;
}