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

dthelp: Remove define M_PROTO that was always turned on (for all platforms) that enabled ANSI not K&R function prototypes

This commit is contained in:
Peter Howkins 2018-06-22 20:40:47 +01:00
parent de7e0dfcdd
commit 725b02e6bf
218 changed files with 2975 additions and 14075 deletions

View file

@ -421,8 +421,4 @@ BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ; BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
M_WCHAR *MakeWideCharString( M_WCHAR *MakeWideCharString(const char *from);
#if defined(M_PROTO)
const char *from
#endif
);

View file

@ -37,18 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Addarc adds an arc from FSA state <from> to state <to> setting other /* Addarc adds an arc from FSA state <from> to state <to> setting other
fields as indicated by the other parameters.*/ fields as indicated by the other parameters.*/
#if defined(M_PROTO)
int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt) int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt)
#else
int addarc(from, to, label, and, optional, id, minim, errelt)
STATE *from, *to ;
ELTSTRUCT *label ;
ANDGROUP *and ;
LOGICAL optional ;
int id ;
LOGICAL minim ;
ELTSTRUCT **errelt ;
#endif
{ {
ARC *parc, *qarc ; ARC *parc, *qarc ;
int determ ; int determ ;
@ -630,12 +619,7 @@ LOGICAL samelabelarc(a, s)
/* Saves the name of an element appearing on the left-hand side of a /* Saves the name of an element appearing on the left-hand side of a
grammar rule */ grammar rule */
#if defined(M_PROTO)
void savelhs(LOGICAL param) void savelhs(LOGICAL param)
#else
void savelhs(param)
LOGICAL param ;
#endif
{ {
STATE *end ; STATE *end ;
ELTSTRUCT *errelt ; ELTSTRUCT *errelt ;

View file

@ -124,12 +124,7 @@ newpar->ptypep = NULL ;
/* Check that specified default value is legal parameter value */ /* Check that specified default value is legal parameter value */
#if defined(M_PROTO)
LOGICAL checkdefault( const M_WCHAR *string ) LOGICAL checkdefault( const M_WCHAR *string )
#else
LOGICAL checkdefault(string)
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
const M_WCHAR *p ; const M_WCHAR *p ;
int len ; int len ;
@ -204,12 +199,7 @@ switch (newpar->type)
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize /* Normalize parameter default. Change tabs and RE's to spaces, capitalize
all letters (unless type is CDATA), remove extra space in lists */ all letters (unless type is CDATA), remove extra space in lists */
#if defined(M_PROTO)
void normdefault(M_WCHAR *string ) void normdefault(M_WCHAR *string )
#else
void normdefault(string)
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
M_WCHAR *p, *q ; M_WCHAR *p, *q ;
int i ; int i ;
@ -292,12 +282,7 @@ ruleinit() ;
} }
/* Make string the default for the current parameter of the current element */ /* Make string the default for the current parameter of the current element */
#if defined(M_PROTO)
void setdefault(const M_WCHAR *string) void setdefault(const M_WCHAR *string)
#else
void setdefault()
M_WCHAR *string;
#endif /* M_PROTO */
{ {
PTYPE *kw ; PTYPE *kw ;
int keycount ; int keycount ;

View file

@ -26,589 +26,206 @@
*/ */
/* Proto.h contains function prototypes for program BUILD. */ /* Proto.h contains function prototypes for program BUILD. */
/* Proto.h contains function prototypes for program BUILD. */
int addarc( int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
#if defined(M_PROTO) int id, LOGICAL minim, ELTSTRUCT **errelt);
STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
int id, LOGICAL minim, ELTSTRUCT **errelt
#endif
) ;
void adddefent( void adddefent(M_WCHAR *mapname);
#if defined(M_PROTO)
M_WCHAR *mapname
#endif
) ;
LOGICAL addent( LOGICAL addent(M_WCHAR *name);
#if defined(M_PROTO)
M_WCHAR *name
#endif
) ;
void addex( void addex(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void addkeyword( void addkeyword(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL addmapname( LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
#if defined(M_PROTO)
M_WCHAR *p, LOGICAL define
#endif
) ;
void addndent( void addndent(M_WCHAR *p);
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void addpar( void addpar(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void addsref( void addsref(M_WCHAR *p);
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
LOGICAL m_allwhite( LOGICAL m_allwhite(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
void checkand( void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
#if defined(M_PROTO) ELTSTRUCT **errelt);
ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
ELTSTRUCT **errelt
#endif
) ;
LOGICAL checkdefault( LOGICAL checkdefault(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
int checkdfsa( int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
#if defined(M_PROTO)
STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
#endif
) ;
int checkrepeat( int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
#if defined(M_PROTO)
STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
#endif
) ;
void copyintolist( void copyintolist(STATELIST *from, STATELIST **to);
#if defined(M_PROTO)
STATELIST *from, STATELIST **to
#endif
) ;
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void defmapname( void defmapname(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
char *deftype( char *deftype(int n);
#if defined(M_PROTO)
int n
#endif
) ;
void dellist( void dellist(STATELIST **list);
#if defined(M_PROTO)
STATELIST **list
#endif
) ;
void delstartarcs( void delstartarcs(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void done( void done(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void dumpentnode( void dumpentnode(FILE *file, M_TRIE *value);
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void dumpmapnode( void dumpmapnode(FILE *file, M_TRIE *value);
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void dumpsrefnode( void dumpsrefnode(FILE *file,
#if defined(M_PROTO) M_TRIE *value);
FILE *file,
M_TRIE *value
#endif
) ;
void dumpptrie( void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
#if defined(M_PROTO) void (*proc)( FILE *, M_TRIE *));
M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
void (*proc)( FILE *, M_TRIE *)
#endif
) ;
void m_dumptrie( void m_dumptrie(FILE *file,
#if defined(M_PROTO)
FILE *file,
M_TRIE *xtrie, M_TRIE *xtrie,
char *extname, char *extname,
int *count, int *count,
void (*proc)(M_ENTITY *) void (*proc)(M_ENTITY *));
#endif
) ; void eltblocks(FILE *tempfile);
void eltblocks( void eltreeout(M_NOPAR);
#if defined(M_PROTO)
FILE *tempfile void endmodel(M_NOPAR);
#endif
) ; void entout(char *fname);
void eltreeout( char *enttype(int n);
#if defined(M_PROTO)
M_NOPAR void m_error(char *text);
#endif
) ; void m_err1(const char *text, const M_WCHAR *arg);
void endmodel( void m_mberr1(char *text, const char *arg);
#if defined(M_PROTO)
M_NOPAR void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
#endif
) ; void exout(M_NOPAR);
void entout( void m_free(void *block, char *msg);
#if defined(M_PROTO)
char *fname void freetree(TREE *ruletree);
#endif
) ; void found(LOGICAL *flag, char *delim);
char *enttype( void fsa(M_NOPAR);
#if defined(M_PROTO)
int n int getachar(M_NOPAR);
#endif
) ; ANDGROUP *getand(M_NOPAR);
void m_error( LOGICAL getname(int first);
#if defined(M_PROTO)
char *text STATE *getstate(M_NOPAR);
#endif
) ; int gettoken(int *c, int context);
void m_err1( TREE *gettreenode(M_NOPAR);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg void m_initctype(M_NOPAR);
#endif
) ; void initialize(M_NOPAR);
void m_mberr1( LOGICAL litproc(int delim);
#if defined(M_PROTO)
char *text, const char *arg void main(int argc, char **argv);
#endif
) ; void makeand(LOGICAL *canbenull, TREE *root, int optional);
void m_err2( LOGICAL makefsa(TREE *root, int optional);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2 void makeor(LOGICAL *canbenull, TREE *root);
#endif
) ; void makeseq(LOGICAL *canbenull, TREE *root, int optional);
void exout( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
M_NOPAR void msgline(char *text);
#endif
) ; void msg1line(char *text, char *arg1);
void m_free( void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
#if defined(M_PROTO)
void *block, char *msg void normdefault(M_WCHAR *string);
#endif
) ; LOGICAL notinlist(STATELIST *item, STATELIST *list);
void freetree( ELTSTRUCT *ntrelt(M_WCHAR *p);
#if defined(M_PROTO)
TREE *ruletree void m_openchk(FILE **ptr, char *name, char *mode);
#endif
) ; void parout(M_NOPAR);
void found( char *partype(int n);
#if defined(M_PROTO)
LOGICAL *flag, char *delim LOGICAL permitspcd(ARC *a);
#endif
) ; void pop(M_NOPAR);
void fsa( void prulend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR void push(M_NOPAR);
#endif
) ; LOGICAL regenerate(TREE *start, TREE *stop);
int getachar( void repeat(TREE *root);
#if defined(M_PROTO)
M_NOPAR void ruleinit(M_NOPAR);
#endif
) ; void rulend(M_NOPAR);
ANDGROUP *getand( LOGICAL samelabelarc(ARC *a, STATE *s);
#if defined(M_PROTO)
M_NOPAR void savelhs(LOGICAL param);
#endif
) ; void savestartarcs(M_NOPAR);
LOGICAL getname( int scan(M_NOPAR);
#if defined(M_PROTO)
int first void setdefault(const M_WCHAR *string);
#endif
) ; void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
STATE *getstate( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR int m_sprscon(int i, int j);
#endif
) ; void srefout(M_NOPAR);
int gettoken( STATE *startfsa(TREE *root, LOGICAL *canbenull);
#if defined(M_PROTO)
int *c, int context void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
#endif
) ; void template(M_NOPAR);
TREE *gettreenode( char *typecon(int n);
#if defined(M_PROTO)
M_NOPAR void undodelim(M_WCHAR *delim);
#endif
) ; void ungetachar(int c);
void m_initctype( int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
#if defined(M_PROTO)
M_NOPAR int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
#endif
) ; int m_mbmbupstrcmp(const char *p, const char *q);
void initialize( void warning(char *text);
#if defined(M_PROTO)
M_NOPAR void warning1(char *text, M_WCHAR *arg);
#endif
) ; void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
LOGICAL litproc( void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
int delim void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
#endif
) ; LOGICAL m_whitespace(M_WCHAR c);
void main(
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void makeand(
#if defined(M_PROTO)
LOGICAL *canbenull, TREE *root, int optional
#endif
) ;
LOGICAL makefsa(
#if defined(M_PROTO)
TREE *root, int optional
#endif
) ;
void makeor(
#if defined(M_PROTO)
LOGICAL *canbenull, TREE *root
#endif
) ;
void makeseq(
#if defined(M_PROTO)
LOGICAL *canbenull, TREE *root, int optional
#endif
) ;
void *m_malloc(
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void msgline(
#if defined(M_PROTO)
char *text
#endif
) ;
void msg1line(
#if defined(M_PROTO)
char *text, char *arg1
#endif
) ;
void nondeterm(
#if defined(M_PROTO)
TREE *root, int c, ELTSTRUCT *eltp
#endif
) ;
void normdefault(
#if defined(M_PROTO)
M_WCHAR *string
#endif
) ;
LOGICAL notinlist(
#if defined(M_PROTO)
STATELIST *item, STATELIST *list
#endif
) ;
ELTSTRUCT *ntrelt(
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void m_openchk(
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
void parout(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
char *partype(
#if defined(M_PROTO)
int n
#endif
) ;
LOGICAL permitspcd(
#if defined(M_PROTO)
ARC *a
#endif
) ;
void pop(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void prulend(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void push(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL regenerate(
#if defined(M_PROTO)
TREE *start, TREE *stop
#endif
) ;
void repeat(
#if defined(M_PROTO)
TREE *root
#endif
) ;
void ruleinit(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void rulend(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL samelabelarc(
#if defined(M_PROTO)
ARC *a, STATE *s
#endif
) ;
void savelhs(
#if defined(M_PROTO)
LOGICAL param
#endif
) ;
void savestartarcs(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int scan(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void setdefault(
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
void simplebranch(
#if defined(M_PROTO)
TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional
#endif
) ;
void skiptoend(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int m_sprscon(
#if defined(M_PROTO)
int i, int j
#endif
) ;
void srefout(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
STATE *startfsa(
#if defined(M_PROTO)
TREE *root, LOGICAL *canbenull
#endif
) ;
void tempelt(
#if defined(M_PROTO)
ELTSTRUCT *eltp, FILE *tempfile
#endif
) ;
void template(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
char *typecon(
#if defined(M_PROTO)
int n
#endif
) ;
void undodelim(
#if defined(M_PROTO)
M_WCHAR *delim
#endif
) ;
void ungetachar(
#if defined(M_PROTO)
int c
#endif
) ;
int m_wcupstrcmp(
#if defined(M_PROTO)
const M_WCHAR *p, const M_WCHAR *q
#endif
) ;
int m_wcmbupstrcmp(
#if defined(M_PROTO)
const M_WCHAR *p, const char *q
#endif
) ;
int m_mbmbupstrcmp(
#if defined(M_PROTO)
const char *p, const char *q
#endif
) ;
void warning(
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1(
#if defined(M_PROTO)
char *text, M_WCHAR *arg
#endif
) ;
void warning2(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2
#endif
) ;
void warning3(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void warning4(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
#endif
) ;
LOGICAL m_whitespace(
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;

View file

@ -100,13 +100,7 @@ return(TRUE);
} }
/* Add a short reference map name */ /* Add a short reference map name */
#if defined(M_PROTO)
LOGICAL addmapname(M_WCHAR* p, LOGICAL define) LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
#else
LOGICAL addmapname(p, define)
M_WCHAR *p;
LOGICAL define;
#endif
{ {
MAP *old; MAP *old;
MAP *new; MAP *new;

View file

@ -66,23 +66,14 @@ void actptrout(array, name)
/* Close a code file and write jump table at the end */ /* Close a code file and write jump table at the end */
#if defined(M_PROTO)
void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto) void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto)
#else
void closeiffile(flag, file, count, table, proto)
LOGICAL flag;
FILE *file;
int count;
char *table;
char *proto;
#endif
{ {
int i; int i;
endcode(flag, file); endcode(flag, file);
if (count) { if (count) {
fprintf(file, fprintf(file,
"void (*m_%stable[])(\n#if defined(M_PROTO)\n %s\n#endif\n ) = {\n", "void (*m_%stable[])(%s) = {\n",
table, proto); table, proto);
fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n", fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n",
table); table);
@ -94,7 +85,7 @@ void closeiffile(flag, file, count, table, proto)
} }
else else
fprintf(file, fprintf(file,
"void (*m_%stable[1])(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n", "void (*m_%stable[1])(%s) ;\n",
table, proto); table, proto);
fclose(file); fclose(file);
} }
@ -193,13 +184,7 @@ void done(M_NOPAR)
} }
/* Called when finished reading a section of code from the input file */ /* Called when finished reading a section of code from the input file */
#if defined(M_PROTO)
void endcode(LOGICAL flag, FILE *file) void endcode(LOGICAL flag, FILE *file)
#else
void endcode(flag, file)
LOGICAL flag;
FILE *file;
#endif
{ {
if (flag) fprintf(file, "}}\n\n"); if (flag) fprintf(file, "}}\n\n");
} }
@ -563,21 +548,14 @@ endcode(*flag, file);
*flag = TRUE; *flag = TRUE;
/* protoype */ /* protoype */
fprintf(file, fprintf(file,
"void m_%s%d(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n", "void m_%s%d(%s) ;\n",
prefix, prefix,
caseno, caseno,
proto); proto);
/* ANSI defines */ /* ANSI defines */
fputs("#if defined(M_PROTO)\n", file); fprintf(file, "void m_%s%d(%s)\n {\n", prefix, caseno, proto);
fprintf(file, "void m_%s%d(%s)\n", prefix, caseno, proto); );
fputs("#else\n", file);
fprintf(file,
"void m_%s%d(%s)\n%s\n#endif\n {\n", /* balance the "}" */
prefix,
caseno,
formal,
formtype);
for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next) for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
{ {

View file

@ -28,334 +28,112 @@
/* Proto.h contains function prototypes for program ELTDEF. */ /* Proto.h contains function prototypes for program ELTDEF. */
void actptrout( void actptrout(ACTION **array, char *name);
#if defined(M_PROTO)
ACTION **array, char *name
#endif
) ;
void addent( void addent(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL m_allwhite( LOGICAL m_allwhite(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
void closeiffile( void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
#if defined(M_PROTO)
LOGICAL flag, FILE *file, int count, char *table, char *proto
#endif
) ;
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void cvalue( void cvalue(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void done(M_NOPAR);
void done( void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(M_ENTITY *));
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void m_dumptrie( void endcode(LOGICAL flag, FILE *file);
#if defined(M_PROTO)
FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
void (*proc)(M_ENTITY *)
#endif
) ;
void endcode( void endini(M_NOPAR);
#if defined(M_PROTO)
LOGICAL flag, FILE *file
#endif
) ;
void endini( void endsignon(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void endsignon( void endstring(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void endstring( void entout(char *fname);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void entout( void enttype(int type);
#if defined(M_PROTO)
char *fname
#endif
) ;
void enttype( void m_error(char *text);
#if defined(M_PROTO)
int type
#endif
) ;
void m_error( void m_err1(const char *text, const M_WCHAR *arg);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_err1( void m_mberr1(char *text, const char *arg);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg
#endif
) ;
void m_mberr1( void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
#if defined(M_PROTO)
char *text, const char *arg
#endif
) ;
void m_err2( void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
void m_err3( void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void m_err5( void m_exit(int status);
#if defined(M_PROTO)
char *text,
M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5
#endif
) ;
void m_exit( void m_free(void *block, char *msg);
#if defined(M_PROTO)
int status
#endif
) ;
void m_free( void freechain(M_NOPAR);
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void freechain( int getachar(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int getachar( int *getaction(ACTION **array);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int *getaction( ACTION *getactstruct(M_NOPAR);
#if defined(M_PROTO)
ACTION **array
#endif
) ;
ACTION *getactstruct( void getname(int first);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void getname( int gettoken(int *c, int context);
#if defined(M_PROTO)
int first
#endif
) ;
int gettoken( void m_initctype(M_NOPAR);
#if defined(M_PROTO)
int *c, int context
#endif
) ;
void m_initctype( void initialize(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void initialize( LOGICAL m_letter(M_WCHAR c);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL m_letter( LOGICAL litproc(int delim);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
LOGICAL litproc( void main(int argc, char **argv);
#if defined(M_PROTO)
int delim
#endif
) ;
void main( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void *m_malloc( void m_openchk(FILE **ptr, char *name, char *mode);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void m_openchk( void outpval(M_TRIE *p);
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
void outpval( void outstring(M_NOPAR);
#if defined(M_PROTO)
M_TRIE *p
#endif
) ;
void outstring( int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int m_packedlook( const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
#if defined(M_PROTO)
M_PTRIE *xptrie, M_WCHAR *name
#endif
) ;
const M_WCHAR *m_partype( int scan(M_NOPAR);
#if defined(M_PROTO)
const int par, const M_WCHAR *string
#endif
) ;
int scan( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void skiptoend( void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
#if defined(M_PROTO) char *formal, char *formtype);
M_NOPAR
#endif
) ;
void startcode( void startelement(M_NOPAR);
#if defined(M_PROTO)
int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
char *formal, char *formtype
#endif
) ;
void startelement( void storecvar(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void storecvar( void storepname(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void storepname( void undodelim(M_WCHAR *delim);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void undodelim( void ungetachar(int c);
#if defined(M_PROTO)
M_WCHAR *delim
#endif
) ;
void ungetachar( int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
#if defined(M_PROTO)
int c
#endif
) ;
int m_wcupstrcmp( int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
#if defined(M_PROTO)
const M_WCHAR *p, const M_WCHAR *q
#endif
) ;
int m_wcmbupstrcmp( int m_mbmbupstrcmp(const char *p, const char *q);
#if defined(M_PROTO)
const M_WCHAR *p, const char *q
#endif
) ;
int m_mbmbupstrcmp( void value(M_WCHAR *p);
#if defined(M_PROTO)
const char *p, const char *q
#endif
) ;
void value( void warning(char *text);
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void warning( void warning1(char *text, M_WCHAR *arg);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1( LOGICAL m_whitespace(M_WCHAR c);
#if defined(M_PROTO)
char *text, M_WCHAR *arg
#endif
) ;
LOGICAL m_whitespace(
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;

View file

@ -30,12 +30,7 @@ Copyright 1988, 1989, 1992 Hewlett-Packard Co.
#include "userinc.h" #include "userinc.h"
#include "globdec.h" #include "globdec.h"
#if defined(M_PROTO)
int vextextsize(const M_WCHAR *keyword) int vextextsize(const M_WCHAR *keyword)
#else
int vextextsize(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return NORMAL; if (!keyword) return NORMAL;
@ -47,12 +42,7 @@ m_err1("Unexpected value for ex/vex textsize parameter: %s", keyword);
return NORMAL; return NORMAL;
} }
#if defined(M_PROTO)
int vgloss(const M_WCHAR *keyword) int vgloss(const M_WCHAR *keyword)
#else
int vgloss(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return GLOSS; if (!keyword) return GLOSS;
@ -63,12 +53,7 @@ m_err1("Unexpected value for gloss parameter: %s", keyword);
return GLOSS; return GLOSS;
} }
#if defined(M_PROTO)
int vcenter(const M_WCHAR *keyword) int vcenter(const M_WCHAR *keyword)
#else
int vcenter(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return CENTER; if (!keyword) return CENTER;
@ -80,12 +65,7 @@ m_err1("Unexpected value for center parameter: %s", keyword);
return CENTER; return CENTER;
} }
#if defined(M_PROTO)
int vnumber(const M_WCHAR *keyword) int vnumber(const M_WCHAR *keyword)
#else
int vnumber(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return NONUMBER; if (!keyword) return NONUMBER;
@ -96,12 +76,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
return NONUMBER; return NONUMBER;
} }
#if defined(M_PROTO)
LOGICAL vstack(const M_WCHAR *keyword) LOGICAL vstack(const M_WCHAR *keyword)
#else
LOGICAL vnumber(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return FALSE; if (!keyword) return FALSE;
@ -112,12 +87,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
return FALSE; return FALSE;
} }
#if defined(M_PROTO)
int vordertype(const M_WCHAR *keyword) int vordertype(const M_WCHAR *keyword)
#else
int vordertype(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return ARABIC; if (!keyword) return ARABIC;
@ -131,12 +101,7 @@ m_err1("Unexpected list order type: %s", keyword);
return ARABIC; return ARABIC;
} }
#if defined(M_PROTO)
int vrsectpage(const M_WCHAR *keyword) int vrsectpage(const M_WCHAR *keyword)
#else
int vrsectpage(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return NEWPAGE; if (!keyword) return NEWPAGE;
@ -147,12 +112,7 @@ m_err1("Unexpected value for rsectpage parameter: %s", keyword);
return NEWPAGE; return NEWPAGE;
} }
#if defined(M_PROTO)
int vspacing(const M_WCHAR *keyword) int vspacing(const M_WCHAR *keyword)
#else
int vspacing(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return LOOSE; if (!keyword) return LOOSE;
@ -163,12 +123,7 @@ m_err1("Unexpected value for spacing parameter: %s", keyword);
return LOOSE; return LOOSE;
} }
#if defined(M_PROTO)
int vtype(const M_WCHAR *keyword) int vtype(const M_WCHAR *keyword)
#else
int vtype(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return BULLET; if (!keyword) return BULLET;

File diff suppressed because it is too large Load diff

View file

@ -877,15 +877,8 @@ m_free(string, "GetDefaultHeaderString return");
/* Verify that val is an acceptable real number value */ /* Verify that val is an acceptable real number value */
#if defined(M_PROTO)
M_WCHAR * M_WCHAR *
checkreal (M_WCHAR *val, M_WCHAR *paramname, LOGICAL msgout, M_WCHAR *elt) checkreal (M_WCHAR *val, M_WCHAR *paramname, LOGICAL msgout, M_WCHAR *elt)
#else
M_WCHAR *checkreal (val, paramname, msgout, elt)
M_WCHAR *val, *paramname;
LOGICAL msgout;
M_WCHAR *elt;
#endif
{ {
/* returns val if a valid real number, else NULL */ /* returns val if a valid real number, else NULL */
double num; double num;
@ -950,13 +943,7 @@ else
/* Starting stuff for <EX> and <VEX> */ /* Starting stuff for <EX> and <VEX> */
#if defined(M_PROTO)
void exvexstart (M_WCHAR *type, M_WCHAR *textsize, char *listinfo) void exvexstart (M_WCHAR *type, M_WCHAR *textsize, char *listinfo)
#else
void exvexstart (type, textsize, listinfo)
M_WCHAR *type, *textsize;
char *listinfo;
#endif
{ {
int tsize; int tsize;
@ -1520,15 +1507,7 @@ fputs(">\n", outfile);
/* Express a sequence number as a letter in an alpha list or appendix */ /* Express a sequence number as a letter in an alpha list or appendix */
#if defined(M_PROTO)
void itoletter(int n, char start, char *dest, int length) void itoletter(int n, char start, char *dest, int length)
#else
void itoletter(n, start, dest, length)
int n;
char start;
char *dest;
int length;
#endif
{ {
char invert[10]; char invert[10];
char *p, *q; char *p, *q;
@ -1837,13 +1816,7 @@ m_exit(0);
} }
/* Start a new helpnode */ /* Start a new helpnode */
#if defined(M_PROTO)
void starthelpnode(M_WCHAR *id, LOGICAL suppress_topic_map) void starthelpnode(M_WCHAR *id, LOGICAL suppress_topic_map)
#else
void starthelpnode(id, suppress_topic_map)
M_WCHAR *id;
LOGICAL suppress_topic_map; /* should we suppress .tpc entry */
#endif
{ {
int i; int i;
char *mbyte; char *mbyte;
@ -1944,13 +1917,7 @@ if (!suppress_topic_map)
} /* End starthelpnode(id) */ } /* End starthelpnode(id) */
#if defined(M_PROTO)
void mb_starthelpnode(char *id, LOGICAL suppress_topic_map) void mb_starthelpnode(char *id, LOGICAL suppress_topic_map)
#else
void mb_starthelpnode(id, suppress_topic_map)
char *id;
LOGICAL suppress_topic_map; /* should we suppress .tpc entry */
#endif
{ {
M_WCHAR *wc; M_WCHAR *wc;
@ -2372,17 +2339,10 @@ return((long) num );
the string returned must be m_free'd. the string returned must be m_free'd.
*/ */
char * char *
#if defined(M_PROTO)
GetDefaultHeaderString( GetDefaultHeaderString(
char *elementName, char *elementName,
unsigned char desiredType, unsigned char desiredType,
char *defaultString ) char *defaultString )
#else
GetDefaultHeaderString(elementName, desiredType, defaultString)
char *elementName;
unsigned char desiredType;
char *defaultString;
#endif
{ {
unsigned char type,wheredef; unsigned char type,wheredef;
M_WCHAR *content; M_WCHAR *content;
@ -2484,7 +2444,6 @@ m_free(elementName,"wide character string");
} }
#if defined(M_PROTO)
void paragraph(M_WCHAR *indent, void paragraph(M_WCHAR *indent,
M_WCHAR *id, M_WCHAR *id,
M_WCHAR *gentity, M_WCHAR *gentity,
@ -2493,24 +2452,6 @@ void paragraph(M_WCHAR *indent,
M_WCHAR *glinktype, M_WCHAR *glinktype,
M_WCHAR *gdescription, M_WCHAR *gdescription,
char *listinfo) char *listinfo)
#else
void paragraph(indent,
id,
gentity,
gposition,
ghyperlink,
glinktype,
gdescription,
listinfo)
M_WCHAR *indent;
M_WCHAR *id;
M_WCHAR *gentity;
M_WCHAR *gposition;
M_WCHAR *ghyperlink;
M_WCHAR *glinktype;
M_WCHAR *gdescription;
char *listinfo;
#endif
{ {
if (id) if (id)
{ {
@ -2569,7 +2510,6 @@ fprintf(outfile, "%s>", listinfo);
unleaded = FALSE; unleaded = FALSE;
} }
#if defined(M_PROTO)
void figure( void figure(
M_WCHAR *number, M_WCHAR *number,
M_WCHAR *tonumber, M_WCHAR *tonumber,
@ -2600,67 +2540,6 @@ void figure(
M_WCHAR *glinktype, M_WCHAR *glinktype,
M_WCHAR *gdescription, M_WCHAR *gdescription,
char *listinfo) char *listinfo)
#else
void figure(
number,
tonumber,
id,
file,
figpos,
cappos,
oldtype,
xwidth,
xdepth,
xhadjust,
xvadjust,
border,
type,
xmagnify,
video,
strip,
mirror,
margin,
clip,
penwidth,
snap,
autoscale,
plottype,
callout,
textsize,
ghyperlink,
glinktype,
gdescription,
listinfo)
M_WCHAR *number;
M_WCHAR *tonumber;
M_WCHAR *id;
M_WCHAR *file;
M_WCHAR *figpos;
M_WCHAR *cappos;
M_WCHAR *oldtype;
M_WCHAR *xwidth;
M_WCHAR *xdepth;
M_WCHAR *xhadjust;
M_WCHAR *xvadjust;
M_WCHAR *border;
M_WCHAR *type;
M_WCHAR *xmagnify;
M_WCHAR *video;
M_WCHAR *strip;
M_WCHAR *mirror;
M_WCHAR *margin;
M_WCHAR *clip;
M_WCHAR *penwidth;
M_WCHAR *snap;
M_WCHAR *autoscale;
M_WCHAR *plottype;
M_WCHAR *callout;
M_WCHAR *textsize;
M_WCHAR *ghyperlink;
M_WCHAR *glinktype;
M_WCHAR *gdescription;
char *listinfo;
#endif
{ {
unsigned char etype,wheredef; unsigned char etype,wheredef;
char *string = char *string =
@ -2919,14 +2798,7 @@ if (ftonumber)
m_free(string, "default header string return"); m_free(string, "default header string return");
} }
#if defined(M_PROTO)
void endterm( M_WCHAR *base, M_WCHAR *gloss, int linktype) void endterm( M_WCHAR *base, M_WCHAR *gloss, int linktype)
#else
void endterm( base, gloss, linktype)
M_WCHAR *base;
M_WCHAR *gloss;
int linktype;
#endif
{ {
M_WCHAR *p; M_WCHAR *p;
M_WCHAR wnl, wsp, wus; M_WCHAR wnl, wsp, wus;
@ -3004,12 +2876,7 @@ if (vgloss(gloss) == GLOSS)
if (echo) mb_echohead("++"); if (echo) mb_echohead("++");
} }
#if defined(M_PROTO)
M_WCHAR wc_toupper(M_WCHAR wc) M_WCHAR wc_toupper(M_WCHAR wc)
#else
M_WCHAR wc_toupper(wc)
M_WCHAR wc;
#endif
{ {
if ((wc >= 0) && (wc <= 255)) if ((wc >= 0) && (wc <= 255))
{ {

View file

@ -37,12 +37,7 @@
#define TAGDOTOPT "helptag.opt" #define TAGDOTOPT "helptag.opt"
#define DOTOPT ".opt" #define DOTOPT ".opt"
#if defined(M_PROTO)
void options(LOGICAL filelenonly) void options(LOGICAL filelenonly)
#else
void options(filelenonly)
LOGICAL filelenonly;
#endif
{ {
int i; int i;
FILE *optfile; FILE *optfile;
@ -149,13 +144,7 @@ optval = M_NULLVAL;
/* Set a single option */ /* Set a single option */
/* Workonly parameter described with function options()*/ /* Workonly parameter described with function options()*/
#if defined(M_PROTO)
void setopt(char *string, LOGICAL filelenonly) void setopt(char *string, LOGICAL filelenonly)
#else
void setopt(string, filelenonly)
char *string;
LOGICAL filelenonly;
#endif
{ {
char *p; char *p;
int thisopt; int thisopt;
@ -280,14 +269,7 @@ else switch(thisopt + 1)
} }
/* Process a value for a command line option */ /* Process a value for a command line option */
#if defined(M_PROTO)
LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly) LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
#else
LOGICAL setvalopt(thisopt, string, filelenonly)
int thisopt;
char *string;
LOGICAL filelenonly;
#endif
{ {
char *p; char *p;
int i; int i;

View file

@ -89,12 +89,7 @@ echo = savhd = FALSE;
} }
/* Process a character in an environment where spaces must be escaped */ /* Process a character in an environment where spaces must be escaped */
#if defined(M_PROTO)
void esoutchar(M_WCHAR textchar) void esoutchar(M_WCHAR textchar)
#else
void esoutchar(textchar)
M_WCHAR textchar;
#endif
{ {
static M_WCHAR wsp = 0; static M_WCHAR wsp = 0;
@ -115,12 +110,7 @@ outchar(textchar, outfile);
} }
/* Process a character in an example or an image paragraph */ /* Process a character in an example or an image paragraph */
#if defined(M_PROTO)
void exoutchar(M_WCHAR textchar) void exoutchar(M_WCHAR textchar)
#else
void exoutchar(textchar)
M_WCHAR textchar;
#endif
{ {
static M_WCHAR wsp = 0, wre; static M_WCHAR wsp = 0, wre;
@ -146,12 +136,7 @@ else outchar(textchar, outfile);
} }
/* Write a character to be passed to the index file */ /* Write a character to be passed to the index file */
#if defined(M_PROTO)
void indexchar(M_WCHAR textchar) void indexchar(M_WCHAR textchar)
#else
void indexchar(textchar)
M_WCHAR textchar;
#endif
{ {
if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR))) if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
{ {
@ -163,26 +148,14 @@ idxsav[idxsavlen++] = textchar;
/* Processes output for call out text */ /* Processes output for call out text */
#if defined(M_PROTO)
void outcall(M_WCHAR textchar, FILE *outfile) void outcall(M_WCHAR textchar, FILE *outfile)
#else
void outcall(textchar, outfile)
M_WCHAR textchar;
FILE *outfile;
#endif
{ {
if (textchar != M_RE) if (textchar != M_RE)
outchar(textchar, outfile); outchar(textchar, outfile);
} }
/* Processes a data character */ /* Processes a data character */
#if defined(M_PROTO)
void outchar(M_WCHAR textchar, FILE *outfile) void outchar(M_WCHAR textchar, FILE *outfile)
#else
void outchar(textchar, outfile)
M_WCHAR textchar;
FILE *outfile;
#endif
{ {
M_WCHAR buffer[2]; M_WCHAR buffer[2];
static M_WCHAR wnl = 0; static M_WCHAR wnl = 0;
@ -263,13 +236,7 @@ if (unleaded) /* unleaded is a one-shot flag */
} }
/* Really output a character */ /* Really output a character */
#if defined(M_PROTO)
void realoutchar(M_WCHAR textchar, FILE *outfile) void realoutchar(M_WCHAR textchar, FILE *outfile)
#else
void realoutchar(textchar, outfile)
M_WCHAR textchar;
FILE *outfile;
#endif
{ {
rshnewclear(); rshnewclear();
if (! abbrev || fabbrev) if (! abbrev || fabbrev)
@ -313,22 +280,7 @@ if (! abbrev || fabbrev)
/* Save a character in the array used to store table of contents entries /* Save a character in the array used to store table of contents entries
when processing a head */ when processing a head */
#if defined(M_PROTO)
void shchar(M_WCHAR textchar, int *len, int max, M_WCHAR *string, void (*proc)(M_WCHAR *string), char *msg, LOGICAL *errflg) void shchar(M_WCHAR textchar, int *len, int max, M_WCHAR *string, void (*proc)(M_WCHAR *string), char *msg, LOGICAL *errflg)
#else
void shchar(textchar, len, max, string, proc, msg, errflg)
M_WCHAR textchar;
int *len;
int max;
M_WCHAR *string;
void (*proc)(
#if defined(M_PROTO)
M_WCHAR *string
#endif
);
char *msg;
LOGICAL *errflg;
#endif
{ {
char mb_textchar[32]; /* arbitrarily large */ char mb_textchar[32]; /* arbitrarily large */
unsigned char index; unsigned char index;
@ -361,27 +313,12 @@ else
} }
#if defined(M_PROTO)
void mb_shchar(char textchar, void mb_shchar(char textchar,
int *len, int *len,
int max, int max,
M_WCHAR *string, M_WCHAR *string,
void (*proc)(M_WCHAR *string), void (*proc)(M_WCHAR *string),
char *msg, LOGICAL *errflg) char *msg, LOGICAL *errflg)
#else
void mb_shchar(textchar, len, max, string, proc, msg, errflg)
char textchar;
int *len;
int max;
M_WCHAR *string;
void (*proc)(
#if defined(M_PROTO)
M_WCHAR *string
#endif
);
char *msg;
LOGICAL *errflg;
#endif
{ {
M_WCHAR wc_textchar; M_WCHAR wc_textchar;
@ -530,12 +467,7 @@ svtclen += length;
} }
/* Process a character in a term */ /* Process a character in a term */
#if defined(M_PROTO)
void termchar(M_WCHAR textchar) void termchar(M_WCHAR textchar)
#else
void termchar(textchar)
M_WCHAR textchar;
#endif
{ {
if (termp - term >= MAXTERM) if (termp - term >= MAXTERM)
{ {

View file

@ -333,21 +333,9 @@ while (TRUE)
/* Save a cross-reference ID and associated expansion */ /* Save a cross-reference ID and associated expansion */
#if defined(M_PROTO)
void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter, void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
char *chapter, M_WCHAR *xrffile, int xrfline, LOGICAL xrefable) char *chapter, M_WCHAR *xrffile, int xrfline, LOGICAL xrefable)
#else s{
void setid(id, where, csensitive, inchapter, chapter, xrffile, xrfline, xrefable)
M_WCHAR *id;
LOGICAL where;
LOGICAL csensitive;
LOGICAL inchapter;
char *chapter;
M_WCHAR *xrffile;
int xrfline;
LOGICAL xrefable;
#endif
{
struct xref *old; struct xref *old;
struct xref *xref; struct xref *xref;
char *buffer; char *buffer;

View file

@ -107,17 +107,7 @@ int m_findact(elt, array)
} }
/* Recursive procedure called by findact() to search m_action */ /* Recursive procedure called by findact() to search m_action */
#if defined(M_PROTO)
void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild) void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild)
#else
void m_findchain(stackptr, start, chainin, chainout, index, wild)
M_PARSE *stackptr;
int start;
int chainin;
int *chainout;
int *index;
LOGICAL wild;
#endif
{ {
int node; int node;
M_PARSE *stackp; M_PARSE *stackp;
@ -241,14 +231,7 @@ void m_strtaction(m_elt)
} }
/* Output a start-string or end-string */ /* Output a start-string or end-string */
#if defined(M_PROTO)
void m_textout(char *format, LOGICAL start, LOGICAL end) void m_textout(char *format, LOGICAL start, LOGICAL end)
#else
void m_textout(format, start, end)
char *format;
LOGICAL start;
LOGICAL end;
#endif
{ {
M_WCHAR name[M_NAMELEN + 1]; M_WCHAR name[M_NAMELEN + 1];
int i, par; int i, par;

View file

@ -36,15 +36,7 @@
#include "parser.h" #include "parser.h"
#include "entext.h" #include "entext.h"
#if defined(M_PROTO)
M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef) M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef)
#else
M_WCHAR *m_cyclent(init, type, content, wheredef)
LOGICAL init ;
unsigned char *type ;
M_WCHAR **content ;
unsigned char *wheredef ;
#endif
{ {
static M_TRIE *current ; static M_TRIE *current ;
static M_TRIE *ancestor[M_NAMELEN + 1] ; static M_TRIE *ancestor[M_NAMELEN + 1] ;

View file

@ -43,13 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entext.h" #include "entext.h"
/* Process the name in a usemap delaration */ /* Process the name in a usemap delaration */
#if defined(M_PROTO)
void m_ckmap(M_WCHAR *name, LOGICAL useoradd) void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
#else
void m_ckmap(name, useoradd)
M_WCHAR *name ;
LOGICAL useoradd ;
#endif
{ {
int mapid ; int mapid ;

View file

@ -52,15 +52,9 @@ void m_error(text)
} }
/* Issue error message (one argument) */ /* Issue error message (one argument) */
#if defined(M_PROTO)
void m_err1( void m_err1(
const char *text, const char *text,
const M_WCHAR *arg) const M_WCHAR *arg)
#else
void m_err1(text, arg)
char *text;
M_WCHAR *arg;
#endif
{ {
char *buffer, *mb_arg; char *buffer, *mb_arg;
@ -77,15 +71,9 @@ m_esuffix();
} }
#if defined(M_PROTO)
void m_mberr1( void m_mberr1(
const char *text, const char *text,
const char *arg) const char *arg)
#else
void m_err1(text, arg)
char *text;
char *arg;
#endif
{ {
M_WCHAR *wc_arg; M_WCHAR *wc_arg;
@ -95,17 +83,10 @@ void m_err1(text, arg)
} }
/* Issue error message (two arguments) */ /* Issue error message (two arguments) */
#if defined(M_PROTO)
void m_err2( void m_err2(
const char *text, const char *text,
const M_WCHAR *arg1, const M_WCHAR *arg1,
const M_WCHAR *arg2) const M_WCHAR *arg2)
#else
void m_err2(text, arg1, arg2)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1,*mb_arg2; char *mb_arg1,*mb_arg2;
@ -126,19 +107,11 @@ void m_err2(text, arg1, arg2)
} }
/* Issue error message (three arguments) */ /* Issue error message (three arguments) */
#if defined(M_PROTO)
void m_err3( void m_err3(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
M_WCHAR *arg2, M_WCHAR *arg2,
M_WCHAR *arg3) M_WCHAR *arg3)
#else
void m_err3(text, arg1, arg2, arg3)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3; char *mb_arg1, *mb_arg2, *mb_arg3;
@ -164,21 +137,12 @@ void m_err3(text, arg1, arg2, arg3)
} }
/* Issue error message (four arguments) */ /* Issue error message (four arguments) */
#if defined(M_PROTO)
void m_err4( void m_err4(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
M_WCHAR *arg2, M_WCHAR *arg2,
M_WCHAR *arg3, M_WCHAR *arg3,
M_WCHAR *arg4) M_WCHAR *arg4)
#else
void m_err4(text, arg1, arg2, arg3, arg4)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4; char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
@ -207,7 +171,6 @@ void m_err4(text, arg1, arg2, arg3, arg4)
} }
/* Issue error message (five arguments) */ /* Issue error message (five arguments) */
#if defined(M_PROTO)
void m_err5( void m_err5(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
@ -215,15 +178,6 @@ void m_err5(
M_WCHAR *arg3, M_WCHAR *arg3,
M_WCHAR *arg4, M_WCHAR *arg4,
M_WCHAR *arg5) M_WCHAR *arg5)
#else
void m_err5(text, arg1, arg2, arg3, arg4, arg5)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
M_WCHAR *arg5;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@ -261,7 +215,6 @@ void m_err5(text, arg1, arg2, arg3, arg4, arg5)
} }
/* Issue error message (six arguments) */ /* Issue error message (six arguments) */
#if defined(M_PROTO)
void m_err6( void m_err6(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
@ -270,16 +223,6 @@ void m_err6(
M_WCHAR *arg4, M_WCHAR *arg4,
M_WCHAR *arg5, M_WCHAR *arg5,
M_WCHAR *arg6) M_WCHAR *arg6)
#else
void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
M_WCHAR *arg5;
M_WCHAR *arg6;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
@ -321,7 +264,6 @@ void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
} }
/* Issue error message (seven arguments) */ /* Issue error message (seven arguments) */
#if defined(M_PROTO)
void m_err7( void m_err7(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
@ -331,17 +273,6 @@ void m_err7(
M_WCHAR *arg5, M_WCHAR *arg5,
M_WCHAR *arg6, M_WCHAR *arg6,
M_WCHAR *arg7) M_WCHAR *arg7)
#else
void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
M_WCHAR *arg5;
M_WCHAR *arg6;
M_WCHAR *arg7;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;

View file

@ -41,14 +41,7 @@
Returns 0 if elt is not a valid element name, if param is specified Returns 0 if elt is not a valid element name, if param is specified
but is not a valid parameter name, or if param is NULL and value is but is not a valid parameter name, or if param is NULL and value is
not a valid value of any of elt's parameters. */ not a valid value of any of elt's parameters. */
#if defined(M_PROTO)
int m_findpar( const char *elt , const char *param , const M_WCHAR *value ) int m_findpar( const char *elt , const char *param , const M_WCHAR *value )
#else
int m_findpar(elt, param, value)
char *elt ;
char *param ;
M_WCHAR *value ;
#endif /* M_PROTO */
{ {
M_ELEMENT eltid ; M_ELEMENT eltid ;
int par ; int par ;

View file

@ -290,13 +290,7 @@ void m_stkparams(M_NOPAR)
} }
/* Update the default of a parameter whose default is #CURRENT */ /* Update the default of a parameter whose default is #CURRENT */
#if defined(M_PROTO)
void m_updatedefault(const int par , const M_WCHAR *string ) void m_updatedefault(const int par , const M_WCHAR *string )
#else
void m_updatedefault(par, string)
int par ;
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
if (m_parameter[par - 1].deftype != M_CURRENT && if (m_parameter[par - 1].deftype != M_CURRENT &&
m_parameter[par - 1].deftype != M_CHANGEDCUR) return ; m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;

View file

@ -345,8 +345,6 @@ M_PAREXTERN int m_wsused ;
/* Temporary pointers to parameter values. Used while scanning start tag /* Temporary pointers to parameter values. Used while scanning start tag
before element is placed on parse stack.*/ before element is placed on parse stack.*/
M_PAREXTERN M_PAREXTERN
#if defined M_PROTO
#endif
M_WCHAR *m_poccur[ M_WCHAR *m_poccur[
#if defined(M_PARDEF) #if defined(M_PARDEF)
M_MAXPAR ? M_MAXPAR : 1 M_MAXPAR ? M_MAXPAR : 1

View file

@ -34,14 +34,7 @@
/* Function callable by interface designers. Returns TRUE if specified value /* Function callable by interface designers. Returns TRUE if specified value
is a legal value for the indicated parameter of the given element, is a legal value for the indicated parameter of the given element,
FALSE otherwise. */ FALSE otherwise. */
#if defined(M_PROTO)
LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value ) LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value )
#else
LOGICAL m_parvalok(elt, param, value)
M_WCHAR *elt ;
M_WCHAR *param ;
M_WCHAR *value ;
#endif /* M_PROTO */
{ {
M_ELEMENT eltid ; M_ELEMENT eltid ;
int par ; int par ;

File diff suppressed because it is too large Load diff

View file

@ -398,12 +398,7 @@ int m_getachar(dchar)
} }
/* Reads a name token */ /* Reads a name token */
#if defined(M_PROTO)
void m_getname(M_WCHAR first) void m_getname(M_WCHAR first)
#else
void m_getname(first)
M_WCHAR first ;
#endif
{ {
M_WCHAR *p ; M_WCHAR *p ;
M_HOLDTYPE dchar ; M_HOLDTYPE dchar ;
@ -645,14 +640,7 @@ void m_litproc(delim)
} }
/* Called when a missing tagc delimiter is detected */ /* Called when a missing tagc delimiter is detected */
#if defined(M_PROTO)
void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start) void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start)
#else
void m_missingtagc(c, dchar, start)
int c ;
M_HOLDTYPE dchar ;
LOGICAL start ;
#endif
{ {
if (! m_wholetag) { if (! m_wholetag) {
if (start) m_mberr1("Invalid parameter or missing %s", m_tagc); if (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
@ -665,18 +653,8 @@ void m_missingtagc(c, dchar, start)
/* Have found one character in a possible short reference delimiter. /* Have found one character in a possible short reference delimiter.
Prepare to look for the next one */ Prepare to look for the next one */
#if defined(M_PROTO)
void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
LOGICAL skipblank, unsigned char type) LOGICAL skipblank, unsigned char type)
#else
void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
int *n ;
int i ;
LOGICAL *linestart ;
LOGICAL newlinestart ;
LOGICAL skipblank ;
unsigned char type ;
#endif
{ {
int k ; int k ;
char mb_re,mb_seqchar, mb_rschar; char mb_re,mb_seqchar, mb_rschar;
@ -858,13 +836,7 @@ int m_scan(M_NOPAR)
/* Process explicit or implied USEMAP or ADDMAP */ /* Process explicit or implied USEMAP or ADDMAP */
#if defined(M_PROTO)
void m_setmap(int map, LOGICAL useoradd) void m_setmap(int map, LOGICAL useoradd)
#else
void m_setmap(map, useoradd)
int map ;
LOGICAL useoradd ;
#endif
{ {
int i ; int i ;
int sref ; int sref ;
@ -1082,13 +1054,7 @@ void m_sigre(M_NOPAR)
/* 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 */
#if defined(M_PROTO)
void m_undodelim(M_WCHAR *delim, LOGICAL flag) void m_undodelim(M_WCHAR *delim, LOGICAL flag)
#else
void m_undodelim(delim, flag)
M_WCHAR *delim ;
LOGICAL flag ;
#endif
{ {
M_WCHAR *p ; M_WCHAR *p ;
@ -1105,14 +1071,7 @@ void m_undodelim(delim, flag)
/* Place a character on the current input stream. The character may have /* Place a character on the current input stream. The character may have
been scanned and determined not to be part of the current token or it been scanned and determined not to be part of the current token or it
may be in the expansion of an entity*/ may be in the expansion of an entity*/
#if defined(M_PROTO)
void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread) void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread)
#else
void m_ungetachar(c, dchar, preread)
int c ;
M_HOLDTYPE dchar ;
LOGICAL preread ;
#endif
{ {
char buffer[10] ; char buffer[10] ;
int length; int length;

View file

@ -31,14 +31,7 @@
/* Include generated code */ /* Include generated code */
#include "stfile.c" #include "stfile.c"
#if defined(M_PROTO)
void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END) void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END)
#else
void m_stcaction(m_string, M_START, M_END)
M_WCHAR *m_string ;
LOGICAL M_START ;
LOGICAL M_END ;
#endif
{ {
m_stackpar = m_stacktop->stparam ; m_stackpar = m_stacktop->stparam ;
(*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ; (*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;

View file

@ -88,13 +88,7 @@ int m_checkstart(val)
If VAL is not the element at the top of the parse stack, m_ckend If VAL is not the element at the top of the parse stack, m_ckend
checks to see if the end of VAL can validly end nested checks to see if the end of VAL can validly end nested
elements as well. */ elements as well. */
#if defined(M_PROTO)
LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet) LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
#else
LOGICAL m_ckend(val, neednet)
M_ELEMENT val ;
LOGICAL neednet ;
#endif
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
M_OPENFSA *fsastack ; M_OPENFSA *fsastack ;
@ -423,14 +417,7 @@ void m_pop(M_NOPAR)
/* Pushes a new item onto the parse stack, setting its element, current, /* Pushes a new item onto the parse stack, setting its element, current,
and neednet fields as indicated by the parameters*/ and neednet fields as indicated by the parameters*/
#if defined(M_PROTO)
void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need) void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need)
#else
void m_push(elt, current, need)
M_ELEMENT elt ;
M_STATE current ;
LOGICAL need ;
#endif
{ {
M_PARSE *newstack ; M_PARSE *newstack ;
@ -651,13 +638,7 @@ LOGICAL m_strtproc(scanval)
} }
/* Processes explicit or implied start tag*/ /* Processes explicit or implied start tag*/
#if defined(M_PROTO)
void m_strttag(M_ELEMENT val, LOGICAL net) void m_strttag(M_ELEMENT val, LOGICAL net)
#else
void m_strttag(val, net)
M_ELEMENT val ;
LOGICAL net ;
#endif
{ {
m_transition(val, TRUE) ; m_transition(val, TRUE) ;
if (val) { if (val) {
@ -723,13 +704,7 @@ LOGICAL m_textpermitted(M_NOPAR)
/* Returns TRUE iff LABEL allowed in the current state of the current /* Returns TRUE iff LABEL allowed in the current state of the current
element (without expanding any minimization). May result in changes element (without expanding any minimization). May result in changes
to the stack of FSA's for this element if and-groups open or close. */ to the stack of FSA's for this element if and-groups open or close. */
#if defined(M_PROTO)
LOGICAL m_transition(M_ELEMENT label, LOGICAL recur) LOGICAL m_transition(M_ELEMENT label, LOGICAL recur)
#else
LOGICAL m_transition(label, recur)
M_ELEMENT label ;
LOGICAL recur ;
#endif
{ {
M_ARC parc ; M_ARC parc ;
M_OPENFSA *newfsa ; M_OPENFSA *newfsa ;

View file

@ -36,12 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "tfile.c" #include "tfile.c"
/* When a text character occurs */ /* When a text character occurs */
#if defined(M_PROTO)
void m_textaction(M_WCHAR m_textchar) void m_textaction(M_WCHAR m_textchar)
#else
void m_textaction(m_textchar)
M_WCHAR m_textchar ;
#endif
{ {
char buffer[10] ; char buffer[10] ;
char mb_re; char mb_re;

View file

@ -26,25 +26,12 @@
*/ */
#include "basic.h" #include "basic.h"
LOGICAL m_allwhite( LOGICAL m_allwhite(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
LOGICAL m_whitespace( LOGICAL m_whitespace(M_WCHAR c);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
/* Test if a string contains only white space characters */ /* Test if a string contains only white space characters */
#if defined(M_PROTO)
LOGICAL m_allwhite(const M_WCHAR *string ) LOGICAL m_allwhite(const M_WCHAR *string )
#else
LOGICAL m_allwhite(string)
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
const M_WCHAR *p ; const M_WCHAR *p ;

View file

@ -46,69 +46,23 @@ typedef wchar_t M_WCHAR;
/* For function prototypes */ /* For function prototypes */
typedef char * M_POINTER; typedef char * M_POINTER;
#if defined(hpux) || defined(__aix) || defined(sun)
/* Old unix stuff
*#define void int
*#define M_NOPAR
*/
/* New Ansi style */
#define M_PROTO
#define M_NOPAR void #define M_NOPAR void
#else
#define M_PROTO
#define M_NOPAR void
#endif
char *MakeMByteString( char *MakeMByteString(const M_WCHAR *from);
#if defined(M_PROTO)
const M_WCHAR *from
#endif
);
M_WCHAR *MakeWideCharString( M_WCHAR *MakeWideCharString(const char *from);
#if defined(M_PROTO)
const char *from
#endif
);
int w_strcmp( int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
#if defined(M_PROTO)
const M_WCHAR *string1, const M_WCHAR *string2
#endif
);
M_WCHAR *w_strcpy( M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
#if defined(M_PROTO)
M_WCHAR *string1, const M_WCHAR *string2
#endif
);
M_WCHAR *w_strncpy( M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
#if defined(M_PROTO)
M_WCHAR *string1, const M_WCHAR *string2, int max
#endif
);
int w_strlen( int w_strlen(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
);
M_WCHAR *w_strchr( M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
#if defined(M_PROTO)
M_WCHAR *string, const M_WCHAR chr
#endif
);
M_WCHAR *w_strstr( M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
#if defined(M_PROTO)
M_WCHAR *string1, M_WCHAR *string2
#endif
);
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;

View file

@ -37,179 +37,63 @@ This product and information is proprietary of Tandem Computers Incorporated.
#define CONTINIT(a) #define CONTINIT(a)
#endif #endif
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void dumpdlmptr( void dumpdlmptr(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void dumpnode( void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
#if defined(M_PROTO)
LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
#endif
) ;
void dumptree( void dumptree(LOGICAL sparse);
#if defined(M_PROTO)
LOGICAL sparse
#endif
) ;
void enterdelim( void enterdelim(int n);
#if defined(M_PROTO)
int n
#endif
) ;
void m_error( void m_error(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_err1( void m_err1(char *text, char *arg);
#if defined(M_PROTO)
char *text, char *arg
#endif
) ;
void getcode( void getcode(int n);
#if defined(M_PROTO)
int n
#endif
) ;
void getcolon( void getcolon(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int getcontext( int getcontext(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL getdname( LOGICAL getdname(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void inccon( void inccon(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void incdelim( void incdelim(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void loaddelim( void loaddelim(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int m_lower( int m_lower(int c);
#if defined(M_PROTO)
int c
#endif
) ;
void main( void main(int argc, char **argv);
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void nextcon( void nextcon(LOGICAL sparse);
#if defined(M_PROTO)
LOGICAL sparse
#endif
) ;
void m_openchk( void m_openchk(FILE **ptr, char *name, char *mode);
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
void printval( void printval(FILE *file, M_TRIE *value);
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void prtctxt( void prtctxt(int column, int value);
#if defined(M_PROTO)
int column, int value
#endif
) ;
int readchar( int readchar(LOGICAL cap);
#if defined(M_PROTO)
LOGICAL cap
#endif
) ;
void skiptoend( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void unread( void unread(int c);
#if defined(M_PROTO)
int c
#endif
) ;
int m_upper( int m_upper(int c);
#if defined(M_PROTO)
int c
#endif
) ;
void warning( void warning(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1( void warning1(char *text, char *arg);
#if defined(M_PROTO)
char *text, char *arg
#endif
) ;
void warning2( void warning2(char *text, char *arg1, char *arg2);
#if defined(M_PROTO)
char *text, char *arg1, char *arg2
#endif
) ;
LOGICAL m_whitespace( LOGICAL m_whitespace(M_WCHAR c);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
#define NOMORE -1 #define NOMORE -1

View file

@ -55,12 +55,7 @@ void dumpdlmptr(M_NOPAR)
} }
/* Output the generated data structures */ /* Output the generated data structures */
#if defined(M_PROTO)
void dumptree(LOGICAL sparse) void dumptree(LOGICAL sparse)
#else
void dumptree(sparse)
LOGICAL sparse;
#endif
{ {
int i, count = 0; int i, count = 0;
@ -563,12 +558,7 @@ loading = FALSE;
} }
/* Output transition matrix */ /* Output transition matrix */
#if defined(M_PROTO)
void nextcon(LOGICAL sparse) void nextcon(LOGICAL sparse)
#else
void nextcon(sparse)
LOGICAL sparse;
#endif
{ {
int i, j; int i, j;
int firstinrow; int firstinrow;
@ -635,12 +625,7 @@ void prtctxt(column, value)
/* Read the next input character */ /* Read the next input character */
#if defined(M_PROTO)
int readchar(LOGICAL cap) int readchar(LOGICAL cap)
#else
int readchar(cap)
LOGICAL cap;
#endif
{ {
int c; int c;
M_WCHAR wnl; M_WCHAR wnl;

View file

@ -29,15 +29,7 @@
#endif #endif
#include "basic.h" #include "basic.h"
void main( void main(int argc, char **argv)
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void main(argc, 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

@ -25,23 +25,11 @@
/* Entout has procedures to write generated entity TRIE */ /* Entout has procedures to write generated entity TRIE */
void entptr( void entptr(M_ENTITY *data);
#if defined(M_PROTO)
M_ENTITY *data
#endif
) ;
char *typetype( char *typetype(int n);
#if defined(M_PROTO)
int n
#endif
) ;
char *typewhere( char *typewhere(unsigned char n);
#if defined(M_PROTO)
unsigned char n
#endif
) ;
/* Macro names written to output file */ /* Macro names written to output file */
char xdbuild[] = "M_DBUILD" ; char xdbuild[] = "M_DBUILD" ;
@ -213,12 +201,7 @@ char *typetype(n)
} }
/* Typewhere returns a string indicating where the nth entity was defined.*/ /* Typewhere returns a string indicating where the nth entity was defined.*/
#if defined(M_PROTO)
char *typewhere(unsigned char n) char *typewhere(unsigned char n)
#else
char *typewhere(n)
unsigned char n ;
#endif
{ {
switch(n) { switch(n) {
case M_DBUILD: return(xdbuild) ; case M_DBUILD: return(xdbuild) ;

View file

@ -33,128 +33,47 @@ extern FILE *m_errfile ;
extern int m_line ; extern int m_line ;
extern LOGICAL errexit ; extern LOGICAL errexit ;
void eprefix( void eprefix(LOGICAL flag);
#if defined(M_PROTO)
LOGICAL flag
#endif
) ;
void m_errline( void m_errline(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_error( void m_error(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_err1( void m_err1(char *text, const M_WCHAR *arg);
#if defined(M_PROTO)
char *text, const M_WCHAR *arg
#endif
) ;
void m_mberr1( void m_mberr1(char *text, const char *arg);
#if defined(M_PROTO)
char *text, const char *arg
#endif
) ;
void m_err2( void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
void m_err3( void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void m_err5( void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
#if defined(M_PROTO) M_WCHAR *arg5);
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
M_WCHAR *arg5
#endif
) ;
void esuffix( void esuffix(void);
#if defined(M_PROTO)
void
#endif
) ;
void msgline( void msgline(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void msg1line( void msg1line(char *text, char *arg1);
#if defined(M_PROTO)
char *text, char *arg1
#endif
) ;
void skiptoend( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void m_wctrace( void m_wctrace(M_WCHAR *text);
#if defined(M_PROTO)
M_WCHAR *text
#endif
) ;
void m_trace( void m_trace(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning( void warning(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1( void warning1(char *text, M_WCHAR *arg);
#if defined(M_PROTO)
char *text, M_WCHAR *arg
#endif
) ;
void warning2( void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2
#endif
) ;
void warning3( void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void warning4( void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
#endif
) ;
/* Write error message prefix */ /* Write error message prefix */
#if defined(M_PROTO)
void eprefix(LOGICAL flag) void eprefix(LOGICAL flag)
#else
void eprefix(flag)
LOGICAL flag ;
#endif
{ {
if (flag) errexit = TRUE ; if (flag) errexit = TRUE ;
fprintf(stderr, "\n**** ") ; fprintf(stderr, "\n**** ") ;
@ -184,13 +103,7 @@ void m_error(text)
/* Writes an error message with one argument to standard error and file /* Writes an error message with one argument to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err1(char *text, const M_WCHAR *arg) void m_err1(char *text, const M_WCHAR *arg)
#else
void m_err1(text, arg)
char *text;
M_WCHAR *arg ;
#endif
{ {
char *mb_arg; char *mb_arg;
@ -203,13 +116,7 @@ skiptoend() ;
m_free(mb_arg,"multi-byte string"); m_free(mb_arg,"multi-byte string");
} }
#if defined(M_PROTO)
void m_mberr1(char *text, const char *arg) void m_mberr1(char *text, const char *arg)
#else
void m_err1(text, arg)
char *text;
char *arg ;
#endif
{ {
eprefix(TRUE) ; eprefix(TRUE) ;
fprintf(stderr, text, arg) ; fprintf(stderr, text, arg) ;
@ -220,13 +127,7 @@ skiptoend() ;
/* Writes an error message with two arguments to standard error and file /* Writes an error message with two arguments to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2) void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2)
#else
void m_err2(text, arg1, arg2)
char *text;
M_WCHAR *arg1, *arg2 ;
#endif
{ {
char *mb_arg1, *mb_arg2; char *mb_arg1, *mb_arg2;
@ -243,13 +144,7 @@ m_free(mb_arg2,"multi-byte string");
/* Writes an error message with three arguments to standard error and file /* Writes an error message with three arguments to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3) void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
#else
void m_err3(text, arg1, arg2, arg3)
char *text;
M_WCHAR *arg1, *arg2, *arg3 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3; char *mb_arg1, *mb_arg2, *mb_arg3;
@ -268,14 +163,8 @@ m_free(mb_arg3,"multi-byte string");
/* Writes an error message with five arguments to standard error and file /* Writes an error message with five arguments to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
M_WCHAR *arg4, M_WCHAR *arg5) M_WCHAR *arg4, M_WCHAR *arg5)
#else
void m_err5(text, arg1, arg2, arg3, arg4, arg5)
char *text;
M_WCHAR *arg1, *arg2, *arg3, *arg4, *arg5 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@ -347,13 +236,7 @@ void warning(text)
/* Writes a nonfatal error message with one argument to standard error /* Writes a nonfatal error message with one argument to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning1( char *text, M_WCHAR *arg) void warning1( char *text, M_WCHAR *arg)
#else
void warning1(text, arg)
char *text;
M_WCHAR *arg ;
#endif
{ {
char *mb_arg; char *mb_arg;
@ -367,13 +250,7 @@ m_free(mb_arg,"multi-byte string");
/* Writes a nonfatal error message with two arguments to standard error /* Writes a nonfatal error message with two arguments to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2) void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2)
#else
void warning2(text, arg1, arg2)
char *text;
M_WCHAR *arg1, *arg2 ;
#endif
{ {
char *mb_arg1, *mb_arg2; char *mb_arg1, *mb_arg2;
@ -389,13 +266,7 @@ m_free(mb_arg2,"multi-byte string");
/* Writes a nonfatal error message with three arguments to standard error /* Writes a nonfatal error message with three arguments to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3) void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
#else
void warning3(text, arg1, arg2, arg3)
char *text;
M_WCHAR *arg1, *arg2, *arg3 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3; char *mb_arg1, *mb_arg2, *mb_arg3;
@ -413,14 +284,8 @@ m_free(mb_arg3,"multi-byte string");
/* Writes a nonfatal error message with four arguments to standard error /* Writes a nonfatal error message with four arguments to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
M_WCHAR *arg4) M_WCHAR *arg4)
#else
void warning4(text, arg1, arg2, arg3, arg4)
char *text;
M_WCHAR *arg1, *arg2, *arg3, *arg4 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4;

View file

@ -30,11 +30,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#endif #endif
#include "basic.h" #include "basic.h"
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
/* 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 */

View file

@ -58,23 +58,11 @@ struct data {
char linedir[] = "#line" ; char linedir[] = "#line" ;
char *p = linedir, *q = linedir + 1 ; char *p = linedir, *q = linedir + 1 ;
void main( void main(int argc, char **argv);
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void copyfile( void copyfile(char *pfile1, char *pfile2);
#if defined(m_proto)
char *pfile1, char *pfile2
#endif
) ;
int nextchar( int nextchar(FILE *file, struct data *data);
#if defined (M_PROTO)
FILE *file, struct data *data
#endif
) ;
void main(argc, argv) void main(argc, argv)
int argc ; int argc ;

View file

@ -30,23 +30,11 @@
#endif #endif
#include "basic.h" #include "basic.h"
void m_err1( void m_err1(const char *text, const char *arg);
#if defined(M_PROTO)
const char *text, const char *arg
#endif
) ;
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
void m_inctest( void m_inctest(int *count, int limit, char *message);
#if defined(M_PROTO)
int *count, int limit, char *message
#endif
) ;
/* 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(count, limit, message)

View file

@ -29,11 +29,7 @@
#include "common.h" #include "common.h"
extern char m_chartype[M_CHARSETLEN] ; extern char m_chartype[M_CHARSETLEN] ;
void m_initctype( void m_initctype(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void m_initctype(M_NOPAR) void m_initctype(M_NOPAR)
{ {

View file

@ -27,17 +27,9 @@
#include <string.h> #include <string.h>
#include "basic.h" #include "basic.h"
char *m_itoa( char *m_itoa(int n, char *s);
#if defined(M_PROTO)
int n, char *s
#endif
) ;
void reverse( void reverse(char *s);
#if defined(M_PROTO)
char *s
#endif
) ;
char *m_itoa(n, s) /* convert n to characters in s */ char *m_itoa(n, s) /* convert n to characters in s */
char s[]; char s[];

View file

@ -27,18 +27,7 @@
#include "basic.h" #include "basic.h"
LOGICAL m_letter(
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
#if defined(M_PROTO)
LOGICAL m_letter(M_WCHAR c) LOGICAL m_letter(M_WCHAR c)
#else
LOGICAL m_letter(c)
M_WCHAR c ;
#endif
{ {
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ;
return(FALSE) ; return(FALSE) ;

View file

@ -27,17 +27,8 @@
#include "basic.h" #include "basic.h"
int m_lower(
#if defined(M_PROTO)
int c
#endif
) ;
/* 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

@ -36,53 +36,21 @@
extern LOGICAL m_heapchk ; extern LOGICAL m_heapchk ;
extern LOGICAL m_malftrace ; extern LOGICAL m_malftrace ;
void m_errline( void m_errline(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
void m_free( void m_free(void *block, char *msg);
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void m_heapdump( void m_heapdump(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void *m_realloc( void *m_realloc(void *ptr, int size, char *msg);
#if defined(M_PROTO)
void *ptr, int size, char *msg
#endif
) ;
void *m_trace( void *m_trace(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void *m_wctrace( void *m_wctrace(M_WCHAR *text);
#if defined(M_PROTO)
M_WCHAR *text
#endif
) ;
void m_free(block, msg) void m_free(block, msg)
void *block ; void *block ;

View file

@ -33,22 +33,12 @@
extern FILE *m_errfile ; extern FILE *m_errfile ;
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
void m_openchk( void m_openchk(FILE **ptr, char *name, char *mode);
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
/* 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 **ptrm, 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

@ -33,13 +33,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Check to see if string is a valid value for parameter par. If so /* Check to see if string is a valid value for parameter par. If so
return a pointer to the keyword if it's a keyword parameter and otherwise return a pointer to the keyword if it's a keyword parameter and otherwise
a pointer to string. If not valid, return FALSE. */ a pointer to string. If not valid, return FALSE. */
#if defined(M_PROTO)
const M_WCHAR *m_partype(const int par , const M_WCHAR *string ) const M_WCHAR *m_partype(const int par , const M_WCHAR *string )
#else
M_WCHAR *m_partype(par, string)
int par ;
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
LOGICAL first = TRUE ; LOGICAL first = TRUE ;
int kw ; int kw ;

View file

@ -29,11 +29,7 @@
#if defined(sparse) #if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j) #define m_newcon(i, j) m_sprscon(i, j)
int m_sprscon( int m_sprscon(int i, int j);
#if defined(M_PROTO)
int i, int j
#endif
) ;
#else #else
#define m_newcon(i, j) m_nextcon[i][j] #define m_newcon(i, j) m_nextcon[i][j]

View file

@ -45,26 +45,12 @@ extern FILE *m_errfile ;
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void m_entercharintrie( void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
#if defined(M_PROTO)
M_TRIE **currentnode, M_WCHAR c
#endif
) ;
/* Enters the next character of a string into a trie */ /* Enters the next character of a string into a trie */
#if defined(M_PROTO)
void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c) void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c)
#else
void m_entercharintrie(currentnode, c)
M_TRIE **currentnode ;
M_WCHAR c ;
#endif
{ {
M_TRIE *newnode ; M_TRIE *newnode ;
@ -112,13 +98,7 @@ M_TRIE *m_gettrienode(M_NOPAR)
/* M_lookfortrie(p, xtrie) looks for string p in the specified trie, /* M_lookfortrie(p, xtrie) looks for string p in the specified trie,
returning its data value if found and otherwise FALSE */ returning its data value if found and otherwise FALSE */
#if defined(M_PROTO)
void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie ) void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie )
#else
void *m_lookfortrie(p, xtrie)
M_WCHAR *p ;
M_TRIE *xtrie ;
#endif /* M_PROTO */
{ {
M_TRIE *currentnode ; M_TRIE *currentnode ;
@ -141,10 +121,7 @@ void *m_lookfortrie(p, 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

@ -51,26 +51,10 @@ struct m_ptrie {
} ; } ;
M_TRIE *m_gettrienode( M_TRIE *m_gettrienode(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void *m_lookfortrie( void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
#if defined(M_PROTO)
const M_WCHAR *p, const M_TRIE *xtrie
#endif
) ;
void *m_ntrtrie( void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
#if defined(M_PROTO)
M_WCHAR *p, M_TRIE *xtrie, void *dataval
#endif
) ;
void *m_resettrie( void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
#if defined(M_PROTO)
M_TRIE *xtrie, M_WCHAR *p, void *value
#endif
) ;

View file

@ -31,24 +31,12 @@
#include "basic.h" #include "basic.h"
#include "trie.h" #include "trie.h"
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void dumpnode( void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
#if defined(M_PROTO) void (*proc)(FILE *file, void *value));
LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
void (*proc)(FILE *file, void *value)
#endif
) ;
void printval( void printval(FILE *file, void *value);
#if defined(M_PROTO)
FILE *file, void *value
#endif
) ;
/* 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*/
@ -71,12 +59,7 @@ void dumpnode(first, file, trieptr, count, proc)
FILE *file ; FILE *file ;
M_TRIE *trieptr ; M_TRIE *trieptr ;
int *count ; int *count ;
void (*proc) ( void (*proc) (FILE *file, void *value);
#if defined (M_PROTO)
FILE *file,
void *value
#endif
) ;
{ {
M_TRIE *p ; M_TRIE *p ;
int savecount ; int savecount ;

View file

@ -29,18 +29,10 @@
#include "basic.h" #include "basic.h"
#include "trie.h" #include "trie.h"
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void m_dumptrie( void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
#if defined(M_PROTO) void (*proc)(void *value));
FILE *file, M_TRIE *xtrie, char *extname, int *count,
void (*proc)(void *value)
#endif
) ;
/* 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, xtrie, extname, count, proc)
@ -48,11 +40,7 @@ void m_dumptrie(file, xtrie, extname, count, proc)
M_TRIE *xtrie ; M_TRIE *xtrie ;
char *extname ; char *extname ;
int *count ; int *count ;
void (*proc)( void (*proc)(void *value);
#if defined(M_PROTO)
void *value
#endif
) ;
{ {
int firstson ; int firstson ;
M_TRIE *p ; M_TRIE *p ;

View file

@ -29,25 +29,13 @@
#include "basic.h" #include "basic.h"
#include "trie.h" #include "trie.h"
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void dumpnode( void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
#if defined(M_PROTO) void (*proc)(FILE *file, void *value));
LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
void (*proc)(FILE *file, void *value)
#endif
) ;
void dumpptrie( void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
#if defined(M_PROTO) void (*proc)(FILE *file, void *value));
M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
void (*proc)(FILE *file, void *value)
#endif
) ;
/* 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(intname, extname, file, externdef, defdef, proc)
@ -56,12 +44,7 @@ void dumpptrie(intname, extname, file, externdef, defdef, proc)
FILE *file ; FILE *file ;
char *externdef ; char *externdef ;
char *defdef ; char *defdef ;
void (*proc) ( void (*proc) (FILE *file, void *value);
#if defined (M_PROTO)
FILE *file,
void *value
#endif
) ;
{ {
LOGICAL first = TRUE ; LOGICAL first = TRUE ;
int count = 0 ; int count = 0 ;

View file

@ -36,17 +36,10 @@
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
int m_packedlook( int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
#if defined(M_PROTO)
M_PTRIE *xptrie,
M_WCHAR *name
#endif
) ;
/* 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

@ -32,30 +32,13 @@
#include "common.h" #include "common.h"
extern M_CHARTYPE m_ctarray[256] ; extern M_CHARTYPE m_ctarray[256] ;
int m_wcupstrcmp( int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
#if defined(M_PROTO)
const M_WCHAR *p, const M_WCHAR *q
#endif
) ;
int m_wcmbupstrcmp( int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
#if defined(M_PROTO)
const M_WCHAR *p, const char *q
#endif
) ;
int m_mbmbupstrcmp( int m_mbmbupstrcmp(const char *p, const char *q);
#if defined(M_PROTO)
const char *p, const char *q
#endif
) ;
#if defined(M_PROTO)
int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q ) int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q )
#else
int m_wcupstrcmp(p, q)
M_WCHAR *p, *q ;
#endif /* M_PROTO */
{ {
do { do {
if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ; if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
@ -65,13 +48,7 @@ int m_wcupstrcmp(p, q)
return(0) ; return(0) ;
} }
#if defined(M_PROTO)
int m_wcmbupstrcmp(const M_WCHAR *p, const char *q) int m_wcmbupstrcmp(const M_WCHAR *p, const char *q)
#else
int m_wcmbupstrcmp(p, q)
M_WCHAR *p;
char *q ;
#endif
{ {
M_WCHAR *wc; M_WCHAR *wc;
int retval; int retval;
@ -82,13 +59,7 @@ int m_wcmbupstrcmp(p, q)
return retval; return retval;
} }
#if defined(M_PROTO)
int m_mbmbupstrcmp(const char *p, const char *q) int m_mbmbupstrcmp(const char *p, const char *q)
#else
int m_mbmbupstrcmp(p, q)
char *p;
char *q ;
#endif
{ {
M_WCHAR *w_p, *w_q; M_WCHAR *w_p, *w_q;
int retval; int retval;

View file

@ -29,14 +29,7 @@
#include "basic.h" #include "basic.h"
int m_upper( int m_upper(int c)
#if defined(M_PROTO)
int c
#endif
) ;
int m_upper(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

@ -29,17 +29,9 @@
#include "basic.h" #include "basic.h"
int m_upper( int m_upper(int c);
#if defined(M_PROTO)
int c
#endif
) ;
int m_upstrcmp( int m_upstrcmp(char *p, char *q);
#if defined(M_PROTO)
char *p, char *q
#endif
) ;
int m_upstrcmp(p, q) int m_upstrcmp(p, q)
char *p, *q ; char *p, *q ;

View file

@ -30,13 +30,7 @@
/* compare two wide character strings */ /* compare two wide character strings */
#if defined(M_PROTO)
int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2) int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2)
#else
int w_strcmp(string1, string2)
M_WCHAR *string1;
M_WCHAR *string2;
#endif
{ {
M_WCHAR c1, c2, null; M_WCHAR c1, c2, null;
@ -58,13 +52,7 @@ while (1)
/* copy a wide character string */ /* copy a wide character string */
#if defined(M_PROTO)
M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2) M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2)
#else
M_WCHAR *w_strcpy(string1, string2)
M_WCHAR *string1;
M_WCHAR *string2;
#endif
{ {
M_WCHAR *string1start; M_WCHAR *string1start;
@ -77,14 +65,7 @@ return string1start;
/* copy a wide character string, stopping after "max" moves */ /* copy a wide character string, stopping after "max" moves */
#if defined(M_PROTO)
M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max) M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max)
#else
M_WCHAR *w_strncpy(string1, string2, max)
M_WCHAR *string1;
M_WCHAR *string2;
int max;
#endif
{ {
M_WCHAR *string1start; M_WCHAR *string1start;
@ -97,12 +78,7 @@ return string1start;
/* get the length of a wide character string */ /* get the length of a wide character string */
#if defined(M_PROTO)
int w_strlen(const M_WCHAR *string) int w_strlen(const M_WCHAR *string)
#else
int w_strlen(string)
M_WCHAR *string;
#endif
{ {
int length; int length;
@ -115,12 +91,7 @@ return length;
/* find wide character "chr" in wide string "string" */ /* find wide character "chr" in wide string "string" */
#if defined(M_PROTO)
M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr) M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr)
#else
M_WCHAR *w_strchr(string, chr)
M_WCHAR *string, chr;
#endif
{ {
M_WCHAR *where; M_WCHAR *where;
@ -140,12 +111,7 @@ else
/* find wide character "chr" in wide string "string" */ /* find wide character "chr" in wide string "string" */
#if defined(M_PROTO)
M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2) M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2)
#else
M_WCHAR *w_strstr(string1, string2)
M_WCHAR *string1, *string2;
#endif
{ {
M_WCHAR *where1, *where2; M_WCHAR *where1, *where2;
@ -180,12 +146,7 @@ return NULL;
/* make a multi-byte string from a wide character string */ /* make a multi-byte string from a wide character string */
#if defined(M_PROTO)
char *MakeMByteString(const M_WCHAR *wc_string) char *MakeMByteString(const M_WCHAR *wc_string)
#else
char *MakeMByteString(wc_string)
M_WCHAR *wc_string;
#endif
{ {
char *mb_string; char *mb_string;
int length; int length;
@ -210,12 +171,7 @@ return mb_string;
/* make a wide character string from a multi-byte string */ /* make a wide character string from a multi-byte string */
#if defined(M_PROTO)
M_WCHAR *MakeWideCharString(const char *mb_string) M_WCHAR *MakeWideCharString(const char *mb_string)
#else
M_WCHAR *MakeWideCharString(mb_string)
char *mb_string;
#endif
{ {
M_WCHAR *wc_string, *wc_stringStart; M_WCHAR *wc_string, *wc_stringStart;
int length, incr; int length, incr;

View file

@ -27,19 +27,8 @@
#include "basic.h" #include "basic.h"
LOGICAL m_whitespace(
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
/* Test if character c is a blank, tab, or carriage return */ /* Test if character c is a blank, tab, or carriage return */
#if defined(M_PROTO)
LOGICAL m_whitespace(M_WCHAR c) LOGICAL m_whitespace(M_WCHAR c)
#else
LOGICAL m_whitespace(c)
M_WCHAR c ;
#endif
{ {
char mb_c[32]; /* arbitrarily large */ char mb_c[32]; /* arbitrarily large */
int length; int length;

View file

@ -421,8 +421,4 @@ BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ; BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
M_WCHAR *MakeWideCharString( M_WCHAR *MakeWideCharString(const char *from);
#if defined(M_PROTO)
const char *from
#endif
);

View file

@ -37,18 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Addarc adds an arc from FSA state <from> to state <to> setting other /* Addarc adds an arc from FSA state <from> to state <to> setting other
fields as indicated by the other parameters.*/ fields as indicated by the other parameters.*/
#if defined(M_PROTO)
int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt) int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt)
#else
int addarc(from, to, label, and, optional, id, minim, errelt)
STATE *from, *to ;
ELTSTRUCT *label ;
ANDGROUP *and ;
LOGICAL optional ;
int id ;
LOGICAL minim ;
ELTSTRUCT **errelt ;
#endif
{ {
ARC *parc, *qarc ; ARC *parc, *qarc ;
int determ ; int determ ;
@ -630,12 +619,7 @@ LOGICAL samelabelarc(a, s)
/* Saves the name of an element appearing on the left-hand side of a /* Saves the name of an element appearing on the left-hand side of a
grammar rule */ grammar rule */
#if defined(M_PROTO)
void savelhs(LOGICAL param) void savelhs(LOGICAL param)
#else
void savelhs(param)
LOGICAL param ;
#endif
{ {
STATE *end ; STATE *end ;
ELTSTRUCT *errelt ; ELTSTRUCT *errelt ;

View file

@ -124,12 +124,7 @@ newpar->ptypep = NULL ;
/* Check that specified default value is legal parameter value */ /* Check that specified default value is legal parameter value */
#if defined(M_PROTO)
LOGICAL checkdefault( const M_WCHAR *string ) LOGICAL checkdefault( const M_WCHAR *string )
#else
LOGICAL checkdefault(string)
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
const M_WCHAR *p ; const M_WCHAR *p ;
int len ; int len ;
@ -205,12 +200,7 @@ switch (newpar->type)
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize /* Normalize parameter default. Change tabs and RE's to spaces, capitalize
all letters (unless type is CDATA), remove extra space in lists */ all letters (unless type is CDATA), remove extra space in lists */
#if defined(M_PROTO)
void normdefault(M_WCHAR *string ) void normdefault(M_WCHAR *string )
#else
void normdefault(string)
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
M_WCHAR *p, *q ; M_WCHAR *p, *q ;
int i, ret ; int i, ret ;
@ -296,12 +286,7 @@ ruleinit() ;
} }
/* Make string the default for the current parameter of the current element */ /* Make string the default for the current parameter of the current element */
#if defined(M_PROTO)
void setdefault(const M_WCHAR *string) void setdefault(const M_WCHAR *string)
#else
void setdefault()
M_WCHAR *string;
#endif /* M_PROTO */
{ {
PTYPE *kw ; PTYPE *kw ;
int keycount ; int keycount ;

View file

@ -28,587 +28,203 @@
/* Proto.h contains function prototypes for program BUILD. */ /* Proto.h contains function prototypes for program BUILD. */
int addarc( int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
#if defined(M_PROTO) int id, LOGICAL minim, ELTSTRUCT **errelt);
STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
int id, LOGICAL minim, ELTSTRUCT **errelt
#endif
) ;
void adddefent( void adddefent(M_WCHAR *mapname);
#if defined(M_PROTO)
M_WCHAR *mapname
#endif
) ;
LOGICAL addent( LOGICAL addent(M_WCHAR *name);
#if defined(M_PROTO)
M_WCHAR *name
#endif
) ;
void addex( void addex(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void addkeyword( void addkeyword(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL addmapname( LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
#if defined(M_PROTO)
M_WCHAR *p, LOGICAL define
#endif
) ;
void addndent( void addndent(M_WCHAR *p);
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void addpar( void addpar(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void addsref( void addsref(M_WCHAR *p);
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
LOGICAL m_allwhite( LOGICAL m_allwhite(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
void checkand( void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
#if defined(M_PROTO) ELTSTRUCT **errelt);
ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
ELTSTRUCT **errelt
#endif
) ;
LOGICAL checkdefault( LOGICAL checkdefault(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
int checkdfsa( int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
#if defined(M_PROTO)
STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
#endif
) ;
int checkrepeat( int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
#if defined(M_PROTO)
STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
#endif
) ;
void copyintolist( void copyintolist(STATELIST *from, STATELIST **to);
#if defined(M_PROTO)
STATELIST *from, STATELIST **to
#endif
) ;
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void defmapname( void defmapname(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
char *deftype( char *deftype(int n);
#if defined(M_PROTO)
int n
#endif
) ;
void dellist( void dellist(STATELIST **list);
#if defined(M_PROTO)
STATELIST **list
#endif
) ;
void delstartarcs( void delstartarcs(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void done( void done(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void dumpentnode( void dumpentnode(FILE *file, M_TRIE *value);
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void dumpmapnode( void dumpmapnode(FILE *file, M_TRIE *value);
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void dumpsrefnode( void dumpsrefnode(FILE *file,
#if defined(M_PROTO) M_TRIE *value);
FILE *file,
M_TRIE *value
#endif
) ;
void dumpptrie( void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
#if defined(M_PROTO) void (*proc)( FILE *, M_TRIE *));
M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
void (*proc)( FILE *, M_TRIE *)
#endif
) ;
void m_dumptrie( void m_dumptrie(FILE *file,
#if defined(M_PROTO)
FILE *file,
M_TRIE *xtrie, M_TRIE *xtrie,
char *extname, char *extname,
int *count, int *count,
void (*proc)(M_ENTITY *) void (*proc)(M_ENTITY *));
#endif
) ; void eltblocks(FILE *tempfile);
void eltblocks( void eltreeout(M_NOPAR);
#if defined(M_PROTO)
FILE *tempfile void endmodel(M_NOPAR);
#endif
) ; void entout(char *fname);
void eltreeout( char *enttype(int n);
#if defined(M_PROTO)
M_NOPAR void m_error(char *text);
#endif
) ; void m_err1(const char *text, const M_WCHAR *arg);
void endmodel( void m_mberr1(char *text, const char *arg);
#if defined(M_PROTO)
M_NOPAR void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
#endif
) ; void exout(M_NOPAR);
void entout( void m_free(void *block, char *msg);
#if defined(M_PROTO)
char *fname void freetree(TREE *ruletree);
#endif
) ; void found(LOGICAL *flag, char *delim);
char *enttype( void fsa(M_NOPAR);
#if defined(M_PROTO)
int n int getachar(M_NOPAR);
#endif
) ; ANDGROUP *getand(M_NOPAR);
void m_error( LOGICAL getname(int first);
#if defined(M_PROTO)
char *text STATE *getstate(M_NOPAR);
#endif
) ; int gettoken(int *c, int context);
void m_err1( TREE *gettreenode(M_NOPAR);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg void m_initctype(M_NOPAR);
#endif
) ; void initialize(M_NOPAR);
void m_mberr1( LOGICAL litproc(int delim);
#if defined(M_PROTO)
char *text, const char *arg int main(int argc, char **argv);
#endif
) ; void makeand(LOGICAL *canbenull, TREE *root, int optional);
void m_err2( LOGICAL makefsa(TREE *root, int optional);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2 void makeor(LOGICAL *canbenull, TREE *root);
#endif
) ; void makeseq(LOGICAL *canbenull, TREE *root, int optional);
void exout( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
M_NOPAR void msgline(char *text);
#endif
) ; void msg1line(char *text, char *arg1);
void m_free( void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
#if defined(M_PROTO)
void *block, char *msg void normdefault(M_WCHAR *string);
#endif
) ; LOGICAL notinlist(STATELIST *item, STATELIST *list);
void freetree( ELTSTRUCT *ntrelt(M_WCHAR *p);
#if defined(M_PROTO)
TREE *ruletree void m_openchk(FILE **ptr, char *name, char *mode);
#endif
) ; void parout(M_NOPAR);
void found( char *partype(int n);
#if defined(M_PROTO)
LOGICAL *flag, char *delim LOGICAL permitspcd(ARC *a);
#endif
) ; void pop(M_NOPAR);
void fsa( void prulend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR void push(M_NOPAR);
#endif
) ; LOGICAL regenerate(TREE *start, TREE *stop);
int getachar( void repeat(TREE *root);
#if defined(M_PROTO)
M_NOPAR void ruleinit(M_NOPAR);
#endif
) ; void rulend(M_NOPAR);
ANDGROUP *getand( LOGICAL samelabelarc(ARC *a, STATE *s);
#if defined(M_PROTO)
M_NOPAR void savelhs(LOGICAL param);
#endif
) ; void savestartarcs(M_NOPAR);
LOGICAL getname( int scan(M_NOPAR);
#if defined(M_PROTO)
int first void setdefault(const M_WCHAR *string);
#endif
) ; void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
STATE *getstate( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR int m_sprscon(int i, int j);
#endif
) ; void srefout(M_NOPAR);
int gettoken( STATE *startfsa(TREE *root, LOGICAL *canbenull);
#if defined(M_PROTO)
int *c, int context void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
#endif
) ; void template(M_NOPAR);
TREE *gettreenode( char *typecon(int n);
#if defined(M_PROTO)
M_NOPAR void undodelim(M_WCHAR *delim);
#endif
) ; void ungetachar(int c);
void m_initctype( int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
#if defined(M_PROTO)
M_NOPAR int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
#endif
) ; int m_mbmbupstrcmp(const char *p, const char *q);
void initialize( void warning(char *text);
#if defined(M_PROTO)
M_NOPAR void warning1(char *text, M_WCHAR *arg);
#endif
) ; void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
LOGICAL litproc( void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
int delim void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
#endif
) ; LOGICAL m_whitespace(M_WCHAR c);
int main(
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void makeand(
#if defined(M_PROTO)
LOGICAL *canbenull, TREE *root, int optional
#endif
) ;
LOGICAL makefsa(
#if defined(M_PROTO)
TREE *root, int optional
#endif
) ;
void makeor(
#if defined(M_PROTO)
LOGICAL *canbenull, TREE *root
#endif
) ;
void makeseq(
#if defined(M_PROTO)
LOGICAL *canbenull, TREE *root, int optional
#endif
) ;
void *m_malloc(
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void msgline(
#if defined(M_PROTO)
char *text
#endif
) ;
void msg1line(
#if defined(M_PROTO)
char *text, char *arg1
#endif
) ;
void nondeterm(
#if defined(M_PROTO)
TREE *root, int c, ELTSTRUCT *eltp
#endif
) ;
void normdefault(
#if defined(M_PROTO)
M_WCHAR *string
#endif
) ;
LOGICAL notinlist(
#if defined(M_PROTO)
STATELIST *item, STATELIST *list
#endif
) ;
ELTSTRUCT *ntrelt(
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void m_openchk(
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
void parout(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
char *partype(
#if defined(M_PROTO)
int n
#endif
) ;
LOGICAL permitspcd(
#if defined(M_PROTO)
ARC *a
#endif
) ;
void pop(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void prulend(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void push(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL regenerate(
#if defined(M_PROTO)
TREE *start, TREE *stop
#endif
) ;
void repeat(
#if defined(M_PROTO)
TREE *root
#endif
) ;
void ruleinit(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void rulend(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL samelabelarc(
#if defined(M_PROTO)
ARC *a, STATE *s
#endif
) ;
void savelhs(
#if defined(M_PROTO)
LOGICAL param
#endif
) ;
void savestartarcs(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int scan(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void setdefault(
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
void simplebranch(
#if defined(M_PROTO)
TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional
#endif
) ;
void skiptoend(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int m_sprscon(
#if defined(M_PROTO)
int i, int j
#endif
) ;
void srefout(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
STATE *startfsa(
#if defined(M_PROTO)
TREE *root, LOGICAL *canbenull
#endif
) ;
void tempelt(
#if defined(M_PROTO)
ELTSTRUCT *eltp, FILE *tempfile
#endif
) ;
void template(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
char *typecon(
#if defined(M_PROTO)
int n
#endif
) ;
void undodelim(
#if defined(M_PROTO)
M_WCHAR *delim
#endif
) ;
void ungetachar(
#if defined(M_PROTO)
int c
#endif
) ;
int m_wcupstrcmp(
#if defined(M_PROTO)
const M_WCHAR *p, const M_WCHAR *q
#endif
) ;
int m_wcmbupstrcmp(
#if defined(M_PROTO)
const M_WCHAR *p, const char *q
#endif
) ;
int m_mbmbupstrcmp(
#if defined(M_PROTO)
const char *p, const char *q
#endif
) ;
void warning(
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1(
#if defined(M_PROTO)
char *text, M_WCHAR *arg
#endif
) ;
void warning2(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2
#endif
) ;
void warning3(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void warning4(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
#endif
) ;
LOGICAL m_whitespace(
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;

View file

@ -101,13 +101,7 @@ return(TRUE);
} }
/* Add a short reference map name */ /* Add a short reference map name */
#if defined(M_PROTO)
LOGICAL addmapname(M_WCHAR* p, LOGICAL define) LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
#else
LOGICAL addmapname(p, define)
M_WCHAR *p;
LOGICAL define;
#endif
{ {
MAP *old; MAP *old;
MAP *new; MAP *new;

View file

@ -66,23 +66,14 @@ void actptrout(array, name)
/* Close a code file and write jump table at the end */ /* Close a code file and write jump table at the end */
#if defined(M_PROTO)
void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto) void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto)
#else
void closeiffile(flag, file, count, table, proto)
LOGICAL flag;
FILE *file;
int count;
char *table;
char *proto;
#endif
{ {
int i; int i;
endcode(flag, file); endcode(flag, file);
if (count) { if (count) {
fprintf(file, fprintf(file,
"void (*m_%stable[])(\n#if defined(M_PROTO)\n %s\n#endif\n ) = {\n", "void (*m_%stable[])(%s) = {\n",
table, proto); table, proto);
fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n", fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n",
table); table);
@ -94,7 +85,7 @@ void closeiffile(flag, file, count, table, proto)
} }
else else
fprintf(file, fprintf(file,
"void (*m_%stable[1])(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n", "void (*m_%stable[1])(%s) ;\n",
table, proto); table, proto);
fclose(file); fclose(file);
} }
@ -193,13 +184,7 @@ void done(M_NOPAR)
} }
/* Called when finished reading a section of code from the input file */ /* Called when finished reading a section of code from the input file */
#if defined(M_PROTO)
void endcode(LOGICAL flag, FILE *file) void endcode(LOGICAL flag, FILE *file)
#else
void endcode(flag, file)
LOGICAL flag;
FILE *file;
#endif
{ {
if (flag) fprintf(file, "}}\n\n"); if (flag) fprintf(file, "}}\n\n");
} }
@ -563,21 +548,13 @@ endcode(*flag, file);
*flag = TRUE; *flag = TRUE;
/* protoype */ /* protoype */
fprintf(file, fprintf(file,
"void m_%s%d(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n", "void m_%s%d(%s);\n",
prefix, prefix,
caseno, caseno,
proto); proto);
/* ANSI defines */ /* ANSI defines */
fputs("#if defined(M_PROTO)\n", file); fprintf(file, "void m_%s%d(%s)\n {\n", prefix, caseno, proto);
fprintf(file, "void m_%s%d(%s)\n", prefix, caseno, proto);
fputs("#else\n", file);
fprintf(file,
"void m_%s%d(%s)\n%s\n#endif\n {\n", /* balance the "}" */
prefix,
caseno,
formal,
formtype);
for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next) for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
{ {

View file

@ -28,334 +28,118 @@
/* Proto.h contains function prototypes for program ELTDEF. */ /* Proto.h contains function prototypes for program ELTDEF. */
void actptrout( void actptrout(ACTION **array, char *name);
#if defined(M_PROTO)
ACTION **array, char *name
#endif
) ;
void addent( void addent(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL m_allwhite( LOGICAL m_allwhite(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
void closeiffile( void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
#if defined(M_PROTO)
LOGICAL flag, FILE *file, int count, char *table, char *proto
#endif
) ;
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void cvalue( void cvalue(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void done( void done(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void m_dumptrie( void m_dumptrie(FILE *file,
#if defined(M_PROTO)
FILE *file,
M_TRIE *xtrie, M_TRIE *xtrie,
char *extname, char *extname,
int *count, int *count,
void (*proc)(M_ENTITY *) void (*proc)(M_ENTITY *));
#endif
) ;
void endcode( void endcode(LOGICAL flag, FILE *file);
#if defined(M_PROTO)
LOGICAL flag, FILE *file
#endif
) ;
void endini( void endini(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void endsignon( void endsignon(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void endstring( void endstring(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void entout( void entout(char *fname);
#if defined(M_PROTO)
char *fname
#endif
) ;
void enttype( void enttype(int type);
#if defined(M_PROTO)
int type
#endif
) ;
void m_error( void m_error(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_err1( void m_err1(const char *text, const M_WCHAR *arg);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg
#endif
) ;
void m_mberr1( void m_mberr1(char *text, const char *arg);
#if defined(M_PROTO)
char *text, const char *arg
#endif
) ;
void m_err2( void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
void m_err3( void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void m_err5( void m_err5(char *text,
#if defined(M_PROTO) M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
char *text,
M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5
#endif
) ;
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
void m_free( void m_free(void *block, char *msg);
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void freechain( void freechain(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int getachar( int getachar(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int *getaction( int *getaction(ACTION **array);
#if defined(M_PROTO)
ACTION **array
#endif
) ;
ACTION *getactstruct( ACTION *getactstruct(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void getname( void getname(int first);
#if defined(M_PROTO)
int first
#endif
) ;
int gettoken( int gettoken(int *c, int context);
#if defined(M_PROTO)
int *c, int context
#endif
) ;
void m_initctype( void m_initctype(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void initialize( void initialize(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL m_letter( LOGICAL m_letter(M_WCHAR c);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
LOGICAL litproc( LOGICAL litproc(int delim);
#if defined(M_PROTO)
int delim
#endif
) ;
int main( int main(int argc, char **argv);
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void m_openchk( void m_openchk(FILE **ptr, char *name, char *mode);
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
void outpval( void outpval(M_TRIE *p);
#if defined(M_PROTO)
M_TRIE *p
#endif
) ;
void outstring( void outstring(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int m_packedlook( int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
#if defined(M_PROTO)
M_PTRIE *xptrie, M_WCHAR *name
#endif
) ;
const M_WCHAR *m_partype( const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
#if defined(M_PROTO)
const int par, const M_WCHAR *string
#endif
) ;
int scan( int scan(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void skiptoend( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void startcode( void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
#if defined(M_PROTO) char *formal, char *formtype);
int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
char *formal, char *formtype
#endif
) ;
void startelement( void startelement(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void storecvar( void storecvar(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void storepname( void storepname(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void undodelim( void undodelim(M_WCHAR *delim);
#if defined(M_PROTO)
M_WCHAR *delim
#endif
) ;
void ungetachar( void ungetachar(int c);
#if defined(M_PROTO)
int c
#endif
) ;
int m_wcupstrcmp( int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
#if defined(M_PROTO)
const M_WCHAR *p, const M_WCHAR *q
#endif
) ;
int m_wcmbupstrcmp( int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
#if defined(M_PROTO)
const M_WCHAR *p, const char *q
#endif
) ;
int m_mbmbupstrcmp( int m_mbmbupstrcmp(const char *p, const char *q);
#if defined(M_PROTO)
const char *p, const char *q
#endif
) ;
void value( void value(M_WCHAR *p);
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void warning( void warning(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1( void warning1(char *text, M_WCHAR *arg);
#if defined(M_PROTO)
char *text, M_WCHAR *arg
#endif
) ;
LOGICAL m_whitespace( LOGICAL m_whitespace(M_WCHAR c);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;

View file

@ -30,12 +30,7 @@ Copyright 1988, 1989, 1992 Hewlett-Packard Co.
#include "userinc.h" #include "userinc.h"
#include "globdec.h" #include "globdec.h"
#if defined(M_PROTO)
int vextextsize(const M_WCHAR *keyword) int vextextsize(const M_WCHAR *keyword)
#else
int vextextsize(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return NORMAL; if (!keyword) return NORMAL;
@ -47,12 +42,7 @@ m_err1("Unexpected value for ex/vex textsize parameter: %s", keyword);
return NORMAL; return NORMAL;
} }
#if defined(M_PROTO)
int vgloss(const M_WCHAR *keyword) int vgloss(const M_WCHAR *keyword)
#else
int vgloss(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return GLOSS; if (!keyword) return GLOSS;
@ -63,12 +53,7 @@ m_err1("Unexpected value for gloss parameter: %s", keyword);
return GLOSS; return GLOSS;
} }
#if defined(M_PROTO)
int vcenter(const M_WCHAR *keyword) int vcenter(const M_WCHAR *keyword)
#else
int vcenter(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return CENTER; if (!keyword) return CENTER;
@ -80,12 +65,7 @@ m_err1("Unexpected value for center parameter: %s", keyword);
return CENTER; return CENTER;
} }
#if defined(M_PROTO)
int vnumber(const M_WCHAR *keyword) int vnumber(const M_WCHAR *keyword)
#else
int vnumber(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return NONUMBER; if (!keyword) return NONUMBER;
@ -96,12 +76,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
return NONUMBER; return NONUMBER;
} }
#if defined(M_PROTO)
LOGICAL vstack(const M_WCHAR *keyword) LOGICAL vstack(const M_WCHAR *keyword)
#else
LOGICAL vnumber(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return FALSE; if (!keyword) return FALSE;
@ -112,12 +87,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
return FALSE; return FALSE;
} }
#if defined(M_PROTO)
int vordertype(const M_WCHAR *keyword) int vordertype(const M_WCHAR *keyword)
#else
int vordertype(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return ARABIC; if (!keyword) return ARABIC;
@ -131,12 +101,7 @@ m_err1("Unexpected list order type: %s", keyword);
return ARABIC; return ARABIC;
} }
#if defined(M_PROTO)
int vspacing(const M_WCHAR *keyword) int vspacing(const M_WCHAR *keyword)
#else
int vspacing(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return LOOSE; if (!keyword) return LOOSE;
@ -147,12 +112,7 @@ m_err1("Unexpected value for spacing parameter: %s", keyword);
return LOOSE; return LOOSE;
} }
#if defined(M_PROTO)
int vlonglabel(const M_WCHAR *keyword) int vlonglabel(const M_WCHAR *keyword)
#else
int vlonglabel(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return WRAP; if (!keyword) return WRAP;
@ -163,12 +123,7 @@ m_err1("Unexpected value for longlabel parameter: %s", keyword);
return WRAP; return WRAP;
} }
#if defined(M_PROTO)
int vtype(const M_WCHAR *keyword) int vtype(const M_WCHAR *keyword)
#else
int vtype(keyword)
M_WCHAR *keyword;
#endif /* M_PROTO */
{ {
if (!keyword) return BULLET; if (!keyword) return BULLET;

View file

@ -24,452 +24,186 @@
/* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */ /* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
/* Function prototypes for HP Tag/TeX translator */ /* Function prototypes for HP Tag/TeX translator */
void assert_hometopic_exists( void assert_hometopic_exists(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
/* osf has basename() defined in system header file, change /* osf has basename() defined in system header file, change
* basename() to fbasename(). --XPG4 standard. * basename() to fbasename(). --XPG4 standard.
*/ */
void fbasename( void fbasename(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void chapstart( void chapstart(M_WCHAR *id);
#if defined(M_PROTO)
M_WCHAR *id
#endif
) ;
void checkgloss( void checkgloss(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
M_WCHAR *checkid( M_WCHAR *checkid(M_WCHAR *id);
#if defined(M_PROTO)
M_WCHAR *id
#endif
) ;
void checkmsghead ( void checkmsghead (M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void dumpxref( void dumpxref(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void echohead( void echohead(M_WCHAR *p);
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void mb_echohead( void mb_echohead(char *p);
#if defined(M_PROTO)
char *p
#endif
) ;
void endhead( void endhead(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void esoutchar( void esoutchar(M_WCHAR textchar);
#if defined(M_PROTO)
M_WCHAR textchar
#endif
) ;
void vexoutchar( void vexoutchar(M_WCHAR textchar);
#if defined(M_PROTO)
M_WCHAR textchar
#endif
) ;
void exoutchar( void exoutchar(M_WCHAR textchar);
#if defined(M_PROTO)
M_WCHAR textchar
#endif
) ;
void imoutchar( void imoutchar(M_WCHAR textchar);
#if defined(M_PROTO)
M_WCHAR textchar
#endif
) ;
int getqualified ( int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
#if defined(M_PROTO)
M_WCHAR *qualname, M_WCHAR *unqualname
#endif
) ;
void handle_link_and_graphic( void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
#if defined(M_PROTO) M_WCHAR *glinktype, M_WCHAR *gdescription);
M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
M_WCHAR *glinktype, M_WCHAR *gdescription
#endif
);
void idstring( void idstring(M_WCHAR *string);
#if defined(M_PROTO)
M_WCHAR *string
#endif
) ;
void indexchar( void indexchar(M_WCHAR textchar);
#if defined(M_PROTO)
M_WCHAR textchar
#endif
) ;
void Item( void Item(M_WCHAR *id);
#if defined(M_PROTO)
M_WCHAR *id
#endif
) ;
char *m_itoa( char *m_itoa(int n, char *s);
#if defined(M_PROTO)
int n, char *s
#endif
) ;
LOGICAL m_letter( LOGICAL m_letter(M_WCHAR c);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
void loadxref( void loadxref(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int m_lower( int m_lower(int c);
#if defined(M_PROTO)
int c
#endif
) ;
void options( void options(LOGICAL filelenonly);
#if defined(M_PROTO)
LOGICAL filelenonly
#endif
) ;
void outchar( void outchar(M_WCHAR textchar, FILE *outfile );
#if defined(M_PROTO)
M_WCHAR textchar, FILE *outfile
#endif
) ;
void outpi( void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
#if defined(M_PROTO)
int enttype, M_WCHAR *pi, M_WCHAR *entname
#endif
) ;
void realoutchar( void realoutchar(M_WCHAR textchar, FILE *outfile);
#if defined(M_PROTO)
M_WCHAR textchar, FILE *outfile
#endif
) ;
void rsectstart( void rsectstart(M_WCHAR *id);
#if defined(M_PROTO)
M_WCHAR *id
#endif
) ;
void rseqend( void rseqend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
M_WCHAR *searchforfile( M_WCHAR *searchforfile(M_WCHAR *file);
#if defined(M_PROTO)
M_WCHAR *file
#endif
) ;
void setid( void setid(M_WCHAR *id,
#if defined(M_PROTO)
M_WCHAR *id,
LOGICAL where, LOGICAL where,
LOGICAL csensitive, LOGICAL csensitive,
LOGICAL inchapter, LOGICAL inchapter,
char *chapter, char *chapter,
M_WCHAR *xrffile, M_WCHAR *xrffile,
int xrfline, int xrfline,
LOGICAL xrefable LOGICAL xrefable );
#endif
) ;
void setopt( void setopt(char *string, LOGICAL filelenonly);
#if defined(M_PROTO)
char *string, LOGICAL filelenonly
#endif
) ;
LOGICAL setvalopt( LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
#if defined(M_PROTO)
int thisopt, char *string, LOGICAL filelenonly
#endif
) ;
void shchar( void shchar(M_WCHAR textchar,
#if defined(M_PROTO)
M_WCHAR textchar,
int *len, int *len,
int max, int max,
M_WCHAR *string, M_WCHAR *string,
void (*proc)(M_WCHAR *string), void (*proc)(M_WCHAR *string),
char *msg, char *msg,
LOGICAL *errflg LOGICAL *errflg);
#endif
) ;
void mb_shchar( void mb_shchar(char textchar,
#if defined(M_PROTO)
char textchar,
int *len, int *len,
int max, int max,
M_WCHAR *string, M_WCHAR *string,
void (*proc)(M_WCHAR *string), void (*proc)(M_WCHAR *string),
char *msg, char *msg,
LOGICAL *errflg LOGICAL *errflg);
#endif
) ;
void shstring( void shstring(M_WCHAR *addstring,
#if defined(M_PROTO)
M_WCHAR *addstring,
int *len, int *len,
int max, int max,
M_WCHAR *storestring, M_WCHAR *storestring,
char *msg, char *msg,
LOGICAL *errflg LOGICAL *errflg);
#endif
) ;
void mb_shstring( void mb_shstring(char *addstring,
#if defined(M_PROTO)
char *addstring,
int *len, int *len,
int max, int max,
M_WCHAR *storestring, M_WCHAR *storestring,
char *msg, char *msg,
LOGICAL *errflg LOGICAL *errflg);
#endif
) ;
void starthelpnode( void starthelpnode(M_WCHAR *ssi,
#if defined(M_PROTO)
M_WCHAR *ssi,
M_WCHAR *id, M_WCHAR *id,
int level int level);
#endif
) ;
void mb_starthelpnode( void mb_starthelpnode(char *ssi,
#if defined(M_PROTO)
char *ssi,
char *id, char *id,
int level int level);
#endif
) ;
void StartLabList( void StartLabList(M_WCHAR *spacing,
#if defined(M_PROTO) M_WCHAR *longlabel);
M_WCHAR *spacing,
M_WCHAR *longlabel
#endif
) ;
void StartList( void StartList(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
#if defined(M_PROTO)
M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont
#endif
) ;
void EndList( void EndList(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void strcode( void strcode(M_WCHAR *string, FILE *outfile);
#if defined(M_PROTO)
M_WCHAR *string, FILE *outfile
#endif
) ;
void mb_strcode( void mb_strcode(char *string, FILE *outfile);
#if defined(M_PROTO)
char *string, FILE *outfile
#endif
) ;
char *strstr( char *strstr(const char *s1, const char *s2);
#if defined(M_PROTO)
const char *s1, const char *s2
#endif
) ;
void svhdstring( void svhdstring(M_WCHAR *string);
#if defined(M_PROTO)
M_WCHAR *string
#endif
) ;
void svtcstring( void svtcstring(M_WCHAR *string);
#if defined(M_PROTO)
M_WCHAR *string
#endif
) ;
void termchar( void termchar(M_WCHAR textchar);
#if defined(M_PROTO)
M_WCHAR textchar
#endif
) ;
void termpi( void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
#if defined(M_PROTO)
int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname
#endif
) ;
void texinit( void texinit(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int vextextsize( int vextextsize(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
int vgloss( int vgloss(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
int vcenter( int vcenter(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
int vnumber( int vnumber(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
LOGICAL vstack( LOGICAL vstack(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
int vordertype( int vordertype(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
int vlonglabel( int vlonglabel(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
int vspacing( int vspacing(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
int vtype( int vtype(const M_WCHAR *keyword);
#if defined(M_PROTO)
const M_WCHAR *keyword
#endif
) ;
void xrefexpand( void xrefexpand(M_WCHAR *id);
#if defined(M_PROTO)
M_WCHAR *id
#endif
) ;
int m_upper( int m_upper(int c);
#if defined(M_PROTO)
int c
#endif
) ;
char *GetDefaultHeaderString( char *GetDefaultHeaderString(char *elementName,
#if defined(M_PROTO)
char *elementName,
unsigned char desiredType, unsigned char desiredType,
char *defaultString char *defaultString);
#endif
) ;
void SetDefaultLocale( void SetDefaultLocale(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
);
char *MakeMByteString( char *MakeMByteString(const M_WCHAR *from);
#if defined(M_PROTO)
const M_WCHAR *from
#endif
);
M_WCHAR *MakeWideCharString( M_WCHAR *MakeWideCharString(const char *from);
#if defined(M_PROTO)
const char *from
#endif
);
void paragraph( void paragraph(M_WCHAR *indent,
#if defined(M_PROTO)
M_WCHAR *indent,
M_WCHAR *id, M_WCHAR *id,
M_WCHAR *gentity, M_WCHAR *gentity,
M_WCHAR *gposition, M_WCHAR *gposition,
M_WCHAR *ghyperlink, M_WCHAR *ghyperlink,
M_WCHAR *glinktype, M_WCHAR *glinktype,
M_WCHAR *gdescription M_WCHAR *gdescription);
#endif
);
void figure( void figure( M_WCHAR *number,
#if defined(M_PROTO)
M_WCHAR *number,
M_WCHAR *tonumber, M_WCHAR *tonumber,
M_WCHAR *id, M_WCHAR *id,
M_WCHAR *file, M_WCHAR *file,
@ -477,180 +211,70 @@ void figure(
M_WCHAR *cappos, M_WCHAR *cappos,
M_WCHAR *ghyperlink, M_WCHAR *ghyperlink,
M_WCHAR *glinktype, M_WCHAR *glinktype,
M_WCHAR *gdescription M_WCHAR *gdescription);
#endif
);
void endterm( void endterm( M_WCHAR *base,
#if defined(M_PROTO)
M_WCHAR *base,
M_WCHAR *gloss, M_WCHAR *gloss,
char *linktype char *linktype);
#endif
);
M_WCHAR wc_toupper( M_WCHAR wc_toupper( M_WCHAR wc);
#if defined(M_PROTO)
M_WCHAR wc
#endif
);
M_WCHAR *wc_stringtoupper( M_WCHAR *wc_stringtoupper( M_WCHAR *wcp);
#if defined(M_PROTO)
M_WCHAR *wcp
#endif
);
int NextId( int NextId(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
);
char *GetLanguage( char *GetLanguage(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
);
char *GetCharset( char *GetCharset(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
);
void HandleLink( void HandleLink( M_WCHAR *hyperlink,
#if defined(M_PROTO)
M_WCHAR *hyperlink,
M_WCHAR *type, M_WCHAR *type,
M_WCHAR *description M_WCHAR *description);
#endif
);
char *mb_realloc( char *mb_realloc( char *ptr, long size);
#if defined(M_PROTO)
char *ptr, long size
#endif
);
char *mb_malloc( char *mb_malloc( long size);
#if defined(M_PROTO)
long size
#endif
);
void mb_free( void mb_free( char **pptr);
#if defined(M_PROTO)
char **pptr
#endif
);
void Add2ToRowVec( void Add2ToRowVec( int *length, char **rowvec, char *id1, char *id2);
#if defined(M_PROTO)
int *length, char **rowvec, char *id1, char *id2
#endif
);
void StartEx( void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize);
#if defined(M_PROTO)
M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize
#endif
);
void EndEx( void EndEx(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
);
void StartNCW( void StartNCW(char *which);
#if defined(M_PROTO)
char *which
#endif
);
void StartBlock( void StartBlock(char *pclass, char *ssi, char *id);
#if defined(M_PROTO)
char *pclass, char *ssi, char *id
#endif
);
void AddToSNB( void AddToSNB(char *id, char *iconName);
#if defined(M_PROTO)
char *id, char *iconName
#endif
);
void StartNCWtext( void StartNCWtext(char *which, char *iconFile, char *headingString);
#if defined(M_PROTO)
char *which, char *iconFile, char *headingString
#endif
);
void IncludeToss( void IncludeToss(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
);
M_WCHAR *CycleEnt( M_WCHAR *CycleEnt( LOGICAL init,
#if defined(M_PROTO)
LOGICAL init,
unsigned char *type, unsigned char *type,
M_WCHAR ***content, M_WCHAR ***content,
unsigned char *wheredef unsigned char *wheredef);
#endif
);
void ModifyEntities( void ModifyEntities(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
);
void PushForm( void PushForm(char *class,
#if defined(M_PROTO)
char *class,
char *ssi, char *ssi,
char *id char *id);
#endif
) ;
void PushForm2( void PushForm2(char *class,
#if defined(M_PROTO)
char *class,
char *ssi, char *ssi,
char *id1, char *id1,
char *id2 char *id2);
#endif
) ;
void PopForm( void PopForm(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void PopForm2( void PopForm2(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void PopFormMaybe( void PopFormMaybe(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void EmitSavedAnchors( void EmitSavedAnchors(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void CloseVirpage( void CloseVirpage(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;

View file

@ -349,13 +349,7 @@ m_free(string, "GetDefaultHeaderString return");
/* construct a qualified file name */ /* construct a qualified file name */
#if defined(M_PROTO)
static int mb_getqualified(char *qualname, char *unqualname) static int mb_getqualified(char *qualname, char *unqualname)
#else
static int mb_getqualified(qualname, unqualname)
char *qualname;
char *unqualname;
#endif
{ {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
@ -689,12 +683,7 @@ if (!ghyperlink && (glinktype || gdescription))
} }
/* Process an item in a list */ /* Process an item in a list */
#if defined(M_PROTO)
void Item(M_WCHAR *id) void Item(M_WCHAR *id)
#else
void Item(id)
M_WCHAR *id;
#endif
{ {
char orderString[32]; char orderString[32];
static char *ROMAN0[] = static char *ROMAN0[] =
@ -998,16 +987,9 @@ return(NULL);
/* Start a new helpnode */ /* Start a new helpnode */
#if defined(M_PROTO)
void starthelpnode(M_WCHAR *ssi, void starthelpnode(M_WCHAR *ssi,
M_WCHAR *id, M_WCHAR *id,
int level) int level)
#else
void starthelpnode(ssi, id, level)
M_WCHAR *ssi;
M_WCHAR *id;
int level;
#endif
{ {
int i; int i;
char *mbyte, *mb_ssi; char *mbyte, *mb_ssi;
@ -1061,16 +1043,9 @@ snbstart = ftell(outfile);
} /* End starthelpnode(id) */ } /* End starthelpnode(id) */
#if defined(M_PROTO)
void mb_starthelpnode(char *ssi, void mb_starthelpnode(char *ssi,
char *id, char *id,
int level) int level)
#else
void mb_starthelpnode(ssi, id, level)
char *ssi;
char *id;
int level;
#endif
{ {
M_WCHAR *wc_ssi, *wc_id; M_WCHAR *wc_ssi, *wc_id;
@ -1131,15 +1106,10 @@ if (list <= MAXLISTLEV)
/* Start a list */ /* Start a list */
#if defined(M_PROTO)
void StartList(M_WCHAR *type, void StartList(M_WCHAR *type,
M_WCHAR *order, M_WCHAR *order,
M_WCHAR *spacing, M_WCHAR *spacing,
M_WCHAR *cont) M_WCHAR *cont)
#else
void StartList(type, order, spacing, cont)
M_WCHAR *type, *order, *spacing, *cont;
#endif
{ {
LIST *nextlist; LIST *nextlist;
CONTCHAIN *chain; CONTCHAIN *chain;
@ -1420,17 +1390,10 @@ postpreamble = ftell(outfile);
the string returned must be m_free'd. the string returned must be m_free'd.
*/ */
char * char *
#if defined(M_PROTO)
GetDefaultHeaderString( GetDefaultHeaderString(
char *elementName, char *elementName,
unsigned char desiredType, unsigned char desiredType,
char *defaultString ) char *defaultString )
#else
GetDefaultHeaderString(elementName, desiredType, defaultString)
char *elementName;
unsigned char desiredType;
char *defaultString;
#endif
{ {
unsigned char type,wheredef; unsigned char type,wheredef;
M_WCHAR *content; M_WCHAR *content;
@ -1497,13 +1460,7 @@ return "";
* standard versions. * standard versions.
*/ */
static void static void
#if defined(M_PROTO)
SetStdLocale(char *pLang, char *pCharset) SetStdLocale(char *pLang, char *pCharset)
#else
SetStdLocale(pLang, pCharset)
char *pLang;
char *pCharset;
#endif
{ {
static const char *cString = "C"; static const char *cString = "C";
static const char *isoString = "ISO-8859-1"; static const char *isoString = "ISO-8859-1";
@ -1632,11 +1589,7 @@ _DtLcxCloseDb(&myDb);
* fashion. * fashion.
*/ */
static char * static char *
#if defined(M_PROTO)
GetStdLocale() GetStdLocale()
#else
GetStdLocale()
#endif
{ {
static char buffer[256]; static char buffer[256];
static char *cString = "C"; static char *cString = "C";
@ -1795,7 +1748,6 @@ if (charset && (charset != (dotPtr+1)))
} }
#if defined(M_PROTO)
void paragraph(M_WCHAR *indent, void paragraph(M_WCHAR *indent,
M_WCHAR *id, M_WCHAR *id,
M_WCHAR *gentity, M_WCHAR *gentity,
@ -1803,22 +1755,6 @@ void paragraph(M_WCHAR *indent,
M_WCHAR *ghyperlink, M_WCHAR *ghyperlink,
M_WCHAR *glinktype, M_WCHAR *glinktype,
M_WCHAR *gdescription) M_WCHAR *gdescription)
#else
void paragraph(indent,
id,
gentity,
gposition,
ghyperlink,
glinktype,
gdescription)
M_WCHAR *indent;
M_WCHAR *id;
M_WCHAR *gentity;
M_WCHAR *gposition;
M_WCHAR *ghyperlink;
M_WCHAR *glinktype;
M_WCHAR *gdescription;
#endif
{ {
char *firstString, *indentString; char *firstString, *indentString;
@ -1862,7 +1798,6 @@ handle_link_and_graphic(m_parent(0),
} }
#if defined(M_PROTO)
void figure( void figure(
M_WCHAR *number, M_WCHAR *number,
M_WCHAR *tonumber, M_WCHAR *tonumber,
@ -1873,28 +1808,6 @@ void figure(
M_WCHAR *ghyperlink, M_WCHAR *ghyperlink,
M_WCHAR *glinktype, M_WCHAR *glinktype,
M_WCHAR *gdescription) M_WCHAR *gdescription)
#else
void figure(
number,
tonumber,
id,
file,
figpos,
cappos,
ghyperlink,
glinktype,
gdescription)
M_WCHAR *number;
M_WCHAR *tonumber;
M_WCHAR *id;
M_WCHAR *file;
M_WCHAR *figpos;
M_WCHAR *cappos;
M_WCHAR *border;
M_WCHAR *ghyperlink;
M_WCHAR *glinktype;
M_WCHAR *gdescription;
#endif
{ {
char snb_id[32]; char snb_id[32];
unsigned char etype,wheredef; unsigned char etype,wheredef;
@ -2126,14 +2039,7 @@ if (ftonumber)
m_free(string, "default header string return"); m_free(string, "default header string return");
} }
#if defined(M_PROTO)
void endterm(M_WCHAR *base, M_WCHAR *gloss, char *linktype) void endterm(M_WCHAR *base, M_WCHAR *gloss, char *linktype)
#else
void endterm( base, gloss, linktype)
M_WCHAR *base;
M_WCHAR *gloss;
char *linktype;
#endif
{ {
M_WCHAR *p; M_WCHAR *p;
M_WCHAR dterm[MAXTERM+1]; M_WCHAR dterm[MAXTERM+1];
@ -2253,12 +2159,7 @@ if (vgloss(gloss) == GLOSS)
if (echo) mb_echohead("++"); if (echo) mb_echohead("++");
} }
#if defined(M_PROTO)
M_WCHAR wc_toupper(M_WCHAR wc) M_WCHAR wc_toupper(M_WCHAR wc)
#else
M_WCHAR wc_toupper(wc)
M_WCHAR wc;
#endif
{ {
if ((wc >= 0) && (wc <= 255)) if ((wc >= 0) && (wc <= 255))
{ {
@ -2267,12 +2168,7 @@ if ((wc >= 0) && (wc <= 255))
return wc; return wc;
} }
#if defined(M_PROTO)
M_WCHAR *wc_stringtoupper(M_WCHAR *wcp) M_WCHAR *wc_stringtoupper(M_WCHAR *wcp)
#else
M_WCHAR *wc_stringtoupper(wcp)
M_WCHAR *wcp;
#endif
{ {
M_WCHAR *newstring, *nsp; M_WCHAR *newstring, *nsp;
@ -2322,14 +2218,7 @@ return pCharset;
} }
#if defined(M_PROTO)
void HandleLink(M_WCHAR *hyperlink, M_WCHAR *type, M_WCHAR *description) void HandleLink(M_WCHAR *hyperlink, M_WCHAR *type, M_WCHAR *description)
#else
void HandleLink(hyperlink, type, description)
M_WCHAR *hyperlink;
M_WCHAR *type;
M_WCHAR *description;
#endif
{ {
char *mb_hyperlink, mb_undefined[64]; char *mb_hyperlink, mb_undefined[64];
char buffer[BIGBUF]; char buffer[BIGBUF];
@ -2485,13 +2374,7 @@ mb_strcode(">", outfile);
} }
#if defined(M_PROTO)
char *mb_realloc(char *ptr, long size) char *mb_realloc(char *ptr, long size)
#else
char *mb_realloc(ptr, size)
char *ptr;
long size;
#endif
{ {
void *vptr; void *vptr;
size_t ssize; size_t ssize;
@ -2511,12 +2394,7 @@ return (char *) vptr;
} }
#if defined(M_PROTO)
char *mb_malloc(long size) char *mb_malloc(long size)
#else
char *mb_malloc(size)
long size;
#endif
{ {
char *cptr; char *cptr;
size_t ssize; size_t ssize;
@ -2534,12 +2412,7 @@ return cptr;
} }
#if defined(M_PROTO)
void mb_free(char **pptr) void mb_free(char **pptr)
#else
void *mb_free(pptr)
char **pptr;
#endif
{ {
#if DEBUG_MB_MALLOC #if DEBUG_MB_MALLOC
@ -2551,14 +2424,7 @@ free((void *) *pptr);
*pptr = NULL; *pptr = NULL;
} }
#if defined(M_PROTO)
static void AddToRowVec(int *length, char **rowvec, char *id) static void AddToRowVec(int *length, char **rowvec, char *id)
#else
static void AddToRowVec(length, rowvec, id)
int *length;
char **rowvec;
char *id;
#endif
{ {
char tempRowVec[BIGBUF]; char tempRowVec[BIGBUF];
int rowVecLen; int rowVecLen;
@ -2571,14 +2437,7 @@ strcpy(*rowvec + *length - 1, tempRowVec);
} }
#if defined(M_PROTO)
void Add2ToRowVec(int *length, char **rowvec, char *id1, char *id2) void Add2ToRowVec(int *length, char **rowvec, char *id1, char *id2)
#else
void Add2ToRowVec(length, rowvec, id1, id2)
int *length;
char **rowvec;
char *id1, *id2;
#endif
{ {
char tempRowVec[BIGBUF]; char tempRowVec[BIGBUF];
int rowVecLen; int rowVecLen;
@ -2591,14 +2450,7 @@ strcpy(*rowvec + *length - 1, tempRowVec);
} }
#if defined(M_PROTO)
void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize) void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize)
#else
void StartEx(*notes, *lines, *textsize)
M_WCHAR *notes;
M_WCHAR *lines;
M_WCHAR *textsize;
#endif
{ {
exTextSize = vextextsize(textsize); exTextSize = vextextsize(textsize);
stackex = vstack(notes); stackex = vstack(notes);
@ -2614,11 +2466,7 @@ svexlen = 1;
} }
#if defined(M_PROTO) void EndEx(void)
void EndEx()
#else
void EndEx()
#endif
{ {
char *annotation; char *annotation;
int annotLen; int annotLen;
@ -2683,24 +2531,14 @@ if (saveexseg)
} }
#if defined(M_PROTO)
void StartNCW(char *which) void StartNCW(char *which)
#else
void StartNCW(which)
char *which;
#endif
{ {
notehead = FALSE; notehead = FALSE;
PushForm(NULL, which, NULL); PushForm(NULL, which, NULL);
} }
#if defined(M_PROTO)
void StartBlock(char *pclass, char *ssi, char *id) void StartBlock(char *pclass, char *ssi, char *id)
#else
void StartBlock(pclass, ssi, id)
char *pclass, *ssi, *id;
#endif
{ {
char localId[32]; char localId[32];
char *realId; char *realId;
@ -2739,14 +2577,7 @@ firstPInBlock = TRUE;
} }
#if defined(M_PROTO)
void StartNCWtext(char *which, char *iconFile, char *headingString) void StartNCWtext(char *which, char *iconFile, char *headingString)
#else
void StartNCWtext(which, iconFile, headingString)
char *which;
char *iconFile;
char *headingString;
#endif
{ {
char *icon, *heading; char *icon, *heading;
@ -2777,13 +2608,7 @@ m_free(icon, "icon name");
} }
#if defined(M_PROTO)
void AddToSNB(char *id, char *xid) void AddToSNB(char *id, char *xid)
#else
void AddToSNB(id, xid)
char *id;
char *xid;
#endif
{ {
char tmpsnb[BIGBUF]; char tmpsnb[BIGBUF];
int snblen; int snblen;
@ -2807,11 +2632,7 @@ else
} }
#if defined(M_PROTO)
void IncludeToss() void IncludeToss()
#else
void IncludeToss()
#endif
{ {
char pathbuf[BIGBUF]; char pathbuf[BIGBUF];
char *try = pathbuf; char *try = pathbuf;
@ -2896,18 +2717,10 @@ mb_free(&mb_inputname);
/* Cyclent.c contains procedure m_cyclent(), callable by interface /* Cyclent.c contains procedure m_cyclent(), callable by interface
designers, to cycle through all defined entities, returning information designers, to cycle through all defined entities, returning information
about them */ about them */
#if defined(M_PROTO)
M_WCHAR *CycleEnt(LOGICAL init, M_WCHAR *CycleEnt(LOGICAL init,
unsigned char *type, unsigned char *type,
M_WCHAR ***content, M_WCHAR ***content,
unsigned char *wheredef) unsigned char *wheredef)
#else
M_WCHAR *m_cyclent(init, type, content, wheredef)
LOGICAL init ;
unsigned char *type ;
M_WCHAR ***content ;
unsigned char *wheredef ;
#endif
{ {
static M_TRIE *current ; static M_TRIE *current ;
static M_TRIE *ancestor[M_NAMELEN + 1] ; static M_TRIE *ancestor[M_NAMELEN + 1] ;
@ -2990,14 +2803,7 @@ while (name = CycleEnt(FALSE, &type, &content, &wheredef));
} }
#if defined(M_PROTO)
void PushForm(char *class, char *ssi, char *id) void PushForm(char *class, char *ssi, char *id)
#else
void PushForm(class, ssi, id)
char *class;
char *ssi;
char *id;
#endif
{ {
char localId[SDLNAMESIZ+10]; char localId[SDLNAMESIZ+10];
char *realId; char *realId;
@ -3061,15 +2867,7 @@ needFData = TRUE;
} }
#if defined(M_PROTO)
void PushForm2(char *class, char *ssi, char *id1, char *id2) void PushForm2(char *class, char *ssi, char *id1, char *id2)
#else
void PushForm2(class, ssi, id1, id2)
char *class;
char *ssi;
char *id1;
char *id2;
#endif
{ {
char id[32]; char id[32];
int stackSize; int stackSize;

View file

@ -37,12 +37,7 @@
#define TAGDOTOPT "helptag.opt" #define TAGDOTOPT "helptag.opt"
#define DOTOPT ".opt" #define DOTOPT ".opt"
#if defined(M_PROTO)
void options(LOGICAL filelenonly) void options(LOGICAL filelenonly)
#else
void options(filelenonly)
LOGICAL filelenonly;
#endif
{ {
int i; int i;
FILE *optfile; FILE *optfile;
@ -149,13 +144,7 @@ optval = M_NULLVAL;
/* Set a single option */ /* Set a single option */
/* Workonly parameter described with function options()*/ /* Workonly parameter described with function options()*/
#if defined(M_PROTO)
void setopt(char *string, LOGICAL filelenonly) void setopt(char *string, LOGICAL filelenonly)
#else
void setopt(string, filelenonly)
char *string;
LOGICAL filelenonly;
#endif
{ {
char *p; char *p;
int thisopt; int thisopt;
@ -280,14 +269,7 @@ else switch(thisopt + 1)
} }
/* Process a value for a command line option */ /* Process a value for a command line option */
#if defined(M_PROTO)
LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly) LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
#else
LOGICAL setvalopt(thisopt, string, filelenonly)
int thisopt;
char *string;
LOGICAL filelenonly;
#endif
{ {
char *p; char *p;
int i; int i;

View file

@ -121,12 +121,7 @@ if (savesnb)
/* Process a character in an environment where spaces must be escaped */ /* Process a character in an environment where spaces must be escaped */
#if defined(M_PROTO)
void esoutchar(M_WCHAR textchar) void esoutchar(M_WCHAR textchar)
#else
void esoutchar(textchar)
M_WCHAR textchar;
#endif
{ {
static M_WCHAR wsp = 0; static M_WCHAR wsp = 0;
@ -147,12 +142,7 @@ outchar(textchar, outfile);
} }
/* Process a character in a verbatim example */ /* Process a character in a verbatim example */
#if defined(M_PROTO)
void vexoutchar(M_WCHAR textchar) void vexoutchar(M_WCHAR textchar)
#else
void vexoutchar(textchar)
M_WCHAR textchar;
#endif
{ {
static M_WCHAR wla = 0; static M_WCHAR wla = 0;
char *holdSaveExSeg; char *holdSaveExSeg;
@ -177,12 +167,7 @@ else
} }
/* Process a character in an example */ /* Process a character in an example */
#if defined(M_PROTO)
void exoutchar(M_WCHAR textchar) void exoutchar(M_WCHAR textchar)
#else
void exoutchar(textchar)
M_WCHAR textchar;
#endif
{ {
char exbuff[32]; /* arbitrarily large */ char exbuff[32]; /* arbitrarily large */
int bufflen; int bufflen;
@ -212,12 +197,7 @@ savex = holdSavex;
} }
/* Process a character in an image paragraph */ /* Process a character in an image paragraph */
#if defined(M_PROTO)
void imoutchar(M_WCHAR textchar) void imoutchar(M_WCHAR textchar)
#else
void imoutchar(textchar)
M_WCHAR textchar;
#endif
{ {
char imbuff[32]; /* arbitrarily large */ char imbuff[32]; /* arbitrarily large */
int bufflen; int bufflen;
@ -240,12 +220,7 @@ else
} }
/* Write a character to be passed to the index file */ /* Write a character to be passed to the index file */
#if defined(M_PROTO)
void indexchar(M_WCHAR textchar) void indexchar(M_WCHAR textchar)
#else
void indexchar(textchar)
M_WCHAR textchar;
#endif
{ {
if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR))) if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
{ {
@ -257,13 +232,7 @@ idxsav[idxsavlen++] = textchar;
/* Processes a data character */ /* Processes a data character */
#if defined(M_PROTO)
void outchar(M_WCHAR textchar, FILE *outfile) void outchar(M_WCHAR textchar, FILE *outfile)
#else
void outchar(textchar, outfile)
M_WCHAR textchar;
FILE *outfile;
#endif
{ {
M_WCHAR buffer[2]; M_WCHAR buffer[2];
static M_WCHAR wnl = 0; static M_WCHAR wnl = 0;
@ -333,13 +302,7 @@ if (echo)
/* Really output a character */ /* Really output a character */
#if defined(M_PROTO)
void realoutchar(M_WCHAR textchar, FILE *outfile) void realoutchar(M_WCHAR textchar, FILE *outfile)
#else
void realoutchar(textchar, outfile)
M_WCHAR textchar;
FILE *outfile;
#endif
{ {
char mb_textchar[32]; /* arbitrarily large */ char mb_textchar[32]; /* arbitrarily large */
int length, i; int length, i;
@ -379,22 +342,7 @@ if (savtc)
/* Save a character in the array used to store table of contents entries /* Save a character in the array used to store table of contents entries
when processing a head */ when processing a head */
#if defined(M_PROTO)
void shchar(M_WCHAR textchar, int *len, int max, M_WCHAR *string, void (*proc)(M_WCHAR *string), char *msg, LOGICAL *errflg) void shchar(M_WCHAR textchar, int *len, int max, M_WCHAR *string, void (*proc)(M_WCHAR *string), char *msg, LOGICAL *errflg)
#else
void shchar(textchar, len, max, string, proc, msg, errflg)
M_WCHAR textchar;
int *len;
int max;
M_WCHAR *string;
void (*proc)(
#if defined(M_PROTO)
M_WCHAR *string
#endif
);
char *msg;
LOGICAL *errflg;
#endif
{ {
char mb_textchar[32]; /* arbitrarily large */ char mb_textchar[32]; /* arbitrarily large */
unsigned char index; unsigned char index;
@ -427,27 +375,12 @@ else
} }
#if defined(M_PROTO)
void mb_shchar(char textchar, void mb_shchar(char textchar,
int *len, int *len,
int max, int max,
M_WCHAR *string, M_WCHAR *string,
void (*proc)(M_WCHAR *string), void (*proc)(M_WCHAR *string),
char *msg, LOGICAL *errflg) char *msg, LOGICAL *errflg)
#else
void mb_shchar(textchar, len, max, string, proc, msg, errflg)
char textchar;
int *len;
int max;
M_WCHAR *string;
void (*proc)(
#if defined(M_PROTO)
M_WCHAR *string
#endif
);
char *msg;
LOGICAL *errflg;
#endif
{ {
M_WCHAR wc_textchar; M_WCHAR wc_textchar;
@ -611,12 +544,7 @@ svtclen += length;
} }
/* Process a character in a term */ /* Process a character in a term */
#if defined(M_PROTO)
void termchar(M_WCHAR textchar) void termchar(M_WCHAR textchar)
#else
void termchar(textchar)
M_WCHAR textchar;
#endif
{ {
int length; int length;
char mb_textchar[32]; /* arbitrarily large */ char mb_textchar[32]; /* arbitrarily large */

View file

@ -334,20 +334,8 @@ while (TRUE)
/* Save a cross-reference ID and associated expansion */ /* Save a cross-reference ID and associated expansion */
#if defined(M_PROTO)
void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter, void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
char *chapter, M_WCHAR *xrffile, int xrfline, LOGICAL xrefable) char *chapter, M_WCHAR *xrffile, int xrfline, LOGICAL xrefable)
#else
void setid(id, where, csensitive, inchapter, chapter, xrffile, xrfline, xrefable)
M_WCHAR *id;
LOGICAL where;
LOGICAL csensitive;
LOGICAL inchapter;
char *chapter;
M_WCHAR *xrffile;
int xrfline;
LOGICAL xrefable;
#endif
{ {
struct xref *old; struct xref *old;
struct xref *xref; struct xref *xref;

View file

@ -107,17 +107,7 @@ int m_findact(elt, array)
} }
/* Recursive procedure called by findact() to search m_action */ /* Recursive procedure called by findact() to search m_action */
#if defined(M_PROTO)
void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild) void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild)
#else
void m_findchain(stackptr, start, chainin, chainout, index, wild)
M_PARSE *stackptr;
int start;
int chainin;
int *chainout;
int *index;
LOGICAL wild;
#endif
{ {
int node; int node;
M_PARSE *stackp; M_PARSE *stackp;
@ -241,14 +231,7 @@ void m_strtaction(m_elt)
} }
/* Output a start-string or end-string */ /* Output a start-string or end-string */
#if defined(M_PROTO)
void m_textout(char *format, LOGICAL start, LOGICAL end) void m_textout(char *format, LOGICAL start, LOGICAL end)
#else
void m_textout(format, start, end)
char *format;
LOGICAL start;
LOGICAL end;
#endif
{ {
M_WCHAR name[M_NAMELEN + 1]; M_WCHAR name[M_NAMELEN + 1];
int i, par; int i, par;

View file

@ -36,15 +36,7 @@
#include "parser.h" #include "parser.h"
#include "entext.h" #include "entext.h"
#if defined(M_PROTO)
M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef) M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef)
#else
M_WCHAR *m_cyclent(init, type, content, wheredef)
LOGICAL init ;
unsigned char *type ;
M_WCHAR **content ;
unsigned char *wheredef ;
#endif
{ {
static M_TRIE *current ; static M_TRIE *current ;
static M_TRIE *ancestor[M_NAMELEN + 1] ; static M_TRIE *ancestor[M_NAMELEN + 1] ;

View file

@ -43,13 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entext.h" #include "entext.h"
/* Process the name in a usemap delaration */ /* Process the name in a usemap delaration */
#if defined(M_PROTO)
void m_ckmap(M_WCHAR *name, LOGICAL useoradd) void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
#else
void m_ckmap(name, useoradd)
M_WCHAR *name ;
LOGICAL useoradd ;
#endif
{ {
int mapid ; int mapid ;

View file

@ -52,15 +52,7 @@ void m_error(text)
} }
/* Issue error message (one argument) */ /* Issue error message (one argument) */
#if defined(M_PROTO) void m_err1(const char *text, const M_WCHAR *arg)
void m_err1(
const char *text,
const M_WCHAR *arg)
#else
void m_err1(text, arg)
char *text;
M_WCHAR *arg;
#endif
{ {
char *buffer, *mb_arg; char *buffer, *mb_arg;
@ -77,15 +69,9 @@ m_esuffix();
} }
#if defined(M_PROTO)
void m_mberr1( void m_mberr1(
const char *text, const char *text,
const char *arg) const char *arg)
#else
void m_err1(text, arg)
char *text;
char *arg;
#endif
{ {
M_WCHAR *wc_arg; M_WCHAR *wc_arg;
@ -95,17 +81,10 @@ void m_err1(text, arg)
} }
/* Issue error message (two arguments) */ /* Issue error message (two arguments) */
#if defined(M_PROTO)
void m_err2( void m_err2(
const char *text, const char *text,
const M_WCHAR *arg1, const M_WCHAR *arg1,
const M_WCHAR *arg2) const M_WCHAR *arg2)
#else
void m_err2(text, arg1, arg2)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1,*mb_arg2; char *mb_arg1,*mb_arg2;
@ -126,19 +105,11 @@ void m_err2(text, arg1, arg2)
} }
/* Issue error message (three arguments) */ /* Issue error message (three arguments) */
#if defined(M_PROTO)
void m_err3( void m_err3(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
M_WCHAR *arg2, M_WCHAR *arg2,
M_WCHAR *arg3) M_WCHAR *arg3)
#else
void m_err3(text, arg1, arg2, arg3)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3; char *mb_arg1, *mb_arg2, *mb_arg3;
@ -164,21 +135,12 @@ void m_err3(text, arg1, arg2, arg3)
} }
/* Issue error message (four arguments) */ /* Issue error message (four arguments) */
#if defined(M_PROTO)
void m_err4( void m_err4(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
M_WCHAR *arg2, M_WCHAR *arg2,
M_WCHAR *arg3, M_WCHAR *arg3,
M_WCHAR *arg4) M_WCHAR *arg4)
#else
void m_err4(text, arg1, arg2, arg3, arg4)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4; char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
@ -207,7 +169,6 @@ void m_err4(text, arg1, arg2, arg3, arg4)
} }
/* Issue error message (five arguments) */ /* Issue error message (five arguments) */
#if defined(M_PROTO)
void m_err5( void m_err5(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
@ -215,15 +176,6 @@ void m_err5(
M_WCHAR *arg3, M_WCHAR *arg3,
M_WCHAR *arg4, M_WCHAR *arg4,
M_WCHAR *arg5) M_WCHAR *arg5)
#else
void m_err5(text, arg1, arg2, arg3, arg4, arg5)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
M_WCHAR *arg5;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@ -261,7 +213,6 @@ void m_err5(text, arg1, arg2, arg3, arg4, arg5)
} }
/* Issue error message (six arguments) */ /* Issue error message (six arguments) */
#if defined(M_PROTO)
void m_err6( void m_err6(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
@ -270,16 +221,6 @@ void m_err6(
M_WCHAR *arg4, M_WCHAR *arg4,
M_WCHAR *arg5, M_WCHAR *arg5,
M_WCHAR *arg6) M_WCHAR *arg6)
#else
void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
M_WCHAR *arg5;
M_WCHAR *arg6;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
@ -321,7 +262,6 @@ void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
} }
/* Issue error message (seven arguments) */ /* Issue error message (seven arguments) */
#if defined(M_PROTO)
void m_err7( void m_err7(
char *text, char *text,
M_WCHAR *arg1, M_WCHAR *arg1,
@ -331,17 +271,6 @@ void m_err7(
M_WCHAR *arg5, M_WCHAR *arg5,
M_WCHAR *arg6, M_WCHAR *arg6,
M_WCHAR *arg7) M_WCHAR *arg7)
#else
void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
char *text;
M_WCHAR *arg1;
M_WCHAR *arg2;
M_WCHAR *arg3;
M_WCHAR *arg4;
M_WCHAR *arg5;
M_WCHAR *arg6;
M_WCHAR *arg7;
#endif
{ {
char *buffer; char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;

View file

@ -41,14 +41,7 @@
Returns 0 if elt is not a valid element name, if param is specified Returns 0 if elt is not a valid element name, if param is specified
but is not a valid parameter name, or if param is NULL and value is but is not a valid parameter name, or if param is NULL and value is
not a valid value of any of elt's parameters. */ not a valid value of any of elt's parameters. */
#if defined(M_PROTO)
int m_findpar( const char *elt , const char *param , const M_WCHAR *value ) int m_findpar( const char *elt , const char *param , const M_WCHAR *value )
#else
int m_findpar(elt, param, value)
char *elt ;
char *param ;
M_WCHAR *value ;
#endif /* M_PROTO */
{ {
M_ELEMENT eltid ; M_ELEMENT eltid ;
int par ; int par ;

View file

@ -290,13 +290,7 @@ void m_stkparams(M_NOPAR)
} }
/* Update the default of a parameter whose default is #CURRENT */ /* Update the default of a parameter whose default is #CURRENT */
#if defined(M_PROTO)
void m_updatedefault(const int par , const M_WCHAR *string ) void m_updatedefault(const int par , const M_WCHAR *string )
#else
void m_updatedefault(par, string)
int par ;
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
if (m_parameter[par - 1].deftype != M_CURRENT && if (m_parameter[par - 1].deftype != M_CURRENT &&
m_parameter[par - 1].deftype != M_CHANGEDCUR) return ; m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;

View file

@ -347,8 +347,6 @@ M_PAREXTERN int m_wsused ;
/* Temporary pointers to parameter values. Used while scanning start tag /* Temporary pointers to parameter values. Used while scanning start tag
before element is placed on parse stack.*/ before element is placed on parse stack.*/
M_PAREXTERN M_PAREXTERN
#if defined M_PROTO
#endif
M_WCHAR *m_poccur[ M_WCHAR *m_poccur[
#if defined(M_PARDEF) #if defined(M_PARDEF)
M_MAXPAR ? M_MAXPAR : 1 M_MAXPAR ? M_MAXPAR : 1

View file

@ -34,14 +34,7 @@
/* Function callable by interface designers. Returns TRUE if specified value /* Function callable by interface designers. Returns TRUE if specified value
is a legal value for the indicated parameter of the given element, is a legal value for the indicated parameter of the given element,
FALSE otherwise. */ FALSE otherwise. */
#if defined(M_PROTO)
LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value ) LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value )
#else
LOGICAL m_parvalok(elt, param, value)
M_WCHAR *elt ;
M_WCHAR *param ;
M_WCHAR *value ;
#endif /* M_PROTO */
{ {
M_ELEMENT eltid ; M_ELEMENT eltid ;
int par ; int par ;

File diff suppressed because it is too large Load diff

View file

@ -399,12 +399,7 @@ int m_getachar(dchar)
} }
/* Reads a name token */ /* Reads a name token */
#if defined(M_PROTO)
void m_getname(M_WCHAR first) void m_getname(M_WCHAR first)
#else
void m_getname(first)
M_WCHAR first ;
#endif
{ {
M_WCHAR *p ; M_WCHAR *p ;
M_HOLDTYPE dchar ; M_HOLDTYPE dchar ;
@ -646,14 +641,7 @@ void m_litproc(delim)
} }
/* Called when a missing tagc delimiter is detected */ /* Called when a missing tagc delimiter is detected */
#if defined(M_PROTO)
void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start) void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start)
#else
void m_missingtagc(c, dchar, start)
int c ;
M_HOLDTYPE dchar ;
LOGICAL start ;
#endif
{ {
if (! m_wholetag) { if (! m_wholetag) {
if (start) m_mberr1("Invalid parameter or missing %s", m_tagc); if (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
@ -666,18 +654,8 @@ void m_missingtagc(c, dchar, start)
/* Have found one character in a possible short reference delimiter. /* Have found one character in a possible short reference delimiter.
Prepare to look for the next one */ Prepare to look for the next one */
#if defined(M_PROTO)
void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
LOGICAL skipblank, unsigned char type) LOGICAL skipblank, unsigned char type)
#else
void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
int *n ;
int i ;
LOGICAL *linestart ;
LOGICAL newlinestart ;
LOGICAL skipblank ;
unsigned char type ;
#endif
{ {
int k ; int k ;
char mb_re,mb_seqchar, mb_rschar; char mb_re,mb_seqchar, mb_rschar;
@ -725,12 +703,7 @@ void m_readcomments(M_NOPAR)
} }
/* Scanner */ /* Scanner */
#if defined(M_PROTO)
int m_scan(LOGICAL prolog) int m_scan(LOGICAL prolog)
#else
int m_scan(prolog)
LOGICAL prolog ;
#endif
{ {
int c ; int c ;
M_HOLDTYPE dchar ; M_HOLDTYPE dchar ;
@ -878,13 +851,7 @@ while (TRUE)
/* Process explicit or implied USEMAP or ADDMAP */ /* Process explicit or implied USEMAP or ADDMAP */
#if defined(M_PROTO)
void m_setmap(int map, LOGICAL useoradd) void m_setmap(int map, LOGICAL useoradd)
#else
void m_setmap(map, useoradd)
int map ;
LOGICAL useoradd ;
#endif
{ {
int i ; int i ;
int sref ; int sref ;
@ -1102,13 +1069,7 @@ void m_sigre(M_NOPAR)
/* 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 */
#if defined(M_PROTO)
void m_undodelim(M_WCHAR *delim, LOGICAL flag) void m_undodelim(M_WCHAR *delim, LOGICAL flag)
#else
void m_undodelim(delim, flag)
M_WCHAR *delim ;
LOGICAL flag ;
#endif
{ {
M_WCHAR *p ; M_WCHAR *p ;
@ -1125,14 +1086,7 @@ void m_undodelim(delim, flag)
/* Place a character on the current input stream. The character may have /* Place a character on the current input stream. The character may have
been scanned and determined not to be part of the current token or it been scanned and determined not to be part of the current token or it
may be in the expansion of an entity*/ may be in the expansion of an entity*/
#if defined(M_PROTO)
void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread) void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread)
#else
void m_ungetachar(c, dchar, preread)
int c ;
M_HOLDTYPE dchar ;
LOGICAL preread ;
#endif
{ {
char buffer[10] ; char buffer[10] ;
int length; int length;

View file

@ -31,14 +31,7 @@
/* Include generated code */ /* Include generated code */
#include "stfile.c" #include "stfile.c"
#if defined(M_PROTO)
void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END) void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END)
#else
void m_stcaction(m_string, M_START, M_END)
M_WCHAR *m_string ;
LOGICAL M_START ;
LOGICAL M_END ;
#endif
{ {
m_stackpar = m_stacktop->stparam ; m_stackpar = m_stacktop->stparam ;
(*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ; (*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;

View file

@ -88,13 +88,7 @@ int m_checkstart(val)
If VAL is not the element at the top of the parse stack, m_ckend If VAL is not the element at the top of the parse stack, m_ckend
checks to see if the end of VAL can validly end nested checks to see if the end of VAL can validly end nested
elements as well. */ elements as well. */
#if defined(M_PROTO)
LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet) LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
#else
LOGICAL m_ckend(val, neednet)
M_ELEMENT val ;
LOGICAL neednet ;
#endif
{ {
M_PARSE *stackptr ; M_PARSE *stackptr ;
M_OPENFSA *fsastack ; M_OPENFSA *fsastack ;
@ -426,14 +420,7 @@ void m_pop(M_NOPAR)
/* Pushes a new item onto the parse stack, setting its element, current, /* Pushes a new item onto the parse stack, setting its element, current,
and neednet fields as indicated by the parameters*/ and neednet fields as indicated by the parameters*/
#if defined(M_PROTO)
void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need) void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need)
#else
void m_push(elt, current, need)
M_ELEMENT elt ;
M_STATE current ;
LOGICAL need ;
#endif
{ {
M_PARSE *newstack ; M_PARSE *newstack ;
@ -654,13 +641,7 @@ LOGICAL m_strtproc(scanval)
} }
/* Processes explicit or implied start tag*/ /* Processes explicit or implied start tag*/
#if defined(M_PROTO)
void m_strttag(M_ELEMENT val, LOGICAL net) void m_strttag(M_ELEMENT val, LOGICAL net)
#else
void m_strttag(val, net)
M_ELEMENT val ;
LOGICAL net ;
#endif
{ {
m_transition(val, TRUE) ; m_transition(val, TRUE) ;
if (val) { if (val) {
@ -726,13 +707,7 @@ LOGICAL m_textpermitted(M_NOPAR)
/* Returns TRUE iff LABEL allowed in the current state of the current /* Returns TRUE iff LABEL allowed in the current state of the current
element (without expanding any minimization). May result in changes element (without expanding any minimization). May result in changes
to the stack of FSA's for this element if and-groups open or close. */ to the stack of FSA's for this element if and-groups open or close. */
#if defined(M_PROTO)
LOGICAL m_transition(M_ELEMENT label, LOGICAL recur) LOGICAL m_transition(M_ELEMENT label, LOGICAL recur)
#else
LOGICAL m_transition(label, recur)
M_ELEMENT label ;
LOGICAL recur ;
#endif
{ {
M_ARC parc ; M_ARC parc ;
M_OPENFSA *newfsa ; M_OPENFSA *newfsa ;

View file

@ -36,12 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "tfile.c" #include "tfile.c"
/* When a text character occurs */ /* When a text character occurs */
#if defined(M_PROTO)
void m_textaction(M_WCHAR m_textchar) void m_textaction(M_WCHAR m_textchar)
#else
void m_textaction(m_textchar)
M_WCHAR m_textchar ;
#endif
{ {
char buffer[10] ; char buffer[10] ;
char mb_re; char mb_re;

View file

@ -26,25 +26,12 @@
*/ */
#include "basic.h" #include "basic.h"
LOGICAL m_allwhite( LOGICAL m_allwhite(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
LOGICAL m_whitespace( LOGICAL m_whitespace(M_WCHAR c);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
/* Test if a string contains only white space characters */ /* Test if a string contains only white space characters */
#if defined(M_PROTO)
LOGICAL m_allwhite(const M_WCHAR *string ) LOGICAL m_allwhite(const M_WCHAR *string )
#else
LOGICAL m_allwhite(string)
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
const M_WCHAR *p ; const M_WCHAR *p ;

View file

@ -46,87 +46,29 @@ typedef wchar_t M_WCHAR;
/* For function prototypes */ /* For function prototypes */
typedef char * M_POINTER; typedef char * M_POINTER;
#if defined(hpux) || defined(__aix) || defined(sun)
/* Old unix stuff
*#define void int
*#define M_NOPAR
*/
/* New Ansi style */
#define M_PROTO
#define M_NOPAR void #define M_NOPAR void
#else
#define M_PROTO
#define M_NOPAR void
#endif
char *MakeMByteString( char *MakeMByteString(const M_WCHAR *from);
#if defined(M_PROTO)
const M_WCHAR *from
#endif
);
M_WCHAR *MakeWideCharString( M_WCHAR *MakeWideCharString(const char *from);
#if defined(M_PROTO)
const char *from
#endif
);
int w_strcmp( int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
#if defined(M_PROTO)
const M_WCHAR *string1, const M_WCHAR *string2
#endif
);
M_WCHAR *w_strcpy( M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
#if defined(M_PROTO)
M_WCHAR *string1, const M_WCHAR *string2
#endif
);
M_WCHAR *w_strncpy( M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
#if defined(M_PROTO)
M_WCHAR *string1, const M_WCHAR *string2, int max
#endif
);
int w_strlen( int w_strlen(const M_WCHAR *string);
#if defined(M_PROTO)
const M_WCHAR *string
#endif
);
M_WCHAR *w_strchr( M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
#if defined(M_PROTO)
M_WCHAR *string, const M_WCHAR chr
#endif
);
M_WCHAR *w_strstr( M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
#if defined(M_PROTO)
M_WCHAR *string1, M_WCHAR *string2
#endif
);
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void m_free( void m_free(void *block, char *msg);
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void m_err2( void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
int mb_getwc( int mb_getwc(void *m_ptr);
#if defined(M_PROTO)
void *m_ptr
#endif
) ;

View file

@ -37,179 +37,63 @@ This product and information is proprietary of Tandem Computers Incorporated.
#define CONTINIT(a) #define CONTINIT(a)
#endif #endif
void countdown( void countdown(M_TRIE *parent, int *count);
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void dumpdlmptr( void dumpdlmptr(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void dumpnode( void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
#if defined(M_PROTO)
LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
#endif
) ;
void dumptree( void dumptree(LOGICAL sparse);
#if defined(M_PROTO)
LOGICAL sparse
#endif
) ;
void enterdelim( void enterdelim(int n);
#if defined(M_PROTO)
int n
#endif
) ;
void m_error( void m_error(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_err1( void m_err1(char *text, char *arg);
#if defined(M_PROTO)
char *text, char *arg
#endif
) ;
void getcode( void getcode(int n);
#if defined(M_PROTO)
int n
#endif
) ;
void getcolon( void getcolon(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int getContext( int getContext(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
LOGICAL getdname( LOGICAL getdname(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void inccon( void inccon(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void incdelim( void incdelim(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void loaddelim( void loaddelim(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
int m_lower( int m_lower(int c);
#if defined(M_PROTO)
int c
#endif
) ;
int main( int main(int argc, char **argv);
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void nextcon( void nextcon(LOGICAL sparse);
#if defined(M_PROTO)
LOGICAL sparse
#endif
) ;
void m_openchk( void m_openchk(FILE **ptr, char *name, char *mode);
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
void printval( void printval(FILE *file, M_TRIE *value);
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void prtctxt( void prtctxt(int column, int value);
#if defined(M_PROTO)
int column, int value
#endif
) ;
int readchar( int readchar(LOGICAL cap);
#if defined(M_PROTO)
LOGICAL cap
#endif
) ;
void skiptoend( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void unread( void unread(int c);
#if defined(M_PROTO)
int c
#endif
) ;
int m_upper( int m_upper(int c);
#if defined(M_PROTO)
int c
#endif
) ;
void warning( void warning(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1( void warning1(char *text, char *arg);
#if defined(M_PROTO)
char *text, char *arg
#endif
) ;
void warning2( void warning2(char *text, char *arg1, char *arg2);
#if defined(M_PROTO)
char *text, char *arg1, char *arg2
#endif
) ;
LOGICAL m_whitespace( LOGICAL m_whitespace(M_WCHAR c);
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
#define NOMORE -1 #define NOMORE -1

View file

@ -55,12 +55,7 @@ void dumpdlmptr(M_NOPAR)
} }
/* Output the generated data structures */ /* Output the generated data structures */
#if defined(M_PROTO)
void dumptree(LOGICAL sparse) void dumptree(LOGICAL sparse)
#else
void dumptree(sparse)
LOGICAL sparse;
#endif
{ {
int i, count = 0; int i, count = 0;
@ -574,12 +569,7 @@ loading = FALSE;
} }
/* Output transition matrix */ /* Output transition matrix */
#if defined(M_PROTO)
void nextcon(LOGICAL sparse) void nextcon(LOGICAL sparse)
#else
void nextcon(sparse)
LOGICAL sparse;
#endif
{ {
int i, j; int i, j;
int firstinrow; int firstinrow;
@ -646,12 +636,7 @@ void prtctxt(column, value)
/* Read the next input character */ /* Read the next input character */
#if defined(M_PROTO)
int readchar(LOGICAL cap) int readchar(LOGICAL cap)
#else
int readchar(cap)
LOGICAL cap;
#endif
{ {
int c; int c;
M_WCHAR wnl; M_WCHAR wnl;

View file

@ -29,11 +29,7 @@
#endif #endif
#include "basic.h" #include "basic.h"
void main( void main(int argc, char **argv);
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void main(argc, argv) void main(argc, argv)
int argc ; int argc ;

View file

@ -25,23 +25,11 @@
/* Entout has procedures to write generated entity TRIE */ /* Entout has procedures to write generated entity TRIE */
void entptr( void entptr(M_ENTITY *data);
#if defined(M_PROTO)
M_ENTITY *data
#endif
) ;
char *typetype( char *typetype(int n);
#if defined(M_PROTO)
int n
#endif
) ;
char *typewhere( char *typewhere(unsigned char n);
#if defined(M_PROTO)
unsigned char n
#endif
) ;
/* Macro names written to output file */ /* Macro names written to output file */
char xdbuild[] = "M_DBUILD" ; char xdbuild[] = "M_DBUILD" ;
@ -212,12 +200,7 @@ char *typetype(n)
} }
/* Typewhere returns a string indicating where the nth entity was defined.*/ /* Typewhere returns a string indicating where the nth entity was defined.*/
#if defined(M_PROTO)
char *typewhere(unsigned char n) char *typewhere(unsigned char n)
#else
char *typewhere(n)
unsigned char n ;
#endif
{ {
switch(n) { switch(n) {
case M_DBUILD: return(xdbuild) ; case M_DBUILD: return(xdbuild) ;

View file

@ -33,128 +33,47 @@ extern FILE *m_errfile ;
extern int m_line ; extern int m_line ;
extern LOGICAL errexit ; extern LOGICAL errexit ;
void eprefix( void eprefix(LOGICAL flag);
#if defined(M_PROTO)
LOGICAL flag
#endif
) ;
void m_errline( void m_errline(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_error( void m_error(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_err1( void m_err1(char *text, const M_WCHAR *arg);
#if defined(M_PROTO)
char *text, const M_WCHAR *arg
#endif
) ;
void m_mberr1( void m_mberr1(char *text, const char *arg);
#if defined(M_PROTO)
char *text, const char *arg
#endif
) ;
void m_err2( void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
void m_err3( void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void m_err5( void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
#if defined(M_PROTO) M_WCHAR *arg5);
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
M_WCHAR *arg5
#endif
) ;
void esuffix( void esuffix(void);
#if defined(M_PROTO)
void
#endif
) ;
void msgline( void msgline(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void msg1line( void msg1line(char *text, char *arg1);
#if defined(M_PROTO)
char *text, char *arg1
#endif
) ;
void skiptoend( void skiptoend(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void m_wctrace( void m_wctrace(M_WCHAR *text);
#if defined(M_PROTO)
M_WCHAR *text
#endif
) ;
void m_trace( void m_trace(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning( void warning(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void warning1( void warning1(char *text, M_WCHAR *arg);
#if defined(M_PROTO)
char *text, M_WCHAR *arg
#endif
) ;
void warning2( void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2
#endif
) ;
void warning3( void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void warning4( void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
#endif
) ;
/* Write error message prefix */ /* Write error message prefix */
#if defined(M_PROTO)
void eprefix(LOGICAL flag) void eprefix(LOGICAL flag)
#else
void eprefix(flag)
LOGICAL flag ;
#endif
{ {
if (flag) errexit = TRUE ; if (flag) errexit = TRUE ;
fprintf(stderr, "\n**** ") ; fprintf(stderr, "\n**** ") ;
@ -184,13 +103,7 @@ void m_error(text)
/* Writes an error message with one argument to standard error and file /* Writes an error message with one argument to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err1(char *text, const M_WCHAR *arg) void m_err1(char *text, const M_WCHAR *arg)
#else
void m_err1(text, arg)
char *text;
M_WCHAR *arg ;
#endif
{ {
char *mb_arg; char *mb_arg;
@ -203,13 +116,7 @@ skiptoend() ;
m_free(mb_arg,"multi-byte string"); m_free(mb_arg,"multi-byte string");
} }
#if defined(M_PROTO)
void m_mberr1(char *text, const char *arg) void m_mberr1(char *text, const char *arg)
#else
void m_err1(text, arg)
char *text;
char *arg ;
#endif
{ {
eprefix(TRUE) ; eprefix(TRUE) ;
fprintf(stderr, text, arg) ; fprintf(stderr, text, arg) ;
@ -220,13 +127,7 @@ skiptoend() ;
/* Writes an error message with two arguments to standard error and file /* Writes an error message with two arguments to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2) void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2)
#else
void m_err2(text, arg1, arg2)
char *text;
M_WCHAR *arg1, *arg2 ;
#endif
{ {
char *mb_arg1, *mb_arg2; char *mb_arg1, *mb_arg2;
@ -243,13 +144,7 @@ m_free(mb_arg2,"multi-byte string");
/* Writes an error message with three arguments to standard error and file /* Writes an error message with three arguments to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3) void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
#else
void m_err3(text, arg1, arg2, arg3)
char *text;
M_WCHAR *arg1, *arg2, *arg3 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3; char *mb_arg1, *mb_arg2, *mb_arg3;
@ -268,14 +163,8 @@ m_free(mb_arg3,"multi-byte string");
/* Writes an error message with five arguments to standard error and file /* Writes an error message with five arguments to standard error and file
"error" */ "error" */
#if defined(M_PROTO)
void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
M_WCHAR *arg4, M_WCHAR *arg5) M_WCHAR *arg4, M_WCHAR *arg5)
#else
void m_err5(text, arg1, arg2, arg3, arg4, arg5)
char *text;
M_WCHAR *arg1, *arg2, *arg3, *arg4, *arg5 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@ -347,13 +236,7 @@ void warning(text)
/* Writes a nonfatal error message with one argument to standard error /* Writes a nonfatal error message with one argument to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning1( char *text, M_WCHAR *arg) void warning1( char *text, M_WCHAR *arg)
#else
void warning1(text, arg)
char *text;
M_WCHAR *arg ;
#endif
{ {
char *mb_arg; char *mb_arg;
@ -367,13 +250,7 @@ m_free(mb_arg,"multi-byte string");
/* Writes a nonfatal error message with two arguments to standard error /* Writes a nonfatal error message with two arguments to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2) void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2)
#else
void warning2(text, arg1, arg2)
char *text;
M_WCHAR *arg1, *arg2 ;
#endif
{ {
char *mb_arg1, *mb_arg2; char *mb_arg1, *mb_arg2;
@ -389,13 +266,7 @@ m_free(mb_arg2,"multi-byte string");
/* Writes a nonfatal error message with three arguments to standard error /* Writes a nonfatal error message with three arguments to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3) void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
#else
void warning3(text, arg1, arg2, arg3)
char *text;
M_WCHAR *arg1, *arg2, *arg3 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3; char *mb_arg1, *mb_arg2, *mb_arg3;
@ -413,14 +284,8 @@ m_free(mb_arg3,"multi-byte string");
/* Writes a nonfatal error message with four arguments to standard error /* Writes a nonfatal error message with four arguments to standard error
and file "error" */ and file "error" */
#if defined(M_PROTO)
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
M_WCHAR *arg4) M_WCHAR *arg4)
#else
void warning4(text, arg1, arg2, arg3, arg4)
char *text;
M_WCHAR *arg1, *arg2, *arg3, *arg4 ;
#endif
{ {
char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4; char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4;

View file

@ -30,11 +30,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#endif #endif
#include "basic.h" #include "basic.h"
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
/* 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 */

View file

@ -58,23 +58,11 @@ struct data {
char linedir[] = "#line" ; char linedir[] = "#line" ;
char *p = linedir, *q = linedir + 1 ; char *p = linedir, *q = linedir + 1 ;
void main( void main(int argc, char **argv);
#if defined(M_PROTO)
int argc, char **argv
#endif
) ;
void copyfile( void copyfile(char *pfile1, char *pfile2);
#if defined(m_proto)
char *pfile1, char *pfile2
#endif
) ;
int nextchar( int nextchar(FILE *file, struct data *data);
#if defined (M_PROTO)
FILE *file, struct data *data
#endif
) ;
void main(argc, argv) void main(argc, argv)
int argc ; int argc ;

View file

@ -30,23 +30,11 @@
#endif #endif
#include "basic.h" #include "basic.h"
void m_err1( void m_err1(const char *text, const char *arg);
#if defined(M_PROTO)
const char *text, const char *arg
#endif
) ;
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
void m_inctest( void m_inctest(int *count, int limit, char *message);
#if defined(M_PROTO)
int *count, int limit, char *message
#endif
) ;
/* 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(count, limit, message)

View file

@ -29,12 +29,6 @@
#include "common.h" #include "common.h"
extern char m_chartype[M_CHARSETLEN] ; extern char m_chartype[M_CHARSETLEN] ;
void m_initctype(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void m_initctype(M_NOPAR) void m_initctype(M_NOPAR)
{ {
int i ; int i ;

View file

@ -27,17 +27,9 @@
#include <string.h> #include <string.h>
#include "basic.h" #include "basic.h"
char *m_itoa( char *m_itoa(int n, char *s);
#if defined(M_PROTO)
int n, char *s
#endif
) ;
void reverse( void reverse(char *s);
#if defined(M_PROTO)
char *s
#endif
) ;
char *m_itoa(n, s) /* convert n to characters in s */ char *m_itoa(n, s) /* convert n to characters in s */
char s[]; char s[];

View file

@ -27,18 +27,7 @@
#include "basic.h" #include "basic.h"
LOGICAL m_letter(
#if defined(M_PROTO)
M_WCHAR c
#endif
) ;
#if defined(M_PROTO)
LOGICAL m_letter(M_WCHAR c) LOGICAL m_letter(M_WCHAR c)
#else
LOGICAL m_letter(c)
M_WCHAR c ;
#endif
{ {
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ;
return(FALSE) ; return(FALSE) ;

View file

@ -27,11 +27,7 @@
#include "basic.h" #include "basic.h"
int m_lower( int m_lower(int c);
#if defined(M_PROTO)
int c
#endif
) ;

View file

@ -36,53 +36,21 @@
extern LOGICAL m_heapchk ; extern LOGICAL m_heapchk ;
extern LOGICAL m_malftrace ; extern LOGICAL m_malftrace ;
void m_errline( void m_errline(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
void m_free( void m_free(void *block, char *msg);
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void m_heapdump( void m_heapdump(M_NOPAR);
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void *m_realloc( void *m_realloc(void *ptr, int size, char *msg);
#if defined(M_PROTO)
void *ptr, int size, char *msg
#endif
) ;
void *m_trace( void *m_trace(char *text);
#if defined(M_PROTO)
char *text
#endif
) ;
void *m_wctrace( void *m_wctrace(M_WCHAR *text);
#if defined(M_PROTO)
M_WCHAR *text
#endif
) ;
void m_free(block, msg) void m_free(block, msg)
void *block ; void *block ;

View file

@ -33,17 +33,9 @@
extern FILE *m_errfile ; extern FILE *m_errfile ;
void m_exit( void m_exit(int status);
#if defined(M_PROTO)
int status
#endif
) ;
void m_openchk( void m_openchk(FILE **ptr, char *name, char *mode);
#if defined(M_PROTO)
FILE **ptr, char *name, char *mode
#endif
) ;
/* 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(ptr, name, mode)

View file

@ -33,13 +33,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Check to see if string is a valid value for parameter par. If so /* Check to see if string is a valid value for parameter par. If so
return a pointer to the keyword if it's a keyword parameter and otherwise return a pointer to the keyword if it's a keyword parameter and otherwise
a pointer to string. If not valid, return FALSE. */ a pointer to string. If not valid, return FALSE. */
#if defined(M_PROTO)
const M_WCHAR *m_partype(const int par , const M_WCHAR *string ) const M_WCHAR *m_partype(const int par , const M_WCHAR *string )
#else
M_WCHAR *m_partype(par, string)
int par ;
M_WCHAR *string ;
#endif /* M_PROTO */
{ {
LOGICAL first = TRUE ; LOGICAL first = TRUE ;
int kw ; int kw ;

View file

@ -29,11 +29,7 @@
#if defined(sparse) #if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j) #define m_newcon(i, j) m_sprscon(i, j)
int m_sprscon( int m_sprscon(int i, int j);
#if defined(M_PROTO)
int i, int j
#endif
) ;
#else #else
#define m_newcon(i, j) m_nextcon[i][j] #define m_newcon(i, j) m_nextcon[i][j]

View file

@ -45,26 +45,12 @@ extern FILE *m_errfile ;
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ; extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
void *m_malloc( void *m_malloc(int size, char *msg);
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void m_entercharintrie( void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
#if defined(M_PROTO)
M_TRIE **currentnode, M_WCHAR c
#endif
) ;
/* Enters the next character of a string into a trie */ /* Enters the next character of a string into a trie */
#if defined(M_PROTO)
void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c) void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c)
#else
void m_entercharintrie(currentnode, c)
M_TRIE **currentnode ;
M_WCHAR c ;
#endif
{ {
M_TRIE *newnode ; M_TRIE *newnode ;
@ -112,13 +98,7 @@ M_TRIE *m_gettrienode(M_NOPAR)
/* M_lookfortrie(p, xtrie) looks for string p in the specified trie, /* M_lookfortrie(p, xtrie) looks for string p in the specified trie,
returning its data value if found and otherwise FALSE */ returning its data value if found and otherwise FALSE */
#if defined(M_PROTO)
void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie ) void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie )
#else
void *m_lookfortrie(p, xtrie)
M_WCHAR *p ;
M_TRIE *xtrie ;
#endif /* M_PROTO */
{ {
M_TRIE *currentnode ; M_TRIE *currentnode ;

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