[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] [build-improvements] Remove K&R cruft from src/lib
From: |
Gabriel Dos Reis |
Subject: |
Re: [Axiom-developer] [build-improvements] Remove K&R cruft from src/lib |
Date: |
22 Nov 2006 23:55:19 +0100 |
Gabriel Dos Reis <address@hidden> writes:
| While, I was looking at src/lib to gather unwritten assumptions made by
| the C programs, my eyes were glazing over the antiquated K&R C style
| declaration of functions. In 2006, we have no more reasons to write C
| codes that way. Especially, none for Axiom. While I was there, I saw
| various "broken" C codes, more on that latter.
For src/hyper.
-- Gaby
2006-11-21 Gabriel Dos Reis <address@hidden>
* addfile.pamphlet: Remove conditional K&R C style function
declaration.
* cond.pamphlet: Likewise.
* debug.pamphlet: Likewise.
* dialog.pamphlet: Likewise.
* display.pamphlet: Likewise.
* event.pamphlet: Likewise.
* ex2ht.pamphlet: Likewise.
* extent1.pamphlet: Likewise.
* extent2.pamphlet: Likewise.
* form-ext.pamphlet: Likewise.
* group.pamphlet: Likewise.
* halloc.pamphlet: Likewise.
* hash.pamphlet: Likewise.
* htadd.pamphlet: Likewise.
* hterror.pamphlet: Likewise.
* hthits.pamphlet: Likewise.
* htinp.pamphlet: Likewise.
* hyper.pamphlet: Likewise.
* initx.pamphlet: Likewise.
* input.pamphlet: Likewise.
* item.pamphlet: Likewise.
* keyin.pamphlet: Likewise.
* lex.pamphlet: Likewise.
* macro.pamphlet: Likewise.
* mem.pamphlet: Likewise.
* parse-aux.pamphlet: Likewise.
* parse-input.pamphlet: Likewise.
* parse-paste.pamphlet: Likewise.
* parse-types.pamphlet: Likewise.
* ReadBitmap.pamphlet: Likewise.
* scrollbar.pamphlet: Likewise.
* show-types.pamphlet: Likewise.
* spadbuf.pamphlet: Likewise.
* spadint.pamphlet: Likewise.
* titlebar.pamphlet: Likewise.
*** src/hyper/ReadBitmap.pamphlet (revision 16913)
--- src/hyper/ReadBitmap.pamphlet (local)
*************** been picked up by Unix so we change it g
*** 41,56 ****
*/
XImage *
! #ifdef _NO_PROTO
! HTReadBitmapFile(display, screen, filename, width, height)
! Display * display;
! int screen;
! char *filename;
! int *width;
! int *height;
! #else
! HTReadBitmapFile(Display *display,int screen,char * filename, int *width, int
*height)
! #endif
{
XImage *image;
FILE *fd;
--- 41,48 ----
*/
XImage *
! HTReadBitmapFile(Display *display,int screen,char * filename,
! int *width, int *height)
{
XImage *image;
FILE *fd;
*************** HTReadBitmapFile(Display *display,int sc
*** 162,176 ****
}
static int
- #ifdef _NO_PROTO
- read_hot(fd,Line,x_hot,y_hot)
- FILE * fd;
- char Line[];
- int *x_hot;
- int *y_hot;
- #else
read_hot(FILE *fd,char Line[],int *x_hot,int *y_hot)
- #endif
{
char Buff[256];
--- 154,160 ----
*************** read_hot(FILE *fd,char Line[],int *x_hot
*** 193,206 ****
}
static int
- #ifdef _NO_PROTO
- read_w_and_h(fd,width,height)
- FILE * fd;
- unsigned int *width;
- unsigned int *height;
- #else
read_w_and_h(FILE *fd,unsigned int *width,unsigned int *height)
- #endif
{
char Line[256], Buff[256];
--- 177,183 ----
*************** read_w_and_h(FILE *fd,unsigned int *widt
*** 236,247 ****
/* read a bitmap file into memory */
ImageStruct *
- #ifdef _NO_PROTO
- insert_image_struct(filename)
- char *filename;
- #else
insert_image_struct(char *filename)
- #endif
{
int bm_width, bm_height;
XImage *im;
--- 213,219 ----
*** src/hyper/addfile.pamphlet (revision 16913)
--- src/hyper/addfile.pamphlet (local)
*************** extern char *gDatabasePath;
*** 37,49 ****
char *gDatabasePath = NULL;
static int
- #ifndef _NO_PROTO
strpostfix(char *s, char *t)
- #else
- strpostfix(s,t)
- char *s;
- char *t;
- #endif
{
int slen = strlen(s), tlen = strlen(t);
--- 37,43 ----
*************** char *t;
*** 58,69 ****
/* extend_ht : just checks the name and adds a .ht if needed */
void
- #ifndef _NO_PROTO
extend_ht(char *name)
- #else
- extend_ht(name)
- char *name;
- #endif
{
if (!strpostfix(name, ".ht") && !strpostfix(name, ".pht"))
--- 52,58 ----
*************** char *name;
*** 82,93 ****
*/
static int
- #ifndef _NO_PROTO
build_ht_filename(char *fname, char *aname, char *name)
- #else
- build_ht_filename(fname,aname,name)
- char *fname,*aname,*name;
- #endif
{
char cdir[256];
char *c_dir;
--- 71,77 ----
*************** char *fname,*aname,*name;
*** 186,198 ****
}
static int
- #ifndef _NO_PROTO
pathname(char *name)
- #else
- pathname(name)
- char *name;
- #endif
-
{
while (*name)
if (*name++ == '/')
--- 170,176 ----
*************** char *name;
*** 204,215 ****
/** This procedure opens the proper HT file **/
FILE *
- #ifndef _NO_PROTO
ht_file_open(char *fname, char *aname, char *name)
- #else
- ht_file_open(fname,aname,name)
- char *fname,*aname,*name;
- #endif
{
FILE *ht_fp;
int ret_value;
--- 182,188 ----
*************** char *fname,*aname,*name;
*** 250,261 ****
FILE *
- #ifndef _NO_PROTO
db_file_open(char *db_file)
- #else
- db_file_open(db_file)
- char *db_file;
- #endif
{
static char *db_path_trace = NULL;
char *db_file_trace;
--- 223,229 ----
*************** char *db_file;
*** 311,322 ****
FILE *
- #ifndef _NO_PROTO
temp_file_open(char *temp_db_file)
- #else
- temp_file_open(temp_db_file)
- char *temp_db_file;
- #endif
{
FILE *temp_db_fp;
--- 279,285 ----
*** src/hyper/cond.pamphlet (revision 16913)
--- src/hyper/cond.pamphlet (local)
***************
*** 39,50 ****
void
- #ifndef _NO_PROTO
insert_cond(char *label, char *cond)
- #else
- insert_cond(label,cond)
- char *label,*cond;
- #endif
{
CondNode *condnode = (CondNode *) hash_find(gWindow->fCondHashTable,
label);
--- 39,45 ----
*************** char *label,*cond;
*** 66,77 ****
}
void
- #ifndef _NO_PROTO
change_cond(char *label, char *newcond)
- #else
- change_cond(label,newcond)
- char *label,newcond;
- #endif
{
CondNode *condnode = (CondNode *) hash_find(gWindow->fCondHashTable,
label);
--- 61,67 ----
*************** char *label,newcond;
*** 86,97 ****
}
static int
- #ifndef _NO_PROTO
check_memostack(TextNode *node)
- #else
- check_memostack(node)
- TextNode *node;
- #endif
{
char *buffer;
int stackp = gWindow->fMemoStackIndex;
--- 76,82 ----
*************** TextNode *node;
*** 114,125 ****
}
int
- #ifndef _NO_PROTO
check_condition(TextNode *node)
- #else
- check_condition(node)
- TextNode *node;
- #endif
{
CondNode *cond;
InputBox *box;
--- 99,105 ----
*** src/hyper/debug.pamphlet (revision 16913)
--- src/hyper/debug.pamphlet (local)
***************
*** 18,27 ****
#ifdef free
#undef free
! hfree(p)
! char *p;
{
! free(p);
}
#endif
--- 18,26 ----
#ifdef free
#undef free
! hfree(char *p)
{
! free(p);
}
#endif
*** src/hyper/dialog.pamphlet (revision 16913)
--- src/hyper/dialog.pamphlet (local)
***************
*** 46,56 ****
static void
- #ifdef _NO_PROTO
redraw_win()
- #else
- redraw_win(void)
- #endif
{
XUnmapSubwindows(gXDisplay, gWindow->fMainWindow);
XUnmapSubwindows(gXDisplay, gWindow->fScrollWindow);
--- 46,52 ----
*************** redraw_win(void)
*** 59,74 ****
}
static char *
- #ifndef _NO_PROTO
mystrncpy(char *buff1, char *buff2, int n)
- #else
- mystrncpy(buff1,buff2,n)
- char *buff1;
- char *buff2;
- int n;
- #endif
-
-
{
/*
* copies the characters from buff1 to buff2 starting at position buff2 +
--- 55,61 ----
*************** int n;
*** 83,107 ****
}
static void
- #ifndef _NO_PROTO
inc_line_numbers(LineStruct *line)
- #else
- inc_line_numbers(line)
- LineStruct *line;
- #endif
-
{
for (; line != NULL; line = line->next)
line->line_number++;
}
static void
- #ifndef _NO_PROTO
dec_line_numbers(LineStruct *line)
- #else
- dec_line_numbers(line)
- LineStruct *line;
- #endif
{
for (; line != NULL; line = line->next)
line->line_number--;
--- 70,83 ----
*************** LineStruct *line;
*** 109,135 ****
}
static void
- #ifndef _NO_PROTO
decrease_line_numbers(LineStruct *line, int am)
- #else
- decrease_line_numbers(line,am)
- LineStruct *line;
- int am;
- #endif
-
{
for (; line != NULL; line = line->next)
line->line_number -= am;
}
static void
- #ifndef _NO_PROTO
overwrite_buffer(char *buffer, InputItem *item)
- #else
- overwrite_buffer(buffer,item)
- char *buffer;
- InputItem *item;
- #endif
{
LineStruct *newline;
LineStruct *addline = item->curr_line;
--- 85,98 ----
*************** InputItem *item;
*** 207,222 ****
*/
static int
- #ifndef _NO_PROTO
move_sym_forward(LineStruct *line, int num, int size, InputItem *sym)
- #else
- move_sym_forward(line,num,size,sym)
- LineStruct *line;
- int num;
- int size;
- InputItem *sym;
- #endif
-
{
LineStruct *newline;
int diff;
--- 170,176 ----
*************** InputItem *sym;
*** 261,274 ****
}
static void
- #ifndef _NO_PROTO
clear_cursorline(InputItem *sym)
- #else
- clear_cursorline(sym)
- InputItem *sym;
- #endif
-
-
{
XCharStruct extents;
int dir, asc, des;
--- 215,221 ----
*************** InputItem *sym;
*** 287,299 ****
}
static void
- #ifndef _NO_PROTO
insert_buffer(char *buffer, InputItem *sym)
- #else
- insert_buffer(buffer,sym)
- char *buffer;
- InputItem *sym;
- #endif
{
/*int num = strlen(buffer);*/
LineStruct *line = sym->curr_line;
--- 234,240 ----
*************** InputItem *sym;
*** 387,400 ****
}
void
- #ifndef _NO_PROTO
add_buffer_to_sym(char *buffer,InputItem *sym)
- #else
- add_buffer_to_sym(buffer,sym)
- char *buffer;
- InputItem *sym;
- #endif
-
{
if (gInInsertMode)
insert_buffer(buffer, sym);
--- 328,334 ----
*************** InputItem *sym;
*** 403,415 ****
}
void
- #ifndef _NO_PROTO
draw_inputsymbol(InputItem *sym)
- #else
- draw_inputsymbol(sym)
- InputItem *sym;
- #endif
-
{
int y_spot = start_y;
LineStruct *cline;
--- 337,343 ----
*************** InputItem *sym;
*** 447,458 ****
}
void
- #ifndef _NO_PROTO
update_inputsymbol(InputItem *sym)
- #else
- update_inputsymbol(sym)
- InputItem *sym;
- #endif
{
int y_spot = start_y;
LineStruct *cline;
--- 375,381 ----
*************** InputItem *sym;
*** 498,509 ****
static void
- #ifndef _NO_PROTO
draw_cursor(InputItem *sym)
- #else
- draw_cursor(sym)
- InputItem *sym;
- #endif
{
int cursor_y;
XCharStruct extents;
--- 421,427 ----
*************** InputItem *sym;
*** 539,550 ****
}
static void
- #ifndef _NO_PROTO
move_cursor_home(InputItem *sym)
- #else
- move_cursor_home(sym)
- InputItem *sym;
- #endif
{
LineStruct *trace = sym->curr_line;
--- 457,463 ----
*************** InputItem *sym;
*** 558,569 ****
}
static void
- #ifndef _NO_PROTO
move_cursor_end(InputItem *sym)
- #else
- move_cursor_end(sym)
- InputItem *sym;
- #endif
{
LineStruct *trace = sym->curr_line;
--- 471,477 ----
*************** InputItem *sym;
*** 577,588 ****
}
static void
- #ifndef _NO_PROTO
move_cursor_forward(InputItem *sym)
- #else
- move_cursor_forward(sym)
- InputItem *sym;
- #endif
{
if (sym->curr_line->buff_pntr == sym->curr_line->len &&
!sym->curr_line->next) {
--- 485,491 ----
*************** InputItem *sym;
*** 618,629 ****
}
static void
- #ifndef _NO_PROTO
move_cursor_down(InputItem *sym)
- #else
- move_cursor_down(sym)
- InputItem *sym;
- #endif
{
int bp = sym->curr_line->buff_pntr;
/*int size = sym->size;*/
--- 521,527 ----
*************** InputItem *sym;
*** 648,659 ****
}
static void
- #ifndef _NO_PROTO
move_cursor_up(InputItem *sym)
- #else
- move_cursor_up(sym)
- InputItem *sym;
- #endif
{
int bp = sym->curr_line->buff_pntr;
/*int size = sym->size;*/
--- 546,552 ----
*************** InputItem *sym;
*** 679,690 ****
}
static void
- #ifndef _NO_PROTO
clear_cursor(InputItem *sym)
- #else
- clear_cursor(sym)
- InputItem *sym;
- #endif
{
XCharStruct extents;
int dir, asc, des;
--- 572,578 ----
*************** InputItem *sym;
*** 705,716 ****
}
static void
- #ifndef _NO_PROTO
move_cursor_backward(InputItem *sym)
- #else
- move_cursor_backward(sym)
- InputItem *sym;
- #endif
{
if (sym->curr_line->buff_pntr == 0) {
if (sym->curr_line->prev == NULL) {
--- 593,599 ----
*************** InputItem *sym;
*** 737,749 ****
}
static char
- #ifndef _NO_PROTO
move_rest_back(LineStruct *line, int size)
- #else
- move_rest_back(line,size)
- LineStruct *line;
- int size;
- #endif
{
char c = '\000';
--- 620,626 ----
*************** int size;
*** 778,789 ****
}
static void
- #ifndef _NO_PROTO
delete_rest_of_line(InputItem *sym)
- #else
- delete_rest_of_line(sym)
- InputItem *sym;
- #endif
{
LineStruct *curr_line = sym->curr_line;
LineStruct *line=NULL;
--- 655,661 ----
*************** InputItem *sym;
*** 852,863 ****
}
static void
- #ifndef _NO_PROTO
back_over_eoln(InputItem *sym)
- #else
- back_over_eoln(sym)
- InputItem *sym;
- #endif
{
/*
* This routine is very similar to a tough enter except it starts
--- 724,730 ----
*************** InputItem *sym;
*** 933,944 ****
}
static int
- #ifndef _NO_PROTO
move_back_one_char(InputItem *sym)
- #else
- move_back_one_char(sym)
- InputItem *sym;
- #endif
{
char c = '\000', d = '\000';
int dl = 0;
--- 800,806 ----
*************** InputItem *sym;
*** 1034,1057 ****
}
static void
- #ifndef _NO_PROTO
back_over_char(InputItem *sym)
- #else
- back_over_char(sym)
- InputItem *sym;
- #endif
{
if (move_back_one_char(sym))
update_inputsymbol(sym);
}
static void
- #ifndef _NO_PROTO
delete_eoln(InputItem *sym)
- #else
- delete_eoln(sym)
- InputItem *sym;
- #endif
{
/* much the same as back_over eoln except my perspective has changed */
char buff[1024];
--- 896,909 ----
*************** InputItem *sym;
*** 1120,1131 ****
}
static int
- #ifndef _NO_PROTO
delete_one_char(InputItem *sym)
- #else
- delete_one_char(sym)
- InputItem *sym;
- #endif
{
char c = '\000';
--- 972,978 ----
*************** InputItem *sym;
*** 1180,1203 ****
}
static void
- #ifndef _NO_PROTO
delete_char(InputItem *sym)
- #else
- delete_char(sym)
- InputItem *sym;
- #endif
{
if (delete_one_char(sym))
update_inputsymbol(sym);
}
static void
- #ifndef _NO_PROTO
tough_enter(InputItem *sym)
- #else
- tough_enter(sym)
- InputItem *sym;
- #endif
{
char buff[1024];
--- 1027,1040 ----
*************** InputItem *sym;
*** 1279,1290 ****
}
static void
- #ifndef _NO_PROTO
enter_new_line(InputItem *sym)
- #else
- enter_new_line(sym)
- InputItem *sym;
- #endif
{
LineStruct *newline;
LineStruct *trace;
--- 1116,1122 ----
*************** InputItem *sym;
*** 1365,1378 ****
}
void
- #ifndef _NO_PROTO
dialog(XEvent *event, KeySym keysym, char *buffer)
- #else
- dialog(event,keysym,buffer)
- XEvent *event;
- KeySym keysym;
- char *buffer;
- #endif
{
InputItem *item;
--- 1197,1203 ----
*** src/hyper/display.pamphlet (revision 16913)
--- src/hyper/display.pamphlet (local)
*************** int gRegionOffset = 0;
*** 65,76 ****
/* Display a HyperDoc page in the top-level window */
void
- #ifdef _NO_PROTO
- show_page(page)
- HyperDocPage *page;
- #else
show_page(HyperDocPage *page)
- #endif
{
XWindowChanges wc;
int doShowScrollBars = 1;
--- 65,71 ----
*************** show_page(HyperDocPage *page)
*** 171,182 ****
}
void
- #ifdef _NO_PROTO
- expose_page(page)
- HyperDocPage *page;
- #else
expose_page(HyperDocPage *page)
- #endif
{
int width, height, doShowScrollBars = 1;
init_top_group();
--- 166,172 ----
*************** expose_page(HyperDocPage *page)
*** 228,239 ****
}
void
- #ifdef _NO_PROTO
- scroll_page(page)
- HyperDocPage *page;
- #else
scroll_page(HyperDocPage *page)
- #endif
{
init_top_group();
/* free the active button list */
--- 218,224 ----
*************** scroll_page(HyperDocPage *page)
*** 251,262 ****
}
void
- #ifdef _NO_PROTO
- paste_page(node)
- TextNode *node;
- #else
paste_page(TextNode *node)
- #endif
{
int width, height;
int old_off = gWindow->page->scroll_off;
--- 236,242 ----
*** src/hyper/event.pamphlet (revision 16913)
--- src/hyper/event.pamphlet (local)
*************** static HyperLink *gSavedInputAreaLink =
*** 72,82 ****
*/
void
- #ifndef _NO_PROTO
mainEventLoop(void)
- #else
- mainEventLoop()
- #endif
{
XEvent event;
int Xcon;
--- 72,78 ----
*************** mainEventLoop()
*** 152,163 ****
}
static void
- #ifndef _NO_PROTO
handle_event(XEvent * event)
- #else
- handle_event(event)
- XEvent * event;
- #endif
{
XWindowAttributes wa;
/* fprintf(stderr,"event:handle_event entered\n");*/
--- 148,154 ----
*************** XEvent * event;
*** 270,280 ****
}
static void
- #ifndef _NO_PROTO
create_window(void)
- #else
- create_window()
- #endif
{
XWindowAttributes wa;
--- 261,267 ----
*************** create_window()
*** 299,309 ****
*/
void
- #ifndef _NO_PROTO
quitHyperDoc(void)
- #else
- quitHyperDoc()
- #endif
{
HyperDocPage *page;
--- 286,292 ----
*************** quitHyperDoc()
*** 336,347 ****
*/
static HyperDocPage *
- #ifndef _NO_PROTO
find_page(TextNode * node)
- #else
- find_page(node)
- TextNode * node;
- #endif
{
char *page_name;
HyperDocPage *page;
--- 319,325 ----
*************** TextNode * node;
*** 379,389 ****
/* pushes a page onto the down link stack */
static void
- #ifndef _NO_PROTO
downlink(void)
- #else
- downlink()
- #endif
{
if (gWindow->fDownLinkStackIndex == MaxDownlinkDepth)
fprintf(stderr, "exceeded maximum link nesting level\n");
--- 357,363 ----
*************** downlink()
*** 392,402 ****
}
static void
- #ifndef _NO_PROTO
memolink(void)
- #else
- memolink()
- #endif
{
if (gWindow->fMemoStackIndex == MaxMemoDepth)
fprintf(stderr, "exceeded maximum link nesting level\n");
--- 366,372 ----
*************** memolink()
*** 407,418 ****
}
static void
- #ifndef _NO_PROTO
killAxiomPage(HyperDocPage * page)
- #else
- killAxiomPage(page)
- HyperDocPage * page;
- #endif
{
char command[512];
--- 377,383 ----
*************** HyperDocPage * page;
*** 421,432 ****
}
static void
- #ifndef _NO_PROTO
kill_page(HyperDocPage * page)
- #else
- kill_page(page)
- HyperDocPage * page;
- #endif
{
page->scroll_off = 0;
if (page->type == SpadGen) {
--- 386,392 ----
*************** HyperDocPage * page;
*** 439,449 ****
/* pops the memo stack */
static HyperDocPage *
- #ifndef _NO_PROTO
returnlink(void)
- #else
- returnlink()
- #endif
{
int i;
--- 399,405 ----
*************** returnlink()
*** 468,478 ****
/* pops a page if it can from the downlink stack */
static HyperDocPage *
- #ifndef _NO_PROTO
uplink(void)
- #else
- uplink()
- #endif
{
if (gWindow->fDownLinkStackIndex == 0)
return returnlink();
--- 424,430 ----
*************** uplink()
*** 483,494 ****
}
static void
- #ifndef _NO_PROTO
windowlink_handler(TextNode * node)
- #else
- windowlink_handler(node)
- TextNode * node;
- #endif
{
char *page_name;
--- 435,441 ----
*************** TextNode * node;
*** 502,513 ****
}
void
- #ifndef _NO_PROTO
make_window_link(char *name)
- #else
- make_window_link(name)
- char *name;
- #endif
{
if (init_top_window(name) != -1)
{}/* gWindow->fWindowHashTable = gWindow->page->fLinkHashTable; */
--- 449,455 ----
*************** char *name;
*** 515,526 ****
static void
- #ifndef _NO_PROTO
lispwindowlink_handler(HyperLink * link)
- #else
- lispwindowlink_handler(link)
- HyperLink * link;
- #endif
{
/*
--- 457,463 ----
*************** HyperLink * link;
*** 540,551 ****
}
static HyperDocPage *
- #ifndef _NO_PROTO
paste_button(PasteNode * paste)
- #else
- paste_button(paste)
- PasteNode * paste;
- #endif
{
HyperDocPage *page = NULL;
int pastewhere=paste->where;
--- 477,483 ----
*************** PasteNode * paste;
*** 570,580 ****
}
void
- #ifndef _NO_PROTO
helpForHyperDoc(void)
- #else
- helpForHyperDoc()
- #endif
{
HyperDocPage *page = NULL;
--- 502,508 ----
*************** helpForHyperDoc()
*** 602,615 ****
}
static HyperLink *
- #ifndef _NO_PROTO
findButtonInList(HDWindow * window, int x, int y)
- #else
- findButtonInList(window,x,y)
- HDWindow * window;
- int x;
- int y;
- #endif
{
ButtonList *bl;
--- 530,536 ----
*************** int y;
*** 625,636 ****
}
static HyperLink *
- #ifndef _NO_PROTO
get_hyper_link(XButtonEvent * event)
- #else
- get_hyper_link(event)
- XButtonEvent * event;
- #endif
{
HyperLink *l1, *l2;
--- 546,552 ----
*************** XButtonEvent * event;
*** 647,659 ****
*/
static void
- #ifndef _NO_PROTO
handle_button(int button, XButtonEvent * event)
- #else
- handle_button(button,event)
- int button;
- XButtonEvent * event;
- #endif
{
HyperLink *link;
HyperDocPage *page = NULL;
--- 563,569 ----
*************** XButtonEvent * event;
*** 819,829 ****
void
- #ifndef _NO_PROTO
exitHyperDoc(void)
- #else
- exitHyperDoc()
- #endif
{
XEvent event;
--- 729,735 ----
*************** exitHyperDoc()
*** 863,874 ****
}
static int
- #ifndef _NO_PROTO
set_window(Window window)
- #else
- set_window(window)
- Window window;
- #endif
{
Window root, parent, *children, grandparent,myarg;
HDWindow *htw;
--- 769,775 ----
*************** ERROR:
*** 925,936 ****
* given routine
*/
static void
- #ifndef _NO_PROTO
clear_exposures(Window w)
- #else
- clear_exposures(w)
- Window w;
- #endif
{
XEvent report;
--- 826,832 ----
*************** Window w;
*** 938,948 ****
while (XCheckTypedWindowEvent(gXDisplay, w, Expose, &report));
}
void
- #ifndef _NO_PROTO
get_new_window(void)
- #else
- get_new_window()
- #endif
{
int val;
--- 834,840 ----
*************** get_new_window()
*** 1065,1077 ****
}
}
static void
- #ifndef _NO_PROTO
set_cursor(HDWindow *window,Cursor state)
- #else
- set_cursor(window, state)
- HDWindow *window;
- Cursor state;
- #endif
{
if (state == gBusyCursor)
XDefineCursor(gXDisplay, window->fMainWindow, gBusyCursor);
--- 957,963 ----
*************** Cursor state;
*** 1083,1095 ****
}
static void
- #ifndef _NO_PROTO
change_cursor(Cursor state, HDWindow *window)
- #else
- change_cursor(state,window)
- Cursor state;
- HDWindow *window;
- #endif
{
if (window->fDisplayedCursor == state)
return;
--- 969,975 ----
*************** HDWindow *window;
*** 1098,1109 ****
}
static void
- #ifndef _NO_PROTO
handle_motion_event(XMotionEvent *event)
- #else
- handle_motion_event(event)
- XMotionEvent *event;
- #endif
{
if (!gWindow)
return;
--- 978,984 ----
*************** XMotionEvent *event;
*** 1114,1125 ****
}
static void
- #ifndef _NO_PROTO
init_cursor_state(HDWindow *window)
- #else
- init_cursor_state(window)
- HDWindow *window;
- #endif
{
if (window) {
int x, y, rx, ry, but;
--- 989,995 ----
*************** HDWindow *window;
*** 1135,1179 ****
}
static void
- #ifndef _NO_PROTO
init_cursor_states(void)
- #else
- init_cursor_states()
- #endif
{
hash_map(&gSessionHashTable,(MappableFunction) init_cursor_state);
}
static void
- #ifndef _NO_PROTO
make_busy_cursor(HDWindow *window)
- #else
- make_busy_cursor(window)
- HDWindow *window;
- #endif
{
change_cursor(gBusyCursor, window);
}
static void
- #ifndef _NO_PROTO
make_busy_cursors(void)
- #else
- make_busy_cursors()
- #endif
{
hash_map(&gSessionHashTable, (MappableFunction)make_busy_cursor);
}
static int
- #ifndef _NO_PROTO
HyperDocErrorHandler(Display *display, XErrorEvent *xe)
- #else
- HyperDocErrorHandler(display,xe)
- Display *display;
- XErrorEvent *xe;
- #endif
{
if (xe->request_code != 15) {
char buf[1024];
--- 1005,1030 ----
*************** XErrorEvent *xe;
*** 1195,1205 ****
static void
- #ifndef _NO_PROTO
set_error_handlers(void)
- #else
- set_error_handlers()
- #endif
{
XSetErrorHandler(HyperDocErrorHandler);
}
--- 1046,1052 ----
*** src/hyper/ex2ht.pamphlet (revision 16913)
--- src/hyper/ex2ht.pamphlet (local)
*************** struct timeval latest_date[2] ={{0,0},{0
*** 44,56 ****
int
- #ifndef _NO_PROTO
main(int argc, char **argv)
- #else
- main(argc,argv)
- int argc;
- char **argv;
- #endif
{
int i;
--- 44,50 ----
*************** char **argv;
*** 69,80 ****
}
char *
- #ifdef _NO_PROTO
- allocString(s)
- char *s;
- #else
allocString(char *s)
- #endif
{
char *t = (char *) malloc(strlen(s) + 1);
--- 63,69 ----
*************** allocString(char *s)
*** 83,94 ****
}
char *
- #ifdef _NO_PROTO
- strPrefix(prefix, s)
- char *prefix, *s;
- #else
strPrefix(char *prefix, char *s)
- #endif
{
while (*prefix != '\0' && *prefix == *s) {
prefix++;
--- 72,78 ----
*************** strPrefix(char *prefix, char *s)
*** 100,112 ****
}
char *
- #ifdef _NO_PROTO
- getExTitle(inFile, line)
- FILE *inFile;
- char *line;
- #else
getExTitle(FILE *inFile, char *line)
- #endif
{
char *title;
--- 84,90 ----
*************** getExTitle(FILE *inFile, char *line)
*** 120,131 ****
}
void
- #ifdef _NO_PROTO
- exToHt(filename)
- char *filename;
- #else
exToHt(char *filename)
- #endif
{
char line[MaxLineLength], *line2;
char *title, *pagename;
--- 98,104 ----
*************** exToHt(char *filename)
*** 184,221 ****
}
void
- #ifdef _NO_PROTO
- emitHeader(outFile, pageName, pageTitle)
- FILE *outFile;
- char *pageName, *pageTitle;
- #else
emitHeader(FILE *outFile, char *pageName, char *pageTitle)
- #endif
{
fprintf(outFile, "\\begin{page}{%s}{%s}\n", pageName, pageTitle);
fprintf(outFile, "\\beginscroll\\beginmenu\n");
}
void
- #ifdef _NO_PROTO
- emitFooter(outFile)
- FILE *outFile;
- #else
emitFooter(FILE *outFile)
- #endif
{
fprintf(outFile, "\\endmenu\\endscroll\\end{page}\n");
}
/* s is pageName}{title} */
void
- #ifdef _NO_PROTO
- emitMenuEntry(line, outFile)
- char *line;
- FILE *outFile;
- #else
emitMenuEntry(char *line, FILE *outFile)
- #endif
{
char pageName[MaxLineLength], title[MaxLineLength];
char *p = pageName, *t = title;
--- 157,177 ----
*************** emitMenuEntry(char *line, FILE *outFile)
*** 231,243 ****
}
void
- #ifdef _NO_PROTO
- emitSpadCommand(line, prefix, outFile)
- char *line, *prefix;
- FILE *outFile;
- #else
emitSpadCommand(char *line, char *prefix, FILE *outFile)
- #endif
{
int braceCount = 1;
char command[MaxLineLength], *t = command;
--- 187,193 ----
*************** emitSpadCommand(char *line, char *prefix
*** 260,270 ****
FILE *coverFile;
void
- #ifdef _NO_PROTO
- openCoverPage()
- #else
openCoverPage(void)
- #endif
{
coverFile = fopen("coverex.ht", "w");
if (coverFile == NULL) {
--- 210,216 ----
*************** openCoverPage(void)
*** 277,297 ****
}
void
- #ifdef _NO_PROTO
- closeCoverPage()
- #else
closeCoverPage(void)
- #endif
{
fprintf(coverFile, "}\\endscroll\\end{page}\n\n");
}
void
- #ifdef _NO_PROTO
- closeCoverFile()
- #else
closeCoverFile(void)
- #endif
{
fclose(coverFile);
#ifdef HP9platform
--- 223,235 ----
*************** closeCoverFile(void)
*** 302,324 ****
}
void
- #ifdef _NO_PROTO
- emitCoverLink(name, title)
- char *name, *title;
- #else
emitCoverLink(char *name, char *title)
- #endif
{
fprintf(coverFile, "{\\downlink{%s}{%s}}\n", title, name);
}
void
- #ifdef _NO_PROTO
- addFile(filename)
- char *filename;
- #else
addFile(char *filename)
- #endif
{
FILE *file = fopen(filename, "r");
int c;
--- 240,252 ----
*** src/hyper/extent1.pamphlet (revision 16913)
--- src/hyper/extent1.pamphlet (local)
*************** TextNode *gLineNode;
*** 81,92 ****
*/
static void
- #ifndef _NO_PROTO
compute_input_extent(TextNode * node)
- #else
- compute_input_extent(node)
- TextNode * node;
- #endif
{
InputItem *item;
int t_width;
--- 81,87 ----
*************** TextNode * node;
*** 125,136 ****
}
static void
- #ifndef _NO_PROTO
compute_punctuation_extent(TextNode * node)
- #else
- compute_punctuation_extent(node)
- TextNode * node;
- #endif
{
int twidth;
int nextwidth;
--- 120,126 ----
*************** TextNode * node;
*** 191,202 ****
}
static void
- #ifndef _NO_PROTO
compute_word_extent(TextNode * node)
- #else
- compute_word_extent(node)
- TextNode * node;
- #endif
{
int twidth;
int nextwidth;
--- 181,187 ----
*************** TextNode * node;
*** 250,261 ****
}
static void
- #ifndef _NO_PROTO
compute_verbatim_extent(TextNode *node)
- #else
- compute_verbatim_extent(node)
- TextNode * node;
- #endif
{
node->height = normal_text_height;
node->width = strlen(node->data.text);
--- 235,241 ----
*************** TextNode * node;
*** 267,278 ****
}
static void
- #ifndef _NO_PROTO
compute_spadsrctxt_extent(TextNode *node)
- #else
- compute_spadsrctxt_extent(node)
- TextNode * node;
- #endif
{
node->height = normal_text_height;
node->width = strlen(node->data.text);
--- 247,253 ----
*************** TextNode * node;
*** 288,300 ****
}
static void
- #ifndef _NO_PROTO
compute_dash_extent(TextNode *node)
- #else
- compute_dash_extent(node)
- TextNode * node;
- #endif
-
{
int num_dashes;
int twidth;
--- 263,269 ----
*************** TextNode * node;
*** 352,363 ****
}
void
- #ifndef _NO_PROTO
compute_text_extent(TextNode *node)
- #else
- compute_text_extent(node)
- TextNode * node;
- #endif
{
for (; node != NULL; node = node->next) {
switch (node->type) {
--- 321,327 ----
*************** TextNode * node;
*** 683,694 ****
}
static void
- #ifndef _NO_PROTO
compute_begin_items_extent(TextNode * node)
- #else
- compute_begin_items_extent(node)
- TextNode * node;
- #endif
{
int store_x, store_y, lh;
--- 647,653 ----
*************** TextNode * node;
*** 722,733 ****
}
static void
- #ifndef _NO_PROTO
compute_item_extent(TextNode * node)
- #else
- compute_item_extent(node)
- TextNode * node;
- #endif
{
if (gInLine)
start_newline(present_line_height, node);
--- 681,687 ----
*************** TextNode * node;
*** 735,746 ****
}
static void
- #ifndef _NO_PROTO
compute_mitem_extent(TextNode *node)
- #else
- compute_mitem_extent(node)
- TextNode * node;
- #endif
{
if (gInLine) {
start_newline(present_line_height, node);
--- 689,695 ----
*************** TextNode * node;
*** 749,760 ****
}
static void
- #ifndef _NO_PROTO
endif_extent(TextNode *node)
- #else
- endif_extent(node)
- TextNode * node;
- #endif
{
/*
* This node has the responsibilty for updating text_x and text_y so that
--- 698,704 ----
*************** TextNode * node;
*** 767,778 ****
}
static void
- #ifndef _NO_PROTO
compute_ifcond_extent(TextNode *node)
- #else
- compute_ifcond_extent(node)
- TextNode * node;
- #endif
{
TextNode *condnode = node->data.ifnode->cond;
TextNode *tln = gLineNode;
--- 711,717 ----
*************** TextNode * node;
*** 838,849 ****
}
static void
- #ifndef _NO_PROTO
compute_center_extent(TextNode * node)
- #else
- compute_center_extent(node)
- TextNode * node;
- #endif
{
if (gInLine)
start_newline(present_line_height, node);
--- 777,783 ----
*************** TextNode * node;
*** 859,870 ****
}
static void
- #ifndef _NO_PROTO
compute_bf_extent(TextNode *node)
- #else
- compute_bf_extent(node)
- TextNode * node;
- #endif
{
if (gInLine && node->space)
text_x += inter_word_space;
--- 793,799 ----
*************** TextNode * node;
*** 874,885 ****
}
static void
- #ifndef _NO_PROTO
compute_em_extent(TextNode *node)
- #else
- compute_em_extent(node)
- TextNode * node;
- #endif
{
if (gInLine && node->space)
text_x += inter_word_space;
--- 803,809 ----
*************** TextNode * node;
*** 892,903 ****
}
static void
- #ifndef _NO_PROTO
compute_it_extent(TextNode *node)
- #else
- compute_it_extent(node)
- TextNode * node;
- #endif
{
if (gInLine && node->space)
text_x += inter_word_space;
--- 816,822 ----
*************** TextNode * node;
*** 906,917 ****
}
static void
- #ifndef _NO_PROTO
compute_rm_extent(TextNode *node)
- #else
- compute_rm_extent(node)
- TextNode * node;
- #endif
{
if (gInLine && node->space)
text_x += inter_word_space;
--- 825,831 ----
*************** TextNode * node;
*** 921,932 ****
}
static void
- #ifndef _NO_PROTO
compute_button_extent(TextNode *node)
- #else
- compute_button_extent(node)
- TextNode * node;
- #endif
{
int twidth;
/*int store_x = text_x;*/
--- 835,841 ----
*************** TextNode * node;
*** 952,963 ****
}
static void
- #ifndef _NO_PROTO
endbutton_extent(TextNode *node)
- #else
- endbutton_extent(node)
- TextNode * node;
- #endif
{
int temp;
int height;
--- 861,867 ----
*************** TextNode * node;
*** 993,1004 ****
}
static void
- #ifndef _NO_PROTO
compute_pastebutton_extent(TextNode *node)
- #else
- compute_pastebutton_extent(node)
- TextNode * node;
- #endif
{
int twidth;
--- 897,903 ----
*************** TextNode * node;
*** 1024,1035 ****
}
static void
- #ifndef _NO_PROTO
endpastebutton_extent(TextNode *node)
- #else
- endpastebutton_extent(node)
- TextNode * node;
- #endif
{
int temp;
int height;
--- 923,929 ----
*************** TextNode * node;
*** 1057,1068 ****
}
static void
- #ifndef _NO_PROTO
compute_paste_extent(TextNode *node)
- #else
- compute_paste_extent(node)
- TextNode * node;
- #endif
{
if (gInLine) {
start_newline(present_line_height, node);
--- 951,957 ----
*************** TextNode * node;
*** 1076,1087 ****
/* Compute the text extent of a spadcommand node */
static void
- #ifndef _NO_PROTO
compute_spadcommand_extent(TextNode *node)
- #else
- compute_spadcommand_extent(node)
- TextNode * node;
- #endif
{
/*
* From now on if there is an example which will take over a line, then
--- 965,971 ----
*************** TextNode * node;
*** 1113,1124 ****
}
static void
- #ifndef _NO_PROTO
compute_spadsrc_extent(TextNode *node)
- #else
- compute_spadsrc_extent(node)
- TextNode * node;
- #endif
{
/*
* From now on if there is an example which will take over a line, then
--- 997,1003 ----
*************** TextNode * node;
*** 1144,1155 ****
}
static void
- #ifndef _NO_PROTO
end_spadcommand_extent(TextNode *node)
- #else
- end_spadcommand_extent(node)
- TextNode * node;
- #endif
{
int temp;
int height;
--- 1023,1029 ----
*************** TextNode * node;
*** 1179,1190 ****
}
static void
- #ifndef _NO_PROTO
end_spadsrc_extent(TextNode *node)
- #else
- end_spadsrc_extent(node)
- TextNode * node;
- #endif
{
int temp;
int height;
--- 1053,1059 ----
*************** TextNode * node;
*** 1214,1225 ****
}
static void
- #ifndef _NO_PROTO
compute_mbox_extent(TextNode *node)
- #else
- compute_mbox_extent(node)
- TextNode * node;
- #endif
{
node->width = text_width(node->next, Endmbox);
--- 1083,1089 ----
*************** TextNode * node;
*** 1234,1245 ****
}
static void
- #ifndef _NO_PROTO
compute_box_extent(TextNode *node)
- #else
- compute_box_extent(node)
- TextNode * node;
- #endif
{
int t_width;
--- 1098,1104 ----
*************** TextNode * node;
*** 1268,1279 ****
}
static void
- #ifndef _NO_PROTO
compute_ir_extent(TextNode *node)
- #else
- compute_ir_extent(node)
- TextNode * node;
- #endif
{
int t_width;
--- 1127,1133 ----
*************** TextNode * node;
*** 1308,1319 ****
/* read a bitmap file into memory */
static void
- #ifndef _NO_PROTO
compute_image_extent(TextNode *node)
- #else
- compute_image_extent(node)
- TextNode * node;
- #endif
{
if (text_x + node->width > right_margin) {
start_newline(present_line_height, node);
--- 1162,1168 ----
*************** TextNode * node;
*** 1336,1347 ****
*/
static void
- #ifndef _NO_PROTO
compute_table_extent(TextNode **node)
- #else
- compute_table_extent(node)
- TextNode ** node;
- #endif
{
int num_cols, num_lines;
int max_width = 0, node_width, col_width;
--- 1185,1191 ----
*************** TextNode ** node;
*** 1400,1411 ****
}
void
- #ifndef _NO_PROTO
compute_title_extent(HyperDocPage *page)
- #else
- compute_title_extent(page)
- HyperDocPage *page;
- #endif
{
right_margin_space = non_scroll_right_margin_space;
page->title->height = twheight + gWindow->border_width;
--- 1244,1250 ----
*************** HyperDocPage *page;
*** 1419,1430 ****
}
void
- #ifndef _NO_PROTO
compute_header_extent(HyperDocPage *page)
- #else
- compute_header_extent(page)
- HyperDocPage *page;
- #endif
{
/*
--- 1258,1264 ----
*************** HyperDocPage *page;
*** 1455,1466 ****
}
void
- #ifndef _NO_PROTO
compute_footer_extent(HyperDocPage * page)
- #else
- compute_footer_extent(page)
- HyperDocPage * page;
- #endif
{
if (page->footer) {
gExtentRegion = Footer;
--- 1289,1295 ----
*************** HyperDocPage * page;
*** 1484,1495 ****
}
void
- #ifndef _NO_PROTO
compute_scrolling_extent(HyperDocPage *page)
- #else
- compute_scrolling_extent(page)
- HyperDocPage *page;
- #endif
{
/* Check to see if there is a scrolling region */
--- 1313,1319 ----
*** src/hyper/extent2.pamphlet (revision 16913)
--- src/hyper/extent2.pamphlet (local)
*************** static int max_x_value = 0;
*** 42,54 ****
*/
void
- #ifndef _NO_PROTO
start_newline(int distance, TextNode * node)
- #else
- start_newline(distance,node)
- int distance;
- TextNode * node;
- #endif
{
if (gLineNode != NULL) {
if (gTopOfGroupStack->center)
--- 42,48 ----
*************** TextNode * node;
*** 67,79 ****
*/
static void
- #ifndef _NO_PROTO
center_nodes(TextNode * begin_node, TextNode * end_node)
- #else
- center_nodes(begin_node,end_node)
- TextNode * begin_node;
- TextNode * end_node;
- #endif
{
int begin_x, end_x, wmid_x, offset, mid_x;
TextNode *node;
--- 61,67 ----
*************** TextNode * end_node;
*** 94,105 ****
}
static int
- #ifndef _NO_PROTO
punctuation_width(TextNode * node)
- #else
- punctuation_width(node)
- TextNode * node;
- #endif
{
int twidth, width = strlen(node->data.text);
--- 82,88 ----
*************** TextNode * node;
*** 126,137 ****
}
static int
- #ifndef _NO_PROTO
input_string_width(TextNode * node)
- #else
- input_string_width(node)
- TextNode * node;
- #endif
{
InputItem *item;
int t_width;
--- 109,115 ----
*************** TextNode * node;
*** 149,160 ****
}
static int
- #ifndef _NO_PROTO
word_width(TextNode * node)
- #else
- word_width(node)
- TextNode * node;
- #endif
{
int twidth, len = strlen(node->data.text);
--- 127,133 ----
*************** TextNode * node;
*** 166,177 ****
}
static int
- #ifndef _NO_PROTO
verbatim_width(TextNode * node)
- #else
- verbatim_width(node)
- TextNode * node;
- #endif
{
int twidth, len = strlen(node->data.text);
--- 139,145 ----
*************** TextNode * node;
*** 183,194 ****
}
static int
- #ifndef _NO_PROTO
width_of_dash(TextNode * node)
- #else
- width_of_dash(node)
- TextNode * node;
- #endif
{
int num_dashes, twidth;
--- 151,157 ----
*************** TextNode * node;
*** 209,221 ****
*/
int
- #ifndef _NO_PROTO
text_width(TextNode * node, int Ender)
- #else
- text_width(node,Ender)
- TextNode * node;
- int Ender;
- #endif
{
int twidth = 0, num_words;
--- 172,178 ----
*************** int Ender;
*** 407,419 ****
*/
int
- #ifndef _NO_PROTO
total_width(TextNode * node, int Ender)
- #else
- total_width(node,Ender)
- TextNode * node;
- int Ender;
- #endif
{
int twidth = 0;
--- 364,370 ----
*************** int Ender;
*** 511,521 ****
*/
void
- #ifndef _NO_PROTO
init_extents(void)
- #else
- init_extents()
- #endif
{
present_line_height = line_height;
gInLine = 0;
--- 462,468 ----
*************** init_extents()
*** 536,547 ****
*/
void
- #ifndef _NO_PROTO
init_title_extents(HyperDocPage * page)
- #else
- init_title_extents(page)
- HyperDocPage * page;
- #endif
{
present_line_height = line_height;
gInLine = 0;
--- 483,489 ----
*************** HyperDocPage * page;
*** 562,572 ****
*/
void
- #ifndef _NO_PROTO
init_text(void)
- #else
- init_text()
- #endif
{
normal_text_height = gRmFont->ascent + gRmFont->descent;
line_height = gRmFont->ascent + gRmFont->descent + inter_line_space;
--- 504,510 ----
*************** init_text()
*** 579,591 ****
*/
int
- #ifndef _NO_PROTO
text_height(TextNode * node, int Ender)
- #else
- text_height(node,Ender)
- TextNode * node;
- int Ender;
- #endif
{
cur_height = 0;
return text_height1(node, Ender);
--- 517,523 ----
*************** int Ender;
*** 596,608 ****
*/
static int
- #ifndef _NO_PROTO
text_height1(TextNode * node, int Ender)
- #else
- text_height1(node,Ender)
- TextNode * node;
- int Ender;
- #endif
{
for (; node != NULL; node = node->next) {
if (Ender == Endtokens) {
--- 528,534 ----
*************** int Ender;
*** 728,740 ****
*/
int
- #ifndef _NO_PROTO
max_x(TextNode * node, int Ender)
- #else
- max_x(node,Ender)
- TextNode * node;
- int Ender;
- #endif
{
max_x_value = 0;
for (; node != NULL; node = node->next) {
--- 654,660 ----
*************** int Ender;
*** 811,822 ****
}
static int
- #ifndef _NO_PROTO
x_value(TextNode * node)
- #else
- x_value(node)
- TextNode * node;
- #endif
{
for (; node != NULL; node = node->next) {
switch (node->type) {
--- 731,737 ----
*************** TextNode * node;
*** 872,883 ****
*/
int
- #ifndef _NO_PROTO
trailing_space(TextNode * node)
- #else
- trailing_space(node)
- TextNode * node;
- #endif
{
int space = 0;
--- 787,793 ----
*************** TextNode * node;
*** 893,904 ****
*/
void
- #ifndef _NO_PROTO
insert_bitmap_file(TextNode * node)
- #else
- insert_bitmap_file(node)
- TextNode * node;
- #endif
{
char *filename = node->data.text;
int bm_width, bm_height;
--- 803,809 ----
*************** TextNode * node;
*** 941,952 ****
*/
void
- #ifndef _NO_PROTO
insert_pixmap_file(TextNode * node)
- #else
- insert_pixmap_file(node)
- TextNode * node;
- #endif
{
char *filename = node->data.text;
int bm_width, bm_height, ret_val;
--- 846,852 ----
*************** TextNode * node;
*** 994,1005 ****
*/
int
- #ifndef _NO_PROTO
plh(int height)
- #else
- plh(height)
- int height;
- #endif
{
int rheight = height;
--- 894,900 ----
*** src/hyper/form-ext.pamphlet (revision 16913)
--- src/hyper/form-ext.pamphlet (local)
***************
*** 28,39 ****
*/
void
- #ifndef _NO_PROTO
compute_form_page(HyperDocPage *page)
- #else
- compute_form_page(page)
- HyperDocPage *page;
- #endif
{
/*
--- 28,34 ----
*************** HyperDocPage *page;
*** 57,80 ****
* of columns given
*/
int
- #ifndef _NO_PROTO
window_width(int cols)
- #else
- window_width(cols)
- int cols;
- #endif
{
return (left_margin + cols * space_width + non_scroll_right_margin_space);
}
static int
- #ifndef _NO_PROTO
window_height(HyperDocPage *page)
- #else
- window_height(page)
- HyperDocPage *page;
- #endif
{
int temp;
--- 52,65 ----
*************** HyperDocPage *page;
*** 88,99 ****
static void
- #ifndef _NO_PROTO
form_header_extent(HyperDocPage *page)
- #else
- form_header_extent(page)
- HyperDocPage *page;
- #endif
{
/*
--- 73,79 ----
*************** HyperDocPage *page;
*** 112,123 ****
}
static void
- #ifndef _NO_PROTO
form_footer_extent(HyperDocPage *page)
- #else
- form_footer_extent(page)
- HyperDocPage *page;
- #endif
{
if (page->footer) {
gExtentRegion = Footer;
--- 92,98 ----
*************** HyperDocPage *page;
*** 139,150 ****
}
static void
- #ifndef _NO_PROTO
form_scrolling_extent(HyperDocPage *page)
- #else
- form_scrolling_extent(page)
- HyperDocPage *page;
- #endif
{
/*
--- 114,120 ----
*** src/hyper/group.pamphlet (revision 16913)
--- src/hyper/group.pamphlet (local)
*************** GroupItem *gTopOfGroupStack = NULL;
*** 45,55 ****
int
- #ifndef _NO_PROTO
pop_group_stack(void)
- #else
- pop_group_stack()
- #endif
{
/* This routine pops the top of the current group stack */
GroupItem *junk;
--- 45,51 ----
*************** pop_group_stack()
*** 77,87 ****
}
void
- #ifndef _NO_PROTO
push_group_stack(void)
- #else
- push_group_stack()
- #endif
{
/*
* This routine makes room by pushing a new item on the stack
--- 73,79 ----
*************** push_group_stack()
*** 98,108 ****
}
void
- #ifndef _NO_PROTO
init_group_stack(void)
- #else
- init_group_stack()
- #endif
{
gTopOfGroupStack = (GroupItem *) halloc(sizeof(GroupItem), "Push Group
Stack");
gTopOfGroupStack->center = 0;
--- 90,96 ----
*************** init_group_stack()
*** 112,122 ****
}
void
- #ifndef _NO_PROTO
em_top_group(void)
- #else
- em_top_group()
- #endif
{
if (! gTopOfGroupStack->next)
push_group_stack();
--- 100,106 ----
*************** em_top_group()
*** 126,136 ****
}
void
- #ifndef _NO_PROTO
rm_top_group(void)
- #else
- rm_top_group()
- #endif
{
if (! gTopOfGroupStack->next)
push_group_stack();
--- 110,116 ----
*************** rm_top_group()
*** 141,151 ****
}
void
- #ifndef _NO_PROTO
line_top_group(void)
- #else
- line_top_group()
- #endif
{
if (! gTopOfGroupStack->next)
push_group_stack();
--- 121,127 ----
*************** line_top_group()
*** 156,166 ****
}
void
- #ifndef _NO_PROTO
bf_top_group(void)
- #else
- bf_top_group()
- #endif
{
/*
* Just in case the person is tryin a \em without a grouping
--- 132,138 ----
*************** bf_top_group()
*** 174,184 ****
}
void
- #ifndef _NO_PROTO
tt_top_group(void)
- #else
- tt_top_group()
- #endif
{
if (! gTopOfGroupStack->next)
push_group_stack();
--- 146,152 ----
*************** tt_top_group()
*** 188,198 ****
}
void
- #ifndef _NO_PROTO
push_active_group(void)
- #else
- push_active_group()
- #endif
{
push_group_stack();
gTopOfGroupStack->cur_font = gActiveFont;
--- 156,162 ----
*************** push_active_group()
*** 201,211 ****
}
void
- #ifndef _NO_PROTO
push_spad_group(void)
- #else
- push_spad_group()
- #endif
{
push_group_stack();
gTopOfGroupStack->cur_font = gAxiomFont;
--- 165,171 ----
*************** push_spad_group()
*** 214,224 ****
}
void
- #ifndef _NO_PROTO
init_top_group(void)
- #else
- init_top_group()
- #endif
{
/* clear the group stack */
while (pop_group_stack() >= 0)
--- 174,180 ----
*************** init_top_group()
*** 232,253 ****
}
void
- #ifndef _NO_PROTO
center_top_group(void)
- #else
- center_top_group()
- #endif
{
push_group_stack();
gTopOfGroupStack->center = 1;
}
GroupItem *
- #ifndef _NO_PROTO
copy_group_stack(void)
- #else
- copy_group_stack()
- #endif
{
GroupItem *newgp = NULL;
GroupItem *first = NULL;
--- 188,201 ----
*************** copy_group_stack()
*** 272,283 ****
}
void
- #ifndef _NO_PROTO
free_group_stack(GroupItem *g)
- #else
- free_group_stack(g)
- GroupItem *g;
- #endif
{
GroupItem *trace = g;
--- 220,226 ----
*** src/hyper/halloc.pamphlet (revision 16913)
--- src/hyper/halloc.pamphlet (local)
*************** FILE *fp;
*** 27,39 ****
/* allocate memory and bomb if none left (HyperDoc alloc) */
char *
- #ifndef _NO_PROTO
halloc(int bytes, char *msg)
- #else
- halloc(bytes,msg)
- int bytes;
- char *msg;
- #endif
{
static char buf[200];
char *result;
--- 27,33 ----
*** src/hyper/hash.pamphlet (revision 16913)
--- src/hyper/hash.pamphlet (local)
***************
*** 26,40 ****
/* initialize a hash table */
void
! #ifndef _NO_PROTO
! hash_init(HashTable *table, int size, EqualFunction equal, HashcodeFunction
hash_code)
! #else
! hash_init(table,size,equal,hash_code)
! HashTable *table;
! int size;
! EqualFunction equal;
! HashcodeFunction hash_code;
! #endif
{
int i;
--- 26,33 ----
/* initialize a hash table */
void
! hash_init(HashTable *table, int size, EqualFunction equal,
! HashcodeFunction hash_code)
{
int i;
*************** HashcodeFunction hash_code;
*** 49,61 ****
}
void
- #ifndef _NO_PROTO
free_hash(HashTable *table, FreeFunction free_fun)
- #else
- free_hash(table,free_fun)
- HashTable *table;
- FreeFunction free_fun;
- #endif
{
if (table) {
int i;
--- 42,48 ----
*************** FreeFunction free_fun;
*** 78,91 ****
/* insert an entry into a hash table */
void
- #ifndef _NO_PROTO
hash_insert(HashTable *table, char *data, char *key)
- #else
- hash_insert(table,data,key)
- HashTable *table;
- char *data;
- char *key;
- #endif
{
HashEntry *entry = (HashEntry *) halloc(sizeof(HashEntry), "HashEntry");
int code;
--- 65,71 ----
*************** char *key;
*** 102,114 ****
}
char *
- #ifndef _NO_PROTO
hash_find(HashTable *table, char *key)
- #else
- hash_find(table,key)
- HashTable *table;
- char *key;
- #endif
{
HashEntry *entry;
int code = table->hash_code(key, table->size) % table->size;
--- 82,88 ----
*************** char *key;
*** 120,133 ****
}
char *
- #ifndef _NO_PROTO
hash_replace(HashTable *table, char *data, char *key)
- #else
- hash_replace(table,data,key)
- HashTable *table;
- char *data;
- char *key;
- #endif
{
HashEntry *entry;
int code = table->hash_code(key, table->size) % table->size;
--- 94,100 ----
*************** char *key;
*** 141,153 ****
}
void
- #ifndef _NO_PROTO
hash_delete(HashTable *table, char *key)
- #else
- hash_delete(table,key)
- HashTable *table;
- char *key;
- #endif
{
HashEntry **entry;
int code = table->hash_code(key, table->size) % table->size;
--- 108,114 ----
*************** char *key;
*** 161,173 ****
}
void
- #ifndef _NO_PROTO
hash_map(HashTable *table, MappableFunction func)
- #else
- hash_map(table,func)
- HashTable *table;
- MappableFunction func;
- #endif
{
int i;
HashEntry *e;
--- 122,128 ----
*************** MappableFunction func;
*** 180,191 ****
}
HashEntry *
- #ifndef _NO_PROTO
hash_copy_entry(HashEntry *e)
- #else
- hash_copy_entry(e)
- HashEntry *e;
- #endif
{
HashEntry *ne;
--- 135,141 ----
*************** HashEntry *e;
*** 200,211 ****
/* copy a hash table */
HashTable *
- #ifndef _NO_PROTO
hash_copy_table(HashTable *table)
- #else
- hash_copy_table(table)
- HashTable *table;
- #endif
{
HashTable *nt = (HashTable *) halloc(sizeof(HashTable), "copy hash
table");
int i;
--- 150,156 ----
*************** HashTable *table;
*** 223,235 ****
/* hash code function for strings */
int
- #ifndef _NO_PROTO
string_hash(char *s, int size)
- #else
- string_hash(s,size)
- char *s;
- int size;
- #endif
{
int c = 0;
char *p =s;
--- 168,174 ----
*************** int size;
*** 243,266 ****
/* test strings for equality */
int
- #ifndef _NO_PROTO
string_equal(char *s1, char *s2)
- #else
- string_equal(s1,s2)
- char *s1,*s2;
- #endif
{
return (strcmp(s1, s2) == 0);
}
/* make a fresh copy of the given string */
char *
- #ifndef _NO_PROTO
alloc_string(char *str)
- #else
- alloc_string(str)
- char *str;
- #endif
{
char * result;
result = halloc(strlen(str)+1,"String");
--- 182,195 ----
*** src/hyper/htadd.pamphlet (revision 16913)
--- src/hyper/htadd.pamphlet (local)
*************** int fresh = 0;
*** 82,94 ****
int
- #ifndef _NO_PROTO
main(int argc, char **argv)
- #else
- main(argc,argv)
- int argc;
- char **argv;
- #endif
{
/*int i;*/
char db_dir[256]; /* the directory where the db file is */
--- 82,88 ----
*************** char **argv;
*** 128,142 ****
static void
- #ifndef _NO_PROTO
parse_args(char **argv, char *db_dir, char **filenames, short *fl)
- #else
- parse_args(argv,db_dir, filenames,fl)
- char **argv;
- char *db_dir;
- char **filenames;
- short *fl;
- #endif
{
*fl = 0;
--- 122,128 ----
*************** short *fl;
*** 178,189 ****
static int
- #ifndef _NO_PROTO
writable(struct stat buff)
- #else
- writable(buff)
- struct stat buff;
- #endif
{
#ifdef DEBUG
unsigned short uid = geteuid(), gid = getegid();
--- 164,170 ----
*************** struct stat buff;
*** 212,225 ****
static int
- #ifndef _NO_PROTO
build_db_filename(short flag, char *db_dir, char *dbfilename)
- #else
- build_db_filename(flag, db_dir,dbfilename)
- short flag;
- char *db_dir;
- char *dbfilename;
- #endif
{
int ret_status;
struct stat buff;
--- 193,199 ----
*************** char *dbfilename;
*** 286,299 ****
****/
static void
- #ifndef _NO_PROTO
add_file(char *dbname, char *name, int fresh)
- #else
- add_file(dbname, name, fresh)
- char *dbname;
- char *name;
- int fresh;
- #endif
{
char fullname[256];
char temp_db_file[256];
--- 260,266 ----
*************** int fresh;
*** 341,358 ****
}
static void
- #ifndef _NO_PROTO
update_db(FILE *db, FILE *temp_db, FILE *new_file,
char *addname, char *fullname, int fresh)
- #else
- update_db(db,temp_db,new_file,addname,fullname, fresh)
- FILE *db;
- FILE *temp_db;
- FILE *new_file;
- char *addname;
- char *fullname;
- int fresh;
- #endif
{
char *fname;
int c, file_there = 0, mtime;
--- 308,315 ----
*************** int fresh;
*** 406,420 ****
#define ptype(c, t) (strcpy(c, t));
static void
- #ifndef _NO_PROTO
add_new_pages(FILE *temp_db, FILE *new_file, char *addname, char *fullname)
- #else
- add_new_pages(temp_db,new_file,addname,fullname)
- FILE *temp_db;
- FILE *new_file;
- char *addname;
- char *fullname;
- #endif
{
char type[15];
int pos;
--- 363,369 ----
*************** char *fullname;
*** 464,475 ****
}
static void
- #ifndef _NO_PROTO
copy_file(char *f1, char *f2)
- #else
- copy_file(f1, f2)
- char *f1,*f2;
- #endif
{
FILE *fp1, *fp2;
int c;
--- 413,419 ----
*************** char *f1,*f2;
*** 491,501 ****
static void
- #ifdef _NO_PROTO
- get_filename()
- #else
get_filename(void)
- #endif
{
int c, ws;
static char buffer[256];
--- 435,441 ----
*************** get_filename(void)
*** 529,540 ****
}
static int
- #ifndef _NO_PROTO
delete_file(char *dbname, char *name)
- #else
- delete_file(dbname,name)
- char *dbname,*name;
- #endif
{
char temp_db_file[256];
FILE *db_fp, *temp_db_fp;
--- 469,475 ----
*************** char *dbname,*name;
*** 564,577 ****
}
static void
- #ifndef _NO_PROTO
delete_db(FILE *db, FILE *temp_db, char *name)
- #else
- delete_db(db,temp_db,name)
- FILE *db;
- FILE *temp_db;
- char *name;
- #endif
{
char *fname;
int c/*, file_there = 0*/, mtime;
--- 499,505 ----
*** src/hyper/hterror.pamphlet (revision 16913)
--- src/hyper/hterror.pamphlet (local)
*************** jmp_buf jmpbuf;
*** 50,61 ****
*/
void
- #ifndef _NO_PROTO
jump(void)
- #else
- jump()
- #endif
-
{
if (gWindow == NULL)
exit(-1);
--- 50,56 ----
*************** jump()
*** 65,75 ****
}
void
- #ifndef _NO_PROTO
print_page_and_filename(void)
- #else
- print_page_and_filename()
- #endif
{
char obuff[128];
--- 60,66 ----
*************** print_page_and_filename()
*** 100,110 ****
void
- #ifndef _NO_PROTO
print_next_ten_tokens(void)
- #else
- print_next_ten_tokens()
- #endif
{
int i;
int v;
--- 91,97 ----
*************** print_next_ten_tokens()
*** 121,131 ****
/* print out a token value */
void
- #ifndef _NO_PROTO
print_token(void)
- #else
- print_token()
- #endif
{
if (token.type == Word)
printf("%s ", token.id);
--- 108,114 ----
*************** print_token()
*** 138,149 ****
void
- #ifndef _NO_PROTO
token_name(int type)
- #else
- token_name(type)
- int type;
- #endif
{
if (type <= NumberUserTokens)
strcpy(ebuffer, token_table[type]);
--- 121,127 ----
*************** token_name(type)
*** 216,228 ****
}
}
void
- #ifndef _NO_PROTO
htperror(char *msg, int errno)
- #else
- htperror(msg, errno)
- char *msg;
- int errno;
- #endif
{
char obuff[256];
--- 194,200 ----
*** src/hyper/hthits.pamphlet (revision 16913)
--- src/hyper/hthits.pamphlet (local)
*************** int gverifydates=0;
*** 83,95 ****
regex_t reg_pattern;
int
- #ifdef _NO_PROTO
- main(argc, argv)
- int argc;
- char **argv;
- #else
main(int argc,char ** argv)
- #endif
{
cmdline(argc, argv);
--- 83,89 ----
*************** main(int argc,char ** argv)
*** 100,112 ****
}
void
- #ifdef _NO_PROTO
- cmdline(argc, argv)
- int argc;
- char **argv;
- #else
cmdline(int argc,char ** argv)
- #endif
{
progName = argv[0];
--- 94,100 ----
*************** cmdline(int argc,char ** argv)
*** 120,130 ****
}
void
- #ifdef _NO_PROTO
- handleHtdb()
- #else
handleHtdb(void)
- #endif
{
FILE *htdbFile;
int c;
--- 108,114 ----
*************** handleHtdb(void)
*** 145,156 ****
void
- #ifdef _NO_PROTO
- handleFile(htdbFile)
- FILE *htdbFile;
- #else
handleFile(FILE *htdbFile)
- #endif
{
static PgInfo *pgInfoV = 0;
static int pgInfoC = 0;
--- 129,135 ----
*************** handleFile(FILE *htdbFile)
*** 256,269 ****
}
void
- #ifdef _NO_PROTO
- handleFilePages(fname, pgc, pgv)
- char *fname;
- int pgc;
- PgInfo *pgv;
- #else
handleFilePages(char *fname, int pgc, PgInfo *pgv)
- #endif
{
FILE *infile;
int i;
--- 235,241 ----
*************** handleFilePages(char *fname, int pgc, Pg
*** 283,295 ****
}
void
- #ifdef _NO_PROTO
- handlePage(infile, pg)
- FILE *infile;
- PgInfo *pg;
- #else
handlePage(FILE *infile,PgInfo * pg)
- #endif
{
static char *pgBuf = 0;
static int pgBufSize = 0;
--- 255,261 ----
*************** handlePage(FILE *infile,PgInfo * pg)
*** 327,338 ****
}
void
- #ifdef _NO_PROTO
- searchPage(pgname, pgtitle, pgbody)
- char *pgname, *pgtitle, *pgbody;
- #else
searchPage(char *pgname,char * pgtitle,char * pgbody)
- #endif
{
char *bodyrest;
regmatch_t match_pos;
--- 293,299 ----
*************** searchPage(char *pgname,char * pgtitle,c
*** 360,372 ****
*/
void
- #ifdef _NO_PROTO
- squirt(s, n)
- char *s;
- int n;
- #else
squirt(char *s, int n)
- #endif
{
register char *t, *e;
int c;
--- 321,327 ----
*************** squirt(char *s, int n)
*** 388,401 ****
* Any newlines and separator characters in the title are changed to blanks.
*/
void
- #ifdef _NO_PROTO
- splitpage(buf, ptitle, pbody)
- char *buf;
- char **ptitle; /* output: Title of page */
- char **pbody; /* output: Body of page */
- #else
splitpage(char *buf, char **ptitle, char **pbody)
- #endif
{
int n, depth, tno;
char *s;
--- 343,349 ----
*************** splitpage(char *buf, char **ptitle, char
*** 430,441 ****
void
- #ifdef _NO_PROTO
- untexbuf(s)
- register char *s;
- #else
untexbuf(register char *s)
- #endif
{
register char *d = s;
--- 378,384 ----
*************** untexbuf(register char *s)
*** 467,489 ****
}
void
- #ifdef _NO_PROTO
- badDB()
- #else
badDB(void)
- #endif
{
fprintf(stderr, "%s: bad database file %s\n", progName, htdbFName);
exit(1);
}
void
- #ifdef _NO_PROTO
- regerr(code)
- int code;
- #else
regerr(int code)
- #endif
{
fprintf(stderr, "%s: regular expression error %d for \"%s\"\n",
progName, code, pattern);
--- 410,423 ----
*** src/hyper/htinp.pamphlet (revision 16913)
--- src/hyper/htinp.pamphlet (local)
*************** char buf_for_record_commands[256];
*** 47,57 ****
void
- #ifndef _NO_PROTO
make_record(void)
- #else
- make_record()
- #endif
{
int i;
for (i=0;i<input_file_count;i++){
--- 47,53 ----
*************** make_record()
*** 72,82 ****
}
void
- #ifndef _NO_PROTO
verify_record(void)
- #else
- verify_record()
- #endif
{
int i;
for (i=0;i<input_file_count;i++){
--- 68,74 ----
*************** verify_record()
*** 97,107 ****
void
- #ifndef _NO_PROTO
ht2_input(void)
- #else
- ht2_input()
- #endif
{
HashTable *table;
HashEntry *entry;
--- 89,95 ----
*************** ht2_input()
*** 123,134 ****
}
static char *
- #ifndef _NO_PROTO
make_input_file_name(char *buf, char *filename)
- #else
- make_input_file_name(buf, filename)
- char *buf, *filename;
- #endif
{
char *b, *c;
--- 111,117 ----
*************** char *buf, *filename;
*** 142,153 ****
}
static char *
- #ifndef _NO_PROTO
make_paste_file_name(char *buf, char *filename)
- #else
- make_paste_file_name(buf, filename)
- char *buf, *filename;
- #endif
{
char *b, *c;
--- 125,131 ----
*************** char *buf, *filename;
*** 161,172 ****
}
static void
- #ifndef _NO_PROTO
make_the_input_file(UnloadedPage *page)
- #else
- make_the_input_file(page)
- UnloadedPage *page;
- #endif
{
char buf[1024], *b;
--- 139,145 ----
*************** UnloadedPage *page;
*** 188,199 ****
int example_number;
static void
- #ifndef _NO_PROTO
make_input_file_from_page(HyperDocPage *page)
- #else
- make_input_file_from_page(page)
- HyperDocPage *page;
- #endif
{
TextNode *node;
int starting_file = 1,/* i,*/ /*len,*/ ret_val;
--- 161,167 ----
*************** HyperDocPage *page;
*** 276,287 ****
}
char *
- #ifndef _NO_PROTO
strCopy(char *s)
- #else
- strCopy(s)
- char *s;
- #endif
{
char *b = halloc(strlen(s) + 1,"String");
--- 244,250 ----
*************** char *s;
*** 290,301 ****
}
static int
- #ifndef _NO_PROTO
inListAndNewer(char *inputFile, char *htFile)
- #else
- inListAndNewer(inputFile, htFile)
- char *htFile, *inputFile;
- #endif
{
int ret_val, found = 0, i;
struct stat htBuf, inputBuf;
--- 253,259 ----
*************** char *htFile, *inputFile;
*** 350,360 ****
}
static void
- #ifndef _NO_PROTO
make_input_file_list(void)
- #else
- make_input_file_list()
- #endif
{
int i;
char buf[256], *name;
--- 308,314 ----
*************** make_input_file_list()
*** 367,379 ****
}
void
- #ifndef _NO_PROTO
print_paste_line(FILE *pfile,char *str)
- #else
- print_paste_line(pfile, str)
- FILE *pfile;
- char *str;
- #endif
{
char *free = "\\free", *bound = "\\bound", *f = free, *b = bound;
int justSaw = 0;
--- 321,327 ----
*************** char *str;
*** 406,419 ****
void
- #ifndef _NO_PROTO
get_spad_output(FILE *pfile,char *command,int com_type)
- #else
- get_spad_output(pfile, command, com_type)
- FILE *pfile;
- char *command;
- int com_type;
- #endif
{
int n, i;
char buf[1024];
--- 354,360 ----
*************** int com_type;
*** 435,447 ****
* health of the viewport. We do this after the (|close|).
*/
void
- #ifndef _NO_PROTO
get_graph_output(char *command,char *pagename,int com_type)
- #else
- get_graph_output(command, pagename, com_type)
- char *command, *pagename;
- int com_type;
- #endif
{
int n, i;
char buf[1024];
--- 376,382 ----
*************** int com_type;
*** 461,473 ****
get_int(spad_socket);
}
static void
- #ifndef _NO_PROTO
send_command(char *command,int com_type)
- #else
- send_command(command, com_type)
- char *command;
- int com_type;
- #endif
{
char buf[1024];
--- 396,402 ----
*************** int com_type;
*** 494,507 ****
}
static void
- #ifndef _NO_PROTO
print_paste(FILE *pfile,char *realcom,char *command,char *pagename,int
com_type)
- #else
- print_paste(pfile, realcom, command, pagename, com_type)
- FILE *pfile;
- char *realcom, *command, *pagename;
- int com_type;
- #endif
{
fprintf(pfile, "\\begin{patch}{%sPatch%d}\n", pagename, example_number);
fprintf(pfile, "\\begin{paste}{%sFull%d}{%sEmpty%d}\n",
--- 423,429 ----
*************** int com_type;
*** 528,541 ****
fflush(pfile);
}
static void
- #ifndef _NO_PROTO
print_graph_paste(FILE *pfile,char *realcom,char *command,char *pagename,int
com_type)
- #else
- print_graph_paste(pfile, realcom, command, pagename, com_type)
- FILE *pfile;
- char *realcom, *command, *pagename;
- int com_type;
- #endif
{
fprintf(pfile, "\\begin{patch}{%sPatch%d}\n", pagename, example_number);
fprintf(pfile, "\\begin{paste}{%sFull%d}{%sEmpty%d}\n",
--- 450,456 ----
*** src/hyper/hyper.pamphlet (revision 16913)
--- src/hyper/hyper.pamphlet (local)
*************** int input_file_count;
*** 690,713 ****
*/
void
- #ifdef _NO_PROTO
- sigusr2_handler(sig)
- int sig;
- #else
sigusr2_handler(int sig)
- #endif
{
gIsEndOfOutput = 1;
return ;
}
void
- #ifdef _NO_PROTO
- sigcld_handler(sig)
- int sig;
- #else
sigcld_handler(int sig)
- #endif
{
/* why were we waiting after the child had already died ??
--- 690,703 ----
*************** extern jmp_buf env;
*** 723,733 ****
/* Clean up spad sockets on exit */
void
- #ifdef _NO_PROTO
- clean_socket()
- #else
clean_socket(void )
- #endif
{
char name[256];
--- 713,719 ----
*************** clean_socket(void )
*** 741,753 ****
*/
int
- #ifndef _NO_PROTO
main(int argc, char **argv)
- #else
- main(argc,argv)
- int argc;
- char **argv;
- #endif
{
int ret_status;
--- 727,733 ----
*************** char **argv;
*** 873,883 ****
*/
static void
- #ifdef _NO_PROTO
- init_hash()
- #else
init_hash(void)
- #endif
{
hash_init(&gFileHashTable,
FileHashSize,
--- 853,859 ----
*************** init_hash(void)
*** 896,907 ****
/* initialize the HyperDoc page hierarchy data structures */
void
- #ifndef _NO_PROTO
init_page_structs(HDWindow *w)
- #else
- init_page_structs(w)
- HDWindow *w;
- #endif
{
int i;
--- 872,878 ----
*************** HDWindow *w;
*** 916,926 ****
}
static void
- #ifdef _NO_PROTO
- check_arguments()
- #else
check_arguments(void)
- #endif
{
int i;
--- 887,893 ----
*************** check_arguments(void)
*** 970,980 ****
}
static void
- #ifdef _NO_PROTO
- make_server_connections()
- #else
make_server_connections(void)
- #endif
{
int i, wait_time;
--- 937,943 ----
*** src/hyper/initx.pamphlet (revision 16913)
--- src/hyper/initx.pamphlet (local)
*************** int gBorderColor; /* The Border Colo
*** 111,121 ****
/* Initialize the X Window System */
void
- #ifdef _NO_PROTO
- initializeWindowSystem()
- #else
initializeWindowSystem(void)
- #endif
{
char *display_name = NULL;
XColor fg, bg;
--- 111,117 ----
*************** initializeWindowSystem(void)
*** 205,216 ****
*/
int
- #ifndef _NO_PROTO
init_top_window(char *name)
- #else
- init_top_window(name)
- char *name;
- #endif
{
HyperDocPage *page;
XSetWindowAttributes wa; /* The X attributes structure */
--- 201,207 ----
*************** char *name;
*** 260,270 ****
/* Create and initialize a form HyperDoc window */
static void
- #ifdef _NO_PROTO
- open_form_window()
- #else
open_form_window(void)
- #endif
{
int x, y, width, height;
unsigned int fwidth = 0, fheight = 0;
--- 251,257 ----
*************** open_form_window(void)
*** 336,348 ****
int
- #ifndef _NO_PROTO
init_form_window(char *name, int cols)
- #else
- init_form_window(name,cols)
- char *name;
- int cols;
- #endif
{
XSetWindowAttributes wa; /* The X attributes structure */
--- 323,329 ----
*************** int cols;
*** 376,386 ****
static void
- #ifdef _NO_PROTO
- set_name_and_icon()
- #else
set_name_and_icon(void)
- #endif
{
char *icon_name = "HyperDoc";
char *s;
--- 357,363 ----
*************** set_name_and_icon(void)
*** 413,423 ****
}
static int
- #ifdef _NO_PROTO
- get_border_properties()
- #else
get_border_properties(void)
- #endif
{
char *bwidth;
/*char *bc = NULL;*/
--- 390,396 ----
*************** get_border_properties(void)
*** 456,467 ****
/* Create and initialize the HyperDoc window */
static void
- #ifndef _NO_PROTO
open_window(Window w)
- #else
- open_window(w)
- Window w;
- #endif
{
int x = 0, y = 0;
/*int border_width = 2;*/
--- 429,435 ----
*************** Window w;
*** 521,532 ****
***/
static void
- #ifndef _NO_PROTO
set_size_hints(Window w)
- #else
- set_size_hints(w)
- Window w;
- #endif
{
int x, y;
unsigned int width, height;
--- 489,495 ----
*************** Pixmap stipple;
*** 618,629 ****
/* Create the graphics contexts to be used for all drawing operations */
static void
- #ifndef _NO_PROTO
get_GCs(HDWindow *window)
- #else
- get_GCs(window)
- HDWindow *window;
- #endif
{
/*unsigned long valuemask = 0;*/
XGCValues values;
--- 581,587 ----
*************** HDWindow *window;
*** 670,682 ****
/* Load a font and store the information in the font_info parameter */
static void
- #ifndef _NO_PROTO
load_font(XFontStruct **font_info, char *fontname)
- #else
- load_font(font_info,fontname)
- XFontStruct **font_info;
- char *fontname;
- #endif
{
if ((*font_info = XLoadQueryFont(gXDisplay, fontname)) == NULL) {
fprintf(stderr, "(HyperDoc) Cannot load font %s ; using default.\n",
--- 628,634 ----
*************** char *fontname;
*** 708,718 ****
*/
static void
- #ifdef _NO_PROTO
- ingItColors_and_fonts()
- #else
ingItColors_and_fonts(void)
- #endif
{
char property[256];
char *prop = &property[0];
--- 660,666 ----
*************** ingItColors_and_fonts(void)
*** 911,924 ****
}
void
- #ifndef _NO_PROTO
change_text(int color, XFontStruct *font)
- #else
- change_text(color,font)
- int color;
- XFontStruct *font;
- #endif
-
{
if (font) {
XGCValues gcv;
--- 859,865 ----
*************** XFontStruct *font;
*** 940,954 ****
*/
static int
- #ifndef _NO_PROTO
get_color(char *name, char *class, int def, Colormap *map)
- #else
- get_color(name,class,def,map)
- char *name;
- char *class;
- int def;
- Colormap *map;
- #endif
{
char fullname[256];
char fullclass[256];
--- 881,887 ----
*************** Colormap *map;
*** 997,1007 ****
static void
- #ifdef _NO_PROTO
- mergeDatabases()
- #else
mergeDatabases(void)
- #endif
{
XrmDatabase homeDB, serverDB, applicationDB;
char filenamebuf[1024];
--- 930,936 ----
*************** mergeDatabases(void)
*** 1051,1062 ****
int
- #ifdef _NO_PROTO
- is_it_850(fontarg)
- XFontStruct *fontarg;
- #else
is_it_850(XFontStruct *fontarg)
- #endif
{
char *s;
int i,val;
--- 980,986 ----
*** src/hyper/input.pamphlet (revision 16913)
--- src/hyper/input.pamphlet (local)
***************
*** 23,35 ****
void
- #ifndef _NO_PROTO
fill_box(Window w,ImageStruct * image)
- #else
- fill_box(w, image)
- Window w;
- ImageStruct *image;
- #endif
{
XClearWindow(gXDisplay, w);
XPutImage(gXDisplay, w, gWindow->fControlGC,
--- 23,29 ----
*************** fill_box(w, image)
*** 39,50 ****
}
void
- #ifndef _NO_PROTO
toggle_input_box(HyperLink *link)
- #else
- toggle_input_box(link)
- HyperLink *link;
- #endif
{
InputBox *box;
--- 33,39 ----
*************** toggle_input_box(link)
*** 61,72 ****
}
void
- #ifndef _NO_PROTO
toggle_radio_box(HyperLink *link)
- #else
- toggle_radio_box(link)
- HyperLink *link;
- #endif
{
InputBox *box;
--- 50,56 ----
*************** toggle_radio_box(link)
*** 87,98 ****
}
static void
- #ifndef _NO_PROTO
clear_rbs(InputBox *list)
- #else
- clear_rbs(list)
- InputBox *list;
- #endif
{
InputBox *trace = list;
--- 71,77 ----
*************** clear_rbs(list)
*** 105,116 ****
}
}
void
- #ifndef _NO_PROTO
change_input_focus(HyperLink *link)
- #else
- change_input_focus(link)
- HyperLink *link;
- #endif
{
InputItem *new_item = link->reference.string;
InputItem *old_item = gWindow->page->current_item;
--- 84,90 ----
*************** change_input_focus(link)
*** 138,148 ****
update_inputsymbol(new_item);
}
void
- #ifdef _NO_PROTO
- next_input_focus()
- #else
next_input_focus(void)
- #endif
{
InputItem *old_item = gWindow->page->current_item, *new_item, *trace;
--- 112,118 ----
*************** next_input_focus(void)
*** 169,179 ****
draw_inputsymbol(new_item);
}
void
- #ifdef _NO_PROTO
- prev_input_focus()
- #else
prev_input_focus(void)
- #endif
{
InputItem *old_item = gWindow->page->current_item, *new_item, *trace;
--- 139,145 ----
*************** prev_input_focus(void)
*** 211,222 ****
}
InputItem *
- #ifndef _NO_PROTO
return_item(char *name)
- #else
- return_item(name)
- char *name;
- #endif
{
InputItem *list;
--- 177,183 ----
*************** return_item(name)
*** 229,240 ****
return NULL;
}
int
- #ifndef _NO_PROTO
delete_item(char *name)
- #else
- delete_item(name)
- char *name;
- #endif
{
InputItem *list;
InputItem *prev = NULL;
--- 190,196 ----
*** src/hyper/item.pamphlet (revision 16913)
--- src/hyper/item.pamphlet (local)
*************** ItemStack *gTopOfItemStack = NULL;
*** 25,35 ****
void
- #ifdef _NO_PROTO
- push_item_stack()
- #else
push_item_stack(void)
- #endif
{
ItemStack *is = (ItemStack *) halloc(sizeof(ItemStack), "Item stack");
--- 25,31 ----
*************** push_item_stack(void)
*** 41,51 ****
return;
}
void
- #ifdef _NO_PROTO
- clear_item_stack()
- #else
clear_item_stack(void)
- #endif
{
ItemStack *is = gTopOfItemStack, *chuck;
--- 37,43 ----
*************** clear_item_stack(void)
*** 57,67 ****
return;
}
void
- #ifdef _NO_PROTO
- pop_item_stack()
- #else
pop_item_stack(void)
- #endif
{
ItemStack *chuck;
--- 49,55 ----
*************** pop_item_stack(void)
*** 78,88 ****
}
ItemStack *
- #ifdef _NO_PROTO
- copy_item_stack()
- #else
copy_item_stack(void)
- #endif
{
ItemStack *new = NULL;
ItemStack *prev = NULL;
--- 66,72 ----
*************** copy_item_stack(void)
*** 107,118 ****
}
void
- #ifdef _NO_PROTO
- free_item_stack(is)
- ItemStack *is;
- #else
free_item_stack(ItemStack *is)
- #endif
{
ItemStack *junk = NULL;
ItemStack *trace = is;
--- 91,97 ----
*** src/hyper/keyin.pamphlet (revision 16913)
--- src/hyper/keyin.pamphlet (local)
*************** static char *protected_quit;
*** 93,104 ****
HyperLink *quitLink; /** the global link to the quit page ***/
void
- #ifndef _NO_PROTO
handle_key(XEvent *event)
- #else
- handle_key(event)
- XEvent *event;
- #endif
{
char key_buffer[20];
int key_buffer_size = 20;
--- 93,99 ----
*************** XEvent *event;
*** 246,256 ****
*/
void
- #ifdef _NO_PROTO
- init_keyin()
- #else
init_keyin(void)
- #endif
{
char *prop;
--- 241,247 ----
*** src/hyper/lex.pamphlet (revision 16913)
--- src/hyper/lex.pamphlet (local)
*************** dumpToken("fnname",token)
*** 20,32 ****
There is no return value.
<<dumptoken function>>=
void
- #ifndef _NO_PROTO
- dumpToken(caller,t)
- char *caller;
- Token t;
- #else
dumpToken(char *caller, Token t)
- #endif
{ fprintf(stderr,"%s:dumpToken type=%s id=%s\n",
caller,token_table[t.type],t.id);
}
--- 20,26 ----
*************** static HashTable tokenHashTable;
*** 128,138 ****
/* initialize the parser keyword hash table */
void
- #ifdef _NO_PROTO
- parser_init()
- #else
parser_init(void)
- #endif
{
int i;
Token *toke;
--- 122,128 ----
*************** parser_init(void)
*** 155,165 ****
/* initialize the lexical scanner to read from a file */
void
- #ifdef _NO_PROTO
- init_scanner()
- #else
init_scanner(void)
- #endif
{
if (getenv("HTASCII")) {
useAscii = (strcmp(getenv("HTASCII"), "yes") == 0);
--- 145,151 ----
*************** init_scanner(void)
*** 185,195 ****
/* save the current state of the scanner */
void
- #ifdef _NO_PROTO
- save_scanner_state()
- #else
save_scanner_state(void)
- #endif
{
StateNode *new_item = (StateNode *) halloc((sizeof(StateNode)),
"StateNode");
--- 171,177 ----
*************** save_scanner_state(void)
*** 209,219 ****
/* restore the saved scanner state */
void
- #ifdef _NO_PROTO
- restore_scanner_state()
- #else
restore_scanner_state(void)
- #endif
{
StateNode *x = top_state_node;
--- 191,197 ----
*************** restore_scanner_state(void)
*** 240,251 ****
/* return the character to the input stream. */
void
- #ifdef _NO_PROTO
- unget_char(c)
- int c;
- #else
unget_char(int c)
- #endif
{
if (c == '\n')
line_number--;
--- 218,224 ----
*************** unget_char(int c)
*** 253,263 ****
}
int
- #ifdef _NO_PROTO
- get_char()
- #else
get_char(void)
- #endif
{
int c;
--- 226,232 ----
*************** char * read_again = 0;
*** 308,318 ****
/* return the next character in the input stream */
static int
- #ifdef _NO_PROTO
- get_char1()
- #else
get_char1(void)
- #endif
{
int c;
int cmd;
--- 277,283 ----
*************** Token unget_toke;
*** 391,401 ****
/* return current token to the input stream */
void
- #ifdef _NO_PROTO
- unget_token()
- #else
unget_token(void)
- #endif
{
last_token = 1;
unget_toke.type = token.type;
--- 356,362 ----
*************** unget_token(void)
*** 404,414 ****
int
- #ifdef _NO_PROTO
- get_token()
- #else
get_token(void)
- #endif
{
int c, ws;
int nls = 0;
--- 365,371 ----
*************** BeStruct *top_be_stack;
*** 584,596 ****
void
- #ifdef _NO_PROTO
- push_be_stack(type, id)
- int type;
- char *id;
- #else
push_be_stack(int type,char * id)
- #endif
{
BeStruct *be = (BeStruct *) halloc(sizeof(BeStruct), "BeginENd stack");
--- 541,547 ----
*************** push_be_stack(int type,char * id)
*** 603,615 ****
return;
}
void
- #ifdef _NO_PROTO
- check_and_pop_be_stack(type, id)
- int type;
- char *id;
- #else
check_and_pop_be_stack(int type,char * id)
- #endif
{
BeStruct *x;
--- 554,560 ----
*************** check_and_pop_be_stack(int type,char * i
*** 641,651 ****
}
int
- #ifdef _NO_PROTO
- clear_be_stack()
- #else
clear_be_stack(void)
- #endif
{
BeStruct *x = top_be_stack, *y;
--- 586,592 ----
*************** clear_be_stack(void)
*** 659,670 ****
}
int
- #ifdef _NO_PROTO
- be_type(which)
- char *which;
- #else
be_type(char *which)
- #endif
{
Token store;
--- 600,606 ----
*************** be_type(char *which)
*** 735,745 ****
}
int
- #ifdef _NO_PROTO
- begin_type()
- #else
begin_type(void)
- #endif
{
/*Token store;*/
int ret_val;
--- 671,677 ----
*************** begin_type(void)
*** 775,785 ****
int
- #ifdef _NO_PROTO
- end_type()
- #else
end_type(void)
- #endif
{
int ret;
--- 707,713 ----
*************** end_type(void)
*** 827,837 ****
static int
- #ifdef _NO_PROTO
- keyword_type()
- #else
keyword_type(void)
- #endif
{
Token *token_ent;
--- 755,761 ----
*************** keyword_type(void)
*** 872,883 ****
/* read a token, and report a syntax error if it has the wrong type */
void
- #ifdef _NO_PROTO
- get_expected_token(type)
- int type;
- #else
get_expected_token(int type)
- #endif
{
get_token();
if (token.type != type) {
--- 796,802 ----
*************** get_expected_token(int type)
*** 901,912 ****
#ifndef HTADD
- static void
- #ifdef _NO_PROTO
- spad_error_handler()
- #else
spad_error_handler(void)
- #endif
{
/* fprintf(stderr, "got a spad error\n"); */
longjmp(jmpbuf, 1);
--- 820,826 ----
*************** spad_error_handler(void)
*** 916,926 ****
extern int still_reading, str_len;
void
- #ifdef _NO_PROTO
- reset_connection()
- #else
reset_connection(void)
- #endif
{
if (spad_socket) {
FD_CLR(spad_socket->socket, &socket_mask);
--- 830,836 ----
*************** reset_connection(void)
*** 941,951 ****
/* returns true if spad is currently computing */
int
- #ifdef _NO_PROTO
- spad_busy()
- #else
spad_busy(void)
- #endif
{
if (session_server == NULL)
return 1;
--- 851,857 ----
*************** spad_busy(void)
*** 955,965 ****
/* connect to AXIOM , return 0 if succesful, 1 if not */
int
- #ifdef _NO_PROTO
- connect_spad()
- #else
connect_spad(void)
- #endif
{
if (!MenuServerOpened) {
fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM
Server!\n");
--- 861,867 ----
*** src/hyper/macro.pamphlet (revision 16913)
--- src/hyper/macro.pamphlet (local)
*************** extern FILE *cfile;
*** 31,41 ****
* right brace then left brace
*/
void
- #ifdef _NO_PROTO
- scan_HyperDoc()
- #else
scan_HyperDoc(void)
- #endif
{
HDWindow *twin = gWindow;
int ret_val;
--- 31,37 ----
*************** scan_HyperDoc(void)
*** 70,81 ****
}
int
- #ifdef _NO_PROTO
- number(str)
- char *str;
- #else
number(char *str)
- #endif
{
char *t = str;
--- 66,72 ----
*************** number(char *str)
*** 88,99 ****
/* Parse a given macro given the pointer to the unlaoded macro ** */
static char *
- #ifndef _NO_PROTO
load_macro(MacroStore *macro)
- #else
- load_macro(macro)
- MacroStore *macro;
- #endif
{
int ret_val;
long start_fpos;
--- 79,85 ----
*************** MacroStore *macro;
*** 168,179 ****
ParameterList parameters = NULL;
ParameterList
- #ifdef _NO_PROTO
- init_parameter_elem(number)
- int number;
- #else
init_parameter_elem(int number)
- #endif
{
ParameterList new;
int count;
--- 154,160 ----
*************** init_parameter_elem(int number)
*** 194,205 ****
}
int
- #ifdef _NO_PROTO
- push_parameters(new)
- ParameterList new;
- #else
push_parameters(ParameterList new)
- #endif
{
if (new == NULL) {
--- 175,181 ----
*************** push_parameters(ParameterList new)
*** 212,222 ****
return 1;
}
int
- #ifdef _NO_PROTO
- pop_parameters()
- #else
pop_parameters(void)
- #endif
{
/** Simply pops the top of the parameter list, being good and freeing
all the memory **/
--- 188,194 ----
*************** pop_parameters(void)
*** 243,253 ****
}
int
- #ifdef _NO_PROTO
- parse_macro()
- #else
parse_macro(void)
- #endif
{
/*
--- 215,221 ----
*************** parse_macro(void)
*** 293,305 ****
#define numeric(c) ((c >= '0' && c <= '9')?1:0)
static void
- #ifdef _NO_PROTO
- get_parameter_strings(number, macro_name)
- int number;
- char *macro_name;
- #else
get_parameter_strings(int number,char * macro_name)
- #endif
{
static char buffer[4096];
char *buffer_pntr;
--- 261,267 ----
*************** get_parameter_strings(int number,char *
*** 385,395 ****
return ;
}
void
- #ifdef _NO_PROTO
- parse_parameters()
- #else
parse_parameters(void)
- #endif
{
int value;
--- 347,353 ----
*** src/hyper/mem.pamphlet (revision 16913)
--- src/hyper/mem.pamphlet (local)
*************** extern HashTable init_patch_hash;
*** 50,61 ****
static void
- #ifndef _NO_PROTO
free_if_non_NULL(void *p)
- #else
- free_if_non_NULL(p)
- void *p;
- #endif
{
if (p){
free(p);
--- 50,56 ----
*************** void *p;
*** 66,76 ****
/* allocate an HDWindow Structure and initialize it */
HDWindow *
- #ifdef _NO_PROTO
- alloc_hd_window()
- #else
alloc_hd_window(void)
- #endif
{
HDWindow *w = (HDWindow *) halloc(sizeof(HDWindow), "HDWindow");
/*char haslisp[10];*/
--- 61,67 ----
*************** alloc_hd_window(void)
*** 110,121 ****
}
void
- #ifndef _NO_PROTO
free_hd_window(HDWindow *w)
- #else
- free_hd_window(w)
- HDWindow *w;
- #endif
{
if (w) {
free(w->fMemoStack);
--- 101,107 ----
*************** HDWindow *w;
*** 147,157 ****
/* Allocate an empty text node */
TextNode *
- #ifdef _NO_PROTO
- alloc_node()
- #else
alloc_node(void)
- #endif
{
TextNode *temp_node;
--- 133,139 ----
*************** alloc_node(void)
*** 170,182 ****
}
void
- #ifndef _NO_PROTO
free_node(TextNode *node, short int des)
- #else
- free_node(node,des)
- TextNode *node;
- short int des;
- #endif
{
if (node == NULL)
--- 152,158 ----
*************** free_node(node,des)
*** 350,360 ****
}
IfNode *
- #ifdef _NO_PROTO
- alloc_ifnode()
- #else
alloc_ifnode(void)
- #endif
{
IfNode *tempif;
--- 326,332 ----
*************** alloc_ifnode(void)
*** 364,374 ****
}
CondNode *
- #ifdef _NO_PROTO
- alloc_condnode()
- #else
alloc_condnode(void)
- #endif
{
CondNode *temp;
--- 336,342 ----
*************** alloc_condnode(void)
*** 378,389 ****
}
static void
- #ifndef _NO_PROTO
free_cond(CondNode *cond)
- #else
- free_cond(cond)
- CondNode *cond;
- #endif
{
if (cond) {
free(cond->label);
--- 346,352 ----
*************** CondNode *cond;
*** 396,407 ****
/* Allocate a new HyperDoc page */
HyperDocPage *
- #ifndef _NO_PROTO
alloc_page(char *name)
- #else
- alloc_page(name)
- char *name;
- #endif
{
HyperDocPage *page;
--- 359,365 ----
*************** char *name;
*** 423,434 ****
}
void
- #ifndef _NO_PROTO
free_page(HyperDocPage *page)
- #else
- free_page(page)
- HyperDocPage *page;
- #endif
{
/*
* This routine now checks for an environment variable NOFREE. If found
--- 381,387 ----
*************** HyperDocPage *page;
*** 484,496 ****
}
static void
- #ifndef _NO_PROTO
free_paste(PasteNode *paste, short int des)
- #else
- free_paste(paste,des)
- PasteNode *paste;
- short int des;
- #endif
{
if (paste) {
free_group_stack(paste->group);
--- 437,443 ----
*************** short int des;
*** 501,513 ****
}
static void
- #ifndef _NO_PROTO
free_pastebutton(TextNode *node, short int des)
- #else
- free_pastebutton(node,des)
- TextNode *node;
- short int des;
- #endif
{
/*
* if I am freeing from within parse patch, then I have to do some
--- 448,454 ----
*************** short int des;
*** 543,555 ****
}
static void
- #ifndef _NO_PROTO
free_pastearea(TextNode *node, short int des)
- #else
- free_pastearea(node,des)
- TextNode *node;
- short int des;
- #endif
{
if (des) {
PasteNode *paste;
--- 484,490 ----
*************** short int des;
*** 570,603 ****
void
- #ifndef _NO_PROTO
free_string(char *str)
- #else
- free_string(str)
- char * str;
- #endif
{
free_if_non_NULL(str);
}
static void
- #ifndef _NO_PROTO
free_depend(SpadcomDepend *sd)
- #else
- free_depend(sd)
- SpadcomDepend *sd;
- #endif
{
free_if_non_NULL((char *) sd);
}
static void
- #ifndef _NO_PROTO
dont_free(void *link)
- #else
- dont_free(link)
- void *link;
- #endif
{
return;
}
--- 505,523 ----
*************** void *link;
*** 605,616 ****
#if 0
----------- NOT USED
static void
- #ifndef _NO_PROTO
free_link(HyperLink *link)
- #else
- free_link(link)
- HyperLink *link;
- #endif
{
printf("Link type %d\n",link->type);
free_if_non_NULL((char *) link);
--- 525,531 ----
*************** HyperLink *link;
*** 619,630 ****
#endif
static void
- #ifndef _NO_PROTO
free_lines(LineStruct *lines)
- #else
- free_lines(lines)
- LineStruct *lines;
- #endif
{
if (lines->prev != NULL)
lines->prev->next = NULL;
--- 534,540 ----
*************** LineStruct *lines;
*** 638,650 ****
}
void
- #ifndef _NO_PROTO
free_input_item(InputItem *sym, short int des)
- #else
- free_input_item(sym,des)
- InputItem *sym;
- short int des;
- #endif
{
free_if_non_NULL(sym->name);
free_lines(sym->lines);
--- 548,554 ----
*************** short int des;
*** 653,664 ****
}
void
- #ifndef _NO_PROTO
free_input_list(InputItem *il)
- #else
- free_input_list(il)
- InputItem *il;
- #endif
{
while (il) {
InputItem *trash = il;
--- 557,563 ----
*************** InputItem *il;
*** 669,680 ****
}
static void
- #ifndef _NO_PROTO
free_input_box(InputBox *box)
- #else
- free_input_box(box)
- InputBox *box;
- #endif
{
if (box) {
free_if_non_NULL(box->name);
--- 568,574 ----
*************** InputBox *box;
*** 683,694 ****
}
static void
- #ifndef _NO_PROTO
free_radio_boxes(RadioBoxes *radio)
- #else
- free_radio_boxes(radio)
- RadioBoxes *radio;
- #endif
{
if (radio) {
free_radio_boxes(radio->next);
--- 577,583 ----
*************** RadioBoxes *radio;
*** 700,711 ****
#if 0
--------------- NOT USED
static void
- #ifndef _NO_PROTO
free_image(ImageStruct *image)
- #else
- free_image(image)
- ImageStruct *image;
- #endif
{
free(image->image.xi->data);
free(image->image.xi);
--- 589,595 ----
*************** ImageStruct *image;
*** 717,728 ****
#if 0
--------------- NOT USED
static void
- #ifndef _NO_PROTO
free_macro(MacroStore *macro)
- #else
- free_macro(macro)
- MacroStore *macro;
- #endif
{
if (macro) {
free(macro->name);
--- 601,607 ----
*************** MacroStore *macro;
*** 737,748 ****
LineStruct *
- #ifndef _NO_PROTO
alloc_inputline(int size)
- #else
- alloc_inputline(size)
- int size;
- #endif
{
int i;
LineStruct *line =
--- 616,622 ----
*************** int size;
*** 757,768 ****
}
PasteNode *
- #ifndef _NO_PROTO
alloc_paste_node(char *name)
- #else
- alloc_paste_node(name)
- char *name;
- #endif
{
PasteNode *pastenode =
(PasteNode *) halloc(sizeof(PasteNode), "PasteNode");
--- 631,637 ----
*************** char *name;
*** 777,787 ****
}
PatchStore *
- #ifdef _NO_PROTO
- alloc_patchstore()
- #else
alloc_patchstore(void)
- #endif
{
PatchStore *p = (PatchStore *) halloc(sizeof(PatchStore), "PatchStore");
--- 646,652 ----
*************** alloc_patchstore(void)
*** 791,802 ****
}
void
- #ifndef _NO_PROTO
free_patch(PatchStore *p)
- #else
- free_patch(p)
- PatchStore *p;
- #endif
{
if (p) {
if (p->name)
--- 656,662 ----
*************** PatchStore *p;
*** 810,820 ****
}
InputBox *
- #ifdef _NO_PROTO
- alloc_inputbox()
- #else
alloc_inputbox(void)
- #endif
{
InputBox *box = (InputBox *) halloc(sizeof(InputBox), "InputBox");
--- 670,676 ----
*************** alloc_inputbox(void)
*** 825,835 ****
}
RadioBoxes *
- #ifdef _NO_PROTO
- alloc_rbs()
- #else
alloc_rbs(void)
- #endif
{
RadioBoxes *newrb = (RadioBoxes *) halloc(sizeof(RadioBoxes), "Radio
Boxes");
--- 681,687 ----
*************** alloc_rbs(void)
*** 839,849 ****
}
ButtonList *
- #ifdef _NO_PROTO
- alloc_button_list()
- #else
alloc_button_list(void)
- #endif
{
ButtonList *newbl = (ButtonList *) halloc(sizeof(ButtonList), "Button
List");
--- 691,697 ----
*************** alloc_button_list(void)
*** 854,865 ****
}
void
- #ifndef _NO_PROTO
free_button_list(ButtonList *bl)
- #else
- free_button_list(bl)
- ButtonList *bl;
- #endif
{
while (bl) {
ButtonList *nbl = bl->next;
--- 702,708 ----
*************** ButtonList *bl;
*** 874,887 ****
#define BufferSlop 0
char *
- #ifndef _NO_PROTO
resizeBuffer(int size, char *oldBuf, int *oldSize)
- #else
- resizeBuffer(size,oldBuf, oldSize)
- int size;
- char *oldBuf;
- int *oldSize;
- #endif
{
char *newBuf;
int newSize;
--- 717,723 ----
*** src/hyper/parse-aux.pamphlet (revision 16913)
--- src/hyper/parse-aux.pamphlet (local)
*************** HashTable ht_gFileHashTable;
*** 49,60 ****
/* Hash functions for active link windows */
int
- #ifndef _NO_PROTO
window_equal(Window *w1, Window *w2)
- #else
- window_equal(w1,w2)
- Window *w1, *w2;
- #endif
{
return *w1 == *w2;
}
--- 49,55 ----
*************** Window *w1, *w2;
*** 62,85 ****
/* hash code for a window */
int
- #ifndef _NO_PROTO
window_code(Window *w, int size)
- #else
- window_code(w, size)
- Window *w;
- int size;
- #endif
{
return (*w) % size;
}
char *
- #ifndef _NO_PROTO
window_id(Window w)
- #else
- window_id(w)
- Window w;
- #endif
{
char *ret;
char buff[32];
--- 57,69 ----
*************** Window w;
*** 98,109 ****
* read the presented data base files
*/
void
- #ifdef _NO_PROTO
- read_ht_db(page_hash, macro_hash, patch_hash)
- HashTable *page_hash, *macro_hash, *patch_hash;
- #else
read_ht_db(HashTable *page_hash, HashTable *macro_hash, HashTable *patch_hash)
- #endif
{
FILE *db_fp;
char db_file[256];
--- 82,88 ----
*************** read_ht_db(HashTable *page_hash, HashTab
*** 157,172 ****
*/
static void
! #ifndef _NO_PROTO
! read_ht_file(HashTable *page_hash, HashTable *macro_hash, HashTable
*patch_hash, FILE *db_fp, char *db_file)
! #else
! read_ht_file(page_hash,macro_hash,patch_hash,db_fp,db_file)
! HashTable *page_hash;
! HashTable *macro_hash;
! HashTable *patch_hash;
! FILE *db_fp;
! char *db_file;
! #endif
{
char filename[256];
char *fullname = filename;
--- 136,143 ----
*/
static void
! read_ht_file(HashTable *page_hash, HashTable *macro_hash,
! HashTable *patch_hash, FILE *db_fp, char *db_file)
{
char filename[256];
char *fullname = filename;
*************** char *db_file;
*** 332,345 ****
/* create an unmapped input-only window for an active screen area */
HyperLink *
- #ifndef _NO_PROTO
make_link_window(TextNode *link_node, int type, int isSubWin)
- #else
- make_link_window(link_node,type,isSubWin)
- TextNode *link_node;
- int type;
- int isSubWin;
- #endif
{
HyperLink *link;
XSetWindowAttributes at;
--- 303,309 ----
*************** int isSubWin;
*** 383,394 ****
}
HyperLink *
- #ifndef _NO_PROTO
make_paste_window(PasteNode *paste)
- #else
- make_paste_window(paste)
- PasteNode *paste;
- #endif
{
HyperLink *link;
XSetWindowAttributes at;
--- 347,353 ----
*************** PasteNode *paste;
*** 419,431 ****
/* create a HyperDoc page structure with the given type and name */
static HyperDocPage *
- #ifndef _NO_PROTO
make_special_page(int type, char *name)
- #else
- make_special_page(type,name)
- int type;
- char *name;
- #endif
{
HyperDocPage *page = alloc_page(name);
--- 378,384 ----
*************** char *name;
*** 443,454 ****
/* insert the special button page types into the page hash table */
void
- #ifndef _NO_PROTO
make_special_pages(HashTable *pageHashTable)
- #else
- make_special_pages(pageHashTable)
- HashTable *pageHashTable;
- #endif
{
hash_insert(pageHashTable, (char *)make_special_page(Quitbutton,
"QuitPage"),
"QuitPage");
--- 396,402 ----
*************** HashTable *pageHashTable;
*** 464,474 ****
/* Parse the \bound{varlist} command, and add vars to dependency table */
void
- #ifndef _NO_PROTO
add_dependencies(void)
- #else
- add_dependencies()
- #endif
{
TextNode *bound_node = curr_node;
TextNode *node;
--- 412,418 ----
*************** add_dependencies()
*** 510,521 ****
/* Returns true iff the TextNode contains a single integer */
int
- #ifdef _NO_PROTO
- is_number(str)
- char *str;
- #else
is_number(char * str)
- #endif
{
char *s;
--- 454,460 ----
*************** is_number(char * str)
*** 526,537 ****
return 1;
}
void
- #ifdef _NO_PROTO
- parser_error(str)
- char *str;
- #else
parser_error(char *str)
- #endif
{
/** this procedure is called by the parser when an error occurs. It prints
the error message, followed by the next 10 tokens to ease finding the
--- 465,471 ----
*************** parser_error(char *str)
*** 559,569 ****
/* advance token to the next token in the input stream. */
int
- #ifdef _NO_PROTO
- get_filename()
- #else
get_filename(void)
- #endif
{
int c, ws;
static int seen_white = 0; /*UNUSED */
--- 493,499 ----
*************** get_filename(void)
*** 606,616 ****
}
char *
- #ifndef _NO_PROTO
get_input_string(void)
- #else
- get_input_string()
- #endif
{
char *string;
TextNode *string_node,*save_node;
--- 536,542 ----
*************** get_input_string()
*** 634,644 ****
* parsing from. If so it then tries to determine which
*/
int
- #ifdef _NO_PROTO
- get_where()
- #else
get_where(void)
- #endif
{
int tw;
--- 560,566 ----
*************** get_where(void)
*** 670,681 ****
FILE *
- #ifndef _NO_PROTO
find_fp(FilePosition fp)
- #else
- find_fp(fp)
- FilePosition fp;
- #endif
{
FILE *lfile;
char fullname[256], addname[256];
--- 592,598 ----
*** src/hyper/parse-input.pamphlet (revision 16913)
--- src/hyper/parse-input.pamphlet (local)
***************
*** 33,44 ****
extern int make_input_file;
HyperLink *
- #ifdef _NO_PROTO
- make_input_window(item)
- InputItem *item;
- #else
make_input_window(InputItem * item)
- #endif
{
HyperLink *link;
XSetWindowAttributes at;
--- 33,39 ----
*************** make_input_window(InputItem * item)
*** 70,82 ****
/* create an unmapped input window for boxes */
HyperLink *
- #ifdef _NO_PROTO
- make_box_window(box, type)
- InputBox *box;
- int type;
- #else
make_box_window(InputBox * box, int type)
- #endif
{
HyperLink *link = 0;
XSetWindowAttributes at;
--- 65,71 ----
*************** make_box_window(InputBox * box, int type
*** 106,118 ****
}
void
- #ifdef _NO_PROTO
- initialize_default(item, buff)
- InputItem *item;
- char *buff;
- #else
initialize_default(InputItem *item,char * buff)
- #endif
{
LineStruct *newline;
LineStruct *curr_line;
--- 95,101 ----
*************** initialize_default(InputItem *item,char
*** 159,169 ****
/* Parse the input string statement * */
void
- #ifdef _NO_PROTO
- parse_inputstring()
- #else
parse_inputstring(void)
- #endif
{
TextNode *input_node = curr_node;
char *name;
--- 142,148 ----
*************** parse_inputstring(void)
*** 217,227 ****
}
void
- #ifdef _NO_PROTO
- parse_simplebox()
- #else
parse_simplebox(void)
- #endif
{
InputBox *box;
char *name;
--- 196,202 ----
*************** parse_simplebox(void)
*** 312,322 ****
return;
}
void
- #ifdef _NO_PROTO
- parse_radiobox()
- #else
parse_radiobox(void)
- #endif
{
InputBox *box;
char *name;
--- 287,293 ----
*************** parse_radiobox(void)
*** 414,426 ****
return;
}
static void
- #ifdef _NO_PROTO
- add_box_to_rb_list(name, box)
- char *name;
- InputBox *box;
- #else
add_box_to_rb_list(char *name,InputBox *box)
- #endif
{
RadioBoxes *trace = gPageBeingParsed->radio_boxes;
InputBox *list;
--- 385,391 ----
*************** add_box_to_rb_list(char *name,InputBox *
*** 453,464 ****
return;
}
static int
- #ifdef _NO_PROTO
- check_others(list)
- InputBox *list;
- #else
check_others(InputBox *list)
- #endif
{
InputBox *trace = list;
--- 418,424 ----
*************** check_others(InputBox *list)
*** 474,485 ****
/* inserts an item into the current input list */
static void
- #ifdef _NO_PROTO
- insert_item(item)
- InputItem *item;
- #else
insert_item(InputItem *item)
- #endif
{
InputItem *trace = gPageBeingParsed->input_list;
--- 434,440 ----
*************** insert_item(InputItem *item)
*** 503,514 ****
InputItem *save_item;
void
- #ifdef _NO_PROTO
- init_paste_item(item)
- InputItem *item;
- #else
init_paste_item(InputItem *item)
- #endif
{
InputItem *trace = gPageBeingParsed->input_list;
--- 458,464 ----
*************** init_paste_item(InputItem *item)
*** 523,533 ****
}
}
void
- #ifdef _NO_PROTO
- repaste_item()
- #else
repaste_item(void)
- #endif
{
InputItem *trace;
--- 473,479 ----
*************** repaste_item(void)
*** 546,556 ****
}
InputItem *
- #ifdef _NO_PROTO
- current_item()
- #else
current_item(void)
- #endif
{
InputItem *trace = gPageBeingParsed->input_list;
--- 492,498 ----
*************** current_item(void)
*** 562,573 ****
return NULL;
}
int
- #ifdef _NO_PROTO
- already_there(name)
- char *name;
- #else
already_there(char *name)
- #endif
{
RadioBoxes *trace = gPageBeingParsed->radio_boxes;
--- 504,510 ----
*************** already_there(char *name)
*** 580,590 ****
return 0;
}
void
- #ifdef _NO_PROTO
- parse_radioboxes()
- #else
parse_radioboxes(void)
- #endif
{
TextNode *return_node = curr_node;
RadioBoxes *newrb;
--- 517,523 ----
*** src/hyper/parse-paste.pamphlet (revision 16913)
--- src/hyper/parse-paste.pamphlet (local)
*************** short int gInPaste;
*** 49,59 ****
void
- #ifdef _NO_PROTO
- parse_paste()
- #else
parse_paste(void)
- #endif
{
TextNode *pn = curr_node;
PasteNode *paste;
--- 49,55 ----
*************** parse_paste(void)
*** 138,148 ****
}
void
- #ifdef _NO_PROTO
- parse_pastebutton()
- #else
parse_pastebutton(void)
- #endif
{
PasteNode *paste;
TextNode *pb;
--- 134,140 ----
*************** parse_pastebutton(void)
*** 207,219 ****
*/
HyperDocPage *
- #ifndef _NO_PROTO
parse_patch(PasteNode *paste)
- #else
- parse_patch(paste)
- PasteNode *paste;
- #endif
-
{
TextNode *new;
TextNode *end_node;
--- 199,205 ----
*************** PasteNode *paste;
*** 350,361 ****
}
static void
- #ifndef _NO_PROTO
load_patch(PatchStore *patch)
- #else
- load_patch(patch)
- PatchStore *patch;
- #endif
{
long start_fpos;
int size = 0;
--- 336,342 ----
*** src/hyper/parse-types.pamphlet (revision 16913)
--- src/hyper/parse-types.pamphlet (local)
*************** boolean gInItems = FALSE;
*** 55,65 ****
boolean gInOptional = FALSE;
void
- #ifndef _NO_PROTO
parse_ifcond(void)
- #else
- parse_ifcond()
- #endif
{
TextNode *ifnode = curr_node;
TextNode *endif;
--- 55,61 ----
*************** parse_ifcond()
*** 130,140 ****
}
static void
- #ifndef _NO_PROTO
parse_condnode(void)
- #else
- parse_condnode()
- #endif
{
get_token();
--- 126,132 ----
*************** parse_condnode()
*** 168,178 ****
}
static void
- #ifndef _NO_PROTO
parse_hasreturnto(void)
- #else
- parse_hasreturnto()
- #endif
{
TextNode *hrt = curr_node, *arg_node = alloc_node();
--- 160,166 ----
*************** parse_hasreturnto()
*** 186,196 ****
}
void
- #ifndef _NO_PROTO
parse_newcond(void)
- #else
- parse_newcond()
- #endif
{
char label[256];
--- 174,180 ----
*************** parse_newcond()
*** 203,213 ****
}
void
- #ifndef _NO_PROTO
parse_setcond(void)
- #else
- parse_setcond()
- #endif
{
char label[256], cond[256];
--- 187,193 ----
*************** parse_setcond()
*** 224,234 ****
}
void
- #ifndef _NO_PROTO
parse_begin_items(void)
- #else
- parse_begin_items()
- #endif
{
TextNode *bi = curr_node;
--- 204,210 ----
*************** parse_begin_items()
*** 260,270 ****
}
void
- #ifndef _NO_PROTO
parse_item(void)
- #else
- parse_item()
- #endif
{
if (!gInItems) {
fprintf(stderr, "\\item found outside an items environment\n");
--- 236,242 ----
*************** parse_item()
*** 298,308 ****
}
void
- #ifndef _NO_PROTO
parse_mitem(void)
- #else
- parse_mitem()
- #endif
{
if (!gInItems) {
fprintf(stderr, "\\mitem found outside an items environment\n");
--- 270,276 ----
*************** int vbuf_size = 0;
*** 339,350 ****
vb = vbuf;
void
- #ifndef _NO_PROTO
parse_verbatim(int type)
- #else
- parse_verbatim(type)
- int type;
- #endif
{
int size = 0, c;
char *end_string, *vb = vbuf, *es;
--- 307,313 ----
*************** int type;
*** 396,406 ****
}
void
- #ifndef _NO_PROTO
parse_input_pix(void)
- #else
- parse_input_pix()
- #endif
{
TextNode *pixnode;
char *filename;
--- 359,365 ----
*************** parse_input_pix()
*** 440,450 ****
}
void
- #ifndef _NO_PROTO
parse_centerline(void)
- #else
- parse_centerline()
- #endif
{
curr_node->type = token.type;
curr_node->space = token.id[-1];
--- 399,405 ----
*************** parse_centerline()
*** 464,474 ****
}
void
- #ifndef _NO_PROTO
parse_command(void)
- #else
- parse_command()
- #endif
{
TextNode *link_node, *save_node, *arg_node;
--- 419,425 ----
*************** parse_command()
*** 505,515 ****
}
void
- #ifndef _NO_PROTO
parse_button(void)
- #else
- parse_button()
- #endif
{
TextNode *link_node, *save_node;
--- 456,462 ----
*************** parse_button()
*** 554,565 ****
extern int example_number;
void
- #ifndef _NO_PROTO
parse_spadcommand(TextNode *spad_node)
- #else
- parse_spadcommand(spad_node)
- TextNode *spad_node;
- #endif
{
/*TextNode *node = NULL;*/
--- 501,507 ----
*************** TextNode *spad_node;
*** 580,591 ****
}
void
- #ifndef _NO_PROTO
parse_spadsrc(TextNode *spad_node)
- #else
- parse_spadsrc(spad_node)
- TextNode *spad_node;
- #endif
{
char buf[512], *c = buf;
int ch, start_opts = 0;
--- 522,528 ----
*************** TextNode *spad_node;
*** 622,633 ****
}
void
- #ifndef _NO_PROTO
parse_env(TextNode *node)
- #else
- parse_env(node)
- TextNode *node;
- #endif
{
char *env;
char buff[256];
--- 559,565 ----
*************** TextNode *node;
*** 667,677 ****
*/
void
- #ifndef _NO_PROTO
parse_value1(void)
- #else
- parse_value1()
- #endif
{
TextNode *value_node, *ocn = curr_node;
char *s;
--- 599,605 ----
*************** parse_value1()
*** 701,711 ****
*/
void
- #ifndef _NO_PROTO
parse_value2(void)
- #else
- parse_value2()
- #endif
{
TextNode *value_node, *ocn = curr_node;
char *s;
--- 629,635 ----
*************** parse_value2()
*** 733,743 ****
/* parse a \table sommand */
void
- #ifndef _NO_PROTO
parse_table(void)
- #else
- parse_table()
- #endif
{
TextNode *tn = curr_node;
--- 657,663 ----
*************** parse_table()
*** 783,793 ****
}
void
- #ifndef _NO_PROTO
parse_box(void)
- #else
- parse_box()
- #endif
{
curr_node->type = token.type;
curr_node->space = token.id[-1];
--- 703,709 ----
*************** parse_box()
*** 800,810 ****
}
void
- #ifndef _NO_PROTO
parse_mbox(void)
- #else
- parse_mbox()
- #endif
{
curr_node->type = token.type;
curr_node->space = token.id[-1];
--- 716,722 ----
*************** parse_mbox()
*** 817,827 ****
}
void
- #ifndef _NO_PROTO
parse_free(void)
- #else
- parse_free()
- #endif
{
TextNode *free_node = curr_node;
--- 729,735 ----
*************** parse_free()
*** 837,847 ****
}
void
- #ifndef _NO_PROTO
parse_help(void)
- #else
- parse_help()
- #endif
{
curr_node->type = Noop;
get_token();
--- 745,751 ----
*** src/hyper/parse.pamphlet (revision 16913)
--- src/hyper/parse.pamphlet (local)
*************** typedef struct mr_stack {
*** 143,153 ****
MR_Stack *top_mr_stack = NULL; /** Declaration for the stack **/
static void
- #ifndef _NO_PROTO
Push_MR(void)
- #else
- Push_MR()
- #endif
{
MR_Stack *newStackItem = (MR_Stack *) halloc(sizeof(MR_Stack), "Mode
Region Stack");
--- 143,149 ----
*************** Push_MR()
*** 158,168 ****
}
static void
- #ifndef _NO_PROTO
Pop_MR(void)
- #else
- Pop_MR()
- #endif
{
MR_Stack *old = top_mr_stack;
--- 154,160 ----
*************** Pop_MR()
*** 179,190 ****
}
void
- #ifndef _NO_PROTO
load_page(HyperDocPage *page)
- #else
- load_page(page)
- HyperDocPage *page;
- #endif
{
if (page->type == UnloadedPageType) {
HyperDocPage *new_page;
--- 171,177 ----
*************** HyperDocPage *formatpage;
*** 201,212 ****
/* Display a HyperDoc page with the given name, parsing it if needed */
void
- #ifndef _NO_PROTO
display_page(HyperDocPage *page)
- #else
- display_page(page)
- HyperDocPage *page;
- #endif
{
HyperDocPage *new_page;
--- 188,194 ----
*************** HyperDocPage *page;
*** 249,260 ****
/* Parse a given HyperDoc Page, from the top */
static HyperDocPage *
- #ifndef _NO_PROTO
format_page(UnloadedPage *ulpage)
- #else
- format_page(ulpage)
- UnloadedPage *ulpage;
- #endif
{
/*int ret_val;*/
HyperDocPage *page = alloc_page(ulpage->name);
--- 231,237 ----
*************** UnloadedPage *ulpage;
*** 278,289 ****
/* parse the HyperDoc statements in the given string */
void
- #ifndef _NO_PROTO
parse_from_string(char *str)
- #else
- parse_from_string(str)
- char *str;
- #endif
{
save_scanner_state();
last_ch = NoChar;
--- 255,261 ----
*************** char *str;
*** 295,306 ****
}
static void
- #ifndef _NO_PROTO
parse_title(HyperDocPage *page)
- #else
- parse_title(page)
- HyperDocPage *page;
- #endif
{
TextNode *node;
--- 267,273 ----
*************** HyperDocPage *page;
*** 337,348 ****
}
static void
- #ifndef _NO_PROTO
parse_header(HyperDocPage *page)
- #else
- parse_header(page)
- HyperDocPage *page;
- #endif
{
TextNode *node;
--- 304,310 ----
*************** HyperDocPage *page;
*** 361,372 ****
*/
static void
- #ifndef _NO_PROTO
init_parse_page(HyperDocPage *page)
- #else
- init_parse_page(page)
- HyperDocPage *page;
- #endif
{
gEndedPage = gInDesc = gStringValueOk = gInIf =
gInButton = gInOptional = gInVerbatim = gInPaste = gInItems =
--- 323,329 ----
*************** HyperDocPage *page;
*** 393,404 ****
}
void
- #ifndef _NO_PROTO
init_parse_patch(HyperDocPage *page)
- #else
- init_parse_patch(page)
- HyperDocPage *page;
- #endif
{
gEndedPage = gInDesc = gStringValueOk = gInIf =
gInButton = gInOptional = gInVerbatim = gInPaste = gInItems =
--- 350,356 ----
*************** HyperDocPage *page;
*** 417,428 ****
#define end_page(t) ((t == Page || t == NewCommand ||t == Endpage)?1:0)
static void
- #ifndef _NO_PROTO
parse_page(HyperDocPage *page)
- #else
- parse_page(page)
- HyperDocPage *page;
- #endif
{
init_parse_page(page);
--- 369,375 ----
*************** char *ExpectedBeginScroll =
*** 455,465 ****
*/
void
- #ifndef _NO_PROTO
parse_HyperDoc(void)
- #else
- parse_HyperDoc()
- #endif
{
TextNode *node = NULL /*, *save_node = NULL, *arg_node = NULL*/ ;
--- 402,408 ----
*************** parse_HyperDoc()
*** 786,796 ****
/* parse a page from a socket source */
HyperDocPage *
- #ifndef _NO_PROTO
parse_page_from_socket(void)
- #else
- parse_page_from_socket()
- #endif
{
HyperDocPage *page = alloc_page((char *) NULL);
HyperDocPage *hpage;
--- 729,735 ----
*************** parse_page_from_socket()
*** 835,845 ****
}
HyperDocPage *
- #ifndef _NO_PROTO
parse_page_from_unixfd(void)
- #else
- parse_page_from_unixfd()
- #endif
{
HyperDocPage *page = alloc_page((char *) NULL);
--- 774,780 ----
*************** parse_page_from_unixfd()
*** 869,879 ****
}
static void
- #ifndef _NO_PROTO
start_scrolling(void)
- #else
- start_scrolling()
- #endif
{
/*
--- 804,810 ----
*************** start_scrolling()
*** 900,910 ****
}
static void
- #ifndef _NO_PROTO
start_footer(void)
- #else
- start_footer()
- #endif
{
/*
* This ends the parsing of the scrolling region, and then starts to
--- 831,837 ----
*************** start_footer()
*** 933,943 ****
}
static void
- #ifndef _NO_PROTO
end_a_page(void)
- #else
- end_a_page()
- #endif
{
if (gParserRegion == Scrolling) {
fprintf(stderr, "%s\n",
--- 860,866 ----
*************** end_a_page()
*** 964,974 ****
}
static void
- #ifndef _NO_PROTO
parse_replacepage(void)
- #else
- parse_replacepage()
- #endif
{
get_expected_token(Lbrace);
get_token();
--- 887,893 ----
*** src/hyper/scrollbar.pamphlet (revision 16913)
--- src/hyper/scrollbar.pamphlet (local)
*************** int gScrollbarWidth = sup_width + 2;
*** 158,168 ****
void
- #ifndef _NO_PROTO
makeScrollBarWindows(void)
- #else
- makeScrollBarWindows()
- #endif
{
XSetWindowAttributes at;
--- 158,164 ----
*************** makeScrollBarWindows()
*** 271,283 ****
}
static void
- #ifndef _NO_PROTO
drawScroller3DEffects(HDWindow * hdWindow, int x1, int y1, int x2, int y2)
- #else
- drawScroller3DEffects(hdWindow,x1,y1,x2,y2)
- HDWindow * hdWindow;
- int x1,y1,x2, y2;
- #endif
{
XClearWindow(gXDisplay, hdWindow->scroller);
--- 267,273 ----
*************** int x1,y1,x2, y2;
*** 313,324 ****
}
void
- #ifndef _NO_PROTO
showScrollBars(HDWindow * hdWindow)
- #else
- showScrollBars(hdWindow)
- HDWindow * hdWindow;
- #endif
{
XWindowChanges wc;
/*int src_x = 0, src_y = 0;*/
--- 303,309 ----
*************** HDWindow * hdWindow;
*** 376,387 ****
**************************************************************************/
void
- #ifndef _NO_PROTO
moveScroller(HDWindow * hdWindow)
- #else
- moveScroller(hdWindow)
- HDWindow * hdWindow;
- #endif
{
XWindowChanges wc;
--- 361,367 ----
*************** HDWindow * hdWindow;
*** 403,413 ****
#define bothalf(y) (y/2)
void
- #ifndef _NO_PROTO
drawScrollLines(void)
- #else
- drawScrollLines()
- #endif
{
/* Checks the page_flags to see if we need a top, or a bottom line. */
/* These are the horizontal lines framing a scrolling region when the */
--- 383,389 ----
*************** drawScrollLines()
*** 441,451 ****
*/
void
- #ifndef _NO_PROTO
calculateScrollBarMeasures(void)
- #else
- calculateScrollBarMeasures()
- #endif
{
int t;
--- 417,423 ----
*************** calculateScrollBarMeasures()
*** 517,527 ****
}
void
- #ifndef _NO_PROTO
linkScrollBars(void)
- #else
- linkScrollBars()
- #endif
{
HyperLink *uplink = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink");
HyperLink *downlink = (HyperLink *) halloc(sizeof(HyperLink),
"HyperLink");
--- 489,495 ----
*************** linkScrollBars()
*** 544,554 ****
}
void
- #ifndef _NO_PROTO
scrollUp(void)
- #else
- scrollUp()
- #endif
{
if (gWindow->page->scroll_off == 0); /* BeepAtTheUser(); *//* The
--- 512,518 ----
*************** scrollUp()
*** 574,584 ****
}
void
- #ifndef _NO_PROTO
scrollUpPage(void)
- #else
- scrollUpPage()
- #endif
{
if (gWindow->page->scroll_off == 0); /* BeepAtTheUser(); */
else {
--- 538,544 ----
*************** scrollUpPage()
*** 594,604 ****
}
void
- #ifndef _NO_PROTO
scrollToFirstPage(void)
- #else
- scrollToFirstPage()
- #endif
{
if (gWindow->page->scroll_off == 0); /* BeepAtTheUser(); */
else {
--- 554,560 ----
*************** scrollToFirstPage()
*** 609,619 ****
}
void
- #ifndef _NO_PROTO
scrollDown(void)
- #else
- scrollDown()
- #endif
{
if (-(gWindow->page->scroll_off) >=
--- 565,571 ----
*************** scrollDown()
*** 641,651 ****
void
- #ifndef _NO_PROTO
scrollDownPage(void)
- #else
- scrollDownPage()
- #endif
{
if (gWindow->page->scrolling == NULL || (-(gWindow->page->scroll_off) >=
(gWindow->page->scrolling->height - gWindow->scrollheight))) {
--- 593,599 ----
*************** scrollDownPage()
*** 666,677 ****
}
void
- #ifndef _NO_PROTO
scrollScroller(XButtonEvent * event)
- #else
- scrollScroller(event)
- XButtonEvent * event;
- #endif
{
/*
--- 614,620 ----
*************** XButtonEvent * event;
*** 713,724 ****
void
- #ifndef _NO_PROTO
hideScrollBars(HDWindow * hdWindow)
- #else
- hideScrollBars(hdWindow)
- HDWindow * hdWindow;
- #endif
{
XUnmapWindow(gXDisplay, hdWindow->fScrollDownWindow);
XUnmapWindow(gXDisplay, hdWindow->fScrollUpWindow);
--- 656,662 ----
*************** HDWindow * hdWindow;
*** 727,751 ****
}
void
- #ifndef _NO_PROTO
getScrollBarMinimumSize(int *width, int *height)
- #else
- getScrollBarMinimumSize(width,height)
- int *width;
- int *height;
- #endif
{
(*width) = sup_width + 4;
(*height) = sup_height + sdown_height + 5;
}
static int
- #ifndef _NO_PROTO
ch(int height)
- #else
- ch(height)
- int height;
- #endif
{
/*int rheight;*/
int rem = height % line_height;
--- 665,678 ----
*************** int height;
*** 756,768 ****
}
static void
- #ifndef _NO_PROTO
changeWindowBackgroundPixmap(Window window, Pixmap pixmap)
- #else
- changeWindowBackgroundPixmap(window,pixmap)
- Window window;
- Pixmap pixmap;
- #endif
{
if (pixmap) {
XSetWindowAttributes at;
--- 683,689 ----
*** src/hyper/show-types.pamphlet (revision 16913)
--- src/hyper/show-types.pamphlet (local)
***************
*** 50,62 ****
*/
void
- #ifndef _NO_PROTO
show_text(TextNode *node, int Ender)
- #else
- show_text(node, Ender)
- TextNode *node;
- int Ender;
- #endif
{
/*int twidth, len;*/
/*int otext_x, otext_y, t;*/
--- 50,56 ----
*************** int Ender;
*** 331,342 ****
}
static void
- #ifndef _NO_PROTO
show_link(TextNode *node)
- #else
- show_link(node)
- TextNode *node;
- #endif
{
/* XFontStruct *old_font;*/
XWindowChanges wc;
--- 325,331 ----
*************** TextNode *node;
*** 408,419 ****
}
static void
- #ifndef _NO_PROTO
show_paste(TextNode *node)
- #else
- show_paste(node)
- TextNode *node;
- #endif
{
PasteNode *paste;
--- 397,403 ----
*************** TextNode *node;
*** 434,445 ****
}
static void
- #ifndef _NO_PROTO
show_pastebutton(TextNode *node)
- #else
- show_pastebutton(node)
- TextNode *node;
- #endif
{
/*XFontStruct *old_font;*/
XWindowChanges wc;
--- 418,424 ----
*************** TextNode *node;
*** 463,474 ****
/* display an input string window */
static void
- #ifndef _NO_PROTO
show_input(TextNode *node)
- #else
- show_input(node)
- TextNode *node;
- #endif
{
/*XFontStruct *old_font;*/
XWindowChanges wc;
--- 442,448 ----
*************** TextNode *node;
*** 497,508 ****
}
static void
- #ifndef _NO_PROTO
show_simple_box(TextNode *node)
- #else
- show_simple_box(node)
- TextNode *node;
- #endif
{
XWindowChanges wc;
InputBox *box;
--- 471,477 ----
*************** TextNode *node;
*** 528,539 ****
/* display a spad command node */
static void
- #ifndef _NO_PROTO
show_spadcommand(TextNode *node)
- #else
- show_spadcommand(node)
- TextNode *node;
- #endif
{
XWindowChanges wc;
--- 497,503 ----
*************** TextNode *node;
*** 560,572 ****
/* display a pixmap */
static void
- #ifndef _NO_PROTO
show_image(TextNode *node, GC gc)
- #else
- show_image(node, gc)
- TextNode *node;
- GC gc;
- #endif
{
int src_x, src_y, src_width, src_height, dest_x, dest_y, ret_val;
--- 524,530 ----
*** src/hyper/spadbuf.pamphlet (revision 16913)
--- src/hyper/spadbuf.pamphlet (local)
*************** char *buff_name = NULL; /* name for t
*** 76,97 ****
*/
static void
- #ifdef _NO_PROTO
- spadbuf_inter_handler(sig)
- int sig;
- #else
spadbuf_inter_handler(int sig)
- #endif
{
send_signal(session_sock, SIGUSR2);
}
static void
- #ifdef _NO_PROTO
- spadbuf_function_chars()
- #else
spadbuf_function_chars(void)
- #endif
{
/** once I have that get the special characters ****/
_INTR = oldbuf.c_cc[VINTR];
--- 76,88 ----
*************** spadbuf_function_chars(void)
*** 106,116 ****
/* act as terminal session for sock connected to stdin
and stdout of another process */
static void
- #ifdef _NO_PROTO
- interp_io()
- #else
interp_io(void)
- #endif
{
char buf[1024];
fd_set rd;
--- 97,103 ----
*************** interp_io(void)
*** 159,169 ****
}
static void
- #ifdef _NO_PROTO
- init_parent()
- #else
init_parent(void)
- #endif
{
/** get the original termio settings, so I never have to check again **/
--- 146,152 ----
*************** init_parent(void)
*** 205,217 ****
}
int
- #ifdef _NO_PROTO
- main(argc, argv)
- int argc;
- char **argv;
- #else
main(int argc,char ** argv)
- #endif
{
/*int name_found;*/
/*FILE *junk;*/
--- 188,194 ----
*** src/hyper/spadint.pamphlet (revision 16913)
--- src/hyper/spadint.pamphlet (local)
*************** Sock *spad_socket = (Sock *) 0; /* to_se
*** 41,55 ****
/* issue a AXIOM command to the buffer associated with a page */
void
! #ifdef _NO_PROTO
! issue_spadcommand(page, command, immediate, type)
! HyperDocPage *page;
! TextNode *command;
! int immediate;
! int type;
! #else
! issue_spadcommand(HyperDocPage *page, TextNode *command, int immediate, int
type)
! #endif
{
char *buf;
int ret_val;
--- 41,48 ----
/* issue a AXIOM command to the buffer associated with a page */
void
! issue_spadcommand(HyperDocPage *page, TextNode *command, int immediate,
! int type)
{
char *buf;
int ret_val;
*************** issue_spadcommand(HyperDocPage *page, Te
*** 82,94 ****
gIsEndOfOutput = 0;
}
static void
- #ifdef _NO_PROTO
- send_pile(sock, str)
- Sock *sock;
- char *str;
- #else
send_pile(Sock *sock,char * str)
- #endif
{
FILE *f;
char name[512], command[512];
--- 75,81 ----
*************** send_pile(Sock *sock,char * str)
*** 105,118 ****
send_string(sock, command);
}
static void
- #ifdef _NO_PROTO
- issue_dependent_commands(page, command, type)
- HyperDocPage *page;
- TextNode *command;
- int type;
- #else
issue_dependent_commands(HyperDocPage *page, TextNode *command,int type)
- #endif
{
TextNode *node, *depend_label;
SpadcomDepend *depend;
--- 92,98 ----
*************** issue_dependent_commands(HyperDocPage *p
*** 142,155 ****
}
}
static void
- #ifdef _NO_PROTO
- mark_as_executed(page, command, type)
- HyperDocPage *page;
- TextNode *command;
- int type;
- #else
mark_as_executed(HyperDocPage *page, TextNode *command,int type)
- #endif
{
TextNode *node, *depend_label;
SpadcomDepend *depend;
--- 122,128 ----
*************** mark_as_executed(HyperDocPage *page, Tex
*** 174,185 ****
/* start a spad buffer for the page associated with the give */
static void
- #ifdef _NO_PROTO
- start_user_buffer(page)
- HyperDocPage *page;
- #else
start_user_buffer(HyperDocPage *page)
- #endif
{
char buf[1024], *title;
char *SPAD;
--- 147,153 ----
*************** start_user_buffer(HyperDocPage *page)
*** 240,251 ****
/* Clears the execution marks in a hash table when a buffer has been killed */
static void
- #ifdef _NO_PROTO
- clear_execution_marks(depend_hash)
- HashTable *depend_hash;
- #else
clear_execution_marks(HashTable *depend_hash)
- #endif
{
int i;
HashEntry *h;
--- 208,214 ----
*************** clear_execution_marks(HashTable *depend_
*** 261,272 ****
}
Sock *
- #ifdef _NO_PROTO
- accept_menu_connection(server_sock)
- Sock *server_sock;
- #else
accept_menu_connection(Sock *server_sock)
- #endif
{
int sock_fd /*, session, ret_code*/;
Sock_List *pls;
--- 224,230 ----
*************** accept_menu_connection(Sock *server_sock
*** 307,318 ****
}
static void
- #ifdef _NO_PROTO
- accept_menu_server_connection(page)
- HyperDocPage *page;
- #else
accept_menu_server_connection(HyperDocPage *page)
- #endif
{
/*
--- 265,271 ----
*************** int p2sBufSize = 0;
*** 389,400 ****
*/
char *
- #ifdef _NO_PROTO
- print_to_string(command)
- TextNode *command; /* The text node being translated */
- #else
print_to_string(TextNode *command)
- #endif
{
int len = 0;
--- 342,348 ----
*************** see the code in ht-util.boot
*** 416,428 ****
extern int include_bf;
char *
- #ifdef _NO_PROTO
- print_to_string1(command, sizeBuf)
- TextNode *command; /* The text node being translated */
- int *sizeBuf;
- #else
print_to_string1(TextNode *command,int * sizeBuf)
- #endif
{
char *c = p2sBuf;
char *s;
--- 364,370 ----
*************** print_to_string1(TextNode *command,int *
*** 669,680 ****
*/
HyperDocPage *
- #ifdef _NO_PROTO
- issue_server_command(link)
- HyperLink *link;
- #else
issue_server_command(HyperLink *link)
- #endif
{
TextNode *command = (TextNode *) link->reference.node;
int ret_val;
--- 611,617 ----
*************** issue_server_command(HyperLink *link)
*** 722,733 ****
}
int
- #ifdef _NO_PROTO
- issue_serverpaste(command)
- TextNode *command;
- #else
issue_serverpaste(TextNode *command)
- #endif
{
char *buf;
int ret_val;
--- 659,665 ----
*************** issue_serverpaste(TextNode *command)
*** 746,757 ****
* issue a unix command
*/
void
- #ifdef _NO_PROTO
- issue_unixcommand(node)
- TextNode *node;
- #else
issue_unixcommand(TextNode *node)
- #endif
{
char *buf;
char *copy;
--- 678,684 ----
*************** issue_unixcommand(TextNode *node)
*** 768,779 ****
}
HyperDocPage *
- #ifdef _NO_PROTO
- issue_unixlink(node)
- TextNode *node;
- #else
issue_unixlink(TextNode *node)
- #endif
{
HyperDocPage *page;
char *buf;
--- 695,701 ----
*************** issue_unixlink(TextNode *node)
*** 790,801 ****
}
int
- #ifdef _NO_PROTO
- issue_unixpaste(node)
- TextNode *node;
- #else
issue_unixpaste(TextNode *node)
- #endif
{
char *buf;
--- 712,718 ----
*************** issue_unixpaste(TextNode *node)
*** 812,822 ****
* called when session_server selects
*/
void
- #ifdef _NO_PROTO
- service_session_socket()
- #else
service_session_socket(void)
- #endif
{
int cmd, pid;
--- 729,735 ----
*************** service_session_socket(void)
*** 839,849 ****
* let spad know which frame to issue command via
*/
static void
- #ifdef _NO_PROTO
- switch_frames()
- #else
switch_frames(void)
- #endif
{
if (session_server == NULL) {
fprintf(stderr, "(HyperDoc) No session manager connected!\n");
--- 752,758 ----
*************** switch_frames(void)
*** 857,868 ****
send_int(session_server, gWindow->fAxiomFrame);
}
void
- #ifdef _NO_PROTO
- send_lisp_command(command)
- char *command;
- #else
send_lisp_command(char *command)
- #endif
{
int ret_val;
--- 766,772 ----
*************** send_lisp_command(char *command)
*** 874,885 ****
send_string(spad_socket, command);
}
void
- #ifdef _NO_PROTO
- escape_string(s)
- char *s;
- #else
escape_string(char *s)
- #endif
{
char *st;
--- 778,784 ----
*************** escape_string(char *s)
*** 887,898 ****
*st = funnyEscape(*st);
}
void
- #ifdef _NO_PROTO
- unescape_string(s)
- char *s;
- #else
unescape_string(char *s)
- #endif
{
char *st;
--- 786,792 ----
*************** unescape_string(char *s)
*** 900,911 ****
*st = funnyUnescape(*st);
}
static void
- #ifdef _NO_PROTO
- close_client(pid)
- int pid;
- #else
close_client(int pid)
- #endif
{
/*int i;*/
Sock_List *pSock, *locSock;
--- 794,800 ----
*************** close_client(int pid)
*** 955,966 ****
char *
- #ifdef _NO_PROTO
- print_source_to_string(command)
- TextNode *command; /* The text node being translated */
- #else
print_source_to_string(TextNode *command)
- #endif
{
int len = 0;
--- 844,850 ----
*************** print_source_to_string(TextNode *command
*** 969,981 ****
return print_source_to_string1(command, NULL);
}
char *
- #ifdef _NO_PROTO
- print_source_to_string1(command, sizeBuf)
- TextNode *command; /* The text node being translated */
- int *sizeBuf;
- #else
print_source_to_string1(TextNode *command,int * sizeBuf)
- #endif
{
char *c = p2sBuf;
char *s;
--- 853,859 ----
*** src/hyper/titlebar.pamphlet (revision 16913)
--- src/hyper/titlebar.pamphlet (local)
*************** int twwidth, twheight; /* the width an
*** 87,97 ****
/* title bar */
void
- #ifdef _NO_PROTO
- makeTitleBarWindows()
- #else
makeTitleBarWindows(void)
- #endif
{
XSetWindowAttributes at;
unsigned long valuemask = 0L;
--- 87,93 ----
*************** makeTitleBarWindows(void)
*** 132,142 ****
}
void
- #ifdef _NO_PROTO
- showTitleBar()
- #else
showTitleBar(void)
- #endif
{
XWindowChanges wc;
int height, hbw = (int) gWindow->border_width / 2;
--- 128,134 ----
*************** showTitleBar(void)
*** 265,275 ****
}
void
- #ifdef _NO_PROTO
- linkTitleBarWindows()
- #else
linkTitleBarWindows(void)
- #endif
{
HyperLink *tw1link = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink"),
*tw2link = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink"),
--- 257,263 ----
*************** linkTitleBarWindows(void)
*** 303,313 ****
}
static void
- #ifdef _NO_PROTO
- readTitleBarImages()
- #else
readTitleBarImages(void)
- #endif
{
int w, h;
char filename[128];
--- 291,297 ----
*************** readTitleBarImages(void)
*** 356,367 ****
}
void
- #ifndef _NO_PROTO
getTitleBarMinimumSize(int *width, int *height)
- #else
- getTitleBarMinimumSize(width, height)
- int *width,*height;
- #endif
{
(*width) = 4 * twwidth + 40;
(*height) = twheight + 2;
--- 340,346 ----