From 5aa1fed48bf5285cea058dc15c5a62b7e4453c32 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Sun, 24 Jun 2018 00:50:56 +0100 Subject: [PATCH] dthelp: Convert all K&R function definitions to ANSI (C90) standard --- cde/programs/dthelp/dthelpview/Main.c | 2 +- .../dthelp/parser/canon1/build/build.c | 4 +- .../dthelp/parser/canon1/build/buildutl.c | 4 +- .../dthelp/parser/canon1/build/eltree.c | 3 +- cde/programs/dthelp/parser/canon1/build/fsa.c | 76 +++++-------------- cde/programs/dthelp/parser/canon1/build/out.c | 31 +++----- .../dthelp/parser/canon1/build/scan.c | 3 +- .../dthelp/parser/canon1/build/sref.c | 12 +-- .../dthelp/parser/canon1/build/tree.c | 3 +- .../dthelp/parser/canon1/eltdef/eltdef.c | 4 +- .../dthelp/parser/canon1/eltdef/eltutil.c | 26 ++----- .../dthelp/parser/canon1/eltdef/scan.c | 3 +- .../dthelp/parser/canon1/helptag/custom.c | 29 +++---- .../dthelp/parser/canon1/helptag/help.c | 53 +++++-------- .../dthelp/parser/canon1/helptag/out.c | 50 ++++-------- .../dthelp/parser/canon1/helptag/xref.c | 14 +--- .../dthelp/parser/canon1/parser/actutil.c | 10 +-- .../dthelp/parser/canon1/parser/closent.c | 3 +- .../dthelp/parser/canon1/parser/code.c | 3 +- .../dthelp/parser/canon1/parser/dcurelt.c | 4 +- .../dthelp/parser/canon1/parser/end.c | 3 +- .../dthelp/parser/canon1/parser/entity.c | 9 +-- .../dthelp/parser/canon1/parser/error.c | 7 +- .../dthelp/parser/canon1/parser/input.c | 3 +- .../dthelp/parser/canon1/parser/level.c | 6 +- .../dthelp/parser/canon1/parser/lookent.c | 7 +- .../dthelp/parser/canon1/parser/minim.c | 22 ++---- .../dthelp/parser/canon1/parser/optstrg.c | 3 +- .../dthelp/parser/canon1/parser/param.c | 22 ++---- .../dthelp/parser/canon1/parser/parent.c | 3 +- .../dthelp/parser/canon1/parser/parser.c | 4 +- .../dthelp/parser/canon1/parser/parutil.c | 2 +- cde/programs/dthelp/parser/canon1/parser/pi.c | 5 +- .../dthelp/parser/canon1/parser/scan.c | 21 ++--- .../dthelp/parser/canon1/parser/setpar.c | 4 +- .../dthelp/parser/canon1/parser/start.c | 3 +- .../dthelp/parser/canon1/parser/struct.c | 26 ++----- .../dthelp/parser/canon1/util/context.c | 4 +- .../dthelp/parser/canon1/util/conutil.c | 12 +-- .../dthelp/parser/canon1/util/emptyfil.c | 4 +- .../dthelp/parser/canon1/util/entout.c | 9 +-- .../dthelp/parser/canon1/util/error.c | 21 ++--- cde/programs/dthelp/parser/canon1/util/exit.c | 3 +- .../dthelp/parser/canon1/util/fclndir.c | 11 +-- .../dthelp/parser/canon1/util/inctest.c | 5 +- cde/programs/dthelp/parser/canon1/util/itoa.c | 7 +- .../dthelp/parser/canon1/util/lower.c | 3 +- .../dthelp/parser/canon1/util/malloc.c | 13 +--- .../dthelp/parser/canon1/util/openchk.c | 4 +- .../dthelp/parser/canon1/util/scanutil.c | 13 +--- .../dthelp/parser/canon1/util/sparse.c | 3 +- .../dthelp/parser/canon1/util/strstr.c | 4 +- cde/programs/dthelp/parser/canon1/util/trie.c | 5 +- .../dthelp/parser/canon1/util/triecnt.c | 16 +--- .../dthelp/parser/canon1/util/triedump.c | 8 +- .../dthelp/parser/canon1/util/triepdmp.c | 10 +-- .../dthelp/parser/canon1/util/trieplk.c | 4 +- .../dthelp/parser/canon1/util/trierset.c | 5 +- .../dthelp/parser/canon1/util/wchar.c | 3 +- .../dthelp/parser/pass1/build/build.c | 4 +- .../dthelp/parser/pass1/build/buildutl.c | 4 +- .../dthelp/parser/pass1/build/eltree.c | 3 +- cde/programs/dthelp/parser/pass1/build/fsa.c | 73 +++++------------- cde/programs/dthelp/parser/pass1/build/out.c | 31 +++----- cde/programs/dthelp/parser/pass1/build/scan.c | 3 +- cde/programs/dthelp/parser/pass1/build/sref.c | 12 +-- cde/programs/dthelp/parser/pass1/build/tree.c | 3 +- .../dthelp/parser/pass1/eltdef/eltdef.c | 4 +- .../dthelp/parser/pass1/eltdef/eltutil.c | 26 ++----- .../dthelp/parser/pass1/eltdef/scan.c | 3 +- .../dthelp/parser/pass1/helptag/custom.c | 29 +++---- .../dthelp/parser/pass1/helptag/help.c | 49 +++++------- .../dthelp/parser/pass1/helptag/out.c | 50 ++++-------- .../dthelp/parser/pass1/helptag/special.c | 4 +- .../dthelp/parser/pass1/helptag/xref.c | 14 +--- .../dthelp/parser/pass1/parser/actutil.c | 10 +-- .../dthelp/parser/pass1/parser/closent.c | 3 +- .../dthelp/parser/pass1/parser/code.c | 3 +- .../dthelp/parser/pass1/parser/dcurelt.c | 4 +- cde/programs/dthelp/parser/pass1/parser/end.c | 3 +- .../dthelp/parser/pass1/parser/entity.c | 9 +-- .../dthelp/parser/pass1/parser/error.c | 7 +- .../dthelp/parser/pass1/parser/input.c | 3 +- .../dthelp/parser/pass1/parser/level.c | 6 +- .../dthelp/parser/pass1/parser/lookent.c | 7 +- .../dthelp/parser/pass1/parser/minim.c | 21 ++--- .../dthelp/parser/pass1/parser/optstrg.c | 3 +- .../dthelp/parser/pass1/parser/param.c | 22 ++---- .../dthelp/parser/pass1/parser/parent.c | 3 +- .../dthelp/parser/pass1/parser/parser.c | 4 +- .../dthelp/parser/pass1/parser/parutil.c | 2 +- cde/programs/dthelp/parser/pass1/parser/pi.c | 5 +- .../dthelp/parser/pass1/parser/scan.c | 21 ++--- .../dthelp/parser/pass1/parser/setpar.c | 4 +- .../dthelp/parser/pass1/parser/start.c | 3 +- .../dthelp/parser/pass1/parser/struct.c | 26 ++----- .../dthelp/parser/pass1/util/context.c | 4 +- .../dthelp/parser/pass1/util/conutil.c | 12 +-- .../dthelp/parser/pass1/util/entout.c | 9 +-- cde/programs/dthelp/parser/pass1/util/error.c | 21 ++--- cde/programs/dthelp/parser/pass1/util/exit.c | 3 +- .../dthelp/parser/pass1/util/fclndir.c | 11 +-- .../dthelp/parser/pass1/util/inctest.c | 5 +- cde/programs/dthelp/parser/pass1/util/itoa.c | 7 +- cde/programs/dthelp/parser/pass1/util/lower.c | 3 +- .../dthelp/parser/pass1/util/malloc.c | 13 +--- .../dthelp/parser/pass1/util/openchk.c | 4 +- .../dthelp/parser/pass1/util/scanutil.c | 13 +--- .../dthelp/parser/pass1/util/sparse.c | 3 +- cde/programs/dthelp/parser/pass1/util/trie.c | 5 +- .../dthelp/parser/pass1/util/triecnt.c | 16 +--- .../dthelp/parser/pass1/util/triedump.c | 8 +- .../dthelp/parser/pass1/util/triepdmp.c | 10 +-- .../dthelp/parser/pass1/util/trieplk.c | 4 +- .../dthelp/parser/pass1/util/trierset.c | 5 +- cde/programs/dthelp/parser/pass1/util/wchar.c | 3 +- .../dthelp/parser/pass2/build/build.c | 4 +- .../dthelp/parser/pass2/build/buildutl.c | 4 +- .../dthelp/parser/pass2/build/eltree.c | 3 +- cde/programs/dthelp/parser/pass2/build/fsa.c | 76 +++++-------------- cde/programs/dthelp/parser/pass2/build/out.c | 31 +++----- cde/programs/dthelp/parser/pass2/build/scan.c | 3 +- cde/programs/dthelp/parser/pass2/build/sref.c | 12 +-- cde/programs/dthelp/parser/pass2/build/tree.c | 3 +- .../dthelp/parser/pass2/eltdef/eltdef.c | 4 +- .../dthelp/parser/pass2/eltdef/eltutil.c | 26 ++----- .../dthelp/parser/pass2/eltdef/scan.c | 3 +- .../dthelp/parser/pass2/htag2/custom.c | 29 +++---- cde/programs/dthelp/parser/pass2/htag2/sdl.c | 32 ++++---- .../dthelp/parser/pass2/parser/actutil.c | 10 +-- .../dthelp/parser/pass2/parser/closent.c | 3 +- .../dthelp/parser/pass2/parser/code.c | 3 +- .../dthelp/parser/pass2/parser/dcurelt.c | 4 +- cde/programs/dthelp/parser/pass2/parser/end.c | 3 +- .../dthelp/parser/pass2/parser/entity.c | 9 +-- .../dthelp/parser/pass2/parser/error.c | 7 +- .../dthelp/parser/pass2/parser/input.c | 3 +- .../dthelp/parser/pass2/parser/level.c | 6 +- .../dthelp/parser/pass2/parser/lookent.c | 7 +- .../dthelp/parser/pass2/parser/minim.c | 22 ++---- .../dthelp/parser/pass2/parser/optstrg.c | 3 +- .../dthelp/parser/pass2/parser/param.c | 22 ++---- .../dthelp/parser/pass2/parser/parent.c | 3 +- .../dthelp/parser/pass2/parser/parser.c | 4 +- .../dthelp/parser/pass2/parser/parutil.c | 2 +- cde/programs/dthelp/parser/pass2/parser/pi.c | 5 +- .../dthelp/parser/pass2/parser/scan.c | 21 ++--- .../dthelp/parser/pass2/parser/setpar.c | 4 +- .../dthelp/parser/pass2/parser/start.c | 3 +- .../dthelp/parser/pass2/parser/struct.c | 26 ++----- .../dthelp/parser/pass2/util/context.c | 4 +- .../dthelp/parser/pass2/util/conutil.c | 12 +-- .../dthelp/parser/pass2/util/entout.c | 9 +-- cde/programs/dthelp/parser/pass2/util/error.c | 21 ++--- cde/programs/dthelp/parser/pass2/util/exit.c | 3 +- .../dthelp/parser/pass2/util/fclndir.c | 11 +-- .../dthelp/parser/pass2/util/inctest.c | 5 +- cde/programs/dthelp/parser/pass2/util/itoa.c | 7 +- cde/programs/dthelp/parser/pass2/util/lower.c | 3 +- .../dthelp/parser/pass2/util/malloc.c | 9 +-- .../dthelp/parser/pass2/util/openchk.c | 4 +- .../dthelp/parser/pass2/util/scanutil.c | 13 +--- .../dthelp/parser/pass2/util/sparse.c | 3 +- cde/programs/dthelp/parser/pass2/util/trie.c | 5 +- .../dthelp/parser/pass2/util/triecnt.c | 16 +--- .../dthelp/parser/pass2/util/triedump.c | 8 +- .../dthelp/parser/pass2/util/triepdmp.c | 10 +-- .../dthelp/parser/pass2/util/trieplk.c | 4 +- .../dthelp/parser/pass2/util/trierset.c | 5 +- cde/programs/dthelp/parser/pass2/util/upper.c | 3 +- .../dthelp/parser/pass2/util/upstrcmp.c | 3 +- cde/programs/dthelp/parser/pass2/util/wchar.c | 3 +- 172 files changed, 547 insertions(+), 1308 deletions(-) diff --git a/cde/programs/dthelp/dthelpview/Main.c b/cde/programs/dthelp/dthelpview/Main.c index e7c69961..8180dc9b 100644 --- a/cde/programs/dthelp/dthelpview/Main.c +++ b/cde/programs/dthelp/dthelpview/Main.c @@ -170,7 +170,7 @@ static void ExpandVolume( * Purpose: Initializes our global variables to valid starting values. * ****************************************************************************/ -static void GlobalInit() +static void GlobalInit(void) { diff --git a/cde/programs/dthelp/parser/canon1/build/build.c b/cde/programs/dthelp/parser/canon1/build/build.c index f13e2927..2ac52b27 100644 --- a/cde/programs/dthelp/parser/canon1/build/build.c +++ b/cde/programs/dthelp/parser/canon1/build/build.c @@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entdef.h" /* Main procedure */ -int main(argc, argv) -int argc ; -char **argv ; +int main(int argc, char **argv) { int m_prevcon ; diff --git a/cde/programs/dthelp/parser/canon1/build/buildutl.c b/cde/programs/dthelp/parser/canon1/build/buildutl.c index ae23d9f9..aca0a4b8 100644 --- a/cde/programs/dthelp/parser/canon1/build/buildutl.c +++ b/cde/programs/dthelp/parser/canon1/build/buildutl.c @@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Verify that , or has not previously occurred in this rule */ -void found(flag, delim) -LOGICAL *flag; -char *delim; +void found(LOGICAL *flag, char *delim) { M_WCHAR wcbuff[129]; ssize_t length; diff --git a/cde/programs/dthelp/parser/canon1/build/eltree.c b/cde/programs/dthelp/parser/canon1/build/eltree.c index 8f312008..c7713f6e 100644 --- a/cde/programs/dthelp/parser/canon1/build/eltree.c +++ b/cde/programs/dthelp/parser/canon1/build/eltree.c @@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "build.h" /* Enters an element name into the element name tree */ -ELTSTRUCT *ntrelt(p) - M_WCHAR *p ; +ELTSTRUCT *ntrelt(M_WCHAR *p) { ELTSTRUCT *new ; ELTSTRUCT *old ; diff --git a/cde/programs/dthelp/parser/canon1/build/fsa.c b/cde/programs/dthelp/parser/canon1/build/fsa.c index b212085b..8ddd28ca 100644 --- a/cde/programs/dthelp/parser/canon1/build/fsa.c +++ b/cde/programs/dthelp/parser/canon1/build/fsa.c @@ -58,11 +58,8 @@ int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL opti /*checkand is used to verify nondeterminism from start and final states of FSA's generated from and groups*/ -void checkand(andstart, andptr, start, root, errelt) - ANDGROUP *andstart, *andptr ; - STATE *start ; - TREE *root ; - ELTSTRUCT **errelt ; +void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, + TREE *root, ELTSTRUCT **errelt) { ARC *parc ; ANDGROUP *pand ; @@ -86,12 +83,8 @@ void checkand(andstart, andptr, start, root, errelt) /*Checkdfsa is called when adding an arc to an FSA in order to verify that no existing arc from the same state (or from a start state of an and-group FSA labelling an arc from the same state) has the same label. */ -int checkdfsa(from, label, and, id, errelt) - STATE *from ; - ELTSTRUCT *label ; - ANDGROUP *and ; - int id ; - ELTSTRUCT **errelt ; +int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, + ELTSTRUCT **errelt) { int c ; ARC *parc ; @@ -116,10 +109,7 @@ int checkdfsa(from, label, and, id, errelt) } /* Check use of repeated models with and groups */ -int checkrepeat(from, and, errelt) - STATE *from ; - ANDGROUP *and ; - ELTSTRUCT **errelt ; +int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt) { ARC *parc ; int c ; @@ -142,8 +132,7 @@ int checkrepeat(from, and, errelt) } /* Copyintolist copies one list of states into another */ -void copyintolist(from, to) - STATELIST *from, **to ; +void copyintolist(STATELIST *from, STATELIST **to) { STATELIST **new, *old ; @@ -161,8 +150,7 @@ void copyintolist(from, to) } /* Dellist deletes a list of states */ -void dellist(list) - STATELIST **list ; +void dellist(STATELIST **list) { STATELIST *p, *q ; @@ -220,10 +208,7 @@ STATE *getstate(void) } /* Makeand processes a submodel whose connector is & */ -void makeand(canbenull, root, optional) - LOGICAL *canbenull ; - TREE *root ; - int optional ; +void makeand(LOGICAL *canbenull, TREE *root, int optional) { TREE *child ; STATELIST *start, *final ; @@ -308,9 +293,7 @@ void makeand(canbenull, root, optional) allfinal is passed from model to submodel; information in newfinal goes from submodel to model. */ -LOGICAL makefsa(root, optional) - TREE *root ; - int optional ; +LOGICAL makefsa(TREE *root, int optional) { LOGICAL canbenull ; @@ -344,9 +327,7 @@ LOGICAL makefsa(root, optional) } /* Makeor processes a submodel whose connector is | */ -void makeor(canbenull, root) - LOGICAL *canbenull ; - TREE *root ; +void makeor(LOGICAL *canbenull, TREE *root) { TREE *child ; STATELIST *final ; @@ -368,10 +349,7 @@ void makeor(canbenull, root) } /* Makeseq processes a submodel whose connector is , */ -void makeseq(canbenull, root, optional) - LOGICAL *canbenull ; - TREE *root ; - int optional ; +void makeseq(LOGICAL *canbenull, TREE *root, int optional) { LOGICAL branchnull ; STATELIST *keepfinal = NULL, *final ; @@ -409,10 +387,7 @@ void makeseq(canbenull, root, optional) /* Nondeterm issues a diagnostic when a nondeterministic model is encountered */ -void nondeterm(root, c, eltp) - TREE *root ; - int c ; - ELTSTRUCT *eltp ; +void nondeterm(TREE *root, int c, ELTSTRUCT *eltp) { M_WCHAR *wtemp; @@ -443,8 +418,7 @@ void nondeterm(root, c, eltp) /* Notinlist returns TRUE iff item is not in list. If item is in list, it makes sure that the stored nesting level is the smaller of the two */ -LOGICAL notinlist(item, list) - STATELIST *item, *list ; +LOGICAL notinlist(STATELIST *item, STATELIST *list) { for ( ; list ; list = list->next) if (list->value == item->value) { @@ -456,8 +430,7 @@ LOGICAL notinlist(item, list) /* Returns true if the arc is labeled #PCDATA or with an and-group that has an arc labelled #PCDATA from a start state */ -LOGICAL permitspcd(a) - ARC *a ; +LOGICAL permitspcd(ARC *a) { ANDGROUP *pand ; ARC *b ; @@ -507,8 +480,7 @@ void push(void) /* Regenerate is used in error processing to print the portion of a grammar rule preceding an error */ -LOGICAL regenerate(start, stop) -TREE *start, *stop ; +LOGICAL regenerate(TREE *start, TREE *stop) { TREE *child ; @@ -554,8 +526,7 @@ return(FALSE) ; by adding arcs from all the final states to all the states reachable in one transition from a start state, labelling them as arcs from start states are labelled. */ -void repeat(root) - TREE *root ; +void repeat(TREE *root) { STATELIST *final ; ARC *a ; @@ -606,9 +577,7 @@ void repeat(root) /* Used during processing of occurrence indicators in content models such as (a+)+ to prohibit duplicate arcs */ -LOGICAL samelabelarc(a, s) - ARC *a ; - STATE *s ; +LOGICAL samelabelarc(ARC *a, STATE *s) { ARC *b ; @@ -666,11 +635,8 @@ void savestartarcs(void) /* Simplebranch adds a new state and transition to it in an FSA when a submodel consists of a single element or of an and group */ -void simplebranch(root, value, group, optional) - TREE *root ; - ELTSTRUCT *value ; - ANDGROUP *group ; - int optional ; +void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, + int optional) { STATE *new = NULL ; STATELIST *index ; @@ -718,9 +684,7 @@ void simplebranch(root, value, group, optional) subtree in the tree representing the grammar rule being processed and the pointer to a flag that is set to indicate whether or not the submodel can be null. */ -STATE *startfsa(root, canbenull) - TREE *root ; - LOGICAL *canbenull ; +STATE *startfsa(TREE *root, LOGICAL *canbenull) { STATELIST *item ; STATE *first ; diff --git a/cde/programs/dthelp/parser/canon1/build/out.c b/cde/programs/dthelp/parser/canon1/build/out.c index 28c664cc..839940f1 100644 --- a/cde/programs/dthelp/parser/canon1/build/out.c +++ b/cde/programs/dthelp/parser/canon1/build/out.c @@ -69,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ; /* Deftype returns a string indicating the default type of the nth parameter. */ -char *deftype(n) - int n ; +char *deftype(int n) { switch (n) { case NAME: return(mnamedef) ; @@ -101,9 +100,7 @@ void done(void) } /* Prints data value of an entry in the element name tree */ -void dumpentnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpentnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ; @@ -111,9 +108,7 @@ void dumpentnode(file, value) /* Prints data value of an entry in the trie of short reference map names, reporting any maps that are referenced but not defined */ -void dumpmapnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpmapnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((MAP *) value)->map) ; if (! ((MAP *) value)->defined) @@ -123,9 +118,7 @@ void dumpmapnode(file, value) /* Prints data value of an entry in the trie of short reference delimiters */ -void dumpsrefnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpsrefnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ; } @@ -133,8 +126,7 @@ void dumpsrefnode(file, value) /* Controls printing of element blocks in alphabetical order to the template file */ -void eltblocks(tempfile) - FILE *tempfile ; +void eltblocks(FILE *tempfile) { int n ; M_TRIE *node[M_NAMELEN + 1] ; @@ -223,8 +215,7 @@ void eltreeout(void) } /* Enttype returns a string indicating the type of an entity */ -char *enttype(n) - int n ; +char *enttype(int n) { switch(n) { case M_GENERAL: return(mgeneral) ; @@ -452,8 +443,7 @@ fprintf(dtd, "#define M_MAXPAR %d\n\n", maxpar) ; } /* Partype returns a string indicating the type of the nth parameter. */ -char *partype(n) - int n ; +char *partype(int n) { switch(n) { case GRPO: return(mkeyword) ; @@ -546,9 +536,7 @@ void srefout(void) } /* Output one element block in a template */ -void tempelt(eltp, tempfile) -ELTSTRUCT *eltp ; -FILE *tempfile ; +void tempelt(ELTSTRUCT *eltp, FILE *tempfile) { PARAMETER *paramp ; PTYPE *ptypep ; @@ -654,8 +642,7 @@ void template(void) } /* Typecon returns a string indicating the content type of the nth element.*/ -char *typecon(n) - int n ; +char *typecon(int n) { switch(n) { case GRPO: return(mregexp) ; diff --git a/cde/programs/dthelp/parser/canon1/build/scan.c b/cde/programs/dthelp/parser/canon1/build/scan.c index 071f3238..b2fa330d 100644 --- a/cde/programs/dthelp/parser/canon1/build/scan.c +++ b/cde/programs/dthelp/parser/canon1/build/scan.c @@ -38,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "sref.h" /* Reads a name */ -LOGICAL getname(first) - int first; +LOGICAL getname(int first) { M_WCHAR *p; int c; diff --git a/cde/programs/dthelp/parser/canon1/build/sref.c b/cde/programs/dthelp/parser/canon1/build/sref.c index 70e9b8a7..9277b9d3 100644 --- a/cde/programs/dthelp/parser/canon1/build/sref.c +++ b/cde/programs/dthelp/parser/canon1/build/sref.c @@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL; /* Add an entity with the default name constructed by adding a suffix to the name of the short reference map in which it is invoked, and a prefix m- */ -void adddefent(mapname) -M_WCHAR *mapname; +void adddefent(M_WCHAR *mapname) { M_WCHAR *p; int n; @@ -75,8 +74,7 @@ thissref->entidx = entity->index; /* Add an entity, return FALSE if already there, TRUE if adding it. Pointer to the entity structure is in global M_STRUCT *entity. */ -LOGICAL addent(name) -M_WCHAR *name; +LOGICAL addent(M_WCHAR *name) { M_ENTITY *new; @@ -128,16 +126,14 @@ return(TRUE); } /* Add a named entity to a short reference map */ -void addndent(p) -M_WCHAR *p; +void addndent(M_WCHAR *p) { addent(p); thissref->entidx = entity->index; } /* Add a short reference delimiter */ -void addsref(p) -M_WCHAR *p; +void addsref(M_WCHAR *p) { SREFSTRUCT *delim; SREFSTRUCT *prevsr; diff --git a/cde/programs/dthelp/parser/canon1/build/tree.c b/cde/programs/dthelp/parser/canon1/build/tree.c index fcfd5fe2..fa465b2e 100644 --- a/cde/programs/dthelp/parser/canon1/build/tree.c +++ b/cde/programs/dthelp/parser/canon1/build/tree.c @@ -44,8 +44,7 @@ void endmodel(void) } /* Release storage used for the tree representation of a rule */ -void freetree(treep) - TREE *treep ; +void freetree(TREE *treep) { TREE *child, *discard ; diff --git a/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c b/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c index e8f34f39..cd8b38a0 100644 --- a/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c +++ b/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c @@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entity.h" /* Main program */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { int m_token ; diff --git a/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c b/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c index ee96a26c..2dc28f05 100644 --- a/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c +++ b/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c @@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "version.h" /* Output indicated action pointer array to if.h */ -void actptrout(array, name) - ACTION **array; - char *name; +void actptrout(ACTION **array, char *name) { int i; @@ -267,8 +265,7 @@ void endstring(void) /* Set the type of an entity and check if different than declaration in BUILD */ -void enttype(type) - int type; +void enttype(int type) { if ((entity->type == M_PI && type == M_CODEPI) || (entity->type == M_SDATA && type == M_CODESDATA)); @@ -294,8 +291,7 @@ void freechain(void) /* Returns pointer to data field in action node for current chain of elements */ -int *getaction(array) - ACTION **array; +int *getaction(ACTION **array) { ACTION *start, *node; CHAIN *chainp; @@ -431,8 +427,7 @@ void outstring(void) } /* Output #define's for parameter values */ -void outpval(p) -M_TRIE *p; +void outpval(M_TRIE *p) { M_WCHAR *q; @@ -530,14 +525,8 @@ void skiptoend(void) } /* Starts processing a code segment from the input file */ -void startcode(caseno, flag, file, prefix, proto, formal, formtype) -int caseno; -LOGICAL *flag; -FILE *file; -char *prefix; -char *proto; -char *formal; -char *formtype; +void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, + char *proto, char *formal, char *formtype) { CVARSTRUCT *cvarp; @@ -631,8 +620,7 @@ void storepname(void) } /* Called when a possible parameter value to be defined is encountered */ -void value(p) -M_WCHAR *p; +void value(M_WCHAR *p) { char buffer[5]; diff --git a/cde/programs/dthelp/parser/canon1/eltdef/scan.c b/cde/programs/dthelp/parser/canon1/eltdef/scan.c index d4f8e581..18114fef 100644 --- a/cde/programs/dthelp/parser/canon1/eltdef/scan.c +++ b/cde/programs/dthelp/parser/canon1/eltdef/scan.c @@ -43,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "delim.h" /* Reads a name token */ -void getname(first) -int first; +void getname(int first) { M_WCHAR *p, wus; int c, cttype; diff --git a/cde/programs/dthelp/parser/canon1/helptag/custom.c b/cde/programs/dthelp/parser/canon1/helptag/custom.c index ac501530..bf7515bd 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/custom.c +++ b/cde/programs/dthelp/parser/canon1/helptag/custom.c @@ -33,9 +33,7 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co. #include /* Write input file and line number for an error message */ -void m_dumpline(file, line) -M_WCHAR *file; -int line; +void m_dumpline(M_WCHAR *file, int line) { char buffer[10]; char *mbyte; @@ -71,8 +69,7 @@ m_errline(",\n"); } /* Process error message text */ -void m_errline(p) -char *p; +void m_errline(char *p) { char c; @@ -96,8 +93,7 @@ if (++m_errcnt == m_errlim) } /* Exit procedure */ -void m_exit(status) -int status; +void m_exit(int status) { if (filefound) { @@ -138,8 +134,7 @@ exit(0); } /* Get-char procedure */ -int m_getc(m_ptr) -void *m_ptr; +int m_getc(void *m_ptr) { int c; M_WCHAR wc; @@ -193,8 +188,7 @@ return((int) wc); } /* Open SYSTEM entity procedure */ -void *m_openent(entcontent) -M_WCHAR *entcontent; +void *m_openent(M_WCHAR *entcontent) { FILE *open; char *filename; @@ -272,7 +266,7 @@ return((void *) first); } /* Set program options */ -void m_setoptions() +void m_setoptions(void) { /* F option used for FILELIST (checking done in basename, which is called before this function is called) */ @@ -298,8 +292,7 @@ void m_setoptions() /* Process signon message text, stripping out MARKUP version number, so only one version number will appear */ -void m_signmsg(p) - char *p; +void m_signmsg(char *p) { char *q; char *pCopy; @@ -317,7 +310,7 @@ void m_signmsg(p) /* All entity declarations have been processed. Can now check if .TEX file uptodate and open appropriate output file */ -void m_startdoc() +void m_startdoc(void) { LOGICAL init = TRUE; unsigned char type; @@ -358,16 +351,14 @@ else } /* Write debugging trace information */ -void m_trace(p) -char *p; +void m_trace(char *p) { if (tracetostd) fputs(p, stdout); else fputs(p, m_outfile); } -void m_wctrace(p) -M_WCHAR *p; +void m_wctrace(M_WCHAR *p) { char *mb_p; diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.c b/cde/programs/dthelp/parser/canon1/helptag/help.c index 8e7cb560..40c6cf44 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.c +++ b/cde/programs/dthelp/parser/canon1/helptag/help.c @@ -250,8 +250,7 @@ else /* This procedure starts a CHAPTER */ -void chapstart(id) -M_WCHAR *id; +void chapstart(M_WCHAR *id) { M_WCHAR *p, *q, *wc; int i; @@ -499,9 +498,7 @@ return ( 0 ); } /* end mb_getqualified */ -int getqualified (qualname, unqualname) -M_WCHAR *qualname; -M_WCHAR *unqualname; +int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname) { int retval; char mb_qualname[FNAMELEN], @@ -521,13 +518,9 @@ return retval; /* handle the common link and graphic code for

and */ void -handle_link_and_graphic(parent, - gentity, - gposition, - ghyperlink, - glinktype, - gdescription) -M_WCHAR *parent, *gentity, *gposition, *ghyperlink, *glinktype, *gdescription; +handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, + M_WCHAR *gposition, M_WCHAR *ghyperlink, + M_WCHAR *glinktype, M_WCHAR *gdescription) { unsigned char etype, wheredef; char *mb_content, *ssi, id[32]; @@ -921,8 +914,7 @@ if (item_id) /* Start a rsect */ -void rsectstart(id) -M_WCHAR *id; +void rsectstart(M_WCHAR *id) { savid = checkid(id); iderr = FALSE; @@ -942,8 +934,7 @@ rsectseq = FALSE; /* Follow search path to find a file, returning qualified name */ -M_WCHAR *searchforfile(file) -M_WCHAR *file; +M_WCHAR *searchforfile(M_WCHAR *file) { M_WCHAR *filename; SEARCH *searchp; @@ -1064,9 +1055,7 @@ if (wc_id) /* Start a labeled list */ -void StartLabList(spacing, longlabel) -M_WCHAR *spacing; -M_WCHAR *longlabel; +void StartLabList(M_WCHAR *spacing, M_WCHAR *longlabel) { char *mb_spacing; static char def_spacing[] = "LOOSE"; @@ -1249,7 +1238,7 @@ lastlist = nextlist; } -void EndList() +void EndList(void) { LIST *curlist ; CONTCHAIN *chain, *xchain ; @@ -1589,7 +1578,7 @@ _DtLcxCloseDb(&myDb); * fashion. */ static char * -GetStdLocale() +GetStdLocale(void) { static char buffer[256]; static char *cString = "C"; @@ -1669,7 +1658,7 @@ return buffer; * versions of the language and charset. */ void -SetDefaultLocale() +SetDefaultLocale(void) { unsigned char type,wheredef; M_WCHAR *elementName; @@ -2186,14 +2175,14 @@ while (*wcp) return(newstring); } -int NextId() +int NextId(void) { static id = 0; return ++id; } -char *GetLanguage() +char *GetLanguage(void) { static char *pLang = NULL; @@ -2205,7 +2194,7 @@ if (!pLang) return pLang; } -char *GetCharset() +char *GetCharset(void) { static char *pCharset = NULL; @@ -2632,7 +2621,7 @@ else } -void IncludeToss() +void IncludeToss(void) { char pathbuf[BIGBUF]; char *try = pathbuf; @@ -2768,7 +2757,7 @@ return(name) ; * content is modified to be so that it may be * emitted into the SDL output. */ -void ModifyEntities() +void ModifyEntities(void) { unsigned char type; unsigned char wheredef; @@ -2931,7 +2920,7 @@ fputs(">\n", outfile); needFData = TRUE; } -void PopForm() +void PopForm(void) { if (inBlock) { @@ -2947,7 +2936,7 @@ mb_free(&(formStackTop->rowVec)); --formStackTop; } -void PopForm2() +void PopForm2(void) { if (inBlock) { @@ -2968,7 +2957,7 @@ mb_free(&(formStackTop->rowVec)); * is pushed but the source doesn't go to text either because the text * is explicitly optional or due to the fact that text can be null. */ -void PopFormMaybe() +void PopFormMaybe(void) { if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1)) { @@ -2977,7 +2966,7 @@ if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1)) } } -void EmitSavedAnchors() +void EmitSavedAnchors(void) { char buffer[BIGBUF]; @@ -2992,7 +2981,7 @@ if (parTextId) } } -void CloseVirpage() +void CloseVirpage(void) { if (parTextId) { diff --git a/cde/programs/dthelp/parser/canon1/helptag/out.c b/cde/programs/dthelp/parser/canon1/helptag/out.c index 804b2135..5ba4790c 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/out.c +++ b/cde/programs/dthelp/parser/canon1/helptag/out.c @@ -31,8 +31,7 @@ /* Echo part of a head to the screen to indicate how much of the document has been processed */ -void echohead(p) -M_WCHAR *p; +void echohead(M_WCHAR *p) { char *mb_p,*mb_string; @@ -54,8 +53,7 @@ m_free(mb_string,"multi-byte string"); } /* call echohead with a literal string */ -void mb_echohead(p) -char *p; +void mb_echohead(char *p) { M_WCHAR *wc; @@ -104,7 +102,7 @@ echo = savhd = FALSE; * location is placed in the snb file and the elements are * emitted there too. */ -void chksnb() +void chksnb(void) { fputs("\n", outfile); snbstart = ftell(outfile); @@ -276,10 +274,7 @@ else /* Called for processing instruction */ -void outpi(enttype, pi, entname) -int enttype; -M_WCHAR *pi; -M_WCHAR *entname; +void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname) { strcode(pi, outfile); @@ -392,13 +387,8 @@ shchar(wc_textchar, len, max, string, proc, msg, errflg); /* Save a string in the array used to store table of contents entries when processing a head */ -void shstring(addstring, len, max, storestring, msg, errflg) -M_WCHAR *addstring; -int *len; -int max; -M_WCHAR *storestring; -char *msg; -LOGICAL *errflg; +void shstring(M_WCHAR *addstring, int *len, int max, + M_WCHAR *storestring, char *msg, LOGICAL *errflg) { int addlength; @@ -419,13 +409,8 @@ else } -void mb_shstring(addstring, len, max, storestring, msg, errflg) -char *addstring; -int *len; -int max; -M_WCHAR *storestring; -char *msg; -LOGICAL *errflg; +void mb_shstring(char *addstring, int *len, int max, + M_WCHAR *storestring, char *msg, LOGICAL *errflg) { M_WCHAR *wc_addstring; @@ -435,9 +420,7 @@ m_free(wc_addstring,"wide character string"); } /* Writes a string to the output file, and if appropriate saves it */ -void strcode(string, outfile) -M_WCHAR *string; -FILE *outfile; +void strcode(M_WCHAR *string, FILE *outfile) { char exbuff[32]; /* arbitrarily large */ int bufflen; @@ -492,9 +475,7 @@ if (savex) } -void mb_strcode(string, outfile) -char *string; -FILE *outfile; +void mb_strcode(char *string, FILE *outfile) { M_WCHAR *wc; @@ -504,8 +485,7 @@ m_free(wc,"wide character string"); } /* Copies string to end of buffer where saving head for table of contents */ -void svhdstring(string) -M_WCHAR *string; +void svhdstring(M_WCHAR *string) { int length; @@ -524,8 +504,7 @@ svheadlen += length; } /* Copies string to end of buffer where saving table caption */ -void svtcstring(string) -M_WCHAR *string; +void svtcstring(M_WCHAR *string) { int length; @@ -605,10 +584,7 @@ else } /* Process a PI in a term */ -void termpi(m_enttype, m_pi, m_entname) -int m_enttype; -M_WCHAR *m_pi; -M_WCHAR *m_entname; +void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname) { int length; diff --git a/cde/programs/dthelp/parser/canon1/helptag/xref.c b/cde/programs/dthelp/parser/canon1/helptag/xref.c index 4a1259d6..e308e1b7 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/xref.c +++ b/cde/programs/dthelp/parser/canon1/helptag/xref.c @@ -31,8 +31,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "globdec.h" /* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */ -M_WCHAR *checkid(id) -M_WCHAR *id; +M_WCHAR *checkid(M_WCHAR *id) { struct xref *xref; char *buffer; @@ -80,10 +79,7 @@ return(NULL); } /* Write a single cross-reference macro definition */ -static void defxref(xfile, id, xref) -FILE *xfile; -M_WCHAR *id; -struct xref *xref; +static void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref) { char *csname; char *p; @@ -191,8 +187,7 @@ while (TRUE) } /* Copies string to end of current cross-reference string */ -void idstring(string) -M_WCHAR *string; +void idstring(M_WCHAR *string) { int length; @@ -409,8 +404,7 @@ savid = NULL; } /* Generate a cross-reference */ -void xrefexpand(id) -M_WCHAR *id; +void xrefexpand(M_WCHAR *id) { struct xref *xref; struct xref *old; diff --git a/cde/programs/dthelp/parser/canon1/parser/actutil.c b/cde/programs/dthelp/parser/canon1/parser/actutil.c index 7e4495d5..8c07eee8 100644 --- a/cde/programs/dthelp/parser/canon1/parser/actutil.c +++ b/cde/programs/dthelp/parser/canon1/parser/actutil.c @@ -44,8 +44,7 @@ in the interface definition.*/ #include "signon.h" /* When an explicit or implied end-tag occurs */ -void m_endaction(m_elt) - M_ELEMENT m_elt; +void m_endaction(M_ELEMENT m_elt) { M_ELEMENT m_action; char buffer[2*MAXD+M_NAMELEN+1]; @@ -76,9 +75,7 @@ void m_endaction(m_elt) } /* Find appropriate action according to current stack */ -int m_findact(elt, array) - M_ELEMENT elt; - int *array; +int m_findact(M_ELEMENT elt, int *array) { int chainlen = 0; int index; @@ -156,8 +153,7 @@ m_free(wc_string,"wide character string"); } /* When an explicit or implied start-tag occurs */ -void m_strtaction(m_elt) - M_ELEMENT m_elt; +void m_strtaction(M_ELEMENT m_elt) { int m_par, m_i; M_WCHAR *m_p; diff --git a/cde/programs/dthelp/parser/canon1/parser/closent.c b/cde/programs/dthelp/parser/canon1/parser/closent.c index 3040932a..cff0aac9 100644 --- a/cde/programs/dthelp/parser/canon1/parser/closent.c +++ b/cde/programs/dthelp/parser/canon1/parser/closent.c @@ -28,8 +28,7 @@ #include "userinc.h" #include "globdec.h" -void m_closent(m_ptr) - void *m_ptr ; +void m_closent(void *m_ptr) { fclose((FILE *) m_ptr) ; } diff --git a/cde/programs/dthelp/parser/canon1/parser/code.c b/cde/programs/dthelp/parser/canon1/parser/code.c index e72ad5f6..b13a13ff 100644 --- a/cde/programs/dthelp/parser/canon1/parser/code.c +++ b/cde/programs/dthelp/parser/canon1/parser/code.c @@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entfile.c" /* When a reference to a CODE entity is encountered */ -void m_codeent(m_ent) - int m_ent ; +void m_codeent(int m_ent) { (*m_ctable[m_ent])() ; } diff --git a/cde/programs/dthelp/parser/canon1/parser/dcurelt.c b/cde/programs/dthelp/parser/canon1/parser/dcurelt.c index 66965ccf..a345aafa 100644 --- a/cde/programs/dthelp/parser/canon1/parser/dcurelt.c +++ b/cde/programs/dthelp/parser/canon1/parser/dcurelt.c @@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "globdec.h" /* Displays current element after some error messages */ -void m_dispcurelt(file, line) -M_WCHAR *file ; -int line ; +void m_dispcurelt(M_WCHAR *file, int line) { char *mb_parent; diff --git a/cde/programs/dthelp/parser/canon1/parser/end.c b/cde/programs/dthelp/parser/canon1/parser/end.c index 9ad62c70..20d9e273 100644 --- a/cde/programs/dthelp/parser/canon1/parser/end.c +++ b/cde/programs/dthelp/parser/canon1/parser/end.c @@ -39,8 +39,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Perform the m_action-th end-code in the interface */ -void m_endcase(m_action) - int m_action ; +void m_endcase(int m_action) { (*m_etable[m_action])() ; } diff --git a/cde/programs/dthelp/parser/canon1/parser/entity.c b/cde/programs/dthelp/parser/canon1/parser/entity.c index f27cf0e7..d136f01f 100644 --- a/cde/programs/dthelp/parser/canon1/parser/entity.c +++ b/cde/programs/dthelp/parser/canon1/parser/entity.c @@ -52,8 +52,7 @@ void m_ckmap(M_WCHAR *name, LOGICAL useoradd) /* Check type specified in entity declaration for previously defined entity. Testing to see if the new declaration is identical to the original one. */ -void m_eduptype(type) - int type ; +void m_eduptype(int type) { if ((int) m_entity->type != type) { m_err1("Redefinition of entity %s ignored", m_entity->name) ; @@ -63,8 +62,7 @@ void m_eduptype(type) } /* Tests if an entity is too long */ -void m_longent(context) - int context ; +void m_longent(int context) { if (m_entclen >= M_LITLEN) { m_curcon = context ; @@ -74,8 +72,7 @@ void m_longent(context) } /* Enters an entity name into the entity name tree */ -void m_ntrent(p) - M_WCHAR *p ; +void m_ntrent(M_WCHAR *p) { M_ENTITY *new ; diff --git a/cde/programs/dthelp/parser/canon1/parser/error.c b/cde/programs/dthelp/parser/canon1/parser/error.c index e83303c2..6a20d976 100644 --- a/cde/programs/dthelp/parser/canon1/parser/error.c +++ b/cde/programs/dthelp/parser/canon1/parser/error.c @@ -40,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Issue error message (no arguments) */ -void m_error(text) - char *text; +void m_error(char *text) { m_startmsg(); m_errline(text); @@ -314,9 +313,7 @@ void m_err7( /* Getline.c returns the name of the current input file and the number of the current line */ -void m_getline(file, line) - M_WCHAR **file; - int *line; +void m_getline(M_WCHAR **file, int *line) { int i; diff --git a/cde/programs/dthelp/parser/canon1/parser/input.c b/cde/programs/dthelp/parser/canon1/parser/input.c index ab81425c..21762c67 100644 --- a/cde/programs/dthelp/parser/canon1/parser/input.c +++ b/cde/programs/dthelp/parser/canon1/parser/input.c @@ -64,8 +64,7 @@ void m_etcomplete(void) /* M_frcend is called after a syntax error to end element VAL even if more content for that element is expected */ -void m_frcend(val) - M_ELEMENT val ; +void m_frcend(M_ELEMENT val) { M_PARSE *stackptr ; M_ELEMENT poppedval ; diff --git a/cde/programs/dthelp/parser/canon1/parser/level.c b/cde/programs/dthelp/parser/canon1/parser/level.c index 4f0a52d4..8468f560 100644 --- a/cde/programs/dthelp/parser/canon1/parser/level.c +++ b/cde/programs/dthelp/parser/canon1/parser/level.c @@ -33,8 +33,7 @@ /* Procedure callable by interface designer. Returns number of occurrences of element on parse stack */ -int m_level(elt) - M_WCHAR *elt ; +int m_level(M_WCHAR *elt) { int i = 0 ; M_PARSE *stackptr ; @@ -48,8 +47,7 @@ int m_level(elt) } -int m_mblevel(elt) - char *elt ; +int m_mblevel(char *elt) { int retval; M_WCHAR *wc_elt; diff --git a/cde/programs/dthelp/parser/canon1/parser/lookent.c b/cde/programs/dthelp/parser/canon1/parser/lookent.c index 5cadab91..e39c8878 100644 --- a/cde/programs/dthelp/parser/canon1/parser/lookent.c +++ b/cde/programs/dthelp/parser/canon1/parser/lookent.c @@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "parser.h" #include "entext.h" -LOGICAL m_lookent(name, type, content, wheredef) - M_WCHAR *name ; - unsigned char *type ; - M_WCHAR **content ; - unsigned char *wheredef ; +LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, + M_WCHAR **content, unsigned char *wheredef) { M_ENTITY *entity ; diff --git a/cde/programs/dthelp/parser/canon1/parser/minim.c b/cde/programs/dthelp/parser/canon1/parser/minim.c index c18ceb1e..078da268 100644 --- a/cde/programs/dthelp/parser/canon1/parser/minim.c +++ b/cde/programs/dthelp/parser/canon1/parser/minim.c @@ -99,11 +99,8 @@ void m_expecting(void) /* Recursive procedure first called from expecting() to display names of elements reachable from a particular node */ -void m_expexpand(expstart, node, required, data) - LOGICAL *expstart ; - M_STATE node ; - LOGICAL *required ; - LOGICAL *data ; +void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, + LOGICAL *data) { M_ARC parc ; M_ANDGROUP pand ; @@ -125,10 +122,7 @@ void m_expexpand(expstart, node, required, data) } /* M_expline writes one line for m_expecting() */ -void m_expline(expstart, data, label) - LOGICAL *expstart ; - LOGICAL *data ; - M_ELEMENT label ; +void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label) { char buffer[M_NAMELEN + 2*MAXD + 1] ; @@ -165,9 +159,7 @@ void m_expline(expstart, data, label) /* M_exptend is called from m_expecting to inform the user after an error if an end tag is permitted */ -void m_exptend(expstart, stackptr) - LOGICAL *expstart ; - M_PARSE *stackptr ; +void m_exptend(LOGICAL *expstart, M_PARSE *stackptr) { char buffer[M_NAMELEN + 2*MAXD + 1] ; @@ -216,9 +208,7 @@ void m_exptend(expstart, stackptr) element, 1 if character data is expected, and 0 (FALSE) if there is no unique element. */ -M_ELEMENT m_findunique(from, newleft) - M_STATE from ; - int *newleft ; +M_ELEMENT m_findunique(M_STATE from, int *newleft) { M_ARC parc ; M_ELEMENT cr = 0, minim = 0; @@ -339,7 +329,7 @@ LOGICAL m_omitend(void) /* Tests to see if a start tag may have been omitted at this point of the parse. If so, saves the element name in the MINVAL array*/ -LOGICAL m_omitstart() +LOGICAL m_omitstart(void) { M_ELEMENT c = M_NULLVAL ; diff --git a/cde/programs/dthelp/parser/canon1/parser/optstrg.c b/cde/programs/dthelp/parser/canon1/parser/optstrg.c index 255b32d6..9056f2ee 100644 --- a/cde/programs/dthelp/parser/canon1/parser/optstrg.c +++ b/cde/programs/dthelp/parser/canon1/parser/optstrg.c @@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "parser.h" /* Get program options from a string */ -void m_optstring(p) - char *p ; +void m_optstring(char *p) { if (strchr(p, 'a')) m_malftrace = TRUE ; if (strchr(p, 'c')) m_chtrace = TRUE ; diff --git a/cde/programs/dthelp/parser/canon1/parser/param.c b/cde/programs/dthelp/parser/canon1/parser/param.c index bec0a121..3eb226f7 100644 --- a/cde/programs/dthelp/parser/canon1/parser/param.c +++ b/cde/programs/dthelp/parser/canon1/parser/param.c @@ -42,8 +42,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Process the value for the parameter whose index number was previously saved in m_ppsave */ -void m_attval(string) - M_WCHAR *string ; +void m_attval(M_WCHAR *string) { const M_WCHAR *p ; @@ -65,8 +64,7 @@ void m_attval(string) /* Process a string that is a parameter value not prefixed by the parameter name and value indicator */ -LOGICAL m_attvonly(string) - M_WCHAR *string ; +LOGICAL m_attvonly(M_WCHAR *string) { const M_WCHAR *p ; int par, i ; @@ -152,8 +150,7 @@ void m_findatt(void) } /* Free the parameter storage associated with an element on the parse stack */ -void m_freeparam(stackelt) - M_PARSE *stackelt ; +void m_freeparam(M_PARSE *stackelt) { int i ; int par ; @@ -173,9 +170,7 @@ void m_freeparam(stackelt) /* Force a parameter value to uppercase, if appropriate for its type. Also, if list-valued attribute, remove leading and trailing spaces, and condense white-space sequences to a single blank*/ -void m_parupper(par, string) - int par ; - M_WCHAR *string ; +void m_parupper(int par, M_WCHAR *string) { M_WCHAR *p ; M_WCHAR *q ; @@ -233,11 +228,7 @@ void m_stkdefaultparams(void) } /* Stack one default parameter */ -void m_stkonedef(par, scanel, poccur, i) - int par ; - M_ELEMENT scanel ; - M_WCHAR **poccur ; - int i ; +void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i) { if (m_parameter[par - 1].deftype == M_REQUIRED || (m_parameter[par - 1].deftype == M_CURRENT && @@ -313,8 +304,7 @@ void m_updatedefault(const int par , const M_WCHAR *string ) /* Check to see if a string that occurs after the element name in a start tag is a valid parameter name or value; if not, assume tag is ended */ -LOGICAL m_validinpar(string) - M_WCHAR *string ; +LOGICAL m_validinpar(M_WCHAR *string) { int par ; M_WCHAR *p ; diff --git a/cde/programs/dthelp/parser/canon1/parser/parent.c b/cde/programs/dthelp/parser/canon1/parser/parent.c index 4cadab45..a8c7e198 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parent.c +++ b/cde/programs/dthelp/parser/canon1/parser/parent.c @@ -34,8 +34,7 @@ /* Procedure callable by interface designers. Returns pointer to name of nth level parent of current element (0 is self, 1 is parent, 2 is grandparent, etc.) */ -M_WCHAR *m_parent(n) - int n ; +M_WCHAR *m_parent(int n) { M_PARSE *stackptr ; diff --git a/cde/programs/dthelp/parser/canon1/parser/parser.c b/cde/programs/dthelp/parser/canon1/parser/parser.c index 754021cf..7d7ac070 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parser.c +++ b/cde/programs/dthelp/parser/canon1/parser/parser.c @@ -38,9 +38,7 @@ static void scanloop(LOGICAL prolog); /* Main procedure */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { M_WCHAR *wc_userdef; diff --git a/cde/programs/dthelp/parser/canon1/parser/parutil.c b/cde/programs/dthelp/parser/canon1/parser/parutil.c index 2c321ac9..f2f65715 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parutil.c +++ b/cde/programs/dthelp/parser/canon1/parser/parutil.c @@ -87,7 +87,7 @@ M_ELEMENT m_eltname(void) } } -int get_mb_cur_max() +int get_mb_cur_max(void) { char *l; int i; diff --git a/cde/programs/dthelp/parser/canon1/parser/pi.c b/cde/programs/dthelp/parser/canon1/parser/pi.c index b3b8b633..f254ac12 100644 --- a/cde/programs/dthelp/parser/canon1/parser/pi.c +++ b/cde/programs/dthelp/parser/canon1/parser/pi.c @@ -38,10 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* When a processing instruction or SDATA entity other than a CODE entity occurs */ -void m_piaction(m_pi, m_entname, m_enttype) - M_WCHAR *m_pi ; - M_WCHAR *m_entname ; - int m_enttype ; +void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype) { m_stackpar = m_stacktop->piparam ; (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ; diff --git a/cde/programs/dthelp/parser/canon1/parser/scan.c b/cde/programs/dthelp/parser/canon1/parser/scan.c index 0d2bc240..19c988d5 100644 --- a/cde/programs/dthelp/parser/canon1/parser/scan.c +++ b/cde/programs/dthelp/parser/canon1/parser/scan.c @@ -62,8 +62,7 @@ int m_actgetc(void) } /* Expand an entity reference */ -void m_entexpand(openent) - M_ENTITY *openent ; +void m_entexpand(M_ENTITY *openent) { M_WCHAR *p ; M_HOLDTYPE dchar ; @@ -231,9 +230,7 @@ void m_entexpand(openent) /* An srlen-character long short-reference delimiter has been found. Verify that it is not the prefix of a general delimiter recognized in context*/ -LOGICAL m_gendelim(srlen, context) - int srlen ; - int context ; +LOGICAL m_gendelim(int srlen, int context) { int ghold[MAXD + 1] ; int ucase ; @@ -321,8 +318,7 @@ LOGICAL m_gendelim(srlen, context) /* Reads next input character from the current source file or from an entity expansion */ -int m_getachar(dchar) - M_HOLDTYPE *dchar ; +int m_getachar(M_HOLDTYPE *dchar) { int c ; int i ; @@ -424,10 +420,7 @@ void m_getname(M_WCHAR first) } /* Reads the next token */ -int m_gettoken(c, dchar, context) - int *c ; - M_HOLDTYPE *dchar ; - int context ; +int m_gettoken(int *c, M_HOLDTYPE *dchar, int context) { int hold[MAXD + 1], next ; int ucase ; @@ -551,8 +544,7 @@ int m_gettoken(c, dchar, context) } /* Reads a literal */ -void m_litproc(delim) - int delim ; +void m_litproc(int delim) { int n, i ; M_HOLDTYPE dchar ; @@ -896,8 +888,7 @@ void m_setmap(int map, LOGICAL useoradd) } /* Check for short reference delimiters */ -void m_shortref(context) -int context ; +void m_shortref(int context) { int n = 0 ; int i ; diff --git a/cde/programs/dthelp/parser/canon1/parser/setpar.c b/cde/programs/dthelp/parser/canon1/parser/setpar.c index 8dfae129..a9833119 100644 --- a/cde/programs/dthelp/parser/canon1/parser/setpar.c +++ b/cde/programs/dthelp/parser/canon1/parser/setpar.c @@ -35,9 +35,7 @@ #include "parser.h" /* Set a user-defined C variable to the corresponding parameter value */ -void m_setparam(cvar, par) - M_WCHAR **cvar ; - int par ; +void m_setparam(M_WCHAR **cvar, int par) { *cvar = m_stackpar->param[par] ; } diff --git a/cde/programs/dthelp/parser/canon1/parser/start.c b/cde/programs/dthelp/parser/canon1/parser/start.c index ba35115b..d3a3ca3e 100644 --- a/cde/programs/dthelp/parser/canon1/parser/start.c +++ b/cde/programs/dthelp/parser/canon1/parser/start.c @@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "sfile.c" /* Perform the m_action-th start-code in the interface */ -void m_strtcase(m_action) - int m_action ; +void m_strtcase(int m_action) { (*m_stable[m_action])() ; } diff --git a/cde/programs/dthelp/parser/canon1/parser/struct.c b/cde/programs/dthelp/parser/canon1/parser/struct.c index 1b4e526c..8c43ec9b 100644 --- a/cde/programs/dthelp/parser/canon1/parser/struct.c +++ b/cde/programs/dthelp/parser/canon1/parser/struct.c @@ -46,8 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively if the element is allowed by content, not allowed, or allowed by an inclusion exception. */ -int m_checkstart(val) - M_ELEMENT val ; +int m_checkstart(M_ELEMENT val) { M_PARSE *stackptr ; int except ; @@ -238,8 +237,7 @@ void m_done(void) } /* Process the endtag (implied, abbreviated, or explicit) for element C*/ -void m_endtag(c) - M_ELEMENT c ; +void m_endtag(M_ELEMENT c) { m_endaction(c) ; m_pop() ; @@ -251,8 +249,7 @@ void m_endtag(c) /* Check that the identified element is not prohibited in the current context by an exclusion exception */ -LOGICAL m_excluded(elt) - M_ELEMENT elt ; +LOGICAL m_excluded(M_ELEMENT elt) { M_PARSE *stackptr ; int except ; @@ -270,8 +267,7 @@ LOGICAL m_excluded(elt) /* Free the OPEN FSA substructures associated with an element on the parse stack */ -void m_freeFSA(stackelt) - M_PARSE *stackelt ; +void m_freeFSA(M_PARSE *stackelt) { M_OPENFSA *fsastack ; M_ANDLIST *usedand ; @@ -290,9 +286,7 @@ void m_freeFSA(stackelt) } /* Free storage used for tentative chain of tag minimizations */ -void m_freemin(min, msg) - M_MIN *min ; - char *msg ; +void m_freemin(M_MIN *min, char *msg) { M_MIN *discard ; @@ -307,9 +301,7 @@ void m_freemin(min, msg) in the current content model by starting a new submodel of the and-group indicated by fsastack, or (if the and-group is within a seq-group) by continuing past the and-group */ -LOGICAL m_nextand(thisfsa, label) - M_OPENFSA *thisfsa ; - M_ELEMENT label ; +LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label) { M_ANDLIST *newgroup ; M_ANDGROUP pand ; @@ -461,8 +453,7 @@ void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need) character is treated differently so that if character data is not allowed in the current context, an error message is issued with the first character only and not with every character. */ -void m_strtcdata(scanval) - int scanval ; +void m_strtcdata(int scanval) { if (! m_strtproc(M_NULLVAL)) if (m_whitespace((M_WCHAR) scanval)) { @@ -493,8 +484,7 @@ void m_strtcdata(scanval) to an element that was within #PCDATA, m_strtproc saves the current context and restores it after returning from the last call to m_endtag.) */ -LOGICAL m_strtproc(scanval) - M_ELEMENT scanval ; +LOGICAL m_strtproc(M_ELEMENT scanval) { int check ; M_PARSE *original ; diff --git a/cde/programs/dthelp/parser/canon1/util/context.c b/cde/programs/dthelp/parser/canon1/util/context.c index 3e914030..bc968106 100644 --- a/cde/programs/dthelp/parser/canon1/util/context.c +++ b/cde/programs/dthelp/parser/canon1/util/context.c @@ -166,9 +166,7 @@ delim.h. #include "cont.h" /* Main procedure */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { int n ; diff --git a/cde/programs/dthelp/parser/canon1/util/conutil.c b/cde/programs/dthelp/parser/canon1/util/conutil.c index 375923e8..f17f3354 100644 --- a/cde/programs/dthelp/parser/canon1/util/conutil.c +++ b/cde/programs/dthelp/parser/canon1/util/conutil.c @@ -81,8 +81,7 @@ void dumptree(LOGICAL sparse) } /* Enter a delimiter into the delimiter tree for a particular context */ -void enterdelim(n) - int n; +void enterdelim(int n) { if (! contree[n]) { @@ -107,8 +106,7 @@ if (m_ntrtrie(dstruct->string, } /* Read the code to be executed with a given state transition */ -void getcode(n) -int n; +void getcode(int n) { int c ; /* c is int instead of char for use with ungetc */ int nested = 1; @@ -620,8 +618,7 @@ void nextcon(LOGICAL sparse) /* If sparse matrix output option, generate a single element of transit array */ -void prtctxt(column, value) - int column, value; +void prtctxt(int column, int value) { static LOGICAL first = TRUE; @@ -656,8 +653,7 @@ void skiptoend(void) } /* Return a character to the input stream for re-reading */ -void unread(c) -int c; +void unread(int c) { M_WCHAR wnl; diff --git a/cde/programs/dthelp/parser/canon1/util/emptyfil.c b/cde/programs/dthelp/parser/canon1/util/emptyfil.c index a3bdc571..033096b4 100644 --- a/cde/programs/dthelp/parser/canon1/util/emptyfil.c +++ b/cde/programs/dthelp/parser/canon1/util/emptyfil.c @@ -28,9 +28,7 @@ void main(int argc, char **argv); -void main(argc, argv) - int argc ; - char **argv ; +void main(int argc, char **argv) { if (argc != 2) { fprintf(stderr, "Usage: emptyfil filename\n") ; diff --git a/cde/programs/dthelp/parser/canon1/util/entout.c b/cde/programs/dthelp/parser/canon1/util/entout.c index 5191a9cc..c031d65a 100644 --- a/cde/programs/dthelp/parser/canon1/util/entout.c +++ b/cde/programs/dthelp/parser/canon1/util/entout.c @@ -49,8 +49,7 @@ char xerror[] = "ERROR" ; /* Outputs entity definitions */ #define ENTFILENAME 12 -void entout(fname) - char *fname ; +void entout(char *fname) { char efilename[ENTFILENAME] ; int count = 1 ; @@ -173,15 +172,13 @@ void entout(fname) /* Entptr is called by m_dumptrie to output the value stored with a particular entity in the entity trie */ -void entptr(data) - M_ENTITY *data ; +void entptr(M_ENTITY *data) { fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ; } /* Typetype returns a string indicating the type of the nth entity.*/ -char *typetype(n) - int n ; +char *typetype(int n) { switch(n) { case M_GENERAL: return(xgeneral) ; diff --git a/cde/programs/dthelp/parser/canon1/util/error.c b/cde/programs/dthelp/parser/canon1/util/error.c index a8590f50..883acc63 100644 --- a/cde/programs/dthelp/parser/canon1/util/error.c +++ b/cde/programs/dthelp/parser/canon1/util/error.c @@ -83,16 +83,14 @@ void eprefix(LOGICAL flag) /* Writes part of an error message. Called from m_malloc instead of m_err1, since PARSER's version of m_err1 calls m_malloc and recursive calls are possible when the heap is exhausted */ -void m_errline(text) -char *text ; +void m_errline(char *text) { fputs(text, stderr) ; fputs(text, m_errfile) ; } /* Writes an error message to standard error and file "error" */ -void m_error(text) - char *text ; +void m_error(char *text) { eprefix(TRUE) ; fprintf(stderr,"%s", text) ; @@ -192,30 +190,26 @@ void esuffix(void) } /* Print something to both stderr and m_errfile */ -void msgline(text) - char *text ; +void msgline(char *text) { fprintf(stderr, "%s", text) ; fprintf(m_errfile, "%s", text) ; } /* Print something to both stderr and m_errfile */ -void msg1line(text, arg1) - char *text, *arg1 ; +void msg1line(char *text, char *arg1) { fprintf(stderr, text, arg1) ; fprintf(m_errfile, text, arg1) ; } /* Trace used for m_malloc trace output */ -void m_trace(text) -char *text ; +void m_trace(char *text) { m_errline(text) ; } -void m_wctrace(text) -M_WCHAR *text ; +void m_wctrace(M_WCHAR *text) { char *mb_text; @@ -225,8 +219,7 @@ m_free(mb_text,"multi-byte string"); } /* Writes a nonfatal error message to standard error and file "error" */ -void warning(text) - char *text ; +void warning(char *text) { eprefix(FALSE) ; fprintf(stderr,"%s", text) ; diff --git a/cde/programs/dthelp/parser/canon1/util/exit.c b/cde/programs/dthelp/parser/canon1/util/exit.c index 3991b618..47dd7e3b 100644 --- a/cde/programs/dthelp/parser/canon1/util/exit.c +++ b/cde/programs/dthelp/parser/canon1/util/exit.c @@ -31,8 +31,7 @@ void m_exit(int status); /* Exit function called by utilities used in PARSER and other programs in the MARKUP system */ -void m_exit(status) - int status ; +void m_exit(int status) { exit(status) ; } diff --git a/cde/programs/dthelp/parser/canon1/util/fclndir.c b/cde/programs/dthelp/parser/canon1/util/fclndir.c index 283befe3..b69046c8 100644 --- a/cde/programs/dthelp/parser/canon1/util/fclndir.c +++ b/cde/programs/dthelp/parser/canon1/util/fclndir.c @@ -61,9 +61,7 @@ void copyfile(char *pfile1, char *pfile2); int nextchar(FILE *file, struct data *data); -void main(argc, argv) - int argc ; - char **argv ; +void main(int argc, char **argv) { FILE *one, *two ; int c1, c2 ; @@ -110,8 +108,7 @@ void main(argc, argv) } /* copyfile inserted by ced, 12-1-89. */ -void copyfile(pfile1,pfile2) - char *pfile1, *pfile2; +void copyfile(char *pfile1, char *pfile2) { int ret; char *pcmd; @@ -128,9 +125,7 @@ void copyfile(pfile1,pfile2) free(pcmd); } -int nextchar(file, data) - FILE *file ; - struct data *data ; +int nextchar(FILE *file, struct data *data) { while (data->linestart) { data->linestart = FALSE ; diff --git a/cde/programs/dthelp/parser/canon1/util/inctest.c b/cde/programs/dthelp/parser/canon1/util/inctest.c index 09679715..a3d7feac 100644 --- a/cde/programs/dthelp/parser/canon1/util/inctest.c +++ b/cde/programs/dthelp/parser/canon1/util/inctest.c @@ -34,10 +34,7 @@ void m_exit(int status); void m_inctest(int *count, int limit, char *message); /* Increment a count and test against a limit */ -void m_inctest(count, limit, message) - int *count ; - int limit ; - char *message ; +void m_inctest(int *count, int limit, char *message) { if (++*count <= limit) return ; m_err1("Internal error: %s exceeded", message) ; diff --git a/cde/programs/dthelp/parser/canon1/util/itoa.c b/cde/programs/dthelp/parser/canon1/util/itoa.c index 2d5834b8..a3f59a4c 100644 --- a/cde/programs/dthelp/parser/canon1/util/itoa.c +++ b/cde/programs/dthelp/parser/canon1/util/itoa.c @@ -31,9 +31,7 @@ char *m_itoa(int n, char *s); void reverse(char *s); -char *m_itoa(n, s) /* convert n to characters in s */ -char s[]; -int n; +char *m_itoa(int n, char *s) /* convert n to characters in s */ { int sign ; char *p = s ; @@ -51,8 +49,7 @@ int n; return(s) ; } -void reverse(s) -char s[]; +void reverse(char s[]) { int c, i, j; diff --git a/cde/programs/dthelp/parser/canon1/util/lower.c b/cde/programs/dthelp/parser/canon1/util/lower.c index cc593a2a..96091df0 100644 --- a/cde/programs/dthelp/parser/canon1/util/lower.c +++ b/cde/programs/dthelp/parser/canon1/util/lower.c @@ -32,8 +32,7 @@ int m_lower(int c); /* Force a letter to lowercase */ -int m_lower(c) - int c ; +int m_lower(int c) { if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ; return(c) ; diff --git a/cde/programs/dthelp/parser/canon1/util/malloc.c b/cde/programs/dthelp/parser/canon1/util/malloc.c index 04d28343..32ef2dbf 100644 --- a/cde/programs/dthelp/parser/canon1/util/malloc.c +++ b/cde/programs/dthelp/parser/canon1/util/malloc.c @@ -49,9 +49,7 @@ void *m_trace(char *text); void *m_wctrace(M_WCHAR *text); -void m_free(block, msg) - void *block ; - char *msg ; +void m_free(void *block, char *msg) { char buffer[32] ; @@ -71,9 +69,7 @@ void m_free(block, msg) } } -void *m_malloc(size, msg) - int size ; - char *msg ; +void *m_malloc(int size, char *msg) { char buffer[32] ; void *p ; @@ -105,10 +101,7 @@ void *m_malloc(size, msg) return(p) ; } -void *m_realloc(ptr, size, msg) - void *ptr ; - int size ; - char *msg ; +void *m_realloc(void *ptr, int size, char *msg) { char buffer[32] ; void *p ; diff --git a/cde/programs/dthelp/parser/canon1/util/openchk.c b/cde/programs/dthelp/parser/canon1/util/openchk.c index dabc4bc3..44da7259 100644 --- a/cde/programs/dthelp/parser/canon1/util/openchk.c +++ b/cde/programs/dthelp/parser/canon1/util/openchk.c @@ -35,9 +35,7 @@ void m_exit(int status); void m_openchk(FILE **ptr, char *name, char *mode); /* Open a file and check that the open succeeded */ -void m_openchk(ptr, name, mode) - FILE **ptr ; - char *name, *mode ; +void m_openchk(FILE **ptr, char *name, char *mode) { *ptr = fopen(name, mode) ; if (*ptr) return ; diff --git a/cde/programs/dthelp/parser/canon1/util/scanutil.c b/cde/programs/dthelp/parser/canon1/util/scanutil.c index 5b1aaffc..7a45adf6 100644 --- a/cde/programs/dthelp/parser/canon1/util/scanutil.c +++ b/cde/programs/dthelp/parser/canon1/util/scanutil.c @@ -72,9 +72,7 @@ return((int) wc); } /* Reads the next token stored in a packed trie (as defined by context.dat) */ -int gettoken(c, context) -int *c; -int context; +int gettoken(int *c, int context) { int hold[MAXD + 1]; int ucase; @@ -123,8 +121,7 @@ return(M_NULLVAL); } /* Reads a literal (called after the opening quotation mark is read) */ -LOGICAL litproc(delim) -int delim; +LOGICAL litproc(int delim) { int n, i, number; M_WCHAR *p, *pStart; /* bigger than wide versions of lit or lita */ @@ -215,8 +212,7 @@ return(FALSE); /* Returns a context-dependent delimiter string to input stream so characters can be reread one at a time in another context */ -void undodelim(delim) -M_WCHAR *delim; +void undodelim(M_WCHAR *delim) { M_WCHAR *p; @@ -234,8 +230,7 @@ while (TRUE) /* Returns a character to the input stream to read again later. Unexplained problems occurred using standard ungetc procedure; hence explicit declaration of buffer for read-ahead characters */ -void ungetachar(c) -int c; +void ungetachar(int c) { M_WCHAR wnl; diff --git a/cde/programs/dthelp/parser/canon1/util/sparse.c b/cde/programs/dthelp/parser/canon1/util/sparse.c index 6216398f..57cea338 100644 --- a/cde/programs/dthelp/parser/canon1/util/sparse.c +++ b/cde/programs/dthelp/parser/canon1/util/sparse.c @@ -25,8 +25,7 @@ /* Sparse.c has a procedure used with the tables generated by program CONTEXT when the sparse option is used */ -int m_sprscon(i, j) - int i, j ; +int m_sprscon(int i, int j) { int k ; diff --git a/cde/programs/dthelp/parser/canon1/util/strstr.c b/cde/programs/dthelp/parser/canon1/util/strstr.c index fb468594..020b91df 100644 --- a/cde/programs/dthelp/parser/canon1/util/strstr.c +++ b/cde/programs/dthelp/parser/canon1/util/strstr.c @@ -21,8 +21,8 @@ * Floor, Boston, MA 02110-1301 USA */ /* $XConsortium: strstr.c /main/3 1995/11/08 09:54:55 rswiston $ */ -char *strstr ( s1, s2 ) -char *s1, *s2 ; { +char *strstr (char *s1, char *s2) +{ int x, y ; diff --git a/cde/programs/dthelp/parser/canon1/util/trie.c b/cde/programs/dthelp/parser/canon1/util/trie.c index dc43f4f1..5490569c 100644 --- a/cde/programs/dthelp/parser/canon1/util/trie.c +++ b/cde/programs/dthelp/parser/canon1/util/trie.c @@ -117,10 +117,7 @@ void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie ) } /* Enters a string and associated data value into a trie */ -void *m_ntrtrie(p, xtrie, dataval) - M_WCHAR *p ; - M_TRIE *xtrie ; - void *dataval ; +void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval) { M_TRIE *currentnode ; void *n ; diff --git a/cde/programs/dthelp/parser/canon1/util/triecnt.c b/cde/programs/dthelp/parser/canon1/util/triecnt.c index 155e1d68..079bed8c 100644 --- a/cde/programs/dthelp/parser/canon1/util/triecnt.c +++ b/cde/programs/dthelp/parser/canon1/util/triecnt.c @@ -40,9 +40,7 @@ void printval(FILE *file, void *value); /* Count the descendants of a node in order to generate declarations for the packed form of a trie*/ -void countdown(parent, count) - M_TRIE *parent ; - int *count ; +void countdown(M_TRIE *parent, int *count) { M_TRIE *child ; @@ -54,12 +52,8 @@ void countdown(parent, count) /* Output descendants of a node for the declaration of a trie, in packed or normal format*/ -void dumpnode(first, file, trieptr, count, proc) - LOGICAL *first ; - FILE *file ; - M_TRIE *trieptr ; - int *count ; - void (*proc) (FILE *file, void *value); +void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, + void (*proc) (FILE *file, void *value)) { M_TRIE *p ; int savecount ; @@ -89,9 +83,7 @@ void dumpnode(first, file, trieptr, count, proc) /* Most common procedure passed to dumpptrie */ -void printval(file, value) - FILE *file ; - void *value ; +void printval(FILE *file, void *value) { fprintf(file, ", %ld", (long) value) ; } diff --git a/cde/programs/dthelp/parser/canon1/util/triedump.c b/cde/programs/dthelp/parser/canon1/util/triedump.c index 3fc1d16e..859b16c6 100644 --- a/cde/programs/dthelp/parser/canon1/util/triedump.c +++ b/cde/programs/dthelp/parser/canon1/util/triedump.c @@ -34,12 +34,8 @@ void countdown(M_TRIE *parent, int *count); void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(void *value)); /* Write the C declaration of a trie */ -void m_dumptrie(file, xtrie, extname, count, proc) - FILE *file ; - M_TRIE *xtrie ; - char *extname ; - int *count ; - void (*proc)(void *value); +void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, + void (*proc)(void *value)) { int firstson ; M_TRIE *p ; diff --git a/cde/programs/dthelp/parser/canon1/util/triepdmp.c b/cde/programs/dthelp/parser/canon1/util/triepdmp.c index 04618ef6..7058d59f 100644 --- a/cde/programs/dthelp/parser/canon1/util/triepdmp.c +++ b/cde/programs/dthelp/parser/canon1/util/triepdmp.c @@ -38,13 +38,9 @@ void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char void (*proc)(FILE *file, void *value)); /* Write the declaration of a packed trie to the specified files */ -void dumpptrie(intname, extname, file, externdef, defdef, proc) - M_TRIE *intname ; - char *extname ; - FILE *file ; - char *externdef ; - char *defdef ; - void (*proc) (FILE *file, void *value) ; +void dumpptrie(M_TRIE *intname, char *extname, FILE *file, + char *externdef, char *defdef, + void (*proc) (FILE *file, void *value)) { LOGICAL first = TRUE ; int count = 0 ; diff --git a/cde/programs/dthelp/parser/canon1/util/trieplk.c b/cde/programs/dthelp/parser/canon1/util/trieplk.c index 3f616419..0a6607aa 100644 --- a/cde/programs/dthelp/parser/canon1/util/trieplk.c +++ b/cde/programs/dthelp/parser/canon1/util/trieplk.c @@ -39,9 +39,7 @@ extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name); /* Look for the string NAME in the packed trie PTRIE */ -int m_packedlook(xptrie, name) -M_PTRIE *xptrie ; -M_WCHAR *name ; +int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name) { int current = 0 ; int i ; diff --git a/cde/programs/dthelp/parser/canon1/util/trierset.c b/cde/programs/dthelp/parser/canon1/util/trierset.c index e923176b..d397eabe 100644 --- a/cde/programs/dthelp/parser/canon1/util/trierset.c +++ b/cde/programs/dthelp/parser/canon1/util/trierset.c @@ -33,10 +33,7 @@ extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; /* Changes the value associated with an entry in a trie. */ -void *m_resettrie(xtrie, p, value) - M_TRIE *xtrie ; - M_WCHAR *p ; - void *value ; +void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value) { M_TRIE *currentnode ; diff --git a/cde/programs/dthelp/parser/canon1/util/wchar.c b/cde/programs/dthelp/parser/canon1/util/wchar.c index a897d586..4927efdc 100644 --- a/cde/programs/dthelp/parser/canon1/util/wchar.c +++ b/cde/programs/dthelp/parser/canon1/util/wchar.c @@ -214,8 +214,7 @@ return wc_stringStart; /* Get-wide-char procedure */ -int mb_getwc(m_ptr) -void *m_ptr; +int mb_getwc(void *m_ptr) { int c; M_WCHAR wc; diff --git a/cde/programs/dthelp/parser/pass1/build/build.c b/cde/programs/dthelp/parser/pass1/build/build.c index f908e5b1..02bf4022 100644 --- a/cde/programs/dthelp/parser/pass1/build/build.c +++ b/cde/programs/dthelp/parser/pass1/build/build.c @@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entdef.h" /* Main procedure */ -int main(argc, argv) -int argc ; -char **argv ; +int main(int argc, char **argv) { int m_prevcon ; diff --git a/cde/programs/dthelp/parser/pass1/build/buildutl.c b/cde/programs/dthelp/parser/pass1/build/buildutl.c index 735c8267..d3efc242 100644 --- a/cde/programs/dthelp/parser/pass1/build/buildutl.c +++ b/cde/programs/dthelp/parser/pass1/build/buildutl.c @@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Verify that , or has not previously occurred in this rule */ -void found(flag, delim) -LOGICAL *flag; -char *delim; +void found(LOGICAL *flag, char *delim) { M_WCHAR wcbuff[129]; ssize_t length; diff --git a/cde/programs/dthelp/parser/pass1/build/eltree.c b/cde/programs/dthelp/parser/pass1/build/eltree.c index 0049e076..eb8e3972 100644 --- a/cde/programs/dthelp/parser/pass1/build/eltree.c +++ b/cde/programs/dthelp/parser/pass1/build/eltree.c @@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "build.h" /* Enters an element name into the element name tree */ -ELTSTRUCT *ntrelt(p) - M_WCHAR *p ; +ELTSTRUCT *ntrelt(M_WCHAR *p) { ELTSTRUCT *new ; ELTSTRUCT *old ; diff --git a/cde/programs/dthelp/parser/pass1/build/fsa.c b/cde/programs/dthelp/parser/pass1/build/fsa.c index 0ebc8c25..7f9ce075 100644 --- a/cde/programs/dthelp/parser/pass1/build/fsa.c +++ b/cde/programs/dthelp/parser/pass1/build/fsa.c @@ -58,11 +58,7 @@ int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL opti /*checkand is used to verify nondeterminism from start and final states of FSA's generated from and groups*/ -void checkand(andstart, andptr, start, root, errelt) - ANDGROUP *andstart, *andptr ; - STATE *start ; - TREE *root ; - ELTSTRUCT **errelt ; +void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, ELTSTRUCT **errelt) { ARC *parc ; ANDGROUP *pand ; @@ -86,12 +82,7 @@ void checkand(andstart, andptr, start, root, errelt) /*Checkdfsa is called when adding an arc to an FSA in order to verify that no existing arc from the same state (or from a start state of an and-group FSA labelling an arc from the same state) has the same label. */ -int checkdfsa(from, label, and, id, errelt) - STATE *from ; - ELTSTRUCT *label ; - ANDGROUP *and ; - int id ; - ELTSTRUCT **errelt ; +int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt) { int c ; ARC *parc ; @@ -116,10 +107,7 @@ int checkdfsa(from, label, and, id, errelt) } /* Check use of repeated models with and groups */ -int checkrepeat(from, and, errelt) - STATE *from ; - ANDGROUP *and ; - ELTSTRUCT **errelt ; +int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt) { ARC *parc ; int c ; @@ -142,8 +130,7 @@ int checkrepeat(from, and, errelt) } /* Copyintolist copies one list of states into another */ -void copyintolist(from, to) - STATELIST *from, **to ; +void copyintolist(STATELIST *from, STATELIST **to) { STATELIST **new, *old ; @@ -161,8 +148,7 @@ void copyintolist(from, to) } /* Dellist deletes a list of states */ -void dellist(list) - STATELIST **list ; +void dellist(STATELIST **list) { STATELIST *p, *q ; @@ -220,10 +206,7 @@ STATE *getstate(void) } /* Makeand processes a submodel whose connector is & */ -void makeand(canbenull, root, optional) - LOGICAL *canbenull ; - TREE *root ; - int optional ; +void makeand(LOGICAL *canbenull, TREE *root, int optional) { TREE *child ; STATELIST *start, *final ; @@ -308,9 +291,7 @@ void makeand(canbenull, root, optional) allfinal is passed from model to submodel; information in newfinal goes from submodel to model. */ -LOGICAL makefsa(root, optional) - TREE *root ; - int optional ; +LOGICAL makefsa(TREE *root, int optional) { LOGICAL canbenull ; @@ -344,9 +325,7 @@ LOGICAL makefsa(root, optional) } /* Makeor processes a submodel whose connector is | */ -void makeor(canbenull, root) - LOGICAL *canbenull ; - TREE *root ; +void makeor(LOGICAL *canbenull, TREE *root) { TREE *child ; STATELIST *final ; @@ -368,10 +347,7 @@ void makeor(canbenull, root) } /* Makeseq processes a submodel whose connector is , */ -void makeseq(canbenull, root, optional) - LOGICAL *canbenull ; - TREE *root ; - int optional ; +void makeseq(LOGICAL *canbenull, TREE *root, int optional) { LOGICAL branchnull ; STATELIST *keepfinal = NULL, *final ; @@ -409,10 +385,7 @@ void makeseq(canbenull, root, optional) /* Nondeterm issues a diagnostic when a nondeterministic model is encountered */ -void nondeterm(root, c, eltp) - TREE *root ; - int c ; - ELTSTRUCT *eltp ; +void nondeterm(TREE *root, int c, ELTSTRUCT *eltp) { M_WCHAR *wtemp; @@ -443,8 +416,7 @@ void nondeterm(root, c, eltp) /* Notinlist returns TRUE iff item is not in list. If item is in list, it makes sure that the stored nesting level is the smaller of the two */ -LOGICAL notinlist(item, list) - STATELIST *item, *list ; +LOGICAL notinlist(STATELIST *item, STATELIST *list) { for ( ; list ; list = list->next) if (list->value == item->value) { @@ -456,8 +428,7 @@ LOGICAL notinlist(item, list) /* Returns true if the arc is labeled #PCDATA or with an and-group that has an arc labelled #PCDATA from a start state */ -LOGICAL permitspcd(a) - ARC *a ; +LOGICAL permitspcd(ARC *a) { ANDGROUP *pand ; ARC *b ; @@ -507,8 +478,7 @@ void push(void) /* Regenerate is used in error processing to print the portion of a grammar rule preceding an error */ -LOGICAL regenerate(start, stop) -TREE *start, *stop ; +LOGICAL regenerate(TREE *start, TREE *stop) { TREE *child ; @@ -554,8 +524,7 @@ return(FALSE) ; by adding arcs from all the final states to all the states reachable in one transition from a start state, labelling them as arcs from start states are labelled. */ -void repeat(root) - TREE *root ; +void repeat(TREE *root) { STATELIST *final ; ARC *a ; @@ -606,9 +575,7 @@ void repeat(root) /* Used during processing of occurrence indicators in content models such as (a+)+ to prohibit duplicate arcs */ -LOGICAL samelabelarc(a, s) - ARC *a ; - STATE *s ; +LOGICAL samelabelarc(ARC *a, STATE *s) { ARC *b ; @@ -666,11 +633,7 @@ void savestartarcs(void) /* Simplebranch adds a new state and transition to it in an FSA when a submodel consists of a single element or of an and group */ -void simplebranch(root, value, group, optional) - TREE *root ; - ELTSTRUCT *value ; - ANDGROUP *group ; - int optional ; +void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional) { STATE *new = NULL ; STATELIST *index ; @@ -718,9 +681,7 @@ void simplebranch(root, value, group, optional) subtree in the tree representing the grammar rule being processed and the pointer to a flag that is set to indicate whether or not the submodel can be null. */ -STATE *startfsa(root, canbenull) - TREE *root ; - LOGICAL *canbenull ; +STATE *startfsa(TREE *root, LOGICAL *canbenull) { STATELIST *item ; STATE *first ; diff --git a/cde/programs/dthelp/parser/pass1/build/out.c b/cde/programs/dthelp/parser/pass1/build/out.c index 1a4e8f0a..af50a148 100644 --- a/cde/programs/dthelp/parser/pass1/build/out.c +++ b/cde/programs/dthelp/parser/pass1/build/out.c @@ -69,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ; /* Deftype returns a string indicating the default type of the nth parameter. */ -char *deftype(n) - int n ; +char *deftype(int n) { switch (n) { case NAME: return(mnamedef) ; @@ -101,9 +100,7 @@ void done(void) } /* Prints data value of an entry in the element name tree */ -void dumpentnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpentnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ; @@ -111,9 +108,7 @@ void dumpentnode(file, value) /* Prints data value of an entry in the trie of short reference map names, reporting any maps that are referenced but not defined */ -void dumpmapnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpmapnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((MAP *) value)->map) ; if (! ((MAP *) value)->defined) @@ -123,9 +118,7 @@ void dumpmapnode(file, value) /* Prints data value of an entry in the trie of short reference delimiters */ -void dumpsrefnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpsrefnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ; } @@ -133,8 +126,7 @@ void dumpsrefnode(file, value) /* Controls printing of element blocks in alphabetical order to the template file */ -void eltblocks(tempfile) - FILE *tempfile ; +void eltblocks(FILE *tempfile) { int n ; M_TRIE *node[M_NAMELEN + 1] ; @@ -223,8 +215,7 @@ void eltreeout(void) } /* Enttype returns a string indicating the type of an entity */ -char *enttype(n) - int n ; +char *enttype(int n) { switch(n) { case M_GENERAL: return(mgeneral) ; @@ -452,8 +443,7 @@ fprintf(dtd, "#define M_MAXPAR %d\n\n", maxpar) ; } /* Partype returns a string indicating the type of the nth parameter. */ -char *partype(n) - int n ; +char *partype(int n) { switch(n) { case GRPO: return(mkeyword) ; @@ -545,9 +535,7 @@ void srefout(void) } /* Output one element block in a template */ -void tempelt(eltp, tempfile) -ELTSTRUCT *eltp ; -FILE *tempfile ; +void tempelt(ELTSTRUCT *eltp, FILE *tempfile) { PARAMETER *paramp ; PTYPE *ptypep ; @@ -653,8 +641,7 @@ void template(void) } /* Typecon returns a string indicating the content type of the nth element.*/ -char *typecon(n) - int n ; +char *typecon(int n) { switch(n) { case GRPO: return(mregexp) ; diff --git a/cde/programs/dthelp/parser/pass1/build/scan.c b/cde/programs/dthelp/parser/pass1/build/scan.c index 895c18a1..89504aee 100644 --- a/cde/programs/dthelp/parser/pass1/build/scan.c +++ b/cde/programs/dthelp/parser/pass1/build/scan.c @@ -38,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "sref.h" /* Reads a name */ -LOGICAL getname(first) - int first; +LOGICAL getname(int first) { M_WCHAR *p; int c; diff --git a/cde/programs/dthelp/parser/pass1/build/sref.c b/cde/programs/dthelp/parser/pass1/build/sref.c index 0bf9b0b6..4eb3a41b 100644 --- a/cde/programs/dthelp/parser/pass1/build/sref.c +++ b/cde/programs/dthelp/parser/pass1/build/sref.c @@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL; /* Add an entity with the default name constructed by adding a suffix to the name of the short reference map in which it is invoked, and a prefix m- */ -void adddefent(mapname) -M_WCHAR *mapname; +void adddefent(M_WCHAR *mapname) { M_WCHAR *p; int n; @@ -75,8 +74,7 @@ thissref->entidx = entity->index; /* Add an entity, return FALSE if already there, TRUE if adding it. Pointer to the entity structure is in global M_STRUCT *entity. */ -LOGICAL addent(name) -M_WCHAR *name; +LOGICAL addent(M_WCHAR *name) { M_ENTITY *new; @@ -128,16 +126,14 @@ return(TRUE); } /* Add a named entity to a short reference map */ -void addndent(p) -M_WCHAR *p; +void addndent(M_WCHAR *p) { addent(p); thissref->entidx = entity->index; } /* Add a short reference delimiter */ -void addsref(p) -M_WCHAR *p; +void addsref(M_WCHAR *p) { SREFSTRUCT *delim; SREFSTRUCT *prevsr; diff --git a/cde/programs/dthelp/parser/pass1/build/tree.c b/cde/programs/dthelp/parser/pass1/build/tree.c index 42355700..f1b64c8c 100644 --- a/cde/programs/dthelp/parser/pass1/build/tree.c +++ b/cde/programs/dthelp/parser/pass1/build/tree.c @@ -44,8 +44,7 @@ void endmodel(void) } /* Release storage used for the tree representation of a rule */ -void freetree(treep) - TREE *treep ; +void freetree(TREE *treep) { TREE *child, *discard ; diff --git a/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c b/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c index a1af1f18..7243f746 100644 --- a/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c +++ b/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c @@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entity.h" /* Main program */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { int m_token ; diff --git a/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c b/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c index 9e958bcc..e537fb70 100644 --- a/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c +++ b/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c @@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "version.h" /* Output indicated action pointer array to if.h */ -void actptrout(array, name) - ACTION **array; - char *name; +void actptrout(ACTION **array, char *name) { int i; @@ -267,8 +265,7 @@ void endstring(void) /* Set the type of an entity and check if different than declaration in BUILD */ -void enttype(type) - int type; +void enttype(int type) { if ((entity->type == M_PI && type == M_CODEPI) || (entity->type == M_SDATA && type == M_CODESDATA)); @@ -294,8 +291,7 @@ void freechain(void) /* Returns pointer to data field in action node for current chain of elements */ -int *getaction(array) - ACTION **array; +int *getaction(ACTION **array) { ACTION *start, *node; CHAIN *chainp; @@ -431,8 +427,7 @@ void outstring(void) } /* Output #define's for parameter values */ -void outpval(p) -M_TRIE *p; +void outpval(M_TRIE *p) { M_WCHAR *q; @@ -530,14 +525,8 @@ void skiptoend(void) } /* Starts processing a code segment from the input file */ -void startcode(caseno, flag, file, prefix, proto, formal, formtype) -int caseno; -LOGICAL *flag; -FILE *file; -char *prefix; -char *proto; -char *formal; -char *formtype; +void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, + char *proto, char *formal, char *formtype) { CVARSTRUCT *cvarp; @@ -631,8 +620,7 @@ void storepname(void) } /* Called when a possible parameter value to be defined is encountered */ -void value(p) -M_WCHAR *p; +void value(M_WCHAR *p) { char buffer[5]; diff --git a/cde/programs/dthelp/parser/pass1/eltdef/scan.c b/cde/programs/dthelp/parser/pass1/eltdef/scan.c index 811cecd3..89a91275 100644 --- a/cde/programs/dthelp/parser/pass1/eltdef/scan.c +++ b/cde/programs/dthelp/parser/pass1/eltdef/scan.c @@ -43,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "delim.h" /* Reads a name token */ -void getname(first) -int first; +void getname(int first) { M_WCHAR *p, wus; int c, cttype; diff --git a/cde/programs/dthelp/parser/pass1/helptag/custom.c b/cde/programs/dthelp/parser/pass1/helptag/custom.c index 68412bbd..b3687b40 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/custom.c +++ b/cde/programs/dthelp/parser/pass1/helptag/custom.c @@ -33,9 +33,7 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co. #include /* Write input file and line number for an error message */ -void m_dumpline(file, line) -M_WCHAR *file; -int line; +void m_dumpline(M_WCHAR *file, int line) { char buffer[10]; char *mbyte; @@ -71,8 +69,7 @@ m_errline(",\n"); } /* Process error message text */ -void m_errline(p) -char *p; +void m_errline(char *p) { char c; @@ -96,8 +93,7 @@ if (++m_errcnt == m_errlim) } /* Exit procedure */ -void m_exit(status) -int status; +void m_exit(int status) { if (filefound) { @@ -134,8 +130,7 @@ exit(0); } /* Get-char procedure */ -int m_getc(m_ptr) -void *m_ptr; +int m_getc(void *m_ptr) { int c; M_WCHAR wc; @@ -189,8 +184,7 @@ return((int) wc); } /* Open SYSTEM entity procedure */ -void *m_openent(entcontent) -M_WCHAR *entcontent; +void *m_openent(M_WCHAR *entcontent) { FILE *open; char *filename; @@ -270,7 +264,7 @@ return((void *) first); } /* Set program options */ -void m_setoptions() +void m_setoptions(void) { /* F option used for FILELIST (checking done in basename, which is called before this function is called) */ @@ -284,8 +278,7 @@ if (m_argc > 2) /* Process signon message text, stripping out MARKUP version number, so only one version number will appear */ -void m_signmsg(p) - char *p; +void m_signmsg(char *p) { char *q; char *pCopy; @@ -305,7 +298,7 @@ void m_signmsg(p) /* All entity declarations have been processed. Can now check if .TEX file uptodate and open appropriate output file */ -void m_startdoc() +void m_startdoc(void) { LOGICAL init = TRUE; unsigned char type; @@ -345,16 +338,14 @@ else } /* Write debugging trace information */ -void m_trace(p) -char *p; +void m_trace(char *p) { if (tracetostd) fputs(p, stdout); else fputs(p, m_outfile); } -void m_wctrace(p) -M_WCHAR *p; +void m_wctrace(M_WCHAR *p) { char *mb_p; diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.c b/cde/programs/dthelp/parser/pass1/helptag/help.c index 8a0d691a..97060a6b 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.c +++ b/cde/programs/dthelp/parser/pass1/helptag/help.c @@ -250,8 +250,7 @@ else /* This procedure starts a CHAPTER */ -void chapstart(id) -M_WCHAR *id; +void chapstart(M_WCHAR *id) { M_WCHAR *p, *q, *wc; int i; @@ -498,9 +497,7 @@ return ( 0 ); } /* end mb_getqualified */ -int getqualified (qualname, unqualname) -M_WCHAR *qualname; -M_WCHAR *unqualname; +int getqualified(M_WCHAR *qualname, M_WCHAR *unqualname) { int retval; char mb_qualname[FNAMELEN], @@ -520,13 +517,9 @@ return retval; /* handle the common link and graphic code for

and */ void -handle_link_and_graphic(parent, - gentity, - gposition, - ghyperlink, - glinktype, - gdescription) -M_WCHAR *parent, *gentity, *gposition, *ghyperlink, *glinktype, *gdescription; +handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, + M_WCHAR *gposition, M_WCHAR *ghyperlink, + M_WCHAR *glinktype, M_WCHAR *gdescription) { unsigned char etype, wheredef; char *mb_content, *ssi, id[32]; @@ -912,8 +905,7 @@ if (item_id) /* Start a rsect */ -void rsectstart(id) -M_WCHAR *id; +void rsectstart(M_WCHAR *id) { savid = checkid(id); iderr = FALSE; @@ -933,8 +925,7 @@ rsectseq = FALSE; /* Follow search path to find a file, returning qualified name */ -M_WCHAR *searchforfile(file) -M_WCHAR *file; +M_WCHAR *searchforfile(M_WCHAR *file) { M_WCHAR *filename; SEARCH *searchp; @@ -1055,9 +1046,7 @@ if (wc_id) /* Start a labeled list */ -void StartLabList(spacing, longlabel) -M_WCHAR *spacing; -M_WCHAR *longlabel; +void StartLabList(M_WCHAR *spacing, M_WCHAR *longlabel) { char *mb_spacing; static char def_spacing[] = "LOOSE"; @@ -1240,7 +1229,7 @@ lastlist = nextlist; } -void EndList() +void EndList(void) { LIST *curlist ; CONTCHAIN *chain, *xchain ; @@ -1658,7 +1647,7 @@ return buffer; * versions of the language and charset. */ void -SetDefaultLocale() +SetDefaultLocale(void) { unsigned char type,wheredef; M_WCHAR *elementName; @@ -2173,14 +2162,14 @@ while (*wcp) return(newstring); } -int NextId() +int NextId(void) { static id = 0; return ++id; } -char *GetLanguage() +char *GetLanguage(void) { static char *pLang = NULL; @@ -2192,7 +2181,7 @@ if (!pLang) return pLang; } -char *GetCharset() +char *GetCharset(void) { static char *pCharset = NULL; @@ -2755,7 +2744,7 @@ return(name) ; * content is modified to be so that it may be * emitted into the SDL output. */ -void ModifyEntities() +void ModifyEntities(void) { unsigned char type; unsigned char wheredef; @@ -2918,7 +2907,7 @@ fputs(">\n", outfile); needFData = TRUE; } -void PopForm() +void PopForm(void) { if (inBlock) { @@ -2934,7 +2923,7 @@ mb_free(&(formStackTop->rowVec)); --formStackTop; } -void PopForm2() +void PopForm2(void) { if (inBlock) { @@ -2955,7 +2944,7 @@ mb_free(&(formStackTop->rowVec)); * is pushed but the source doesn't go to text either because the text * is explicitly optional or due to the fact that text can be null. */ -void PopFormMaybe() +void PopFormMaybe(void) { if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1)) { @@ -2964,7 +2953,7 @@ if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1)) } } -void EmitSavedAnchors() +void EmitSavedAnchors(void) { char buffer[BIGBUF]; @@ -2979,7 +2968,7 @@ if (parTextId) } } -void CloseVirpage() +void CloseVirpage(void) { if (parTextId) { diff --git a/cde/programs/dthelp/parser/pass1/helptag/out.c b/cde/programs/dthelp/parser/pass1/helptag/out.c index ddb0e10a..c4bda7d3 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/out.c +++ b/cde/programs/dthelp/parser/pass1/helptag/out.c @@ -31,8 +31,7 @@ /* Echo part of a head to the screen to indicate how much of the document has been processed */ -void echohead(p) -M_WCHAR *p; +void echohead(M_WCHAR *p) { char *mb_p,*mb_string; @@ -54,8 +53,7 @@ m_free(mb_string,"multi-byte string"); } /* call echohead with a literal string */ -void mb_echohead(p) -char *p; +void mb_echohead(char *p) { M_WCHAR *wc; @@ -104,7 +102,7 @@ echo = savhd = FALSE; * location is placed in the snb file and the elements are * emitted there too. */ -void chksnb() +void chksnb(void) { fputs("\n", outfile); snbstart = ftell(outfile); @@ -276,10 +274,7 @@ else /* Called for processing instruction */ -void outpi(enttype, pi, entname) -int enttype; -M_WCHAR *pi; -M_WCHAR *entname; +void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname) { strcode(pi, outfile); @@ -392,13 +387,8 @@ shchar(wc_textchar, len, max, string, proc, msg, errflg); /* Save a string in the array used to store table of contents entries when processing a head */ -void shstring(addstring, len, max, storestring, msg, errflg) -M_WCHAR *addstring; -int *len; -int max; -M_WCHAR *storestring; -char *msg; -LOGICAL *errflg; +void shstring(M_WCHAR *addstring, int *len, int max, + M_WCHAR *storestring, char *msg, LOGICAL *errflg) { int addlength; @@ -419,13 +409,8 @@ else } -void mb_shstring(addstring, len, max, storestring, msg, errflg) -char *addstring; -int *len; -int max; -M_WCHAR *storestring; -char *msg; -LOGICAL *errflg; +void mb_shstring(char *addstring, int *len, int max, + M_WCHAR *storestring, char *msg, LOGICAL *errflg) { M_WCHAR *wc_addstring; @@ -435,9 +420,7 @@ m_free(wc_addstring,"wide character string"); } /* Writes a string to the output file, and if appropriate saves it */ -void strcode(string, outfile) -M_WCHAR *string; -FILE *outfile; +void strcode(M_WCHAR *string, FILE *outfile) { char exbuff[32]; /* arbitrarily large */ int bufflen; @@ -492,9 +475,7 @@ if (savex) } -void mb_strcode(string, outfile) -char *string; -FILE *outfile; +void mb_strcode(char *string, FILE *outfile) { M_WCHAR *wc; @@ -504,8 +485,7 @@ m_free(wc,"wide character string"); } /* Copies string to end of buffer where saving head for table of contents */ -void svhdstring(string) -M_WCHAR *string; +void svhdstring(M_WCHAR *string) { int length; @@ -524,8 +504,7 @@ svheadlen += length; } /* Copies string to end of buffer where saving table caption */ -void svtcstring(string) -M_WCHAR *string; +void svtcstring(M_WCHAR *string) { int length; @@ -605,10 +584,7 @@ else } /* Process a PI in a term */ -void termpi(m_enttype, m_pi, m_entname) -int m_enttype; -M_WCHAR *m_pi; -M_WCHAR *m_entname; +void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname) { int length; diff --git a/cde/programs/dthelp/parser/pass1/helptag/special.c b/cde/programs/dthelp/parser/pass1/helptag/special.c index 6ec2d5d6..d25355be 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/special.c +++ b/cde/programs/dthelp/parser/pass1/helptag/special.c @@ -138,9 +138,7 @@ struct { #define NO8BITCHARS 256 int invert[NO8BITCHARS], emptycell; -main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, both = FALSE, spec = FALSE, coll = FALSE, error = FALSE ; diff --git a/cde/programs/dthelp/parser/pass1/helptag/xref.c b/cde/programs/dthelp/parser/pass1/helptag/xref.c index c80b893b..6b7bac2c 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/xref.c +++ b/cde/programs/dthelp/parser/pass1/helptag/xref.c @@ -31,8 +31,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "globdec.h" /* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */ -M_WCHAR *checkid(id) -M_WCHAR *id; +M_WCHAR *checkid(M_WCHAR *id) { struct xref *xref; char *buffer; @@ -80,10 +79,7 @@ return(NULL); } /* Write a single cross-reference macro definition */ -static void defxref(xfile, id, xref) -FILE *xfile; -M_WCHAR *id; -struct xref *xref; +static void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref) { char *csname; char *p; @@ -196,8 +192,7 @@ while (TRUE) } /* Copies string to end of current cross-reference string */ -void idstring(string) -M_WCHAR *string; +void idstring(M_WCHAR *string) { int length; @@ -414,8 +409,7 @@ savid = NULL; } /* Generate a cross-reference */ -void xrefexpand(id) -M_WCHAR *id; +void xrefexpand(M_WCHAR *id) { struct xref *xref; struct xref *old; diff --git a/cde/programs/dthelp/parser/pass1/parser/actutil.c b/cde/programs/dthelp/parser/pass1/parser/actutil.c index 2d5ee736..81ef022f 100644 --- a/cde/programs/dthelp/parser/pass1/parser/actutil.c +++ b/cde/programs/dthelp/parser/pass1/parser/actutil.c @@ -44,8 +44,7 @@ in the interface definition.*/ #include "signon.h" /* When an explicit or implied end-tag occurs */ -void m_endaction(m_elt) - M_ELEMENT m_elt; +void m_endaction(M_ELEMENT m_elt) { M_ELEMENT m_action; char buffer[2*MAXD+M_NAMELEN+1]; @@ -76,9 +75,7 @@ void m_endaction(m_elt) } /* Find appropriate action according to current stack */ -int m_findact(elt, array) - M_ELEMENT elt; - int *array; +int m_findact(M_ELEMENT elt, int *array) { int chainlen = 0; int index; @@ -156,8 +153,7 @@ m_free(wc_string,"wide character string"); } /* When an explicit or implied start-tag occurs */ -void m_strtaction(m_elt) - M_ELEMENT m_elt; +void m_strtaction(M_ELEMENT m_elt) { int m_par, m_i; M_WCHAR *m_p; diff --git a/cde/programs/dthelp/parser/pass1/parser/closent.c b/cde/programs/dthelp/parser/pass1/parser/closent.c index ca80be85..f3280154 100644 --- a/cde/programs/dthelp/parser/pass1/parser/closent.c +++ b/cde/programs/dthelp/parser/pass1/parser/closent.c @@ -28,8 +28,7 @@ #include "userinc.h" #include "globdec.h" -void m_closent(m_ptr) - void *m_ptr ; +void m_closent(void *m_ptr) { fclose((FILE *) m_ptr) ; } diff --git a/cde/programs/dthelp/parser/pass1/parser/code.c b/cde/programs/dthelp/parser/pass1/parser/code.c index aed6f794..36afa6ce 100644 --- a/cde/programs/dthelp/parser/pass1/parser/code.c +++ b/cde/programs/dthelp/parser/pass1/parser/code.c @@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entfile.c" /* When a reference to a CODE entity is encountered */ -void m_codeent(m_ent) - int m_ent ; +void m_codeent(int m_ent) { (*m_ctable[m_ent])() ; } diff --git a/cde/programs/dthelp/parser/pass1/parser/dcurelt.c b/cde/programs/dthelp/parser/pass1/parser/dcurelt.c index 4e546533..13794674 100644 --- a/cde/programs/dthelp/parser/pass1/parser/dcurelt.c +++ b/cde/programs/dthelp/parser/pass1/parser/dcurelt.c @@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "globdec.h" /* Displays current element after some error messages */ -void m_dispcurelt(file, line) -M_WCHAR *file ; -int line ; +void m_dispcurelt(M_WCHAR *file, int line) { char *mb_parent; diff --git a/cde/programs/dthelp/parser/pass1/parser/end.c b/cde/programs/dthelp/parser/pass1/parser/end.c index f3601280..c4de1f99 100644 --- a/cde/programs/dthelp/parser/pass1/parser/end.c +++ b/cde/programs/dthelp/parser/pass1/parser/end.c @@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Perform the m_action-th end-code in the interface */ -void m_endcase(m_action) - int m_action ; +void m_endcase(int m_action) { (*m_etable[m_action])() ; } diff --git a/cde/programs/dthelp/parser/pass1/parser/entity.c b/cde/programs/dthelp/parser/pass1/parser/entity.c index c81b35f0..3bc878e0 100644 --- a/cde/programs/dthelp/parser/pass1/parser/entity.c +++ b/cde/programs/dthelp/parser/pass1/parser/entity.c @@ -52,8 +52,7 @@ void m_ckmap(M_WCHAR *name, LOGICAL useoradd) /* Check type specified in entity declaration for previously defined entity. Testing to see if the new declaration is identical to the original one. */ -void m_eduptype(type) - int type ; +void m_eduptype(int type) { if ((int) m_entity->type != type) { m_err1("Redefinition of entity %s ignored", m_entity->name) ; @@ -63,8 +62,7 @@ void m_eduptype(type) } /* Tests if an entity is too long */ -void m_longent(context) - int context ; +void m_longent(int context) { if (m_entclen >= M_LITLEN) { m_curcon = context ; @@ -74,8 +72,7 @@ void m_longent(context) } /* Enters an entity name into the entity name tree */ -void m_ntrent(p) - M_WCHAR *p ; +void m_ntrent(M_WCHAR *p) { M_ENTITY *new ; diff --git a/cde/programs/dthelp/parser/pass1/parser/error.c b/cde/programs/dthelp/parser/pass1/parser/error.c index c93defc5..b2e9db8c 100644 --- a/cde/programs/dthelp/parser/pass1/parser/error.c +++ b/cde/programs/dthelp/parser/pass1/parser/error.c @@ -40,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Issue error message (no arguments) */ -void m_error(text) - char *text; +void m_error(char *text) { m_startmsg(); m_errline(text); @@ -316,9 +315,7 @@ void m_err7( /* Getline.c returns the name of the current input file and the number of the current line */ -void m_getline(file, line) - M_WCHAR **file; - int *line; +void m_getline(M_WCHAR **file, int *line) { int i; diff --git a/cde/programs/dthelp/parser/pass1/parser/input.c b/cde/programs/dthelp/parser/pass1/parser/input.c index 8c23b2f7..2a75ce3e 100644 --- a/cde/programs/dthelp/parser/pass1/parser/input.c +++ b/cde/programs/dthelp/parser/pass1/parser/input.c @@ -64,8 +64,7 @@ void m_etcomplete(void) /* M_frcend is called after a syntax error to end element VAL even if more content for that element is expected */ -void m_frcend(val) - M_ELEMENT val ; +void m_frcend(M_ELEMENT val) { M_PARSE *stackptr ; M_ELEMENT poppedval ; diff --git a/cde/programs/dthelp/parser/pass1/parser/level.c b/cde/programs/dthelp/parser/pass1/parser/level.c index ef7ad203..f79a2ccf 100644 --- a/cde/programs/dthelp/parser/pass1/parser/level.c +++ b/cde/programs/dthelp/parser/pass1/parser/level.c @@ -33,8 +33,7 @@ /* Procedure callable by interface designer. Returns number of occurrences of element on parse stack */ -int m_level(elt) - M_WCHAR *elt ; +int m_level(M_WCHAR *elt) { int i = 0 ; M_PARSE *stackptr ; @@ -48,8 +47,7 @@ int m_level(elt) } -int m_mblevel(elt) - char *elt ; +int m_mblevel(char *elt) { int retval; M_WCHAR *wc_elt; diff --git a/cde/programs/dthelp/parser/pass1/parser/lookent.c b/cde/programs/dthelp/parser/pass1/parser/lookent.c index 07c2f222..401be0b8 100644 --- a/cde/programs/dthelp/parser/pass1/parser/lookent.c +++ b/cde/programs/dthelp/parser/pass1/parser/lookent.c @@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "parser.h" #include "entext.h" -LOGICAL m_lookent(name, type, content, wheredef) - M_WCHAR *name ; - unsigned char *type ; - M_WCHAR **content ; - unsigned char *wheredef ; +LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content, + unsigned char *wheredef) { M_ENTITY *entity ; diff --git a/cde/programs/dthelp/parser/pass1/parser/minim.c b/cde/programs/dthelp/parser/pass1/parser/minim.c index 2405dcf4..9a5e82c3 100644 --- a/cde/programs/dthelp/parser/pass1/parser/minim.c +++ b/cde/programs/dthelp/parser/pass1/parser/minim.c @@ -99,11 +99,7 @@ void m_expecting(void) /* Recursive procedure first called from expecting() to display names of elements reachable from a particular node */ -void m_expexpand(expstart, node, required, data) - LOGICAL *expstart ; - M_STATE node ; - LOGICAL *required ; - LOGICAL *data ; +void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data) { M_ARC parc ; M_ANDGROUP pand ; @@ -125,10 +121,7 @@ void m_expexpand(expstart, node, required, data) } /* M_expline writes one line for m_expecting() */ -void m_expline(expstart, data, label) - LOGICAL *expstart ; - LOGICAL *data ; - M_ELEMENT label ; +void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label) { char buffer[M_NAMELEN + 2*MAXD + 1] ; @@ -165,9 +158,7 @@ void m_expline(expstart, data, label) /* M_exptend is called from m_expecting to inform the user after an error if an end tag is permitted */ -void m_exptend(expstart, stackptr) - LOGICAL *expstart ; - M_PARSE *stackptr ; +void m_exptend(LOGICAL *expstart, M_PARSE *stackptr) { char buffer[M_NAMELEN + 2*MAXD + 1] ; @@ -216,9 +207,7 @@ void m_exptend(expstart, stackptr) element, 1 if character data is expected, and 0 (FALSE) if there is no unique element. */ -M_ELEMENT m_findunique(from, newleft) - M_STATE from ; - int *newleft ; +M_ELEMENT m_findunique(M_STATE from, int *newleft) { M_ARC parc ; M_ELEMENT cr = 0, minim = 0; @@ -339,7 +328,7 @@ LOGICAL m_omitend(void) /* Tests to see if a start tag may have been omitted at this point of the parse. If so, saves the element name in the MINVAL array*/ -LOGICAL m_omitstart() +LOGICAL m_omitstart(void) { M_ELEMENT c = M_NULLVAL ; diff --git a/cde/programs/dthelp/parser/pass1/parser/optstrg.c b/cde/programs/dthelp/parser/pass1/parser/optstrg.c index f6926554..5ca84929 100644 --- a/cde/programs/dthelp/parser/pass1/parser/optstrg.c +++ b/cde/programs/dthelp/parser/pass1/parser/optstrg.c @@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "parser.h" /* Get program options from a string */ -void m_optstring(p) - char *p ; +void m_optstring(char *p) { if (strchr(p, 'a')) m_malftrace = TRUE ; if (strchr(p, 'c')) m_chtrace = TRUE ; diff --git a/cde/programs/dthelp/parser/pass1/parser/param.c b/cde/programs/dthelp/parser/pass1/parser/param.c index be6a493d..1425c489 100644 --- a/cde/programs/dthelp/parser/pass1/parser/param.c +++ b/cde/programs/dthelp/parser/pass1/parser/param.c @@ -42,8 +42,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Process the value for the parameter whose index number was previously saved in m_ppsave */ -void m_attval(string) - M_WCHAR *string ; +void m_attval(M_WCHAR *string) { const M_WCHAR *p ; @@ -65,8 +64,7 @@ void m_attval(string) /* Process a string that is a parameter value not prefixed by the parameter name and value indicator */ -LOGICAL m_attvonly(string) - M_WCHAR *string ; +LOGICAL m_attvonly(M_WCHAR *string) { const M_WCHAR *p ; int par, i ; @@ -152,8 +150,7 @@ void m_findatt(void) } /* Free the parameter storage associated with an element on the parse stack */ -void m_freeparam(stackelt) - M_PARSE *stackelt ; +void m_freeparam(M_PARSE *stackelt) { int i ; int par ; @@ -173,9 +170,7 @@ void m_freeparam(stackelt) /* Force a parameter value to uppercase, if appropriate for its type. Also, if list-valued attribute, remove leading and trailing spaces, and condense white-space sequences to a single blank*/ -void m_parupper(par, string) - int par ; - M_WCHAR *string ; +void m_parupper(int par, M_WCHAR *string) { M_WCHAR *p ; M_WCHAR *q ; @@ -233,11 +228,7 @@ void m_stkdefaultparams(void) } /* Stack one default parameter */ -void m_stkonedef(par, scanel, poccur, i) - int par ; - M_ELEMENT scanel ; - M_WCHAR **poccur ; - int i ; +void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i) { if (m_parameter[par - 1].deftype == M_REQUIRED || (m_parameter[par - 1].deftype == M_CURRENT && @@ -313,8 +304,7 @@ void m_updatedefault(const int par , const M_WCHAR *string ) /* Check to see if a string that occurs after the element name in a start tag is a valid parameter name or value; if not, assume tag is ended */ -LOGICAL m_validinpar(string) - M_WCHAR *string ; +LOGICAL m_validinpar(M_WCHAR *string) { int par ; M_WCHAR *p ; diff --git a/cde/programs/dthelp/parser/pass1/parser/parent.c b/cde/programs/dthelp/parser/pass1/parser/parent.c index e7f6217a..aaf8fc2f 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parent.c +++ b/cde/programs/dthelp/parser/pass1/parser/parent.c @@ -34,8 +34,7 @@ /* Procedure callable by interface designers. Returns pointer to name of nth level parent of current element (0 is self, 1 is parent, 2 is grandparent, etc.) */ -M_WCHAR *m_parent(n) - int n ; +M_WCHAR *m_parent(int n) { M_PARSE *stackptr ; diff --git a/cde/programs/dthelp/parser/pass1/parser/parser.c b/cde/programs/dthelp/parser/pass1/parser/parser.c index 9c766429..1a28b615 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parser.c +++ b/cde/programs/dthelp/parser/pass1/parser/parser.c @@ -36,9 +36,7 @@ #include "entext.h" /* Main procedure */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { static char parserr[] = "\nM_token=%d, m_prevcon=%d, m_scanval=%d\n" ; static char sopt[] = diff --git a/cde/programs/dthelp/parser/pass1/parser/parutil.c b/cde/programs/dthelp/parser/pass1/parser/parutil.c index d388d083..65087f69 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parutil.c +++ b/cde/programs/dthelp/parser/pass1/parser/parutil.c @@ -87,7 +87,7 @@ M_ELEMENT m_eltname(void) } } -int get_mb_cur_max() +int get_mb_cur_max(void) { char *l; int i; diff --git a/cde/programs/dthelp/parser/pass1/parser/pi.c b/cde/programs/dthelp/parser/pass1/parser/pi.c index a51a90d1..bd74454a 100644 --- a/cde/programs/dthelp/parser/pass1/parser/pi.c +++ b/cde/programs/dthelp/parser/pass1/parser/pi.c @@ -38,10 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* When a processing instruction or SDATA entity other than a CODE entity occurs */ -void m_piaction(m_pi, m_entname, m_enttype) - M_WCHAR *m_pi ; - M_WCHAR *m_entname ; - int m_enttype ; +void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype) { m_stackpar = m_stacktop->piparam ; (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ; diff --git a/cde/programs/dthelp/parser/pass1/parser/scan.c b/cde/programs/dthelp/parser/pass1/parser/scan.c index 0e9c8fe1..bc20a3b7 100644 --- a/cde/programs/dthelp/parser/pass1/parser/scan.c +++ b/cde/programs/dthelp/parser/pass1/parser/scan.c @@ -62,8 +62,7 @@ int m_actgetc(void) } /* Expand an entity reference */ -void m_entexpand(openent) - M_ENTITY *openent ; +void m_entexpand(M_ENTITY *openent) { M_WCHAR *p ; M_HOLDTYPE dchar ; @@ -231,9 +230,7 @@ void m_entexpand(openent) /* An srlen-character long short-reference delimiter has been found. Verify that it is not the prefix of a general delimiter recognized in context*/ -LOGICAL m_gendelim(srlen, context) - int srlen ; - int context ; +LOGICAL m_gendelim(int srlen, int context) { int ghold[MAXD + 1] ; int ucase ; @@ -321,8 +318,7 @@ LOGICAL m_gendelim(srlen, context) /* Reads next input character from the current source file or from an entity expansion */ -int m_getachar(dchar) - M_HOLDTYPE *dchar ; +int m_getachar(M_HOLDTYPE *dchar) { int c ; int i ; @@ -424,10 +420,7 @@ void m_getname(M_WCHAR first) } /* Reads the next token */ -int m_gettoken(c, dchar, context) - int *c ; - M_HOLDTYPE *dchar ; - int context ; +int m_gettoken(int *c, M_HOLDTYPE *dchar, int context) { int hold[MAXD + 1], next ; int ucase ; @@ -551,8 +544,7 @@ int m_gettoken(c, dchar, context) } /* Reads a literal */ -void m_litproc(delim) - int delim ; +void m_litproc(int delim) { int n, i ; M_HOLDTYPE dchar ; @@ -883,8 +875,7 @@ void m_setmap(int map, LOGICAL useoradd) } /* Check for short reference delimiters */ -void m_shortref(context) -int context ; +void m_shortref(int context) { int n = 0 ; int i ; diff --git a/cde/programs/dthelp/parser/pass1/parser/setpar.c b/cde/programs/dthelp/parser/pass1/parser/setpar.c index be3c66bd..6eef9fe5 100644 --- a/cde/programs/dthelp/parser/pass1/parser/setpar.c +++ b/cde/programs/dthelp/parser/pass1/parser/setpar.c @@ -35,9 +35,7 @@ #include "parser.h" /* Set a user-defined C variable to the corresponding parameter value */ -void m_setparam(cvar, par) - M_WCHAR **cvar ; - int par ; +void m_setparam(M_WCHAR **cvar, int par) { *cvar = m_stackpar->param[par] ; } diff --git a/cde/programs/dthelp/parser/pass1/parser/start.c b/cde/programs/dthelp/parser/pass1/parser/start.c index 07da69f1..4dace66c 100644 --- a/cde/programs/dthelp/parser/pass1/parser/start.c +++ b/cde/programs/dthelp/parser/pass1/parser/start.c @@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "sfile.c" /* Perform the m_action-th start-code in the interface */ -void m_strtcase(m_action) - int m_action ; +void m_strtcase(int m_action) { (*m_stable[m_action])() ; } diff --git a/cde/programs/dthelp/parser/pass1/parser/struct.c b/cde/programs/dthelp/parser/pass1/parser/struct.c index c261567c..14397638 100644 --- a/cde/programs/dthelp/parser/pass1/parser/struct.c +++ b/cde/programs/dthelp/parser/pass1/parser/struct.c @@ -46,8 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively if the element is allowed by content, not allowed, or allowed by an inclusion exception. */ -int m_checkstart(val) - M_ELEMENT val ; +int m_checkstart(M_ELEMENT val) { M_PARSE *stackptr ; int except ; @@ -238,8 +237,7 @@ void m_done(void) } /* Process the endtag (implied, abbreviated, or explicit) for element C*/ -void m_endtag(c) - M_ELEMENT c ; +void m_endtag(M_ELEMENT c) { m_endaction(c) ; m_pop() ; @@ -251,8 +249,7 @@ void m_endtag(c) /* Check that the identified element is not prohibited in the current context by an exclusion exception */ -LOGICAL m_excluded(elt) - M_ELEMENT elt ; +LOGICAL m_excluded(M_ELEMENT elt) { M_PARSE *stackptr ; int except ; @@ -270,8 +267,7 @@ LOGICAL m_excluded(elt) /* Free the OPEN FSA substructures associated with an element on the parse stack */ -void m_freeFSA(stackelt) - M_PARSE *stackelt ; +void m_freeFSA(M_PARSE *stackelt) { M_OPENFSA *fsastack ; M_ANDLIST *usedand ; @@ -290,9 +286,7 @@ void m_freeFSA(stackelt) } /* Free storage used for tentative chain of tag minimizations */ -void m_freemin(min, msg) - M_MIN *min ; - char *msg ; +void m_freemin(M_MIN *min, char *msg) { M_MIN *discard ; @@ -307,9 +301,7 @@ void m_freemin(min, msg) in the current content model by starting a new submodel of the and-group indicated by fsastack, or (if the and-group is within a seq-group) by continuing past the and-group */ -LOGICAL m_nextand(thisfsa, label) - M_OPENFSA *thisfsa ; - M_ELEMENT label ; +LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label) { M_ANDLIST *newgroup ; M_ANDGROUP pand ; @@ -461,8 +453,7 @@ void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need) character is treated differently so that if character data is not allowed in the current context, an error message is issued with the first character only and not with every character. */ -void m_strtcdata(scanval) - int scanval ; +void m_strtcdata(int scanval) { if (! m_strtproc(M_NULLVAL)) if (m_whitespace((M_WCHAR) scanval)) { @@ -493,8 +484,7 @@ void m_strtcdata(scanval) to an element that was within #PCDATA, m_strtproc saves the current context and restores it after returning from the last call to m_endtag.) */ -LOGICAL m_strtproc(scanval) - M_ELEMENT scanval ; +LOGICAL m_strtproc(M_ELEMENT scanval) { int check ; M_PARSE *original ; diff --git a/cde/programs/dthelp/parser/pass1/util/context.c b/cde/programs/dthelp/parser/pass1/util/context.c index 3d13a502..e7185ce8 100644 --- a/cde/programs/dthelp/parser/pass1/util/context.c +++ b/cde/programs/dthelp/parser/pass1/util/context.c @@ -167,9 +167,7 @@ delim.h. #include "cont.h" /* Main procedure */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { int n ; diff --git a/cde/programs/dthelp/parser/pass1/util/conutil.c b/cde/programs/dthelp/parser/pass1/util/conutil.c index d83aa0a8..4fbdada5 100644 --- a/cde/programs/dthelp/parser/pass1/util/conutil.c +++ b/cde/programs/dthelp/parser/pass1/util/conutil.c @@ -81,8 +81,7 @@ void dumptree(LOGICAL sparse) } /* Enter a delimiter into the delimiter tree for a particular context */ -void enterdelim(n) - int n; +void enterdelim(int n) { if (! contree[n]) { @@ -107,8 +106,7 @@ if (m_ntrtrie(dstruct->string, } /* Read the code to be executed with a given state transition */ -void getcode(n) -int n; +void getcode(int n) { int c ; /* c is int instead of char for use with ungetc */ int nested = 1; @@ -616,8 +614,7 @@ void nextcon(LOGICAL sparse) /* If sparse matrix output option, generate a single element of transit array */ -void prtctxt(column, value) - int column, value; +void prtctxt(int column, int value) { static LOGICAL first = TRUE; @@ -652,8 +649,7 @@ void skiptoend(void) } /* Return a character to the input stream for re-reading */ -void unread(c) -int c; +void unread(int c) { M_WCHAR wnl; diff --git a/cde/programs/dthelp/parser/pass1/util/entout.c b/cde/programs/dthelp/parser/pass1/util/entout.c index 5a50fb66..793a0896 100644 --- a/cde/programs/dthelp/parser/pass1/util/entout.c +++ b/cde/programs/dthelp/parser/pass1/util/entout.c @@ -49,8 +49,7 @@ char xerror[] = "ERROR" ; /* Outputs entity definitions */ #define ENTFILENAME 12 -void entout(fname) - char *fname ; +void entout(char *fname) { char efilename[ENTFILENAME] ; int count = 1 ; @@ -173,15 +172,13 @@ void entout(fname) /* Entptr is called by m_dumptrie to output the value stored with a particular entity in the entity trie */ -void entptr(data) - M_ENTITY *data ; +void entptr(M_ENTITY *data) { fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ; } /* Typetype returns a string indicating the type of the nth entity.*/ -char *typetype(n) - int n ; +char *typetype(int n) { switch(n) { case M_GENERAL: return(xgeneral) ; diff --git a/cde/programs/dthelp/parser/pass1/util/error.c b/cde/programs/dthelp/parser/pass1/util/error.c index aa1f2a0c..c9061fae 100644 --- a/cde/programs/dthelp/parser/pass1/util/error.c +++ b/cde/programs/dthelp/parser/pass1/util/error.c @@ -83,16 +83,14 @@ void eprefix(LOGICAL flag) /* Writes part of an error message. Called from m_malloc instead of m_err1, since PARSER's version of m_err1 calls m_malloc and recursive calls are possible when the heap is exhausted */ -void m_errline(text) -char *text ; +void m_errline(char *text) { fputs(text, stderr) ; fputs(text, m_errfile) ; } /* Writes an error message to standard error and file "error" */ -void m_error(text) - char *text ; +void m_error(char *text) { eprefix(TRUE) ; fprintf(stderr,"%s", text) ; @@ -192,30 +190,26 @@ void esuffix(void) } /* Print something to both stderr and m_errfile */ -void msgline(text) - char *text ; +void msgline(char *text) { fprintf(stderr, "%s", text) ; fprintf(m_errfile, "%s", text) ; } /* Print something to both stderr and m_errfile */ -void msg1line(text, arg1) - char *text, *arg1 ; +void msg1line(char *text, char *arg1) { fprintf(stderr, text, arg1) ; fprintf(m_errfile, text, arg1) ; } /* Trace used for m_malloc trace output */ -void m_trace(text) -char *text ; +void m_trace(char *text) { m_errline(text) ; } -void m_wctrace(text) -M_WCHAR *text ; +void m_wctrace(M_WCHAR *text) { char *mb_text; @@ -225,8 +219,7 @@ m_free(mb_text,"multi-byte string"); } /* Writes a nonfatal error message to standard error and file "error" */ -void warning(text) - char *text ; +void warning(char *text) { eprefix(FALSE) ; fprintf(stderr,"%s", text) ; diff --git a/cde/programs/dthelp/parser/pass1/util/exit.c b/cde/programs/dthelp/parser/pass1/util/exit.c index 541a6590..2a2ae08b 100644 --- a/cde/programs/dthelp/parser/pass1/util/exit.c +++ b/cde/programs/dthelp/parser/pass1/util/exit.c @@ -31,8 +31,7 @@ void m_exit(int status); /* Exit function called by utilities used in PARSER and other programs in the MARKUP system */ -void m_exit(status) - int status ; +void m_exit(int status) { exit(status) ; } diff --git a/cde/programs/dthelp/parser/pass1/util/fclndir.c b/cde/programs/dthelp/parser/pass1/util/fclndir.c index e7c0005e..eb0dcebf 100644 --- a/cde/programs/dthelp/parser/pass1/util/fclndir.c +++ b/cde/programs/dthelp/parser/pass1/util/fclndir.c @@ -61,9 +61,7 @@ void copyfile(char *pfile1, char *pfile2); int nextchar(FILE *file, struct data *data); -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { FILE *one, *two ; int c1, c2 ; @@ -110,8 +108,7 @@ int main(argc, argv) } /* copyfile inserted by ced, 12-1-89. */ -void copyfile(pfile1,pfile2) - char *pfile1, *pfile2; +void copyfile(char *pfile1, char *pfile2) { int ret; char *pcmd; @@ -128,9 +125,7 @@ void copyfile(pfile1,pfile2) free(pcmd); } -int nextchar(file, data) - FILE *file ; - struct data *data ; +int nextchar(FILE *file, struct data *data) { while (data->linestart) { data->linestart = FALSE ; diff --git a/cde/programs/dthelp/parser/pass1/util/inctest.c b/cde/programs/dthelp/parser/pass1/util/inctest.c index ac45e68b..75663b87 100644 --- a/cde/programs/dthelp/parser/pass1/util/inctest.c +++ b/cde/programs/dthelp/parser/pass1/util/inctest.c @@ -34,10 +34,7 @@ void m_exit(int status); void m_inctest(int *count, int limit, char *message); /* Increment a count and test against a limit */ -void m_inctest(count, limit, message) - int *count ; - int limit ; - char *message ; +void m_inctest(int *count, int limit, char *message) { if (++*count <= limit) return ; m_err1("Internal error: %s exceeded", message) ; diff --git a/cde/programs/dthelp/parser/pass1/util/itoa.c b/cde/programs/dthelp/parser/pass1/util/itoa.c index 9a4e0d95..51de1f70 100644 --- a/cde/programs/dthelp/parser/pass1/util/itoa.c +++ b/cde/programs/dthelp/parser/pass1/util/itoa.c @@ -31,9 +31,7 @@ char *m_itoa(int n, char *s); void reverse(char *s); -char *m_itoa(n, s) /* convert n to characters in s */ -char s[]; -int n; +char *m_itoa(int n, char *s) /* convert n to characters in s */ { int sign ; char *p = s ; @@ -51,8 +49,7 @@ int n; return(s) ; } -void reverse(s) -char s[]; +void reverse(char s[]) { int c, i, j; diff --git a/cde/programs/dthelp/parser/pass1/util/lower.c b/cde/programs/dthelp/parser/pass1/util/lower.c index 8dbf041a..af4fedf2 100644 --- a/cde/programs/dthelp/parser/pass1/util/lower.c +++ b/cde/programs/dthelp/parser/pass1/util/lower.c @@ -32,8 +32,7 @@ int m_lower(int c); /* Force a letter to lowercase */ -int m_lower(c) - int c ; +int m_lower(int c) { if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ; return(c) ; diff --git a/cde/programs/dthelp/parser/pass1/util/malloc.c b/cde/programs/dthelp/parser/pass1/util/malloc.c index 1d036af2..b574fafd 100644 --- a/cde/programs/dthelp/parser/pass1/util/malloc.c +++ b/cde/programs/dthelp/parser/pass1/util/malloc.c @@ -49,9 +49,7 @@ void *m_trace(char *text); void *m_wctrace(M_WCHAR *text); -void m_free(block, msg) - void *block ; - char *msg ; +void m_free(void *block, char *msg) { char buffer[32] ; @@ -71,9 +69,7 @@ void m_free(block, msg) free(block) ; } -void *m_malloc(size, msg) - int size ; - char *msg ; +void *m_malloc(int size, char *msg) { char buffer[32] ; void *p ; @@ -105,10 +101,7 @@ void *m_malloc(size, msg) return(p) ; } -void *m_realloc(ptr, size, msg) - void *ptr ; - int size ; - char *msg ; +void *m_realloc(void *ptr, int size, char *msg) { char buffer[32] ; void *p ; diff --git a/cde/programs/dthelp/parser/pass1/util/openchk.c b/cde/programs/dthelp/parser/pass1/util/openchk.c index ecf3ab40..935aefb7 100644 --- a/cde/programs/dthelp/parser/pass1/util/openchk.c +++ b/cde/programs/dthelp/parser/pass1/util/openchk.c @@ -35,9 +35,7 @@ void m_exit(int status); void m_openchk(FILE **ptr, char *name, char *mode); /* Open a file and check that the open succeeded */ -void m_openchk(ptr, name, mode) - FILE **ptr ; - char *name, *mode ; +void m_openchk(FILE **ptr, char *name, char *mode) { *ptr = fopen(name, mode) ; if (*ptr) return ; diff --git a/cde/programs/dthelp/parser/pass1/util/scanutil.c b/cde/programs/dthelp/parser/pass1/util/scanutil.c index e3100503..86d9def3 100644 --- a/cde/programs/dthelp/parser/pass1/util/scanutil.c +++ b/cde/programs/dthelp/parser/pass1/util/scanutil.c @@ -72,9 +72,7 @@ return((int) wc); } /* Reads the next token stored in a packed trie (as defined by context.dat) */ -int gettoken(c, context) -int *c; -int context; +int gettoken(int *c, int context) { int hold[MAXD + 1]; int ucase; @@ -123,8 +121,7 @@ return(M_NULLVAL); } /* Reads a literal (called after the opening quotation mark is read) */ -LOGICAL litproc(delim) -int delim; +LOGICAL litproc(int delim) { int n, i, number; M_WCHAR *p, *pStart; /* bigger than wide versions of lit or lita */ @@ -215,8 +212,7 @@ return(FALSE); /* Returns a context-dependent delimiter string to input stream so characters can be reread one at a time in another context */ -void undodelim(delim) -M_WCHAR *delim; +void undodelim(M_WCHAR *delim) { M_WCHAR *p; @@ -234,8 +230,7 @@ while (TRUE) /* Returns a character to the input stream to read again later. Unexplained problems occurred using standard ungetc procedure; hence explicit declaration of buffer for read-ahead characters */ -void ungetachar(c) -int c; +void ungetachar(int c) { M_WCHAR wnl; diff --git a/cde/programs/dthelp/parser/pass1/util/sparse.c b/cde/programs/dthelp/parser/pass1/util/sparse.c index b831fbf7..c6a67f0e 100644 --- a/cde/programs/dthelp/parser/pass1/util/sparse.c +++ b/cde/programs/dthelp/parser/pass1/util/sparse.c @@ -25,8 +25,7 @@ /* Sparse.c has a procedure used with the tables generated by program CONTEXT when the sparse option is used */ -int m_sprscon(i, j) - int i, j ; +int m_sprscon(int i, int j) { int k ; diff --git a/cde/programs/dthelp/parser/pass1/util/trie.c b/cde/programs/dthelp/parser/pass1/util/trie.c index 81300d5b..4d91891b 100644 --- a/cde/programs/dthelp/parser/pass1/util/trie.c +++ b/cde/programs/dthelp/parser/pass1/util/trie.c @@ -117,10 +117,7 @@ void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie ) } /* Enters a string and associated data value into a trie */ -void *m_ntrtrie(p, xtrie, dataval) - M_WCHAR *p ; - M_TRIE *xtrie ; - void *dataval ; +void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval) { M_TRIE *currentnode ; void *n ; diff --git a/cde/programs/dthelp/parser/pass1/util/triecnt.c b/cde/programs/dthelp/parser/pass1/util/triecnt.c index a4d256f5..2899ff74 100644 --- a/cde/programs/dthelp/parser/pass1/util/triecnt.c +++ b/cde/programs/dthelp/parser/pass1/util/triecnt.c @@ -40,9 +40,7 @@ void printval(FILE *file, void *value); /* Count the descendants of a node in order to generate declarations for the packed form of a trie*/ -void countdown(parent, count) - M_TRIE *parent ; - int *count ; +void countdown(M_TRIE *parent, int *count) { M_TRIE *child ; @@ -54,12 +52,8 @@ void countdown(parent, count) /* Output descendants of a node for the declaration of a trie, in packed or normal format*/ -void dumpnode(first, file, trieptr, count, proc) - LOGICAL *first ; - FILE *file ; - M_TRIE *trieptr ; - int *count ; - void (*proc) (FILE *file, void *value); +void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, + void (*proc) (FILE *file, void *value)) { M_TRIE *p ; int savecount ; @@ -89,9 +83,7 @@ void dumpnode(first, file, trieptr, count, proc) /* Most common procedure passed to dumpptrie */ -void printval(file, value) - FILE *file ; - void *value ; +void printval(FILE *file, void *value) { fprintf(file, ", %ld", (long) value) ; } diff --git a/cde/programs/dthelp/parser/pass1/util/triedump.c b/cde/programs/dthelp/parser/pass1/util/triedump.c index 4a16ceff..e137eaf5 100644 --- a/cde/programs/dthelp/parser/pass1/util/triedump.c +++ b/cde/programs/dthelp/parser/pass1/util/triedump.c @@ -35,12 +35,8 @@ void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(void *value)); /* Write the C declaration of a trie */ -void m_dumptrie(file, xtrie, extname, count, proc) - FILE *file ; - M_TRIE *xtrie ; - char *extname ; - int *count ; - void (*proc)(void *value); +void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, + void (*proc)(void *value)) { int firstson ; M_TRIE *p ; diff --git a/cde/programs/dthelp/parser/pass1/util/triepdmp.c b/cde/programs/dthelp/parser/pass1/util/triepdmp.c index 2b2e72e6..e18f9200 100644 --- a/cde/programs/dthelp/parser/pass1/util/triepdmp.c +++ b/cde/programs/dthelp/parser/pass1/util/triepdmp.c @@ -38,13 +38,9 @@ void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char void (*proc)(FILE *file, void *value)); /* Write the declaration of a packed trie to the specified files */ -void dumpptrie(intname, extname, file, externdef, defdef, proc) - M_TRIE *intname ; - char *extname ; - FILE *file ; - char *externdef ; - char *defdef ; - void (*proc) (FILE *file, void *value); +void dumpptrie(M_TRIE *intname, char *extname, FILE *file, + char *externdef, char *defdef, + void (*proc) (FILE *file, void *value)) { LOGICAL first = TRUE ; int count = 0 ; diff --git a/cde/programs/dthelp/parser/pass1/util/trieplk.c b/cde/programs/dthelp/parser/pass1/util/trieplk.c index 129a8652..d0706f45 100644 --- a/cde/programs/dthelp/parser/pass1/util/trieplk.c +++ b/cde/programs/dthelp/parser/pass1/util/trieplk.c @@ -40,9 +40,7 @@ int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name); /* Look for the string NAME in the packed trie PTRIE */ -int m_packedlook(xptrie, name) -M_PTRIE *xptrie ; -M_WCHAR *name ; +int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name) { int current = 0 ; int i ; diff --git a/cde/programs/dthelp/parser/pass1/util/trierset.c b/cde/programs/dthelp/parser/pass1/util/trierset.c index 3a9fa97c..b2f91d07 100644 --- a/cde/programs/dthelp/parser/pass1/util/trierset.c +++ b/cde/programs/dthelp/parser/pass1/util/trierset.c @@ -33,10 +33,7 @@ extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; /* Changes the value associated with an entry in a trie. */ -void *m_resettrie(xtrie, p, value) - M_TRIE *xtrie ; - M_WCHAR *p ; - void *value ; +void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value) { M_TRIE *currentnode ; diff --git a/cde/programs/dthelp/parser/pass1/util/wchar.c b/cde/programs/dthelp/parser/pass1/util/wchar.c index 4d2167f3..c1ca8f1f 100644 --- a/cde/programs/dthelp/parser/pass1/util/wchar.c +++ b/cde/programs/dthelp/parser/pass1/util/wchar.c @@ -214,8 +214,7 @@ return wc_stringStart; /* Get-wide-char procedure */ -int mb_getwc(m_ptr) -void *m_ptr; +int mb_getwc(void *m_ptr) { int c; M_WCHAR wc; diff --git a/cde/programs/dthelp/parser/pass2/build/build.c b/cde/programs/dthelp/parser/pass2/build/build.c index a44fb297..d0117c2c 100644 --- a/cde/programs/dthelp/parser/pass2/build/build.c +++ b/cde/programs/dthelp/parser/pass2/build/build.c @@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entdef.h" /* Main procedure */ -int main(argc, argv) -int argc ; -char **argv ; +int main(int argc, char **argv) { int m_prevcon ; diff --git a/cde/programs/dthelp/parser/pass2/build/buildutl.c b/cde/programs/dthelp/parser/pass2/build/buildutl.c index 46692d6d..ceb614cf 100644 --- a/cde/programs/dthelp/parser/pass2/build/buildutl.c +++ b/cde/programs/dthelp/parser/pass2/build/buildutl.c @@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Verify that , or has not previously occurred in this rule */ -void found(flag, delim) -LOGICAL *flag; -char *delim; +void found(LOGICAL *flag, char *delim) { M_WCHAR wcbuff[129]; ssize_t length; diff --git a/cde/programs/dthelp/parser/pass2/build/eltree.c b/cde/programs/dthelp/parser/pass2/build/eltree.c index fadf193b..c78a5ad0 100644 --- a/cde/programs/dthelp/parser/pass2/build/eltree.c +++ b/cde/programs/dthelp/parser/pass2/build/eltree.c @@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "build.h" /* Enters an element name into the element name tree */ -ELTSTRUCT *ntrelt(p) - M_WCHAR *p ; +ELTSTRUCT *ntrelt(M_WCHAR *p) { ELTSTRUCT *new ; ELTSTRUCT *old ; diff --git a/cde/programs/dthelp/parser/pass2/build/fsa.c b/cde/programs/dthelp/parser/pass2/build/fsa.c index b15c4b21..dd9cda1b 100644 --- a/cde/programs/dthelp/parser/pass2/build/fsa.c +++ b/cde/programs/dthelp/parser/pass2/build/fsa.c @@ -58,11 +58,8 @@ int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL opti /*checkand is used to verify nondeterminism from start and final states of FSA's generated from and groups*/ -void checkand(andstart, andptr, start, root, errelt) - ANDGROUP *andstart, *andptr ; - STATE *start ; - TREE *root ; - ELTSTRUCT **errelt ; +void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, + TREE *root, ELTSTRUCT **errelt) { ARC *parc ; ANDGROUP *pand ; @@ -86,12 +83,8 @@ void checkand(andstart, andptr, start, root, errelt) /*Checkdfsa is called when adding an arc to an FSA in order to verify that no existing arc from the same state (or from a start state of an and-group FSA labelling an arc from the same state) has the same label. */ -int checkdfsa(from, label, and, id, errelt) - STATE *from ; - ELTSTRUCT *label ; - ANDGROUP *and ; - int id ; - ELTSTRUCT **errelt ; +int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, + ELTSTRUCT **errelt) { int c ; ARC *parc ; @@ -116,10 +109,7 @@ int checkdfsa(from, label, and, id, errelt) } /* Check use of repeated models with and groups */ -int checkrepeat(from, and, errelt) - STATE *from ; - ANDGROUP *and ; - ELTSTRUCT **errelt ; +int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt) { ARC *parc ; int c ; @@ -142,8 +132,7 @@ int checkrepeat(from, and, errelt) } /* Copyintolist copies one list of states into another */ -void copyintolist(from, to) - STATELIST *from, **to ; +void copyintolist(STATELIST *from, STATELIST **to) { STATELIST **new, *old ; @@ -161,8 +150,7 @@ void copyintolist(from, to) } /* Dellist deletes a list of states */ -void dellist(list) - STATELIST **list ; +void dellist(STATELIST **list) { STATELIST *p, *q ; @@ -220,10 +208,7 @@ STATE *getstate(void) } /* Makeand processes a submodel whose connector is & */ -void makeand(canbenull, root, optional) - LOGICAL *canbenull ; - TREE *root ; - int optional ; +void makeand(LOGICAL *canbenull, TREE *root, int optional) { TREE *child ; STATELIST *start, *final ; @@ -308,9 +293,7 @@ void makeand(canbenull, root, optional) allfinal is passed from model to submodel; information in newfinal goes from submodel to model. */ -LOGICAL makefsa(root, optional) - TREE *root ; - int optional ; +LOGICAL makefsa(TREE *root, int optional) { LOGICAL canbenull ; @@ -344,9 +327,7 @@ LOGICAL makefsa(root, optional) } /* Makeor processes a submodel whose connector is | */ -void makeor(canbenull, root) - LOGICAL *canbenull ; - TREE *root ; +void makeor(LOGICAL *canbenull, TREE *root) { TREE *child ; STATELIST *final ; @@ -368,10 +349,7 @@ void makeor(canbenull, root) } /* Makeseq processes a submodel whose connector is , */ -void makeseq(canbenull, root, optional) - LOGICAL *canbenull ; - TREE *root ; - int optional ; +void makeseq(LOGICAL *canbenull, TREE *root, int optional) { LOGICAL branchnull ; STATELIST *keepfinal = NULL, *final ; @@ -409,10 +387,7 @@ void makeseq(canbenull, root, optional) /* Nondeterm issues a diagnostic when a nondeterministic model is encountered */ -void nondeterm(root, c, eltp) - TREE *root ; - int c ; - ELTSTRUCT *eltp ; +void nondeterm(TREE *root, int c, ELTSTRUCT *eltp) { M_WCHAR *wtemp; @@ -443,8 +418,7 @@ void nondeterm(root, c, eltp) /* Notinlist returns TRUE iff item is not in list. If item is in list, it makes sure that the stored nesting level is the smaller of the two */ -LOGICAL notinlist(item, list) - STATELIST *item, *list ; +LOGICAL notinlist(STATELIST *item, STATELIST *list) { for ( ; list ; list = list->next) if (list->value == item->value) { @@ -456,8 +430,7 @@ LOGICAL notinlist(item, list) /* Returns true if the arc is labeled #PCDATA or with an and-group that has an arc labelled #PCDATA from a start state */ -LOGICAL permitspcd(a) - ARC *a ; +LOGICAL permitspcd(ARC *a) { ANDGROUP *pand ; ARC *b ; @@ -507,8 +480,7 @@ void push(void) /* Regenerate is used in error processing to print the portion of a grammar rule preceding an error */ -LOGICAL regenerate(start, stop) -TREE *start, *stop ; +LOGICAL regenerate(TREE *start, TREE *stop) { TREE *child ; @@ -554,8 +526,7 @@ return(FALSE) ; by adding arcs from all the final states to all the states reachable in one transition from a start state, labelling them as arcs from start states are labelled. */ -void repeat(root) - TREE *root ; +void repeat(TREE *root) { STATELIST *final ; ARC *a ; @@ -606,9 +577,7 @@ void repeat(root) /* Used during processing of occurrence indicators in content models such as (a+)+ to prohibit duplicate arcs */ -LOGICAL samelabelarc(a, s) - ARC *a ; - STATE *s ; +LOGICAL samelabelarc(ARC *a, STATE *s) { ARC *b ; @@ -666,11 +635,8 @@ void savestartarcs(void) /* Simplebranch adds a new state and transition to it in an FSA when a submodel consists of a single element or of an and group */ -void simplebranch(root, value, group, optional) - TREE *root ; - ELTSTRUCT *value ; - ANDGROUP *group ; - int optional ; +void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, + int optional) { STATE *new = NULL ; STATELIST *index ; @@ -718,9 +684,7 @@ void simplebranch(root, value, group, optional) subtree in the tree representing the grammar rule being processed and the pointer to a flag that is set to indicate whether or not the submodel can be null. */ -STATE *startfsa(root, canbenull) - TREE *root ; - LOGICAL *canbenull ; +STATE *startfsa(TREE *root, LOGICAL *canbenull) { STATELIST *item ; STATE *first ; diff --git a/cde/programs/dthelp/parser/pass2/build/out.c b/cde/programs/dthelp/parser/pass2/build/out.c index a051387f..17183153 100644 --- a/cde/programs/dthelp/parser/pass2/build/out.c +++ b/cde/programs/dthelp/parser/pass2/build/out.c @@ -69,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ; /* Deftype returns a string indicating the default type of the nth parameter. */ -char *deftype(n) - int n ; +char *deftype(int n) { switch (n) { case NAME: return(mnamedef) ; @@ -101,9 +100,7 @@ void done(void) } /* Prints data value of an entry in the element name tree */ -void dumpentnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpentnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ; @@ -111,9 +108,7 @@ void dumpentnode(file, value) /* Prints data value of an entry in the trie of short reference map names, reporting any maps that are referenced but not defined */ -void dumpmapnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpmapnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((MAP *) value)->map) ; if (! ((MAP *) value)->defined) @@ -123,9 +118,7 @@ void dumpmapnode(file, value) /* Prints data value of an entry in the trie of short reference delimiters */ -void dumpsrefnode(file, value) - FILE *file ; - M_TRIE *value ; +void dumpsrefnode(FILE *file, M_TRIE *value) { fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ; } @@ -133,8 +126,7 @@ void dumpsrefnode(file, value) /* Controls printing of element blocks in alphabetical order to the template file */ -void eltblocks(tempfile) - FILE *tempfile ; +void eltblocks(FILE *tempfile) { int n ; M_TRIE *node[M_NAMELEN + 1] ; @@ -223,8 +215,7 @@ void eltreeout(void) } /* Enttype returns a string indicating the type of an entity */ -char *enttype(n) - int n ; +char *enttype(int n) { switch(n) { case M_GENERAL: return(mgeneral) ; @@ -452,8 +443,7 @@ fprintf(dtd, "#define M_MAXPAR %d\n\n", maxpar) ; } /* Partype returns a string indicating the type of the nth parameter. */ -char *partype(n) - int n ; +char *partype(int n) { switch(n) { case GRPO: return(mkeyword) ; @@ -546,9 +536,7 @@ void srefout(void) } /* Output one element block in a template */ -void tempelt(eltp, tempfile) -ELTSTRUCT *eltp ; -FILE *tempfile ; +void tempelt(ELTSTRUCT *eltp, FILE *tempfile) { PARAMETER *paramp ; PTYPE *ptypep ; @@ -658,8 +646,7 @@ void template(void) } /* Typecon returns a string indicating the content type of the nth element.*/ -char *typecon(n) - int n ; +char *typecon(int n) { switch(n) { case GRPO: return(mregexp) ; diff --git a/cde/programs/dthelp/parser/pass2/build/scan.c b/cde/programs/dthelp/parser/pass2/build/scan.c index c6838ebb..dc4c118d 100644 --- a/cde/programs/dthelp/parser/pass2/build/scan.c +++ b/cde/programs/dthelp/parser/pass2/build/scan.c @@ -38,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "sref.h" /* Reads a name */ -LOGICAL getname(first) - int first; +LOGICAL getname(int first) { M_WCHAR *p; int c; diff --git a/cde/programs/dthelp/parser/pass2/build/sref.c b/cde/programs/dthelp/parser/pass2/build/sref.c index 795d846f..a38fa842 100644 --- a/cde/programs/dthelp/parser/pass2/build/sref.c +++ b/cde/programs/dthelp/parser/pass2/build/sref.c @@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL; /* Add an entity with the default name constructed by adding a suffix to the name of the short reference map in which it is invoked, and a prefix m- */ -void adddefent(mapname) -M_WCHAR *mapname; +void adddefent(M_WCHAR *mapname) { M_WCHAR *p; int n; @@ -75,8 +74,7 @@ thissref->entidx = entity->index; /* Add an entity, return FALSE if already there, TRUE if adding it. Pointer to the entity structure is in global M_STRUCT *entity. */ -LOGICAL addent(name) -M_WCHAR *name; +LOGICAL addent(M_WCHAR *name) { M_ENTITY *new; @@ -128,16 +126,14 @@ return(TRUE); } /* Add a named entity to a short reference map */ -void addndent(p) -M_WCHAR *p; +void addndent(M_WCHAR *p) { addent(p); thissref->entidx = entity->index; } /* Add a short reference delimiter */ -void addsref(p) -M_WCHAR *p; +void addsref(M_WCHAR *p) { SREFSTRUCT *delim; SREFSTRUCT *prevsr; diff --git a/cde/programs/dthelp/parser/pass2/build/tree.c b/cde/programs/dthelp/parser/pass2/build/tree.c index bf1dd249..6988410f 100644 --- a/cde/programs/dthelp/parser/pass2/build/tree.c +++ b/cde/programs/dthelp/parser/pass2/build/tree.c @@ -44,8 +44,7 @@ void endmodel(void) } /* Release storage used for the tree representation of a rule */ -void freetree(treep) - TREE *treep ; +void freetree(TREE *treep) { TREE *child, *discard ; diff --git a/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c b/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c index f59e5801..b92ce7de 100644 --- a/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c +++ b/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c @@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entity.h" /* Main program */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { int m_token ; diff --git a/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c b/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c index 3a63e5c7..c7d0a24d 100644 --- a/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c +++ b/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c @@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "version.h" /* Output indicated action pointer array to if.h */ -void actptrout(array, name) - ACTION **array; - char *name; +void actptrout(ACTION **array, char *name) { int i; @@ -267,8 +265,7 @@ void endstring(void) /* Set the type of an entity and check if different than declaration in BUILD */ -void enttype(type) - int type; +void enttype(int type) { if ((entity->type == M_PI && type == M_CODEPI) || (entity->type == M_SDATA && type == M_CODESDATA)); @@ -294,8 +291,7 @@ void freechain(void) /* Returns pointer to data field in action node for current chain of elements */ -int *getaction(array) - ACTION **array; +int *getaction(ACTION **array) { ACTION *start, *node; CHAIN *chainp; @@ -431,8 +427,7 @@ void outstring(void) } /* Output #define's for parameter values */ -void outpval(p) -M_TRIE *p; +void outpval(M_TRIE *p) { M_WCHAR *q; @@ -530,14 +525,8 @@ void skiptoend(void) } /* Starts processing a code segment from the input file */ -void startcode(caseno, flag, file, prefix, proto, formal, formtype) -int caseno; -LOGICAL *flag; -FILE *file; -char *prefix; -char *proto; -char *formal; -char *formtype; +void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, + char *proto, char *formal, char *formtype) { CVARSTRUCT *cvarp; @@ -631,8 +620,7 @@ void storepname(void) } /* Called when a possible parameter value to be defined is encountered */ -void value(p) -M_WCHAR *p; +void value(M_WCHAR *p) { char buffer[5]; diff --git a/cde/programs/dthelp/parser/pass2/eltdef/scan.c b/cde/programs/dthelp/parser/pass2/eltdef/scan.c index a32a268a..7caa3670 100644 --- a/cde/programs/dthelp/parser/pass2/eltdef/scan.c +++ b/cde/programs/dthelp/parser/pass2/eltdef/scan.c @@ -43,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "delim.h" /* Reads a name token */ -void getname(first) -int first; +void getname(int first) { M_WCHAR *p, wus; int c, cttype; diff --git a/cde/programs/dthelp/parser/pass2/htag2/custom.c b/cde/programs/dthelp/parser/pass2/htag2/custom.c index 68ff5966..c4a0986b 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/custom.c +++ b/cde/programs/dthelp/parser/pass2/htag2/custom.c @@ -33,9 +33,7 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co. #include /* Write input file and line number for an error message */ -void m_dumpline(file, line) -M_WCHAR *file; -int line; +void m_dumpline(M_WCHAR *file, int line) { char buffer[10]; char *mbyte; @@ -69,8 +67,7 @@ m_errline(",\n"); } /* Process error message text */ -void m_errline(p) -char *p; +void m_errline(char *p) { char c; @@ -94,8 +91,7 @@ if (++m_errcnt == m_errlim) } /* Exit procedure */ -void m_exit(status) -int status; +void m_exit(int status) { if (status) @@ -123,8 +119,7 @@ exit(0); } /* Get-char procedure */ -int m_getc(m_ptr) -void *m_ptr; +int m_getc(void *m_ptr) { int c; M_WCHAR wc; @@ -210,8 +205,7 @@ return((int) wc); } /* Open SYSTEM entity procedure */ -void *m_openent(entcontent) -M_WCHAR *entcontent; +void *m_openent(M_WCHAR *entcontent) { FILE *open; char *filename; @@ -259,7 +253,7 @@ return((void *) inFile); } /* Set program options */ -void m_setoptions() +void m_setoptions(void) { if (m_argc > 2) { @@ -269,8 +263,7 @@ if (m_argc > 2) /* Process signon message text, stripping out MARKUP version number, so only one version number will appear */ -void m_signmsg(p) - char *p; +void m_signmsg(char *p) { char *q; char *pCopy; @@ -287,19 +280,17 @@ void m_signmsg(p) } /* All entity declarations have been processed. */ -void m_startdoc() +void m_startdoc(void) { } /* Write debugging trace information */ -void m_trace(p) -char *p; +void m_trace(char *p) { } -void m_wctrace(p) -M_WCHAR *p; +void m_wctrace(M_WCHAR *p) { char *mb_p; diff --git a/cde/programs/dthelp/parser/pass2/htag2/sdl.c b/cde/programs/dthelp/parser/pass2/htag2/sdl.c index 07641eb9..7c50e04f 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/sdl.c +++ b/cde/programs/dthelp/parser/pass2/htag2/sdl.c @@ -861,7 +861,7 @@ static ElementPtr *currentElementStack; static int currentElementStackSize = 0; static int currentElementStackTop = -1; -void PushCurrentElement() +void PushCurrentElement(void) { currentElementStackTop++; if (currentElementStackSize == 0) @@ -905,7 +905,7 @@ thisElementStack[thisElementStackTop] = pThis; } -void PopCurrentElement() +void PopCurrentElement(void) { pCurrentElement = currentElementStack[currentElementStackTop]; if (currentElementStackTop < 0) @@ -921,7 +921,7 @@ else } -static ElementPtr PopThisElement() +static ElementPtr PopThisElement(void) { ElementPtr pThisElement; @@ -1302,7 +1302,7 @@ else /* decompress an SDL file */ -static void DecompressSDL() +static void DecompressSDL(void) { int outFd, zFd; FILE *inFile; @@ -4823,7 +4823,7 @@ EmitSDL(pVirpage); /* A routine to emit a help message and exit */ -static void Help() +static void Help(void) { printf("The available options to %s are 'c', 'd', 'h', 'o' and 't'.\n\n", progName); @@ -4843,7 +4843,7 @@ exit(0); /* A routine to emit a usage message and exit */ -static void Usage() +static void Usage(void) { fprintf(stderr, "Usage: %s [-cdhot] []\n", @@ -4862,7 +4862,7 @@ exit(1); * A routine to pre-build all the input, output and intermediate file * names that we'll need. */ -static void MakeFileNames() +static void MakeFileNames(void) { int argCount; int length, c; @@ -5292,7 +5292,7 @@ return pc - string; /* * A routine to build the index from the .idx file (if any). */ -void BuildIndex() +void BuildIndex(void) { char buffer[BUFSIZ+1], *pFrom, *pTo, *pRestart, thisChar; int length, size; @@ -5704,7 +5704,7 @@ FcloseFile(sdlIdxFile, sortedIdxFileName, xxx); } -static void HandleSNB() +static void HandleSNB(void) { int oldOffset, newOffset; FILE *snbFile; @@ -5775,7 +5775,7 @@ CloseFile(outFd, tempFileName, xxx); /* calculate the size of the TOSS if only the used elements are * emitted */ -static int RestrictedTossSize() +static int RestrictedTossSize(void) { char buffer[32]; ElementPtr pThis; @@ -6085,7 +6085,7 @@ return size; /* iterate over the LOIDS computing the offsets as we remove the old * LOIDS and INDEX and replace them with the new */ -void IterateLoids() +void IterateLoids(void) { int replacing, length, incr, tmp; int loidsSize; @@ -6161,7 +6161,7 @@ while (incr) * the amount of padding needed in between the vstruct and the first * virpage to make everything work */ -static void CompressVstruct() +static void CompressVstruct(void) { #define COMPRESS_PAD_LENGTH 10 char buffer[BUFSIZ], zTemp[4]; @@ -6304,7 +6304,7 @@ while (pad >= 0) /* insert the new loids and index then close the output file */ -static void IncorporateVstructElements() +static void IncorporateVstructElements(void) { char buffer[BUFSIZ]; int length, delta; @@ -6510,7 +6510,7 @@ return(name) ; * file and its name is "TOSSFILE", change its content to be the * current file name base plus ".tss". */ -void UpdateTossFileName() +void UpdateTossFileName(void) { unsigned char type; unsigned char wheredef; @@ -6652,7 +6652,7 @@ _DtLcxCloseDb(&myDb); /* a routine to do all the things we want to do before actually * parsing the SDL document. */ -void OpenDocument() +void OpenDocument(void) { MakeFileNames(); m_errfile = FopenFile(errFileName, O_WRONLY|O_APPEND, xxx); @@ -6674,7 +6674,7 @@ outFile = FopenFile(vstructFileName, O_WRONLY, xxx); /* a routine to do all those things we want to do after parsing the * document such as doing the fixups in the vstruct */ -void CloseDocument() +void CloseDocument(void) { FcloseFile(outFile, tempFileName, xxx); BuildIndex(); diff --git a/cde/programs/dthelp/parser/pass2/parser/actutil.c b/cde/programs/dthelp/parser/pass2/parser/actutil.c index 59e084ea..cbf1f50e 100644 --- a/cde/programs/dthelp/parser/pass2/parser/actutil.c +++ b/cde/programs/dthelp/parser/pass2/parser/actutil.c @@ -44,8 +44,7 @@ in the interface definition.*/ #include "signon.h" /* When an explicit or implied end-tag occurs */ -void m_endaction(m_elt) - M_ELEMENT m_elt; +void m_endaction(M_ELEMENT m_elt) { M_ELEMENT m_action; char buffer[2*MAXD+M_NAMELEN+1]; @@ -76,9 +75,7 @@ void m_endaction(m_elt) } /* Find appropriate action according to current stack */ -int m_findact(elt, array) - M_ELEMENT elt; - int *array; +int m_findact(M_ELEMENT elt, int *array) { int chainlen = 0; int index; @@ -156,8 +153,7 @@ m_free(wc_string,"wide character string"); } /* When an explicit or implied start-tag occurs */ -void m_strtaction(m_elt) - M_ELEMENT m_elt; +void m_strtaction(M_ELEMENT m_elt) { int m_par, m_i; M_WCHAR *m_p; diff --git a/cde/programs/dthelp/parser/pass2/parser/closent.c b/cde/programs/dthelp/parser/pass2/parser/closent.c index c057ce7f..7921725c 100644 --- a/cde/programs/dthelp/parser/pass2/parser/closent.c +++ b/cde/programs/dthelp/parser/pass2/parser/closent.c @@ -28,8 +28,7 @@ #include "userinc.h" #include "globdec.h" -void m_closent(m_ptr) - void *m_ptr ; +void m_closent(void *m_ptr) { fclose((FILE *) m_ptr) ; } diff --git a/cde/programs/dthelp/parser/pass2/parser/code.c b/cde/programs/dthelp/parser/pass2/parser/code.c index 681a40a8..4b73888a 100644 --- a/cde/programs/dthelp/parser/pass2/parser/code.c +++ b/cde/programs/dthelp/parser/pass2/parser/code.c @@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "entfile.c" /* When a reference to a CODE entity is encountered */ -void m_codeent(m_ent) - int m_ent ; +void m_codeent(int m_ent) { (*m_ctable[m_ent])() ; } diff --git a/cde/programs/dthelp/parser/pass2/parser/dcurelt.c b/cde/programs/dthelp/parser/pass2/parser/dcurelt.c index 00ebd21f..f0fe2f41 100644 --- a/cde/programs/dthelp/parser/pass2/parser/dcurelt.c +++ b/cde/programs/dthelp/parser/pass2/parser/dcurelt.c @@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "globdec.h" /* Displays current element after some error messages */ -void m_dispcurelt(file, line) -M_WCHAR *file ; -int line ; +void m_dispcurelt(M_WCHAR *file, int line) { char *mb_parent; diff --git a/cde/programs/dthelp/parser/pass2/parser/end.c b/cde/programs/dthelp/parser/pass2/parser/end.c index 3902fc80..07e347fa 100644 --- a/cde/programs/dthelp/parser/pass2/parser/end.c +++ b/cde/programs/dthelp/parser/pass2/parser/end.c @@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Perform the m_action-th end-code in the interface */ -void m_endcase(m_action) - int m_action ; +void m_endcase(int m_action) { (*m_etable[m_action])() ; } diff --git a/cde/programs/dthelp/parser/pass2/parser/entity.c b/cde/programs/dthelp/parser/pass2/parser/entity.c index 703f39ff..041eb03d 100644 --- a/cde/programs/dthelp/parser/pass2/parser/entity.c +++ b/cde/programs/dthelp/parser/pass2/parser/entity.c @@ -52,8 +52,7 @@ void m_ckmap(M_WCHAR *name, LOGICAL useoradd) /* Check type specified in entity declaration for previously defined entity. Testing to see if the new declaration is identical to the original one. */ -void m_eduptype(type) - int type ; +void m_eduptype(int type) { if ((int) m_entity->type != type) { m_err1("Redefinition of entity %s ignored", m_entity->name) ; @@ -63,8 +62,7 @@ void m_eduptype(type) } /* Tests if an entity is too long */ -void m_longent(context) - int context ; +void m_longent(int context) { if (m_entclen >= M_LITLEN) { m_curcon = context ; @@ -74,8 +72,7 @@ void m_longent(context) } /* Enters an entity name into the entity name tree */ -void m_ntrent(p) - M_WCHAR *p ; +void m_ntrent(M_WCHAR *p) { M_ENTITY *new ; diff --git a/cde/programs/dthelp/parser/pass2/parser/error.c b/cde/programs/dthelp/parser/pass2/parser/error.c index 7f6b9ab5..17ddf2cb 100644 --- a/cde/programs/dthelp/parser/pass2/parser/error.c +++ b/cde/programs/dthelp/parser/pass2/parser/error.c @@ -40,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Issue error message (no arguments) */ -void m_error(text) - char *text; +void m_error(char *text) { m_startmsg(); m_errline(text); @@ -316,9 +315,7 @@ void m_err7( /* Getline.c returns the name of the current input file and the number of the current line */ -void m_getline(file, line) - M_WCHAR **file; - int *line; +void m_getline(M_WCHAR **file, int *line) { int i; diff --git a/cde/programs/dthelp/parser/pass2/parser/input.c b/cde/programs/dthelp/parser/pass2/parser/input.c index 1245c7ca..3887c7b4 100644 --- a/cde/programs/dthelp/parser/pass2/parser/input.c +++ b/cde/programs/dthelp/parser/pass2/parser/input.c @@ -64,8 +64,7 @@ void m_etcomplete(void) /* M_frcend is called after a syntax error to end element VAL even if more content for that element is expected */ -void m_frcend(val) - M_ELEMENT val ; +void m_frcend(M_ELEMENT val) { M_PARSE *stackptr ; M_ELEMENT poppedval ; diff --git a/cde/programs/dthelp/parser/pass2/parser/level.c b/cde/programs/dthelp/parser/pass2/parser/level.c index 0d861585..1846ef39 100644 --- a/cde/programs/dthelp/parser/pass2/parser/level.c +++ b/cde/programs/dthelp/parser/pass2/parser/level.c @@ -33,8 +33,7 @@ /* Procedure callable by interface designer. Returns number of occurrences of element on parse stack */ -int m_level(elt) - M_WCHAR *elt ; +int m_level(M_WCHAR *elt) { int i = 0 ; M_PARSE *stackptr ; @@ -48,8 +47,7 @@ int m_level(elt) } -int m_mblevel(elt) - char *elt ; +int m_mblevel(char *elt) { int retval; M_WCHAR *wc_elt; diff --git a/cde/programs/dthelp/parser/pass2/parser/lookent.c b/cde/programs/dthelp/parser/pass2/parser/lookent.c index 761a64d0..fd47220b 100644 --- a/cde/programs/dthelp/parser/pass2/parser/lookent.c +++ b/cde/programs/dthelp/parser/pass2/parser/lookent.c @@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "parser.h" #include "entext.h" -LOGICAL m_lookent(name, type, content, wheredef) - M_WCHAR *name ; - unsigned char *type ; - M_WCHAR **content ; - unsigned char *wheredef ; +LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content, + unsigned char *wheredef) { M_ENTITY *entity ; diff --git a/cde/programs/dthelp/parser/pass2/parser/minim.c b/cde/programs/dthelp/parser/pass2/parser/minim.c index 2a7564db..1a0c1eb5 100644 --- a/cde/programs/dthelp/parser/pass2/parser/minim.c +++ b/cde/programs/dthelp/parser/pass2/parser/minim.c @@ -99,11 +99,7 @@ void m_expecting(void) /* Recursive procedure first called from expecting() to display names of elements reachable from a particular node */ -void m_expexpand(expstart, node, required, data) - LOGICAL *expstart ; - M_STATE node ; - LOGICAL *required ; - LOGICAL *data ; +void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data) { M_ARC parc ; M_ANDGROUP pand ; @@ -125,10 +121,7 @@ void m_expexpand(expstart, node, required, data) } /* M_expline writes one line for m_expecting() */ -void m_expline(expstart, data, label) - LOGICAL *expstart ; - LOGICAL *data ; - M_ELEMENT label ; +void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label) { char buffer[M_NAMELEN + 2*MAXD + 1] ; @@ -165,9 +158,7 @@ void m_expline(expstart, data, label) /* M_exptend is called from m_expecting to inform the user after an error if an end tag is permitted */ -void m_exptend(expstart, stackptr) - LOGICAL *expstart ; - M_PARSE *stackptr ; +void m_exptend(LOGICAL *expstart, M_PARSE *stackptr) { char buffer[M_NAMELEN + 2*MAXD + 1] ; @@ -216,9 +207,7 @@ void m_exptend(expstart, stackptr) element, 1 if character data is expected, and 0 (FALSE) if there is no unique element. */ -M_ELEMENT m_findunique(from, newleft) - M_STATE from ; - int *newleft ; +M_ELEMENT m_findunique(M_STATE from, int *newleft) { M_ARC parc ; M_ELEMENT cr = 0, minim = 0; @@ -339,7 +328,7 @@ LOGICAL m_omitend(void) /* Tests to see if a start tag may have been omitted at this point of the parse. If so, saves the element name in the MINVAL array*/ -LOGICAL m_omitstart() +LOGICAL m_omitstart(void) { M_ELEMENT c = M_NULLVAL ; @@ -420,4 +409,3 @@ LOGICAL m_omitstart() m_nextms = &(*m_nextms)->next ; return(TRUE) ; } - diff --git a/cde/programs/dthelp/parser/pass2/parser/optstrg.c b/cde/programs/dthelp/parser/pass2/parser/optstrg.c index 9045345b..3c8f8ac1 100644 --- a/cde/programs/dthelp/parser/pass2/parser/optstrg.c +++ b/cde/programs/dthelp/parser/pass2/parser/optstrg.c @@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co. #include "parser.h" /* Get program options from a string */ -void m_optstring(p) - char *p ; +void m_optstring(char *p) { if (strchr(p, 'a')) m_malftrace = TRUE ; if (strchr(p, 'c')) m_chtrace = TRUE ; diff --git a/cde/programs/dthelp/parser/pass2/parser/param.c b/cde/programs/dthelp/parser/pass2/parser/param.c index 528c890d..bc4a4ed2 100644 --- a/cde/programs/dthelp/parser/pass2/parser/param.c +++ b/cde/programs/dthelp/parser/pass2/parser/param.c @@ -42,8 +42,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Process the value for the parameter whose index number was previously saved in m_ppsave */ -void m_attval(string) - M_WCHAR *string ; +void m_attval(M_WCHAR *string) { const M_WCHAR *p ; @@ -65,8 +64,7 @@ void m_attval(string) /* Process a string that is a parameter value not prefixed by the parameter name and value indicator */ -LOGICAL m_attvonly(string) - M_WCHAR *string ; +LOGICAL m_attvonly(M_WCHAR *string) { const M_WCHAR *p ; int par, i ; @@ -152,8 +150,7 @@ void m_findatt(void) } /* Free the parameter storage associated with an element on the parse stack */ -void m_freeparam(stackelt) - M_PARSE *stackelt ; +void m_freeparam(M_PARSE *stackelt) { int i ; int par ; @@ -173,9 +170,7 @@ void m_freeparam(stackelt) /* Force a parameter value to uppercase, if appropriate for its type. Also, if list-valued attribute, remove leading and trailing spaces, and condense white-space sequences to a single blank*/ -void m_parupper(par, string) - int par ; - M_WCHAR *string ; +void m_parupper(int par, M_WCHAR *string) { M_WCHAR *p ; M_WCHAR *q ; @@ -233,11 +228,7 @@ void m_stkdefaultparams(void) } /* Stack one default parameter */ -void m_stkonedef(par, scanel, poccur, i) - int par ; - M_ELEMENT scanel ; - M_WCHAR **poccur ; - int i ; +void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i) { if (m_parameter[par - 1].deftype == M_REQUIRED || (m_parameter[par - 1].deftype == M_CURRENT && @@ -313,8 +304,7 @@ void m_updatedefault(const int par , const M_WCHAR *string ) /* Check to see if a string that occurs after the element name in a start tag is a valid parameter name or value; if not, assume tag is ended */ -LOGICAL m_validinpar(string) - M_WCHAR *string ; +LOGICAL m_validinpar(M_WCHAR *string) { int par ; M_WCHAR *p ; diff --git a/cde/programs/dthelp/parser/pass2/parser/parent.c b/cde/programs/dthelp/parser/pass2/parser/parent.c index 800143bd..2a7234da 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parent.c +++ b/cde/programs/dthelp/parser/pass2/parser/parent.c @@ -34,8 +34,7 @@ /* Procedure callable by interface designers. Returns pointer to name of nth level parent of current element (0 is self, 1 is parent, 2 is grandparent, etc.) */ -M_WCHAR *m_parent(n) - int n ; +M_WCHAR *m_parent(int n) { M_PARSE *stackptr ; diff --git a/cde/programs/dthelp/parser/pass2/parser/parser.c b/cde/programs/dthelp/parser/pass2/parser/parser.c index fcfb86ab..0c915da2 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parser.c +++ b/cde/programs/dthelp/parser/pass2/parser/parser.c @@ -36,9 +36,7 @@ #include "entext.h" /* Main procedure */ -void main(argc, argv) - int argc ; - char **argv ; +void main(int argc, char **argv) { static char parserr[] = "\nM_token=%d, m_prevcon=%d, m_scanval=%d\n" ; static char sopt[] = diff --git a/cde/programs/dthelp/parser/pass2/parser/parutil.c b/cde/programs/dthelp/parser/pass2/parser/parutil.c index 499a91b3..9431830f 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parutil.c +++ b/cde/programs/dthelp/parser/pass2/parser/parutil.c @@ -87,7 +87,7 @@ M_ELEMENT m_eltname(void) } } -int get_mb_cur_max() +int get_mb_cur_max(void) { char *l; int i; diff --git a/cde/programs/dthelp/parser/pass2/parser/pi.c b/cde/programs/dthelp/parser/pass2/parser/pi.c index 22efdd84..7b487013 100644 --- a/cde/programs/dthelp/parser/pass2/parser/pi.c +++ b/cde/programs/dthelp/parser/pass2/parser/pi.c @@ -38,10 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* When a processing instruction or SDATA entity other than a CODE entity occurs */ -void m_piaction(m_pi, m_entname, m_enttype) - M_WCHAR *m_pi ; - M_WCHAR *m_entname ; - int m_enttype ; +void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype) { m_stackpar = m_stacktop->piparam ; (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ; diff --git a/cde/programs/dthelp/parser/pass2/parser/scan.c b/cde/programs/dthelp/parser/pass2/parser/scan.c index 309d0c51..3bc16ced 100644 --- a/cde/programs/dthelp/parser/pass2/parser/scan.c +++ b/cde/programs/dthelp/parser/pass2/parser/scan.c @@ -62,8 +62,7 @@ int m_actgetc(void) } /* Expand an entity reference */ -void m_entexpand(openent) - M_ENTITY *openent ; +void m_entexpand(M_ENTITY *openent) { M_WCHAR *p ; M_HOLDTYPE dchar ; @@ -231,9 +230,7 @@ void m_entexpand(openent) /* An srlen-character long short-reference delimiter has been found. Verify that it is not the prefix of a general delimiter recognized in context*/ -LOGICAL m_gendelim(srlen, context) - int srlen ; - int context ; +LOGICAL m_gendelim(int srlen, int context) { int ghold[MAXD + 1] ; int ucase ; @@ -321,8 +318,7 @@ LOGICAL m_gendelim(srlen, context) /* Reads next input character from the current source file or from an entity expansion */ -int m_getachar(dchar) - M_HOLDTYPE *dchar ; +int m_getachar(M_HOLDTYPE *dchar) { int c ; int i ; @@ -427,10 +423,7 @@ void m_getname(M_WCHAR first) } /* Reads the next token */ -int m_gettoken(c, dchar, context) - int *c ; - M_HOLDTYPE *dchar ; - int context ; +int m_gettoken(int *c, M_HOLDTYPE *dchar, int context) { int hold[MAXD + 1], next ; int ucase ; @@ -554,8 +547,7 @@ int m_gettoken(c, dchar, context) } /* Reads a literal */ -void m_litproc(delim) - int delim ; +void m_litproc(int delim) { int n, i ; M_HOLDTYPE dchar ; @@ -886,8 +878,7 @@ void m_setmap(int map, LOGICAL useoradd) } /* Check for short reference delimiters */ -void m_shortref(context) -int context ; +void m_shortref(int context) { int n = 0 ; int i ; diff --git a/cde/programs/dthelp/parser/pass2/parser/setpar.c b/cde/programs/dthelp/parser/pass2/parser/setpar.c index 4a198d42..4124a45c 100644 --- a/cde/programs/dthelp/parser/pass2/parser/setpar.c +++ b/cde/programs/dthelp/parser/pass2/parser/setpar.c @@ -35,9 +35,7 @@ #include "parser.h" /* Set a user-defined C variable to the corresponding parameter value */ -void m_setparam(cvar, par) - M_WCHAR **cvar ; - int par ; +void m_setparam(M_WCHAR **cvar, int par) { *cvar = m_stackpar->param[par] ; } diff --git a/cde/programs/dthelp/parser/pass2/parser/start.c b/cde/programs/dthelp/parser/pass2/parser/start.c index 24120add..8b82ee52 100644 --- a/cde/programs/dthelp/parser/pass2/parser/start.c +++ b/cde/programs/dthelp/parser/pass2/parser/start.c @@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include "sfile.c" /* Perform the m_action-th start-code in the interface */ -void m_strtcase(m_action) - int m_action ; +void m_strtcase(int m_action) { (*m_stable[m_action])() ; } diff --git a/cde/programs/dthelp/parser/pass2/parser/struct.c b/cde/programs/dthelp/parser/pass2/parser/struct.c index a0cebd54..7471ae2b 100644 --- a/cde/programs/dthelp/parser/pass2/parser/struct.c +++ b/cde/programs/dthelp/parser/pass2/parser/struct.c @@ -46,8 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated. is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively if the element is allowed by content, not allowed, or allowed by an inclusion exception. */ -int m_checkstart(val) - M_ELEMENT val ; +int m_checkstart(M_ELEMENT val) { M_PARSE *stackptr ; int except ; @@ -238,8 +237,7 @@ void m_done(void) } /* Process the endtag (implied, abbreviated, or explicit) for element C*/ -void m_endtag(c) - M_ELEMENT c ; +void m_endtag(M_ELEMENT c) { m_endaction(c) ; m_pop() ; @@ -251,8 +249,7 @@ void m_endtag(c) /* Check that the identified element is not prohibited in the current context by an exclusion exception */ -LOGICAL m_excluded(elt) - M_ELEMENT elt ; +LOGICAL m_excluded(M_ELEMENT elt) { M_PARSE *stackptr ; int except ; @@ -270,8 +267,7 @@ LOGICAL m_excluded(elt) /* Free the OPEN FSA substructures associated with an element on the parse stack */ -void m_freeFSA(stackelt) - M_PARSE *stackelt ; +void m_freeFSA(M_PARSE *stackelt) { M_OPENFSA *fsastack ; M_ANDLIST *usedand ; @@ -290,9 +286,7 @@ void m_freeFSA(stackelt) } /* Free storage used for tentative chain of tag minimizations */ -void m_freemin(min, msg) - M_MIN *min ; - char *msg ; +void m_freemin(M_MIN *min, char *msg) { M_MIN *discard ; @@ -307,9 +301,7 @@ void m_freemin(min, msg) in the current content model by starting a new submodel of the and-group indicated by fsastack, or (if the and-group is within a seq-group) by continuing past the and-group */ -LOGICAL m_nextand(thisfsa, label) - M_OPENFSA *thisfsa ; - M_ELEMENT label ; +LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label) { M_ANDLIST *newgroup ; M_ANDGROUP pand ; @@ -461,8 +453,7 @@ void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need) character is treated differently so that if character data is not allowed in the current context, an error message is issued with the first character only and not with every character. */ -void m_strtcdata(scanval) - int scanval ; +void m_strtcdata(int scanval) { if (! m_strtproc(M_NULLVAL)) if (m_whitespace((M_WCHAR) scanval)) { @@ -493,8 +484,7 @@ void m_strtcdata(scanval) to an element that was within #PCDATA, m_strtproc saves the current context and restores it after returning from the last call to m_endtag.) */ -LOGICAL m_strtproc(scanval) - M_ELEMENT scanval ; +LOGICAL m_strtproc(M_ELEMENT scanval) { int check ; M_PARSE *original ; diff --git a/cde/programs/dthelp/parser/pass2/util/context.c b/cde/programs/dthelp/parser/pass2/util/context.c index 080ff411..f59f86f7 100644 --- a/cde/programs/dthelp/parser/pass2/util/context.c +++ b/cde/programs/dthelp/parser/pass2/util/context.c @@ -166,9 +166,7 @@ delim.h. #include "cont.h" /* Main procedure */ -int main(argc, argv) - int argc ; - char **argv ; +int main(int argc, char **argv) { int n ; diff --git a/cde/programs/dthelp/parser/pass2/util/conutil.c b/cde/programs/dthelp/parser/pass2/util/conutil.c index 8607f124..6aa93c56 100644 --- a/cde/programs/dthelp/parser/pass2/util/conutil.c +++ b/cde/programs/dthelp/parser/pass2/util/conutil.c @@ -81,8 +81,7 @@ void dumptree(LOGICAL sparse) } /* Enter a delimiter into the delimiter tree for a particular context */ -void enterdelim(n) - int n; +void enterdelim(int n) { if (! contree[n]) { @@ -107,8 +106,7 @@ if (m_ntrtrie(dstruct->string, } /* Read the code to be executed with a given state transition */ -void getcode(n) -int n; +void getcode(int n) { int c ; /* c is int instead of char for use with ungetc */ int nested = 1; @@ -619,8 +617,7 @@ void nextcon(LOGICAL sparse) /* If sparse matrix output option, generate a single element of transit array */ -void prtctxt(column, value) - int column, value; +void prtctxt(int column, int value) { static LOGICAL first = TRUE; @@ -655,8 +652,7 @@ void skiptoend(void) } /* Return a character to the input stream for re-reading */ -void unread(c) -int c; +void unread(int c) { M_WCHAR wnl; diff --git a/cde/programs/dthelp/parser/pass2/util/entout.c b/cde/programs/dthelp/parser/pass2/util/entout.c index 17e77362..9db9b9e9 100644 --- a/cde/programs/dthelp/parser/pass2/util/entout.c +++ b/cde/programs/dthelp/parser/pass2/util/entout.c @@ -49,8 +49,7 @@ char xerror[] = "ERROR" ; /* Outputs entity definitions */ #define ENTFILENAME 12 -void entout(fname) - char *fname ; +void entout(char *fname) { char efilename[ENTFILENAME] ; int count = 1 ; @@ -173,15 +172,13 @@ void entout(fname) /* Entptr is called by m_dumptrie to output the value stored with a particular entity in the entity trie */ -void entptr(data) - M_ENTITY *data ; +void entptr(M_ENTITY *data) { fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ; } /* Typetype returns a string indicating the type of the nth entity.*/ -char *typetype(n) - int n ; +char *typetype(int n) { switch(n) { case M_GENERAL: return(xgeneral) ; diff --git a/cde/programs/dthelp/parser/pass2/util/error.c b/cde/programs/dthelp/parser/pass2/util/error.c index 3b799666..27e9caec 100644 --- a/cde/programs/dthelp/parser/pass2/util/error.c +++ b/cde/programs/dthelp/parser/pass2/util/error.c @@ -83,16 +83,14 @@ void eprefix(LOGICAL flag) /* Writes part of an error message. Called from m_malloc instead of m_err1, since PARSER's version of m_err1 calls m_malloc and recursive calls are possible when the heap is exhausted */ -void m_errline(text) -char *text ; +void m_errline(char *text) { fputs(text, stderr) ; fputs(text, m_errfile) ; } /* Writes an error message to standard error and file "error" */ -void m_error(text) - char *text ; +void m_error(char *text) { eprefix(TRUE) ; fprintf(stderr,"%s", text) ; @@ -192,30 +190,26 @@ void esuffix(void) } /* Print something to both stderr and m_errfile */ -void msgline(text) - char *text ; +void msgline(char *text) { fprintf(stderr, "%s", text) ; fprintf(m_errfile, "%s", text) ; } /* Print something to both stderr and m_errfile */ -void msg1line(text, arg1) - char *text, *arg1 ; +void msg1line(char *text, char *arg1) { fprintf(stderr, text, arg1) ; fprintf(m_errfile, text, arg1) ; } /* Trace used for m_malloc trace output */ -void m_trace(text) -char *text ; +void m_trace(char *text) { m_errline(text) ; } -void m_wctrace(text) -M_WCHAR *text ; +void m_wctrace(M_WCHAR *text) { char *mb_text; @@ -225,8 +219,7 @@ m_free(mb_text,"multi-byte string"); } /* Writes a nonfatal error message to standard error and file "error" */ -void warning(text) - char *text ; +void warning(char *text) { eprefix(FALSE) ; fprintf(stderr,"%s", text) ; diff --git a/cde/programs/dthelp/parser/pass2/util/exit.c b/cde/programs/dthelp/parser/pass2/util/exit.c index ed0ca63e..d326e97d 100644 --- a/cde/programs/dthelp/parser/pass2/util/exit.c +++ b/cde/programs/dthelp/parser/pass2/util/exit.c @@ -31,8 +31,7 @@ void m_exit(int status); /* Exit function called by utilities used in PARSER and other programs in the MARKUP system */ -void m_exit(status) - int status ; +void m_exit(int status) { exit(status) ; } diff --git a/cde/programs/dthelp/parser/pass2/util/fclndir.c b/cde/programs/dthelp/parser/pass2/util/fclndir.c index 68060805..1c1eb501 100644 --- a/cde/programs/dthelp/parser/pass2/util/fclndir.c +++ b/cde/programs/dthelp/parser/pass2/util/fclndir.c @@ -61,9 +61,7 @@ void copyfile(char *pfile1, char *pfile2); int nextchar(FILE *file, struct data *data); -void main(argc, argv) - int argc ; - char **argv ; +void main(int argc, char **argv) { FILE *one, *two ; int c1, c2 ; @@ -110,8 +108,7 @@ void main(argc, argv) } /* copyfile inserted by ced, 12-1-89. */ -void copyfile(pfile1,pfile2) - char *pfile1, *pfile2; +void copyfile(char *pfile1, char *pfile2) { int ret; char *pcmd; @@ -128,9 +125,7 @@ void copyfile(pfile1,pfile2) free(pcmd); } -int nextchar(file, data) - FILE *file ; - struct data *data ; +int nextchar(FILE *file, struct data *data) { while (data->linestart) { data->linestart = FALSE ; diff --git a/cde/programs/dthelp/parser/pass2/util/inctest.c b/cde/programs/dthelp/parser/pass2/util/inctest.c index a9a39321..db343b98 100644 --- a/cde/programs/dthelp/parser/pass2/util/inctest.c +++ b/cde/programs/dthelp/parser/pass2/util/inctest.c @@ -34,10 +34,7 @@ void m_exit(int status); void m_inctest(int *count, int limit, char *message); /* Increment a count and test against a limit */ -void m_inctest(count, limit, message) - int *count ; - int limit ; - char *message ; +void m_inctest(int *count, int limit, char *message) { if (++*count <= limit) return ; m_err1("Internal error: %s exceeded", message) ; diff --git a/cde/programs/dthelp/parser/pass2/util/itoa.c b/cde/programs/dthelp/parser/pass2/util/itoa.c index b86d103e..a08f4bf7 100644 --- a/cde/programs/dthelp/parser/pass2/util/itoa.c +++ b/cde/programs/dthelp/parser/pass2/util/itoa.c @@ -31,9 +31,7 @@ char *m_itoa(int n, char *s); void reverse(char *s); -char *m_itoa(n, s) /* convert n to characters in s */ -char s[]; -int n; +char *m_itoa(int n, char *s) /* convert n to characters in s */ { int sign ; char *p = s ; @@ -51,8 +49,7 @@ int n; return(s) ; } -void reverse(s) -char s[]; +void reverse(char s[]) { int c, i, j; diff --git a/cde/programs/dthelp/parser/pass2/util/lower.c b/cde/programs/dthelp/parser/pass2/util/lower.c index e53f0ff8..52cac2bc 100644 --- a/cde/programs/dthelp/parser/pass2/util/lower.c +++ b/cde/programs/dthelp/parser/pass2/util/lower.c @@ -32,8 +32,7 @@ int m_lower(int c); /* Force a letter to lowercase */ -int m_lower(c) - int c ; +int m_lower(int c) { if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ; return(c) ; diff --git a/cde/programs/dthelp/parser/pass2/util/malloc.c b/cde/programs/dthelp/parser/pass2/util/malloc.c index bead0dbd..ff63f134 100644 --- a/cde/programs/dthelp/parser/pass2/util/malloc.c +++ b/cde/programs/dthelp/parser/pass2/util/malloc.c @@ -69,9 +69,7 @@ void m_free(void *block, char *msg) free(block) ; } -void *m_malloc(size, msg) - int size ; - char *msg ; +void *m_malloc(int size, char *msg) { char buffer[32] ; void *p ; @@ -103,10 +101,7 @@ void *m_malloc(size, msg) return(p) ; } -void *m_realloc(ptr, size, msg) - void *ptr ; - int size ; - char *msg ; +void *m_realloc(void *ptr, int size, char *msg) { char buffer[32] ; void *p ; diff --git a/cde/programs/dthelp/parser/pass2/util/openchk.c b/cde/programs/dthelp/parser/pass2/util/openchk.c index 25445b13..13e45b0a 100644 --- a/cde/programs/dthelp/parser/pass2/util/openchk.c +++ b/cde/programs/dthelp/parser/pass2/util/openchk.c @@ -35,9 +35,7 @@ void m_exit(int status); void m_openchk(FILE **ptr, char *name, char *mode); /* Open a file and check that the open succeeded */ -void m_openchk(ptr, name, mode) - FILE **ptr ; - char *name, *mode ; +void m_openchk(FILE **ptr, char *name, char *mode) { *ptr = fopen(name, mode) ; if (*ptr) return ; diff --git a/cde/programs/dthelp/parser/pass2/util/scanutil.c b/cde/programs/dthelp/parser/pass2/util/scanutil.c index c9ceed66..9f3ff6b3 100644 --- a/cde/programs/dthelp/parser/pass2/util/scanutil.c +++ b/cde/programs/dthelp/parser/pass2/util/scanutil.c @@ -72,9 +72,7 @@ return((int) wc); } /* Reads the next token stored in a packed trie (as defined by context.dat) */ -int gettoken(c, context) -int *c; -int context; +int gettoken(int *c, int context) { int hold[MAXD + 1]; int ucase; @@ -123,8 +121,7 @@ return(M_NULLVAL); } /* Reads a literal (called after the opening quotation mark is read) */ -LOGICAL litproc(delim) -int delim; +LOGICAL litproc(int delim) { int n, i, number; M_WCHAR *p, *pStart; /* bigger than wide versions of lit or lita */ @@ -215,8 +212,7 @@ return(FALSE); /* Returns a context-dependent delimiter string to input stream so characters can be reread one at a time in another context */ -void undodelim(delim) -M_WCHAR *delim; +void undodelim(M_WCHAR *delim) { M_WCHAR *p; @@ -234,8 +230,7 @@ while (TRUE) /* Returns a character to the input stream to read again later. Unexplained problems occurred using standard ungetc procedure; hence explicit declaration of buffer for read-ahead characters */ -void ungetachar(c) -int c; +void ungetachar(int c) { M_WCHAR wnl; diff --git a/cde/programs/dthelp/parser/pass2/util/sparse.c b/cde/programs/dthelp/parser/pass2/util/sparse.c index 8f6ec8c9..89339678 100644 --- a/cde/programs/dthelp/parser/pass2/util/sparse.c +++ b/cde/programs/dthelp/parser/pass2/util/sparse.c @@ -25,8 +25,7 @@ /* Sparse.c has a procedure used with the tables generated by program CONTEXT when the sparse option is used */ -int m_sprscon(i, j) - int i, j ; +int m_sprscon(int i, int j) { int k ; diff --git a/cde/programs/dthelp/parser/pass2/util/trie.c b/cde/programs/dthelp/parser/pass2/util/trie.c index 1476ed76..eca3dc21 100644 --- a/cde/programs/dthelp/parser/pass2/util/trie.c +++ b/cde/programs/dthelp/parser/pass2/util/trie.c @@ -117,10 +117,7 @@ void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie ) } /* Enters a string and associated data value into a trie */ -void *m_ntrtrie(p, xtrie, dataval) - M_WCHAR *p ; - M_TRIE *xtrie ; - void *dataval ; +void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval) { M_TRIE *currentnode ; void *n ; diff --git a/cde/programs/dthelp/parser/pass2/util/triecnt.c b/cde/programs/dthelp/parser/pass2/util/triecnt.c index 0deb4cfc..4225352b 100644 --- a/cde/programs/dthelp/parser/pass2/util/triecnt.c +++ b/cde/programs/dthelp/parser/pass2/util/triecnt.c @@ -40,9 +40,7 @@ void printval(FILE *file, void *value); /* Count the descendants of a node in order to generate declarations for the packed form of a trie*/ -void countdown(parent, count) - M_TRIE *parent ; - int *count ; +void countdown(M_TRIE *parent, int *count) { M_TRIE *child ; @@ -54,12 +52,8 @@ void countdown(parent, count) /* Output descendants of a node for the declaration of a trie, in packed or normal format*/ -void dumpnode(first, file, trieptr, count, proc) - LOGICAL *first ; - FILE *file ; - M_TRIE *trieptr ; - int *count ; - void (*proc) (FILE *file, void *value) ; +void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, + void (*proc) (FILE *file, void *value)) { M_TRIE *p ; int savecount ; @@ -89,9 +83,7 @@ void dumpnode(first, file, trieptr, count, proc) /* Most common procedure passed to dumpptrie */ -void printval(file, value) - FILE *file ; - void *value ; +void printval(FILE *file, void *value) { fprintf(file, ", %ld", (long) value) ; } diff --git a/cde/programs/dthelp/parser/pass2/util/triedump.c b/cde/programs/dthelp/parser/pass2/util/triedump.c index 3e49c9b9..e69fd1a7 100644 --- a/cde/programs/dthelp/parser/pass2/util/triedump.c +++ b/cde/programs/dthelp/parser/pass2/util/triedump.c @@ -35,12 +35,8 @@ void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(void *value)); /* Write the C declaration of a trie */ -void m_dumptrie(file, xtrie, extname, count, proc) - FILE *file ; - M_TRIE *xtrie ; - char *extname ; - int *count ; - void (*proc)(void *value) ; +void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, + void (*proc)(void *value)) { int firstson ; M_TRIE *p ; diff --git a/cde/programs/dthelp/parser/pass2/util/triepdmp.c b/cde/programs/dthelp/parser/pass2/util/triepdmp.c index 3c052e33..faa036c9 100644 --- a/cde/programs/dthelp/parser/pass2/util/triepdmp.c +++ b/cde/programs/dthelp/parser/pass2/util/triepdmp.c @@ -38,13 +38,9 @@ void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char void (*proc)(FILE *file, void *value)); /* Write the declaration of a packed trie to the specified files */ -void dumpptrie(intname, extname, file, externdef, defdef, proc) - M_TRIE *intname ; - char *extname ; - FILE *file ; - char *externdef ; - char *defdef ; - void (*proc) (FILE *file, void *value); +void dumpptrie(M_TRIE *intname, char *extname, FILE *file, + char *externdef, char *defdef, + void (*proc) (FILE *file, void *value)) { LOGICAL first = TRUE ; int count = 0 ; diff --git a/cde/programs/dthelp/parser/pass2/util/trieplk.c b/cde/programs/dthelp/parser/pass2/util/trieplk.c index 1ee74fc4..cad82ed5 100644 --- a/cde/programs/dthelp/parser/pass2/util/trieplk.c +++ b/cde/programs/dthelp/parser/pass2/util/trieplk.c @@ -39,9 +39,7 @@ extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name); /* Look for the string NAME in the packed trie PTRIE */ -int m_packedlook(xptrie, name) -M_PTRIE *xptrie ; -M_WCHAR *name ; +int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name) { int current = 0 ; int i ; diff --git a/cde/programs/dthelp/parser/pass2/util/trierset.c b/cde/programs/dthelp/parser/pass2/util/trierset.c index 69f01f65..ad795ab3 100644 --- a/cde/programs/dthelp/parser/pass2/util/trierset.c +++ b/cde/programs/dthelp/parser/pass2/util/trierset.c @@ -33,10 +33,7 @@ extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; /* Changes the value associated with an entry in a trie. */ -void *m_resettrie(xtrie, p, value) - M_TRIE *xtrie ; - M_WCHAR *p ; - void *value ; +void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value) { M_TRIE *currentnode ; diff --git a/cde/programs/dthelp/parser/pass2/util/upper.c b/cde/programs/dthelp/parser/pass2/util/upper.c index 34d21271..8cb9181d 100644 --- a/cde/programs/dthelp/parser/pass2/util/upper.c +++ b/cde/programs/dthelp/parser/pass2/util/upper.c @@ -31,8 +31,7 @@ int m_upper(int c); -int m_upper(c) - int c ; +int m_upper(int c) { if (c >= 'a' && c <= 'z') c += 'A' - 'a' ; return(c) ; diff --git a/cde/programs/dthelp/parser/pass2/util/upstrcmp.c b/cde/programs/dthelp/parser/pass2/util/upstrcmp.c index 6033a256..a0a307fc 100644 --- a/cde/programs/dthelp/parser/pass2/util/upstrcmp.c +++ b/cde/programs/dthelp/parser/pass2/util/upstrcmp.c @@ -33,8 +33,7 @@ int m_upper(int c); int m_upstrcmp(char *p, char *q); -int m_upstrcmp(p, q) - char *p, *q ; +int m_upstrcmp(char *p, char *q) { do { if (m_upper((int) *p) < m_upper((int) *q)) return(-1) ; diff --git a/cde/programs/dthelp/parser/pass2/util/wchar.c b/cde/programs/dthelp/parser/pass2/util/wchar.c index 8fdfd085..23ded0c8 100644 --- a/cde/programs/dthelp/parser/pass2/util/wchar.c +++ b/cde/programs/dthelp/parser/pass2/util/wchar.c @@ -238,8 +238,7 @@ return wc_stringStart; /* Get-wide-char procedure */ -int mb_getwc(m_ptr) -void *m_ptr; +int mb_getwc(void *m_ptr) { int c; M_WCHAR wc; -- 2.25.1