aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/ChangeLog19
-rw-r--r--src/hyper/cond.c14
-rw-r--r--src/hyper/display.c16
-rw-r--r--src/hyper/event.c84
-rw-r--r--src/hyper/extent1.c264
-rw-r--r--src/hyper/extent2.c614
-rw-r--r--src/hyper/htadd.c18
-rw-r--r--src/hyper/htinp.c10
-rw-r--r--src/hyper/lex.c128
-rw-r--r--src/hyper/macro.c36
-rw-r--r--src/hyper/mem.c218
-rw-r--r--src/hyper/parse-aux.c51
-rw-r--r--src/hyper/parse-input.c50
-rw-r--r--src/hyper/parse-paste.c56
-rw-r--r--src/hyper/parse-types.c205
-rw-r--r--src/hyper/parse.c301
-rw-r--r--src/hyper/scrollbar.c2
-rw-r--r--src/hyper/show-types.c210
-rw-r--r--src/hyper/spadint.c285
-rw-r--r--src/hyper/titlebar.c10
-rw-r--r--src/hyper/token.h348
21 files changed, 1495 insertions, 1444 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b3772f79..55fd759f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,25 @@
2008-05-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
* 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.
* hyper/hyper.h: Move lexing stuff to hyper/lex.h
* hyper/htadd.c: Don't include hyper.h. Include cfuns.h and
diff --git a/src/hyper/cond.c b/src/hyper/cond.c
index ef7c42e0..f1930a89 100644
--- a/src/hyper/cond.c
+++ b/src/hyper/cond.c
@@ -123,29 +123,29 @@ check_condition(TextNode *node)
/* checks the condition presented and returns a 1 or a 0 */
switch (node->type) {
- case Cond:
+ case openaxiom_Cond_token:
cond = (CondNode *) hash_find(gWindow->fCondHashTable, node->data.text);
if (!strcmp("0", cond->cond))
return 0;
else
return 1;
- case Boxcond:
+ case openaxiom_Boxcond_token:
box = (InputBox *) hash_find(gWindow->page->box_hash, node->data.text);
return (box->picked);
- case Haslisp:
+ case openaxiom_Haslisp_token:
if (spad_socket != NULL) {
ret_val = send_int(spad_socket, TestLine);
return (ret_val + 1);
}
else
return 0;
- case Hasup:
+ case openaxiom_Hasup_token:
return need_up_button;
- case Hasreturn:
+ case openaxiom_Hasreturn_token:
return gWindow->fMemoStackIndex;
- case Hasreturnto:
+ case openaxiom_Hasreturnto_token:
return (check_memostack(node));
- case Lastwindow:
+ case openaxiom_Lastwindow_token:
return (gSessionHashTable.num_entries == 1 || gParentWindow == gWindow);
default:
return 0;
diff --git a/src/hyper/display.c b/src/hyper/display.c
index 4271e81e..e8ce034e 100644
--- a/src/hyper/display.c
+++ b/src/hyper/display.c
@@ -147,7 +147,7 @@ show_page(HyperDocPage *page)
gRegionOffset = 0;
y_off = 0;
gDisplayRegion = Header;
- show_text(page->header->next, Endheader);
+ show_text(page->header->next, openaxiom_Endheader_token);
if (doShowScrollBars && page->scrolling) {
/* Show the footer */
@@ -155,14 +155,14 @@ show_page(HyperDocPage *page)
gDisplayRegion = Footer;
gRegionOffset = gWindow->page->bot_scroll_margin +
(!((gWindow->page->page_flags & NOLINES)) ? ((int) line_height / 2) : (0));
- show_text(page->footer->next, Endfooter);
+ show_text(page->footer->next, openaxiom_Endfooter_token);
/* Show the scrolling region */
if (page->scrolling->next)
gDisplayRegion = Scrolling;
gRegionOffset = 0;
gWindow->fDisplayedWindow = gWindow->fScrollWindow;
y_off = gWindow->page->scroll_off;
- show_text(page->scrolling->next, Endscrolling);
+ show_text(page->scrolling->next, openaxiom_Endscrolling_token);
showScrollBars(gWindow);
}
drawScrollLines();
@@ -189,7 +189,7 @@ expose_page(HyperDocPage *page)
gWindow->fDisplayedWindow = gWindow->fMainWindow;
gRegionOffset = 0;
gDisplayRegion = Header;
- show_text(page->header->next, Endheader);
+ show_text(page->header->next, openaxiom_Endheader_token);
getScrollBarMinimumSize(&width, &height);
/*
@@ -200,7 +200,7 @@ expose_page(HyperDocPage *page)
gDisplayRegion = Footer;
gRegionOffset = gWindow->page->bot_scroll_margin +
(!((gWindow->page->page_flags & NOLINES)) ? ((int) line_height / 2) : (0));
- show_text(page->footer->next, Endfooter);
+ show_text(page->footer->next, openaxiom_Endfooter_token);
}
if (height > gWindow->scrollheight) {
@@ -216,7 +216,7 @@ expose_page(HyperDocPage *page)
gRegionOffset = 0;
gWindow->fDisplayedWindow = gWindow->fScrollWindow;
y_off = gWindow->page->scroll_off;
- show_text(page->scrolling->next, Endscrolling);
+ show_text(page->scrolling->next, openaxiom_Endscrolling_token);
if (doShowScrollBars)
showScrollBars(gWindow);
}
@@ -240,7 +240,7 @@ scroll_page(HyperDocPage *page)
gRegionOffset = 0;
gWindow->fDisplayedWindow = gWindow->fScrollWindow;
y_off = gWindow->page->scroll_off;
- show_text(page->scrolling->next, Endscrolling);
+ show_text(page->scrolling->next, openaxiom_Endscrolling_token);
moveScroller(gWindow);
XFlush(gXDisplay);
}
@@ -283,7 +283,7 @@ paste_page(TextNode *node)
else
XClearWindow(gXDisplay, gWindow->fScrollWindow);
- show_text(gWindow->page->scrolling->next, Endscrolling);
+ show_text(gWindow->page->scrolling->next, openaxiom_Endscrolling_token);
XFlush(gXDisplay);
hideScrollBars(gWindow);
diff --git a/src/hyper/event.c b/src/hyper/event.c
index 8da7b16a..80c907d3 100644
--- a/src/hyper/event.c
+++ b/src/hyper/event.c
@@ -356,9 +356,11 @@ find_page(TextNode * node)
* stack.
*/
-#define NotSpecial(t) ((t == Quitbutton || t == Returnbutton || \
- t == Upbutton || t == UnknownPage || \
- t == UlUnknownPage || t == ErrorPage) ?(0):(1))
+#define NotSpecial(t) \
+ ((t == openaxiom_Quitbutton_token || t == openaxiom_Returnbutton_token \
+ || t == openaxiom_Upbutton_token || t == UnknownPage \
+ || t == UlUnknownPage || t == ErrorPage) \
+ ?(0):(1))
/* pushes a page onto the down link stack */
@@ -585,18 +587,18 @@ handle_button(int button, XButtonEvent * event)
}
switch (link->type) {
- case Pastebutton:
+ case openaxiom_Pastebutton_token:
page = paste_button(link->reference.paste);
break;
- case Link:
+ case openaxiom_Link_token:
page_name = print_to_string(link->reference.node);
page = (HyperDocPage *) hash_find(gWindow->fPageHashTable, page_name);
break;
- case Helpbutton:
+ case openaxiom_Helpbutton_token:
helpForHyperDoc();
page = NULL;
break;
- case Scrollbar:
+ case openaxiom_Scrollbar_token:
scrollScroller(event);
break;
case Scrollupbutton:
@@ -606,7 +608,7 @@ handle_button(int button, XButtonEvent * event)
scrollDown();
break;
- case Inputstring:
+ case openaxiom_Inputstring_token:
/* We must be changing input focus or getting a selection */
change_input_focus(link);
@@ -618,34 +620,34 @@ handle_button(int button, XButtonEvent * event)
}
break;
- case SimpleBox:
+ case openaxiom_SimpleBox_token:
page = NULL;
toggle_input_box(link);
break;
- case Radiobox:
+ case openaxiom_Radiobox_token:
page = NULL;
toggle_radio_box(link);
break;
- case Quitbutton:
+ case openaxiom_Quitbutton_token:
quitHyperDoc();
break;
- case Returnbutton: /* pop memo information */
+ case openaxiom_Returnbutton_token: /* pop memo information */
page = returnlink();
break;
- case Upbutton: /* pop downlink information */
+ case openaxiom_Upbutton_token: /* pop downlink information */
page = uplink();
break;
- case Downlink:
+ case openaxiom_Downlink_token:
page = find_page(link->reference.node);
if (page && NotSpecial(page->type))
downlink();
break;
- case Memolink:
+ case openaxiom_Memolink_token:
page = find_page(link->reference.node);
if (page && NotSpecial(page->type))
memolink();
break;
- case Windowlink:
+ case openaxiom_Windowlink_token:
page = find_page(link->reference.node);
if (page && NotSpecial(page->type)) {
windowlink_handler(link->reference.node);
@@ -653,51 +655,51 @@ handle_button(int button, XButtonEvent * event)
page = NULL;
}
break;
- case Lispwindowlink:
+ case openaxiom_Lispwindowlink_token:
lispwindowlink_handler(link);
gNeedIconName = 1;
page = NULL;
break;
- case LispMemoLink:
- case Spadmemolink:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Spadmemolink_token:
page = issue_server_command(link);
if (page && NotSpecial(page->type))
memolink();
break;
- case LispDownLink:
- case Spaddownlink:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_Spaddownlink_token:
page = issue_server_command(link);
if (page && NotSpecial(page->type))
downlink();
break;
- case Spadlink:
- case Lisplink:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Lisplink_token:
page = issue_server_command(link);
break;
- case Lispcommand:
- case Qspadcall:
- case Spadcall:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Spadcall_token:
page = issue_server_command(link);
break;
- case Lispcommandquit:
- case Spadcallquit:
- case Qspadcallquit:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Qspadcallquit_token:
page = issue_server_command(link);
exitHyperDoc();
break;
- case Spadcommand:
- case Spadgraph:
- case Spadsrc:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
+ case openaxiom_Spadsrc_token:
issue_spadcommand(gWindow->page, link->reference.node,
button == Button1, link->type);
break;
- case Unixlink:
+ case openaxiom_Unixlink_token:
page = issue_unixlink(link->reference.node);
if (page && NotSpecial(page->type)) {
downlink();
}
break;
- case Unixcommand:
+ case openaxiom_Unixcommand_token:
issue_unixcommand(link->reference.node);
break;
default:
@@ -706,13 +708,13 @@ handle_button(int button, XButtonEvent * event)
if (page) {
switch (page->type) { /* check for special button types */
- case Quitbutton:
+ case openaxiom_Quitbutton_token:
exitHyperDoc();
return;
- case Returnbutton:
+ case openaxiom_Returnbutton_token:
gWindow->page = returnlink();
break;
- case Upbutton:
+ case openaxiom_Upbutton_token:
gWindow->page = uplink();
break;
case ErrorPage:
@@ -727,7 +729,7 @@ handle_button(int button, XButtonEvent * event)
gWindow->page = page;
break;
}
- if (link->type != Pastebutton)
+ if (link->type != openaxiom_Pastebutton_token)
display_page(gWindow->page);
gWindow->fWindowHashTable = gWindow->page->fLinkHashTable; /* reset the window hash */
}
@@ -872,7 +874,7 @@ get_new_window(void)
init_top_window(NULL);
val = get_int(spad_socket);
init_scanner();
- input_type = FromSpadSocket;
+ input_type = openaxiom_FromSpadSocket_input;
input_string = "";
gWindow->page = parse_page_from_socket();
gWindow->fAxiomFrame = frame;
@@ -891,7 +893,7 @@ get_new_window(void)
init_form_window(NULL, val);
send_int(spad_socket, gWindow->fMainWindow);
init_scanner();
- input_type = FromSpadSocket;
+ input_type = openaxiom_FromSpadSocket_input;
input_string = "";
gWindow->page = parse_page_from_socket();
compute_form_page(gWindow->page);
@@ -941,7 +943,7 @@ get_new_window(void)
wid = (Window) get_int(spad_socket);
set_window(wid);
init_scanner();
- input_type = FromSpadSocket;
+ input_type = openaxiom_FromSpadSocket_input;
input_string = "";
gWindow->page = parse_page_from_socket();
display_page(gWindow->page);
diff --git a/src/hyper/extent1.c b/src/hyper/extent1.c
index 3ae2aaf5..0c92fbb4 100644
--- a/src/hyper/extent1.c
+++ b/src/hyper/extent1.c
@@ -165,7 +165,7 @@ compute_punctuation_extent(TextNode * node)
*/
if (!(node->space & BACKSPACE))
- nextwidth = total_width(node->next, Endtokens);
+ nextwidth = total_width(node->next, openaxiom_Endtokens_token);
else
nextwidth = 0;
@@ -228,7 +228,7 @@ compute_word_extent(TextNode * node)
* space in front and add there width on.
*/
- nextwidth = total_width(node->next, Endtokens);
+ nextwidth = total_width(node->next, openaxiom_Endtokens_token);
/*
@@ -311,7 +311,7 @@ compute_dash_extent(TextNode *node)
* space in front and add there width on.
*/
- nextwidth = total_width(node->next, Endtokens);
+ nextwidth = total_width(node->next, openaxiom_Endtokens_token);
/*
* Should we start a new line?
@@ -349,75 +349,75 @@ compute_text_extent(TextNode *node)
{
for (; node != NULL; node = node->next) {
switch (node->type) {
- case Endpastebutton:
+ case openaxiom_Endpastebutton_token:
endpastebutton_extent(node);
break;
- case Paste:
+ case openaxiom_Paste_token:
compute_paste_extent(node);
break;
- case Endpaste:
+ case openaxiom_Endpaste_token:
if (gInLine) {
start_newline(present_line_height, node);
text_x = indent;
}
break;
- case Pastebutton:
+ case openaxiom_Pastebutton_token:
compute_pastebutton_extent(node);
break;
- case Ifcond:
+ case openaxiom_Ifcond_token:
compute_ifcond_extent(node);
break;
- case Fi:
+ case openaxiom_Fi_token:
break;
- case Endif:
+ case openaxiom_Endif_token:
if (if_node == NULL) {
return;
}
else
endif_extent(node);
break;
- case Endcenter:
+ case openaxiom_Endcenter_token:
start_newline(present_line_height, node->next);
pop_group_stack();
text_x = indent;
break;
- case Pound:
- case Macro:
+ case openaxiom_Pound_token:
+ case openaxiom_Macro_token:
/* check to see if we had space in front of me, if so add it */
if (node->space && gInLine)
text_x += inter_word_space;
break;
- case Punctuation:
+ case openaxiom_Punctuation_token:
compute_punctuation_extent(node);
break;
- case Endmath:
+ case openaxiom_Endmath_token:
break;
- case Endverbatim:
+ case openaxiom_Endverbatim_token:
if (gInLine) {
start_newline(present_line_height, node);
text_x = indent;
}
break;
- case Spadsrctxt:
+ case openaxiom_Spadsrctxt_token:
compute_spadsrctxt_extent(node);
break;
- case Math:
+ case openaxiom_Math_token:
compute_word_extent(node);
break;
- case Verbatim:
+ case openaxiom_Verbatim_token:
compute_verbatim_extent(node);
break;
- case WindowId:
- case Word:
- case Lsquarebrace:
- case Rsquarebrace:
+ case openaxiom_WindowId_token:
+ case openaxiom_Word_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Rsquarebrace_token:
compute_word_extent(node);
break;
- case Dash:
+ case openaxiom_Dash_token:
compute_dash_extent(node);
break;
- case HSpace:
+ case openaxiom_HSpace_token:
node->height = line_height;
node->x = text_x;
node->y = text_y;
@@ -426,7 +426,7 @@ compute_text_extent(TextNode *node)
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1);
}
break;
- case VSpace:
+ case openaxiom_VSpace_token:
node->height = line_height;
node->x = text_x;
node->y = text_y + present_line_height;;
@@ -439,20 +439,20 @@ compute_text_extent(TextNode *node)
present_line_height = line_height;
break;
- case Space:
+ case openaxiom_Space_token:
node->height = line_height;
node->x = text_x;
node->y = text_y;
text_x += (gTopOfGroupStack->cur_font->max_bounds.width) *
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1);
break;
- case Tab:
+ case openaxiom_Tab_token:
node->height = line_height;
text_x = indent + (gTopOfGroupStack->cur_font->max_bounds.width) *
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1);
gInLine = 0;
break;
- case Par:
+ case openaxiom_Par_token:
node->height = line_height;
if (gInItem)
text_x = indent;
@@ -462,13 +462,13 @@ compute_text_extent(TextNode *node)
start_newline(present_line_height, node);
}
break;
- case Newline:
+ case openaxiom_Newline_token:
if (gInLine) {
start_newline(present_line_height, node);
text_x = indent;
}
break;
- case Horizontalline:
+ case openaxiom_Horizontalline_token:
if (gInLine) {
start_newline(present_line_height, node);
text_x = indent;
@@ -479,167 +479,167 @@ compute_text_extent(TextNode *node)
node->x = text_x;
start_newline(present_line_height, node);
break;
- case Center:
+ case openaxiom_Center_token:
compute_center_extent(node);
break;
- case Box:
+ case openaxiom_Box_token:
compute_box_extent(node);
break;
- case Mbox:
+ case openaxiom_Mbox_token:
compute_mbox_extent(node);
break;
- case Beginitems:
- case Begintitems:
+ case openaxiom_Beginitems_token:
+ case openaxiom_Begintitems_token:
compute_begin_items_extent(node);
break;
- case Enditems:
- case Endtitems:
+ case openaxiom_Enditems_token:
+ case openaxiom_Endtitems_token:
pop_item_stack();
if (gInLine) {
start_newline(present_line_height, node);
}
text_x = indent;
break;
- case Titem:
+ case openaxiom_Titem_token:
if (gInLine) {
start_newline(present_line_height, node);
}
text_x = indent - item_space;
break;
- case Item:
+ case openaxiom_Item_token:
compute_item_extent(node);
break;
- case Mitem:
+ case openaxiom_Mitem_token:
compute_mitem_extent(node);
break;
- case Upbutton:
- case Returnbutton:
- case Memolink:
- case Downlink:
- case Link:
- case Windowlink:
+ case openaxiom_Upbutton_token:
+ case openaxiom_Returnbutton_token:
+ case openaxiom_Memolink_token:
+ case openaxiom_Downlink_token:
+ case openaxiom_Link_token:
+ case openaxiom_Windowlink_token:
compute_button_extent(node);
break;
- case Unixlink:
- case Lisplink:
- case Lispwindowlink:
- case Spadcall:
- case Spadcallquit:
- case Qspadcall:
- case Qspadcallquit:
- case LispDownLink:
- case LispMemoLink:
- case Lispcommand:
- case Lispcommandquit:
- case Spadlink:
- case Spaddownlink:
- case Spadmemolink:
- case Unixcommand:
+ case openaxiom_Unixlink_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Lispwindowlink_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Unixcommand_token:
compute_button_extent(node);
break;
- case Endbutton:
+ case openaxiom_Endbutton_token:
endbutton_extent(node);
break;
- case Endlink:
+ case openaxiom_Endlink_token:
if (link_node == NULL)
return;
else
endbutton_extent(node);
break;
- case Spadsrc:
+ case openaxiom_Spadsrc_token:
compute_spadsrc_extent(node);
break;
- case Spadcommand:
- case Spadgraph:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
compute_spadcommand_extent(node);
break;
- case Endspadsrc:
+ case openaxiom_Endspadsrc_token:
end_spadsrc_extent(node);
break;
- case Endspadcommand:
+ case openaxiom_Endspadcommand_token:
end_spadcommand_extent(node);
break;
- case Indent:
+ case openaxiom_Indent_token:
indent = left_margin +
atoi(node->data.node->data.text) *
(gTopOfGroupStack->cur_font->max_bounds.width);
if (!gInLine)
text_x = indent;
break;
- case Indentrel:
+ case openaxiom_Indentrel_token:
indent += atoi(node->data.node->data.text) *
(gTopOfGroupStack->cur_font->max_bounds.width);
if (!gInLine)
text_x = indent;
break;
- case Group:
+ case openaxiom_Group_token:
push_group_stack();
node->y = text_y;
if (gInLine && node->space)
text_x += inter_word_space;
break;
- case Endgroup:
+ case openaxiom_Endgroup_token:
pop_group_stack();
break;
- case Tableitem:
+ case openaxiom_Tableitem_token:
push_group_stack();
node->y = text_y;
if (gInLine && node->space)
text_x += inter_word_space;
break;
- case Endtableitem:
+ case openaxiom_Endtableitem_token:
pop_group_stack();
return;
- case Controlbitmap:
- case Inputbitmap:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Inputbitmap_token:
if (node->width == -1)
insert_bitmap_file(node);
compute_image_extent(node);
break;
- case Inputpixmap:
+ case openaxiom_Inputpixmap_token:
if (node->width == -1)
insert_pixmap_file(node);
compute_image_extent(node);
break;
- case Table:
+ case openaxiom_Table_token:
compute_table_extent(&node);
break;
- case BoldFace:
+ case openaxiom_BoldFace_token:
compute_bf_extent(node);
break;
- case Emphasize:
+ case openaxiom_Emphasize_token:
compute_em_extent(node);
break;
- case It:
+ case openaxiom_It_token:
compute_it_extent(node);
break;
- case Rm:
- case Sl:
- case Tt:
+ case openaxiom_Rm_token:
+ case openaxiom_Sl_token:
+ case openaxiom_Tt_token:
compute_rm_extent(node);
break;
- case Inputstring:
+ case openaxiom_Inputstring_token:
compute_input_extent(node);
break;
- case SimpleBox:
- case Radiobox:
+ case openaxiom_SimpleBox_token:
+ case openaxiom_Radiobox_token:
compute_ir_extent(node);
break;
- case Endbox:
+ case openaxiom_Endbox_token:
text_x += box_width;
break;
- case Endmacro:
- case Endparameter:
+ case openaxiom_Endmacro_token:
+ case openaxiom_Endparameter_token:
break;
- case Description:
+ case openaxiom_Description_token:
bf_top_group();
break;
- case Enddescription:
+ case openaxiom_Enddescription_token:
pop_group_stack();
if (gInDesc)
return;
break;
- case Endscrolling:
+ case openaxiom_Endscrolling_token:
/*
* What we should do here is if we am in the middle of a line, we
@@ -649,17 +649,17 @@ compute_text_extent(TextNode *node)
if (gInLine)
start_newline(present_line_height, node);
break;
- case Noop:
+ case openaxiom_Noop_token:
noop_count++;
break;
- case Endinputbox:
- case Endheader:
- case Endtitle:
- case Endfooter:
- case Rbrace:
- case Free:
- case Bound:
- case Beep:
+ case openaxiom_Endinputbox_token:
+ case openaxiom_Endheader_token:
+ case openaxiom_Endtitle_token:
+ case openaxiom_Endfooter_token:
+ case openaxiom_Rbrace_token:
+ case openaxiom_Free_token:
+ case openaxiom_Bound_token:
+ case openaxiom_Beep_token:
case 0:
break;
default:
@@ -693,7 +693,7 @@ compute_begin_items_extent(TextNode * node)
gInDesc = 1;
compute_text_extent(node->data.node);
gInDesc = 0;
- item_space = text_width(node->data.node, Enddescription);
+ item_space = text_width(node->data.node, openaxiom_Enddescription_token);
text_x = store_x;
text_y = store_y;
present_line_height = lh;
@@ -872,7 +872,7 @@ compute_button_extent(TextNode *node)
if (gInLine && node->space)
text_x += inter_word_space;
- twidth = text_width(node->next, Endbutton);
+ twidth = text_width(node->next, openaxiom_Endbutton_token);
if (gInLine && node->space)
text_x += inter_word_space;
if (text_x + twidth > right_margin && gInLine) {
@@ -893,10 +893,11 @@ endbutton_extent(TextNode *node)
int y;
int maxx;
- maxx = max_x(link_node, Endbutton);
- link_node->width = twidth = text_width(link_node->next, Endbutton);
+ maxx = max_x(link_node, openaxiom_Endbutton_token);
+ link_node->width = twidth = text_width(link_node->next,
+ openaxiom_Endbutton_token);
height = link_node->y;
- temp = text_height(link_node->next, Endbutton);
+ temp = text_height(link_node->next, openaxiom_Endbutton_token);
link_node->height = temp - link_node->y + line_height;
if (gInLine)
@@ -933,7 +934,7 @@ compute_pastebutton_extent(TextNode *node)
if (gInLine && node->space)
text_x += inter_word_space;
- twidth = text_width(node->next, Endpastebutton);
+ twidth = text_width(node->next, openaxiom_Endpastebutton_token);
if (gInLine && node->space)
text_x += inter_word_space;
if (text_x + twidth > right_margin && gInLine) {
@@ -953,9 +954,9 @@ endpastebutton_extent(TextNode *node)
int height;
int twidth;
- paste_node->width = twidth = text_width(paste_node->next, Endpastebutton);
+ paste_node->width = twidth = text_width(paste_node->next, openaxiom_Endpastebutton_token);
height = paste_node->y;
- temp = text_height(paste_node->next, Endpastebutton);
+ temp = text_height(paste_node->next, openaxiom_Endpastebutton_token);
paste_node->height = temp - paste_node->y + line_height;
if (text_y > height) {
paste_node->y = temp;
@@ -1009,7 +1010,7 @@ compute_spadcommand_extent(TextNode *node)
/* Check to see if we should space in front of myself */
if (gInLine && node->space)
text_x += inter_word_space;
- t_width = text_width(node->next, Endspadcommand);
+ t_width = text_width(node->next, openaxiom_Endspadcommand_token);
if (gInLine && ((text_x + t_width) > right_margin)) {
start_newline(present_line_height, node);
text_x = indent;
@@ -1055,10 +1056,11 @@ end_spadcommand_extent(TextNode *node)
int maxx;
/*int y = (gInLine) ? (text_y) : (text_y - past_line_height);*/
- maxx = max_x(spad_node, Endspadcommand);
- twidth = spad_node->width = text_width(spad_node->next, Endspadcommand);
+ maxx = max_x(spad_node, openaxiom_Endspadcommand_token);
+ twidth = spad_node->width = text_width(spad_node->next,
+ openaxiom_Endspadcommand_token);
height = spad_node->y;
- temp = text_height(spad_node->next, Endspadcommand);
+ temp = text_height(spad_node->next, openaxiom_Endspadcommand_token);
spad_node->height = temp - height + line_height;
if (text_y > height && gInLine) {
@@ -1085,11 +1087,12 @@ end_spadsrc_extent(TextNode *node)
int maxx;
int y = (gInLine) ? (text_y) : (text_y - past_line_height);
- maxx = max_x(spad_node, Endspadsrc);
+ maxx = max_x(spad_node, openaxiom_Endspadsrc_token);
- twidth = spad_node->width = text_width(spad_node->next, Endspadsrc);
+ twidth = spad_node->width = text_width(spad_node->next,
+ openaxiom_Endspadsrc_token);
height = spad_node->y;
- temp = text_height(spad_node->next, Endspadsrc);
+ temp = text_height(spad_node->next, openaxiom_Endspadsrc_token);
spad_node->height = temp - height + line_height;
if (y > height && gInLine) {
spad_node->y = temp;
@@ -1109,8 +1112,7 @@ end_spadsrc_extent(TextNode *node)
static void
compute_mbox_extent(TextNode *node)
{
-
- node->width = text_width(node->next, Endmbox);
+ node->width = text_width(node->next, openaxiom_Endmbox_token);
if (node->space)
text_x += inter_word_space;
if (text_x + node->width > right_margin) {
@@ -1136,7 +1138,7 @@ compute_box_extent(TextNode *node)
/* Calculate the actual width of the box */
- t_width = text_width(node->next, Endbox) + 2 * box_width;
+ t_width = text_width(node->next, openaxiom_Endbox_token) + 2 * box_width;
if (text_x + t_width > right_margin) {
start_newline(present_line_height, node);
@@ -1220,13 +1222,14 @@ compute_table_extent(TextNode **node)
gInTable = 1;
front->x = text_x;
front->y = text_y;
- for (tn = front->next; tn->type != Endtable; num_entries++, tn = tn->next) {
+ for (tn = front->next; tn->type != openaxiom_Endtable_token;
+ num_entries++, tn = tn->next) {
/* Now we need to scan the table group by group */
- node_width = text_width(tn->next, Endtableitem);
+ node_width = text_width(tn->next, openaxiom_Endtableitem_token);
if (node_width > max_width)
max_width = node_width;
/* Get to the beginning og the next group */
- for (; tn->type != Endtableitem; tn = tn->next);
+ for (; tn->type != openaxiom_Endtableitem_token; tn = tn->next);
}
col_width = max_width + min_inter_column_space;
screen_width = gWindow->width - right_margin_space - indent;
@@ -1245,7 +1248,7 @@ compute_table_extent(TextNode **node)
++num_cols;
col_width = screen_width / num_cols;
for (tn = front->next, x = 0; x < num_cols; x++)
- for (y = 0; y < num_lines && tn->type != Endtable; y++) {
+ for (y = 0; y < num_lines && tn->type != openaxiom_Endtable_token; y++) {
if (num_cols == 1 && y > 0)
text_y += line_height;
else
@@ -1253,7 +1256,7 @@ compute_table_extent(TextNode **node)
text_x = indent + x * col_width;
gInLine = 0;
compute_text_extent(tn->next);
- for (; tn->type != Endtableitem; tn = tn->next);
+ for (; tn->type != openaxiom_Endtableitem_token; tn = tn->next);
tn = tn->next;
}
front->height = num_lines * line_height;
@@ -1277,7 +1280,8 @@ compute_title_extent(HyperDocPage *page)
init_title_extents(page);
text_y = top_margin + line_height;
compute_text_extent(page->title->next);
- page->title->height = max(text_height(page->title->next, Endtitle),
+ page->title->height = max(text_height(page->title->next,
+ openaxiom_Endtitle_token),
twheight);
}
@@ -1298,7 +1302,8 @@ compute_header_extent(HyperDocPage *page)
ty = text_y = 3 * top_margin + line_height + max(page->title->height, twheight);
gLineNode = page->header->next;
compute_text_extent(page->header->next);
- page->header->height = text_height(page->header->next, Endheader);
+ page->header->height = text_height(page->header->next,
+ openaxiom_Endheader_token);
if (page->header->height) {
page->header->height += 1 / 2 * line_height;
page->top_scroll_margin = (gInLine) ? text_y : text_y - past_line_height;
@@ -1323,7 +1328,8 @@ compute_footer_extent(HyperDocPage * page)
text_y = line_height;
gLineNode = page->footer->next;
compute_text_extent(page->footer->next);
- page->footer->height = text_height(page->footer->next, Endfooter);
+ page->footer->height = text_height(page->footer->next,
+ openaxiom_Endfooter_token);
if (page->footer->height) {
if ((!page->page_flags & NOLINES))
page->footer->height += (int) line_height / 2;
diff --git a/src/hyper/extent2.c b/src/hyper/extent2.c
index 2caf79ca..ced4156b 100644
--- a/src/hyper/extent2.c
+++ b/src/hyper/extent2.c
@@ -202,110 +202,110 @@ text_width(TextNode * node, int Ender)
int twidth = 0, num_words;
for (num_words = 0; node != NULL; num_words++, node = node->next) {
- if (Ender == Endtokens) {
- if (node->type == Endtokens)
+ if (Ender == openaxiom_Endtokens_token) {
+ if (node->type == openaxiom_Endtokens_token)
return twidth;
}
else if (node->type == Ender)
return twidth;
switch (node->type) {
- case Macro:
- case Pound:
+ case openaxiom_Macro_token:
+ case openaxiom_Pound_token:
if (node->space && gInLine)
twidth += inter_word_space;
break;
- case Punctuation:
+ case openaxiom_Punctuation_token:
twidth += punctuation_width(node);
break;
- case Dash:
+ case openaxiom_Dash_token:
if (gInLine && node->space)
twidth += inter_word_space;
twidth += width_of_dash(node);
break;
- case Verbatim:
- case Spadsrctxt:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Spadsrctxt_token:
twidth += verbatim_width(node);
break;
- case Lsquarebrace:
- case Rsquarebrace:
- case Word:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Word_token:
twidth += word_width(node);
break;
- case Box:
+ case openaxiom_Box_token:
twidth += 2 * box_space;
break;
- case Link:
- case Downlink:
- case Memolink:
- case Windowlink:
- case LispMemoLink:
- case Lispwindowlink:
- case Lisplink:
- case Unixlink:
- case Spadcall:
- case Spadcallquit:
- case Qspadcall:
- case Qspadcallquit:
- case LispDownLink:
- case Lispcommand:
- case Lispcommandquit:
- case Spadlink:
- case Spaddownlink:
- case Spadmemolink:
- case Unixcommand:
- case Upbutton:
- case Returnbutton:
- case Description:
+ case openaxiom_Link_token:
+ case openaxiom_Downlink_token:
+ case openaxiom_Memolink_token:
+ case openaxiom_Windowlink_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Lispwindowlink_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Unixlink_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Unixcommand_token:
+ case openaxiom_Upbutton_token:
+ case openaxiom_Returnbutton_token:
+ case openaxiom_Description_token:
push_active_group();
break;
- case Endbutton:
- case Endspadcommand:
- case Enddescription:
+ case openaxiom_Endbutton_token:
+ case openaxiom_Endspadcommand_token:
+ case openaxiom_Enddescription_token:
pop_group_stack();
break;
- case Endlink:
+ case openaxiom_Endlink_token:
pop_group_stack();
break;
- case Inputstring:
+ case openaxiom_Inputstring_token:
twidth += input_string_width(node);
break;
- case SimpleBox:
- case Radiobox:
+ case openaxiom_SimpleBox_token:
+ case openaxiom_Radiobox_token:
twidth += node->width + ((node->space) ? inter_word_space : 0);
break;
- case Spadcommand:
- case Spadgraph:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
push_spad_group();
break;
- case VSpace:
+ case openaxiom_VSpace_token:
break;
- case HSpace:
+ case openaxiom_HSpace_token:
twidth +=
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1);
break;
- case Space:
+ case openaxiom_Space_token:
twidth += (gTopOfGroupStack->cur_font->max_bounds.width) *
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1);
break;
- case Tab:
+ case openaxiom_Tab_token:
twidth = (gTopOfGroupStack->cur_font->max_bounds.width) *
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1);
break;
- case Table:
+ case openaxiom_Table_token:
twidth = gWindow->width - left_margin - right_margin_space;
break;
- case Tableitem:
- case Group:
+ case openaxiom_Tableitem_token:
+ case openaxiom_Group_token:
twidth += (node->space) ? inter_word_space : 0;
push_group_stack();
break;
- case BoldFace:
+ case openaxiom_BoldFace_token:
if (node->space)
twidth += inter_word_space;
bf_top_group();
break;
- case Emphasize:
+ case openaxiom_Emphasize_token:
if (node->space)
twidth += inter_word_space;
if (gTopOfGroupStack->cur_font == gRmFont)
@@ -313,60 +313,60 @@ text_width(TextNode * node, int Ender)
else
rm_top_group();
break;
- case It:
+ case openaxiom_It_token:
if (node->space)
twidth += inter_word_space;
em_top_group();
break;
- case Rm:
- case Sl:
- case Tt:
+ case openaxiom_Rm_token:
+ case openaxiom_Sl_token:
+ case openaxiom_Tt_token:
if (node->space)
twidth += inter_word_space;
rm_top_group();
break;
- case Endgroup:
+ case openaxiom_Endgroup_token:
pop_group_stack();
break;
- case Controlbitmap:
- case Inputbitmap:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Inputbitmap_token:
if (node->width == -1)
insert_bitmap_file(node);
twidth += node->width;
break;
- case Inputpixmap:
+ case openaxiom_Inputpixmap_token:
if (node->width == -1)
insert_pixmap_file(node);
twidth += node->width;
break;
- case Mbox:
- case Indent:
- case Endmacro:
- case Free:
- case Bound:
- case Beep:
- case Item:
- case Titem:
- case Beginitems:
- case Noop:
- case Endinputbox:
- case Fi:
- case Ifcond:
- case Endif:
- case Begintitems:
- case Enditems:
- case Endtitems:
- case Endtableitem:
- case Endtable:
- case Endparameter:
- case Endbox:
- case Endheader:
- case Endfooter:
- case Endscrolling:
- case Endverbatim:
- case Endspadsrc:
- break;
- case Newline:
+ case openaxiom_Mbox_token:
+ case openaxiom_Indent_token:
+ case openaxiom_Endmacro_token:
+ case openaxiom_Free_token:
+ case openaxiom_Bound_token:
+ case openaxiom_Beep_token:
+ case openaxiom_Item_token:
+ case openaxiom_Titem_token:
+ case openaxiom_Beginitems_token:
+ case openaxiom_Noop_token:
+ case openaxiom_Endinputbox_token:
+ case openaxiom_Fi_token:
+ case openaxiom_Ifcond_token:
+ case openaxiom_Endif_token:
+ case openaxiom_Begintitems_token:
+ case openaxiom_Enditems_token:
+ case openaxiom_Endtitems_token:
+ case openaxiom_Endtableitem_token:
+ case openaxiom_Endtable_token:
+ case openaxiom_Endparameter_token:
+ case openaxiom_Endbox_token:
+ case openaxiom_Endheader_token:
+ case openaxiom_Endfooter_token:
+ case openaxiom_Endscrolling_token:
+ case openaxiom_Endverbatim_token:
+ case openaxiom_Endspadsrc_token:
+ break;
+ case openaxiom_Newline_token:
/* WOw, I guess I should ertunr a really big number */
twidth += gWindow->width;
break;
@@ -394,8 +394,8 @@ total_width(TextNode * node, int Ender)
int twidth = 0;
for (; (node != NULL); node = node->next) {
- if (Ender == Endtokens) {
- if (node->type >= Endtokens)
+ if (Ender == openaxiom_Endtokens_token) {
+ if (node->type >= openaxiom_Endtokens_token)
return twidth;
}
else if (node->type == Ender)
@@ -412,68 +412,68 @@ total_width(TextNode * node, int Ender)
/*** Else depending on the node type ***/
switch (node->type) {
- case Noop:
- case Endinputbox:
- case Pound:
- case Ifcond:
- case Fi:
- case Endif:
- break;
- case Rsquarebrace:
- case Punctuation:
- case Word:
- case Dash:
+ case openaxiom_Noop_token:
+ case openaxiom_Endinputbox_token:
+ case openaxiom_Pound_token:
+ case openaxiom_Ifcond_token:
+ case openaxiom_Fi_token:
+ case openaxiom_Endif_token:
+ break;
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Punctuation_token:
+ case openaxiom_Word_token:
+ case openaxiom_Dash_token:
twidth += XTextWidth(gTopOfGroupStack->cur_font, node->data.text,
strlen(node->data.text));
break;
- case Box:
- case Link:
- case Downlink:
- case Memolink:
- case Windowlink:
- case LispMemoLink:
- case Lispwindowlink:
- case Lisplink:
- case Unixlink:
- case Spadcall:
- case Spadcallquit:
- case Qspadcall:
- case Qspadcallquit:
- case LispDownLink:
- case Lispcommand:
- case Lispcommandquit:
- case Spadlink:
- case Spaddownlink:
- case Spadmemolink:
- case Unixcommand:
- case Inputstring:
- case SimpleBox:
- case Radiobox:
- case Upbutton:
- case Returnbutton:
- case Spadcommand:
- case Spadgraph:
- case VSpace:
- case HSpace:
- case Space:
- case Table:
- case Group:
- case Controlbitmap:
- case Inputbitmap:
- case Inputpixmap:
- case Free:
- case Beep:
- case Bound:
- case Lsquarebrace:
- case BoldFace:
- case Emphasize:
- case It:
- case Rm:
- case Sl:
- case Tt:
- case Newline:
- case Verbatim:
- case Spadsrctxt:
+ case openaxiom_Box_token:
+ case openaxiom_Link_token:
+ case openaxiom_Downlink_token:
+ case openaxiom_Memolink_token:
+ case openaxiom_Windowlink_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Lispwindowlink_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Unixlink_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Unixcommand_token:
+ case openaxiom_Inputstring_token:
+ case openaxiom_SimpleBox_token:
+ case openaxiom_Radiobox_token:
+ case openaxiom_Upbutton_token:
+ case openaxiom_Returnbutton_token:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
+ case openaxiom_VSpace_token:
+ case openaxiom_HSpace_token:
+ case openaxiom_Space_token:
+ case openaxiom_Table_token:
+ case openaxiom_Group_token:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Inputbitmap_token:
+ case openaxiom_Inputpixmap_token:
+ case openaxiom_Free_token:
+ case openaxiom_Beep_token:
+ case openaxiom_Bound_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_BoldFace_token:
+ case openaxiom_Emphasize_token:
+ case openaxiom_It_token:
+ case openaxiom_Rm_token:
+ case openaxiom_Sl_token:
+ case openaxiom_Tt_token:
+ case openaxiom_Newline_token:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Spadsrctxt_token:
return twidth;
default:
break;
@@ -556,111 +556,111 @@ static int
text_height1(TextNode * node, int Ender)
{
for (; node != NULL; node = node->next) {
- if (Ender == Endtokens) {
- if (node->type > -Endtokens)
+ if (Ender == openaxiom_Endtokens_token) {
+ if (node->type > -openaxiom_Endtokens_token)
return cur_height;
}
else if (node->type == Ender)
return cur_height;
switch (node->type) {
- case Center:
- case Downlink:
- case Link:
- case Spadcommand:
- case Spadgraph:
- case Upbutton:
- case Returnbutton:
- case Windowlink:
- case Memolink:
- case Lispwindowlink:
- case Lisplink:
- case Unixlink:
- case Spadcall:
- case Spadcallquit:
- case Qspadcall:
- case Qspadcallquit:
- case LispDownLink:
- case LispMemoLink:
- case Lispcommand:
- case Lispcommandquit:
- case Spadlink:
- case Spaddownlink:
- case Spadmemolink:
- case Unixcommand:
- case SimpleBox:
- case Radiobox:
- case Group:
- case Box:
- case Controlbitmap:
- case Inputbitmap:
- case Inputpixmap:
- case Horizontalline:
- case Punctuation:
- case Lsquarebrace:
- case Rsquarebrace:
- case Word:
- case Verbatim:
- case Math:
- case Spadsrctxt:
- case Dash:
- case Inputstring:
+ case openaxiom_Center_token:
+ case openaxiom_Downlink_token:
+ case openaxiom_Link_token:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
+ case openaxiom_Upbutton_token:
+ case openaxiom_Returnbutton_token:
+ case openaxiom_Windowlink_token:
+ case openaxiom_Memolink_token:
+ case openaxiom_Lispwindowlink_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Unixlink_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Unixcommand_token:
+ case openaxiom_SimpleBox_token:
+ case openaxiom_Radiobox_token:
+ case openaxiom_Group_token:
+ case openaxiom_Box_token:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Inputbitmap_token:
+ case openaxiom_Inputpixmap_token:
+ case openaxiom_Horizontalline_token:
+ case openaxiom_Punctuation_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Word_token:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Math_token:
+ case openaxiom_Spadsrctxt_token:
+ case openaxiom_Dash_token:
+ case openaxiom_Inputstring_token:
cur_height = max(node->y, cur_height);
break;
- case Mbox:
- case Macro:
- case Pound:
- case Emphasize:
- case BoldFace:
- case It:
- case Rm:
- case Sl:
- case Tt:
- case Endparameter:
- case Description:
- case Enddescription:
- case Noop:
- case Fi:
- case Ifcond:
- case Endif:
- case Endinputbox:
- case Tab:
- case Newline:
- case Space:
- case VSpace:
- case HSpace:
- case Beginitems:
- case Begintitems:
- case Endtitems:
- case Titem:
- case Enditems:
- case Endtable:
- case Endtableitem:
- case Item:
- case Par:
- case Beep:
- case Free:
- case Bound:
- case Endgroup:
- case Endcenter:
- case Endbutton:
- case Endmacro:
- case Tableitem:
- case Endlink:
- case Endspadcommand:
- case Indent:
- case Indentrel:
- case Endbox:
- case Endmbox:
- case Table:
- case Endverbatim:
- case Endmath:
- case Spadsrc:
- case Endspadsrc:
- break;
- case Beginscroll:
- case Endscroll:
- break;
- case Endscrolling:
+ case openaxiom_Mbox_token:
+ case openaxiom_Macro_token:
+ case openaxiom_Pound_token:
+ case openaxiom_Emphasize_token:
+ case openaxiom_BoldFace_token:
+ case openaxiom_It_token:
+ case openaxiom_Rm_token:
+ case openaxiom_Sl_token:
+ case openaxiom_Tt_token:
+ case openaxiom_Endparameter_token:
+ case openaxiom_Description_token:
+ case openaxiom_Enddescription_token:
+ case openaxiom_Noop_token:
+ case openaxiom_Fi_token:
+ case openaxiom_Ifcond_token:
+ case openaxiom_Endif_token:
+ case openaxiom_Endinputbox_token:
+ case openaxiom_Tab_token:
+ case openaxiom_Newline_token:
+ case openaxiom_Space_token:
+ case openaxiom_VSpace_token:
+ case openaxiom_HSpace_token:
+ case openaxiom_Beginitems_token:
+ case openaxiom_Begintitems_token:
+ case openaxiom_Endtitems_token:
+ case openaxiom_Titem_token:
+ case openaxiom_Enditems_token:
+ case openaxiom_Endtable_token:
+ case openaxiom_Endtableitem_token:
+ case openaxiom_Item_token:
+ case openaxiom_Par_token:
+ case openaxiom_Beep_token:
+ case openaxiom_Free_token:
+ case openaxiom_Bound_token:
+ case openaxiom_Endgroup_token:
+ case openaxiom_Endcenter_token:
+ case openaxiom_Endbutton_token:
+ case openaxiom_Endmacro_token:
+ case openaxiom_Tableitem_token:
+ case openaxiom_Endlink_token:
+ case openaxiom_Endspadcommand_token:
+ case openaxiom_Indent_token:
+ case openaxiom_Indentrel_token:
+ case openaxiom_Endbox_token:
+ case openaxiom_Endmbox_token:
+ case openaxiom_Table_token:
+ case openaxiom_Endverbatim_token:
+ case openaxiom_Endmath_token:
+ case openaxiom_Spadsrc_token:
+ case openaxiom_Endspadsrc_token:
+ break;
+ case openaxiom_Beginscroll_token:
+ case openaxiom_Endscroll_token:
+ break;
+ case openaxiom_Endscrolling_token:
return cur_height;
default:
@@ -683,67 +683,67 @@ max_x(TextNode * node, int Ender)
{
max_x_value = 0;
for (; node != NULL; node = node->next) {
- if (Ender == Endtokens) {
- if (node->type >= Endtokens)
+ if (Ender == openaxiom_Endtokens_token) {
+ if (node->type >= openaxiom_Endtokens_token)
return max_x_value;
}
else if (node->type == Ender)
return max_x_value;
switch (node->type) {
- case Lsquarebrace:
- case Rsquarebrace:
- case Word:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Word_token:
max_x_value = max(max_x_value, node->x + word_width(node));
break;
- case Verbatim:
- case Spadsrctxt:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Spadsrctxt_token:
max_x_value = max(max_x_value, node->x + verbatim_width(node));
break;
- case Punctuation:
+ case openaxiom_Punctuation_token:
max_x_value = max(max_x_value, node->x + punctuation_width(node));
break;
- case Dash:
+ case openaxiom_Dash_token:
max_x_value = max(max_x_value, node->x + width_of_dash(node));
break;
- case HSpace:
+ case openaxiom_HSpace_token:
max_x_value = max(max_x_value, node->x +
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1));
break;
- case Space:
+ case openaxiom_Space_token:
max_x_value = max(max_x_value, node->x +
(gTopOfGroupStack->cur_font->max_bounds.width) *
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1));
break;
- case Group:
+ case openaxiom_Group_token:
push_group_stack();
break;
- case BoldFace:
+ case openaxiom_BoldFace_token:
bf_top_group();
break;
- case Emphasize:
+ case openaxiom_Emphasize_token:
if (gTopOfGroupStack->cur_font == gRmFont)
em_top_group();
else
rm_top_group();
break;
- case It:
+ case openaxiom_It_token:
em_top_group();
break;
- case Rm:
- case Sl:
- case Tt:
+ case openaxiom_Rm_token:
+ case openaxiom_Sl_token:
+ case openaxiom_Tt_token:
rm_top_group();
break;
- case Endgroup:
+ case openaxiom_Endgroup_token:
pop_group_stack();
break;
- case Controlbitmap:
- case Inputbitmap:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Inputbitmap_token:
if (node->width == -1)
insert_bitmap_file(node);
max_x_value = max(max_x_value, node->x + node->width);
break;
- case Inputpixmap:
+ case openaxiom_Inputpixmap_token:
if (node->width == -1)
insert_pixmap_file(node);
max_x_value = max(max_x_value, node->y + node->width);
@@ -760,42 +760,42 @@ x_value(TextNode * node)
{
for (; node != NULL; node = node->next) {
switch (node->type) {
- case Controlbitmap:
- case Inputbitmap:
- case Inputpixmap:
- case Lsquarebrace:
- case Rsquarebrace:
- case Word:
- case Verbatim:
- case Spadsrctxt:
- case Dash:
- case Punctuation:
- case VSpace:
- case HSpace:
- case Horizontalline:
- case Box:
- case Downlink:
- case Link:
- case Lispwindowlink:
- case Lisplink:
- case Unixlink:
- case Spadcall:
- case Spadcallquit:
- case Qspadcall:
- case Qspadcallquit:
- case LispDownLink:
- case LispMemoLink:
- case Lispcommand:
- case Lispcommandquit:
- case Spadlink:
- case Spaddownlink:
- case Spadmemolink:
- case Spadcommand:
- case Spadgraph:
- case Unixcommand:
- case Space:
- case SimpleBox:
- case Radiobox:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Inputbitmap_token:
+ case openaxiom_Inputpixmap_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Word_token:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Spadsrctxt_token:
+ case openaxiom_Dash_token:
+ case openaxiom_Punctuation_token:
+ case openaxiom_VSpace_token:
+ case openaxiom_HSpace_token:
+ case openaxiom_Horizontalline_token:
+ case openaxiom_Box_token:
+ case openaxiom_Downlink_token:
+ case openaxiom_Link_token:
+ case openaxiom_Lispwindowlink_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Unixlink_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
+ case openaxiom_Unixcommand_token:
+ case openaxiom_Space_token:
+ case openaxiom_SimpleBox_token:
+ case openaxiom_Radiobox_token:
return node->x;
default:
#ifdef DEBUG
@@ -816,8 +816,8 @@ trailing_space(TextNode * node)
{
int space = 0;
- for (; node->type < Endtokens; node = node->next);
- if (node->type == Space)
+ for (; node->type < openaxiom_Endtokens_token; node = node->next);
+ if (node->type == openaxiom_Space_token)
space += inter_word_space *
(node->data.node != NULL ? atoi(node->data.node->data.text) : 1);
return space;
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;
}
diff --git a/src/hyper/htinp.c b/src/hyper/htinp.c
index cb879eb6..6151b0f8 100644
--- a/src/hyper/htinp.c
+++ b/src/hyper/htinp.c
@@ -212,8 +212,9 @@ make_input_file_from_page(HyperDocPage *page)
fprintf(file, ")clear all\n\n");
for (node = page->scrolling; node != NULL; node = node->next)
- if (node->type == Spadcommand || node->type == Spadgraph
- || node->type == Spadsrc) {
+ if (node->type == openaxiom_Spadcommand_token
+ || node->type == openaxiom_Spadgraph_token
+ || node->type == openaxiom_Spadsrc_token) {
if (starting_file) {
example_number = 1;
if (make_patch_files) {
@@ -245,7 +246,8 @@ make_input_file_from_page(HyperDocPage *page)
buf = print_to_string(node->next);
include_bf = 0;
if (make_patch_files) {
- if (node->type == Spadcommand || node->type == Spadsrc)
+ if (node->type == openaxiom_Spadcommand_token
+ || node->type == openaxiom_Spadsrc_token)
print_paste(pfile, com, buf, page->name, node->type);
else
print_graph_paste(pfile, com, buf, page->name, node->type);
@@ -423,7 +425,7 @@ send_command(char *command,int com_type)
{
char buf[1024];
- if (com_type != Spadsrc) {
+ if (com_type != openaxiom_Spadsrc_token) {
escape_string(command);
sprintf(buf, "(|parseAndEvalToHypertex| '\"%s\")", command);
send_lisp_command(buf);
diff --git a/src/hyper/lex.c b/src/hyper/lex.c
index 16ec3230..0db4a7ee 100644
--- a/src/hyper/lex.c
+++ b/src/hyper/lex.c
@@ -236,7 +236,7 @@ parser_init(void)
TokenHashSize,
(EqualFunction)string_equal,
(HashcodeFunction)string_hash);
- for (i = 2; i <= NumberUserTokens; i++) {
+ for (i = 2; i <= openaxiom_NumberUserTokens_token; i++) {
toke = (Token *) halloc(sizeof(Token), "Token");
toke->type = i;
toke->id = token_table[i];
@@ -259,7 +259,7 @@ init_scanner(void)
keyword = 0;
last_ch = NoChar;
last_token = 0;
- input_type = FromFile;
+ input_type = openaxiom_FromFile_input;
fpos = 0;
keyword_fpos = 0;
last_command = -1;
@@ -390,23 +390,23 @@ get_char1(void)
return c;
}
switch (input_type) {
- case FromUnixFD:
+ case openaxiom_FromUnixFD_input:
c = getc(unixfd);
if (c == '\n')
line_number++;
return c;
- case FromString:
+ case openaxiom_FromString_input:
c = (*input_string ? *input_string++ : EOF);
if (c == '\n')
line_number++;
return c;
- case FromFile:
+ case openaxiom_FromFile_input:
c = getc(cfile);
fpos++;
if (c == '\n')
line_number++;
return c;
- case FromSpadSocket:
+ case openaxiom_FromSpadSocket_input:
AGAIN:
if (*input_string) {
/* this should never happen for the first character */
@@ -490,7 +490,7 @@ get_token(void)
seen_white++;
if (c == '\n') {
if (nls) {
- token.type = Par;
+ token.type = openaxiom_Par_token;
return 0;
}
else
@@ -506,15 +506,15 @@ get_token(void)
*buf++ = 0;
keyword = 0;
- if (input_type != FromSpadSocket && c == '%') {
+ if (input_type != openaxiom_FromSpadSocket_input && c == '%') {
while ((c = get_char()) != '\n' && c != EOF);
/* trying to fix the comment problem: a comment line forces words on either side together*/
/* try returning the eol */
unget_char(c);
return get_token();
}
- if (input_type == FromFile && c == '$') {
- token.type = Dollar;
+ if (input_type == openaxiom_FromFile_input && c == '$') {
+ token.type = openaxiom_Dollar_token;
return 0;
}
switch (c) {
@@ -526,7 +526,7 @@ get_token(void)
c = get_char();
if (!isalpha(c)) {
*buf++ = c;
- token.type = Word;
+ token.type = openaxiom_Word_token;
*buf = '\0';
seen_white = 0;
}
@@ -543,25 +543,25 @@ get_token(void)
}
break;
case '{':
- token.type = Lbrace;
+ token.type = openaxiom_Lbrace_token;
break;
case '}':
- token.type = Rbrace;
+ token.type = openaxiom_Rbrace_token;
break;
case '[':
- token.type = Lsquarebrace;
+ token.type = openaxiom_Lsquarebrace_token;
*buf++ = c;
*buf = '\0';
token.id = buffer + 1;
break;
case ']':
- token.type = Rsquarebrace;
+ token.type = openaxiom_Rsquarebrace_token;
*buf++ = c;
*buf = '\0';
token.id = buffer + 1;
break;
case '#':
- token.type = Pound;
+ token.type = openaxiom_Pound_token;
/*
* if I get a pound then what I do is parse until I get something
@@ -585,7 +585,7 @@ get_token(void)
case '"':
case ':':
case ';':
- token.type = Punctuation;
+ token.type = openaxiom_Punctuation_token;
*buf++ = c;
*buf = '\0';
/** Now I should set the buffer[0] as my flag for whether I had
@@ -605,7 +605,7 @@ get_token(void)
} while (((c = get_char()) != EOF) && (c == '-'));
unget_char(c);
*buf = '\0';
- token.type = Dash;
+ token.type = openaxiom_Dash_token;
token.id = buffer + 1;
break;
default:
@@ -614,7 +614,7 @@ get_token(void)
} while ((c = get_char()) != EOF && !delim(c));
unget_char(c);
*buf = '\0';
- token.type = Word;
+ token.type = openaxiom_Word_token;
token.id = buffer + 1;
break;
}
@@ -711,12 +711,12 @@ be_type(const char* which)
{
Token store;
- get_expected_token(Lbrace);
- get_expected_token(Word);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Word_token);
switch (token.id[0]) {
case 't':
if (!strcmp(token.id, "titems")) {
- token.type = Begintitems;
+ token.type = openaxiom_Begintitems_token;
}
else {
return -1;
@@ -724,13 +724,13 @@ be_type(const char* which)
break;
case 'p':
if (!strcmp(token.id, "page")) {
- token.type = Page;
+ token.type = openaxiom_Page_token;
}
else if (!strcmp(token.id, "paste")) {
- token.type = Paste;
+ token.type = openaxiom_Paste_token;
}
else if (!strcmp(token.id, "patch")) {
- token.type = Patch;
+ token.type = openaxiom_Patch_token;
}
else {
return -1;
@@ -738,7 +738,7 @@ be_type(const char* which)
break;
case 'v': /* possibly a verbatim mode */
if (!strcmp(token.id, "verbatim")) {
- token.type = Verbatim;
+ token.type = openaxiom_Verbatim_token;
}
else {
return -1;
@@ -746,10 +746,10 @@ be_type(const char* which)
break;
case 's': /* possibly a scroll mode */
if (!strcmp("scroll", token.id)) {
- token.type = Beginscroll;
+ token.type = openaxiom_Beginscroll_token;
}
else if (!strcmp(token.id, "spadsrc")) {
- token.type = Spadsrc;
+ token.type = openaxiom_Spadsrc_token;
}
else {
return -1;
@@ -757,7 +757,7 @@ be_type(const char* which)
break;
case 'i': /* possibly a item */
if (!strcmp("items", token.id)) {
- token.type = Beginitems;
+ token.type = openaxiom_Beginitems_token;
}
else {
return -1;
@@ -768,7 +768,7 @@ be_type(const char* which)
}
store.type = token.type;
/* store.id = alloc_string(token.id); */
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
token.type = store.type;
/*
@@ -802,8 +802,9 @@ begin_type(void)
}
}
else {
- if (gWindow != NULL && !gInVerbatim && token.type != Verbatim
- && token.type != Spadsrc) {
+ if (gWindow != NULL && !gInVerbatim
+ && token.type != openaxiom_Verbatim_token
+ && token.type != openaxiom_Spadsrc_token) {
/* Now here I should push the needed info and then get */
push_be_stack(token.type, token.id);
}
@@ -844,8 +845,9 @@ end_type(void)
return 1;
}
else {
- if (gWindow != NULL && ((gInVerbatim && token.type == Verbatim) ||
- (gInSpadsrc && token.type == Spadsrc))) {
+ if (gWindow != NULL
+ && ((gInVerbatim && token.type == openaxiom_Verbatim_token)
+ || (gInSpadsrc && token.type == openaxiom_Spadsrc_token))) {
check_and_pop_be_stack(token.type, token.id);
token.type += 3000;
return 1;
@@ -863,68 +865,68 @@ end_type(void)
void
token_name(int type)
{
- if (type <= NumberUserTokens)
+ if (type <= openaxiom_NumberUserTokens_token)
strcpy(ebuffer, token_table[type]);
else {
switch (type) {
- case Lbrace:
+ case openaxiom_Lbrace_token:
strcpy(ebuffer, "{");
break;
- case Rbrace:
+ case openaxiom_Rbrace_token:
strcpy(ebuffer, "}");
break;
- case Macro:
+ case openaxiom_Macro_token:
strcpy(ebuffer, token.id);
break;
- case Group:
+ case openaxiom_Group_token:
strcpy(ebuffer, "{");
break;
- case Pound:
+ case openaxiom_Pound_token:
strcpy(ebuffer, "#");
break;
- case Lsquarebrace:
+ case openaxiom_Lsquarebrace_token:
strcpy(ebuffer, "[");
break;
- case Rsquarebrace:
+ case openaxiom_Rsquarebrace_token:
strcpy(ebuffer, "]");
break;
- case Punctuation:
+ case openaxiom_Punctuation_token:
strcpy(ebuffer, token.id);
break;
- case Dash:
+ case openaxiom_Dash_token:
strcpy(ebuffer, token.id);
break;
- case Verbatim:
+ case openaxiom_Verbatim_token:
strcpy(ebuffer, "\\begin{verbatim}");
break;
- case Scroll:
+ case openaxiom_Scroll_token:
strcpy(ebuffer, "\\begin{scroll}");
break;
- case Dollar:
+ case openaxiom_Dollar_token:
strcpy(ebuffer, "$");
break;
- case Percent:
+ case openaxiom_Percent_token:
strcpy(ebuffer, "%");
break;
- case Carrot:
+ case openaxiom_Carrot_token:
strcpy(ebuffer, "^");
break;
- case Underscore:
+ case openaxiom_Underscore_token:
strcpy(ebuffer, "_");
break;
- case Tilde:
+ case openaxiom_Tilde_token:
strcpy(ebuffer, "~");
break;
- case Cond:
+ case openaxiom_Cond_token:
sprintf(ebuffer, "\\%s", token.id);
break;
- case Icorrection:
+ case openaxiom_Icorrection_token:
strcpy(ebuffer, "\\/");
break;
- case Paste:
+ case openaxiom_Paste_token:
strcpy(ebuffer, "\\begin{paste}");
break;
- case Patch:
+ case openaxiom_Patch_token:
strcpy(ebuffer, "\\begin{patch}");
break;
default:
@@ -939,7 +941,7 @@ token_name(int type)
void
print_token(void)
{
- if (token.type == Word)
+ if (token.type == openaxiom_Word_token)
printf("%s ", token.id);
else {
token_name(token.type);
@@ -1009,28 +1011,28 @@ keyword_type(void)
* if I am a keyword I also have to check to see if I am a begin or
* an end
*/
- if (token.type == Begin)
+ if (token.type == openaxiom_Begin_token)
return begin_type();
- if (token.type == End)
+ if (token.type == openaxiom_End_token)
return end_type();
/* next check to see if it is a macro */
}
else if (gWindow != NULL) {
if (hash_find(gWindow->fMacroHashTable, token.id) != NULL)
- token.type = Macro;
+ token.type = openaxiom_Macro_token;
else if (gPageBeingParsed->box_hash != NULL &&
hash_find(gPageBeingParsed->box_hash, token.id) != NULL)
{
- token.type = Boxcond;
+ token.type = openaxiom_Boxcond_token;
}
else if (hash_find(gWindow->fCondHashTable, token.id) != NULL)
- token.type = Cond;
+ token.type = openaxiom_Cond_token;
else /* We have no idea what we've got */
- token.type = Unkeyword;
+ token.type = openaxiom_Unkeyword_token;
}
else { /* We am probably in htadd so just return. It
* is only concerned with pages anyway */
- token.type = Unkeyword;
+ token.type = openaxiom_Unkeyword_token;
}
return 0;
}
diff --git a/src/hyper/macro.c b/src/hyper/macro.c
index 459c3235..dd1625b7 100644
--- a/src/hyper/macro.c
+++ b/src/hyper/macro.c
@@ -67,17 +67,17 @@ scan_HyperDoc(void)
longjmp(jmpbuf, 1);
}
switch (token.type) {
- case Page:
+ case openaxiom_Page_token:
fprintf(stderr, "scan_HyperDoc: Unexpected Page Declaration\n");
break;
- case NewCommand:
+ case openaxiom_NewCommand_token:
fprintf(stderr, "scan_HyperDoc: Unexpected Macro Declaration\n");
break;
- case Lbrace:
+ case openaxiom_Lbrace_token:
number_of_left_braces++;
break;
- case Endpatch:
- case Rbrace:
+ case openaxiom_Endpatch_token:
+ case openaxiom_Rbrace_token:
number_of_left_braces--;
break;
default:
@@ -116,22 +116,22 @@ load_macro(MacroStore *macro)
init_scanner();
/** First thing I should do is make sure that the name is correct ***/
- get_expected_token(NewCommand);
- get_expected_token(Lbrace);
- get_expected_token(Macro);
+ get_expected_token(openaxiom_NewCommand_token);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Macro_token);
if (strcmp(token.id, macro->name)) {
/** WOW, Somehow I had the location of the wrong macro **/
fprintf(stderr, "Expected macro name %s got insted %s in load_macro\n",
macro->name, token.id);
longjmp(jmpbuf, 1);
}
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
/** Next I should check to see if I have any parameters **/
get_token();
- if (token.type == Lsquarebrace) {
+ if (token.type == openaxiom_Lsquarebrace_token) {
/** The person is telling me the number of macros he is going to use **/
- get_expected_token(Word);
+ get_expected_token(openaxiom_Word_token);
if (!number(token.id)) {
fprintf(stderr, "load_macro: Expected A Value Instead Got %s\n",
token.id);
@@ -144,7 +144,7 @@ load_macro(MacroStore *macro)
fprintf(stderr,
"The number of parameters is %d\n", macro->number_parameters);
#endif
- get_expected_token(Rsquarebrace);
+ get_expected_token(openaxiom_Rsquarebrace_token);
get_token();
}
else
@@ -152,7 +152,7 @@ load_macro(MacroStore *macro)
/*** Now I should be able to check the token, and insure that I have read
a leftbrace, then the string will follow ****/
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
/** The macro is not in a group, uh oh **/
fprintf(stderr, "load_macro:Expected a Left Brace got type %d\n",
token.type);
@@ -247,7 +247,7 @@ parse_macro(void)
MacroStore *macro;
int s;
- curr_node->type = Macro;
+ curr_node->type = openaxiom_Macro_token;
curr_node->space = token.id[-1];
curr_node->next = alloc_node();
curr_node = curr_node->next;
@@ -259,13 +259,13 @@ parse_macro(void)
parse_from_string(macro->macro_string);
if (gEndedPage) {
s = curr_node->type;
- curr_node->type = Endmacro;
+ curr_node->type = openaxiom_Endmacro_token;
curr_node->next = alloc_node();
curr_node = curr_node->next;
curr_node->type = s;
}
else
- curr_node->type = Endmacro;
+ curr_node->type = openaxiom_Endmacro_token;
if (pop_parameters())
return 1;
else {
@@ -302,7 +302,7 @@ get_parameter_strings(int number,char * macro_name)
}
for (count = 0; count < number; count++) {
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
/** The macro is not in a group, uh oh **/
fprintf(stderr, "Wrong number of arguments to the macro %s\n",
macro_name);
@@ -387,6 +387,6 @@ parse_parameters(void)
}
parse_from_string((parameters->list)[value - 1]);
- curr_node->type = Endparameter;
+ curr_node->type = openaxiom_Endparameter_token;
return;
}
diff --git a/src/hyper/mem.c b/src/hyper/mem.c
index 554b7ff2..e127ae3a 100644
--- a/src/hyper/mem.c
+++ b/src/hyper/mem.c
@@ -169,82 +169,82 @@ free_node(TextNode *node, short int des)
return;
switch (node->type) {
- case Paste:
+ case openaxiom_Paste_token:
free_pastearea(node, des);
free_node(node->next, des);
break;
- case Pastebutton:
+ case openaxiom_Pastebutton_token:
free_pastebutton(node, des);
free_node(node->next, des);
break;
- case Ifcond:
+ case openaxiom_Ifcond_token:
free_node(node->data.ifnode->cond, des);
free_node(node->data.ifnode->thennode, des);
free_node(node->data.ifnode->elsenode, des);
break;
- case Dash:
- case Lsquarebrace:
- case Word:
- case WindowId:
- case Punctuation:
- case Lbrace:
- case Rbrace:
- case SimpleBox:
- case Verbatim:
- case Math:
- case Spadsrctxt:
- case Spadsrc:
+ case openaxiom_Dash_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Word_token:
+ case openaxiom_WindowId_token:
+ case openaxiom_Punctuation_token:
+ case openaxiom_Lbrace_token:
+ case openaxiom_Rbrace_token:
+ case openaxiom_SimpleBox_token:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Math_token:
+ case openaxiom_Spadsrctxt_token:
+ case openaxiom_Spadsrc_token:
free_if_non_NULL(node->data.text);
free_node(node->next, des);
break;
- case Inputstring:
+ case openaxiom_Inputstring_token:
if (des)
delete_item(node->data.text);
free_if_non_NULL(node->data.text);
free_node(node->next, des);
break;
- case It:
- case Sl:
- case Tt:
- case Rm:
- case Emphasize:
- case Beep:
- case BoldFace:
- case Par:
- case Newline:
- case Horizontalline:
- case Item:
- case Beginscroll:
- case Endscroll:
- case Group:
- case Table:
- case Macro:
- case Pound:
- case Center:
- case Box:
- case Mbox:
- case Tableitem:
- case Scrollingnode:
- case Headernode:
- case Titlenode:
- case Footernode:
- case Controlbitmap:
- case Fi:
- case Description:
- case Rsquarebrace:
- case Endpaste:
- case Endpastebutton:
+ case openaxiom_It_token:
+ case openaxiom_Sl_token:
+ case openaxiom_Tt_token:
+ case openaxiom_Rm_token:
+ case openaxiom_Emphasize_token:
+ case openaxiom_Beep_token:
+ case openaxiom_BoldFace_token:
+ case openaxiom_Par_token:
+ case openaxiom_Newline_token:
+ case openaxiom_Horizontalline_token:
+ case openaxiom_Item_token:
+ case openaxiom_Beginscroll_token:
+ case openaxiom_Endscroll_token:
+ case openaxiom_Group_token:
+ case openaxiom_Table_token:
+ case openaxiom_Macro_token:
+ case openaxiom_Pound_token:
+ case openaxiom_Center_token:
+ case openaxiom_Box_token:
+ case openaxiom_Mbox_token:
+ case openaxiom_Tableitem_token:
+ case openaxiom_Scrollingnode_token:
+ case openaxiom_Headernode_token:
+ case openaxiom_Titlenode_token:
+ case openaxiom_Footernode_token:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Fi_token:
+ case openaxiom_Description_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Endpaste_token:
+ case openaxiom_Endpastebutton_token:
free_node(node->next, des);
break;
- case Inputbitmap:
- case Inputpixmap:
+ case openaxiom_Inputbitmap_token:
+ case openaxiom_Inputpixmap_token:
free_if_non_NULL(node->data.text);
free_node(node->next, des);
break;
- case Quitbutton:
- case Helpbutton:
- case Upbutton:
- case Returnbutton:
+ case openaxiom_Quitbutton_token:
+ case openaxiom_Helpbutton_token:
+ case openaxiom_Upbutton_token:
+ case openaxiom_Returnbutton_token:
if (des && node->link->win) {
hash_delete(gWindow->page->fLinkHashTable,(char *) &node->link->win);
XDestroyWindow(gXDisplay, node->link->win);
@@ -252,25 +252,25 @@ free_node(TextNode *node, short int des)
free_if_non_NULL(node->link);
free_node(node->next, des);
break;
- case Memolink:
- case Downlink:
- case Windowlink:
- case Link:
- case Lisplink:
- case Lispwindowlink:
- case Spadcall:
- case Spadcallquit:
- case LispMemoLink:
- case Lispcommand:
- case Lispcommandquit:
- case LispDownLink:
- case Unixlink:
- case Spadlink:
- case Spadmemolink:
- case Spaddownlink:
- case Unixcommand:
- case Spadcommand:
- case Spadgraph:
+ case openaxiom_Memolink_token:
+ case openaxiom_Downlink_token:
+ case openaxiom_Windowlink_token:
+ case openaxiom_Link_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Lispwindowlink_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_Unixlink_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Unixcommand_token:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
if (des && node->link->win) {
hash_delete(gWindow->page->fLinkHashTable,(char *) &node->link->win);
XDestroyWindow(gXDisplay, node->link->win);
@@ -280,49 +280,49 @@ free_node(TextNode *node, short int des)
free_if_non_NULL(node->link);
free_node(node->next, des);
break;
- case Free:
- case Indent:
- case Indentrel:
- case HSpace:
- case Space:
- case VSpace:
- case Button:
- case Bound:
- case Tab:
+ case openaxiom_Free_token:
+ case openaxiom_Indent_token:
+ case openaxiom_Indentrel_token:
+ case openaxiom_HSpace_token:
+ case openaxiom_Space_token:
+ case openaxiom_VSpace_token:
+ case openaxiom_Button_token:
+ case openaxiom_Bound_token:
+ case openaxiom_Tab_token:
free_node(node->next, des);
free_node(node->data.node, des);
break;
- case End:
- case Endcenter:
- case Endlink:
- case Endgroup:
- case Endbox:
- case Endmbox:
- case Endspadcommand:
- case Endpix:
- case Endmacro:
- case Endparameter:
- case Endtable:
- case Endtableitem:
- case Noop:
- case Endinputbox:
- case Enddescription:
- case Endif:
- case Endtitems:
- case Enditems:
- case Endverbatim:
- case Endmath:
- case Endspadsrc:
+ case openaxiom_End_token:
+ case openaxiom_Endcenter_token:
+ case openaxiom_Endlink_token:
+ case openaxiom_Endgroup_token:
+ case openaxiom_Endbox_token:
+ case openaxiom_Endmbox_token:
+ case openaxiom_Endspadcommand_token:
+ case openaxiom_Endpix_token:
+ case openaxiom_Endmacro_token:
+ case openaxiom_Endparameter_token:
+ case openaxiom_Endtable_token:
+ case openaxiom_Endtableitem_token:
+ case openaxiom_Noop_token:
+ case openaxiom_Endinputbox_token:
+ case openaxiom_Enddescription_token:
+ case openaxiom_Endif_token:
+ case openaxiom_Endtitems_token:
+ case openaxiom_Enditems_token:
+ case openaxiom_Endverbatim_token:
+ case openaxiom_Endmath_token:
+ case openaxiom_Endspadsrc_token:
free_node(node->next, des);
break;
- case Endheader:
- case Endtitle:
- case Endfooter:
- case Endscrolling:
- case Endarg:
+ case openaxiom_Endheader_token:
+ case openaxiom_Endtitle_token:
+ case openaxiom_Endfooter_token:
+ case openaxiom_Endscrolling_token:
+ case openaxiom_Endarg_token:
break;
- case Endbutton:
- case Beginitems:
+ case openaxiom_Endbutton_token:
+ case openaxiom_Beginitems_token:
free_if_non_NULL(node->data.text);
free_node(node->next, des);
break;
diff --git a/src/hyper/parse-aux.c b/src/hyper/parse-aux.c
index e6dd7e88..ac6008c7 100644
--- a/src/hyper/parse-aux.c
+++ b/src/hyper/parse-aux.c
@@ -227,7 +227,7 @@ read_ht_file(HashTable *page_hash, HashTable *macro_hash,
ungetc(c, db_fp);
get_token();
switch (token.type) {
- case Page:
+ case openaxiom_Page_token:
get_token();
/*
@@ -254,7 +254,7 @@ read_ht_file(HashTable *page_hash, HashTable *macro_hash,
hash_insert(page_hash, (char *)page, page->name);
pages++;
break;
- case NewCommand:
+ case openaxiom_NewCommand_token:
get_token();
macro = (MacroStore *) halloc(sizeof(MacroStore), "MacroStore");
macro->fpos.name = alloc_string(fullname);
@@ -278,7 +278,7 @@ read_ht_file(HashTable *page_hash, HashTable *macro_hash,
macro->loaded = 0;
hash_insert(macro_hash, (char *)macro, macro->name);
break;
- case Patch:
+ case openaxiom_Patch_token:
get_token();
patch = (PatchStore *) alloc_patchstore();
patch->fpos.name = alloc_string(fullname);
@@ -321,9 +321,9 @@ make_link_window(TextNode *link_node, int type, int isSubWin)
if (make_input_file)
switch (type) {
- case Downlink:
- case Memolink:
- case Windowlink:{
+ case openaxiom_Downlink_token:
+ case openaxiom_Memolink_token:
+ case openaxiom_Windowlink_token: {
char *name;
HyperDocPage *p;
@@ -375,7 +375,7 @@ make_paste_window(PasteNode *paste)
0, 0, 100, 100, 0,
0, InputOnly, CopyFromParent,
CWEventMask | CWCursor, &at);
- link->type = Pastebutton;
+ link->type = openaxiom_Pastebutton_token;
link->x = link->y = 0;
link->reference.paste = paste;
hash_insert(gLinkHashTable, (char *)link,(char *) &link->win);
@@ -409,11 +409,16 @@ make_special_page(int type, char *name)
void
make_special_pages(HashTable *pageHashTable)
{
- hash_insert(pageHashTable, (char *)make_special_page(Quitbutton, "QuitPage"),
+ hash_insert(pageHashTable,
+ (char *)make_special_page(openaxiom_Quitbutton_token,
+ "QuitPage"),
"QuitPage");
- hash_insert(pageHashTable, (char *)make_special_page(Returnbutton, "ReturnPage"),
+ hash_insert(pageHashTable,
+ (char *)make_special_page(openaxiom_Returnbutton_token,
+ "ReturnPage"),
"ReturnPage");
- hash_insert(pageHashTable, (char *)make_special_page(Upbutton, "UpPage"),
+ hash_insert(pageHashTable,
+ (char *)make_special_page(openaxiom_Upbutton_token, "UpPage"),
"UpPage");
}
@@ -434,12 +439,12 @@ add_dependencies(void)
print_page_and_filename();
exit(-1);
}
- curr_node->type = Bound;
+ curr_node->type = openaxiom_Bound_token;
curr_node->data.node = alloc_node();
curr_node = curr_node->data.node;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endarg;
+ curr_node->type = openaxiom_Endarg_token;
curr_node = bound_node;
if (gPageBeingParsed->depend_hash == NULL) {
@@ -451,8 +456,10 @@ add_dependencies(void)
(EqualFunction) string_equal,
(HashcodeFunction) string_hash);
}
- for (node = bound_node->data.node; node->type != Endarg; node = node->next) {
- if (node->type == Word) {
+ for (node = bound_node->data.node;
+ node->type != openaxiom_Endarg_token;
+ node = node->next) {
+ if (node->type == openaxiom_Word_token) {
depend = (SpadcomDepend *) halloc(sizeof(SpadcomDepend), "SpadcomDepend");
depend->label = alloc_string(node->data.text);
depend->spadcom = cur_spadcom;
@@ -538,7 +545,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;
seen_white = 0;
break;
@@ -557,7 +564,7 @@ get_input_string(void)
string_node = alloc_node();
curr_node = string_node;
parse_HyperDoc();
- curr_node->type = Endarg;
+ curr_node->type = openaxiom_Endarg_token;
/* Once here we print to string to get the actual name */
string = print_to_string(string_node);
@@ -576,18 +583,18 @@ get_where(void)
int tw;
get_token();
- if (token.type != Word)
+ if (token.type != openaxiom_Word_token)
return -1;
/* Now try to determine if it is a good type */
if (!strcmp(token.id, "lisp")) {
- tw = FromSpadSocket;
+ tw = openaxiom_FromSpadSocket_input;
}
else if (!strcmp(token.id, "unix")) {
- tw = FromUnixFD;
+ tw = openaxiom_FromUnixFD_input;
}
else if (!strcmp(token.id, "ht")) {
- tw = FromFile;
+ tw = openaxiom_FromFile_input;
}
else {
return -1;
@@ -595,7 +602,7 @@ get_where(void)
/* now check to see if I got a closing square brace */
get_token();
- if (token.type != Rsquarebrace)
+ if (token.type != openaxiom_Rsquarebrace_token)
return -1;
return tw;
diff --git a/src/hyper/parse-input.c b/src/hyper/parse-input.c
index af7173da..8eadc5ac 100644
--- a/src/hyper/parse-input.c
+++ b/src/hyper/parse-input.c
@@ -74,7 +74,7 @@ make_input_window(InputItem * item)
0, InputOutput, CopyFromParent,
CWCursor | CWBackPixel | CWBorderPixel, &at);
XSelectInput(gXDisplay, link->win, ButtonPressMask);
- link->type = Inputstring;
+ link->type = openaxiom_Inputstring_token;
link->x = link->y = 0;
/** This way when I click in an input window, I need only use reference
to get a pointer to the item ***/
@@ -177,13 +177,13 @@ parse_inputstring(void)
/* first get the name */
input_node->type = token.type;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
name = get_input_string();
input_node->data.text = alloc_string(name);
/* now get the width */
- get_expected_token(Lbrace);
- get_expected_token(Word);
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Word_token);
+ get_expected_token(openaxiom_Rbrace_token);
size = atoi(token.id);
if (size < 0) {
fprintf(stderr, "Illegal size in Input string\n");
@@ -191,7 +191,7 @@ parse_inputstring(void)
}
/* get the default value */
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
default_value = get_input_string();
/** now I need to malloc space for the input stuff **/
@@ -230,13 +230,13 @@ parse_simplebox(void)
gStringValueOk = 0;
/* set the type and space fields */
- input_box->type = SimpleBox;
+ input_box->type = openaxiom_SimpleBox_token;
input_box->space = token.id[-1];
/* IS it selected? */
get_token();
- if (token.type == Lsquarebrace) {
- get_expected_token(Word);
+ if (token.type == openaxiom_Lsquarebrace_token) {
+ get_expected_token(openaxiom_Word_token);
if (!is_number(token.id)) {
fprintf(stderr,
"parse_simple_box: Expected a value not %s\n", token.id);
@@ -252,11 +252,11 @@ parse_simplebox(void)
print_page_and_filename();
jump();
}
- get_expected_token(Rsquarebrace);
+ get_expected_token(openaxiom_Rsquarebrace_token);
get_token();
}
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "parse_inputbox was expecting a { not a %s\n", ebuffer);
print_page_and_filename();
@@ -276,11 +276,11 @@ parse_simplebox(void)
box->picked = picked;
/* Get the filename for the selected and unselected bitmaps */
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
filename = get_input_string();
if (!make_input_file)
box->selected = insert_image_struct(filename);
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
filename = get_input_string();
if (!make_input_file) {
box->unselected = insert_image_struct(filename);
@@ -288,7 +288,7 @@ parse_simplebox(void)
input_box->height = max(box->selected->height, box->unselected->height);
input_box->width = max(box->selected->width, box->unselected->width);
/* Make the window and stuff */
- input_box->link = make_box_window(box, SimpleBox);
+ input_box->link = make_box_window(box, openaxiom_SimpleBox_token);
box->win = input_box->link->win;
/* Now add the box to the box_has table for this window */
@@ -321,13 +321,13 @@ parse_radiobox(void)
gStringValueOk = 0;
/* set the type and space fields */
- input_box->type = Radiobox;
+ input_box->type = openaxiom_Radiobox_token;
input_box->space = token.id[-1];
/* IS it selected? */
get_token();
- if (token.type == Lsquarebrace) {
- get_expected_token(Word);
+ if (token.type == openaxiom_Lsquarebrace_token) {
+ get_expected_token(openaxiom_Word_token);
if (!is_number(token.id)) {
fprintf(stderr,
"parse_simple_box: Expected a value not %s\n", token.id);
@@ -343,11 +343,11 @@ parse_radiobox(void)
print_page_and_filename();
jump();
}
- get_expected_token(Rsquarebrace);
+ get_expected_token(openaxiom_Rsquarebrace_token);
get_token();
}
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "parse_inputbox was expecting a { not a %s\n", ebuffer);
print_page_and_filename();
@@ -368,7 +368,7 @@ parse_radiobox(void)
/* Now what I need to do is get the group name */
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "parse_inputbox was expecting a { not a %s\n", ebuffer);
print_page_and_filename();
@@ -385,7 +385,7 @@ parse_radiobox(void)
input_box->width = box->rbs->width;
input_box->height = box->rbs->height;
/* Make the window and stuff */
- input_box->link = make_box_window(box, Radiobox);
+ input_box->link = make_box_window(box, openaxiom_Radiobox_token);
if (!make_input_file)
box->win = input_box->link->win; /* TTT */
@@ -547,12 +547,12 @@ parse_radioboxes(void)
char *fname;
/* I really don't need this node, it just sets up some parsing stuff */
- return_node->type = Noop;
+ return_node->type = openaxiom_Noop_token;
newrb = alloc_rbs();
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "\\radioboxes was expecting a name not %s\n", ebuffer);
print_page_and_filename();
@@ -571,7 +571,7 @@ parse_radioboxes(void)
}
/* now I have to get the selected and unslected bitmaps */
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "\\radioboxes was expecting a name not %s\n", ebuffer);
print_page_and_filename();
@@ -582,7 +582,7 @@ parse_radioboxes(void)
newrb->selected = insert_image_struct(fname);
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "\\radioboxes was expecting a name not %s\n", ebuffer);
print_page_and_filename();
diff --git a/src/hyper/parse-paste.c b/src/hyper/parse-paste.c
index 0523c70e..7789565b 100644
--- a/src/hyper/parse-paste.c
+++ b/src/hyper/parse-paste.c
@@ -75,14 +75,14 @@ parse_paste(void)
/* now I need to get the name */
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
fprintf(stderr, "(HyperDoc) A paste area needs a name:\n");
print_next_ten_tokens();
print_page_and_filename();
jump();
}
pn->data.text = alloc_string(get_input_string());
- pn->type = Paste;
+ pn->type = openaxiom_Paste_token;
/*
* now see if there is already an entry in the hash_table for this thing,
@@ -101,7 +101,7 @@ parse_paste(void)
paste->haspaste = 1;
paste->paste_item = current_item();
get_token();
- if (token.type == Lsquarebrace) {
+ if (token.type == openaxiom_Lsquarebrace_token) {
/* user wishes to specify a where to send the command */
where = get_where();
if (where == -1) {
@@ -116,10 +116,10 @@ parse_paste(void)
get_token();
}
else
- paste->where = FromFile;
+ paste->where = openaxiom_FromFile_input;
/* now try to get the command argument or page name */
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
paste->where = 0;
fprintf(stderr, "(HyperDoc) \\begin{paste} was expecting an argument\n");
print_next_ten_tokens();
@@ -129,7 +129,7 @@ parse_paste(void)
paste->arg_node = alloc_node();
curr_node = paste->arg_node;
parse_HyperDoc();
- curr_node->type = Endarg;
+ curr_node->type = openaxiom_Endarg_token;
gWindow->fDisplayedWindow = gWindow->fScrollWindow;
@@ -137,7 +137,7 @@ parse_paste(void)
pn->next = alloc_node();
curr_node = pn->next;
parse_HyperDoc();
- curr_node->type = Endpaste;
+ curr_node->type = openaxiom_Endpaste_token;
paste->end_node = curr_node;
paste->begin_node = pn;
@@ -155,11 +155,11 @@ parse_pastebutton(void)
* \pastebutton{name}
*/
pb = curr_node;
- pb->type = Pastebutton;
+ pb->type = openaxiom_Pastebutton_token;
/* first thing I should do is get the name */
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
fprintf(stderr, "(HyperDoc) \\pastebutton needs a name\n");
print_page_and_filename();
print_next_ten_tokens();
@@ -186,7 +186,7 @@ parse_pastebutton(void)
/* Now we need to parse the HyperDoc and for the displayed text */
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
fprintf(stderr, "(HyperDoc) \\pastebutton was expecting a { \n");
print_page_and_filename();
print_next_ten_tokens();
@@ -195,7 +195,7 @@ parse_pastebutton(void)
pb->next = alloc_node();
curr_node = pb->next;
parse_HyperDoc();
- curr_node->type = Endpastebutton;
+ curr_node->type = openaxiom_Endpastebutton_token;
/* once that is done I need only make the window for this link */
pb->link = make_paste_window(paste);
@@ -236,7 +236,7 @@ parse_patch(PasteNode *paste)
/* now read the new stuff and add it in between all this stuff */
switch (where) {
- case FromFile:
+ case openaxiom_FromFile_input:
patch_name = print_to_string(arg_node);
patch = (PatchStore *) hash_find(gWindow->fPatchHashTable, patch_name);
if (!patch) {
@@ -246,11 +246,11 @@ parse_patch(PasteNode *paste)
}
if (!patch->loaded)
load_patch(patch);
- input_type = FromString;
+ input_type = openaxiom_FromString_input;
input_string = patch->string;
break;
- case FromSpadSocket:
- input_type = FromSpadSocket;
+ case openaxiom_FromSpadSocket_input:
+ input_type = openaxiom_FromSpadSocket_input;
ret_value = issue_serverpaste(arg_node);
if (ret_value < 0) {
paste->where = where;
@@ -262,8 +262,8 @@ parse_patch(PasteNode *paste)
return 0;
}
break;
- case FromUnixFD:
- input_type = FromUnixFD;
+ case openaxiom_FromUnixFD_input:
+ input_type = openaxiom_FromUnixFD_input;
issue_unixpaste(arg_node);
break;
default:
@@ -294,14 +294,14 @@ parse_patch(PasteNode *paste)
init_parse_patch(gWindow->page);
init_paste_item(paste_item);
get_token();
- if (token.type != Patch) {
+ if (token.type != openaxiom_Patch_token) {
fprintf(stderr, "(HyperDoc) Pastebutton %s was expecting a patch\n",
paste->name);
jump();
}
- if (input_type == FromString) {
+ if (input_type == openaxiom_FromString_input) {
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "(HyperDoc) Unexpected %s \n", ebuffer);
print_page_and_filename();
@@ -309,7 +309,7 @@ parse_patch(PasteNode *paste)
}
get_token();
- if (token.type != Word) {
+ if (token.type != openaxiom_Word_token) {
token_name(token.type);
fprintf(stderr, "(HyperDoc) Unexpected %s \n", ebuffer);
print_page_and_filename();
@@ -317,7 +317,7 @@ parse_patch(PasteNode *paste)
}
get_token();
- if (token.type != Rbrace) {
+ if (token.type != openaxiom_Rbrace_token) {
token_name(token.type);
fprintf(stderr, "(HyperDoc) Unexpected %s \n", ebuffer);
print_page_and_filename();
@@ -329,10 +329,10 @@ parse_patch(PasteNode *paste)
parse_HyperDoc();
/* Once I am back, I need only reallign all the text structures */
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
curr_node->next = next_node;
begin_node->next = new;
- begin_node->type = Noop;
+ begin_node->type = openaxiom_Noop_token;
free(begin_node->data.text);
begin_node->data.text = 0;
@@ -362,16 +362,16 @@ load_patch(PatchStore *patch)
/** First thing I should do is make sure that the name is correct ***/
start_fpos = fpos;
- get_expected_token(Patch);
- get_expected_token(Lbrace);
- get_expected_token(Word);
+ get_expected_token(openaxiom_Patch_token);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Word_token);
if (strcmp(token.id, patch->name)) {
/** WOW, Somehow I had the location of the wrong macro **/
fprintf(stderr, "(HyperDoc) Expected patch name %s: got instead %s in load_patch\n",
patch->name, token.id);
jump();
}
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
scan_HyperDoc();
fseek(cfile, patch->fpos.pos + start_fpos, 0);
diff --git a/src/hyper/parse-types.c b/src/hyper/parse-types.c
index 503aff3b..68382d83 100644
--- a/src/hyper/parse-types.c
+++ b/src/hyper/parse-types.c
@@ -109,14 +109,14 @@ parse_ifcond(void)
* <hypertext> fi
*/
if (gInIf) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "\\if found within \\if \n");
longjmp(jmpbuf, 1);
fprintf(stderr, "Longjump failed, Exiting\n");
exit(-1);
}
gInIf++;
- curr_node->type = Ifcond;
+ curr_node->type = openaxiom_Ifcond_token;
curr_node->space = token.id[-1];
curr_node->data.ifnode = alloc_ifnode();
/* Now get the cond node I hope */
@@ -126,36 +126,36 @@ parse_ifcond(void)
parse_condnode();
endif = alloc_node();
- endif->type = Endif;
+ endif->type = openaxiom_Endif_token;
ifnode->data.ifnode->thennode = alloc_node();
curr_node = ifnode->data.ifnode->thennode;
parse_HyperDoc();
- if (token.type == Fi) {
- curr_node->type = Fi;
+ if (token.type == openaxiom_Fi_token) {
+ curr_node->type = openaxiom_Fi_token;
curr_node->next = endif;
ifnode->data.ifnode->elsenode = endif;
}
- else if (token.type == Else) {
+ else if (token.type == openaxiom_Else_token) {
/* first finish up the then part */
- curr_node->type = Fi;
+ curr_node->type = openaxiom_Fi_token;
curr_node->next = endif;
/* the go and parse the else part */
ifnode->data.ifnode->elsenode = alloc_node();
curr_node = ifnode->data.ifnode->elsenode;
parse_HyperDoc();
- if (token.type != Fi) {
+ if (token.type != openaxiom_Fi_token) {
token_name(token.type);
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "Expected a \\fi not a %s", ebuffer);
longjmp(jmpbuf, 1);
fprintf(stderr, "Longjump failed, Exiting\n");
exit(-1);
}
- curr_node->type = Fi;
+ curr_node->type = openaxiom_Fi_token;
curr_node->next = endif;
}
else {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
token_name(token.type);
fprintf(stderr, "Expected a \\fi not a %s", ebuffer);
longjmp(jmpbuf, 1);
@@ -174,21 +174,21 @@ parse_condnode(void)
get_token();
switch (token.type) {
- case Cond:
- curr_node->type = Cond;
+ case openaxiom_Cond_token:
+ curr_node->type = openaxiom_Cond_token;
curr_node->data.text = alloc_string(token.id);
break;
- case Haslisp:
- case Hasreturn:
- case Lastwindow:
- case Hasup:
+ case openaxiom_Haslisp_token:
+ case openaxiom_Hasreturn_token:
+ case openaxiom_Lastwindow_token:
+ case openaxiom_Hasup_token:
curr_node->type = token.type;
break;
- case Boxcond:
- curr_node->type = Boxcond;
+ case openaxiom_Boxcond_token:
+ curr_node->type = openaxiom_Boxcond_token;
curr_node->data.text = alloc_string(token.id);
break;
- case Hasreturnto:
+ case openaxiom_Hasreturnto_token:
parse_hasreturnto();
break;
default:
@@ -207,11 +207,11 @@ parse_hasreturnto(void)
{
TextNode *hrt = curr_node, *arg_node = alloc_node();
- curr_node->type = Hasreturnto;
+ curr_node->type = openaxiom_Hasreturnto_token;
curr_node = arg_node;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endarg;
+ curr_node->type = openaxiom_Endarg_token;
hrt->data.node = arg_node;
curr_node = hrt;
}
@@ -221,12 +221,12 @@ parse_newcond(void)
{
char label[256];
- get_expected_token(Lbrace);
- get_expected_token(Unkeyword);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Unkeyword_token);
strcpy(label, token.id);
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
insert_cond(label, "0");
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
}
void
@@ -234,16 +234,16 @@ parse_setcond(void)
{
char label[256], cond[256];
- get_expected_token(Lbrace);
- get_expected_token(Cond);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Cond_token);
strcpy(label, token.id);
- get_expected_token(Rbrace);
- get_expected_token(Lbrace);
- get_expected_token(Word);
+ get_expected_token(openaxiom_Rbrace_token);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Word_token);
strcpy(cond, token.id);
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
change_cond(label, cond);
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
}
void
@@ -258,14 +258,14 @@ parse_begin_items(void)
bi->type = token.type;
get_token();
- if (token.type == Lsquarebrace) {
+ if (token.type == openaxiom_Lsquarebrace_token) {
bi->data.node = alloc_node();
curr_node = bi->data.node;
gInOptional++;
parse_HyperDoc();
gInOptional--;
- curr_node->type = Enddescription;
- if (token.type != Rsquarebrace) {
+ curr_node->type = openaxiom_Enddescription_token;
+ if (token.type != openaxiom_Rsquarebrace_token) {
fprintf(stderr, "(HyperDoc) Optional arguments must end with ].\n");
print_next_ten_tokens();
print_page_and_filename();
@@ -287,20 +287,20 @@ parse_item(void)
print_next_ten_tokens();
jump();
}
- curr_node->type = Item;
+ curr_node->type = openaxiom_Item_token;
get_token();
- if (token.type == Lsquarebrace) {
+ if (token.type == openaxiom_Lsquarebrace_token) {
/* I should parse the optional argument */
curr_node->next = alloc_node();
curr_node = curr_node->next;
- curr_node->type = Description;
+ curr_node->type = openaxiom_Description_token;
curr_node->next = alloc_node();
curr_node = curr_node->next;
gInOptional++;
parse_HyperDoc();
gInOptional--;
- curr_node->type = Enddescription;
- if (token.type != Rsquarebrace) {
+ curr_node->type = openaxiom_Enddescription_token;
+ if (token.type != openaxiom_Rsquarebrace_token) {
fprintf(stderr, "(HyperDoc) Optional arguments must end with ].\n");
print_next_ten_tokens();
print_page_and_filename();
@@ -321,7 +321,7 @@ parse_mitem(void)
print_next_ten_tokens();
jump();
}
- curr_node->type = Mitem;
+ curr_node->type = openaxiom_Mitem_token;
}
char *vbuf = NULL;
@@ -340,7 +340,7 @@ int vbuf_size = 0;
curr_node->data.text = alloc_string(vbuf); \
curr_node->next = alloc_node(); \
curr_node = curr_node->next; \
- curr_node->type = Newline; \
+ curr_node->type = openaxiom_Newline_token; \
curr_node->next = alloc_node(); \
curr_node = curr_node->next; \
curr_node->type = type; \
@@ -358,10 +358,10 @@ parse_verbatim(int type)
curr_node->type = type;
if (token.id[-1])
curr_node->space = 1;
- if (type == Spadsrctxt) {
+ if (type == openaxiom_Spadsrctxt_token) {
es = end_string = "\n\\end{spadsrc}";
}
- else if (type == Math)
+ else if (type == openaxiom_Math_token)
es = end_string = "$";
else
es = end_string = "\\end{verbatim}";
@@ -393,12 +393,12 @@ parse_verbatim(int type)
curr_node->next = alloc_node();
curr_node = curr_node->next;
}
- if (type == Spadsrctxt)
- curr_node->type = Endspadsrc;
- else if (type == Math)
- curr_node->type = Endmath;
+ if (type == openaxiom_Spadsrctxt_token)
+ curr_node->type = openaxiom_Endspadsrc_token;
+ else if (type == openaxiom_Math_token)
+ curr_node->type = openaxiom_Endmath_token;
else
- curr_node->type = Endverbatim;
+ curr_node->type = openaxiom_Endverbatim_token;
}
void
@@ -411,16 +411,16 @@ parse_input_pix(void)
pixnode->type = token.type;
pixnode->space = token.id[-1];
pixnode->width = -1;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
filename = get_input_string();
pixnode->data.text = alloc_string(filename);
curr_node = pixnode;
- if (pixnode->type == Inputimage) {
+ if (pixnode->type == openaxiom_Inputimage_token) {
char f[256];
char *p;
if ((gXDisplay && DisplayPlanes(gXDisplay, gXScreenNumber) == 1) || gSwitch_to_mono ==1) {
- pixnode->type = Inputbitmap;
+ pixnode->type = openaxiom_Inputbitmap_token;
strcpy(f, pixnode->data.text);
strcat(f, ".bm");
p=pixnode->data.text;
@@ -428,7 +428,7 @@ parse_input_pix(void)
free(p);
}
else {
- pixnode->type = Inputpixmap;
+ pixnode->type = openaxiom_Inputpixmap_token;
strcpy(f, pixnode->data.text);
#ifdef OLD
strcat(f, ".pm");
@@ -449,16 +449,16 @@ parse_centerline(void)
curr_node->width = -1;
curr_node->next = alloc_node();
curr_node = curr_node->next;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- if (token.type != Rbrace) {
- curr_node->type = Noop;
+ if (token.type != openaxiom_Rbrace_token) {
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "(HyperdDoc) \\centerline was expecting a }\n");
print_page_and_filename();
print_next_ten_tokens();
longjmp(jmpbuf, 1);
}
- curr_node->type = Endcenter;
+ curr_node->type = openaxiom_Endcenter_token;
}
void
@@ -468,7 +468,7 @@ parse_command(void)
gInButton++;
if (gParserMode == SimpleMode) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "Parser Error token %s unexpected\n",
token_table[token.type]);
longjmp(jmpbuf, 1);
@@ -483,15 +483,15 @@ parse_command(void)
link_node = curr_node;
curr_node->next = alloc_node();
curr_node = curr_node->next;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endbutton;
+ curr_node->type = openaxiom_Endbutton_token;
save_node = curr_node;
arg_node = alloc_node();
curr_node = arg_node;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endarg;
+ curr_node->type = openaxiom_Endarg_token;
link_node->link = make_link_window(arg_node, link_node->type, 0);
gStringValueOk = 0;
curr_node = save_node;
@@ -505,7 +505,7 @@ parse_button(void)
gInButton++;
if (gParserMode == SimpleMode) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "Parser Error token %s unexpected\n",
token_table[token.type]);
longjmp(jmpbuf, 1);
@@ -520,17 +520,17 @@ parse_button(void)
/* then parse the label */
curr_node->next = alloc_node();
curr_node = curr_node->next;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endbutton;
+ curr_node->type = openaxiom_Endbutton_token;
/* now try to get the argument node */
save_node = curr_node;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
save_node->data.node = alloc_node();
curr_node = save_node->data.node;
parse_HyperDoc();
- curr_node->type = Endarg;
+ curr_node->type = openaxiom_Endarg_token;
/*
* buffer[0] = '\0'; print_to_string(arg_node, buffer + 1);
@@ -552,13 +552,13 @@ parse_spadcommand(TextNode *spad_node)
gInButton++;
spad_node->type = token.type;
spad_node->space = token.id[-1];
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
cur_spadcom = curr_node;
spad_node->next = alloc_node();
curr_node = spad_node->next;
parse_HyperDoc();
- curr_node->type = Endspadcommand;
+ curr_node->type = openaxiom_Endspadcommand_token;
cur_spadcom = NULL;
spad_node->link = make_link_window(spad_node->next, spad_node->type, 1);
gInButton--;
@@ -574,7 +574,7 @@ parse_spadsrc(TextNode *spad_node)
example_number++;
gInButton++;
gInSpadsrc++;
- spad_node->type = Spadsrc;
+ spad_node->type = openaxiom_Spadsrc_token;
spad_node->space = token.id[-1];
cur_spadcom = curr_node;
@@ -591,12 +591,13 @@ parse_spadsrc(TextNode *spad_node)
start_opts = 1;
} while (ch != '\n');
*c = '\0';
- parse_verbatim(Spadsrctxt);
+ parse_verbatim(openaxiom_Spadsrctxt_token);
parse_from_string(buf);
- curr_node->type = Endspadsrc;
+ curr_node->type = openaxiom_Endspadsrc_token;
cur_spadcom = NULL;
- spad_node->link = make_link_window(spad_node->next, Spadsrc, 1);
+ spad_node->link = make_link_window(spad_node->next,
+ openaxiom_Spadsrc_token, 1);
gInButton--;
gInSpadsrc--;
}
@@ -609,8 +610,8 @@ parse_env(TextNode *node)
char *buff_pntr = &buff[1];
int noEnv = 0;
- get_expected_token(Lbrace);
- get_expected_token(Word);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Word_token);
env = getenv(token.id);
if (env == NULL) {
@@ -631,9 +632,9 @@ parse_env(TextNode *node)
free(env);
node->data.text = alloc_string(buff_pntr);
- node->type = Word;
+ node->type = openaxiom_Word_token;
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
}
/*
@@ -651,9 +652,9 @@ parse_value1(void)
curr_node->space = token.id[-1];
value_node = alloc_node();
- value_node->type = Word;
+ value_node->type = openaxiom_Word_token;
curr_node->data.node = value_node;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
s = get_input_string();
if (!is_number(s)) {
fprintf(stderr,
@@ -681,9 +682,9 @@ parse_value2(void)
curr_node->space = token.id[-1];
value_node = alloc_node();
- value_node->type = Word;
+ value_node->type = openaxiom_Word_token;
curr_node->data.node = value_node;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
s = get_input_string();
if (!is_number(s)) {
fprintf(stderr,
@@ -705,32 +706,32 @@ parse_table(void)
TextNode *tn = curr_node;
if (gParserMode != AllMode) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "Parser Error token %s unexpected\n",
token_table[token.type]);
longjmp(jmpbuf, 1);
}
- curr_node->type = Table;
- get_expected_token(Lbrace);
+ curr_node->type = openaxiom_Table_token;
+ get_expected_token(openaxiom_Lbrace_token);
curr_node->next = alloc_node();
curr_node = curr_node->next;
get_token();
- if (token.type == Lbrace) {
- while (token.type != Rbrace) {
- curr_node->type = Tableitem;
+ if (token.type == openaxiom_Lbrace_token) {
+ while (token.type != openaxiom_Rbrace_token) {
+ curr_node->type = openaxiom_Tableitem_token;
curr_node->next = alloc_node();
curr_node = curr_node->next;
parse_HyperDoc();
- curr_node->type = Endtableitem;
+ curr_node->type = openaxiom_Endtableitem_token;
curr_node->next = alloc_node();
curr_node = curr_node->next;
get_token();
}
- curr_node->type = Endtable;
+ curr_node->type = openaxiom_Endtable_token;
}
else { /* a patch for SG for empty tables */
- if (token.type != Rbrace) {
+ if (token.type != openaxiom_Rbrace_token) {
token_name(token.type);
fprintf(stderr,
"Unexpected Token %s found while parsing a table\n",
@@ -738,7 +739,7 @@ parse_table(void)
print_page_and_filename();
jump();
}
- tn->type = Noop;
+ tn->type = openaxiom_Noop_token;
tn->next = NULL;
free(curr_node);
curr_node = tn;
@@ -753,9 +754,9 @@ parse_box(void)
curr_node->width = -1;
curr_node->next = alloc_node();
curr_node = curr_node->next;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endbox;
+ curr_node->type = openaxiom_Endbox_token;
}
void
@@ -766,9 +767,9 @@ parse_mbox(void)
curr_node->width = -1;
curr_node->next = alloc_node();
curr_node = curr_node->next;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endbox;
+ curr_node->type = openaxiom_Endbox_token;
}
void
@@ -781,18 +782,18 @@ parse_free(void)
curr_node->width = -1;
curr_node->data.node = alloc_node();
curr_node = curr_node->data.node;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
parse_HyperDoc();
- curr_node->type = Endarg;
+ curr_node->type = openaxiom_Endarg_token;
curr_node = free_node;
}
void
parse_help(void)
{
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
get_token();
- if (token.type != Lbrace) {
+ if (token.type != openaxiom_Lbrace_token) {
token_name(token.type);
fprintf(stderr, "\\helppage was expecting a { and not a %s\n", ebuffer);
print_page_and_filename();
@@ -803,7 +804,7 @@ parse_help(void)
free(gPageBeingParsed->helppage);
gPageBeingParsed->helppage = alloc_string(get_input_string());
- if (token.type != Rbrace) {
+ if (token.type != openaxiom_Rbrace_token) {
token_name(token.type);
fprintf(stderr, "\\helppage was expecting a } and not a %s\n",
ebuffer);
diff --git a/src/hyper/parse.c b/src/hyper/parse.c
index 25201fe5..bd3ec318 100644
--- a/src/hyper/parse.c
+++ b/src/hyper/parse.c
@@ -225,7 +225,7 @@ parse_from_string(char *str)
last_ch = NoChar;
last_token = 0;
input_string = str;
- input_type = FromString;
+ input_type = openaxiom_FromString_input;
parse_HyperDoc();
restore_scanner_state();
}
@@ -237,20 +237,20 @@ parse_title(HyperDocPage *page)
Push_MR();
gParserRegion = Title;
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
node = alloc_node();
page->title = node;
- node->type = Titlenode;
+ node->type = openaxiom_Titlenode_token;
node->next = alloc_node();
node = node->next;
- node->type = Center;
+ node->type = openaxiom_Center_token;
node->next = alloc_node();
curr_node = node->next;
parse_HyperDoc();
- curr_node->type = Endcenter;
+ curr_node->type = openaxiom_Endcenter_token;
curr_node->next = alloc_node();
curr_node = curr_node->next;
- curr_node->type = Endtitle;
+ curr_node->type = openaxiom_Endtitle_token;
curr_node->next = NULL;
if (gNeedIconName) {
char *title = print_to_string(page->title);
@@ -258,7 +258,7 @@ parse_title(HyperDocPage *page)
XSetIconName(gXDisplay, gWindow->fMainWindow, title);
gNeedIconName = 0;
}
- if (token.type != Rbrace) {
+ if (token.type != openaxiom_Rbrace_token) {
fprintf(stderr, "(HyperDoc) Parse title was expecting a closing brace\n");
print_page_and_filename();
jump();
@@ -276,7 +276,7 @@ parse_header(HyperDocPage *page)
gParserRegion = Header;
node = alloc_node();
page->header = node;
- node->type = Headernode;
+ node->type = openaxiom_Headernode_token;
node->next = alloc_node();
curr_node = node->next;
parse_HyperDoc();
@@ -330,7 +330,10 @@ init_parse_patch(HyperDocPage *page)
gPageBeingParsed = page;
}
-#define end_page(t) ((t == Page || t == NewCommand ||t == Endpage)?1:0)
+#define end_page(t) \
+ ((t == openaxiom_Page_token \
+ || t == openaxiom_NewCommand_token \
+ ||t == openaxiom_Endpage_token) ? 1 : 0)
static void
parse_page(HyperDocPage *page)
@@ -339,12 +342,12 @@ parse_page(HyperDocPage *page)
/* Get the name of the page */
- get_expected_token(Page);
- get_expected_token(Lbrace);
- get_expected_token(Word);
+ get_expected_token(openaxiom_Page_token);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Word_token);
if (page->name == NULL)
page->name = alloc_string(token.id);
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
/* parse the title */
gWindow->fDisplayedWindow = gWindow->fMainWindow;
parse_title(page);
@@ -377,122 +380,122 @@ parse_HyperDoc(void)
return;
switch (token.type) {
- case Spadsrc:
+ case openaxiom_Spadsrc_token:
parse_spadsrc(curr_node);
break;
- case Helppage:
+ case openaxiom_Helppage_token:
parse_help();
break;
- case Endpatch:
- case Endpaste:
- case Rbrace:
+ case openaxiom_Endpatch_token:
+ case openaxiom_Endpaste_token:
+ case openaxiom_Rbrace_token:
return;
- case Paste:
+ case openaxiom_Paste_token:
parse_paste();
break;
- case Pastebutton:
+ case openaxiom_Pastebutton_token:
parse_pastebutton();
break;
- case Endpage:
- case NewCommand:
- case Page:
+ case openaxiom_Endpage_token:
+ case openaxiom_NewCommand_token:
+ case openaxiom_Page_token:
end_a_page();
return;
- case EndScroll:
- token.type = Endscroll;
- case Endscroll:
+ case openaxiom_EndScroll_token:
+ token.type = openaxiom_Endscroll_token;
+ case openaxiom_Endscroll_token:
start_footer();
break;
- case Beginscroll:
+ case openaxiom_Beginscroll_token:
start_scrolling();
break;
- case Thispage: /* it really is just a word */
- curr_node->type = Word;
+ case openaxiom_Thispage_token: /* it really is just a word */
+ curr_node->type = openaxiom_Word_token;
curr_node->data.text = alloc_string(gPageBeingParsed->name);
break;
- case Icorrection:
- node->type = Noop;
+ case openaxiom_Icorrection_token:
+ node->type = openaxiom_Noop_token;
break;
- case Newcond:
+ case openaxiom_Newcond_token:
parse_newcond();
break;
- case Setcond:
+ case openaxiom_Setcond_token:
parse_setcond();
break;
- case Dollar:
- parse_verbatim(Math);
+ case openaxiom_Dollar_token:
+ parse_verbatim(openaxiom_Math_token);
break;
- case Verbatim:
- parse_verbatim(Verbatim);
+ case openaxiom_Verbatim_token:
+ parse_verbatim(openaxiom_Verbatim_token);
break;
- case Ifcond:
+ case openaxiom_Ifcond_token:
parse_ifcond();
break;
- case Fi:
+ case openaxiom_Fi_token:
if (gInIf)
return;
else {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
/* Oops I had a problem parsing this puppy */
fprintf(stderr, "(HyperDoc) \\fi found without macthing if?\n");
longjmp(jmpbuf, 1);
fprintf(stderr, "(HyperDoc) Longjmp failed -- Exiting \n");
exit(-1);
}
- case Else:
+ case openaxiom_Else_token:
if (gInIf)
return;
else {
/* Oops I had a problem parsing this puppy */
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "(HyperDoc) \\else found without macthing if?\n");
longjmp(jmpbuf, 1);
fprintf(stderr, "(HyperDoc) Longjmp failed -- Exiting \n");
exit(-1);
}
- case Macro:
+ case openaxiom_Macro_token:
parse_macro();
break;
- case Env:
+ case openaxiom_Env_token:
/** In this case, get the environment value, and make it a word **/
parse_env(curr_node);
break;
- case WindowId:
- curr_node->type = WindowId;
+ case openaxiom_WindowId_token:
+ curr_node->type = openaxiom_WindowId_token;
curr_node->space = token.id[-1];
curr_node->data.text = window_id(gWindow->fMainWindow);
break;
- case Punctuation:
- case Word:
- case Lsquarebrace:
- case Dash:
+ case openaxiom_Punctuation_token:
+ case openaxiom_Word_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Dash_token:
curr_node->type = token.type;
curr_node->space = token.id[-1];
curr_node->data.text = alloc_string(token.id);
break;
- case Pagename:
+ case openaxiom_Pagename_token:
{
char *str;
- curr_node->type = Word;
+ curr_node->type = openaxiom_Word_token;
curr_node->space = 0;
str = halloc(strlen(cur_page->name) + 1, "parse");
sprintf(str, "%s", cur_page->name);
curr_node->data.text = alloc_string(str);
break;
}
- case Examplenumber:
+ case openaxiom_Examplenumber_token:
{
char *str;
- curr_node->type = Word;
+ curr_node->type = openaxiom_Word_token;
curr_node->space = 0;
str = halloc(5, "parse");
sprintf(str, "%d", example_number);
curr_node->data.text = alloc_string(str);
break;
}
- case Rsquarebrace:
+ case openaxiom_Rsquarebrace_token:
if (gInOptional)
return;
else {
@@ -501,11 +504,11 @@ parse_HyperDoc(void)
curr_node->data.text = alloc_string(token.id);
}
break;
- case EndTitems:
- token.type = Endtitems;
- case Endtitems:
+ case openaxiom_EndTitems_token:
+ token.type = openaxiom_Endtitems_token;
+ case openaxiom_Endtitems_token:
if (gParserMode != AllMode) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "(HyperDoc) Found a bad token %s\n", token_table[token.type]);
longjmp(jmpbuf, 1);
}
@@ -513,16 +516,16 @@ parse_HyperDoc(void)
curr_node->type = token.type;
break;
}
- case EndItems:
- token.type = Enditems;
- case Enditems:
+ case openaxiom_EndItems_token:
+ token.type = openaxiom_Enditems_token;
+ case openaxiom_Enditems_token:
gInItems--;
- case Horizontalline:
- case Par:
- case Newline:
- case Titem:
+ case openaxiom_Horizontalline_token:
+ case openaxiom_Par_token:
+ case openaxiom_Newline_token:
+ case openaxiom_Titem_token:
if (gParserMode != AllMode) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "(HyperDoc) Found a bad token %s\n", token_table[token.type]);
longjmp(jmpbuf, 1);
}
@@ -530,10 +533,10 @@ parse_HyperDoc(void)
curr_node->type = token.type;
break;
}
- case Begintitems:
- case Beginitems:
+ case openaxiom_Begintitems_token:
+ case openaxiom_Beginitems_token:
if (gParserMode != AllMode) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "(HyperDoc) Found a bad token %s\n", token_table[token.type]);
longjmp(jmpbuf, 1);
}
@@ -541,147 +544,147 @@ parse_HyperDoc(void)
parse_begin_items();
break;
}
- case Item:
+ case openaxiom_Item_token:
parse_item();
break;
- case Mitem:
+ case openaxiom_Mitem_token:
parse_mitem();
break;
- case VSpace:
- case Tab:
- case HSpace:
- case Indent:
- case Indentrel:
+ case openaxiom_VSpace_token:
+ case openaxiom_Tab_token:
+ case openaxiom_HSpace_token:
+ case openaxiom_Indent_token:
+ case openaxiom_Indentrel_token:
parse_value1();
break;
- case Space:
+ case openaxiom_Space_token:
parse_value2();
break;
- case Lbrace:
- curr_node->type = Group;
+ case openaxiom_Lbrace_token:
+ curr_node->type = openaxiom_Group_token;
curr_node->space = token.id[-1];
push_group_stack();
node = alloc_node();
curr_node->next = node;
curr_node = curr_node->next;
parse_HyperDoc();
- curr_node->type = Endgroup;
+ curr_node->type = openaxiom_Endgroup_token;
pop_group_stack();
break;
- case Upbutton:
- case Returnbutton:
- case Link:
- case Downlink:
- case Memolink:
- case Windowlink:
+ case openaxiom_Upbutton_token:
+ case openaxiom_Returnbutton_token:
+ case openaxiom_Link_token:
+ case openaxiom_Downlink_token:
+ case openaxiom_Memolink_token:
+ case openaxiom_Windowlink_token:
parse_button();
break;
- case Unixlink:
- case LispMemoLink:
- case LispDownLink:
- case Lisplink:
- case Lispcommand:
- case Lispcommandquit:
- case Spadlink:
- case Spaddownlink:
- case Spadmemolink:
- case Unixcommand:
- case Spadcall:
- case Spadcallquit:
- case Qspadcall:
- case Qspadcallquit:
- case Lispwindowlink:
+ case openaxiom_Unixlink_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Unixcommand_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_Lispwindowlink_token:
parse_command();
break;
- case Controlbitmap:
- case Inputbitmap:
- case Inputpixmap:
- case Inputimage:
+ case openaxiom_Controlbitmap_token:
+ case openaxiom_Inputbitmap_token:
+ case openaxiom_Inputpixmap_token:
+ case openaxiom_Inputimage_token:
parse_input_pix();
break;
- case Box:
+ case openaxiom_Box_token:
parse_box();
break;
- case Mbox:
+ case openaxiom_Mbox_token:
parse_mbox();
break;
- case Free:
+ case openaxiom_Free_token:
parse_free();
break;
- case Center:
+ case openaxiom_Center_token:
parse_centerline();
break;
- case Bound:
+ case openaxiom_Bound_token:
add_dependencies();
break;
- case Spadcommand:
- case Spadgraph:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
parse_spadcommand(curr_node);
break;
- case Table:
+ case openaxiom_Table_token:
parse_table();
break;
- case Beep:
- case Emphasize:
- case BoldFace:
- case Rm:
- case It:
- case Tt:
- case Sl:
+ case openaxiom_Beep_token:
+ case openaxiom_Emphasize_token:
+ case openaxiom_BoldFace_token:
+ case openaxiom_Rm_token:
+ case openaxiom_It_token:
+ case openaxiom_Tt_token:
+ case openaxiom_Sl_token:
curr_node->type = token.type;
curr_node->space = token.id[-1];
break;
- case Inputstring:
+ case openaxiom_Inputstring_token:
parse_inputstring();
break;
- case SimpleBox:
+ case openaxiom_SimpleBox_token:
parse_simplebox();
break;
- case BoxValue:
- case StringValue:
+ case openaxiom_BoxValue_token:
+ case openaxiom_StringValue_token:
if (!gStringValueOk) {
strcpy(ebuffer,"(HyperDoc): Unexpected Value Command:");
strcat(ebuffer, token.id);
parser_error(ebuffer);
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
longjmp(jmpbuf, 1);
}
curr_node->type = token.type;
curr_node->space = token.id[-1];
- get_expected_token(Lbrace);
- get_expected_token(Word);
+ get_expected_token(openaxiom_Lbrace_token);
+ get_expected_token(openaxiom_Word_token);
curr_node->data.text = alloc_string(token.id);
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
break;
- case NoLines:
+ case openaxiom_NoLines_token:
gPageBeingParsed->page_flags |= NOLINES;
break;
- case Pound:
- curr_node->type = Pound;
+ case openaxiom_Pound_token:
+ curr_node->type = openaxiom_Pound_token;
curr_node->space = token.id[-1];
curr_node->next = alloc_node();
curr_node = curr_node->next;
parse_parameters();
break;
- case Radiobox:
+ case openaxiom_Radiobox_token:
parse_radiobox();
break;
- case Radioboxes:
+ case openaxiom_Radioboxes_token:
parse_radioboxes();
break;
- case Replacepage:
+ case openaxiom_Replacepage_token:
parse_replacepage();
break;
default:
fprintf(stderr, "(HyperDoc) Keyword not currently supported: %s\n", token.id);
print_page_and_filename();
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
break;
}
if (gEndedPage)
return;
- if (curr_node->type != Noop) {
+ if (curr_node->type != openaxiom_Noop_token) {
node = alloc_node();
curr_node->next = node;
curr_node = node;
@@ -699,7 +702,7 @@ parse_page_from_socket(void)
HyperDocPage *hpage;
init_scanner();
- input_type = FromSpadSocket;
+ input_type = openaxiom_FromSpadSocket_input;
input_string = "";
cur_spadcom = NULL;
gLinkHashTable = page->fLinkHashTable;
@@ -743,7 +746,7 @@ parse_page_from_unixfd(void)
HyperDocPage *page = alloc_page((char *) NULL);
init_scanner();
- input_type = FromUnixFD;
+ input_type = openaxiom_FromUnixFD_input;
cur_spadcom = NULL;
gLinkHashTable = page->fLinkHashTable;
hash_init(
@@ -777,12 +780,12 @@ start_scrolling(void)
*/
if (gParserRegion != Header) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "(HyperDoc) Parser Error: Unexpected BeginScrollFound\n");
longjmp(jmpbuf, 1);
fprintf(stderr, "(HyperDoc) Longjump failed exiting\n");
}
- curr_node->type = Endheader;
+ curr_node->type = openaxiom_Endheader_token;
curr_node->next = NULL;
Pop_MR();
@@ -791,7 +794,7 @@ start_scrolling(void)
gWindow->fDisplayedWindow = gWindow->fScrollWindow;
curr_node = alloc_node();
gPageBeingParsed->scrolling = curr_node;
- curr_node->type = Scrollingnode;
+ curr_node->type = openaxiom_Scrollingnode_token;
}
static void
@@ -803,14 +806,14 @@ start_footer(void)
*/
if (gParserRegion != Scrolling) {
- curr_node->type = Noop;
+ curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "(HyperDoc) Parser Error: Unexpected Endscroll Found\n");
print_page_and_filename();
longjmp(jmpbuf, 1);
fprintf(stderr, "(HyperDoc) Longjump failed exiting\n");
}
- curr_node->type = Endscrolling;
+ curr_node->type = openaxiom_Endscrolling_token;
curr_node->next = NULL;
Pop_MR();
linkScrollBars();
@@ -818,7 +821,7 @@ start_footer(void)
Push_MR();
gParserRegion = Footer;
curr_node = alloc_node();
- curr_node->type = Footernode;
+ curr_node->type = openaxiom_Footernode_token;
gPageBeingParsed->footer = curr_node;
gWindow->fDisplayedWindow = gWindow->fMainWindow;
}
@@ -836,13 +839,13 @@ end_a_page(void)
gEndedPage = TRUE;
if (gParserRegion == Footer) {
/* the person had all the regions, I basically just have to leave */
- curr_node->type = Endscrolling;
+ curr_node->type = openaxiom_Endscrolling_token;
curr_node->next = NULL;
Pop_MR();
}
else if (gParserRegion == Header) {
/* person had a header. So just end it and return */
- curr_node->type = Endheader;
+ curr_node->type = openaxiom_Endheader_token;
curr_node->next = NULL;
Pop_MR();
gPageBeingParsed->scrolling = NULL;
@@ -853,8 +856,8 @@ end_a_page(void)
static void
parse_replacepage(void)
{
- get_expected_token(Lbrace);
+ get_expected_token(openaxiom_Lbrace_token);
get_token();
replace_page = alloc_string(token.id);
- get_expected_token(Rbrace);
+ get_expected_token(openaxiom_Rbrace_token);
}
diff --git a/src/hyper/scrollbar.c b/src/hyper/scrollbar.c
index 48cba63d..ac7addf7 100644
--- a/src/hyper/scrollbar.c
+++ b/src/hyper/scrollbar.c
@@ -507,7 +507,7 @@ linkScrollBars(void)
barlink->win = gWindow->scrollbar;
uplink->type = Scrollupbutton;
downlink->type = Scrolldownbutton;
- barlink->type = Scrollbar;
+ barlink->type = openaxiom_Scrollbar_token;
barlink->x = barlink->y = 0;
uplink->x = uplink->y = 0;
downlink->x = downlink->y = 0;
diff --git a/src/hyper/show-types.c b/src/hyper/show-types.c
index d5cb7ab6..f55bd06c 100644
--- a/src/hyper/show-types.c
+++ b/src/hyper/show-types.c
@@ -71,32 +71,32 @@ show_text(TextNode *node, int Ender)
for (; node != NULL; node = node->next) {
switch (node->type) {
case 0:
- case Beginitems:
- case Begintitems:
- case Bound:
- case Center:
- case Free:
- case HSpace:
- case Indent:
- case Indentrel:
- case Item:
- case Macro:
- case Mbox:
- case Newline:
- case Noop:
- case Par:
- case Pound:
- case Rbrace:
- case Space:
- case Tab:
- case Table:
- case Titem:
- case VSpace:
+ case openaxiom_Beginitems_token:
+ case openaxiom_Begintitems_token:
+ case openaxiom_Bound_token:
+ case openaxiom_Center_token:
+ case openaxiom_Free_token:
+ case openaxiom_HSpace_token:
+ case openaxiom_Indent_token:
+ case openaxiom_Indentrel_token:
+ case openaxiom_Item_token:
+ case openaxiom_Macro_token:
+ case openaxiom_Mbox_token:
+ case openaxiom_Newline_token:
+ case openaxiom_Noop_token:
+ case openaxiom_Par_token:
+ case openaxiom_Pound_token:
+ case openaxiom_Rbrace_token:
+ case openaxiom_Space_token:
+ case openaxiom_Tab_token:
+ case openaxiom_Table_token:
+ case openaxiom_Titem_token:
+ case openaxiom_VSpace_token:
break;
- case Dash:
- case Fi:
- case Ifcond:
+ case openaxiom_Dash_token:
+ case openaxiom_Fi_token:
+ case openaxiom_Ifcond_token:
if (visible(node->y, node->height)) {
if (strlen(node->data.text) > 1) {
XDrawLine(gXDisplay, gWindow->fDisplayedWindow, gWindow->fStandardGC, node->x,
@@ -121,13 +121,13 @@ show_text(TextNode *node, int Ender)
}
break;
- case Lsquarebrace:
- case Math:
- case Punctuation:
- case Rsquarebrace:
- case Spadsrctxt:
- case WindowId:
- case Word:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Math_token:
+ case openaxiom_Punctuation_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Spadsrctxt_token:
+ case openaxiom_WindowId_token:
+ case openaxiom_Word_token:
if (visible(node->y, node->height))
XDrawString(gXDisplay, gWindow->fDisplayedWindow, gWindow->fStandardGC, node->x, node->y +
gRegionOffset - gTopOfGroupStack->cur_font->descent + y_off,
@@ -140,7 +140,7 @@ show_text(TextNode *node, int Ender)
}
break;
- case Verbatim:
+ case openaxiom_Verbatim_token:
push_group_stack();
tt_top_group();
if (visible(node->y, node->height))
@@ -156,7 +156,7 @@ show_text(TextNode *node, int Ender)
pop_group_stack();
break;
- case Horizontalline:
+ case openaxiom_Horizontalline_token:
if (visible(node->y, node->height)) {
line_top_group();
XDrawLine(gXDisplay, gWindow->fDisplayedWindow, gWindow->fStandardGC, 0,
@@ -173,7 +173,7 @@ show_text(TextNode *node, int Ender)
}
break;
- case Box:
+ case openaxiom_Box_token:
if (visible(node->y, node->height))
XDrawRectangle(gXDisplay, gWindow->fDisplayedWindow, gWindow->fStandardGC,
node->x,
@@ -189,127 +189,127 @@ show_text(TextNode *node, int Ender)
break;
- case Downlink:
- case Link:
- case LispDownLink:
- case LispMemoLink:
- case Lispcommand:
- case Lispcommandquit:
- case Lisplink:
- case Lispwindowlink:
- case Memolink:
- case Qspadcall:
- case Qspadcallquit:
- case Returnbutton:
- case Spadcall:
- case Spadcallquit:
- case Spaddownlink:
- case Spadlink:
- case Spadmemolink:
- case Unixcommand:
- case Unixlink:
- case Upbutton:
- case Windowlink:
+ case openaxiom_Downlink_token:
+ case openaxiom_Link_token:
+ case openaxiom_LispDownLink_token:
+ case openaxiom_LispMemoLink_token:
+ case openaxiom_Lispcommand_token:
+ case openaxiom_Lispcommandquit_token:
+ case openaxiom_Lisplink_token:
+ case openaxiom_Lispwindowlink_token:
+ case openaxiom_Memolink_token:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_Returnbutton_token:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spadmemolink_token:
+ case openaxiom_Unixcommand_token:
+ case openaxiom_Unixlink_token:
+ case openaxiom_Upbutton_token:
+ case openaxiom_Windowlink_token:
if (pix_visible(node->y, node->height))
show_link(node);
break;
- case Spadcommand:
- case Spadgraph:
- case Spadsrc:
+ case openaxiom_Spadcommand_token:
+ case openaxiom_Spadgraph_token:
+ case openaxiom_Spadsrc_token:
show_spadcommand(node);
break;
- case Pastebutton:
+ case openaxiom_Pastebutton_token:
if (visible(node->y, node->height))
show_pastebutton(node);
break;
- case Paste:
+ case openaxiom_Paste_token:
show_paste(node);
break;
- case Group:
- case Tableitem:
+ case openaxiom_Group_token:
+ case openaxiom_Tableitem_token:
push_group_stack();
break;
- case Controlbitmap:
+ case openaxiom_Controlbitmap_token:
show_image(node, gWindow->fControlGC);
break;
- case Inputbitmap:
+ case openaxiom_Inputbitmap_token:
show_image(node, gWindow->fStandardGC);
break;
- case Inputpixmap:
+ case openaxiom_Inputpixmap_token:
show_image(node, gWindow->fStandardGC);
break;
- case BoldFace:
+ case openaxiom_BoldFace_token:
bf_top_group();
break;
- case Emphasize:
+ case openaxiom_Emphasize_token:
if (gTopOfGroupStack->cur_font == gRmFont)
em_top_group();
else
rm_top_group();
break;
- case It:
+ case openaxiom_It_token:
em_top_group();
break;
- case Sl:
- case Rm:
+ case openaxiom_Sl_token:
+ case openaxiom_Rm_token:
rm_top_group();
break;
- case Tt:
+ case openaxiom_Tt_token:
tt_top_group();
break;
- case Inputstring:
+ case openaxiom_Inputstring_token:
show_input(node);
break;
- case Radiobox:
- case SimpleBox:
+ case openaxiom_Radiobox_token:
+ case openaxiom_SimpleBox_token:
show_simple_box(node);
break;
- case Beep:
+ case openaxiom_Beep_token:
LoudBeepAtTheUser();
break;
- case Description:
+ case openaxiom_Description_token:
bf_top_group();
break;
- case Endspadsrc:
- case Endspadcommand:
+ case openaxiom_Endspadsrc_token:
+ case openaxiom_Endspadcommand_token:
gInAxiomCommand = 1;
- case Endtableitem:
- case Enddescription:
- case Endpastebutton:
- case Endlink:
- case Endbutton:
- case Endgroup:
+ case openaxiom_Endtableitem_token:
+ case openaxiom_Enddescription_token:
+ case openaxiom_Endpastebutton_token:
+ case openaxiom_Endlink_token:
+ case openaxiom_Endbutton_token:
+ case openaxiom_Endgroup_token:
pop_group_stack();
- case Endverbatim:
- case Endmath:
- case Endbox:
- case Endtable:
- case Endmbox:
- case Endparameter:
- case Endpaste:
- case Endinputbox:
- case Endcenter:
- case Endmacro:
- case Endif:
- case Endtitems:
- case Enditems:
+ case openaxiom_Endverbatim_token:
+ case openaxiom_Endmath_token:
+ case openaxiom_Endbox_token:
+ case openaxiom_Endtable_token:
+ case openaxiom_Endmbox_token:
+ case openaxiom_Endparameter_token:
+ case openaxiom_Endpaste_token:
+ case openaxiom_Endinputbox_token:
+ case openaxiom_Endcenter_token:
+ case openaxiom_Endmacro_token:
+ case openaxiom_Endif_token:
+ case openaxiom_Endtitems_token:
+ case openaxiom_Enditems_token:
/*
* Now since I can show specific regions of the text, then at
@@ -318,10 +318,10 @@ show_text(TextNode *node, int Ender)
if (node->type == Ender)
return;
break;
- case Endfooter:
- case Endscrolling:
- case Endheader:
- case Endtitle:
+ case openaxiom_Endfooter_token:
+ case openaxiom_Endscrolling_token:
+ case openaxiom_Endheader_token:
+ case openaxiom_Endtitle_token:
/*
* regardless of what ender I have, I always terminate showing
@@ -344,7 +344,7 @@ show_link(TextNode *node)
int active;
switch (node->type) {
- case Upbutton:
+ case openaxiom_Upbutton_token:
if (!need_up_button) {
XClearArea(gXDisplay, gWindow->fDisplayedWindow, node->x,
node->y - node->height + gRegionOffset,
@@ -354,7 +354,7 @@ show_link(TextNode *node)
else
active = 1;
break;
- case Returnbutton:
+ case openaxiom_Returnbutton_token:
if (!need_return_button) {
XClearArea(gXDisplay, gWindow->fDisplayedWindow, node->x,
node->y - node->height + gRegionOffset,
@@ -364,7 +364,7 @@ show_link(TextNode *node)
else
active = 1;
break;
- case Helpbutton:
+ case openaxiom_Helpbutton_token:
if (!need_help_button) {
XClearArea(gXDisplay, gWindow->fDisplayedWindow, node->x,
node->y - node->height + gRegionOffset,
@@ -516,7 +516,7 @@ show_spadcommand(TextNode *node)
push_spad_group();
wc.x = node->x;
- if (node->type == Spadsrc)
+ if (node->type == openaxiom_Spadsrc_token)
wc.y = node->y + gRegionOffset + y_off - 2 * node->height;
else
wc.y = node->y + gRegionOffset + y_off - node->height;
diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c
index 9f782e6c..0b8c9300 100644
--- a/src/hyper/spadint.c
+++ b/src/hyper/spadint.c
@@ -121,7 +121,7 @@ issue_spadcommand(HyperDocPage *page, TextNode *command, int immediate,
buf[strlen(buf) + 1] = '\0';
buf[strlen(buf)] = '\n';
}
- if (type == Spadsrc)
+ if (type == openaxiom_Spadsrc_token)
send_pile(page->sock, buf);
else
send_string(page->sock, buf);
@@ -150,15 +150,16 @@ issue_dependent_commands(HyperDocPage *page, TextNode *command,int type)
{
TextNode *node, *depend_label;
SpadcomDepend *depend;
- int end_type = (type == Spadcommand || type == Spadgraph) ?
- (Endspadcommand) : (Endspadsrc);
+ int end_type = (type == openaxiom_Spadcommand_token
+ || type == openaxiom_Spadgraph_token) ?
+ (openaxiom_Endspadcommand_token) : (openaxiom_Endspadsrc_token);
for (node = command->next; node->type != end_type;
node = node->next)
- if (node->type == Free)
+ if (node->type == openaxiom_Free_token)
for (depend_label = node->data.node; depend_label != NULL;
depend_label = depend_label->next)
- if (depend_label->type == Word) {
+ if (depend_label->type == openaxiom_Word_token) {
depend = (SpadcomDepend *)
hash_find(page->depend_hash, depend_label->data.text);
if (depend == NULL) {
@@ -180,14 +181,15 @@ mark_as_executed(HyperDocPage *page, TextNode *command,int type)
{
TextNode *node, *depend_label;
SpadcomDepend *depend;
- int end_type = (type == Spadcommand || type == Spadgraph)
- ? (Endspadcommand) : (Endspadsrc);
+ int end_type = (type == openaxiom_Spadcommand_token
+ || type == openaxiom_Spadgraph_token)
+ ? (openaxiom_Endspadcommand_token) : (openaxiom_Endspadsrc_token);
for (node = command; node->type != end_type; node = node->next)
- if (node->type == Bound)
+ if (node->type == openaxiom_Bound_token)
for (depend_label = node->data.node; depend_label != NULL;
depend_label = depend_label->next)
- if (depend_label->type == Word) {
+ if (depend_label->type == openaxiom_Word_token) {
depend = (SpadcomDepend *)
hash_find(page->depend_hash, depend_label->data.text);
if (depend == NULL) {
@@ -437,32 +439,32 @@ print_to_string1(TextNode *command,int * sizeBuf)
for (node = command; node != NULL;) {
switch (node->type) {
- case Newline:
+ case openaxiom_Newline_token:
storeChar('\n');
node = node->next;
break;
- case Ifcond:
+ case openaxiom_Ifcond_token:
if (check_condition(node->data.ifnode->cond))
node = node->data.ifnode->thennode;
else
node = node->data.ifnode->elsenode;
break;
- case Endarg:
- case Endspadcommand:
- case Endspadsrc:
- case Endpix:
+ case openaxiom_Endarg_token:
+ case openaxiom_Endspadcommand_token:
+ case openaxiom_Endspadsrc_token:
+ case openaxiom_Endpix_token:
storeChar('\0');
return p2sBuf;
- case Endverbatim:
- case Endif:
- case Fi:
- case Endmacro:
- case Endparameter:
- case Rbrace:
- case Endgroup:
+ case openaxiom_Endverbatim_token:
+ case openaxiom_Endif_token:
+ case openaxiom_Fi_token:
+ case openaxiom_Endmacro_token:
+ case openaxiom_Endparameter_token:
+ case openaxiom_Rbrace_token:
+ case openaxiom_Endgroup_token:
node = node->next;
break;
- case Punctuation:
+ case openaxiom_Punctuation_token:
/*
* Simply copy the piece of text
@@ -471,7 +473,7 @@ print_to_string1(TextNode *command,int * sizeBuf)
for (s = node->data.text; *s; s++) { storeChar(*s); }
node = node->next;
break;
- case WindowId:
+ case openaxiom_WindowId_token:
/*
* Simply copy the piece of text
@@ -481,8 +483,8 @@ print_to_string1(TextNode *command,int * sizeBuf)
storeChar(' ');
node = node->next;
break;
- case Verbatim:
- case Spadsrctxt:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Spadsrctxt_token:
/*
* Simply copy the piece of text
@@ -495,15 +497,15 @@ print_to_string1(TextNode *command,int * sizeBuf)
*/
/*
- * if(node->next && node->next->type != Endspadsrc)
+ * if(node->next && node->next->type != openaxiom_Endspadsrc_token)
* storeChar('\n');
*/
node = node->next;
break;
- case Dash:
- case Rsquarebrace:
- case Lsquarebrace:
- case Word:
+ case openaxiom_Dash_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Word_token:
/*
* Simply copy the piece of text
@@ -512,7 +514,7 @@ print_to_string1(TextNode *command,int * sizeBuf)
for (s = node->data.text; *s; s++) { storeChar(*s); }
node = node->next;
break;
- case BoxValue:
+ case openaxiom_BoxValue_token:
box =
(InputBox *) hash_find(gWindow->page->box_hash, node->data.text);
if (box == NULL) {
@@ -532,7 +534,7 @@ print_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case StringValue:
+ case openaxiom_StringValue_token:
item = return_item(node->data.text);
if (item != NULL) {
if (node->space)
@@ -567,23 +569,23 @@ print_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case Space:
+ case openaxiom_Space_token:
num_spaces = (node->data.node != NULL ?
atoi(node->data.node->data.text) : 1);
for (count = 0; count < num_spaces; count++)
storeChar(' ');
node = node->next;
break;
- case Titlenode:
- case Endtitle:
- case Center:
- case Endcenter:
- case BoldFace:
- case Emphasize:
- case Indentrel:
+ case openaxiom_Titlenode_token:
+ case openaxiom_Endtitle_token:
+ case openaxiom_Center_token:
+ case openaxiom_Endcenter_token:
+ case openaxiom_BoldFace_token:
+ case openaxiom_Emphasize_token:
+ case openaxiom_Indentrel_token:
node = node->next;
break;
- case Bound:
+ case openaxiom_Bound_token:
if (include_bf) {
int len, i;
TextNode *n2 = node->data.node;
@@ -595,8 +597,8 @@ print_to_string1(TextNode *command,int * sizeBuf)
storeChar('n');
storeChar('d');
storeChar('{');
- for (; n2->type != Endarg; n2 = n2->next) {
- if (n2->type == Word) {
+ for (; n2->type != openaxiom_Endarg_token; n2 = n2->next) {
+ if (n2->type == openaxiom_Word_token) {
len = strlen(n2->data.text);
for (i = 0; i < len; i++)
storeChar(n2->data.text[i]);
@@ -607,7 +609,7 @@ print_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case Free:
+ case openaxiom_Free_token:
if (include_bf) {
int len, i;
TextNode *n2 = node->data.node;
@@ -618,8 +620,8 @@ print_to_string1(TextNode *command,int * sizeBuf)
storeChar('e');
storeChar('e');
storeChar('{');
- for (; n2->type != Endarg; n2 = n2->next) {
- if (n2->type == Word) {
+ for (; n2->type != openaxiom_Endarg_token; n2 = n2->next) {
+ if (n2->type == openaxiom_Word_token) {
len = strlen(n2->data.text);
for (i = 0; i < len; i++)
storeChar(n2->data.text[i]);
@@ -630,17 +632,17 @@ print_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case Macro:
+ case openaxiom_Macro_token:
node = node->next;
break;
- case Pound:
+ case openaxiom_Pound_token:
if (node->space) { storeChar(' '); }
node = node->next;
break;
- case Group:
+ case openaxiom_Group_token:
node = node->next;
break;
- case Indent:
+ case openaxiom_Indent_token:
num_spaces = (node->data.node != NULL ?
atoi(node->data.node->data.text) : 1);
for (count = 0; count < num_spaces; count++)
@@ -687,15 +689,15 @@ issue_server_command(HyperLink *link)
}
switch_frames();
switch (link->type) {
- case Qspadcall:
- case Qspadcallquit:
- case Spadlink:
- case Spaddownlink:
- case Spadmemolink:
+ case openaxiom_Qspadcall_token:
+ case openaxiom_Qspadcallquit_token:
+ case openaxiom_Spadlink_token:
+ case openaxiom_Spaddownlink_token:
+ case openaxiom_Spadmemolink_token:
send_int(spad_socket, QuietSpadCommand);
break;
- case Spadcall:
- case Spadcallquit:
+ case openaxiom_Spadcall_token:
+ case openaxiom_Spadcallquit_token:
send_int(spad_socket, SpadCommand);
break;
default:
@@ -704,9 +706,12 @@ issue_server_command(HyperLink *link)
}
buf = print_to_string(command);
send_string(spad_socket, buf);
- if (link->type == Lispcommand || link->type == Spadcall
- || link->type == Spadcallquit || link->type == Qspadcallquit
- || link->type == Qspadcall || link->type == Lispcommandquit)
+ if (link->type == openaxiom_Lispcommand_token
+ || link->type == openaxiom_Spadcall_token
+ || link->type == openaxiom_Spadcallquit_token
+ || link->type == openaxiom_Qspadcallquit_token
+ || link->type == openaxiom_Qspadcall_token
+ || link->type == openaxiom_Lispcommandquit_token)
return NULL;
page = parse_page_from_socket();
return page;
@@ -925,48 +930,48 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
for (node = command; node != NULL;) {
switch (node->type) {
- case Newline:
+ case openaxiom_Newline_token:
storeString("\\newline\n");
node = node->next;
break;
- case Par:
+ case openaxiom_Par_token:
storeString("\n\n");
node = node->next;
break;
- case Indentrel:
+ case openaxiom_Indentrel_token:
storeString("\\indentrel{");
storeString(node->data.node->data.text);
storeChar('}');
node = node->next;
break;
- case Tab:
+ case openaxiom_Tab_token:
storeString("\\tab{");
storeString(node->data.node->data.text);
storeChar('}');
node = node->next;
break;
- case Ifcond:
+ case openaxiom_Ifcond_token:
if (check_condition(node->data.ifnode->cond))
node = node->data.ifnode->thennode;
else
node = node->data.ifnode->elsenode;
break;
- case Endarg:
- case Endspadsrc:
- case Endpix:
- case Endbutton:
+ case openaxiom_Endarg_token:
+ case openaxiom_Endspadsrc_token:
+ case openaxiom_Endpix_token:
+ case openaxiom_Endbutton_token:
storeChar('}');
node = node->next;
break;
- case Endverbatim:
- case Endif:
- case Fi:
- case Endmacro:
- case Endparameter:
- case Rbrace:
+ case openaxiom_Endverbatim_token:
+ case openaxiom_Endif_token:
+ case openaxiom_Fi_token:
+ case openaxiom_Endmacro_token:
+ case openaxiom_Endparameter_token:
+ case openaxiom_Rbrace_token:
node = node->next;
break;
- case Punctuation:
+ case openaxiom_Punctuation_token:
/*
* Simply copy the piece of text
@@ -975,25 +980,25 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
for (s = node->data.text; *s; s++) { storeChar(*s); }
node = node->next;
break;
- case WindowId:
+ case openaxiom_WindowId_token:
storeString("\\windowid ");
node = node->next;
break;
- case Verbatim:
- case Spadsrctxt:
+ case openaxiom_Verbatim_token:
+ case openaxiom_Spadsrctxt_token:
if (node->space) { storeChar(' '); }
for (s = node->data.text; *s; s++) { storeChar(*s); }
node = node->next;
break;
- case Dash:
- case Rsquarebrace:
- case Lsquarebrace:
- case Word:
+ case openaxiom_Dash_token:
+ case openaxiom_Rsquarebrace_token:
+ case openaxiom_Lsquarebrace_token:
+ case openaxiom_Word_token:
if (node->space) { storeChar(' '); }
for (s = node->data.text; *s; s++) { storeChar(*s); }
node = node->next;
break;
- case BoxValue:
+ case openaxiom_BoxValue_token:
box = (InputBox *) hash_find(gWindow->page->box_hash, node->data.text);
if (box == NULL) {
fprintf(stderr, "Print_to_string:Box %s Has no symbol table entry\n",
@@ -1011,7 +1016,7 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case StringValue:
+ case openaxiom_StringValue_token:
item = return_item(node->data.text);
if (item != NULL) {
if (node->space) { storeChar(' '); }
@@ -1046,78 +1051,78 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case Space:
+ case openaxiom_Space_token:
num_spaces = (node->data.node != NULL ?
atoi(node->data.node->data.text) : 1);
for (count = 0; count < num_spaces; count++)
storeChar(' ');
node = node->next;
break;
- case Emphasize:
+ case openaxiom_Emphasize_token:
storeString("\\em ");
node = node->next;
break;
- case BoldFace:
+ case openaxiom_BoldFace_token:
storeString("\\bf ");
node = node->next;
break;
- case Sl:
+ case openaxiom_Sl_token:
storeString("\\it ");
node = node->next;
break;
- case Rm:
+ case openaxiom_Rm_token:
storeString("\\rm ");
node = node->next;
break;
- case It:
+ case openaxiom_It_token:
storeString("\\it ");
node = node->next;
break;
- case Tt:
+ case openaxiom_Tt_token:
storeString("\\tt ");
node = node->next;
break;
- case Group:
+ case openaxiom_Group_token:
/* skip {} */
- if (node->next->type==Endgroup){
+ if (node->next->type==openaxiom_Endgroup_token){
node=node->next->next;
break;
}
storeChar('{');
node = node->next;
break;
- case Endgroup:
+ case openaxiom_Endgroup_token:
storeChar('}');
node = node->next;
break;
- case Box:
+ case openaxiom_Box_token:
storeString("\\box{");
node = node->next;
break;
- case Endbox:
+ case openaxiom_Endbox_token:
storeChar('}');
node = node->next;
break;
- case Center:
+ case openaxiom_Center_token:
storeString("\\center{");
node = node->next;
break;
- case Endcenter:
+ case openaxiom_Endcenter_token:
storeString("}");
storeChar('\n');
node = node->next;
break;
- case Titlenode:
- case Endtitle:
+ case openaxiom_Titlenode_token:
+ case openaxiom_Endtitle_token:
node = node->next;
break;
- case Bound:
+ case openaxiom_Bound_token:
{
TextNode *n2 = node->data.node;
storeString("\\bound{");
- for (; n2->type != Endarg; n2 = n2->next) {
- if (n2->type == Word) {
+ for (; n2->type != openaxiom_Endarg_token; n2 = n2->next) {
+ if (n2->type == openaxiom_Word_token) {
storeString(n2->data.text);
storeChar(' ');
}
@@ -1126,13 +1131,13 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case Free:
+ case openaxiom_Free_token:
{
TextNode *n2 = node->data.node;
storeString("\\free{");
- for (; n2->type != Endarg; n2 = n2->next) {
- if (n2->type == Word) {
+ for (; n2->type != openaxiom_Endarg_token; n2 = n2->next) {
+ if (n2->type == openaxiom_Word_token) {
storeString(n2->data.text);
storeChar(' ');
}
@@ -1141,141 +1146,141 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
}
node = node->next;
break;
- case Macro:
+ case openaxiom_Macro_token:
storeChar(' ');
node = node->next;
break;
- case Pound:
+ case openaxiom_Pound_token:
if (node->space) { storeChar(' '); }
node = node->next;
break;
- case Indent:
+ case openaxiom_Indent_token:
num_spaces = (node->data.node != NULL ?
atoi(node->data.node->data.text) : 1);
for (count = 0; count < num_spaces; count++)
storeChar(' ');
node = node->next;
break;
- case Inputbitmap:
+ case openaxiom_Inputbitmap_token:
storeString("\\inputbitmap{");
storeString(node->data.text);
storeString("}\n");
node = node->next;
break;
- case Endscrolling:
+ case openaxiom_Endscrolling_token:
storeString("\\end{scroll}\n");
node = node->next;
break;
- case Scrollingnode:
+ case openaxiom_Scrollingnode_token:
storeString("\\begin{scroll}\n");
storeString("% This is the scrolling area\n");
node = node->next;
break;
- case Horizontalline:
+ case openaxiom_Horizontalline_token:
storeString("\\horizontalline\n");
node = node->next;
break;
- case Endtable:
+ case openaxiom_Endtable_token:
storeChar('}');
node = node->next;
break;
- case Table:
+ case openaxiom_Table_token:
storeString("\\table{");
node = node->next;
break;
- case Tableitem:
+ case openaxiom_Tableitem_token:
storeChar('{');
node = node->next;
break;
- case Endtableitem:
+ case openaxiom_Endtableitem_token:
storeChar('}');
node = node->next;
break;
- case Beginitems:
+ case openaxiom_Beginitems_token:
storeString("\\begin{items}");
node = node->next;
break;
- case Item:
+ case openaxiom_Item_token:
storeString("\n\\item");
node = node->next;
break;
- case Enditems:
+ case openaxiom_Enditems_token:
storeString("\n\\end{items}");
node = node->next;
break;
/*** LINKS ***/
/* all these guys are ended by Endbutton
we close the brace then */
- case Spadlink:
+ case openaxiom_Spadlink_token:
storeString("\\fauxspadlink{");
node = node->next;
break;
- case Unixlink:
+ case openaxiom_Unixlink_token:
storeString("\\fauxunixlink{");
node = node->next;
break;
- case Lisplink:
+ case openaxiom_Lisplink_token:
storeString("\\fauxlisplink{");
node = node->next;
break;
- case Link:
+ case openaxiom_Link_token:
storeString("\\fauxlink{");
node = node->next;
break;
- case LispDownLink:
+ case openaxiom_LispDownLink_token:
storeString("\\fauxlispdownlink{");
node = node->next;
break;
- case LispMemoLink:
+ case openaxiom_LispMemoLink_token:
storeString("\\fauxlispmemolink{");
node = node->next;
break;
- case Memolink:
+ case openaxiom_Memolink_token:
storeString("\\fauxmemolink{");
node = node->next;
break;
- case Windowlink:
+ case openaxiom_Windowlink_token:
storeString("\\fauxwindowlink{");
node = node->next;
break;
- case Downlink:
+ case openaxiom_Downlink_token:
storeString("\\fauxdownlink{");
node = node->next;
break;
/** END OF LINKS **/
- case Unixcommand:
+ case openaxiom_Unixcommand_token:
storeString("\\unixcommand{");
node = node->next;
break;
- case Lispcommand:
+ case openaxiom_Lispcommand_token:
storeString("\\lispcommand{");
node = node->next;
break;
- case Spadgraph:
+ case openaxiom_Spadgraph_token:
storeString("\\spadgraph{");
node = node->next;
break;
- case Spadcommand:
+ case openaxiom_Spadcommand_token:
storeString("\\spadcommand{");
node = node->next;
break;
- case Endspadcommand:
+ case openaxiom_Endspadcommand_token:
storeChar('}');
node = node->next;
break;
- case Footernode:
+ case openaxiom_Footernode_token:
storeString("% This is the footer\n");
node = node->next;
break;
- case Endfooter:
+ case openaxiom_Endfooter_token:
storeString("% This is the end of the footer\n");
node = node->next;
break;
- case Endheader:
+ case openaxiom_Endheader_token:
storeString("% This is the end of the header\n");
node = node->next;
break;
- case Headernode:
+ case openaxiom_Headernode_token:
storeString("% This is the header\n");
node = node->next;
break;
diff --git a/src/hyper/titlebar.c b/src/hyper/titlebar.c
index 8fda183b..0768ba8c 100644
--- a/src/hyper/titlebar.c
+++ b/src/hyper/titlebar.c
@@ -214,7 +214,7 @@ showTitleBar(void)
pop_group_stack();
- show_text(gWindow->page->title->next, Endheader);
+ show_text(gWindow->page->title->next, openaxiom_Endheader_token);
/* Now draw the box around the title */
@@ -275,22 +275,22 @@ linkTitleBarWindows(void)
*tw4link = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink");
tw1link->win = gWindow->fTitleBarButton1;
- tw1link->type = Quitbutton;
+ tw1link->type = openaxiom_Quitbutton_token;
tw1link->reference.node = NULL;
tw1link->x = tw1link->y = 0;
tw2link->win = gWindow->fTitleBarButton2;
- tw2link->type = Helpbutton;
+ tw2link->type = openaxiom_Helpbutton_token;
tw2link->reference.node = NULL;
tw2link->x = tw2link->y = 0;
tw3link->win = gWindow->fTitleBarButton3;
- tw3link->type = Returnbutton;
+ tw3link->type = openaxiom_Returnbutton_token;
tw3link->reference.node = NULL;
tw3link->x = tw3link->y = 0;
tw4link->win = gWindow->fTitleBarButton4;
- tw4link->type = Upbutton;
+ tw4link->type = openaxiom_Upbutton_token;
tw4link->reference.node = NULL;
tw4link->x = tw4link->y = 0;
diff --git a/src/hyper/token.h b/src/hyper/token.h
index 78d8dafb..e840ec42 100644
--- a/src/hyper/token.h
+++ b/src/hyper/token.h
@@ -58,186 +58,184 @@ typedef struct Token {
User tokens. ie, these can be found on a page
*/
typedef enum openaxiom_token_kind {
- Word = 1,
- Page = 2,
- Lispcommandquit = 3,
- BoldFace = 4,
- Link = 5,
- Downlink = 6,
- Beginscroll = 7,
- Spadcommand = 8,
- NoLines = 9,
- Env = 10,
- Par = 11,
- Center = 12,
- Begin = 13,
- Beginitems = 14,
- Item = 15,
- Table = 16,
- Box = 17,
- Tab = 18,
- Space = 19,
- Indent = 20,
- Horizontalline = 21,
- Newline = 22,
- Enditems = 23,
- Returnbutton = 24,
- Memolink = 25,
- Upbutton = 26,
- Endscroll = 27,
- Thispage = 28,
- Returnto = 29,
- Free = 30,
- Bound = 31,
- Lisplink = 32,
- Unixlink = 33,
- Mbox = 34,
- Inputstring = 35,
- StringValue = 36,
- Spadlink = 37,
- Inputbitmap = 38,
- Inputpixmap = 39,
- Unixcommand = 40,
- Emphasize = 41,
- Lispcommand = 42,
- LispMemoLink = 43,
- LispDownLink = 44,
- Spadcall = 45,
- Spadcallquit = 46,
- Spaddownlink = 47,
- Spadmemolink = 48,
- Qspadcall = 49,
- Qspadcallquit = 50,
- SimpleBox = 51,
- Radioboxes = 52,
- BoxValue = 53,
- VSpace = 54,
- HSpace = 55,
- NewCommand = 56,
- WindowId = 57,
- Beep = 58,
- Quitbutton = 59,
- Begintitems = 60,
- Titem = 61,
- End = 62,
- It = 63,
- Sl = 64,
- Tt = 65,
- Rm = 66,
- Ifcond = 67,
- Else = 68,
- Fi = 69,
- Newcond = 70,
- Setcond = 71,
- Button = 72,
- Windowlink = 73,
- Haslisp = 74,
- Hasup = 75,
- Hasreturn = 76,
- Hasreturnto = 77,
- Lastwindow = 78,
- Endtitems = 79,
- Lispwindowlink = 80,
- Beginpile = 81,
- Endpile = 82,
- Nextline = 83,
- Pastebutton = 84,
- Color = 85,
- Helppage = 86,
- Patch = 87,
- Radiobox = 88,
- ifrecond = 89,
- Math = 90,
- Mitem = 91,
- Pagename = 92,
- Examplenumber = 93,
- Replacepage = 94,
- Inputimage = 95,
- Spadgraph = 96,
- Indentrel = 97,
- Controlbitmap = 98,
- NumberUserTokens = 98,
+ openaxiom_Word_token = 1,
+ openaxiom_Page_token = 2,
+ openaxiom_Lispcommandquit_token = 3,
+ openaxiom_BoldFace_token = 4,
+ openaxiom_Link_token = 5,
+ openaxiom_Downlink_token = 6,
+ openaxiom_Beginscroll_token = 7,
+ openaxiom_Spadcommand_token = 8,
+ openaxiom_NoLines_token = 9,
+ openaxiom_Env_token = 10,
+ openaxiom_Par_token = 11,
+ openaxiom_Center_token = 12,
+ openaxiom_Begin_token = 13,
+ openaxiom_Beginitems_token = 14,
+ openaxiom_Item_token = 15,
+ openaxiom_Table_token = 16,
+ openaxiom_Box_token = 17,
+ openaxiom_Tab_token = 18,
+ openaxiom_Space_token = 19,
+ openaxiom_Indent_token = 20,
+ openaxiom_Horizontalline_token = 21,
+ openaxiom_Newline_token = 22,
+ openaxiom_Enditems_token = 23,
+ openaxiom_Returnbutton_token = 24,
+ openaxiom_Memolink_token = 25,
+ openaxiom_Upbutton_token = 26,
+ openaxiom_Endscroll_token = 27,
+ openaxiom_Thispage_token = 28,
+ openaxiom_Returnto_token = 29,
+ openaxiom_Free_token = 30,
+ openaxiom_Bound_token = 31,
+ openaxiom_Lisplink_token = 32,
+ openaxiom_Unixlink_token = 33,
+ openaxiom_Mbox_token = 34,
+ openaxiom_Inputstring_token = 35,
+ openaxiom_StringValue_token = 36,
+ openaxiom_Spadlink_token = 37,
+ openaxiom_Inputbitmap_token = 38,
+ openaxiom_Inputpixmap_token = 39,
+ openaxiom_Unixcommand_token = 40,
+ openaxiom_Emphasize_token = 41,
+ openaxiom_Lispcommand_token = 42,
+ openaxiom_LispMemoLink_token = 43,
+ openaxiom_LispDownLink_token = 44,
+ openaxiom_Spadcall_token = 45,
+ openaxiom_Spadcallquit_token = 46,
+ openaxiom_Spaddownlink_token = 47,
+ openaxiom_Spadmemolink_token = 48,
+ openaxiom_Qspadcall_token = 49,
+ openaxiom_Qspadcallquit_token = 50,
+ openaxiom_SimpleBox_token = 51,
+ openaxiom_Radioboxes_token = 52,
+ openaxiom_BoxValue_token = 53,
+ openaxiom_VSpace_token = 54,
+ openaxiom_HSpace_token = 55,
+ openaxiom_NewCommand_token = 56,
+ openaxiom_WindowId_token = 57,
+ openaxiom_Beep_token = 58,
+ openaxiom_Quitbutton_token = 59,
+ openaxiom_Begintitems_token = 60,
+ openaxiom_Titem_token = 61,
+ openaxiom_End_token = 62,
+ openaxiom_It_token = 63,
+ openaxiom_Sl_token = 64,
+ openaxiom_Tt_token = 65,
+ openaxiom_Rm_token = 66,
+ openaxiom_Ifcond_token = 67,
+ openaxiom_Else_token = 68,
+ openaxiom_Fi_token = 69,
+ openaxiom_Newcond_token = 70,
+ openaxiom_Setcond_token = 71,
+ openaxiom_Button_token = 72,
+ openaxiom_Windowlink_token = 73,
+ openaxiom_Haslisp_token = 74,
+ openaxiom_Hasup_token = 75,
+ openaxiom_Hasreturn_token = 76,
+ openaxiom_Hasreturnto_token = 77,
+ openaxiom_Lastwindow_token = 78,
+ openaxiom_Endtitems_token = 79,
+ openaxiom_Lispwindowlink_token = 80,
+ openaxiom_Beginpile_token = 81,
+ openaxiom_Endpile_token = 82,
+ openaxiom_Nextline_token = 83,
+ openaxiom_Pastebutton_token = 84,
+ openaxiom_Color_token = 85,
+ openaxiom_Helppage_token = 86,
+ openaxiom_Patch_token = 87,
+ openaxiom_Radiobox_token = 88,
+ openaxiom_ifrecond_token = 89,
+ openaxiom_Math_token = 90,
+ openaxiom_Mitem_token = 91,
+ openaxiom_Pagename_token = 92,
+ openaxiom_Examplenumber_token = 93,
+ openaxiom_Replacepage_token = 94,
+ openaxiom_Inputimage_token = 95,
+ openaxiom_Spadgraph_token = 96,
+ openaxiom_Indentrel_token = 97,
+ openaxiom_Controlbitmap_token = 98,
+ openaxiom_NumberUserTokens_token = 98,
/*
* Here are the system tokens. These are used internally to help
* with parsing and displaying of text
*/
- SystemTokens = 1001,
- Lbrace = 1001,
- Rbrace = 1002,
- Macro = 1003,
- Group = 1004,
- Scrollbar = 1005,
- Pound = 1006,
- Lsquarebrace = 1007,
- Rsquarebrace = 1008,
- Punctuation = 1009,
- Dash = 1010,
- Tableitem = 1011,
- Scrollingnode = 1012,
- Headernode = 1013,
- Footernode = 1014,
- Verbatim = 1015,
- Scroll = 1016,
- Dollar = 1017,
- Percent = 1018,
- Carrot = 1019,
- Underscore = 1020,
- Tilde = 1021,
- Cond = 1022,
- Noop = 1023,
- Description = 1024,
- Icorrection = 1025,
- Boxcond = 1026,
- Unkeyword = 1027,
- Titlenode = 1028,
- Paste = 1029,
- Spadsrc = 1030,
- Helpbutton = 1031,
- Spadsrctxt = 1032,
+ openaxiom_SystemTokens_token = 1001,
+ openaxiom_Lbrace_token = 1001,
+ openaxiom_Rbrace_token = 1002,
+ openaxiom_Macro_token = 1003,
+ openaxiom_Group_token = 1004,
+ openaxiom_Scrollbar_token = 1005,
+ openaxiom_Pound_token = 1006,
+ openaxiom_Lsquarebrace_token = 1007,
+ openaxiom_Rsquarebrace_token = 1008,
+ openaxiom_Punctuation_token = 1009,
+ openaxiom_Dash_token = 1010,
+ openaxiom_Tableitem_token = 1011,
+ openaxiom_Scrollingnode_token = 1012,
+ openaxiom_Headernode_token = 1013,
+ openaxiom_Footernode_token = 1014,
+ openaxiom_Verbatim_token = 1015,
+ openaxiom_Scroll_token = 1016,
+ openaxiom_Dollar_token = 1017,
+ openaxiom_Percent_token = 1018,
+ openaxiom_Carrot_token = 1019,
+ openaxiom_Underscore_token = 1020,
+ openaxiom_Tilde_token = 1021,
+ openaxiom_Cond_token = 1022,
+ openaxiom_Noop_token = 1023,
+ openaxiom_Description_token = 1024,
+ openaxiom_Icorrection_token = 1025,
+ openaxiom_Boxcond_token = 1026,
+ openaxiom_Unkeyword_token = 1027,
+ openaxiom_Titlenode_token = 1028,
+ openaxiom_Paste_token = 1029,
+ openaxiom_Spadsrc_token = 1030,
+ openaxiom_Helpbutton_token = 1031,
+ openaxiom_Spadsrctxt_token = 1032,
/*
* Here are the tokens used to mark the end to some sort of group of
* tokens. ie, the tokens found in a centerline command
*/
- Endtokens = 2000,
- End1 = 2001,
- End2 = 2002,
- Endbutton = 2003,
- Endlink = 2004,
- Endheader = 2005,
- Endfooter = 2006,
- Endscrolling = 2007,
- Endgroup = 2008,
- Endarg = 2009,
- Endbox = 2010,
- Endmbox = 2011,
- Endspadcommand = 2012,
- Endpix = 2013,
- Endmacro = 2014,
- Endparameter = 2015,
- Endtable = 2016,
- Endtableitem = 2017,
- End3 = 2018,
- Endif = 2019,
- Enddescription = 2020
- Endinputbox = 2021,
- Endtitle = 2022,
- Endpastebutton = 2023,
-
- Endtypes = 3000,
- Endpage = 3002,
- EndScroll = 3007, /* had to use a S because Endscroll is
- already a keyword */
-
- Endcenter = 3012,
- EndItems = 3014, /* Same thing here as EndScroll except
- with the i */
- EndTitems = 3060, /* Ibid for the T */
- Endpatch = 3087,
- Endverbatim = 4015,
- Endmath = 4016,
- Endpaste = 4029,
- Endspadsrc = 4030
+ openaxiom_Endtokens_token = 2000,
+ openaxiom_End1_token = 2001,
+ openaxiom_End2_token = 2002,
+ openaxiom_Endbutton_token = 2003,
+ openaxiom_Endlink_token = 2004,
+ openaxiom_Endheader_token = 2005,
+ openaxiom_Endfooter_token = 2006,
+ openaxiom_Endscrolling_token = 2007,
+ openaxiom_Endgroup_token = 2008,
+ openaxiom_Endarg_token = 2009,
+ openaxiom_Endbox_token = 2010,
+ openaxiom_Endmbox_token = 2011,
+ openaxiom_Endspadcommand_token = 2012,
+ openaxiom_Endpix_token = 2013,
+ openaxiom_Endmacro_token = 2014,
+ openaxiom_Endparameter_token = 2015,
+ openaxiom_Endtable_token = 2016,
+ openaxiom_Endtableitem_token = 2017,
+ openaxiom_End3_token = 2018,
+ openaxiom_Endif_token = 2019,
+ openaxiom_Enddescription_token = 2020,
+ openaxiom_Endinputbox_token = 2021,
+ openaxiom_Endtitle_token = 2022,
+ openaxiom_Endpastebutton_token = 2023,
+ openaxiom_Endtypes_token = 3000,
+ openaxiom_Endpage_token = 3002,
+ openaxiom_EndScroll_token = 3007, /* had to use a S because Endscroll is
+ already a keyword */
+ openaxiom_Endcenter_token = 3012,
+ openaxiom_EndItems_token = 3014, /* Same thing here as EndScroll except
+ with the i */
+ openaxiom_EndTitems_token = 3060, /* Ibid for the T */
+ openaxiom_Endpatch_token = 3087,
+ openaxiom_Endverbatim_token = 4015,
+ openaxiom_Endmath_token = 4016,
+ openaxiom_Endpaste_token = 4029,
+ openaxiom_Endspadsrc_token = 4030
} openaxiom_token_kind;
@@ -246,10 +244,10 @@ extern char *token_table[];
/* places from which input may be read */
typedef enum openaxiom_input_kind {
- FromFile = 1,
- FromString = 2,
- FromSpadSocket = 3,
- FromUnixFD = 4
+ openaxiom_FromFile_input = 1,
+ openaxiom_FromString_input = 2,
+ openaxiom_FromSpadSocket_input = 3,
+ openaxiom_FromUnixFD_input = 4
} openaxiom_input_kind;
extern FILE *unixfd;