aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2016-01-25 02:26:12 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2016-01-25 02:26:12 -0800
commit82b46badba16f7b40891e7d5e45bb3da828b6203 (patch)
tree0c9ecbd9b5443d7af7e7d2b3db3a5101b88c38cd
parent0093f04cb53e58151ad3bdfbff328d564ff17caf (diff)
downloadopen-axiom-82b46badba16f7b40891e7d5e45bb3da828b6203.tar.gz
Remove various crufts.
-rw-r--r--src/hyper/dialog.c2
-rw-r--r--src/hyper/event.c26
-rw-r--r--src/hyper/event.h10
-rw-r--r--src/hyper/ex2ht.c6
-rw-r--r--src/hyper/extent2.c4
-rw-r--r--src/hyper/group.c26
-rw-r--r--src/hyper/htadd.c4
-rw-r--r--src/hyper/hthits.c4
-rw-r--r--src/hyper/htinp.c8
-rw-r--r--src/hyper/htsearch.cc4
-rw-r--r--src/hyper/hyper.c18
-rw-r--r--src/hyper/hyper.h43
-rw-r--r--src/hyper/initx.c70
-rw-r--r--src/hyper/initx.h2
-rw-r--r--src/hyper/input.c4
-rw-r--r--src/hyper/item.c8
-rw-r--r--src/hyper/keyin.c2
-rw-r--r--src/hyper/keyin.h2
-rw-r--r--src/hyper/lex.c34
-rw-r--r--src/hyper/lex.h30
-rw-r--r--src/hyper/macro.c8
-rw-r--r--src/hyper/mem.c16
-rw-r--r--src/hyper/node.h146
-rw-r--r--src/hyper/parse-aux.c6
-rw-r--r--src/hyper/parse-input.c12
-rw-r--r--src/hyper/parse-paste.c4
-rw-r--r--src/hyper/parse-paste.h4
-rw-r--r--src/hyper/parse-types.c84
-rw-r--r--src/hyper/parse-types.h8
-rw-r--r--src/hyper/parse.c30
-rw-r--r--src/hyper/parse.h24
-rw-r--r--src/hyper/scrollbar.c18
-rw-r--r--src/hyper/spadbuf.c12
-rw-r--r--src/hyper/spadint.c8
-rw-r--r--src/hyper/titlebar.c10
-rw-r--r--src/hyper/titlebar.h6
36 files changed, 347 insertions, 356 deletions
diff --git a/src/hyper/dialog.c b/src/hyper/dialog.c
index 36be2390..fe7b78aa 100644
--- a/src/hyper/dialog.c
+++ b/src/hyper/dialog.c
@@ -84,7 +84,7 @@ static char move_rest_back(LineStruct * line , int size);
static int move_sym_forward(LineStruct * line , int num , int size , InputItem * sym);
static char * mystrncpy(char * buff1 , char * buff2 , int n);
static void overwrite_buffer(char * buffer , InputItem * item);
-static void redraw_win(void);
+static void redraw_win();
static void tough_enter(InputItem * sym);
static void
diff --git a/src/hyper/event.c b/src/hyper/event.c
index c390d6d2..b2217805 100644
--- a/src/hyper/event.c
+++ b/src/hyper/event.c
@@ -89,7 +89,7 @@ HyperDocErrorHandler(Display *display, XErrorEvent *xe)
}
static void
-set_error_handlers(void)
+set_error_handlers()
{
XSetErrorHandler(HyperDocErrorHandler);
}
@@ -193,7 +193,7 @@ make_busy_cursor(HDWindow *window)
}
static void
-make_busy_cursors(void)
+make_busy_cursors()
{
hash_map(&gSessionHashTable, (MappableFunction)make_busy_cursor);
}
@@ -284,7 +284,7 @@ kill_page(HyperDocPage * page)
/* pops the memo stack */
static HyperDocPage *
-returnlink(void)
+returnlink()
{
int i;
@@ -309,7 +309,7 @@ returnlink(void)
/* pops a page if it can from the downlink stack */
static HyperDocPage *
-uplink(void)
+uplink()
{
if (gWindow->fDownLinkStackIndex == 0)
return returnlink();
@@ -354,7 +354,7 @@ find_page(TextNode * node)
/* pushes a page onto the down link stack */
static void
-downlink(void)
+downlink()
{
if (gWindow->fDownLinkStackIndex == MaxDownlinkDepth)
fprintf(stderr, "exceeded maximum link nesting level\n");
@@ -363,7 +363,7 @@ downlink(void)
}
static void
-memolink(void)
+memolink()
{
if (gWindow->fMemoStackIndex == MaxMemoDepth)
fprintf(stderr, "exceeded maximum link nesting level\n");
@@ -408,7 +408,7 @@ lispwindowlink_handler(HyperLink * link)
}
static void
-create_window(void)
+create_window()
{
XWindowAttributes wa;
@@ -728,7 +728,7 @@ handle_event(XEvent * event)
*/
void
-quitHyperDoc(void)
+quitHyperDoc()
{
HyperDocPage *page;
@@ -765,7 +765,7 @@ make_window_link(char *name)
void
-helpForHyperDoc(void)
+helpForHyperDoc()
{
HyperDocPage *page = NULL;
@@ -794,7 +794,7 @@ helpForHyperDoc(void)
void
-exitHyperDoc(void)
+exitHyperDoc()
{
XEvent event;
@@ -834,7 +834,7 @@ exitHyperDoc(void)
}
void
-get_new_window(void)
+get_new_window()
{
int val;
@@ -974,7 +974,7 @@ init_cursor_state(HDWindow *window)
}
static void
-init_cursor_states(void)
+init_cursor_states()
{
hash_map(&gSessionHashTable,(MappableFunction) init_cursor_state);
}
@@ -987,7 +987,7 @@ init_cursor_states(void)
*/
void
-mainEventLoop(void)
+mainEventLoop()
{
XEvent event;
int Xcon;
diff --git a/src/hyper/event.h b/src/hyper/event.h
index 5a4971f0..9a9638b7 100644
--- a/src/hyper/event.h
+++ b/src/hyper/event.h
@@ -40,12 +40,12 @@
extern void sigusr2_handler(int sig);
extern void sigcld_handler(int sig);
-extern void clean_socket(void);
+extern void clean_socket();
extern void init_page_structs(HDWindow * w);
-extern void helpForHyperDoc(void);
-extern void quitHyperDoc(void);
-extern void exitHyperDoc(void);
-extern void mainEventLoop(void);
+extern void helpForHyperDoc();
+extern void quitHyperDoc();
+extern void exitHyperDoc();
+extern void mainEventLoop();
extern void make_window_link(char*);
extern Window gActiveWindow;
diff --git a/src/hyper/ex2ht.c b/src/hyper/ex2ht.c
index 3637776a..64a55a2e 100644
--- a/src/hyper/ex2ht.c
+++ b/src/hyper/ex2ht.c
@@ -87,7 +87,7 @@ emitCoverLink(const char* name, char *title)
}
static void
-closeCoverFile(void)
+closeCoverFile()
{
fclose(coverFile);
#ifndef __WIN32__ /* FIXME! */
@@ -96,14 +96,14 @@ closeCoverFile(void)
}
static void
-closeCoverPage(void)
+closeCoverPage()
{
fprintf(coverFile, "}\\endscroll\\end{page}\n\n");
}
/* cover page functions */
static void
-openCoverPage(void)
+openCoverPage()
{
coverFile = fopen("coverex.ht", "w");
if (coverFile == NULL) {
diff --git a/src/hyper/extent2.c b/src/hyper/extent2.c
index 8a57cd0b..10f7b923 100644
--- a/src/hyper/extent2.c
+++ b/src/hyper/extent2.c
@@ -492,7 +492,7 @@ total_width(TextNode * node, int Ender)
*/
void
-init_extents(void)
+init_extents()
{
present_line_height = line_height;
gInLine = 0;
@@ -534,7 +534,7 @@ init_title_extents(HyperDocPage * page)
*/
void
-init_text(void)
+init_text()
{
normal_text_height = gRmFont->ascent + gRmFont->descent;
line_height = gRmFont->ascent + gRmFont->descent + inter_line_space;
diff --git a/src/hyper/group.c b/src/hyper/group.c
index c7a53240..031eea13 100644
--- a/src/hyper/group.c
+++ b/src/hyper/group.c
@@ -52,7 +52,7 @@ GroupItem *gTopOfGroupStack = NULL;
int
-pop_group_stack(void)
+pop_group_stack()
{
/* This routine pops the top of the current group stack */
GroupItem *junk;
@@ -80,7 +80,7 @@ pop_group_stack(void)
}
void
-push_group_stack(void)
+push_group_stack()
{
/*
* This routine makes room by pushing a new item on the stack
@@ -97,7 +97,7 @@ push_group_stack(void)
}
void
-init_group_stack(void)
+init_group_stack()
{
gTopOfGroupStack = (GroupItem *) halloc(sizeof(GroupItem), "Push Group Stack");
gTopOfGroupStack->center = 0;
@@ -107,7 +107,7 @@ init_group_stack(void)
}
void
-em_top_group(void)
+em_top_group()
{
if (! gTopOfGroupStack->next)
push_group_stack();
@@ -117,7 +117,7 @@ em_top_group(void)
}
void
-rm_top_group(void)
+rm_top_group()
{
if (! gTopOfGroupStack->next)
push_group_stack();
@@ -128,7 +128,7 @@ rm_top_group(void)
}
void
-line_top_group(void)
+line_top_group()
{
if (! gTopOfGroupStack->next)
push_group_stack();
@@ -139,7 +139,7 @@ line_top_group(void)
}
void
-bf_top_group(void)
+bf_top_group()
{
/*
* Just in case the person is tryin a \em without a grouping
@@ -153,7 +153,7 @@ bf_top_group(void)
}
void
-tt_top_group(void)
+tt_top_group()
{
if (! gTopOfGroupStack->next)
push_group_stack();
@@ -163,7 +163,7 @@ tt_top_group(void)
}
void
-push_active_group(void)
+push_active_group()
{
push_group_stack();
gTopOfGroupStack->cur_font = gActiveFont;
@@ -172,7 +172,7 @@ push_active_group(void)
}
void
-push_spad_group(void)
+push_spad_group()
{
push_group_stack();
gTopOfGroupStack->cur_font = gAxiomFont;
@@ -181,7 +181,7 @@ push_spad_group(void)
}
void
-init_top_group(void)
+init_top_group()
{
/* clear the group stack */
while (pop_group_stack() >= 0)
@@ -195,14 +195,14 @@ init_top_group(void)
}
void
-center_top_group(void)
+center_top_group()
{
push_group_stack();
gTopOfGroupStack->center = 1;
}
GroupItem *
-copy_group_stack(void)
+copy_group_stack()
{
GroupItem *newgp = NULL;
GroupItem *first = NULL;
diff --git a/src/hyper/htadd.c b/src/hyper/htadd.c
index e28bd31d..21321ae7 100644
--- a/src/hyper/htadd.c
+++ b/src/hyper/htadd.c
@@ -61,7 +61,7 @@ static void add_new_pages(FILE*, FILE*, char*, char*);
static int build_db_filename(short, char*, char*);
static void delete_db(FILE*, FILE*, char*);
static int delete_file(char*, char*);
-static void get_filename(void);
+static void get_filename();
static void parse_args(char**, char*, char**, short*);
static void update_db(FILE*, FILE*, FILE*, char*, char*, int);
@@ -413,7 +413,7 @@ add_new_pages(FILE *temp_db, FILE *new_file, char *addname, char *fullname)
static void
-get_filename(void)
+get_filename()
{
int c, ws;
static char buffer[256];
diff --git a/src/hyper/hthits.c b/src/hyper/hthits.c
index ce277e65..8b2c3c10 100644
--- a/src/hyper/hthits.c
+++ b/src/hyper/hthits.c
@@ -88,7 +88,7 @@ int gverifydates=0;
regex_t reg_pattern;
static void
-badDB(void)
+badDB()
{
fprintf(stderr, "%s: bad database file %s\n", progName, htdbFName);
exit(1);
@@ -376,7 +376,7 @@ handleFile(FILE* htdbFile)
}
static void
-handleHtdb(void)
+handleHtdb()
{
FILE *htdbFile;
int c;
diff --git a/src/hyper/htinp.c b/src/hyper/htinp.c
index 12964bc4..7799c194 100644
--- a/src/hyper/htinp.c
+++ b/src/hyper/htinp.c
@@ -77,7 +77,7 @@ char buf_for_record_commands[256];
void
-make_record(void)
+make_record()
{
int i;
for (i=0;i<input_file_count;i++){
@@ -98,7 +98,7 @@ make_record(void)
}
void
-verify_record(void)
+verify_record()
{
int i;
for (i=0;i<input_file_count;i++){
@@ -119,7 +119,7 @@ verify_record(void)
void
-ht2_input(void)
+ht2_input()
{
HashTable *table;
HashEntry *entry;
@@ -340,7 +340,7 @@ inListAndNewer(char *inputFile, char *htFile)
}
static void
-make_input_file_list(void)
+make_input_file_list()
{
int i;
char buf[256], *name;
diff --git a/src/hyper/htsearch.cc b/src/hyper/htsearch.cc
index ef89a298..b42c0b0f 100644
--- a/src/hyper/htsearch.cc
+++ b/src/hyper/htsearch.cc
@@ -140,7 +140,7 @@ presea(char** links, int n, int cases, const char* pattern)
* pages database.
*/
static void
-set_variables(void) {
+set_variables() {
const std::string systemdir(oa_getenv("AXIOM"));
if (systemdir.empty()) {
@@ -206,7 +206,7 @@ htsearch(const char* pattern)
* Display how to use the htsearch program.
*/
static void
-usage(void)
+usage()
{
std::cerr << "Usage: htsearch pattern" << std::endl;
exit(1);
diff --git a/src/hyper/hyper.c b/src/hyper/hyper.c
index f306e0b8..207c16ff 100644
--- a/src/hyper/hyper.c
+++ b/src/hyper/hyper.c
@@ -66,12 +66,12 @@
using namespace OpenAxiom;
-static void init_hash(void);
-static void make_server_connections(void);
-static void check_arguments(void);
-static void init_hash(void);
-static void make_server_connections(void);
-static void check_arguments(void);
+static void init_hash();
+static void make_server_connections();
+static void check_arguments();
+static void init_hash();
+static void make_server_connections();
+static void check_arguments();
/*
* Here is a flag used to tell me whether I made a good connection to the
@@ -320,7 +320,7 @@ main(int argc, char **argv)
*/
static void
-init_hash(void)
+init_hash()
{
hash_init(&gFileHashTable,
FileHashSize,
@@ -354,7 +354,7 @@ init_page_structs(HDWindow *w)
}
static void
-check_arguments(void)
+check_arguments()
{
int i;
@@ -404,7 +404,7 @@ check_arguments(void)
}
static void
-make_server_connections(void)
+make_server_connections()
{
int i, wait_time;
diff --git a/src/hyper/hyper.h b/src/hyper/hyper.h
index 9f936764..67537647 100644
--- a/src/hyper/hyper.h
+++ b/src/hyper/hyper.h
@@ -49,34 +49,25 @@
#include "node.h"
#include "pixmap.h"
-#define boolean unsigned short int
-
-#ifndef TRUE
-#define TRUE ((boolean) 0x1)
-#endif
-#ifndef FALSE
-#define FALSE ((boolean) 0x0)
-#endif
-
extern void sigusr2_handler(int sig);
extern void sigcld_handler(int sig);
-extern void clean_socket(void);
+extern void clean_socket();
extern void init_page_structs(HDWindow * w);
-extern void push_item_stack(void);
-extern void clear_item_stack(void);
-extern void pop_item_stack(void);
-extern ItemStack * copy_item_stack(void);
+extern void push_item_stack();
+extern void clear_item_stack();
+extern void pop_item_stack();
+extern ItemStack * copy_item_stack();
extern void free_item_stack(ItemStack * is);
-extern ButtonList * alloc_button_list(void);
-extern CondNode * alloc_condnode(void);
-extern HDWindow * alloc_hd_window(void);
-extern IfNode * alloc_ifnode(void);
-extern InputBox * alloc_inputbox(void);
+extern ButtonList * alloc_button_list();
+extern CondNode * alloc_condnode();
+extern HDWindow * alloc_hd_window();
+extern IfNode * alloc_ifnode();
+extern InputBox * alloc_inputbox();
extern LineStruct * alloc_inputline(int size);
-extern TextNode * alloc_node(void);
+extern TextNode * alloc_node();
extern HyperDocPage * alloc_page(const char * name);
extern PasteNode * alloc_paste_node(char * name);
-extern RadioBoxes * alloc_rbs(void);
+extern RadioBoxes * alloc_rbs();
extern void free_button_list(ButtonList * bl);
extern void free_hd_window(HDWindow * w);
extern void free_input_item(InputItem * sym , short des);
@@ -86,14 +77,14 @@ extern void free_page(HyperDocPage * page);
extern void free_patch(PatchStore * p);
extern void free_string(char * str);
extern char * resizeBuffer(int size , char * oldBuf , int * oldSize);
-extern PatchStore * alloc_patchstore(void);
+extern PatchStore * alloc_patchstore();
extern InputItem * return_item(char * name);
extern void fill_box(Window w , ImageStruct * image);
extern void toggle_input_box(HyperLink * link);
extern void toggle_radio_box(HyperLink * link);
extern void change_input_focus(HyperLink * link);
-extern void next_input_focus(void);
-extern void prev_input_focus(void);
+extern void next_input_focus();
+extern void prev_input_focus();
extern int delete_item(char * name);
extern XImage * HTReadBitmapFile(Display * display , int screen , char * filename , int * width , int * height);
extern ImageStruct * insert_image_struct(char * filename);
@@ -119,7 +110,7 @@ extern char * print_to_string1(TextNode * command , int * sizeBuf);
extern int issue_serverpaste(TextNode * command);
extern void issue_unixcommand(TextNode * node);
extern int issue_unixpaste(TextNode * node);
-extern void service_session_socket(void);
+extern void service_session_socket();
extern void send_lisp_command(char * command);
extern void escape_string(char * s);
extern void unescape_string(char * s);
@@ -278,7 +269,7 @@ extern int space_width;
#define BeepAtTheUser() /* (XBell(gXDisplay, 5)) */
#define LoudBeepAtTheUser() /* (XBell(gXDisplay, 50)) */
-extern int connect_spad(void);
+extern int connect_spad();
/*** default fonts ***/
diff --git a/src/hyper/initx.c b/src/hyper/initx.c
index 5b8dee53..0ee4afa0 100644
--- a/src/hyper/initx.c
+++ b/src/hyper/initx.c
@@ -76,14 +76,14 @@ extern int gethostname(char *, int );
using namespace OpenAxiom;
static void get_GCs(HDWindow * window);
-static int get_border_properties(void);
+static int get_border_properties();
static int get_color(const char* , const char* , int, Colormap*);
-static void ingItColors_and_fonts(void);
+static void ingItColors_and_fonts();
static void load_font(XFontStruct * * font_info , char * fontname);
-static void mergeDatabases(void);
-static void open_form_window(void);
+static void mergeDatabases();
+static void open_form_window();
static void open_window(Window w);
-static void set_name_and_icon(void);
+static void set_name_and_icon();
static void set_size_hints(Window w);
@@ -130,7 +130,7 @@ int gBorderColor; /* The Border Color */
/* Initialize the X Window System */
void
-initializeWindowSystem(void)
+initializeWindowSystem()
{
char *display_name = NULL;
XColor fg, bg;
@@ -270,7 +270,7 @@ init_top_window(const char *name)
/* Create and initialize a form HyperDoc window */
static void
-open_form_window(void)
+open_form_window()
{
int x, y, width, height;
unsigned int fwidth = 0, fheight = 0;
@@ -376,7 +376,7 @@ init_form_window(char *name, int cols)
static void
-set_name_and_icon(void)
+set_name_and_icon()
{
const char *icon_name = "HyperDoc";
char *s;
@@ -410,7 +410,7 @@ set_name_and_icon(void)
}
static int
-get_border_properties(void)
+get_border_properties()
{
const char *bwidth;
/*char *bc = NULL;*/
@@ -680,7 +680,7 @@ load_font(XFontStruct **font_info, char *fontname)
*/
static void
-ingItColors_and_fonts(void)
+ingItColors_and_fonts()
{
char property[256];
char *prop = &property[0];
@@ -707,9 +707,9 @@ ingItColors_and_fonts(void)
/* fprintf(stderr,"initx:ingItColors_and_fonts:XrmGetResource\n");*/
if (XrmGetResource(rDB, "OpenAxiom.hyperdoc.RmFont",
"OpenAxiom.hyperdoc.Font", str_type, &value) == True)
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
else
- (void) strcpy(prop, RmFontDefault);
+ strcpy(prop, RmFontDefault);
/* fprintf(stderr,"initx:ingItColors_and_fonts:load_font 1\n");*/
load_font(&gRmFont, prop);
@@ -720,9 +720,9 @@ ingItColors_and_fonts(void)
/* fprintf(stderr,"initx:ingItColors_and_fonts:XrmGetResource 2\n");*/
if (XrmGetResource(rDB, "OpenAxiom.hyperdoc.TtFont",
"OpenAxiom.hyperdoc.Font", str_type, &value) == True)
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
else
- (void) strcpy(prop, TtFontDefault);
+ strcpy(prop, TtFontDefault);
/* fprintf(stderr,"initx:ingItColors_and_fonts:load_font 3\n");*/
load_font(&gTtFont, prop);
@@ -732,9 +732,9 @@ ingItColors_and_fonts(void)
/* fprintf(stderr,"initx:ingItColors_and_fonts:XrmGetResource 5\n");*/
if (XrmGetResource(rDB, "OpenAxiom.hyperdoc.ActiveFont",
"OpenAxiom.hyperdoc.Font", str_type, &value) == True)
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
else
- (void) strcpy(prop, ActiveFontDefault);
+ strcpy(prop, ActiveFontDefault);
/* fprintf(stderr,"initx:ingItColors_and_fonts:load_font 4\n");*/
load_font(&gActiveFont, prop);
@@ -744,15 +744,15 @@ ingItColors_and_fonts(void)
/* fprintf(stderr,"initx:ingItColors_and_fonts:XrmGetResource 6\n");*/
if (XrmGetResource(rDB, "OpenAxiom.hyperdoc.AxiomFont",
"OpenAxiom.hyperdoc.Font", str_type, &value) == True)
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
else {
if (XrmGetResource(rDB, "OpenAxiom.hyperdoc.SpadFont",
"OpenAxiom.hyperdoc.Font", str_type, &value) == True)
{
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
}
else {
- (void) strcpy(prop, AxiomFontDefault);
+ strcpy(prop, AxiomFontDefault);
}
}
@@ -763,10 +763,10 @@ ingItColors_and_fonts(void)
if (XrmGetResource(rDB, "OpenAxiom.hyperdoc.EmphasizeFont",
"OpenAxiom.hyperdoc.Font", str_type, &value) == True)
{
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
}
else {
- (void) strcpy(prop, EmphasizeFontDefault);
+ strcpy(prop, EmphasizeFontDefault);
}
/* fprintf(stderr,"initx:ingItColors_and_fonts:load_font 6\n");*/
load_font(&gEmFont, prop);
@@ -775,10 +775,10 @@ ingItColors_and_fonts(void)
if (XrmGetResource(rDB, "OpenAxiom.hyperdoc.BoldFont",
"OpenAxiom.hyperdoc.Font", str_type, &value) == True)
{
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
}
else {
- (void) strcpy(prop, BoldFontDefault);
+ strcpy(prop, BoldFontDefault);
}
/* fprintf(stderr,"initx:ingItColors_and_fonts:load_font 7\n");*/
load_font(&gBfFont, prop);
@@ -922,7 +922,7 @@ get_color(const char *name, const char *klass, int def, Colormap *map)
strcat(fullclass, klass);
if (XrmGetResource(rDB, fullname, fullclass, str_type, &value) == True) {
- (void) strncpy(prop, value.addr, (int) value.size);
+ strncpy(prop, value.addr, (int) value.size);
ret_val = XAllocNamedColor(gXDisplay, *map, prop, &color_def, &color_db);
if (ret_val) {
#ifdef DEBUG
@@ -950,7 +950,7 @@ get_color(const char *name, const char *klass, int def, Colormap *map)
static void
-mergeDatabases(void)
+mergeDatabases()
{
XrmDatabase homeDB, serverDB, applicationDB;
char filenamebuf[1024];
@@ -960,21 +960,21 @@ mergeDatabases(void)
/* fprintf(stderr,"initx:mergeDatabases:entered\n");*/
/* fprintf(stderr,"initx:mergeDatabases:XrmInitialize\n");*/
- (void) XrmInitialize();
- (void) strcpy(name, "/usr/lib/X11/app-defaults/");
- (void) strcat(name, classname);
+ XrmInitialize();
+ strcpy(name, "/usr/lib/X11/app-defaults/");
+ strcat(name, classname);
/* fprintf(stderr,"initx:mergeDatabases:XrmGetFileDatabase name=%s\n",name);*/
applicationDB = XrmGetFileDatabase(name);
/* fprintf(stderr,"initx:mergeDatabases:XrmMergeDatabases\n");*/
- (void) XrmMergeDatabases(applicationDB, &rDB);
+ XrmMergeDatabases(applicationDB, &rDB);
/* fprintf(stderr,"initx:mergeDatabases:XrmGetStringDatabase\n");*/
if (XResourceManagerString(gXDisplay) != NULL) {
serverDB = XrmGetStringDatabase(XResourceManagerString(gXDisplay));
}
else {
- (void) strcpy(filename, oa_getenv("HOME"));
- (void) strcat(filename, "/.Xdefaults");
+ strcpy(filename, oa_getenv("HOME"));
+ strcat(filename, "/.Xdefaults");
/* fprintf(stderr,"initx:mergeDatabases:XrmGetFileDatase\n");*/
serverDB = XrmGetFileDatabase(filename);
}
@@ -983,13 +983,13 @@ mergeDatabases(void)
if (oa_getenv("XENVIRONMENT") == NULL) {
int len;
- (void) strcpy(filename, oa_getenv("HOME"));
- (void) strcat(filename, "/.Xdefaults-");
+ strcpy(filename, oa_getenv("HOME"));
+ strcat(filename, "/.Xdefaults-");
len = strlen(filename);
- (void) gethostname(filename + len, 1024 - len);
+ gethostname(filename + len, 1024 - len);
}
else {
- (void) strcpy(filename, oa_getenv("XENVIRONMENT"));
+ strcpy(filename, oa_getenv("XENVIRONMENT"));
}
/* fprintf(stderr,"initx:mergeDatabases:filename=%s\n",filename);*/
homeDB = XrmGetFileDatabase(filename);
diff --git a/src/hyper/initx.h b/src/hyper/initx.h
index fe043968..d335f410 100644
--- a/src/hyper/initx.h
+++ b/src/hyper/initx.h
@@ -41,7 +41,7 @@
extern void change_text(int color , XFontStruct * font);
extern int init_form_window(char * name , int cols);
extern int init_top_window(const char * name);
-extern void initializeWindowSystem(void);
+extern void initializeWindowSystem();
extern int is_it_850(XFontStruct * fontarg);
extern int gBorderColor;
diff --git a/src/hyper/input.c b/src/hyper/input.c
index dc6c0fbe..2c645208 100644
--- a/src/hyper/input.c
+++ b/src/hyper/input.c
@@ -130,7 +130,7 @@ change_input_focus(HyperLink *link)
update_inputsymbol(new_item);
}
void
-next_input_focus(void)
+next_input_focus()
{
InputItem *old_item = gWindow->page->current_item, *new_item, *trace;
@@ -157,7 +157,7 @@ next_input_focus(void)
draw_inputsymbol(new_item);
}
void
-prev_input_focus(void)
+prev_input_focus()
{
InputItem *old_item = gWindow->page->current_item, *new_item, *trace;
diff --git a/src/hyper/item.c b/src/hyper/item.c
index 93cceb82..7bf7d724 100644
--- a/src/hyper/item.c
+++ b/src/hyper/item.c
@@ -46,7 +46,7 @@ ItemStack *gTopOfItemStack = NULL;
void
-push_item_stack(void)
+push_item_stack()
{
ItemStack *is = (ItemStack *) halloc(sizeof(ItemStack), "Item stack");
@@ -58,7 +58,7 @@ push_item_stack(void)
return;
}
void
-clear_item_stack(void)
+clear_item_stack()
{
ItemStack *is = gTopOfItemStack, *chuck;
@@ -70,7 +70,7 @@ clear_item_stack(void)
return;
}
void
-pop_item_stack(void)
+pop_item_stack()
{
ItemStack *chuck;
@@ -87,7 +87,7 @@ pop_item_stack(void)
}
ItemStack *
-copy_item_stack(void)
+copy_item_stack()
{
ItemStack *stack = NULL;
ItemStack *prev = NULL;
diff --git a/src/hyper/keyin.c b/src/hyper/keyin.c
index b397d956..eef07e7b 100644
--- a/src/hyper/keyin.c
+++ b/src/hyper/keyin.c
@@ -267,7 +267,7 @@ handle_key(XEvent *event)
*/
void
-init_keyin(void)
+init_keyin()
{
char *prop;
unsigned nlm = get_modifier_mask(XK_Num_Lock);
diff --git a/src/hyper/keyin.h b/src/hyper/keyin.h
index aad41b1c..7f09f97d 100644
--- a/src/hyper/keyin.h
+++ b/src/hyper/keyin.h
@@ -37,7 +37,7 @@
#define _KEYIN_H_ 1
extern void handle_key(XEvent * event);
-extern void init_keyin(void);
+extern void init_keyin();
extern int in_cursor_height;
extern int in_cursor_width;
diff --git a/src/hyper/lex.c b/src/hyper/lex.c
index f06a498d..d571e6cd 100644
--- a/src/hyper/lex.c
+++ b/src/hyper/lex.c
@@ -230,7 +230,7 @@ dumpToken(char *caller, Token t)
/* initialize the parser keyword hash table */
void
-parser_init(void)
+parser_init()
{
int i;
Token *toke;
@@ -253,7 +253,7 @@ parser_init(void)
/* initialize the lexical scanner to read from a file */
void
-init_scanner(void)
+init_scanner()
{
if (oa_getenv("HTASCII")) {
useAscii = (strcmp(oa_getenv("HTASCII"), "yes") == 0);
@@ -279,7 +279,7 @@ init_scanner(void)
/* save the current state of the scanner */
void
-save_scanner_state(void)
+save_scanner_state()
{
StateNode *new_item = (StateNode *) halloc((sizeof(StateNode)), "StateNode");
@@ -299,7 +299,7 @@ save_scanner_state(void)
/* restore the saved scanner state */
void
-restore_scanner_state(void)
+restore_scanner_state()
{
StateNode *x = top_state_node;
@@ -334,7 +334,7 @@ unget_char(int c)
}
int
-get_char(void)
+get_char()
{
int c;
@@ -383,7 +383,7 @@ get_char(void)
/* return the next character in the input stream */
static int
-get_char1(void)
+get_char1()
{
int c;
int cmd;
@@ -460,7 +460,7 @@ Token unget_toke;
/* return current token to the input stream */
void
-unget_token(void)
+unget_token()
{
last_token = 1;
unget_toke.type = token.type;
@@ -469,7 +469,7 @@ unget_token(void)
int
-get_token(void)
+get_token()
{
int c, ws;
int nls = 0;
@@ -644,7 +644,7 @@ typedef struct be_struct {
BeStruct *top_be_stack;
void
-jump(void)
+jump()
{
if (gWindow == NULL)
exit(-1);
@@ -699,7 +699,7 @@ check_and_pop_be_stack(int type, const char* id)
}
int
-clear_be_stack(void)
+clear_be_stack()
{
BeStruct *x = top_be_stack, *y;
@@ -784,7 +784,7 @@ be_type(const char* which)
}
int
-begin_type(void)
+begin_type()
{
/*Token store;*/
int ret_val;
@@ -821,7 +821,7 @@ begin_type(void)
int
-end_type(void)
+end_type()
{
int ret;
@@ -945,7 +945,7 @@ token_name(int type)
/* print out a token value */
void
-print_token(void)
+print_token()
{
if (token.type == openaxiom_Word_token)
printf("%s ", token.id);
@@ -957,7 +957,7 @@ print_token(void)
}
void
-print_next_ten_tokens(void)
+print_next_ten_tokens()
{
int i;
int v;
@@ -973,7 +973,7 @@ print_next_ten_tokens(void)
}
void
-print_page_and_filename(void)
+print_page_and_filename()
{
char obuff[128];
@@ -1004,7 +1004,7 @@ print_page_and_filename(void)
static int
-keyword_type(void)
+keyword_type()
{
Token *token_ent;
@@ -1068,7 +1068,7 @@ get_expected_token(int type)
}
static void
-spad_error_handler(void)
+spad_error_handler()
{
/* fprintf(stderr, "got a spad error\n"); */
longjmp(jmpbuf, 1);
diff --git a/src/hyper/lex.h b/src/hyper/lex.h
index ce518341..634bcae3 100644
--- a/src/hyper/lex.h
+++ b/src/hyper/lex.h
@@ -43,27 +43,27 @@
#define Numerrors 2
extern void get_expected_token(int);
-extern void parser_init(void);
-extern void init_scanner(void);
-extern void save_scanner_state(void);
-extern void restore_scanner_state(void);
+extern void parser_init();
+extern void init_scanner();
+extern void save_scanner_state();
+extern void restore_scanner_state();
extern void unget_char(int);
-extern int get_char(void);
-extern void unget_token(void);
-extern int get_token(void);
+extern int get_char();
+extern void unget_token();
+extern int get_token();
extern void push_be_stack(int, const char*);
extern void check_and_pop_be_stack(int, const char*);
-extern int clear_be_stack(void);
+extern int clear_be_stack();
extern int be_type(const char*);
-extern int begin_type(void);
-extern int end_type(void);
-extern void reset_connection(void);
+extern int begin_type();
+extern int end_type();
+extern void reset_connection();
-extern void print_page_and_filename(void);
-extern void jump(void);
-extern void print_token(void);
+extern void print_page_and_filename();
+extern void jump();
+extern void print_token();
extern void token_name(int);
-extern void print_next_ten_tokens(void);
+extern void print_next_ten_tokens();
extern long fpos, keyword_fpos;
extern Token token;
diff --git a/src/hyper/macro.c b/src/hyper/macro.c
index b68c87b0..0b0d1889 100644
--- a/src/hyper/macro.c
+++ b/src/hyper/macro.c
@@ -51,7 +51,7 @@ static void get_parameter_strings(int number , char * macro_name);
* right brace then left brace
*/
void
-scan_HyperDoc(void)
+scan_HyperDoc()
{
HDWindow *twin = gWindow;
int ret_val;
@@ -208,7 +208,7 @@ push_parameters(ParameterList parms)
return 1;
}
int
-pop_parameters(void)
+pop_parameters()
{
/** Simply pops the top of the parameter list, being good and freeing
all the memory **/
@@ -235,7 +235,7 @@ pop_parameters(void)
}
int
-parse_macro(void)
+parse_macro()
{
/*
@@ -367,7 +367,7 @@ get_parameter_strings(int number,char * macro_name)
return ;
}
void
-parse_parameters(void)
+parse_parameters()
{
int value;
diff --git a/src/hyper/mem.c b/src/hyper/mem.c
index 0aca518b..325f4a98 100644
--- a/src/hyper/mem.c
+++ b/src/hyper/mem.c
@@ -78,7 +78,7 @@ free_if_non_NULL(void *p)
/* allocate an HDWindow Structure and initialize it */
HDWindow *
-alloc_hd_window(void)
+alloc_hd_window()
{
HDWindow *w = (HDWindow *) halloc(sizeof(HDWindow), "HDWindow");
/*char haslisp[10];*/
@@ -150,7 +150,7 @@ free_hd_window(HDWindow *w)
/* Allocate an empty text node */
TextNode *
-alloc_node(void)
+alloc_node()
{
TextNode *temp_node;
@@ -343,7 +343,7 @@ free_node(TextNode *node, short int des)
}
IfNode *
-alloc_ifnode(void)
+alloc_ifnode()
{
IfNode *tempif;
@@ -353,7 +353,7 @@ alloc_ifnode(void)
}
CondNode *
-alloc_condnode(void)
+alloc_condnode()
{
CondNode *temp;
@@ -663,7 +663,7 @@ alloc_paste_node(char *name)
}
PatchStore *
-alloc_patchstore(void)
+alloc_patchstore()
{
PatchStore *p = (PatchStore *) halloc(sizeof(PatchStore), "PatchStore");
@@ -687,7 +687,7 @@ free_patch(PatchStore *p)
}
InputBox *
-alloc_inputbox(void)
+alloc_inputbox()
{
InputBox *box = (InputBox *) halloc(sizeof(InputBox), "InputBox");
@@ -698,7 +698,7 @@ alloc_inputbox(void)
}
RadioBoxes *
-alloc_rbs(void)
+alloc_rbs()
{
RadioBoxes *newrb = (RadioBoxes *) halloc(sizeof(RadioBoxes), "Radio Boxes");
@@ -708,7 +708,7 @@ alloc_rbs(void)
}
ButtonList *
-alloc_button_list(void)
+alloc_button_list()
{
ButtonList *newbl = (ButtonList *) halloc(sizeof(ButtonList), "Button List");
diff --git a/src/hyper/node.h b/src/hyper/node.h
index 9573d80d..4aed3276 100644
--- a/src/hyper/node.h
+++ b/src/hyper/node.h
@@ -66,6 +66,7 @@ struct InputItem;
struct paste_node;
struct RadioBoxes;
struct GroupItem;
+struct PasteNode;
#define Scrollupbutton 1
#define Scrolldownbutton 2
@@ -80,7 +81,7 @@ struct GroupItem;
/** I am implementing a state node stack, this is the structure I store **/
-typedef struct StateNode {
+struct StateNode {
int last_ch, last_token;
SourceInputKind input_type;
long fpos, keyword_fpos;
@@ -89,123 +90,121 @@ typedef struct StateNode {
char *input_string;
FILE *cfile;
int keyword;
- struct StateNode *next;
-} StateNode;
+ StateNode *next;
+};
/** pointer to the top of the state node graph **/
extern StateNode *top_state_node;
/* structure for a hyper text link */
-typedef struct HyperLink {
+struct HyperLink {
int type; /* Memolink, Spadlink, Downlink etc. */
openaxiom_window win; /* X11 window containing active area */
union {
- struct TextNode *node; /* ID of link to which link refers */
- struct InputBox *box;
- struct InputItem *string;
- struct PasteNode *paste; /* the paste node area */
+ TextNode *node; /* ID of link to which link refers */
+ InputBox *box;
+ InputItem *string;
+ PasteNode *paste; /* the paste node area */
} reference;
int x,y; /* relative position inside page */
-} HyperLink;
+};
-typedef struct IfNode {
- struct TextNode *cond; /* the condition nodes*/
- struct TextNode *thennode;
- struct TextNode *elsenode;
-} IfNode;
+struct IfNode {
+ TextNode *cond; /* the condition nodes*/
+ TextNode *thennode;
+ TextNode *elsenode;
+};
-typedef struct ItemStack {
+struct ItemStack {
int indent;
int item_indent;
int in_item;
- struct ItemStack *next;
-} ItemStack;
+ ItemStack *next;
+};
-typedef struct PasteNode {
+struct PasteNode {
char *name;
SourceInputKind where; /* where should I be parsing from? */
short int hasbutton;
short int haspaste;
- struct GroupItem *group;
+ GroupItem *group;
ItemStack *item_stack;
- struct TextNode *arg_node;
- struct TextNode *end_node;
- struct TextNode *begin_node;
- struct InputItem *paste_item;
-} PasteNode;
+ TextNode *arg_node;
+ TextNode *end_node;
+ TextNode *begin_node;
+ InputItem *paste_item;
+};
/* Structure for formatted hypertext */
-typedef struct TextNode {
+struct TextNode {
short type; /* type of node (text, link, etc.) */
int x,y, width, height; /* relative location on screen */
int space; /* was there space in front of me ? */
union {
char *text; /* piece of text to display */
- struct TextNode *node; /* argument text */
- struct IfNode *ifnode;
+ TextNode *node; /* argument text */
+ IfNode *ifnode;
} data;
HyperLink *link; /* link for active text */
union {
openaxiom_pixmap pm; /* pixmap for bit images */
openaxiom_image *xi; /* pixmap image */
} image;
- struct TextNode *next; /* next node in formatted text */
-} TextNode;
+ TextNode *next; /* next node in formatted text */
+};
/** Structure used to store pixmaps and bitmaps **/
-typedef struct ImageStruct {
+struct ImageStruct {
int width,height; /** It's width and height **/
union {
openaxiom_pixmap pm;
openaxiom_image *xi;
} image;
char *filename; /** The filename used to reference it **/
-} ImageStruct;
+};
/* Structure for locating HyperDoc pages in a source file */
-typedef struct FilePosition {
+struct FilePosition {
char *name; /* file name */
long pos; /* position in file */
int ln; /* the line number */
-} FilePosition;
+};
/*** The structure needed for storing a macro **/
-typedef struct MacroStore {
+struct MacroStore {
short int loaded;
FilePosition fpos;
char *name;
char *macro_string;
short number_parameters;
-} MacroStore;
-
-
+};
/** Structure needed for storing a patch **/
-typedef struct PatchStore {
+struct PatchStore {
short int loaded;
FilePosition fpos;
char *name;
char *string;
-} PatchStore;
+};
/* Here are the structures needed for doing input to HyperDoc windows. */
-typedef struct LineStruct {
+struct LineStruct {
char *buffer;
int changed; /* Has the line changed */
int line_number;
int buff_pntr;
int len;
- struct LineStruct *prev, *next;
-} LineStruct;
+ LineStruct *prev, *next;
+};
-typedef struct InputItem {
+struct InputItem {
char *name; /* symbol name **/
int size; /* the length of the window **/
int cursor_x; /* x-coordinate for the cursor **/
@@ -216,45 +215,45 @@ typedef struct InputItem {
LineStruct *lines;
LineStruct *curr_line; /* the current line on which the cursor */
openaxiom_window win;
- struct InputItem *next;
-} InputItem;
+ InputItem *next;
+};
/* structure for storing input boxes **/
-typedef struct InputBox {
+struct InputBox {
char *name;
ImageStruct *selected, *unselected;
short int picked;
- struct InputBox *next;
- struct RadioBoxes *rbs;
+ InputBox *next;
+ RadioBoxes *rbs;
openaxiom_window win;
-} InputBox;
+};
-typedef struct RadioBoxes {
+struct RadioBoxes {
char *name;
InputBox *boxes;
ImageStruct *selected, *unselected;
int width, height;
- struct RadioBoxes *next;
-} RadioBoxes;
+ RadioBoxes *next;
+};
/* Structure for spadcommand dependencies hash table entries */
-typedef struct spadcom_depend {
+struct SpadcomDepend {
char *label; /* dependency label */
TextNode *spadcom; /* spadcommand defining the label */
short executed; /* true iff spadcommand has benn executed */
-} SpadcomDepend;
+} ;
-typedef struct ButtonList {
+struct ButtonList {
int x0,y0,x1,y1;
HyperLink *link;
openaxiom_window win;
- struct ButtonList *next;
-} ButtonList;
+ ButtonList *next;
+};
/* Stucture for unformatted hyper text page */
-typedef struct HyperDocPage {
+struct HyperDocPage {
short type; /* Normal, Quitbutton, Upbutton etc. */
const char *name; /* ID of page */
char *filename; /* The name of the file in which the page
@@ -277,19 +276,19 @@ typedef struct HyperDocPage {
RadioBoxes *radio_boxes; /* a linked list of radio boxes */
short page_flags; /* A list of flags for the page */
char *helppage; /* the name of the helppage */
-} HyperDocPage;
+};
/* Structure for an unloaded page */
-typedef struct UnloadedPage {
+struct UnloadedPage {
short type; /* indicator of unloaded page */
char *name; /* name of page */
FilePosition fpos; /* where to find the page */
-} UnloadedPage;
+};
/* Structure for a HyperDoc Window */
-typedef struct HDWindow {
+struct HDWindow {
openaxiom_window fMainWindow; /* The main text field window. */
openaxiom_window fScrollWindow; /* The scrolling area of the window. */
openaxiom_window fDisplayedWindow; /* The current window of the above two,*/
@@ -343,36 +342,37 @@ typedef struct HDWindow {
openaxiom_graphic_context fCursorGC; /* Graphics context for the cursors */
openaxiom_graphic_context fControlGC; /* Graphics context for the buttons */
openaxiom_cursor fDisplayedCursor; /* The currently displayed cursor */
-} HDWindow;
+};
/* Structure for identifying appropriate link hash tables */
-typedef struct LinkHashID {
+struct LinkHashID {
int code; /* code of active area */
HyperDocPage *page; /* page for which hash table applies */
-} LinkHashID;
+};
-typedef struct GroupItem {
+struct GroupItem {
int cur_color;
openaxiom_font *cur_font;
int center;
- struct GroupItem *next;
-} GroupItem;
+ GroupItem *next;
+};
-typedef struct CondNode {
+struct CondNode {
char *label;
char *cond;
-} CondNode;
+};
-typedef struct parameter_list_type {
+struct parameter_list_type {
char **list; /** The parameters in string form **/
short number; /** How many parameters are there **/
- struct parameter_list_type *next;
-} *ParameterList;
+ parameter_list_type *next;
+};
+using ParameterList = parameter_list_type*;
/*** Flags for the page ***/
diff --git a/src/hyper/parse-aux.c b/src/hyper/parse-aux.c
index df268c05..4c7600b9 100644
--- a/src/hyper/parse-aux.c
+++ b/src/hyper/parse-aux.c
@@ -426,7 +426,7 @@ make_special_pages(HashTable *pageHashTable)
/* Parse the \bound{varlist} command, and add vars to dependency table */
void
-add_dependencies(void)
+add_dependencies()
{
TextNode *bound_node = curr_node;
TextNode *node;
@@ -509,7 +509,7 @@ parser_error(char *str)
/* advance token to the next token in the input stream. */
int
-get_filename(void)
+get_filename()
{
int c, ws;
static int seen_white = 0; /*UNUSED */
@@ -552,7 +552,7 @@ get_filename(void)
}
char *
-get_input_string(void)
+get_input_string()
{
char *string;
TextNode *string_node,*save_node;
diff --git a/src/hyper/parse-input.c b/src/hyper/parse-input.c
index f927c64c..1c619151 100644
--- a/src/hyper/parse-input.c
+++ b/src/hyper/parse-input.c
@@ -164,7 +164,7 @@ initialize_default(InputItem *item,char * buff)
/* Parse the input string statement * */
void
-parse_inputstring(void)
+parse_inputstring()
{
TextNode *input_node = curr_node;
char *name;
@@ -218,7 +218,7 @@ parse_inputstring(void)
}
void
-parse_simplebox(void)
+parse_simplebox()
{
InputBox *box;
char *name;
@@ -309,7 +309,7 @@ parse_simplebox(void)
return;
}
void
-parse_radiobox(void)
+parse_radiobox()
{
InputBox *box;
char *name;
@@ -495,7 +495,7 @@ init_paste_item(InputItem *item)
}
}
void
-repaste_item(void)
+repaste_item()
{
InputItem *trace;
@@ -514,7 +514,7 @@ repaste_item(void)
}
InputItem *
-current_item(void)
+current_item()
{
InputItem *trace = gPageBeingParsed->input_list;
@@ -539,7 +539,7 @@ already_there(char *name)
return 0;
}
void
-parse_radioboxes(void)
+parse_radioboxes()
{
TextNode *return_node = curr_node;
RadioBoxes *newrb;
diff --git a/src/hyper/parse-paste.c b/src/hyper/parse-paste.c
index f129f474..06d84fa1 100644
--- a/src/hyper/parse-paste.c
+++ b/src/hyper/parse-paste.c
@@ -57,7 +57,7 @@ short int gInPaste;
void
-parse_paste(void)
+parse_paste()
{
TextNode *pn = curr_node;
PasteNode *paste;
@@ -142,7 +142,7 @@ parse_paste(void)
}
void
-parse_pastebutton(void)
+parse_pastebutton()
{
PasteNode *paste;
TextNode *pb;
diff --git a/src/hyper/parse-paste.h b/src/hyper/parse-paste.h
index deb7f552..cb0556b9 100644
--- a/src/hyper/parse-paste.h
+++ b/src/hyper/parse-paste.h
@@ -39,8 +39,8 @@
#include "openaxiom-c-macros.h"
#include "hyper.h"
-extern void parse_paste(void);
-extern void parse_pastebutton(void);
+extern void parse_paste();
+extern void parse_pastebutton();
extern HyperDocPage * parse_patch(PasteNode * paste);
extern short int gInPaste;
diff --git a/src/hyper/parse-types.c b/src/hyper/parse-types.c
index e20d77b3..f5a42cd9 100644
--- a/src/hyper/parse-types.c
+++ b/src/hyper/parse-types.c
@@ -54,13 +54,13 @@
using namespace OpenAxiom;
-static void parse_condnode(void );
-static void parse_hasreturnto(void );
+static void parse_condnode();
+static void parse_hasreturnto();
-boolean gInButton = FALSE;
-boolean gInIf = FALSE;
-boolean gInItems = FALSE;
-boolean gInOptional = FALSE;
+bool gInButton = false;
+bool gInIf = false;
+bool gInItems = false;
+bool gInOptional = false;
static const char* errmess[] = {
@@ -101,7 +101,7 @@ htperror(const char* msg, int erno)
}
void
-parse_ifcond(void)
+parse_ifcond()
{
TextNode *ifnode = curr_node;
TextNode *endif;
@@ -118,7 +118,7 @@ parse_ifcond(void)
fprintf(stderr, "Longjump failed, Exiting\n");
exit(-1);
}
- gInIf++;
+ gInIf = true;
curr_node->type = openaxiom_Ifcond_token;
curr_node->space = token.id[-1];
curr_node->data.ifnode = alloc_ifnode();
@@ -168,11 +168,11 @@ parse_ifcond(void)
ifnode->next = ifnode->data.ifnode->thennode;
ifnode->width = -1; /* A flag for compute if extents */
curr_node = endif;
- gInIf--;
+ gInIf = false;
}
static void
-parse_condnode(void)
+parse_condnode()
{
get_token();
@@ -206,7 +206,7 @@ parse_condnode(void)
}
static void
-parse_hasreturnto(void)
+parse_hasreturnto()
{
TextNode *hrt = curr_node, *arg_node = alloc_node();
@@ -220,7 +220,7 @@ parse_hasreturnto(void)
}
void
-parse_newcond(void)
+parse_newcond()
{
char label[256];
@@ -233,7 +233,7 @@ parse_newcond(void)
}
void
-parse_setcond(void)
+parse_setcond()
{
char label[256], cond[256];
@@ -250,7 +250,7 @@ parse_setcond(void)
}
void
-parse_begin_items(void)
+parse_begin_items()
{
TextNode *bi = curr_node;
@@ -264,9 +264,9 @@ parse_begin_items(void)
if (token.type == openaxiom_Lsquarebrace_token) {
bi->data.node = alloc_node();
curr_node = bi->data.node;
- gInOptional++;
+ gInOptional = true;
parse_HyperDoc();
- gInOptional--;
+ gInOptional = false;
curr_node->type = openaxiom_Enddescription_token;
if (token.type != openaxiom_Rsquarebrace_token) {
fprintf(stderr, "(HyperDoc) Optional arguments must end with ].\n");
@@ -278,11 +278,11 @@ parse_begin_items(void)
}
else
unget_token();
- gInItems++;
+ gInItems = true;
}
void
-parse_item(void)
+parse_item()
{
if (!gInItems) {
fprintf(stderr, "\\item found outside an items environment\n");
@@ -299,9 +299,9 @@ parse_item(void)
curr_node->type = openaxiom_Description_token;
curr_node->next = alloc_node();
curr_node = curr_node->next;
- gInOptional++;
+ gInOptional = true;
parse_HyperDoc();
- gInOptional--;
+ gInOptional = false;
curr_node->type = openaxiom_Enddescription_token;
if (token.type != openaxiom_Rsquarebrace_token) {
fprintf(stderr, "(HyperDoc) Optional arguments must end with ].\n");
@@ -316,7 +316,7 @@ parse_item(void)
}
void
-parse_mitem(void)
+parse_mitem()
{
if (!gInItems) {
fprintf(stderr, "\\mitem found outside an items environment\n");
@@ -407,7 +407,7 @@ parse_verbatim(int type)
}
void
-parse_input_pix(void)
+parse_input_pix()
{
TextNode *pixnode;
char *filename;
@@ -447,7 +447,7 @@ parse_input_pix(void)
}
void
-parse_centerline(void)
+parse_centerline()
{
curr_node->type = token.type;
curr_node->space = token.id[-1];
@@ -467,11 +467,11 @@ parse_centerline(void)
}
void
-parse_command(void)
+parse_command()
{
TextNode *link_node, *save_node, *arg_node;
- gInButton++;
+ gInButton = true;
if (gParserMode == SimpleMode) {
curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "Parser Error token %s unexpected\n",
@@ -500,15 +500,15 @@ parse_command(void)
link_node->link = make_link_window(arg_node, link_node->type, 0);
gStringValueOk = 0;
curr_node = save_node;
- gInButton--;
+ gInButton = false;
}
void
-parse_button(void)
+parse_button()
{
TextNode *link_node, *save_node;
- gInButton++;
+ gInButton = true;
if (gParserMode == SimpleMode) {
curr_node->type = openaxiom_Noop_token;
fprintf(stderr, "Parser Error token %s unexpected\n",
@@ -543,7 +543,7 @@ parse_button(void)
link_node->link =
make_link_window(save_node->data.node, link_node->type, 0);
curr_node = save_node;
- gInButton--;
+ gInButton = false;
}
extern int example_number;
@@ -554,7 +554,7 @@ parse_spadcommand(TextNode *spad_node)
/*TextNode *node = NULL;*/
example_number++;
- gInButton++;
+ gInButton = true;
spad_node->type = token.type;
spad_node->space = token.id[-1];
get_expected_token(openaxiom_Lbrace_token);
@@ -566,7 +566,7 @@ parse_spadcommand(TextNode *spad_node)
curr_node->type = openaxiom_Endspadcommand_token;
cur_spadcom = NULL;
spad_node->link = make_link_window(spad_node->next, spad_node->type, 1);
- gInButton--;
+ gInButton = false;
}
void
@@ -577,8 +577,8 @@ parse_spadsrc(TextNode *spad_node)
/*TextNode *node = NULL;*/
example_number++;
- gInButton++;
- gInSpadsrc++;
+ gInButton = true;
+ gInSpadsrc = true;
spad_node->type = openaxiom_Spadsrc_token;
spad_node->space = token.id[-1];
@@ -603,8 +603,8 @@ parse_spadsrc(TextNode *spad_node)
cur_spadcom = NULL;
spad_node->link = make_link_window(spad_node->next,
openaxiom_Spadsrc_token, 1);
- gInButton--;
- gInSpadsrc--;
+ gInButton = false;
+ gInSpadsrc = false;
}
void
@@ -648,7 +648,7 @@ parse_env(TextNode *node)
*/
void
-parse_value1(void)
+parse_value1()
{
TextNode *value_node, *ocn = curr_node;
char *s;
@@ -678,7 +678,7 @@ parse_value1(void)
*/
void
-parse_value2(void)
+parse_value2()
{
TextNode *value_node, *ocn = curr_node;
char *s;
@@ -706,7 +706,7 @@ parse_value2(void)
/* parse a \table sommand */
void
-parse_table(void)
+parse_table()
{
TextNode *tn = curr_node;
@@ -752,7 +752,7 @@ parse_table(void)
}
void
-parse_box(void)
+parse_box()
{
curr_node->type = token.type;
curr_node->space = token.id[-1];
@@ -765,7 +765,7 @@ parse_box(void)
}
void
-parse_mbox(void)
+parse_mbox()
{
curr_node->type = token.type;
curr_node->space = token.id[-1];
@@ -778,7 +778,7 @@ parse_mbox(void)
}
void
-parse_free(void)
+parse_free()
{
TextNode *free_node = curr_node;
@@ -794,7 +794,7 @@ parse_free(void)
}
void
-parse_help(void)
+parse_help()
{
curr_node->type = openaxiom_Noop_token;
get_token();
diff --git a/src/hyper/parse-types.h b/src/hyper/parse-types.h
index 9e4fdcbf..b67c5dda 100644
--- a/src/hyper/parse-types.h
+++ b/src/hyper/parse-types.h
@@ -61,10 +61,10 @@ extern void parse_value2(void );
extern void parse_verbatim(int type);
extern void show_text(TextNode * node , int Ender);
-extern boolean gInButton;
-extern boolean gInIf;
-extern boolean gInItems;
-extern boolean gInOptional;
+extern bool gInButton;
+extern bool gInIf;
+extern bool gInItems;
+extern bool gInOptional;
#endif
diff --git a/src/hyper/parse.c b/src/hyper/parse.c
index e53242e8..1ca0f77e 100644
--- a/src/hyper/parse.c
+++ b/src/hyper/parse.c
@@ -71,7 +71,7 @@ TextNode *cur_spadcom; /* The current OpenAxiom command */
short int gParserMode; /* Parser mode flag */
short int gParserRegion; /* Parser Region flag scrolling etc */
short int gStringValueOk; /* is a string or box value ok */
-boolean gEndedPage;
+bool gEndedPage;
extern int example_number; /* sequence example number */
@@ -84,7 +84,7 @@ char *replace_page; /* true if dynamic page is link to static one */
void
-reset_connection(void)
+reset_connection()
{
if (spad_socket) {
FD_CLR(spad_socket->socket, &socket_mask);
@@ -116,7 +116,7 @@ typedef struct mr_stack {
MR_Stack *top_mr_stack = NULL; /** Declaration for the stack **/
static void
-Push_MR(void)
+Push_MR()
{
MR_Stack *newStackItem = (MR_Stack *) halloc(sizeof(MR_Stack), "Mode Region Stack");
@@ -127,7 +127,7 @@ Push_MR(void)
}
static void
-Pop_MR(void)
+Pop_MR()
{
MR_Stack *old = top_mr_stack;
@@ -300,7 +300,7 @@ init_parse_page(HyperDocPage *page)
{
gEndedPage = gInDesc = gStringValueOk = gInIf =
gInButton = gInOptional = gInVerbatim = gInPaste = gInItems =
- gInSpadsrc = FALSE;
+ gInSpadsrc = false;
example_number = 1;
cur_page = page;
gParserMode = AllMode;
@@ -327,7 +327,7 @@ init_parse_patch(HyperDocPage *page)
{
gEndedPage = gInDesc = gStringValueOk = gInIf =
gInButton = gInOptional = gInVerbatim = gInPaste = gInItems =
- gInSpadsrc = FALSE;
+ gInSpadsrc = false;
gParserMode = AllMode;
gParserRegion = Scrolling;
@@ -378,7 +378,7 @@ char *ExpectedBeginScroll =
*/
void
-parse_HyperDoc(void)
+parse_HyperDoc()
{
TextNode *node = NULL /*, *save_node = NULL, *arg_node = NULL*/ ;
@@ -528,7 +528,7 @@ parse_HyperDoc(void)
case openaxiom_EndItems_token:
token.type = openaxiom_Enditems_token;
case openaxiom_Enditems_token:
- gInItems--;
+ gInItems = false;
case openaxiom_Horizontalline_token:
case openaxiom_Par_token:
case openaxiom_Newline_token:
@@ -705,7 +705,7 @@ parse_HyperDoc(void)
/* parse a page from a socket source */
HyperDocPage *
-parse_page_from_socket(void)
+parse_page_from_socket()
{
HyperDocPage *page = alloc_page((char *) NULL);
HyperDocPage *hpage;
@@ -750,7 +750,7 @@ parse_page_from_socket(void)
}
HyperDocPage *
-parse_page_from_unixfd(void)
+parse_page_from_unixfd()
{
HyperDocPage *page = alloc_page((char *) NULL);
@@ -780,7 +780,7 @@ parse_page_from_unixfd(void)
}
static void
-start_scrolling(void)
+start_scrolling()
{
/*
@@ -807,7 +807,7 @@ start_scrolling(void)
}
static void
-start_footer(void)
+start_footer()
{
/*
* This ends the parsing of the scrolling region, and then starts to
@@ -836,7 +836,7 @@ start_footer(void)
}
static void
-end_a_page(void)
+end_a_page()
{
if (gParserRegion == Scrolling) {
fprintf(stderr, "%s\n",
@@ -845,7 +845,7 @@ end_a_page(void)
print_page_and_filename();
jump();
}
- gEndedPage = TRUE;
+ gEndedPage = true;
if (gParserRegion == Footer) {
/* the person had all the regions, I basically just have to leave */
curr_node->type = openaxiom_Endscrolling_token;
@@ -863,7 +863,7 @@ end_a_page(void)
}
static void
-parse_replacepage(void)
+parse_replacepage()
{
get_expected_token(openaxiom_Lbrace_token);
get_token();
diff --git a/src/hyper/parse.h b/src/hyper/parse.h
index 90374ac7..3e2c04b4 100644
--- a/src/hyper/parse.h
+++ b/src/hyper/parse.h
@@ -60,14 +60,14 @@ extern HyperDocPage * parse_page_from_unixfd(void );
extern HyperLink * make_input_window(InputItem * item);
extern HyperLink * make_box_window(InputBox * box , int type);
extern void initialize_default(InputItem * item , char * buff);
-extern void parse_inputstring(void);
-extern void parse_simplebox(void);
-extern void parse_radiobox(void);
+extern void parse_inputstring();
+extern void parse_simplebox();
+extern void parse_radiobox();
extern void init_paste_item(InputItem * item);
-extern void repaste_item(void);
-extern InputItem * current_item(void);
+extern void repaste_item();
+extern InputItem * current_item();
extern int already_there(char * name);
-extern void parse_radioboxes(void);
+extern void parse_radioboxes();
extern void add_dependencies(void );
extern FILE * find_fp(FilePosition fp);
extern char * get_input_string(void );
@@ -78,17 +78,17 @@ extern int window_code(Window * w , int size);
extern int window_equal(Window * w1 , Window * w2);
extern char * window_id(Window w);
extern void read_ht_db(HashTable * page_hash , HashTable * macro_hash , HashTable * patch_hash);
-extern int get_filename(void);
+extern int get_filename();
extern int is_number(const char * str);
extern void parser_error(char * str);
extern SourceInputKind get_where();
-extern void scan_HyperDoc(void);
+extern void scan_HyperDoc();
extern int number(const char * str);
extern ParameterList init_parameter_elem(int number);
extern int push_parameters(ParameterList);
-extern int pop_parameters(void);
-extern int parse_macro(void);
-extern void parse_parameters(void);
+extern int pop_parameters();
+extern int parse_macro();
+extern void parse_parameters();
extern jmp_buf jmpbuf;
extern int vbuff;
@@ -124,7 +124,7 @@ extern short int gParserMode;
extern short int gParserRegion;
extern short int gStringValueOk;
-extern boolean gEndedPage;
+extern bool gEndedPage;
extern int line_number;
diff --git a/src/hyper/scrollbar.c b/src/hyper/scrollbar.c
index 1bcc47bf..92e67ad1 100644
--- a/src/hyper/scrollbar.c
+++ b/src/hyper/scrollbar.c
@@ -166,7 +166,7 @@ int gScrollbarWidth = sup_width + 2;
void
-makeScrollBarWindows(void)
+makeScrollBarWindows()
{
XSetWindowAttributes at;
@@ -391,7 +391,7 @@ moveScroller(HDWindow * hdWindow)
#define bothalf(y) (y/2)
void
-drawScrollLines(void)
+drawScrollLines()
{
/* 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 */
@@ -425,7 +425,7 @@ drawScrollLines(void)
*/
void
-calculateScrollBarMeasures(void)
+calculateScrollBarMeasures()
{
int t;
@@ -497,7 +497,7 @@ calculateScrollBarMeasures(void)
}
void
-linkScrollBars(void)
+linkScrollBars()
{
HyperLink *uplink = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink");
HyperLink *downlink = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink");
@@ -520,7 +520,7 @@ linkScrollBars(void)
}
void
-scrollUp(void)
+scrollUp()
{
if (gWindow->page->scroll_off == 0); /* BeepAtTheUser(); *//* The
@@ -546,7 +546,7 @@ scrollUp(void)
}
void
-scrollUpPage(void)
+scrollUpPage()
{
if (gWindow->page->scroll_off == 0); /* BeepAtTheUser(); */
else {
@@ -562,7 +562,7 @@ scrollUpPage(void)
}
void
-scrollToFirstPage(void)
+scrollToFirstPage()
{
if (gWindow->page->scroll_off == 0); /* BeepAtTheUser(); */
else {
@@ -573,7 +573,7 @@ scrollToFirstPage(void)
}
void
-scrollDown(void)
+scrollDown()
{
if (-(gWindow->page->scroll_off) >=
@@ -601,7 +601,7 @@ scrollDown(void)
void
-scrollDownPage(void)
+scrollDownPage()
{
if (gWindow->page->scrolling == NULL || (-(gWindow->page->scroll_off) >=
(gWindow->page->scrolling->height - gWindow->scrollheight))) {
diff --git a/src/hyper/spadbuf.c b/src/hyper/spadbuf.c
index 18f28c0e..bfb4b377 100644
--- a/src/hyper/spadbuf.c
+++ b/src/hyper/spadbuf.c
@@ -64,9 +64,9 @@
using namespace OpenAxiom;
static void spadbuf_inter_handler(int);
-static void spadbuf_function_chars(void);
-static void interp_io(void);
-static void init_parent(void);
+static void spadbuf_function_chars();
+static void interp_io();
+static void init_parent();
unsigned char _INTR, _QUIT, _ERASE, _KILL, _EOF, _EOL, _RES1, _RES2;
@@ -108,7 +108,7 @@ spadbuf_inter_handler(int sig)
}
static void
-spadbuf_function_chars(void)
+spadbuf_function_chars()
{
/** once I have that get the special characters ****/
_INTR = oldbuf.c_cc[VINTR];
@@ -123,7 +123,7 @@ spadbuf_function_chars(void)
/* act as terminal session for sock connected to stdin
and stdout of another process */
static void
-interp_io(void)
+interp_io()
{
char buf[1024];
fd_set rd;
@@ -172,7 +172,7 @@ interp_io(void)
}
static void
-init_parent(void)
+init_parent()
{
/** get the original termio settings, so I never have to check again **/
diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c
index 7699a653..aa381ba0 100644
--- a/src/hyper/spadint.c
+++ b/src/hyper/spadint.c
@@ -68,7 +68,7 @@ Sock_List *plSock = (Sock_List *) 0;
/* connect to OpenAxiom , return 0 if succesful, 1 if not */
int
-connect_spad(void)
+connect_spad()
{
if (!MenuServerOpened) {
fprintf(stderr, "(HyperDoc) Warning: Not connected to OpenAxiom Server!\n");
@@ -89,7 +89,7 @@ connect_spad(void)
/* returns true if spad is currently computing */
int
-spad_busy(void)
+spad_busy()
{
if (session_server == NULL)
return 1;
@@ -793,7 +793,7 @@ issue_unixpaste(TextNode *node)
* called when session_server selects
*/
void
-service_session_socket(void)
+service_session_socket()
{
int cmd, pid;
@@ -816,7 +816,7 @@ service_session_socket(void)
* let spad know which frame to issue command via
*/
static void
-switch_frames(void)
+switch_frames()
{
if (session_server == NULL) {
fprintf(stderr, "(HyperDoc) No session manager connected!\n");
diff --git a/src/hyper/titlebar.c b/src/hyper/titlebar.c
index 23f20f57..7cc21822 100644
--- a/src/hyper/titlebar.c
+++ b/src/hyper/titlebar.c
@@ -56,7 +56,7 @@
using namespace OpenAxiom;
-static void readTitleBarImages(void);
+static void readTitleBarImages();
extern int y_off; /* y offset for scrolling regions */
@@ -99,7 +99,7 @@ int twwidth, twheight; /* the width and height for all windows in the */
/* title bar */
void
-makeTitleBarWindows(void)
+makeTitleBarWindows()
{
XSetWindowAttributes at;
unsigned long valuemask = 0L;
@@ -140,7 +140,7 @@ makeTitleBarWindows(void)
}
void
-showTitleBar(void)
+showTitleBar()
{
XWindowChanges wc;
int height, hbw = (int) gWindow->border_width / 2;
@@ -269,7 +269,7 @@ showTitleBar(void)
}
void
-linkTitleBarWindows(void)
+linkTitleBarWindows()
{
HyperLink *tw1link = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink"),
*tw2link = (HyperLink *) halloc(sizeof(HyperLink), "HyperLink"),
@@ -303,7 +303,7 @@ linkTitleBarWindows(void)
}
static void
-readTitleBarImages(void)
+readTitleBarImages()
{
int w, h;
char filename[128];
diff --git a/src/hyper/titlebar.h b/src/hyper/titlebar.h
index db7059a4..94e77fe2 100644
--- a/src/hyper/titlebar.h
+++ b/src/hyper/titlebar.h
@@ -39,9 +39,9 @@
#include "hyper.h"
extern void getTitleBarMinimumSize(int * width , int * height);
-extern void linkTitleBarWindows(void);
-extern void makeTitleBarWindows(void);
-extern void showTitleBar(void);
+extern void linkTitleBarWindows();
+extern void makeTitleBarWindows();
+extern void showTitleBar();
extern int twwidth, twheight; /* the width and height for all windows in the */
/* title bar */