1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dthelp: Convert all K&R function definitions to ANSI (C90) standard

This commit is contained in:
Peter Howkins 2018-06-24 00:50:56 +01:00
parent f89139dd84
commit 5aa1fed48b
172 changed files with 547 additions and 1308 deletions

View file

@ -170,7 +170,7 @@ static void ExpandVolume(
* Purpose: Initializes our global variables to valid starting values. * Purpose: Initializes our global variables to valid starting values.
* *
****************************************************************************/ ****************************************************************************/
static void GlobalInit() static void GlobalInit(void)
{ {

View file

@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entdef.h" #include "entdef.h"
/* Main procedure */ /* Main procedure */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
int m_prevcon ; int m_prevcon ;

View file

@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Verify that <PARAM>, <MIN> or <USEMAP> has not previously occurred in /* Verify that <PARAM>, <MIN> or <USEMAP> has not previously occurred in
this rule */ this rule */
void found(flag, delim) void found(LOGICAL *flag, char *delim)
LOGICAL *flag;
char *delim;
{ {
M_WCHAR wcbuff[129]; M_WCHAR wcbuff[129];
ssize_t length; ssize_t length;

View file

@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "build.h" #include "build.h"
/* Enters an element name into the element name tree */ /* Enters an element name into the element name tree */
ELTSTRUCT *ntrelt(p) ELTSTRUCT *ntrelt(M_WCHAR *p)
M_WCHAR *p ;
{ {
ELTSTRUCT *new ; ELTSTRUCT *new ;
ELTSTRUCT *old ; ELTSTRUCT *old ;

View file

@ -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 /*checkand is used to verify nondeterminism from start and final states
of FSA's generated from and groups*/ of FSA's generated from and groups*/
void checkand(andstart, andptr, start, root, errelt) void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start,
ANDGROUP *andstart, *andptr ; TREE *root, ELTSTRUCT **errelt)
STATE *start ;
TREE *root ;
ELTSTRUCT **errelt ;
{ {
ARC *parc ; ARC *parc ;
ANDGROUP *pand ; 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 /*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 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. */ FSA labelling an arc from the same state) has the same label. */
int checkdfsa(from, label, and, id, errelt) int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id,
STATE *from ; ELTSTRUCT **errelt)
ELTSTRUCT *label ;
ANDGROUP *and ;
int id ;
ELTSTRUCT **errelt ;
{ {
int c ; int c ;
ARC *parc ; ARC *parc ;
@ -116,10 +109,7 @@ int checkdfsa(from, label, and, id, errelt)
} }
/* Check use of repeated models with and groups */ /* Check use of repeated models with and groups */
int checkrepeat(from, and, errelt) int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt)
STATE *from ;
ANDGROUP *and ;
ELTSTRUCT **errelt ;
{ {
ARC *parc ; ARC *parc ;
int c ; int c ;
@ -142,8 +132,7 @@ int checkrepeat(from, and, errelt)
} }
/* Copyintolist copies one list of states into another */ /* Copyintolist copies one list of states into another */
void copyintolist(from, to) void copyintolist(STATELIST *from, STATELIST **to)
STATELIST *from, **to ;
{ {
STATELIST **new, *old ; STATELIST **new, *old ;
@ -161,8 +150,7 @@ void copyintolist(from, to)
} }
/* Dellist deletes a list of states */ /* Dellist deletes a list of states */
void dellist(list) void dellist(STATELIST **list)
STATELIST **list ;
{ {
STATELIST *p, *q ; STATELIST *p, *q ;
@ -220,10 +208,7 @@ STATE *getstate(void)
} }
/* Makeand processes a submodel whose connector is & */ /* Makeand processes a submodel whose connector is & */
void makeand(canbenull, root, optional) void makeand(LOGICAL *canbenull, TREE *root, int optional)
LOGICAL *canbenull ;
TREE *root ;
int optional ;
{ {
TREE *child ; TREE *child ;
STATELIST *start, *final ; STATELIST *start, *final ;
@ -308,9 +293,7 @@ void makeand(canbenull, root, optional)
allfinal is passed from model to submodel; information in newfinal allfinal is passed from model to submodel; information in newfinal
goes from submodel to model. goes from submodel to model.
*/ */
LOGICAL makefsa(root, optional) LOGICAL makefsa(TREE *root, int optional)
TREE *root ;
int optional ;
{ {
LOGICAL canbenull ; LOGICAL canbenull ;
@ -344,9 +327,7 @@ LOGICAL makefsa(root, optional)
} }
/* Makeor processes a submodel whose connector is | */ /* Makeor processes a submodel whose connector is | */
void makeor(canbenull, root) void makeor(LOGICAL *canbenull, TREE *root)
LOGICAL *canbenull ;
TREE *root ;
{ {
TREE *child ; TREE *child ;
STATELIST *final ; STATELIST *final ;
@ -368,10 +349,7 @@ void makeor(canbenull, root)
} }
/* Makeseq processes a submodel whose connector is , */ /* Makeseq processes a submodel whose connector is , */
void makeseq(canbenull, root, optional) void makeseq(LOGICAL *canbenull, TREE *root, int optional)
LOGICAL *canbenull ;
TREE *root ;
int optional ;
{ {
LOGICAL branchnull ; LOGICAL branchnull ;
STATELIST *keepfinal = NULL, *final ; STATELIST *keepfinal = NULL, *final ;
@ -409,10 +387,7 @@ void makeseq(canbenull, root, optional)
/* Nondeterm issues a diagnostic when a nondeterministic model is /* Nondeterm issues a diagnostic when a nondeterministic model is
encountered */ encountered */
void nondeterm(root, c, eltp) void nondeterm(TREE *root, int c, ELTSTRUCT *eltp)
TREE *root ;
int c ;
ELTSTRUCT *eltp ;
{ {
M_WCHAR *wtemp; 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, /* 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 */ it makes sure that the stored nesting level is the smaller of the two */
LOGICAL notinlist(item, list) LOGICAL notinlist(STATELIST *item, STATELIST *list)
STATELIST *item, *list ;
{ {
for ( ; list ; list = list->next) for ( ; list ; list = list->next)
if (list->value == item->value) { 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 /* Returns true if the arc is labeled #PCDATA or with an and-group that
has an arc labelled #PCDATA from a start state */ has an arc labelled #PCDATA from a start state */
LOGICAL permitspcd(a) LOGICAL permitspcd(ARC *a)
ARC *a ;
{ {
ANDGROUP *pand ; ANDGROUP *pand ;
ARC *b ; ARC *b ;
@ -507,8 +480,7 @@ void push(void)
/* Regenerate is used in error processing to print the portion of a grammar /* Regenerate is used in error processing to print the portion of a grammar
rule preceding an error */ rule preceding an error */
LOGICAL regenerate(start, stop) LOGICAL regenerate(TREE *start, TREE *stop)
TREE *start, *stop ;
{ {
TREE *child ; TREE *child ;
@ -554,8 +526,7 @@ return(FALSE) ;
by adding arcs from all the final states to all the states reachable 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 in one transition from a start state, labelling them as arcs from
start states are labelled. */ start states are labelled. */
void repeat(root) void repeat(TREE *root)
TREE *root ;
{ {
STATELIST *final ; STATELIST *final ;
ARC *a ; ARC *a ;
@ -606,9 +577,7 @@ void repeat(root)
/* Used during processing of occurrence indicators in content models such /* Used during processing of occurrence indicators in content models such
as (a+)+ to prohibit duplicate arcs */ as (a+)+ to prohibit duplicate arcs */
LOGICAL samelabelarc(a, s) LOGICAL samelabelarc(ARC *a, STATE *s)
ARC *a ;
STATE *s ;
{ {
ARC *b ; ARC *b ;
@ -666,11 +635,8 @@ void savestartarcs(void)
/* Simplebranch adds a new state and transition to it in an FSA when a /* 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 */ submodel consists of a single element or of an and group */
void simplebranch(root, value, group, optional) void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group,
TREE *root ; int optional)
ELTSTRUCT *value ;
ANDGROUP *group ;
int optional ;
{ {
STATE *new = NULL ; STATE *new = NULL ;
STATELIST *index ; STATELIST *index ;
@ -718,9 +684,7 @@ void simplebranch(root, value, group, optional)
subtree in the tree representing the grammar rule being processed and 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 the pointer to a flag that is set to indicate whether or not the
submodel can be null. */ submodel can be null. */
STATE *startfsa(root, canbenull) STATE *startfsa(TREE *root, LOGICAL *canbenull)
TREE *root ;
LOGICAL *canbenull ;
{ {
STATELIST *item ; STATELIST *item ;
STATE *first ; STATE *first ;

View file

@ -69,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ;
/* Deftype returns a string indicating the default type of the nth parameter. /* Deftype returns a string indicating the default type of the nth parameter.
*/ */
char *deftype(n) char *deftype(int n)
int n ;
{ {
switch (n) { switch (n) {
case NAME: return(mnamedef) ; case NAME: return(mnamedef) ;
@ -101,9 +100,7 @@ void done(void)
} }
/* Prints data value of an entry in the element name tree */ /* Prints data value of an entry in the element name tree */
void dumpentnode(file, value) void dumpentnode(FILE *file, M_TRIE *value)
FILE *file ;
M_TRIE *value ;
{ {
fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ; 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, /* Prints data value of an entry in the trie of short reference map names,
reporting any maps that are referenced but not defined */ reporting any maps that are referenced but not defined */
void dumpmapnode(file, value) void dumpmapnode(FILE *file, M_TRIE *value)
FILE *file ;
M_TRIE *value ;
{ {
fprintf(file, ", %d", ((MAP *) value)->map) ; fprintf(file, ", %d", ((MAP *) value)->map) ;
if (! ((MAP *) value)->defined) 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 */ /* Prints data value of an entry in the trie of short reference delimiters */
void dumpsrefnode(file, value) void dumpsrefnode(FILE *file, M_TRIE *value)
FILE *file ;
M_TRIE *value ;
{ {
fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ; fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ;
} }
@ -133,8 +126,7 @@ void dumpsrefnode(file, value)
/* Controls printing of element blocks in alphabetical order to the /* Controls printing of element blocks in alphabetical order to the
template file */ template file */
void eltblocks(tempfile) void eltblocks(FILE *tempfile)
FILE *tempfile ;
{ {
int n ; int n ;
M_TRIE *node[M_NAMELEN + 1] ; M_TRIE *node[M_NAMELEN + 1] ;
@ -223,8 +215,7 @@ void eltreeout(void)
} }
/* Enttype returns a string indicating the type of an entity */ /* Enttype returns a string indicating the type of an entity */
char *enttype(n) char *enttype(int n)
int n ;
{ {
switch(n) { switch(n) {
case M_GENERAL: return(mgeneral) ; 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. */ /* Partype returns a string indicating the type of the nth parameter. */
char *partype(n) char *partype(int n)
int n ;
{ {
switch(n) { switch(n) {
case GRPO: return(mkeyword) ; case GRPO: return(mkeyword) ;
@ -546,9 +536,7 @@ void srefout(void)
} }
/* Output one element block in a template */ /* Output one element block in a template */
void tempelt(eltp, tempfile) void tempelt(ELTSTRUCT *eltp, FILE *tempfile)
ELTSTRUCT *eltp ;
FILE *tempfile ;
{ {
PARAMETER *paramp ; PARAMETER *paramp ;
PTYPE *ptypep ; PTYPE *ptypep ;
@ -654,8 +642,7 @@ void template(void)
} }
/* Typecon returns a string indicating the content type of the nth element.*/ /* Typecon returns a string indicating the content type of the nth element.*/
char *typecon(n) char *typecon(int n)
int n ;
{ {
switch(n) { switch(n) {
case GRPO: return(mregexp) ; case GRPO: return(mregexp) ;

View file

@ -38,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "sref.h" #include "sref.h"
/* Reads a name */ /* Reads a name */
LOGICAL getname(first) LOGICAL getname(int first)
int first;
{ {
M_WCHAR *p; M_WCHAR *p;
int c; int c;

View file

@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL;
/* Add an entity with the default name constructed by adding a suffix /* 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 to the name of the short reference map in which it is invoked, and
a prefix m- */ a prefix m- */
void adddefent(mapname) void adddefent(M_WCHAR *mapname)
M_WCHAR *mapname;
{ {
M_WCHAR *p; M_WCHAR *p;
int n; int n;
@ -75,8 +74,7 @@ thissref->entidx = entity->index;
/* Add an entity, return FALSE if already there, TRUE if adding it. /* Add an entity, return FALSE if already there, TRUE if adding it.
Pointer to the entity structure is in global M_STRUCT *entity. */ Pointer to the entity structure is in global M_STRUCT *entity. */
LOGICAL addent(name) LOGICAL addent(M_WCHAR *name)
M_WCHAR *name;
{ {
M_ENTITY *new; M_ENTITY *new;
@ -128,16 +126,14 @@ return(TRUE);
} }
/* Add a named entity to a short reference map */ /* Add a named entity to a short reference map */
void addndent(p) void addndent(M_WCHAR *p)
M_WCHAR *p;
{ {
addent(p); addent(p);
thissref->entidx = entity->index; thissref->entidx = entity->index;
} }
/* Add a short reference delimiter */ /* Add a short reference delimiter */
void addsref(p) void addsref(M_WCHAR *p)
M_WCHAR *p;
{ {
SREFSTRUCT *delim; SREFSTRUCT *delim;
SREFSTRUCT *prevsr; SREFSTRUCT *prevsr;

View file

@ -44,8 +44,7 @@ void endmodel(void)
} }
/* Release storage used for the tree representation of a rule */ /* Release storage used for the tree representation of a rule */
void freetree(treep) void freetree(TREE *treep)
TREE *treep ;
{ {
TREE *child, *discard ; TREE *child, *discard ;

View file

@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entity.h" #include "entity.h"
/* Main program */ /* Main program */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
int m_token ; int m_token ;

View file

@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "version.h" #include "version.h"
/* Output indicated action pointer array to if.h */ /* Output indicated action pointer array to if.h */
void actptrout(array, name) void actptrout(ACTION **array, char *name)
ACTION **array;
char *name;
{ {
int i; int i;
@ -267,8 +265,7 @@ void endstring(void)
/* Set the type of an entity and check if different than declaration in /* Set the type of an entity and check if different than declaration in
BUILD */ BUILD */
void enttype(type) void enttype(int type)
int type;
{ {
if ((entity->type == M_PI && type == M_CODEPI) || if ((entity->type == M_PI && type == M_CODEPI) ||
(entity->type == M_SDATA && type == M_CODESDATA)); (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 /* Returns pointer to data field in action node for current chain of
elements */ elements */
int *getaction(array) int *getaction(ACTION **array)
ACTION **array;
{ {
ACTION *start, *node; ACTION *start, *node;
CHAIN *chainp; CHAIN *chainp;
@ -431,8 +427,7 @@ void outstring(void)
} }
/* Output #define's for parameter values */ /* Output #define's for parameter values */
void outpval(p) void outpval(M_TRIE *p)
M_TRIE *p;
{ {
M_WCHAR *q; M_WCHAR *q;
@ -530,14 +525,8 @@ void skiptoend(void)
} }
/* Starts processing a code segment from the input file */ /* Starts processing a code segment from the input file */
void startcode(caseno, flag, file, prefix, proto, formal, formtype) void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix,
int caseno; char *proto, char *formal, char *formtype)
LOGICAL *flag;
FILE *file;
char *prefix;
char *proto;
char *formal;
char *formtype;
{ {
CVARSTRUCT *cvarp; CVARSTRUCT *cvarp;
@ -631,8 +620,7 @@ void storepname(void)
} }
/* Called when a possible parameter value to be defined is encountered */ /* Called when a possible parameter value to be defined is encountered */
void value(p) void value(M_WCHAR *p)
M_WCHAR *p;
{ {
char buffer[5]; char buffer[5];

View file

@ -43,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "delim.h" #include "delim.h"
/* Reads a name token */ /* Reads a name token */
void getname(first) void getname(int first)
int first;
{ {
M_WCHAR *p, wus; M_WCHAR *p, wus;
int c, cttype; int c, cttype;

View file

@ -33,9 +33,7 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co.
#include <stdlib.h> #include <stdlib.h>
/* Write input file and line number for an error message */ /* Write input file and line number for an error message */
void m_dumpline(file, line) void m_dumpline(M_WCHAR *file, int line)
M_WCHAR *file;
int line;
{ {
char buffer[10]; char buffer[10];
char *mbyte; char *mbyte;
@ -71,8 +69,7 @@ m_errline(",\n");
} }
/* Process error message text */ /* Process error message text */
void m_errline(p) void m_errline(char *p)
char *p;
{ {
char c; char c;
@ -96,8 +93,7 @@ if (++m_errcnt == m_errlim)
} }
/* Exit procedure */ /* Exit procedure */
void m_exit(status) void m_exit(int status)
int status;
{ {
if (filefound) if (filefound)
{ {
@ -138,8 +134,7 @@ exit(0);
} }
/* Get-char procedure */ /* Get-char procedure */
int m_getc(m_ptr) int m_getc(void *m_ptr)
void *m_ptr;
{ {
int c; int c;
M_WCHAR wc; M_WCHAR wc;
@ -193,8 +188,7 @@ return((int) wc);
} }
/* Open SYSTEM entity procedure */ /* Open SYSTEM entity procedure */
void *m_openent(entcontent) void *m_openent(M_WCHAR *entcontent)
M_WCHAR *entcontent;
{ {
FILE *open; FILE *open;
char *filename; char *filename;
@ -272,7 +266,7 @@ return((void *) first);
} }
/* Set program options */ /* Set program options */
void m_setoptions() void m_setoptions(void)
{ {
/* F option used for FILELIST (checking done in basename, which is /* F option used for FILELIST (checking done in basename, which is
called before this function is called) */ called before this function is called) */
@ -298,8 +292,7 @@ void m_setoptions()
/* Process signon message text, stripping out MARKUP version number, so /* Process signon message text, stripping out MARKUP version number, so
only one version number will appear */ only one version number will appear */
void m_signmsg(p) void m_signmsg(char *p)
char *p;
{ {
char *q; char *q;
char *pCopy; char *pCopy;
@ -317,7 +310,7 @@ void m_signmsg(p)
/* All entity declarations have been processed. Can now check if .TEX /* All entity declarations have been processed. Can now check if .TEX
file uptodate and open appropriate output file */ file uptodate and open appropriate output file */
void m_startdoc() void m_startdoc(void)
{ {
LOGICAL init = TRUE; LOGICAL init = TRUE;
unsigned char type; unsigned char type;
@ -358,16 +351,14 @@ else
} }
/* Write debugging trace information */ /* Write debugging trace information */
void m_trace(p) void m_trace(char *p)
char *p;
{ {
if (tracetostd) fputs(p, stdout); if (tracetostd) fputs(p, stdout);
else fputs(p, m_outfile); else fputs(p, m_outfile);
} }
void m_wctrace(p) void m_wctrace(M_WCHAR *p)
M_WCHAR *p;
{ {
char *mb_p; char *mb_p;

View file

@ -250,8 +250,7 @@ else
/* This procedure starts a CHAPTER */ /* This procedure starts a CHAPTER */
void chapstart(id) void chapstart(M_WCHAR *id)
M_WCHAR *id;
{ {
M_WCHAR *p, *q, *wc; M_WCHAR *p, *q, *wc;
int i; int i;
@ -499,9 +498,7 @@ return ( 0 );
} /* end mb_getqualified */ } /* end mb_getqualified */
int getqualified (qualname, unqualname) int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname)
M_WCHAR *qualname;
M_WCHAR *unqualname;
{ {
int retval; int retval;
char mb_qualname[FNAMELEN], char mb_qualname[FNAMELEN],
@ -521,13 +518,9 @@ return retval;
/* handle the common link and graphic code for <p> and <image> */ /* handle the common link and graphic code for <p> and <image> */
void void
handle_link_and_graphic(parent, handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity,
gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
gposition, M_WCHAR *glinktype, M_WCHAR *gdescription)
ghyperlink,
glinktype,
gdescription)
M_WCHAR *parent, *gentity, *gposition, *ghyperlink, *glinktype, *gdescription;
{ {
unsigned char etype, wheredef; unsigned char etype, wheredef;
char *mb_content, *ssi, id[32]; char *mb_content, *ssi, id[32];
@ -921,8 +914,7 @@ if (item_id)
/* Start a rsect */ /* Start a rsect */
void rsectstart(id) void rsectstart(M_WCHAR *id)
M_WCHAR *id;
{ {
savid = checkid(id); savid = checkid(id);
iderr = FALSE; iderr = FALSE;
@ -942,8 +934,7 @@ rsectseq = FALSE;
/* Follow search path to find a file, returning qualified name */ /* Follow search path to find a file, returning qualified name */
M_WCHAR *searchforfile(file) M_WCHAR *searchforfile(M_WCHAR *file)
M_WCHAR *file;
{ {
M_WCHAR *filename; M_WCHAR *filename;
SEARCH *searchp; SEARCH *searchp;
@ -1064,9 +1055,7 @@ if (wc_id)
/* Start a labeled list */ /* Start a labeled list */
void StartLabList(spacing, longlabel) void StartLabList(M_WCHAR *spacing, M_WCHAR *longlabel)
M_WCHAR *spacing;
M_WCHAR *longlabel;
{ {
char *mb_spacing; char *mb_spacing;
static char def_spacing[] = "LOOSE"; static char def_spacing[] = "LOOSE";
@ -1249,7 +1238,7 @@ lastlist = nextlist;
} }
void EndList() void EndList(void)
{ {
LIST *curlist ; LIST *curlist ;
CONTCHAIN *chain, *xchain ; CONTCHAIN *chain, *xchain ;
@ -1589,7 +1578,7 @@ _DtLcxCloseDb(&myDb);
* fashion. * fashion.
*/ */
static char * static char *
GetStdLocale() GetStdLocale(void)
{ {
static char buffer[256]; static char buffer[256];
static char *cString = "C"; static char *cString = "C";
@ -1669,7 +1658,7 @@ return buffer;
* versions of the language and charset. * versions of the language and charset.
*/ */
void void
SetDefaultLocale() SetDefaultLocale(void)
{ {
unsigned char type,wheredef; unsigned char type,wheredef;
M_WCHAR *elementName; M_WCHAR *elementName;
@ -2186,14 +2175,14 @@ while (*wcp)
return(newstring); return(newstring);
} }
int NextId() int NextId(void)
{ {
static id = 0; static id = 0;
return ++id; return ++id;
} }
char *GetLanguage() char *GetLanguage(void)
{ {
static char *pLang = NULL; static char *pLang = NULL;
@ -2205,7 +2194,7 @@ if (!pLang)
return pLang; return pLang;
} }
char *GetCharset() char *GetCharset(void)
{ {
static char *pCharset = NULL; static char *pCharset = NULL;
@ -2632,7 +2621,7 @@ else
} }
void IncludeToss() void IncludeToss(void)
{ {
char pathbuf[BIGBUF]; char pathbuf[BIGBUF];
char *try = pathbuf; char *try = pathbuf;
@ -2768,7 +2757,7 @@ return(name) ;
* content is modified to be <SPC NAME="[......]"> so that it may be * content is modified to be <SPC NAME="[......]"> so that it may be
* emitted into the SDL output. * emitted into the SDL output.
*/ */
void ModifyEntities() void ModifyEntities(void)
{ {
unsigned char type; unsigned char type;
unsigned char wheredef; unsigned char wheredef;
@ -2931,7 +2920,7 @@ fputs(">\n", outfile);
needFData = TRUE; needFData = TRUE;
} }
void PopForm() void PopForm(void)
{ {
if (inBlock) if (inBlock)
{ {
@ -2947,7 +2936,7 @@ mb_free(&(formStackTop->rowVec));
--formStackTop; --formStackTop;
} }
void PopForm2() void PopForm2(void)
{ {
if (inBlock) 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 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. * is explicitly optional or due to the fact that text can be null.
*/ */
void PopFormMaybe() void PopFormMaybe(void)
{ {
if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1)) if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
{ {
@ -2977,7 +2966,7 @@ if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
} }
} }
void EmitSavedAnchors() void EmitSavedAnchors(void)
{ {
char buffer[BIGBUF]; char buffer[BIGBUF];
@ -2992,7 +2981,7 @@ if (parTextId)
} }
} }
void CloseVirpage() void CloseVirpage(void)
{ {
if (parTextId) if (parTextId)
{ {

View file

@ -31,8 +31,7 @@
/* Echo part of a head to the screen to indicate how much of the document /* Echo part of a head to the screen to indicate how much of the document
has been processed */ has been processed */
void echohead(p) void echohead(M_WCHAR *p)
M_WCHAR *p;
{ {
char *mb_p,*mb_string; char *mb_p,*mb_string;
@ -54,8 +53,7 @@ m_free(mb_string,"multi-byte string");
} }
/* call echohead with a literal string */ /* call echohead with a literal string */
void mb_echohead(p) void mb_echohead(char *p)
char *p;
{ {
M_WCHAR *wc; M_WCHAR *wc;
@ -104,7 +102,7 @@ echo = savhd = FALSE;
* location is placed in the snb file and the <snb> elements are * location is placed in the snb file and the <snb> elements are
* emitted there too. * emitted there too.
*/ */
void chksnb() void chksnb(void)
{ {
fputs("</HEAD>\n", outfile); fputs("</HEAD>\n", outfile);
snbstart = ftell(outfile); snbstart = ftell(outfile);
@ -276,10 +274,7 @@ else
/* Called for processing instruction */ /* Called for processing instruction */
void outpi(enttype, pi, entname) void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname)
int enttype;
M_WCHAR *pi;
M_WCHAR *entname;
{ {
strcode(pi, outfile); 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 /* Save a string in the array used to store table of contents entries
when processing a head */ when processing a head */
void shstring(addstring, len, max, storestring, msg, errflg) void shstring(M_WCHAR *addstring, int *len, int max,
M_WCHAR *addstring; M_WCHAR *storestring, char *msg, LOGICAL *errflg)
int *len;
int max;
M_WCHAR *storestring;
char *msg;
LOGICAL *errflg;
{ {
int addlength; int addlength;
@ -419,13 +409,8 @@ else
} }
void mb_shstring(addstring, len, max, storestring, msg, errflg) void mb_shstring(char *addstring, int *len, int max,
char *addstring; M_WCHAR *storestring, char *msg, LOGICAL *errflg)
int *len;
int max;
M_WCHAR *storestring;
char *msg;
LOGICAL *errflg;
{ {
M_WCHAR *wc_addstring; 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 */ /* Writes a string to the output file, and if appropriate saves it */
void strcode(string, outfile) void strcode(M_WCHAR *string, FILE *outfile)
M_WCHAR *string;
FILE *outfile;
{ {
char exbuff[32]; /* arbitrarily large */ char exbuff[32]; /* arbitrarily large */
int bufflen; int bufflen;
@ -492,9 +475,7 @@ if (savex)
} }
void mb_strcode(string, outfile) void mb_strcode(char *string, FILE *outfile)
char *string;
FILE *outfile;
{ {
M_WCHAR *wc; 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 */ /* Copies string to end of buffer where saving head for table of contents */
void svhdstring(string) void svhdstring(M_WCHAR *string)
M_WCHAR *string;
{ {
int length; int length;
@ -524,8 +504,7 @@ svheadlen += length;
} }
/* Copies string to end of buffer where saving table caption */ /* Copies string to end of buffer where saving table caption */
void svtcstring(string) void svtcstring(M_WCHAR *string)
M_WCHAR *string;
{ {
int length; int length;
@ -605,10 +584,7 @@ else
} }
/* Process a PI in a term */ /* Process a PI in a term */
void termpi(m_enttype, m_pi, m_entname) void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname)
int m_enttype;
M_WCHAR *m_pi;
M_WCHAR *m_entname;
{ {
int length; int length;

View file

@ -31,8 +31,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#include "globdec.h" #include "globdec.h"
/* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */ /* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */
M_WCHAR *checkid(id) M_WCHAR *checkid(M_WCHAR *id)
M_WCHAR *id;
{ {
struct xref *xref; struct xref *xref;
char *buffer; char *buffer;
@ -80,10 +79,7 @@ return(NULL);
} }
/* Write a single cross-reference macro definition */ /* Write a single cross-reference macro definition */
static void defxref(xfile, id, xref) static void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref)
FILE *xfile;
M_WCHAR *id;
struct xref *xref;
{ {
char *csname; char *csname;
char *p; char *p;
@ -191,8 +187,7 @@ while (TRUE)
} }
/* Copies string to end of current cross-reference string */ /* Copies string to end of current cross-reference string */
void idstring(string) void idstring(M_WCHAR *string)
M_WCHAR *string;
{ {
int length; int length;
@ -409,8 +404,7 @@ savid = NULL;
} }
/* Generate a cross-reference */ /* Generate a cross-reference */
void xrefexpand(id) void xrefexpand(M_WCHAR *id)
M_WCHAR *id;
{ {
struct xref *xref; struct xref *xref;
struct xref *old; struct xref *old;

View file

@ -44,8 +44,7 @@ in the interface definition.*/
#include "signon.h" #include "signon.h"
/* When an explicit or implied end-tag occurs */ /* When an explicit or implied end-tag occurs */
void m_endaction(m_elt) void m_endaction(M_ELEMENT m_elt)
M_ELEMENT m_elt;
{ {
M_ELEMENT m_action; M_ELEMENT m_action;
char buffer[2*MAXD+M_NAMELEN+1]; char buffer[2*MAXD+M_NAMELEN+1];
@ -76,9 +75,7 @@ void m_endaction(m_elt)
} }
/* Find appropriate action according to current stack */ /* Find appropriate action according to current stack */
int m_findact(elt, array) int m_findact(M_ELEMENT elt, int *array)
M_ELEMENT elt;
int *array;
{ {
int chainlen = 0; int chainlen = 0;
int index; int index;
@ -156,8 +153,7 @@ m_free(wc_string,"wide character string");
} }
/* When an explicit or implied start-tag occurs */ /* When an explicit or implied start-tag occurs */
void m_strtaction(m_elt) void m_strtaction(M_ELEMENT m_elt)
M_ELEMENT m_elt;
{ {
int m_par, m_i; int m_par, m_i;
M_WCHAR *m_p; M_WCHAR *m_p;

View file

@ -28,8 +28,7 @@
#include "userinc.h" #include "userinc.h"
#include "globdec.h" #include "globdec.h"
void m_closent(m_ptr) void m_closent(void *m_ptr)
void *m_ptr ;
{ {
fclose((FILE *) m_ptr) ; fclose((FILE *) m_ptr) ;
} }

View file

@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entfile.c" #include "entfile.c"
/* When a reference to a CODE entity is encountered */ /* When a reference to a CODE entity is encountered */
void m_codeent(m_ent) void m_codeent(int m_ent)
int m_ent ;
{ {
(*m_ctable[m_ent])() ; (*m_ctable[m_ent])() ;
} }

View file

@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#include "globdec.h" #include "globdec.h"
/* Displays current element after some error messages */ /* Displays current element after some error messages */
void m_dispcurelt(file, line) void m_dispcurelt(M_WCHAR *file, int line)
M_WCHAR *file ;
int line ;
{ {
char *mb_parent; char *mb_parent;

View file

@ -39,8 +39,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Perform the m_action-th end-code in the interface */ /* Perform the m_action-th end-code in the interface */
void m_endcase(m_action) void m_endcase(int m_action)
int m_action ;
{ {
(*m_etable[m_action])() ; (*m_etable[m_action])() ;
} }

View file

@ -52,8 +52,7 @@ void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
/* Check type specified in entity declaration for previously defined /* Check type specified in entity declaration for previously defined
entity. Testing to see if the new declaration is identical to the entity. Testing to see if the new declaration is identical to the
original one. */ original one. */
void m_eduptype(type) void m_eduptype(int type)
int type ;
{ {
if ((int) m_entity->type != type) { if ((int) m_entity->type != type) {
m_err1("Redefinition of entity %s ignored", m_entity->name) ; 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 */ /* Tests if an entity is too long */
void m_longent(context) void m_longent(int context)
int context ;
{ {
if (m_entclen >= M_LITLEN) { if (m_entclen >= M_LITLEN) {
m_curcon = context ; m_curcon = context ;
@ -74,8 +72,7 @@ void m_longent(context)
} }
/* Enters an entity name into the entity name tree */ /* Enters an entity name into the entity name tree */
void m_ntrent(p) void m_ntrent(M_WCHAR *p)
M_WCHAR *p ;
{ {
M_ENTITY *new ; M_ENTITY *new ;

View file

@ -40,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Issue error message (no arguments) */ /* Issue error message (no arguments) */
void m_error(text) void m_error(char *text)
char *text;
{ {
m_startmsg(); m_startmsg();
m_errline(text); m_errline(text);
@ -314,9 +313,7 @@ void m_err7(
/* Getline.c returns the name of the current input file and the number /* Getline.c returns the name of the current input file and the number
of the current line */ of the current line */
void m_getline(file, line) void m_getline(M_WCHAR **file, int *line)
M_WCHAR **file;
int *line;
{ {
int i; int i;

View file

@ -64,8 +64,7 @@ void m_etcomplete(void)
/* M_frcend is called after a syntax error to end element VAL even /* M_frcend is called after a syntax error to end element VAL even
if more content for that element is expected */ if more content for that element is expected */
void m_frcend(val) void m_frcend(M_ELEMENT val)
M_ELEMENT val ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
M_ELEMENT poppedval ; M_ELEMENT poppedval ;

View file

@ -33,8 +33,7 @@
/* Procedure callable by interface designer. Returns number of occurrences /* Procedure callable by interface designer. Returns number of occurrences
of element on parse stack */ of element on parse stack */
int m_level(elt) int m_level(M_WCHAR *elt)
M_WCHAR *elt ;
{ {
int i = 0 ; int i = 0 ;
M_PARSE *stackptr ; M_PARSE *stackptr ;
@ -48,8 +47,7 @@ int m_level(elt)
} }
int m_mblevel(elt) int m_mblevel(char *elt)
char *elt ;
{ {
int retval; int retval;
M_WCHAR *wc_elt; M_WCHAR *wc_elt;

View file

@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "parser.h" #include "parser.h"
#include "entext.h" #include "entext.h"
LOGICAL m_lookent(name, type, content, wheredef) LOGICAL m_lookent(M_WCHAR *name, unsigned char *type,
M_WCHAR *name ; M_WCHAR **content, unsigned char *wheredef)
unsigned char *type ;
M_WCHAR **content ;
unsigned char *wheredef ;
{ {
M_ENTITY *entity ; M_ENTITY *entity ;

View file

@ -99,11 +99,8 @@ void m_expecting(void)
/* Recursive procedure first called from expecting() to display /* Recursive procedure first called from expecting() to display
names of elements reachable from a particular node */ names of elements reachable from a particular node */
void m_expexpand(expstart, node, required, data) void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required,
LOGICAL *expstart ; LOGICAL *data)
M_STATE node ;
LOGICAL *required ;
LOGICAL *data ;
{ {
M_ARC parc ; M_ARC parc ;
M_ANDGROUP pand ; M_ANDGROUP pand ;
@ -125,10 +122,7 @@ void m_expexpand(expstart, node, required, data)
} }
/* M_expline writes one line for m_expecting() */ /* M_expline writes one line for m_expecting() */
void m_expline(expstart, data, label) void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label)
LOGICAL *expstart ;
LOGICAL *data ;
M_ELEMENT label ;
{ {
char buffer[M_NAMELEN + 2*MAXD + 1] ; 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 /* M_exptend is called from m_expecting to inform the user after an
error if an end tag is permitted */ error if an end tag is permitted */
void m_exptend(expstart, stackptr) void m_exptend(LOGICAL *expstart, M_PARSE *stackptr)
LOGICAL *expstart ;
M_PARSE *stackptr ;
{ {
char buffer[M_NAMELEN + 2*MAXD + 1] ; 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 element, 1 if character data is expected, and 0 (FALSE) if there is
no unique element. no unique element.
*/ */
M_ELEMENT m_findunique(from, newleft) M_ELEMENT m_findunique(M_STATE from, int *newleft)
M_STATE from ;
int *newleft ;
{ {
M_ARC parc ; M_ARC parc ;
M_ELEMENT cr = 0, minim = 0; 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 /* 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*/ the parse. If so, saves the element name in the MINVAL array*/
LOGICAL m_omitstart() LOGICAL m_omitstart(void)
{ {
M_ELEMENT c = M_NULLVAL ; M_ELEMENT c = M_NULLVAL ;

View file

@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#include "parser.h" #include "parser.h"
/* Get program options from a string */ /* Get program options from a string */
void m_optstring(p) void m_optstring(char *p)
char *p ;
{ {
if (strchr(p, 'a')) m_malftrace = TRUE ; if (strchr(p, 'a')) m_malftrace = TRUE ;
if (strchr(p, 'c')) m_chtrace = TRUE ; if (strchr(p, 'c')) m_chtrace = TRUE ;

View file

@ -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 /* Process the value for the parameter whose index number was previously
saved in m_ppsave */ saved in m_ppsave */
void m_attval(string) void m_attval(M_WCHAR *string)
M_WCHAR *string ;
{ {
const M_WCHAR *p ; 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 /* Process a string that is a parameter value not prefixed by the parameter
name and value indicator */ name and value indicator */
LOGICAL m_attvonly(string) LOGICAL m_attvonly(M_WCHAR *string)
M_WCHAR *string ;
{ {
const M_WCHAR *p ; const M_WCHAR *p ;
int par, i ; int par, i ;
@ -152,8 +150,7 @@ void m_findatt(void)
} }
/* Free the parameter storage associated with an element on the parse stack */ /* Free the parameter storage associated with an element on the parse stack */
void m_freeparam(stackelt) void m_freeparam(M_PARSE *stackelt)
M_PARSE *stackelt ;
{ {
int i ; int i ;
int par ; int par ;
@ -173,9 +170,7 @@ void m_freeparam(stackelt)
/* Force a parameter value to uppercase, if appropriate for its type. /* Force a parameter value to uppercase, if appropriate for its type.
Also, if list-valued attribute, remove leading and trailing spaces, Also, if list-valued attribute, remove leading and trailing spaces,
and condense white-space sequences to a single blank*/ and condense white-space sequences to a single blank*/
void m_parupper(par, string) void m_parupper(int par, M_WCHAR *string)
int par ;
M_WCHAR *string ;
{ {
M_WCHAR *p ; M_WCHAR *p ;
M_WCHAR *q ; M_WCHAR *q ;
@ -233,11 +228,7 @@ void m_stkdefaultparams(void)
} }
/* Stack one default parameter */ /* Stack one default parameter */
void m_stkonedef(par, scanel, poccur, i) void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i)
int par ;
M_ELEMENT scanel ;
M_WCHAR **poccur ;
int i ;
{ {
if (m_parameter[par - 1].deftype == M_REQUIRED || if (m_parameter[par - 1].deftype == M_REQUIRED ||
(m_parameter[par - 1].deftype == M_CURRENT && (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 /* 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 */ tag is a valid parameter name or value; if not, assume tag is ended */
LOGICAL m_validinpar(string) LOGICAL m_validinpar(M_WCHAR *string)
M_WCHAR *string ;
{ {
int par ; int par ;
M_WCHAR *p ; M_WCHAR *p ;

View file

@ -34,8 +34,7 @@
/* Procedure callable by interface designers. Returns pointer to name /* Procedure callable by interface designers. Returns pointer to name
of nth level parent of current element (0 is self, 1 is parent, 2 of nth level parent of current element (0 is self, 1 is parent, 2
is grandparent, etc.) */ is grandparent, etc.) */
M_WCHAR *m_parent(n) M_WCHAR *m_parent(int n)
int n ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;

View file

@ -38,9 +38,7 @@
static void scanloop(LOGICAL prolog); static void scanloop(LOGICAL prolog);
/* Main procedure */ /* Main procedure */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
M_WCHAR *wc_userdef; M_WCHAR *wc_userdef;

View file

@ -87,7 +87,7 @@ M_ELEMENT m_eltname(void)
} }
} }
int get_mb_cur_max() int get_mb_cur_max(void)
{ {
char *l; char *l;
int i; int i;

View file

@ -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 /* When a processing instruction or SDATA entity other than a CODE entity
occurs */ occurs */
void m_piaction(m_pi, m_entname, m_enttype) void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype)
M_WCHAR *m_pi ;
M_WCHAR *m_entname ;
int m_enttype ;
{ {
m_stackpar = m_stacktop->piparam ; m_stackpar = m_stacktop->piparam ;
(*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ; (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ;

View file

@ -62,8 +62,7 @@ int m_actgetc(void)
} }
/* Expand an entity reference */ /* Expand an entity reference */
void m_entexpand(openent) void m_entexpand(M_ENTITY *openent)
M_ENTITY *openent ;
{ {
M_WCHAR *p ; M_WCHAR *p ;
M_HOLDTYPE dchar ; M_HOLDTYPE dchar ;
@ -231,9 +230,7 @@ void m_entexpand(openent)
/* An srlen-character long short-reference delimiter has been found. Verify /* An srlen-character long short-reference delimiter has been found. Verify
that it is not the prefix of a general delimiter recognized in context*/ that it is not the prefix of a general delimiter recognized in context*/
LOGICAL m_gendelim(srlen, context) LOGICAL m_gendelim(int srlen, int context)
int srlen ;
int context ;
{ {
int ghold[MAXD + 1] ; int ghold[MAXD + 1] ;
int ucase ; int ucase ;
@ -321,8 +318,7 @@ LOGICAL m_gendelim(srlen, context)
/* Reads next input character from the current source file or from an /* Reads next input character from the current source file or from an
entity expansion */ entity expansion */
int m_getachar(dchar) int m_getachar(M_HOLDTYPE *dchar)
M_HOLDTYPE *dchar ;
{ {
int c ; int c ;
int i ; int i ;
@ -424,10 +420,7 @@ void m_getname(M_WCHAR first)
} }
/* Reads the next token */ /* Reads the next token */
int m_gettoken(c, dchar, context) int m_gettoken(int *c, M_HOLDTYPE *dchar, int context)
int *c ;
M_HOLDTYPE *dchar ;
int context ;
{ {
int hold[MAXD + 1], next ; int hold[MAXD + 1], next ;
int ucase ; int ucase ;
@ -551,8 +544,7 @@ int m_gettoken(c, dchar, context)
} }
/* Reads a literal */ /* Reads a literal */
void m_litproc(delim) void m_litproc(int delim)
int delim ;
{ {
int n, i ; int n, i ;
M_HOLDTYPE dchar ; M_HOLDTYPE dchar ;
@ -896,8 +888,7 @@ void m_setmap(int map, LOGICAL useoradd)
} }
/* Check for short reference delimiters */ /* Check for short reference delimiters */
void m_shortref(context) void m_shortref(int context)
int context ;
{ {
int n = 0 ; int n = 0 ;
int i ; int i ;

View file

@ -35,9 +35,7 @@
#include "parser.h" #include "parser.h"
/* Set a user-defined C variable to the corresponding parameter value */ /* Set a user-defined C variable to the corresponding parameter value */
void m_setparam(cvar, par) void m_setparam(M_WCHAR **cvar, int par)
M_WCHAR **cvar ;
int par ;
{ {
*cvar = m_stackpar->param[par] ; *cvar = m_stackpar->param[par] ;
} }

View file

@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "sfile.c" #include "sfile.c"
/* Perform the m_action-th start-code in the interface */ /* Perform the m_action-th start-code in the interface */
void m_strtcase(m_action) void m_strtcase(int m_action)
int m_action ;
{ {
(*m_stable[m_action])() ; (*m_stable[m_action])() ;
} }

View file

@ -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 is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively
if the element is allowed by content, not allowed, or allowed by an if the element is allowed by content, not allowed, or allowed by an
inclusion exception. */ inclusion exception. */
int m_checkstart(val) int m_checkstart(M_ELEMENT val)
M_ELEMENT val ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
int except ; int except ;
@ -238,8 +237,7 @@ void m_done(void)
} }
/* Process the endtag (implied, abbreviated, or explicit) for element C*/ /* Process the endtag (implied, abbreviated, or explicit) for element C*/
void m_endtag(c) void m_endtag(M_ELEMENT c)
M_ELEMENT c ;
{ {
m_endaction(c) ; m_endaction(c) ;
m_pop() ; m_pop() ;
@ -251,8 +249,7 @@ void m_endtag(c)
/* Check that the identified element is not prohibited in the current context /* Check that the identified element is not prohibited in the current context
by an exclusion exception */ by an exclusion exception */
LOGICAL m_excluded(elt) LOGICAL m_excluded(M_ELEMENT elt)
M_ELEMENT elt ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
int except ; int except ;
@ -270,8 +267,7 @@ LOGICAL m_excluded(elt)
/* Free the OPEN FSA substructures associated with an element on /* Free the OPEN FSA substructures associated with an element on
the parse stack */ the parse stack */
void m_freeFSA(stackelt) void m_freeFSA(M_PARSE *stackelt)
M_PARSE *stackelt ;
{ {
M_OPENFSA *fsastack ; M_OPENFSA *fsastack ;
M_ANDLIST *usedand ; M_ANDLIST *usedand ;
@ -290,9 +286,7 @@ void m_freeFSA(stackelt)
} }
/* Free storage used for tentative chain of tag minimizations */ /* Free storage used for tentative chain of tag minimizations */
void m_freemin(min, msg) void m_freemin(M_MIN *min, char *msg)
M_MIN *min ;
char *msg ;
{ {
M_MIN *discard ; 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 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 indicated by fsastack, or (if the and-group is within a seq-group) by
continuing past the and-group */ continuing past the and-group */
LOGICAL m_nextand(thisfsa, label) LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label)
M_OPENFSA *thisfsa ;
M_ELEMENT label ;
{ {
M_ANDLIST *newgroup ; M_ANDLIST *newgroup ;
M_ANDGROUP pand ; 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 character is treated differently so that if character data is not
allowed in the current context, an error message is issued with the allowed in the current context, an error message is issued with the
first character only and not with every character. */ first character only and not with every character. */
void m_strtcdata(scanval) void m_strtcdata(int scanval)
int scanval ;
{ {
if (! m_strtproc(M_NULLVAL)) if (! m_strtproc(M_NULLVAL))
if (m_whitespace((M_WCHAR) scanval)) { 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 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.) and restores it after returning from the last call to m_endtag.)
*/ */
LOGICAL m_strtproc(scanval) LOGICAL m_strtproc(M_ELEMENT scanval)
M_ELEMENT scanval ;
{ {
int check ; int check ;
M_PARSE *original ; M_PARSE *original ;

View file

@ -166,9 +166,7 @@ delim.h.
#include "cont.h" #include "cont.h"
/* Main procedure */ /* Main procedure */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
int n ; int n ;

View file

@ -81,8 +81,7 @@ void dumptree(LOGICAL sparse)
} }
/* Enter a delimiter into the delimiter tree for a particular context */ /* Enter a delimiter into the delimiter tree for a particular context */
void enterdelim(n) void enterdelim(int n)
int n;
{ {
if (! contree[n]) if (! contree[n])
{ {
@ -107,8 +106,7 @@ if (m_ntrtrie(dstruct->string,
} }
/* Read the code to be executed with a given state transition */ /* Read the code to be executed with a given state transition */
void getcode(n) void getcode(int n)
int n;
{ {
int c ; /* c is int instead of char for use with ungetc */ int c ; /* c is int instead of char for use with ungetc */
int nested = 1; int nested = 1;
@ -620,8 +618,7 @@ void nextcon(LOGICAL sparse)
/* If sparse matrix output option, generate a single element of transit /* If sparse matrix output option, generate a single element of transit
array */ array */
void prtctxt(column, value) void prtctxt(int column, int value)
int column, value;
{ {
static LOGICAL first = TRUE; static LOGICAL first = TRUE;
@ -656,8 +653,7 @@ void skiptoend(void)
} }
/* Return a character to the input stream for re-reading */ /* Return a character to the input stream for re-reading */
void unread(c) void unread(int c)
int c;
{ {
M_WCHAR wnl; M_WCHAR wnl;

View file

@ -28,9 +28,7 @@
void main(int argc, char **argv); void main(int argc, char **argv);
void main(argc, argv) void main(int argc, char **argv)
int argc ;
char **argv ;
{ {
if (argc != 2) { if (argc != 2) {
fprintf(stderr, "Usage: emptyfil filename\n") ; fprintf(stderr, "Usage: emptyfil filename\n") ;

View file

@ -49,8 +49,7 @@ char xerror[] = "ERROR" ;
/* Outputs entity definitions */ /* Outputs entity definitions */
#define ENTFILENAME 12 #define ENTFILENAME 12
void entout(fname) void entout(char *fname)
char *fname ;
{ {
char efilename[ENTFILENAME] ; char efilename[ENTFILENAME] ;
int count = 1 ; int count = 1 ;
@ -173,15 +172,13 @@ void entout(fname)
/* Entptr is called by m_dumptrie to output the value stored with a /* Entptr is called by m_dumptrie to output the value stored with a
particular entity in the entity trie */ particular entity in the entity trie */
void entptr(data) void entptr(M_ENTITY *data)
M_ENTITY *data ;
{ {
fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ; fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ;
} }
/* Typetype returns a string indicating the type of the nth entity.*/ /* Typetype returns a string indicating the type of the nth entity.*/
char *typetype(n) char *typetype(int n)
int n ;
{ {
switch(n) { switch(n) {
case M_GENERAL: return(xgeneral) ; case M_GENERAL: return(xgeneral) ;

View file

@ -83,16 +83,14 @@ void eprefix(LOGICAL flag)
/* Writes part of an error message. Called from m_malloc instead of /* 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 m_err1, since PARSER's version of m_err1 calls m_malloc and recursive
calls are possible when the heap is exhausted */ calls are possible when the heap is exhausted */
void m_errline(text) void m_errline(char *text)
char *text ;
{ {
fputs(text, stderr) ; fputs(text, stderr) ;
fputs(text, m_errfile) ; fputs(text, m_errfile) ;
} }
/* Writes an error message to standard error and file "error" */ /* Writes an error message to standard error and file "error" */
void m_error(text) void m_error(char *text)
char *text ;
{ {
eprefix(TRUE) ; eprefix(TRUE) ;
fprintf(stderr,"%s", text) ; fprintf(stderr,"%s", text) ;
@ -192,30 +190,26 @@ void esuffix(void)
} }
/* Print something to both stderr and m_errfile */ /* Print something to both stderr and m_errfile */
void msgline(text) void msgline(char *text)
char *text ;
{ {
fprintf(stderr, "%s", text) ; fprintf(stderr, "%s", text) ;
fprintf(m_errfile, "%s", text) ; fprintf(m_errfile, "%s", text) ;
} }
/* Print something to both stderr and m_errfile */ /* Print something to both stderr and m_errfile */
void msg1line(text, arg1) void msg1line(char *text, char *arg1)
char *text, *arg1 ;
{ {
fprintf(stderr, text, arg1) ; fprintf(stderr, text, arg1) ;
fprintf(m_errfile, text, arg1) ; fprintf(m_errfile, text, arg1) ;
} }
/* Trace used for m_malloc trace output */ /* Trace used for m_malloc trace output */
void m_trace(text) void m_trace(char *text)
char *text ;
{ {
m_errline(text) ; m_errline(text) ;
} }
void m_wctrace(text) void m_wctrace(M_WCHAR *text)
M_WCHAR *text ;
{ {
char *mb_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" */ /* Writes a nonfatal error message to standard error and file "error" */
void warning(text) void warning(char *text)
char *text ;
{ {
eprefix(FALSE) ; eprefix(FALSE) ;
fprintf(stderr,"%s", text) ; fprintf(stderr,"%s", text) ;

View file

@ -31,8 +31,7 @@ void m_exit(int status);
/* Exit function called by utilities used in PARSER and other programs in /* Exit function called by utilities used in PARSER and other programs in
the MARKUP system */ the MARKUP system */
void m_exit(status) void m_exit(int status)
int status ;
{ {
exit(status) ; exit(status) ;
} }

View file

@ -61,9 +61,7 @@ void copyfile(char *pfile1, char *pfile2);
int nextchar(FILE *file, struct data *data); int nextchar(FILE *file, struct data *data);
void main(argc, argv) void main(int argc, char **argv)
int argc ;
char **argv ;
{ {
FILE *one, *two ; FILE *one, *two ;
int c1, c2 ; int c1, c2 ;
@ -110,8 +108,7 @@ void main(argc, argv)
} }
/* copyfile inserted by ced, 12-1-89. */ /* copyfile inserted by ced, 12-1-89. */
void copyfile(pfile1,pfile2) void copyfile(char *pfile1, char *pfile2)
char *pfile1, *pfile2;
{ {
int ret; int ret;
char *pcmd; char *pcmd;
@ -128,9 +125,7 @@ void copyfile(pfile1,pfile2)
free(pcmd); free(pcmd);
} }
int nextchar(file, data) int nextchar(FILE *file, struct data *data)
FILE *file ;
struct data *data ;
{ {
while (data->linestart) { while (data->linestart) {
data->linestart = FALSE ; data->linestart = FALSE ;

View file

@ -34,10 +34,7 @@ void m_exit(int status);
void m_inctest(int *count, int limit, char *message); void m_inctest(int *count, int limit, char *message);
/* Increment a count and test against a limit */ /* Increment a count and test against a limit */
void m_inctest(count, limit, message) void m_inctest(int *count, int limit, char *message)
int *count ;
int limit ;
char *message ;
{ {
if (++*count <= limit) return ; if (++*count <= limit) return ;
m_err1("Internal error: %s exceeded", message) ; m_err1("Internal error: %s exceeded", message) ;

View file

@ -31,9 +31,7 @@ char *m_itoa(int n, char *s);
void reverse(char *s); void reverse(char *s);
char *m_itoa(n, s) /* convert n to characters in s */ char *m_itoa(int n, char *s) /* convert n to characters in s */
char s[];
int n;
{ {
int sign ; int sign ;
char *p = s ; char *p = s ;
@ -51,8 +49,7 @@ int n;
return(s) ; return(s) ;
} }
void reverse(s) void reverse(char s[])
char s[];
{ {
int c, i, j; int c, i, j;

View file

@ -32,8 +32,7 @@ int m_lower(int c);
/* Force a letter to lowercase */ /* Force a letter to lowercase */
int m_lower(c) int m_lower(int c)
int c ;
{ {
if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ; if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ;
return(c) ; return(c) ;

View file

@ -49,9 +49,7 @@ void *m_trace(char *text);
void *m_wctrace(M_WCHAR *text); void *m_wctrace(M_WCHAR *text);
void m_free(block, msg) void m_free(void *block, char *msg)
void *block ;
char *msg ;
{ {
char buffer[32] ; char buffer[32] ;
@ -71,9 +69,7 @@ void m_free(block, msg)
} }
} }
void *m_malloc(size, msg) void *m_malloc(int size, char *msg)
int size ;
char *msg ;
{ {
char buffer[32] ; char buffer[32] ;
void *p ; void *p ;
@ -105,10 +101,7 @@ void *m_malloc(size, msg)
return(p) ; return(p) ;
} }
void *m_realloc(ptr, size, msg) void *m_realloc(void *ptr, int size, char *msg)
void *ptr ;
int size ;
char *msg ;
{ {
char buffer[32] ; char buffer[32] ;
void *p ; void *p ;

View file

@ -35,9 +35,7 @@ void m_exit(int status);
void m_openchk(FILE **ptr, char *name, char *mode); void m_openchk(FILE **ptr, char *name, char *mode);
/* Open a file and check that the open succeeded */ /* Open a file and check that the open succeeded */
void m_openchk(ptr, name, mode) void m_openchk(FILE **ptr, char *name, char *mode)
FILE **ptr ;
char *name, *mode ;
{ {
*ptr = fopen(name, mode) ; *ptr = fopen(name, mode) ;
if (*ptr) return ; if (*ptr) return ;

View file

@ -72,9 +72,7 @@ return((int) wc);
} }
/* Reads the next token stored in a packed trie (as defined by context.dat) */ /* Reads the next token stored in a packed trie (as defined by context.dat) */
int gettoken(c, context) int gettoken(int *c, int context)
int *c;
int context;
{ {
int hold[MAXD + 1]; int hold[MAXD + 1];
int ucase; int ucase;
@ -123,8 +121,7 @@ return(M_NULLVAL);
} }
/* Reads a literal (called after the opening quotation mark is read) */ /* Reads a literal (called after the opening quotation mark is read) */
LOGICAL litproc(delim) LOGICAL litproc(int delim)
int delim;
{ {
int n, i, number; int n, i, number;
M_WCHAR *p, *pStart; /* bigger than wide versions of lit or lita */ 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 /* Returns a context-dependent delimiter string to input stream so
characters can be reread one at a time in another context */ characters can be reread one at a time in another context */
void undodelim(delim) void undodelim(M_WCHAR *delim)
M_WCHAR *delim;
{ {
M_WCHAR *p; M_WCHAR *p;
@ -234,8 +230,7 @@ while (TRUE)
/* Returns a character to the input stream to read again later. Unexplained /* Returns a character to the input stream to read again later. Unexplained
problems occurred using standard ungetc procedure; hence problems occurred using standard ungetc procedure; hence
explicit declaration of buffer for read-ahead characters */ explicit declaration of buffer for read-ahead characters */
void ungetachar(c) void ungetachar(int c)
int c;
{ {
M_WCHAR wnl; M_WCHAR wnl;

View file

@ -25,8 +25,7 @@
/* Sparse.c has a procedure used with the tables generated by program /* Sparse.c has a procedure used with the tables generated by program
CONTEXT when the sparse option is used */ CONTEXT when the sparse option is used */
int m_sprscon(i, j) int m_sprscon(int i, int j)
int i, j ;
{ {
int k ; int k ;

View file

@ -21,8 +21,8 @@
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
*/ */
/* $XConsortium: strstr.c /main/3 1995/11/08 09:54:55 rswiston $ */ /* $XConsortium: strstr.c /main/3 1995/11/08 09:54:55 rswiston $ */
char *strstr ( s1, s2 ) char *strstr (char *s1, char *s2)
char *s1, *s2 ; { {
int x, y ; int x, y ;

View file

@ -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 */ /* Enters a string and associated data value into a trie */
void *m_ntrtrie(p, xtrie, dataval) void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval)
M_WCHAR *p ;
M_TRIE *xtrie ;
void *dataval ;
{ {
M_TRIE *currentnode ; M_TRIE *currentnode ;
void *n ; void *n ;

View file

@ -40,9 +40,7 @@ void printval(FILE *file, void *value);
/* Count the descendants of a node in order to generate declarations for /* Count the descendants of a node in order to generate declarations for
the packed form of a trie*/ the packed form of a trie*/
void countdown(parent, count) void countdown(M_TRIE *parent, int *count)
M_TRIE *parent ;
int *count ;
{ {
M_TRIE *child ; M_TRIE *child ;
@ -54,12 +52,8 @@ void countdown(parent, count)
/* Output descendants of a node for the declaration of a trie, in packed /* Output descendants of a node for the declaration of a trie, in packed
or normal format*/ or normal format*/
void dumpnode(first, file, trieptr, count, proc) void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
LOGICAL *first ; void (*proc) (FILE *file, void *value))
FILE *file ;
M_TRIE *trieptr ;
int *count ;
void (*proc) (FILE *file, void *value);
{ {
M_TRIE *p ; M_TRIE *p ;
int savecount ; int savecount ;
@ -89,9 +83,7 @@ void dumpnode(first, file, trieptr, count, proc)
/* Most common procedure passed to dumpptrie */ /* Most common procedure passed to dumpptrie */
void printval(file, value) void printval(FILE *file, void *value)
FILE *file ;
void *value ;
{ {
fprintf(file, ", %ld", (long) value) ; fprintf(file, ", %ld", (long) value) ;
} }

View file

@ -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)); void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(void *value));
/* Write the C declaration of a trie */ /* Write the C declaration of a trie */
void m_dumptrie(file, xtrie, extname, count, proc) void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
FILE *file ; void (*proc)(void *value))
M_TRIE *xtrie ;
char *extname ;
int *count ;
void (*proc)(void *value);
{ {
int firstson ; int firstson ;
M_TRIE *p ; M_TRIE *p ;

View file

@ -38,13 +38,9 @@ void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char
void (*proc)(FILE *file, void *value)); void (*proc)(FILE *file, void *value));
/* Write the declaration of a packed trie to the specified files */ /* Write the declaration of a packed trie to the specified files */
void dumpptrie(intname, extname, file, externdef, defdef, proc) void dumpptrie(M_TRIE *intname, char *extname, FILE *file,
M_TRIE *intname ; char *externdef, char *defdef,
char *extname ; void (*proc) (FILE *file, void *value))
FILE *file ;
char *externdef ;
char *defdef ;
void (*proc) (FILE *file, void *value) ;
{ {
LOGICAL first = TRUE ; LOGICAL first = TRUE ;
int count = 0 ; int count = 0 ;

View file

@ -39,9 +39,7 @@ extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name); int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
/* Look for the string NAME in the packed trie PTRIE */ /* Look for the string NAME in the packed trie PTRIE */
int m_packedlook(xptrie, name) int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name)
M_PTRIE *xptrie ;
M_WCHAR *name ;
{ {
int current = 0 ; int current = 0 ;
int i ; int i ;

View file

@ -33,10 +33,7 @@
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
/* Changes the value associated with an entry in a trie. */ /* Changes the value associated with an entry in a trie. */
void *m_resettrie(xtrie, p, value) void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value)
M_TRIE *xtrie ;
M_WCHAR *p ;
void *value ;
{ {
M_TRIE *currentnode ; M_TRIE *currentnode ;

View file

@ -214,8 +214,7 @@ return wc_stringStart;
/* Get-wide-char procedure */ /* Get-wide-char procedure */
int mb_getwc(m_ptr) int mb_getwc(void *m_ptr)
void *m_ptr;
{ {
int c; int c;
M_WCHAR wc; M_WCHAR wc;

View file

@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entdef.h" #include "entdef.h"
/* Main procedure */ /* Main procedure */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
int m_prevcon ; int m_prevcon ;

View file

@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Verify that <PARAM>, <MIN> or <USEMAP> has not previously occurred in /* Verify that <PARAM>, <MIN> or <USEMAP> has not previously occurred in
this rule */ this rule */
void found(flag, delim) void found(LOGICAL *flag, char *delim)
LOGICAL *flag;
char *delim;
{ {
M_WCHAR wcbuff[129]; M_WCHAR wcbuff[129];
ssize_t length; ssize_t length;

View file

@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "build.h" #include "build.h"
/* Enters an element name into the element name tree */ /* Enters an element name into the element name tree */
ELTSTRUCT *ntrelt(p) ELTSTRUCT *ntrelt(M_WCHAR *p)
M_WCHAR *p ;
{ {
ELTSTRUCT *new ; ELTSTRUCT *new ;
ELTSTRUCT *old ; ELTSTRUCT *old ;

View file

@ -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 /*checkand is used to verify nondeterminism from start and final states
of FSA's generated from and groups*/ of FSA's generated from and groups*/
void checkand(andstart, andptr, start, root, errelt) void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, ELTSTRUCT **errelt)
ANDGROUP *andstart, *andptr ;
STATE *start ;
TREE *root ;
ELTSTRUCT **errelt ;
{ {
ARC *parc ; ARC *parc ;
ANDGROUP *pand ; 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 /*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 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. */ FSA labelling an arc from the same state) has the same label. */
int checkdfsa(from, label, and, id, errelt) int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt)
STATE *from ;
ELTSTRUCT *label ;
ANDGROUP *and ;
int id ;
ELTSTRUCT **errelt ;
{ {
int c ; int c ;
ARC *parc ; ARC *parc ;
@ -116,10 +107,7 @@ int checkdfsa(from, label, and, id, errelt)
} }
/* Check use of repeated models with and groups */ /* Check use of repeated models with and groups */
int checkrepeat(from, and, errelt) int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt)
STATE *from ;
ANDGROUP *and ;
ELTSTRUCT **errelt ;
{ {
ARC *parc ; ARC *parc ;
int c ; int c ;
@ -142,8 +130,7 @@ int checkrepeat(from, and, errelt)
} }
/* Copyintolist copies one list of states into another */ /* Copyintolist copies one list of states into another */
void copyintolist(from, to) void copyintolist(STATELIST *from, STATELIST **to)
STATELIST *from, **to ;
{ {
STATELIST **new, *old ; STATELIST **new, *old ;
@ -161,8 +148,7 @@ void copyintolist(from, to)
} }
/* Dellist deletes a list of states */ /* Dellist deletes a list of states */
void dellist(list) void dellist(STATELIST **list)
STATELIST **list ;
{ {
STATELIST *p, *q ; STATELIST *p, *q ;
@ -220,10 +206,7 @@ STATE *getstate(void)
} }
/* Makeand processes a submodel whose connector is & */ /* Makeand processes a submodel whose connector is & */
void makeand(canbenull, root, optional) void makeand(LOGICAL *canbenull, TREE *root, int optional)
LOGICAL *canbenull ;
TREE *root ;
int optional ;
{ {
TREE *child ; TREE *child ;
STATELIST *start, *final ; STATELIST *start, *final ;
@ -308,9 +291,7 @@ void makeand(canbenull, root, optional)
allfinal is passed from model to submodel; information in newfinal allfinal is passed from model to submodel; information in newfinal
goes from submodel to model. goes from submodel to model.
*/ */
LOGICAL makefsa(root, optional) LOGICAL makefsa(TREE *root, int optional)
TREE *root ;
int optional ;
{ {
LOGICAL canbenull ; LOGICAL canbenull ;
@ -344,9 +325,7 @@ LOGICAL makefsa(root, optional)
} }
/* Makeor processes a submodel whose connector is | */ /* Makeor processes a submodel whose connector is | */
void makeor(canbenull, root) void makeor(LOGICAL *canbenull, TREE *root)
LOGICAL *canbenull ;
TREE *root ;
{ {
TREE *child ; TREE *child ;
STATELIST *final ; STATELIST *final ;
@ -368,10 +347,7 @@ void makeor(canbenull, root)
} }
/* Makeseq processes a submodel whose connector is , */ /* Makeseq processes a submodel whose connector is , */
void makeseq(canbenull, root, optional) void makeseq(LOGICAL *canbenull, TREE *root, int optional)
LOGICAL *canbenull ;
TREE *root ;
int optional ;
{ {
LOGICAL branchnull ; LOGICAL branchnull ;
STATELIST *keepfinal = NULL, *final ; STATELIST *keepfinal = NULL, *final ;
@ -409,10 +385,7 @@ void makeseq(canbenull, root, optional)
/* Nondeterm issues a diagnostic when a nondeterministic model is /* Nondeterm issues a diagnostic when a nondeterministic model is
encountered */ encountered */
void nondeterm(root, c, eltp) void nondeterm(TREE *root, int c, ELTSTRUCT *eltp)
TREE *root ;
int c ;
ELTSTRUCT *eltp ;
{ {
M_WCHAR *wtemp; 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, /* 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 */ it makes sure that the stored nesting level is the smaller of the two */
LOGICAL notinlist(item, list) LOGICAL notinlist(STATELIST *item, STATELIST *list)
STATELIST *item, *list ;
{ {
for ( ; list ; list = list->next) for ( ; list ; list = list->next)
if (list->value == item->value) { 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 /* Returns true if the arc is labeled #PCDATA or with an and-group that
has an arc labelled #PCDATA from a start state */ has an arc labelled #PCDATA from a start state */
LOGICAL permitspcd(a) LOGICAL permitspcd(ARC *a)
ARC *a ;
{ {
ANDGROUP *pand ; ANDGROUP *pand ;
ARC *b ; ARC *b ;
@ -507,8 +478,7 @@ void push(void)
/* Regenerate is used in error processing to print the portion of a grammar /* Regenerate is used in error processing to print the portion of a grammar
rule preceding an error */ rule preceding an error */
LOGICAL regenerate(start, stop) LOGICAL regenerate(TREE *start, TREE *stop)
TREE *start, *stop ;
{ {
TREE *child ; TREE *child ;
@ -554,8 +524,7 @@ return(FALSE) ;
by adding arcs from all the final states to all the states reachable 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 in one transition from a start state, labelling them as arcs from
start states are labelled. */ start states are labelled. */
void repeat(root) void repeat(TREE *root)
TREE *root ;
{ {
STATELIST *final ; STATELIST *final ;
ARC *a ; ARC *a ;
@ -606,9 +575,7 @@ void repeat(root)
/* Used during processing of occurrence indicators in content models such /* Used during processing of occurrence indicators in content models such
as (a+)+ to prohibit duplicate arcs */ as (a+)+ to prohibit duplicate arcs */
LOGICAL samelabelarc(a, s) LOGICAL samelabelarc(ARC *a, STATE *s)
ARC *a ;
STATE *s ;
{ {
ARC *b ; ARC *b ;
@ -666,11 +633,7 @@ void savestartarcs(void)
/* Simplebranch adds a new state and transition to it in an FSA when a /* 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 */ submodel consists of a single element or of an and group */
void simplebranch(root, value, group, optional) void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional)
TREE *root ;
ELTSTRUCT *value ;
ANDGROUP *group ;
int optional ;
{ {
STATE *new = NULL ; STATE *new = NULL ;
STATELIST *index ; STATELIST *index ;
@ -718,9 +681,7 @@ void simplebranch(root, value, group, optional)
subtree in the tree representing the grammar rule being processed and 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 the pointer to a flag that is set to indicate whether or not the
submodel can be null. */ submodel can be null. */
STATE *startfsa(root, canbenull) STATE *startfsa(TREE *root, LOGICAL *canbenull)
TREE *root ;
LOGICAL *canbenull ;
{ {
STATELIST *item ; STATELIST *item ;
STATE *first ; STATE *first ;

View file

@ -69,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ;
/* Deftype returns a string indicating the default type of the nth parameter. /* Deftype returns a string indicating the default type of the nth parameter.
*/ */
char *deftype(n) char *deftype(int n)
int n ;
{ {
switch (n) { switch (n) {
case NAME: return(mnamedef) ; case NAME: return(mnamedef) ;
@ -101,9 +100,7 @@ void done(void)
} }
/* Prints data value of an entry in the element name tree */ /* Prints data value of an entry in the element name tree */
void dumpentnode(file, value) void dumpentnode(FILE *file, M_TRIE *value)
FILE *file ;
M_TRIE *value ;
{ {
fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ; 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, /* Prints data value of an entry in the trie of short reference map names,
reporting any maps that are referenced but not defined */ reporting any maps that are referenced but not defined */
void dumpmapnode(file, value) void dumpmapnode(FILE *file, M_TRIE *value)
FILE *file ;
M_TRIE *value ;
{ {
fprintf(file, ", %d", ((MAP *) value)->map) ; fprintf(file, ", %d", ((MAP *) value)->map) ;
if (! ((MAP *) value)->defined) 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 */ /* Prints data value of an entry in the trie of short reference delimiters */
void dumpsrefnode(file, value) void dumpsrefnode(FILE *file, M_TRIE *value)
FILE *file ;
M_TRIE *value ;
{ {
fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ; fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ;
} }
@ -133,8 +126,7 @@ void dumpsrefnode(file, value)
/* Controls printing of element blocks in alphabetical order to the /* Controls printing of element blocks in alphabetical order to the
template file */ template file */
void eltblocks(tempfile) void eltblocks(FILE *tempfile)
FILE *tempfile ;
{ {
int n ; int n ;
M_TRIE *node[M_NAMELEN + 1] ; M_TRIE *node[M_NAMELEN + 1] ;
@ -223,8 +215,7 @@ void eltreeout(void)
} }
/* Enttype returns a string indicating the type of an entity */ /* Enttype returns a string indicating the type of an entity */
char *enttype(n) char *enttype(int n)
int n ;
{ {
switch(n) { switch(n) {
case M_GENERAL: return(mgeneral) ; 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. */ /* Partype returns a string indicating the type of the nth parameter. */
char *partype(n) char *partype(int n)
int n ;
{ {
switch(n) { switch(n) {
case GRPO: return(mkeyword) ; case GRPO: return(mkeyword) ;
@ -545,9 +535,7 @@ void srefout(void)
} }
/* Output one element block in a template */ /* Output one element block in a template */
void tempelt(eltp, tempfile) void tempelt(ELTSTRUCT *eltp, FILE *tempfile)
ELTSTRUCT *eltp ;
FILE *tempfile ;
{ {
PARAMETER *paramp ; PARAMETER *paramp ;
PTYPE *ptypep ; PTYPE *ptypep ;
@ -653,8 +641,7 @@ void template(void)
} }
/* Typecon returns a string indicating the content type of the nth element.*/ /* Typecon returns a string indicating the content type of the nth element.*/
char *typecon(n) char *typecon(int n)
int n ;
{ {
switch(n) { switch(n) {
case GRPO: return(mregexp) ; case GRPO: return(mregexp) ;

View file

@ -38,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "sref.h" #include "sref.h"
/* Reads a name */ /* Reads a name */
LOGICAL getname(first) LOGICAL getname(int first)
int first;
{ {
M_WCHAR *p; M_WCHAR *p;
int c; int c;

View file

@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL;
/* Add an entity with the default name constructed by adding a suffix /* 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 to the name of the short reference map in which it is invoked, and
a prefix m- */ a prefix m- */
void adddefent(mapname) void adddefent(M_WCHAR *mapname)
M_WCHAR *mapname;
{ {
M_WCHAR *p; M_WCHAR *p;
int n; int n;
@ -75,8 +74,7 @@ thissref->entidx = entity->index;
/* Add an entity, return FALSE if already there, TRUE if adding it. /* Add an entity, return FALSE if already there, TRUE if adding it.
Pointer to the entity structure is in global M_STRUCT *entity. */ Pointer to the entity structure is in global M_STRUCT *entity. */
LOGICAL addent(name) LOGICAL addent(M_WCHAR *name)
M_WCHAR *name;
{ {
M_ENTITY *new; M_ENTITY *new;
@ -128,16 +126,14 @@ return(TRUE);
} }
/* Add a named entity to a short reference map */ /* Add a named entity to a short reference map */
void addndent(p) void addndent(M_WCHAR *p)
M_WCHAR *p;
{ {
addent(p); addent(p);
thissref->entidx = entity->index; thissref->entidx = entity->index;
} }
/* Add a short reference delimiter */ /* Add a short reference delimiter */
void addsref(p) void addsref(M_WCHAR *p)
M_WCHAR *p;
{ {
SREFSTRUCT *delim; SREFSTRUCT *delim;
SREFSTRUCT *prevsr; SREFSTRUCT *prevsr;

View file

@ -44,8 +44,7 @@ void endmodel(void)
} }
/* Release storage used for the tree representation of a rule */ /* Release storage used for the tree representation of a rule */
void freetree(treep) void freetree(TREE *treep)
TREE *treep ;
{ {
TREE *child, *discard ; TREE *child, *discard ;

View file

@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entity.h" #include "entity.h"
/* Main program */ /* Main program */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
int m_token ; int m_token ;

View file

@ -46,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "version.h" #include "version.h"
/* Output indicated action pointer array to if.h */ /* Output indicated action pointer array to if.h */
void actptrout(array, name) void actptrout(ACTION **array, char *name)
ACTION **array;
char *name;
{ {
int i; int i;
@ -267,8 +265,7 @@ void endstring(void)
/* Set the type of an entity and check if different than declaration in /* Set the type of an entity and check if different than declaration in
BUILD */ BUILD */
void enttype(type) void enttype(int type)
int type;
{ {
if ((entity->type == M_PI && type == M_CODEPI) || if ((entity->type == M_PI && type == M_CODEPI) ||
(entity->type == M_SDATA && type == M_CODESDATA)); (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 /* Returns pointer to data field in action node for current chain of
elements */ elements */
int *getaction(array) int *getaction(ACTION **array)
ACTION **array;
{ {
ACTION *start, *node; ACTION *start, *node;
CHAIN *chainp; CHAIN *chainp;
@ -431,8 +427,7 @@ void outstring(void)
} }
/* Output #define's for parameter values */ /* Output #define's for parameter values */
void outpval(p) void outpval(M_TRIE *p)
M_TRIE *p;
{ {
M_WCHAR *q; M_WCHAR *q;
@ -530,14 +525,8 @@ void skiptoend(void)
} }
/* Starts processing a code segment from the input file */ /* Starts processing a code segment from the input file */
void startcode(caseno, flag, file, prefix, proto, formal, formtype) void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix,
int caseno; char *proto, char *formal, char *formtype)
LOGICAL *flag;
FILE *file;
char *prefix;
char *proto;
char *formal;
char *formtype;
{ {
CVARSTRUCT *cvarp; CVARSTRUCT *cvarp;
@ -631,8 +620,7 @@ void storepname(void)
} }
/* Called when a possible parameter value to be defined is encountered */ /* Called when a possible parameter value to be defined is encountered */
void value(p) void value(M_WCHAR *p)
M_WCHAR *p;
{ {
char buffer[5]; char buffer[5];

View file

@ -43,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "delim.h" #include "delim.h"
/* Reads a name token */ /* Reads a name token */
void getname(first) void getname(int first)
int first;
{ {
M_WCHAR *p, wus; M_WCHAR *p, wus;
int c, cttype; int c, cttype;

View file

@ -33,9 +33,7 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co.
#include <stdlib.h> #include <stdlib.h>
/* Write input file and line number for an error message */ /* Write input file and line number for an error message */
void m_dumpline(file, line) void m_dumpline(M_WCHAR *file, int line)
M_WCHAR *file;
int line;
{ {
char buffer[10]; char buffer[10];
char *mbyte; char *mbyte;
@ -71,8 +69,7 @@ m_errline(",\n");
} }
/* Process error message text */ /* Process error message text */
void m_errline(p) void m_errline(char *p)
char *p;
{ {
char c; char c;
@ -96,8 +93,7 @@ if (++m_errcnt == m_errlim)
} }
/* Exit procedure */ /* Exit procedure */
void m_exit(status) void m_exit(int status)
int status;
{ {
if (filefound) if (filefound)
{ {
@ -134,8 +130,7 @@ exit(0);
} }
/* Get-char procedure */ /* Get-char procedure */
int m_getc(m_ptr) int m_getc(void *m_ptr)
void *m_ptr;
{ {
int c; int c;
M_WCHAR wc; M_WCHAR wc;
@ -189,8 +184,7 @@ return((int) wc);
} }
/* Open SYSTEM entity procedure */ /* Open SYSTEM entity procedure */
void *m_openent(entcontent) void *m_openent(M_WCHAR *entcontent)
M_WCHAR *entcontent;
{ {
FILE *open; FILE *open;
char *filename; char *filename;
@ -270,7 +264,7 @@ return((void *) first);
} }
/* Set program options */ /* Set program options */
void m_setoptions() void m_setoptions(void)
{ {
/* F option used for FILELIST (checking done in basename, which is /* F option used for FILELIST (checking done in basename, which is
called before this function is called) */ called before this function is called) */
@ -284,8 +278,7 @@ if (m_argc > 2)
/* Process signon message text, stripping out MARKUP version number, so /* Process signon message text, stripping out MARKUP version number, so
only one version number will appear */ only one version number will appear */
void m_signmsg(p) void m_signmsg(char *p)
char *p;
{ {
char *q; char *q;
char *pCopy; char *pCopy;
@ -305,7 +298,7 @@ void m_signmsg(p)
/* All entity declarations have been processed. Can now check if .TEX /* All entity declarations have been processed. Can now check if .TEX
file uptodate and open appropriate output file */ file uptodate and open appropriate output file */
void m_startdoc() void m_startdoc(void)
{ {
LOGICAL init = TRUE; LOGICAL init = TRUE;
unsigned char type; unsigned char type;
@ -345,16 +338,14 @@ else
} }
/* Write debugging trace information */ /* Write debugging trace information */
void m_trace(p) void m_trace(char *p)
char *p;
{ {
if (tracetostd) fputs(p, stdout); if (tracetostd) fputs(p, stdout);
else fputs(p, m_outfile); else fputs(p, m_outfile);
} }
void m_wctrace(p) void m_wctrace(M_WCHAR *p)
M_WCHAR *p;
{ {
char *mb_p; char *mb_p;

View file

@ -250,8 +250,7 @@ else
/* This procedure starts a CHAPTER */ /* This procedure starts a CHAPTER */
void chapstart(id) void chapstart(M_WCHAR *id)
M_WCHAR *id;
{ {
M_WCHAR *p, *q, *wc; M_WCHAR *p, *q, *wc;
int i; int i;
@ -498,9 +497,7 @@ return ( 0 );
} /* end mb_getqualified */ } /* end mb_getqualified */
int getqualified (qualname, unqualname) int getqualified(M_WCHAR *qualname, M_WCHAR *unqualname)
M_WCHAR *qualname;
M_WCHAR *unqualname;
{ {
int retval; int retval;
char mb_qualname[FNAMELEN], char mb_qualname[FNAMELEN],
@ -520,13 +517,9 @@ return retval;
/* handle the common link and graphic code for <p> and <image> */ /* handle the common link and graphic code for <p> and <image> */
void void
handle_link_and_graphic(parent, handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity,
gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
gposition, M_WCHAR *glinktype, M_WCHAR *gdescription)
ghyperlink,
glinktype,
gdescription)
M_WCHAR *parent, *gentity, *gposition, *ghyperlink, *glinktype, *gdescription;
{ {
unsigned char etype, wheredef; unsigned char etype, wheredef;
char *mb_content, *ssi, id[32]; char *mb_content, *ssi, id[32];
@ -912,8 +905,7 @@ if (item_id)
/* Start a rsect */ /* Start a rsect */
void rsectstart(id) void rsectstart(M_WCHAR *id)
M_WCHAR *id;
{ {
savid = checkid(id); savid = checkid(id);
iderr = FALSE; iderr = FALSE;
@ -933,8 +925,7 @@ rsectseq = FALSE;
/* Follow search path to find a file, returning qualified name */ /* Follow search path to find a file, returning qualified name */
M_WCHAR *searchforfile(file) M_WCHAR *searchforfile(M_WCHAR *file)
M_WCHAR *file;
{ {
M_WCHAR *filename; M_WCHAR *filename;
SEARCH *searchp; SEARCH *searchp;
@ -1055,9 +1046,7 @@ if (wc_id)
/* Start a labeled list */ /* Start a labeled list */
void StartLabList(spacing, longlabel) void StartLabList(M_WCHAR *spacing, M_WCHAR *longlabel)
M_WCHAR *spacing;
M_WCHAR *longlabel;
{ {
char *mb_spacing; char *mb_spacing;
static char def_spacing[] = "LOOSE"; static char def_spacing[] = "LOOSE";
@ -1240,7 +1229,7 @@ lastlist = nextlist;
} }
void EndList() void EndList(void)
{ {
LIST *curlist ; LIST *curlist ;
CONTCHAIN *chain, *xchain ; CONTCHAIN *chain, *xchain ;
@ -1658,7 +1647,7 @@ return buffer;
* versions of the language and charset. * versions of the language and charset.
*/ */
void void
SetDefaultLocale() SetDefaultLocale(void)
{ {
unsigned char type,wheredef; unsigned char type,wheredef;
M_WCHAR *elementName; M_WCHAR *elementName;
@ -2173,14 +2162,14 @@ while (*wcp)
return(newstring); return(newstring);
} }
int NextId() int NextId(void)
{ {
static id = 0; static id = 0;
return ++id; return ++id;
} }
char *GetLanguage() char *GetLanguage(void)
{ {
static char *pLang = NULL; static char *pLang = NULL;
@ -2192,7 +2181,7 @@ if (!pLang)
return pLang; return pLang;
} }
char *GetCharset() char *GetCharset(void)
{ {
static char *pCharset = NULL; static char *pCharset = NULL;
@ -2755,7 +2744,7 @@ return(name) ;
* content is modified to be <SPC NAME="[......]"> so that it may be * content is modified to be <SPC NAME="[......]"> so that it may be
* emitted into the SDL output. * emitted into the SDL output.
*/ */
void ModifyEntities() void ModifyEntities(void)
{ {
unsigned char type; unsigned char type;
unsigned char wheredef; unsigned char wheredef;
@ -2918,7 +2907,7 @@ fputs(">\n", outfile);
needFData = TRUE; needFData = TRUE;
} }
void PopForm() void PopForm(void)
{ {
if (inBlock) if (inBlock)
{ {
@ -2934,7 +2923,7 @@ mb_free(&(formStackTop->rowVec));
--formStackTop; --formStackTop;
} }
void PopForm2() void PopForm2(void)
{ {
if (inBlock) 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 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. * is explicitly optional or due to the fact that text can be null.
*/ */
void PopFormMaybe() void PopFormMaybe(void)
{ {
if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1)) if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
{ {
@ -2964,7 +2953,7 @@ if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
} }
} }
void EmitSavedAnchors() void EmitSavedAnchors(void)
{ {
char buffer[BIGBUF]; char buffer[BIGBUF];
@ -2979,7 +2968,7 @@ if (parTextId)
} }
} }
void CloseVirpage() void CloseVirpage(void)
{ {
if (parTextId) if (parTextId)
{ {

View file

@ -31,8 +31,7 @@
/* Echo part of a head to the screen to indicate how much of the document /* Echo part of a head to the screen to indicate how much of the document
has been processed */ has been processed */
void echohead(p) void echohead(M_WCHAR *p)
M_WCHAR *p;
{ {
char *mb_p,*mb_string; char *mb_p,*mb_string;
@ -54,8 +53,7 @@ m_free(mb_string,"multi-byte string");
} }
/* call echohead with a literal string */ /* call echohead with a literal string */
void mb_echohead(p) void mb_echohead(char *p)
char *p;
{ {
M_WCHAR *wc; M_WCHAR *wc;
@ -104,7 +102,7 @@ echo = savhd = FALSE;
* location is placed in the snb file and the <snb> elements are * location is placed in the snb file and the <snb> elements are
* emitted there too. * emitted there too.
*/ */
void chksnb() void chksnb(void)
{ {
fputs("</HEAD>\n", outfile); fputs("</HEAD>\n", outfile);
snbstart = ftell(outfile); snbstart = ftell(outfile);
@ -276,10 +274,7 @@ else
/* Called for processing instruction */ /* Called for processing instruction */
void outpi(enttype, pi, entname) void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname)
int enttype;
M_WCHAR *pi;
M_WCHAR *entname;
{ {
strcode(pi, outfile); 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 /* Save a string in the array used to store table of contents entries
when processing a head */ when processing a head */
void shstring(addstring, len, max, storestring, msg, errflg) void shstring(M_WCHAR *addstring, int *len, int max,
M_WCHAR *addstring; M_WCHAR *storestring, char *msg, LOGICAL *errflg)
int *len;
int max;
M_WCHAR *storestring;
char *msg;
LOGICAL *errflg;
{ {
int addlength; int addlength;
@ -419,13 +409,8 @@ else
} }
void mb_shstring(addstring, len, max, storestring, msg, errflg) void mb_shstring(char *addstring, int *len, int max,
char *addstring; M_WCHAR *storestring, char *msg, LOGICAL *errflg)
int *len;
int max;
M_WCHAR *storestring;
char *msg;
LOGICAL *errflg;
{ {
M_WCHAR *wc_addstring; 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 */ /* Writes a string to the output file, and if appropriate saves it */
void strcode(string, outfile) void strcode(M_WCHAR *string, FILE *outfile)
M_WCHAR *string;
FILE *outfile;
{ {
char exbuff[32]; /* arbitrarily large */ char exbuff[32]; /* arbitrarily large */
int bufflen; int bufflen;
@ -492,9 +475,7 @@ if (savex)
} }
void mb_strcode(string, outfile) void mb_strcode(char *string, FILE *outfile)
char *string;
FILE *outfile;
{ {
M_WCHAR *wc; 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 */ /* Copies string to end of buffer where saving head for table of contents */
void svhdstring(string) void svhdstring(M_WCHAR *string)
M_WCHAR *string;
{ {
int length; int length;
@ -524,8 +504,7 @@ svheadlen += length;
} }
/* Copies string to end of buffer where saving table caption */ /* Copies string to end of buffer where saving table caption */
void svtcstring(string) void svtcstring(M_WCHAR *string)
M_WCHAR *string;
{ {
int length; int length;
@ -605,10 +584,7 @@ else
} }
/* Process a PI in a term */ /* Process a PI in a term */
void termpi(m_enttype, m_pi, m_entname) void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname)
int m_enttype;
M_WCHAR *m_pi;
M_WCHAR *m_entname;
{ {
int length; int length;

View file

@ -138,9 +138,7 @@ struct {
#define NO8BITCHARS 256 #define NO8BITCHARS 256
int invert[NO8BITCHARS], emptycell; int invert[NO8BITCHARS], emptycell;
main(argc, argv) int main(int argc, char *argv[])
int argc;
char *argv[];
{ {
int i, both = FALSE, spec = FALSE, coll = FALSE, error = FALSE ; int i, both = FALSE, spec = FALSE, coll = FALSE, error = FALSE ;

View file

@ -31,8 +31,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#include "globdec.h" #include "globdec.h"
/* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */ /* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */
M_WCHAR *checkid(id) M_WCHAR *checkid(M_WCHAR *id)
M_WCHAR *id;
{ {
struct xref *xref; struct xref *xref;
char *buffer; char *buffer;
@ -80,10 +79,7 @@ return(NULL);
} }
/* Write a single cross-reference macro definition */ /* Write a single cross-reference macro definition */
static void defxref(xfile, id, xref) static void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref)
FILE *xfile;
M_WCHAR *id;
struct xref *xref;
{ {
char *csname; char *csname;
char *p; char *p;
@ -196,8 +192,7 @@ while (TRUE)
} }
/* Copies string to end of current cross-reference string */ /* Copies string to end of current cross-reference string */
void idstring(string) void idstring(M_WCHAR *string)
M_WCHAR *string;
{ {
int length; int length;
@ -414,8 +409,7 @@ savid = NULL;
} }
/* Generate a cross-reference */ /* Generate a cross-reference */
void xrefexpand(id) void xrefexpand(M_WCHAR *id)
M_WCHAR *id;
{ {
struct xref *xref; struct xref *xref;
struct xref *old; struct xref *old;

View file

@ -44,8 +44,7 @@ in the interface definition.*/
#include "signon.h" #include "signon.h"
/* When an explicit or implied end-tag occurs */ /* When an explicit or implied end-tag occurs */
void m_endaction(m_elt) void m_endaction(M_ELEMENT m_elt)
M_ELEMENT m_elt;
{ {
M_ELEMENT m_action; M_ELEMENT m_action;
char buffer[2*MAXD+M_NAMELEN+1]; char buffer[2*MAXD+M_NAMELEN+1];
@ -76,9 +75,7 @@ void m_endaction(m_elt)
} }
/* Find appropriate action according to current stack */ /* Find appropriate action according to current stack */
int m_findact(elt, array) int m_findact(M_ELEMENT elt, int *array)
M_ELEMENT elt;
int *array;
{ {
int chainlen = 0; int chainlen = 0;
int index; int index;
@ -156,8 +153,7 @@ m_free(wc_string,"wide character string");
} }
/* When an explicit or implied start-tag occurs */ /* When an explicit or implied start-tag occurs */
void m_strtaction(m_elt) void m_strtaction(M_ELEMENT m_elt)
M_ELEMENT m_elt;
{ {
int m_par, m_i; int m_par, m_i;
M_WCHAR *m_p; M_WCHAR *m_p;

View file

@ -28,8 +28,7 @@
#include "userinc.h" #include "userinc.h"
#include "globdec.h" #include "globdec.h"
void m_closent(m_ptr) void m_closent(void *m_ptr)
void *m_ptr ;
{ {
fclose((FILE *) m_ptr) ; fclose((FILE *) m_ptr) ;
} }

View file

@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entfile.c" #include "entfile.c"
/* When a reference to a CODE entity is encountered */ /* When a reference to a CODE entity is encountered */
void m_codeent(m_ent) void m_codeent(int m_ent)
int m_ent ;
{ {
(*m_ctable[m_ent])() ; (*m_ctable[m_ent])() ;
} }

View file

@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#include "globdec.h" #include "globdec.h"
/* Displays current element after some error messages */ /* Displays current element after some error messages */
void m_dispcurelt(file, line) void m_dispcurelt(M_WCHAR *file, int line)
M_WCHAR *file ;
int line ;
{ {
char *mb_parent; char *mb_parent;

View file

@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Perform the m_action-th end-code in the interface */ /* Perform the m_action-th end-code in the interface */
void m_endcase(m_action) void m_endcase(int m_action)
int m_action ;
{ {
(*m_etable[m_action])() ; (*m_etable[m_action])() ;
} }

View file

@ -52,8 +52,7 @@ void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
/* Check type specified in entity declaration for previously defined /* Check type specified in entity declaration for previously defined
entity. Testing to see if the new declaration is identical to the entity. Testing to see if the new declaration is identical to the
original one. */ original one. */
void m_eduptype(type) void m_eduptype(int type)
int type ;
{ {
if ((int) m_entity->type != type) { if ((int) m_entity->type != type) {
m_err1("Redefinition of entity %s ignored", m_entity->name) ; 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 */ /* Tests if an entity is too long */
void m_longent(context) void m_longent(int context)
int context ;
{ {
if (m_entclen >= M_LITLEN) { if (m_entclen >= M_LITLEN) {
m_curcon = context ; m_curcon = context ;
@ -74,8 +72,7 @@ void m_longent(context)
} }
/* Enters an entity name into the entity name tree */ /* Enters an entity name into the entity name tree */
void m_ntrent(p) void m_ntrent(M_WCHAR *p)
M_WCHAR *p ;
{ {
M_ENTITY *new ; M_ENTITY *new ;

View file

@ -40,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Issue error message (no arguments) */ /* Issue error message (no arguments) */
void m_error(text) void m_error(char *text)
char *text;
{ {
m_startmsg(); m_startmsg();
m_errline(text); m_errline(text);
@ -316,9 +315,7 @@ void m_err7(
/* Getline.c returns the name of the current input file and the number /* Getline.c returns the name of the current input file and the number
of the current line */ of the current line */
void m_getline(file, line) void m_getline(M_WCHAR **file, int *line)
M_WCHAR **file;
int *line;
{ {
int i; int i;

View file

@ -64,8 +64,7 @@ void m_etcomplete(void)
/* M_frcend is called after a syntax error to end element VAL even /* M_frcend is called after a syntax error to end element VAL even
if more content for that element is expected */ if more content for that element is expected */
void m_frcend(val) void m_frcend(M_ELEMENT val)
M_ELEMENT val ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
M_ELEMENT poppedval ; M_ELEMENT poppedval ;

View file

@ -33,8 +33,7 @@
/* Procedure callable by interface designer. Returns number of occurrences /* Procedure callable by interface designer. Returns number of occurrences
of element on parse stack */ of element on parse stack */
int m_level(elt) int m_level(M_WCHAR *elt)
M_WCHAR *elt ;
{ {
int i = 0 ; int i = 0 ;
M_PARSE *stackptr ; M_PARSE *stackptr ;
@ -48,8 +47,7 @@ int m_level(elt)
} }
int m_mblevel(elt) int m_mblevel(char *elt)
char *elt ;
{ {
int retval; int retval;
M_WCHAR *wc_elt; M_WCHAR *wc_elt;

View file

@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "parser.h" #include "parser.h"
#include "entext.h" #include "entext.h"
LOGICAL m_lookent(name, type, content, wheredef) LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
M_WCHAR *name ; unsigned char *wheredef)
unsigned char *type ;
M_WCHAR **content ;
unsigned char *wheredef ;
{ {
M_ENTITY *entity ; M_ENTITY *entity ;

View file

@ -99,11 +99,7 @@ void m_expecting(void)
/* Recursive procedure first called from expecting() to display /* Recursive procedure first called from expecting() to display
names of elements reachable from a particular node */ names of elements reachable from a particular node */
void m_expexpand(expstart, node, required, data) void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data)
LOGICAL *expstart ;
M_STATE node ;
LOGICAL *required ;
LOGICAL *data ;
{ {
M_ARC parc ; M_ARC parc ;
M_ANDGROUP pand ; M_ANDGROUP pand ;
@ -125,10 +121,7 @@ void m_expexpand(expstart, node, required, data)
} }
/* M_expline writes one line for m_expecting() */ /* M_expline writes one line for m_expecting() */
void m_expline(expstart, data, label) void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label)
LOGICAL *expstart ;
LOGICAL *data ;
M_ELEMENT label ;
{ {
char buffer[M_NAMELEN + 2*MAXD + 1] ; 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 /* M_exptend is called from m_expecting to inform the user after an
error if an end tag is permitted */ error if an end tag is permitted */
void m_exptend(expstart, stackptr) void m_exptend(LOGICAL *expstart, M_PARSE *stackptr)
LOGICAL *expstart ;
M_PARSE *stackptr ;
{ {
char buffer[M_NAMELEN + 2*MAXD + 1] ; 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 element, 1 if character data is expected, and 0 (FALSE) if there is
no unique element. no unique element.
*/ */
M_ELEMENT m_findunique(from, newleft) M_ELEMENT m_findunique(M_STATE from, int *newleft)
M_STATE from ;
int *newleft ;
{ {
M_ARC parc ; M_ARC parc ;
M_ELEMENT cr = 0, minim = 0; 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 /* 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*/ the parse. If so, saves the element name in the MINVAL array*/
LOGICAL m_omitstart() LOGICAL m_omitstart(void)
{ {
M_ELEMENT c = M_NULLVAL ; M_ELEMENT c = M_NULLVAL ;

View file

@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#include "parser.h" #include "parser.h"
/* Get program options from a string */ /* Get program options from a string */
void m_optstring(p) void m_optstring(char *p)
char *p ;
{ {
if (strchr(p, 'a')) m_malftrace = TRUE ; if (strchr(p, 'a')) m_malftrace = TRUE ;
if (strchr(p, 'c')) m_chtrace = TRUE ; if (strchr(p, 'c')) m_chtrace = TRUE ;

View file

@ -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 /* Process the value for the parameter whose index number was previously
saved in m_ppsave */ saved in m_ppsave */
void m_attval(string) void m_attval(M_WCHAR *string)
M_WCHAR *string ;
{ {
const M_WCHAR *p ; 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 /* Process a string that is a parameter value not prefixed by the parameter
name and value indicator */ name and value indicator */
LOGICAL m_attvonly(string) LOGICAL m_attvonly(M_WCHAR *string)
M_WCHAR *string ;
{ {
const M_WCHAR *p ; const M_WCHAR *p ;
int par, i ; int par, i ;
@ -152,8 +150,7 @@ void m_findatt(void)
} }
/* Free the parameter storage associated with an element on the parse stack */ /* Free the parameter storage associated with an element on the parse stack */
void m_freeparam(stackelt) void m_freeparam(M_PARSE *stackelt)
M_PARSE *stackelt ;
{ {
int i ; int i ;
int par ; int par ;
@ -173,9 +170,7 @@ void m_freeparam(stackelt)
/* Force a parameter value to uppercase, if appropriate for its type. /* Force a parameter value to uppercase, if appropriate for its type.
Also, if list-valued attribute, remove leading and trailing spaces, Also, if list-valued attribute, remove leading and trailing spaces,
and condense white-space sequences to a single blank*/ and condense white-space sequences to a single blank*/
void m_parupper(par, string) void m_parupper(int par, M_WCHAR *string)
int par ;
M_WCHAR *string ;
{ {
M_WCHAR *p ; M_WCHAR *p ;
M_WCHAR *q ; M_WCHAR *q ;
@ -233,11 +228,7 @@ void m_stkdefaultparams(void)
} }
/* Stack one default parameter */ /* Stack one default parameter */
void m_stkonedef(par, scanel, poccur, i) void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i)
int par ;
M_ELEMENT scanel ;
M_WCHAR **poccur ;
int i ;
{ {
if (m_parameter[par - 1].deftype == M_REQUIRED || if (m_parameter[par - 1].deftype == M_REQUIRED ||
(m_parameter[par - 1].deftype == M_CURRENT && (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 /* 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 */ tag is a valid parameter name or value; if not, assume tag is ended */
LOGICAL m_validinpar(string) LOGICAL m_validinpar(M_WCHAR *string)
M_WCHAR *string ;
{ {
int par ; int par ;
M_WCHAR *p ; M_WCHAR *p ;

View file

@ -34,8 +34,7 @@
/* Procedure callable by interface designers. Returns pointer to name /* Procedure callable by interface designers. Returns pointer to name
of nth level parent of current element (0 is self, 1 is parent, 2 of nth level parent of current element (0 is self, 1 is parent, 2
is grandparent, etc.) */ is grandparent, etc.) */
M_WCHAR *m_parent(n) M_WCHAR *m_parent(int n)
int n ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;

View file

@ -36,9 +36,7 @@
#include "entext.h" #include "entext.h"
/* Main procedure */ /* Main procedure */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
static char parserr[] = "\nM_token=%d, m_prevcon=%d, m_scanval=%d\n" ; static char parserr[] = "\nM_token=%d, m_prevcon=%d, m_scanval=%d\n" ;
static char sopt[] = static char sopt[] =

View file

@ -87,7 +87,7 @@ M_ELEMENT m_eltname(void)
} }
} }
int get_mb_cur_max() int get_mb_cur_max(void)
{ {
char *l; char *l;
int i; int i;

View file

@ -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 /* When a processing instruction or SDATA entity other than a CODE entity
occurs */ occurs */
void m_piaction(m_pi, m_entname, m_enttype) void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype)
M_WCHAR *m_pi ;
M_WCHAR *m_entname ;
int m_enttype ;
{ {
m_stackpar = m_stacktop->piparam ; m_stackpar = m_stacktop->piparam ;
(*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ; (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ;

View file

@ -62,8 +62,7 @@ int m_actgetc(void)
} }
/* Expand an entity reference */ /* Expand an entity reference */
void m_entexpand(openent) void m_entexpand(M_ENTITY *openent)
M_ENTITY *openent ;
{ {
M_WCHAR *p ; M_WCHAR *p ;
M_HOLDTYPE dchar ; M_HOLDTYPE dchar ;
@ -231,9 +230,7 @@ void m_entexpand(openent)
/* An srlen-character long short-reference delimiter has been found. Verify /* An srlen-character long short-reference delimiter has been found. Verify
that it is not the prefix of a general delimiter recognized in context*/ that it is not the prefix of a general delimiter recognized in context*/
LOGICAL m_gendelim(srlen, context) LOGICAL m_gendelim(int srlen, int context)
int srlen ;
int context ;
{ {
int ghold[MAXD + 1] ; int ghold[MAXD + 1] ;
int ucase ; int ucase ;
@ -321,8 +318,7 @@ LOGICAL m_gendelim(srlen, context)
/* Reads next input character from the current source file or from an /* Reads next input character from the current source file or from an
entity expansion */ entity expansion */
int m_getachar(dchar) int m_getachar(M_HOLDTYPE *dchar)
M_HOLDTYPE *dchar ;
{ {
int c ; int c ;
int i ; int i ;
@ -424,10 +420,7 @@ void m_getname(M_WCHAR first)
} }
/* Reads the next token */ /* Reads the next token */
int m_gettoken(c, dchar, context) int m_gettoken(int *c, M_HOLDTYPE *dchar, int context)
int *c ;
M_HOLDTYPE *dchar ;
int context ;
{ {
int hold[MAXD + 1], next ; int hold[MAXD + 1], next ;
int ucase ; int ucase ;
@ -551,8 +544,7 @@ int m_gettoken(c, dchar, context)
} }
/* Reads a literal */ /* Reads a literal */
void m_litproc(delim) void m_litproc(int delim)
int delim ;
{ {
int n, i ; int n, i ;
M_HOLDTYPE dchar ; M_HOLDTYPE dchar ;
@ -883,8 +875,7 @@ void m_setmap(int map, LOGICAL useoradd)
} }
/* Check for short reference delimiters */ /* Check for short reference delimiters */
void m_shortref(context) void m_shortref(int context)
int context ;
{ {
int n = 0 ; int n = 0 ;
int i ; int i ;

View file

@ -35,9 +35,7 @@
#include "parser.h" #include "parser.h"
/* Set a user-defined C variable to the corresponding parameter value */ /* Set a user-defined C variable to the corresponding parameter value */
void m_setparam(cvar, par) void m_setparam(M_WCHAR **cvar, int par)
M_WCHAR **cvar ;
int par ;
{ {
*cvar = m_stackpar->param[par] ; *cvar = m_stackpar->param[par] ;
} }

View file

@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "sfile.c" #include "sfile.c"
/* Perform the m_action-th start-code in the interface */ /* Perform the m_action-th start-code in the interface */
void m_strtcase(m_action) void m_strtcase(int m_action)
int m_action ;
{ {
(*m_stable[m_action])() ; (*m_stable[m_action])() ;
} }

View file

@ -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 is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively
if the element is allowed by content, not allowed, or allowed by an if the element is allowed by content, not allowed, or allowed by an
inclusion exception. */ inclusion exception. */
int m_checkstart(val) int m_checkstart(M_ELEMENT val)
M_ELEMENT val ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
int except ; int except ;
@ -238,8 +237,7 @@ void m_done(void)
} }
/* Process the endtag (implied, abbreviated, or explicit) for element C*/ /* Process the endtag (implied, abbreviated, or explicit) for element C*/
void m_endtag(c) void m_endtag(M_ELEMENT c)
M_ELEMENT c ;
{ {
m_endaction(c) ; m_endaction(c) ;
m_pop() ; m_pop() ;
@ -251,8 +249,7 @@ void m_endtag(c)
/* Check that the identified element is not prohibited in the current context /* Check that the identified element is not prohibited in the current context
by an exclusion exception */ by an exclusion exception */
LOGICAL m_excluded(elt) LOGICAL m_excluded(M_ELEMENT elt)
M_ELEMENT elt ;
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
int except ; int except ;
@ -270,8 +267,7 @@ LOGICAL m_excluded(elt)
/* Free the OPEN FSA substructures associated with an element on /* Free the OPEN FSA substructures associated with an element on
the parse stack */ the parse stack */
void m_freeFSA(stackelt) void m_freeFSA(M_PARSE *stackelt)
M_PARSE *stackelt ;
{ {
M_OPENFSA *fsastack ; M_OPENFSA *fsastack ;
M_ANDLIST *usedand ; M_ANDLIST *usedand ;
@ -290,9 +286,7 @@ void m_freeFSA(stackelt)
} }
/* Free storage used for tentative chain of tag minimizations */ /* Free storage used for tentative chain of tag minimizations */
void m_freemin(min, msg) void m_freemin(M_MIN *min, char *msg)
M_MIN *min ;
char *msg ;
{ {
M_MIN *discard ; 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 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 indicated by fsastack, or (if the and-group is within a seq-group) by
continuing past the and-group */ continuing past the and-group */
LOGICAL m_nextand(thisfsa, label) LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label)
M_OPENFSA *thisfsa ;
M_ELEMENT label ;
{ {
M_ANDLIST *newgroup ; M_ANDLIST *newgroup ;
M_ANDGROUP pand ; 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 character is treated differently so that if character data is not
allowed in the current context, an error message is issued with the allowed in the current context, an error message is issued with the
first character only and not with every character. */ first character only and not with every character. */
void m_strtcdata(scanval) void m_strtcdata(int scanval)
int scanval ;
{ {
if (! m_strtproc(M_NULLVAL)) if (! m_strtproc(M_NULLVAL))
if (m_whitespace((M_WCHAR) scanval)) { 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 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.) and restores it after returning from the last call to m_endtag.)
*/ */
LOGICAL m_strtproc(scanval) LOGICAL m_strtproc(M_ELEMENT scanval)
M_ELEMENT scanval ;
{ {
int check ; int check ;
M_PARSE *original ; M_PARSE *original ;

View file

@ -167,9 +167,7 @@ delim.h.
#include "cont.h" #include "cont.h"
/* Main procedure */ /* Main procedure */
int main(argc, argv) int main(int argc, char **argv)
int argc ;
char **argv ;
{ {
int n ; int n ;

View file

@ -81,8 +81,7 @@ void dumptree(LOGICAL sparse)
} }
/* Enter a delimiter into the delimiter tree for a particular context */ /* Enter a delimiter into the delimiter tree for a particular context */
void enterdelim(n) void enterdelim(int n)
int n;
{ {
if (! contree[n]) if (! contree[n])
{ {
@ -107,8 +106,7 @@ if (m_ntrtrie(dstruct->string,
} }
/* Read the code to be executed with a given state transition */ /* Read the code to be executed with a given state transition */
void getcode(n) void getcode(int n)
int n;
{ {
int c ; /* c is int instead of char for use with ungetc */ int c ; /* c is int instead of char for use with ungetc */
int nested = 1; int nested = 1;
@ -616,8 +614,7 @@ void nextcon(LOGICAL sparse)
/* If sparse matrix output option, generate a single element of transit /* If sparse matrix output option, generate a single element of transit
array */ array */
void prtctxt(column, value) void prtctxt(int column, int value)
int column, value;
{ {
static LOGICAL first = TRUE; static LOGICAL first = TRUE;
@ -652,8 +649,7 @@ void skiptoend(void)
} }
/* Return a character to the input stream for re-reading */ /* Return a character to the input stream for re-reading */
void unread(c) void unread(int c)
int c;
{ {
M_WCHAR wnl; M_WCHAR wnl;

View file

@ -49,8 +49,7 @@ char xerror[] = "ERROR" ;
/* Outputs entity definitions */ /* Outputs entity definitions */
#define ENTFILENAME 12 #define ENTFILENAME 12
void entout(fname) void entout(char *fname)
char *fname ;
{ {
char efilename[ENTFILENAME] ; char efilename[ENTFILENAME] ;
int count = 1 ; int count = 1 ;
@ -173,15 +172,13 @@ void entout(fname)
/* Entptr is called by m_dumptrie to output the value stored with a /* Entptr is called by m_dumptrie to output the value stored with a
particular entity in the entity trie */ particular entity in the entity trie */
void entptr(data) void entptr(M_ENTITY *data)
M_ENTITY *data ;
{ {
fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ; fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ;
} }
/* Typetype returns a string indicating the type of the nth entity.*/ /* Typetype returns a string indicating the type of the nth entity.*/
char *typetype(n) char *typetype(int n)
int n ;
{ {
switch(n) { switch(n) {
case M_GENERAL: return(xgeneral) ; case M_GENERAL: return(xgeneral) ;

View file

@ -83,16 +83,14 @@ void eprefix(LOGICAL flag)
/* Writes part of an error message. Called from m_malloc instead of /* 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 m_err1, since PARSER's version of m_err1 calls m_malloc and recursive
calls are possible when the heap is exhausted */ calls are possible when the heap is exhausted */
void m_errline(text) void m_errline(char *text)
char *text ;
{ {
fputs(text, stderr) ; fputs(text, stderr) ;
fputs(text, m_errfile) ; fputs(text, m_errfile) ;
} }
/* Writes an error message to standard error and file "error" */ /* Writes an error message to standard error and file "error" */
void m_error(text) void m_error(char *text)
char *text ;
{ {
eprefix(TRUE) ; eprefix(TRUE) ;
fprintf(stderr,"%s", text) ; fprintf(stderr,"%s", text) ;
@ -192,30 +190,26 @@ void esuffix(void)
} }
/* Print something to both stderr and m_errfile */ /* Print something to both stderr and m_errfile */
void msgline(text) void msgline(char *text)
char *text ;
{ {
fprintf(stderr, "%s", text) ; fprintf(stderr, "%s", text) ;
fprintf(m_errfile, "%s", text) ; fprintf(m_errfile, "%s", text) ;
} }
/* Print something to both stderr and m_errfile */ /* Print something to both stderr and m_errfile */
void msg1line(text, arg1) void msg1line(char *text, char *arg1)
char *text, *arg1 ;
{ {
fprintf(stderr, text, arg1) ; fprintf(stderr, text, arg1) ;
fprintf(m_errfile, text, arg1) ; fprintf(m_errfile, text, arg1) ;
} }
/* Trace used for m_malloc trace output */ /* Trace used for m_malloc trace output */
void m_trace(text) void m_trace(char *text)
char *text ;
{ {
m_errline(text) ; m_errline(text) ;
} }
void m_wctrace(text) void m_wctrace(M_WCHAR *text)
M_WCHAR *text ;
{ {
char *mb_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" */ /* Writes a nonfatal error message to standard error and file "error" */
void warning(text) void warning(char *text)
char *text ;
{ {
eprefix(FALSE) ; eprefix(FALSE) ;
fprintf(stderr,"%s", text) ; fprintf(stderr,"%s", text) ;

Some files were not shown because too many files have changed in this diff Show more