BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
+M_WCHAR *MakeWideCharString(const char *from);
/* Addarc adds an arc from FSA state <from> to state <to> setting other
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)
-#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 ;
int determ ;
/* Saves the name of an element appearing on the left-hand side of a
grammar rule */
-#if defined(M_PROTO)
void savelhs(LOGICAL param)
-#else
-void savelhs(param)
- LOGICAL param ;
-#endif
{
STATE *end ;
ELTSTRUCT *errelt ;
/* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
int len ;
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
int i ;
}
/* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
{
PTYPE *kw ;
int keycount ;
*/
/* Proto.h contains function prototypes for program BUILD. */
+/* Proto.h contains function prototypes for program BUILD. */
+
+
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
+ int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(M_NOPAR);
+
+void addkeyword(M_NOPAR);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(M_NOPAR);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
+ ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(M_NOPAR);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(M_NOPAR);
+
+void done(M_NOPAR);
+
+void dumpentnode(FILE *file, M_TRIE *value);
+void dumpmapnode(FILE *file, M_TRIE *value);
-int addarc(
-#if defined(M_PROTO)
- STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
- int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void adddefent(
-#if defined(M_PROTO)
- M_WCHAR *mapname
-#endif
- ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
- M_WCHAR *name
-#endif
- ) ;
-
-void addex(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
- M_WCHAR *p, LOGICAL define
-#endif
- ) ;
-
-void addndent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void addpar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addsref(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void checkand(
-#if defined(M_PROTO)
- ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
- ELTSTRUCT **errelt
-#endif
- ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
- STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
- ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
- STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
- STATELIST *from, STATELIST **to
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void defmapname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-char *deftype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void dellist(
-#if defined(M_PROTO)
- STATELIST **list
-#endif
- ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
- FILE *file,
- M_TRIE *value
-#endif
- ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)( FILE *, M_TRIE *)
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
+void dumpsrefnode(FILE *file,
+ M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
- FILE *tempfile
-#endif
- ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endmodel(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-char *enttype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void exout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freetree(
-#if defined(M_PROTO)
- TREE *ruletree
-#endif
- ) ;
-
-void found(
-#if defined(M_PROTO)
- LOGICAL *flag, char *delim
-#endif
- ) ;
-
-void fsa(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-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
- ) ;
+ void (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(M_NOPAR);
+
+void endmodel(M_NOPAR);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+ANDGROUP *getand(M_NOPAR);
+
+LOGICAL getname(int first);
+
+STATE *getstate(M_NOPAR);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(M_NOPAR);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL litproc(int delim);
+
+void main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(M_NOPAR);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(M_NOPAR);
+
+void prulend(M_NOPAR);
+
+void push(M_NOPAR);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(M_NOPAR);
+
+void rulend(M_NOPAR);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(M_NOPAR);
+
+int scan(M_NOPAR);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(M_NOPAR);
+
+int m_sprscon(int i, int j);
+
+void srefout(M_NOPAR);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(M_NOPAR);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Add a short reference map name */
-#if defined(M_PROTO)
LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
{
MAP *old;
MAP *new;
/* 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)
-#else
-void closeiffile(flag, file, count, table, proto)
- LOGICAL flag;
- FILE *file;
- int count;
- char *table;
- char *proto;
-#endif
{
int i;
endcode(flag, file);
if (count) {
fprintf(file,
- "void (*m_%stable[])(\n#if defined(M_PROTO)\n %s\n#endif\n ) = {\n",
+ "void (*m_%stable[])(%s) = {\n",
table, proto);
fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n",
table);
}
else
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);
fclose(file);
}
}
/* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
- LOGICAL flag;
- FILE *file;
-#endif
{
if (flag) fprintf(file, "}}\n\n");
}
*flag = TRUE;
/* protoype */
fprintf(file,
- "void m_%s%d(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n",
+ "void m_%s%d(%s) ;\n",
prefix,
caseno,
proto);
/* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-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);
+fprintf(file, "void m_%s%d(%s)\n {\n", prefix, caseno, proto);
+);
for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
{
/* Proto.h contains function prototypes for program ELTDEF. */
-void actptrout(
-#if defined(M_PROTO)
- ACTION **array, char *name
-#endif
- ) ;
-
-void addent(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void cvalue(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
- M_TRIE *xtrie,
- char *extname,
- int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void endcode(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file
-#endif
- ) ;
-
-void endini(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-void enttype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#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(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freechain(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int *getaction(
-#if defined(M_PROTO)
- ACTION **array
-#endif
- ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void outpval(
-#if defined(M_PROTO)
- M_TRIE *p
-#endif
- ) ;
-
-void outstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-int scan(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void startcode(
-#if defined(M_PROTO)
- int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
- char *formal, char *formtype
-#endif
- ) ;
-
-void startelement(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storecvar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storepname(
-#if defined(M_PROTO)
- M_NOPAR
-#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 value(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void warning1(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+void actptrout(ACTION **array, char *name);
+
+void addent(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(M_NOPAR);
+
+void done(M_NOPAR);
+
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(M_NOPAR);
+
+void endsignon(M_NOPAR);
+
+void endstring(M_NOPAR);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(M_NOPAR);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+void main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(M_NOPAR);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(M_NOPAR);
+
+void skiptoend(M_NOPAR);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+ char *formal, char *formtype);
+
+void startelement(M_NOPAR);
+
+void storecvar(M_NOPAR);
+
+void storepname(M_NOPAR);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
#include "userinc.h"
#include "globdec.h"
-#if defined(M_PROTO)
int vextextsize(const M_WCHAR *keyword)
-#else
-int vextextsize(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NORMAL;
return NORMAL;
}
-#if defined(M_PROTO)
int vgloss(const M_WCHAR *keyword)
-#else
-int vgloss(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return GLOSS;
return GLOSS;
}
-#if defined(M_PROTO)
int vcenter(const M_WCHAR *keyword)
-#else
-int vcenter(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return CENTER;
return CENTER;
}
-#if defined(M_PROTO)
int vnumber(const M_WCHAR *keyword)
-#else
-int vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NONUMBER;
return NONUMBER;
}
-#if defined(M_PROTO)
LOGICAL vstack(const M_WCHAR *keyword)
-#else
-LOGICAL vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return FALSE;
return FALSE;
}
-#if defined(M_PROTO)
int vordertype(const M_WCHAR *keyword)
-#else
-int vordertype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return ARABIC;
return ARABIC;
}
-#if defined(M_PROTO)
int vrsectpage(const M_WCHAR *keyword)
-#else
-int vrsectpage(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NEWPAGE;
return NEWPAGE;
}
-#if defined(M_PROTO)
int vspacing(const M_WCHAR *keyword)
-#else
-int vspacing(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return LOOSE;
return LOOSE;
}
-#if defined(M_PROTO)
int vtype(const M_WCHAR *keyword)
-#else
-int vtype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return BULLET;
/* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
/* Function prototypes for HP Tag/TeX translator */
-void appstart(
-#if defined(M_PROTO)
- M_WCHAR *id, M_WCHAR *letter
-#endif
- ) ;
+void appstart(M_WCHAR *id, M_WCHAR *letter);
-void assert_hometopic_exists(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void assert_hometopic_exists(M_NOPAR);
-void badgraphic(
-#if defined(M_PROTO)
- int filestat
-#endif
- ) ;
+void badgraphic(int filestat);
-void basename(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void basename(M_NOPAR);
-void calcdisp (
-#if defined(M_PROTO)
- M_WCHAR *file, M_WCHAR *startrow, M_WCHAR *endrow,
- M_WCHAR *clip, M_WCHAR *margin
-#endif
- ) ;
+void calcdisp (M_WCHAR *file, M_WCHAR *startrow, M_WCHAR *endrow,
+ M_WCHAR *clip, M_WCHAR *margin);
-void callndbeg (
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void callndbeg (M_NOPAR);
-void callndend (
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void callndend (M_NOPAR);
/* used by ccompspec(), cmenlspec(), and cwmenlspec() */
-char *ccharspec(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+char *ccharspec(M_WCHAR textchar);
-void ccmpiooutchar (
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+void ccmpiooutchar (M_WCHAR textchar);
-void ccompesoutchar (
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void ccompesoutchar (M_WCHAR textchar, FILE *outfile);
-void ccompexoutchar (
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void ccompexoutchar (M_WCHAR textchar, FILE *outfile);
-void ccompoutchar (
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void ccompoutchar (M_WCHAR textchar, FILE *outfile);
/* special computer expansions for dot matrix(computer) in calculator style */
-char *ccompspec(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+char *ccompspec(M_WCHAR textchar);
-void chapstart(
-#if defined(M_PROTO)
- M_WCHAR *id, M_WCHAR *number, char type[]
-#endif
- ) ;
+void chapstart(M_WCHAR *id, M_WCHAR *number, char type[]);
-M_WCHAR *checkdimen(
-#if defined(M_PROTO)
- M_WCHAR *val, M_WCHAR *paramname, M_WCHAR *elt
-#endif
- ) ;
+M_WCHAR *checkdimen(M_WCHAR *val, M_WCHAR *paramname, M_WCHAR *elt);
-M_WCHAR *mb_checkdimen(
-#if defined(M_PROTO)
- M_WCHAR *val, char *paramname, char *elt
-#endif
- ) ;
+M_WCHAR *mb_checkdimen(M_WCHAR *val, char *paramname, char *elt);
-M_WCHAR *checkent(
-#if defined(M_PROTO)
- M_WCHAR *entcontent
-#endif
- ) ;
+M_WCHAR *checkent(M_WCHAR *entcontent);
-void checkgloss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void checkgloss(M_NOPAR);
-M_WCHAR *checkid(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
+M_WCHAR *checkid(M_WCHAR *id);
-void checkmsghead (
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void checkmsghead (M_NOPAR);
-M_WCHAR *checkreal (
-#if defined(M_PROTO)
- M_WCHAR *val, M_WCHAR *paramname, LOGICAL msgout, M_WCHAR *elt
-#endif
- ) ;
+M_WCHAR *checkreal (M_WCHAR *val, M_WCHAR *paramname, LOGICAL msgout, M_WCHAR *elt);
-LOGICAL chkplottype(
-#if defined(M_PROTO)
- M_WCHAR *val, int *p1x, int *p1y, int *p2x, int *p2y, LOGICAL prnt
-#endif
- ) ;
+LOGICAL chkplottype(M_WCHAR *val, int *p1x, int *p1y, int *p2x, int *p2y, LOGICAL prnt );
-void cmloutchar (
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void cmloutchar (M_WCHAR textchar, FILE *outfile);
/* special menu lable character expansions */
-char *cmenlspec(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+char *cmenlspec(M_WCHAR textchar);
-void cspotend(
-#if defined(M_PROTO)
- M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight
-#endif
- ) ;
+void cspotend(M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight);
-void cspotstart(
-#if defined(M_PROTO)
- M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight
-#endif
- ) ;
+void cspotstart(M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight);
-void csubtc (
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile, M_WCHAR *parent
-#endif
- ) ;
+void csubtc (M_WCHAR textchar, FILE *outfile, M_WCHAR *parent);
-void csuptc (
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile, M_WCHAR *parent
-#endif
- ) ;
+void csuptc (M_WCHAR textchar, FILE *outfile, M_WCHAR *parent);
/* special white menu label character expansions */
-char *cwmenlspec(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+char *cwmenlspec(M_WCHAR textchar);
-void cwmloutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void cwmloutchar(M_WCHAR textchar, FILE *outfile);
-void defxref(
-#if defined(M_PROTO)
- FILE *xfile, M_WCHAR *id, struct xref *xref
-#endif
- ) ;
+void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref);
-int do_esc_seq(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+int do_esc_seq(M_NOPAR);
-void dumpxref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void dumpxref(M_NOPAR);
-void echohead(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
+void echohead(M_WCHAR *p);
-void mb_echohead(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
+void mb_echohead(char *p);
-void endhead(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void endhead(M_NOPAR);
-void endhelpnode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void endhelpnode(M_NOPAR);
-void esoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+void esoutchar(M_WCHAR textchar);
-void exoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+void exoutchar(M_WCHAR textchar);
-void exvexend(
-#if defined(M_PROTO)
- M_WCHAR *textsize
-#endif
- ) ;
+void exvexend(M_WCHAR *textsize);
-void exvexstart(
-#if defined(M_PROTO)
- M_WCHAR *type, M_WCHAR *textsize, char *listinfo
-#endif
- ) ;
+void exvexstart(M_WCHAR *type, M_WCHAR *textsize, char *listinfo);
-void figend (
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
+void figend (M_WCHAR *id);
-int figext (
-#if defined(M_PROTO)
- M_WCHAR *fname
-#endif
- ) ;
+int figext (M_WCHAR *fname);
-int figlist (
-#if defined(M_PROTO)
- char *fnin
-#endif
- ) ;
+int figlist (char *fnin);
-void figraster(
-#if defined(M_PROTO)
-M_WCHAR *file, M_WCHAR *magnify,
+void figraster(M_WCHAR *file, M_WCHAR *magnify,
M_WCHAR *width, M_WCHAR *depth, M_WCHAR *hadjust, M_WCHAR *vadjust,
M_WCHAR *mirror, M_WCHAR *margin, M_WCHAR *clip,
-M_WCHAR *penwidth,M_WCHAR *plottype, M_WCHAR *callout, M_WCHAR *textsize
-#endif
- ) ;
+M_WCHAR *penwidth,M_WCHAR *plottype, M_WCHAR *callout, M_WCHAR *textsize);
-void figstart(
-#if defined(M_PROTO)
-M_WCHAR *number, M_WCHAR *tonumber, M_WCHAR *id, M_WCHAR *file,
+void figstart(M_WCHAR *number, M_WCHAR *tonumber, M_WCHAR *id, M_WCHAR *file,
M_WCHAR *type, M_WCHAR *oldtype,
M_WCHAR *xmagnify,M_WCHAR *xwidth, M_WCHAR *xdepth, M_WCHAR *xhadjust,
M_WCHAR *xvadjust,M_WCHAR *border, 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
-#endif
- ) ;
+M_WCHAR *callout, M_WCHAR *textsize);
-void figvector(
-#if defined(M_PROTO)
-M_WCHAR *file, M_WCHAR *magnify,
+void figvector(M_WCHAR *file, M_WCHAR *magnify,
M_WCHAR *width, M_WCHAR *depth, M_WCHAR *hadjust, M_WCHAR *vadjust,
M_WCHAR *mirror, M_WCHAR *margin, M_WCHAR *clip,
M_WCHAR *penwidth, M_WCHAR *autoscale, M_WCHAR *plottype, M_WCHAR *callout,
-M_WCHAR *textsize
-#endif
- ) ;
+M_WCHAR *textsize);
-unsigned get2b(
-#if defined(M_PROTO)
- FILE *fh
-#endif
- ) ;
+unsigned get2b(FILE *fh);
-unsigned long get4b(
-#if defined(M_PROTO)
- FILE *fh
-#endif
- ) ;
+unsigned long get4b(FILE *fh);
-unsigned long getPCLdims (
-#if defined(M_PROTO)
- char *fn
-#endif
- ) ;
+unsigned long getPCLdims (char *fn);
-int getqualified (
-#if defined(M_PROTO)
- M_WCHAR *qualname, M_WCHAR *unqualname
-#endif
- ) ;
+int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
-int mb_getqualified (
-#if defined(M_PROTO)
- char *qualname, char *unqualname
-#endif
- ) ;
+int mb_getqualified (char *qualname, char *unqualname);
-void handle_link_and_graphic(
-#if defined(M_PROTO)
- M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
- M_WCHAR *glinktype, M_WCHAR *gdescription
-#endif
- );
+void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
+ M_WCHAR *glinktype, M_WCHAR *gdescription);
-void keyesoutchar (
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+void keyesoutchar (M_WCHAR textchar);
-void idstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
+void idstring(M_WCHAR *string);
-void indexchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+void indexchar(M_WCHAR textchar);
-void item(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
+void item(M_WCHAR *id);
-char *m_itoa(
-#if defined(M_PROTO)
- int n, char *s
-#endif
- ) ;
+char *m_itoa(int n, char *s);
-void itoletter(
-#if defined(M_PROTO)
- int n, char start, char *dest, int length
-#endif
- ) ;
+void itoletter(int n, char start, char *dest, int length);
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_letter(M_WCHAR c);
-void loadxref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void loadxref(M_NOPAR);
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
-char *makecsname(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
+char *makecsname(M_WCHAR *id);
-void manustart(
-#if defined(M_PROTO)
- M_WCHAR *language, M_WCHAR *idxvol, M_WCHAR *status
-#endif
- ) ;
+void manustart(M_WCHAR *language, M_WCHAR *idxvol, M_WCHAR *status);
-void notimp(
-#if defined(M_PROTO)
- char *eltname, char *option
-#endif
- ) ;
+void notimp(char *eltname, char *option);
-M_WCHAR *okdimen (
-#if defined(M_PROTO)
- M_WCHAR *val
-#endif
- ) ;
+M_WCHAR *okdimen (M_WCHAR *val);
-void onlygraphic(
-#if defined(M_PROTO)
- char *param, M_WCHAR *magnify, M_WCHAR *video, M_WCHAR *mirror,
+void onlygraphic(char *param, M_WCHAR *magnify, M_WCHAR *video, M_WCHAR *mirror,
M_WCHAR *margin, M_WCHAR *clip, M_WCHAR *penwidth, M_WCHAR *autoscale,
- M_WCHAR *plottype, M_WCHAR *hadjust, M_WCHAR *vadjust
-#endif
- ) ;
+ M_WCHAR *plottype, M_WCHAR *hadjust, M_WCHAR *vadjust);
-void open_new_helpfile(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
-);
+void open_new_helpfile(M_NOPAR);
-void notallow(
-#if defined(M_PROTO)
- char *param1, char *param2
-#endif
- ) ;
+void notallow(char *param1, char *param2);
-void options(
-#if defined(M_PROTO)
- LOGICAL filelenonly
-#endif
- ) ;
+void options(LOGICAL filelenonly);
-void outcall(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void outcall(M_WCHAR textchar, FILE *outfile);
-void outchar(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void outchar(M_WCHAR textchar, FILE *outfile);
-void outpi(
-#if defined(M_PROTO)
- int enttype, M_WCHAR *pi, M_WCHAR *entname
-#endif
- ) ;
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
-void parspace(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void parspace(M_NOPAR);
-LOGICAL pushndok(
-#if defined(M_PROTO)
- LOGICAL val
-#endif
- ) ;
+LOGICAL pushndok(LOGICAL val);
-LOGICAL popndok(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+LOGICAL popndok(M_NOPAR);
-void prfigborder(
-#if defined(M_PROTO)
- int val
-#endif
- ) ;
+void prfigborder(int val);
-void prfigclip(
-#if defined(M_PROTO)
- M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]
-#endif
- ) ;
+void prfigclip(M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]);
-void prfigheight(
-#if defined(M_PROTO)
- char *val
-#endif
- ) ;
+void prfigheight(char *val);
-void prfigmagnify(
-#if defined(M_PROTO)
- char *val
-#endif
- ) ;
+void prfigmagnify(char *val);
-void prfigmargin(
-#if defined(M_PROTO)
- M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]
-#endif
- ) ;
+void prfigmargin(M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]);
-void prfigpenwds(
-#if defined(M_PROTO)
- long penwdarray[MAXPENS]
-#endif
- ) ;
+void prfigpenwds(long penwdarray[MAXPENS]);
-void prfigwidth(
-#if defined(M_PROTO)
- char *val
-#endif
- ) ;
+void prfigwidth(char *val);
-LOGICAL print_vectors(
-#if defined(M_PROTO)
- FILE * hOutFile, PTWTXT **Points, int *maxcalltxt, FILE *hCalFile, int CalNo
-#endif
- ) ;
+LOGICAL print_vectors(FILE * hOutFile, PTWTXT **Points, int *maxcalltxt, FILE *hCalFile, int CalNo);
-void prplottype(
-#if defined(M_PROTO)
- int p1x, int p1y, int p2x, int p2y
-#endif
- ) ;
+void prplottype(int p1x, int p1y, int p2x, int p2y);
-float readcoord(
-#if defined(M_PROTO)
- FILE *fh
-#endif
- ) ;
+float readcoord(FILE *fh);
-float readinches(
-#if defined(M_PROTO)
- FILE *fh
-#endif
- ) ;
+float readinches(FILE *fh);
-void realoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
+void realoutchar(M_WCHAR textchar, FILE *outfile);
-void rsectstart(
-#if defined(M_PROTO)
- M_WCHAR *id, M_WCHAR *pagebreak
-#endif
- ) ;
+void rsectstart(M_WCHAR *id, M_WCHAR *pagebreak);
-void rseqend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void rseqend(M_NOPAR);
-void rshnewclear(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void rshnewclear(M_NOPAR);
-M_WCHAR *searchforfile(
-#if defined(M_PROTO)
- M_WCHAR *file
-#endif
- ) ;
+M_WCHAR *searchforfile(M_WCHAR *file);
-void setid(
-#if defined(M_PROTO)
- M_WCHAR *id,
+void setid(M_WCHAR *id,
LOGICAL where,
LOGICAL csensitive,
LOGICAL inchapter,
char *chapter,
M_WCHAR *xrffile,
int xrfline,
- LOGICAL xrefable
-#endif
- ) ;
+ LOGICAL xrefable);
-void setopt(
-#if defined(M_PROTO)
- char *string, LOGICAL filelenonly
-#endif
- ) ;
+void setopt(char *string, LOGICAL filelenonly);
-LOGICAL setvalopt(
-#if defined(M_PROTO)
- int thisopt, char *string, LOGICAL filelenonly
-#endif
- ) ;
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
-void shchar(
-#if defined(M_PROTO)
- M_WCHAR textchar,
+void shchar(M_WCHAR textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void mb_shchar(
-#if defined(M_PROTO)
- char textchar,
+void mb_shchar(char textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void shstring(
-#if defined(M_PROTO)
- M_WCHAR *addstring,
+void shstring(M_WCHAR *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void mb_shstring(
-#if defined(M_PROTO)
- char *addstring,
+void mb_shstring(char *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void starthelpnode(
-#if defined(M_PROTO)
- M_WCHAR *id,
- LOGICAL suppress_topic_map
-#endif
- ) ;
+void starthelpnode(M_WCHAR *id,
+ LOGICAL suppress_topic_map);
-void mb_starthelpnode(
-#if defined(M_PROTO)
- char *id,
- LOGICAL suppress_topic_map
-#endif
- ) ;
+void mb_starthelpnode(char *id,
+ LOGICAL suppress_topic_map);
-void startlablist(
-#if defined(M_PROTO)
- M_WCHAR *longlabel, M_WCHAR *width, M_WCHAR *spacing
-#endif
- ) ;
+void startlablist(M_WCHAR *longlabel, M_WCHAR *width, M_WCHAR *spacing);
-void startlist(
-#if defined(M_PROTO)
- M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont
-#endif
- ) ;
+void startlist(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
-void strcode(
-#if defined(M_PROTO)
- M_WCHAR *string, FILE *outfile
-#endif
- ) ;
+void strcode(M_WCHAR *string, FILE *outfile);
-void mb_strcode(
-#if defined(M_PROTO)
- char *string, FILE *outfile
-#endif
- ) ;
+void mb_strcode(char *string, FILE *outfile);
#if defined(hpux) || defined(__aix) || defined(sun)
-char *strstr(
-#if defined(M_PROTO)
- const char *s1, const char *s2
-#endif
- ) ;
+char *strstr(const char *s1, const char *s2);
#endif
-void svhdstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
+void svhdstring(M_WCHAR *string);
-void svtcstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
+void svtcstring(M_WCHAR *string);
-void taboutre(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void taboutre(M_NOPAR);
-void termchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
+void termchar(M_WCHAR textchar);
-void termpi(
-#if defined(M_PROTO)
- int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname
-#endif
- ) ;
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
-void testindexfile(
-#if defined(M_PROTO)
- FILE *first
-#endif
- ) ;
+void testindexfile(FILE *first);
-void texinit(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void texinit(M_NOPAR);
-void unimp(
-#if defined(M_PROTO)
- M_WCHAR *eltname
-#endif
- ) ;
+void unimp(M_WCHAR *eltname);
-void mb_unimp(
-#if defined(M_PROTO)
- char *eltname
-#endif
- ) ;
+void mb_unimp(char *eltname);
-int m_upstrcmp(
-#if defined(M_PROTO)
- char *p, char *q
-#endif
- ) ;
+int m_upstrcmp(char *p, char *q);
-int vextextsize(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vextextsize(const M_WCHAR *keyword);
-int vgloss(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vgloss(const M_WCHAR *keyword);
-int vcenter(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vcenter(const M_WCHAR *keyword);
-int vnumber(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vnumber(const M_WCHAR *keyword);
-int vordertype(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vordertype(const M_WCHAR *keyword);
-int vrsectpage(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vrsectpage(const M_WCHAR *keyword);
-int vspacing(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vspacing(const M_WCHAR *keyword);
-int vtype(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
+int vtype(const M_WCHAR *keyword);
-void xrefexpand(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
+void xrefexpand(M_WCHAR *id);
-void rtrim(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+void rtrim(char *s);
-double usertopt(
-#if defined(M_PROTO)
- M_WCHAR *s
-#endif
- ) ;
+double usertopt(M_WCHAR *s);
-double mb_usertopt(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+double mb_usertopt(char *s);
-long usertosp(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+long usertosp(char *s);
-void whereneedused(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void whereneedused(M_NOPAR);
-void t_addnotes(
-#if defined(M_PROTO)
- M_WCHAR *tnoteid
-#endif
- ) ;
+void t_addnotes(M_WCHAR *tnoteid);
-void t_prntnotes(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_prntnotes(M_NOPAR);
-LOGICAL t_want_a_Q(
-#if defined(M_PROTO)
- int span_count
-#endif
- );
+LOGICAL t_want_a_Q(int span_count);
-void t_xrefnotes(
-#if defined(M_PROTO)
- M_WCHAR *tnoteid
-#endif
- ) ;
+void t_xrefnotes(M_WCHAR *tnoteid);
-int t_getnum(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+int t_getnum(char *s);
-void t_insertcellmarkup(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_insertcellmarkup(M_NOPAR);
-void t_newpage(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_newpage(M_NOPAR);
-void t_startcolh(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_startcolh(M_NOPAR);
-void t_start_tabhead_colh(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_start_tabhead_colh(M_NOPAR);
-void t_nextcell(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_nextcell(M_NOPAR);
-void t_checkcaption(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_checkcaption(M_NOPAR);
-void t_preamble(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_preamble(M_NOPAR);
-void t_getstyle(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_getstyle(M_NOPAR);
-void t_dospan(
-#if defined(M_PROTO)
- LOGICAL in_colh
-#endif
- ) ;
+void t_dospan(LOGICAL in_colh);
-void t_startcell(
-#if defined(M_PROTO)
- M_WCHAR *span, M_WCHAR *vspan, char *msg
-#endif
- ) ;
+void t_startcell(M_WCHAR *span, M_WCHAR *vspan, char *msg);
-void t_endcell(
-#if defined(M_PROTO)
- M_WCHAR *span, M_WCHAR *vspan
-#endif
- ) ;
+void t_endcell(M_WCHAR *span, M_WCHAR *vspan);
-void t_startrow(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_startrow(M_NOPAR);
-void t_endrow(
-#if defined(M_PROTO)
- M_WCHAR *taglevone
-#endif
- ) ;
+void t_endrow(M_WCHAR *taglevone);
-void sizetofloat(
-#if defined(M_PROTO)
- int column, char *s
-#endif
- ) ;
+void sizetofloat(int column, char *s);
-void t_tabstart(
-#if defined(M_PROTO)
- M_WCHAR *style, M_WCHAR *id, M_WCHAR *number, M_WCHAR *box, M_WCHAR *rule,
+void t_tabstart(M_WCHAR *style, M_WCHAR *id, M_WCHAR *number, M_WCHAR *box, M_WCHAR *rule,
M_WCHAR *vrule, M_WCHAR *hrule, M_WCHAR *vcount, M_WCHAR *hcount,
M_WCHAR *spacing, M_WCHAR *width, M_WCHAR *position,
- M_WCHAR *tonumber, M_WCHAR *divide, M_WCHAR *textsize
-#endif
- ) ;
+ M_WCHAR *tonumber, M_WCHAR *divide, M_WCHAR *textsize);
-void t_tablebody(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_tablebody(M_NOPAR);
-void t_sendout_rowrule(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void t_sendout_rowrule(M_NOPAR);
-void showmemavail(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
+void showmemavail(M_NOPAR);
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-char *GetDefaultHeaderString(
-#if defined(M_PROTO)
- char *elementName,
+char *GetDefaultHeaderString(char *elementName,
unsigned char desiredType,
- char *defaultString
-#endif
- ) ;
+ char *defaultString);
-void SetDefaultLocale(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
+void SetDefaultLocale(M_NOPAR);
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
+char *MakeMByteString(const M_WCHAR *from);
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
+M_WCHAR *MakeWideCharString(const char *from);
-void paragraph(
-#if defined(M_PROTO)
- M_WCHAR *indent,
+void paragraph(M_WCHAR *indent,
M_WCHAR *id,
M_WCHAR *gentity,
M_WCHAR *gposition,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
M_WCHAR *gdescription,
- char *listinfo
-#endif
- );
+ char *listinfo);
-void figure(
-#if defined(M_PROTO)
- M_WCHAR *number,
+void figure(M_WCHAR *number,
M_WCHAR *tonumber,
M_WCHAR *id,
M_WCHAR *file,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
M_WCHAR *gdescription,
- char *listinfo
-#endif
- );
+ char *listinfo);
-void endterm(
-#if defined(M_PROTO)
- M_WCHAR *base,
+void endterm(M_WCHAR *base,
M_WCHAR *gloss,
- int linktype
-#endif
- );
+ int linktype);
-M_WCHAR wc_toupper(
-#if defined(M_PROTO)
- M_WCHAR wc
-#endif
- );
+M_WCHAR wc_toupper(M_WCHAR wc);
/* Verify that val is an acceptable real number value */
-#if defined(M_PROTO)
M_WCHAR *
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 */
double num;
/* Starting stuff for <EX> and <VEX> */
-#if defined(M_PROTO)
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;
/* 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)
-#else
-void itoletter(n, start, dest, length)
-int n;
-char start;
-char *dest;
-int length;
-#endif
{
char invert[10];
char *p, *q;
}
/* Start a new helpnode */
-#if defined(M_PROTO)
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;
char *mbyte;
} /* End starthelpnode(id) */
-#if defined(M_PROTO)
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;
the string returned must be m_free'd.
*/
char *
-#if defined(M_PROTO)
GetDefaultHeaderString(
char *elementName,
unsigned char desiredType,
char *defaultString )
-#else
-GetDefaultHeaderString(elementName, desiredType, defaultString)
-char *elementName;
-unsigned char desiredType;
-char *defaultString;
-#endif
{
unsigned char type,wheredef;
M_WCHAR *content;
}
-#if defined(M_PROTO)
void paragraph(M_WCHAR *indent,
M_WCHAR *id,
M_WCHAR *gentity,
M_WCHAR *glinktype,
M_WCHAR *gdescription,
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)
{
unleaded = FALSE;
}
-#if defined(M_PROTO)
void figure(
M_WCHAR *number,
M_WCHAR *tonumber,
M_WCHAR *glinktype,
M_WCHAR *gdescription,
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;
char *string =
m_free(string, "default header string return");
}
-#if defined(M_PROTO)
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 wnl, wsp, wus;
if (echo) mb_echohead("++");
}
-#if defined(M_PROTO)
M_WCHAR wc_toupper(M_WCHAR wc)
-#else
-M_WCHAR wc_toupper(wc)
-M_WCHAR wc;
-#endif
{
if ((wc >= 0) && (wc <= 255))
{
#define TAGDOTOPT "helptag.opt"
#define DOTOPT ".opt"
-#if defined(M_PROTO)
void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
- LOGICAL filelenonly;
-#endif
{
int i;
FILE *optfile;
/* Set a single option */
/* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int thisopt;
}
/* Process a value for a command line option */
-#if defined(M_PROTO)
LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int i;
}
/* Process a character in an environment where spaces must be escaped */
-#if defined(M_PROTO)
void esoutchar(M_WCHAR textchar)
-#else
-void esoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
static M_WCHAR wsp = 0;
}
/* Process a character in an example or an image paragraph */
-#if defined(M_PROTO)
void exoutchar(M_WCHAR textchar)
-#else
-void exoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
static M_WCHAR wsp = 0, wre;
}
/* Write a character to be passed to the index file */
-#if defined(M_PROTO)
void indexchar(M_WCHAR textchar)
-#else
-void indexchar(textchar)
-M_WCHAR textchar;
-#endif
{
if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
{
/* Processes output for call out text */
-#if defined(M_PROTO)
void outcall(M_WCHAR textchar, FILE *outfile)
-#else
-void outcall(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
{
if (textchar != M_RE)
outchar(textchar, outfile);
}
/* Processes a data character */
-#if defined(M_PROTO)
void outchar(M_WCHAR textchar, FILE *outfile)
-#else
-void outchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
{
M_WCHAR buffer[2];
static M_WCHAR wnl = 0;
}
/* Really output a character */
-#if defined(M_PROTO)
void realoutchar(M_WCHAR textchar, FILE *outfile)
-#else
-void realoutchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
{
rshnewclear();
if (! abbrev || fabbrev)
/* Save a character in the array used to store table of contents entries
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)
-#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 */
unsigned char index;
}
-#if defined(M_PROTO)
void mb_shchar(char textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
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;
}
/* Process a character in a term */
-#if defined(M_PROTO)
void termchar(M_WCHAR textchar)
-#else
-void termchar(textchar)
-M_WCHAR textchar;
-#endif
{
if (termp - term >= MAXTERM)
{
/* Save a cross-reference ID and associated expansion */
-#if defined(M_PROTO)
void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
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
-{
+s{
struct xref *old;
struct xref *xref;
char *buffer;
}
/* 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)
-#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;
M_PARSE *stackp;
}
/* Output a start-string or end-string */
-#if defined(M_PROTO)
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];
int i, par;
#include "parser.h"
#include "entext.h"
-#if defined(M_PROTO)
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 *ancestor[M_NAMELEN + 1] ;
#include "entext.h"
/* Process the name in a usemap delaration */
-#if defined(M_PROTO)
void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
- M_WCHAR *name ;
- LOGICAL useoradd ;
-#endif
{
int mapid ;
}
/* Issue error message (one argument) */
-#if defined(M_PROTO)
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;
}
-#if defined(M_PROTO)
void m_mberr1(
const char *text,
const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg;
-#endif
{
M_WCHAR *wc_arg;
}
/* Issue error message (two arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
-#endif
{
char *buffer;
char *mb_arg1,*mb_arg2;
}
/* Issue error message (three arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
- M_WCHAR *arg3;
-#endif
{
char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3;
}
/* Issue error message (four arguments) */
-#if defined(M_PROTO)
void m_err4(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg2,
M_WCHAR *arg3,
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 *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
}
/* Issue error message (five arguments) */
-#if defined(M_PROTO)
void m_err5(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg3,
M_WCHAR *arg4,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
}
/* Issue error message (six arguments) */
-#if defined(M_PROTO)
void m_err6(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg4,
M_WCHAR *arg5,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
}
/* Issue error message (seven arguments) */
-#if defined(M_PROTO)
void m_err7(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg5,
M_WCHAR *arg6,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
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
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 )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
{
M_ELEMENT eltid ;
int par ;
}
/* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
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 &&
m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
/* Temporary pointers to parameter values. Used while scanning start tag
before element is placed on parse stack.*/
M_PAREXTERN
-#if defined M_PROTO
-#endif
M_WCHAR *m_poccur[
#if defined(M_PARDEF)
M_MAXPAR ? M_MAXPAR : 1
/* Function callable by interface designers. Returns TRUE if specified value
is a legal value for the indicated parameter of the given element,
FALSE otherwise. */
-#if defined(M_PROTO)
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 ;
int par ;
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: proto.h /main/3 1995/11/08 11:30:37 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void m_attval(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL neednet
-#endif
- ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
- M_WCHAR *name, LOGICAL useoradd
-#endif
- ) ;
-
-void m_closent(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
- int m_ent
-#endif
- ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
- LOGICAL init, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
- M_ELEMENT c
-#endif
- ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
- M_ENTITY *openent
-#endif
- ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err4(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5
-#endif
- ) ;
-
-void m_err6(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
- ) ;
-
-void m_err7(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
- M_ELEMENT elt
-#endif
- ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
- ) ;
-
-void m_expline(
-#if defined(M_PROTO)
- LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
- ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_PARSE *stackptr
-#endif
- ) ;
-
-int m_findact(
-#if defined(M_PROTO)
- M_ELEMENT elt, int *array
-#endif
- ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
- M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
- LOGICAL wild
-#endif
- ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
- const char *elt, const char *param, const M_WCHAR *value
-#endif
- ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
- M_STATE from, int *newleft
-#endif
- ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
- M_MIN *min
- , char *msg
-#endif
- ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
- int srlen, int context
-#endif
- ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
- M_HOLDTYPE *dchar
-#endif
- ) ;
-
-int m_getc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
- int n, LOGICAL *flag
-#endif
- ) ;
-
-void m_getline(
-#if defined(M_PROTO)
- M_WCHAR **file, int *line
-#endif
- ) ;
-
-void m_getname(
-#if defined(M_PROTO)
- M_WCHAR first
-#endif
- ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
- int *c, M_HOLDTYPE *dchar, int context
-#endif
- ) ;
-
-void m_globes(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_globss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_level(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
- char *elt
-#endif
- ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-void m_longent(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
- M_WCHAR *name, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
- ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
- M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
- ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
- int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
- unsigned char type
-#endif
- ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
- M_WCHAR *entcontent
-#endif
- ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
- ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
- M_WCHAR *elt, int n
-#endif
- ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
- char *elt, int n
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
- int par, M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
- ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
- M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
- ) ;
-
-void m_pop(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_push(
-#if defined(M_PROTO)
- M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
- ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
- void *data, int n
-#endif
- ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
-
-int m_scan(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
- int map, LOGICAL useoradd
-#endif
- ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
- M_WCHAR **cvar, int par
-#endif
- ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
- M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
- ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
- int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
- ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
- int scanval
-#endif
- ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
- M_ELEMENT scanval
-#endif
- ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL net
-#endif
- ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
- M_WCHAR m_textchar
-#endif
- ) ;
-
-void m_textout(
-#if defined(M_PROTO)
- char *format, LOGICAL start, LOGICAL end
-#endif
- ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
- M_ELEMENT label, LOGICAL recur
-#endif
- ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
- M_WCHAR *delim, LOGICAL flag
-#endif
- ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
- ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#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
- ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+int m_actgetc(M_NOPAR);
+
+void m_adjuststate(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(M_NOPAR);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(M_NOPAR);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(M_NOPAR);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(M_NOPAR);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(M_NOPAR);
+
+void m_exit(int status);
+
+void m_etcomplete(M_NOPAR);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(M_NOPAR);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(M_NOPAR);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
+ LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min, char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(M_NOPAR);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(M_NOPAR);
+
+void m_globss(M_NOPAR);
+
+void m_holdproc(M_NOPAR);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(M_NOPAR);
+
+void m_initialize(M_NOPAR);
+
+void m_lastchars(M_NOPAR);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+void main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
+ unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(M_NOPAR);
+
+LOGICAL m_omitend(M_NOPAR);
+
+LOGICAL m_omitstart(M_NOPAR);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(M_NOPAR);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(M_NOPAR);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(M_NOPAR);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(M_NOPAR);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(M_NOPAR);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(M_NOPAR);
+
+void m_signmsg(char *p);
+
+void m_sigre(M_NOPAR);
+
+void m_startdoc(M_NOPAR);
+
+void m_startmsg(M_NOPAR);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(M_NOPAR);
+
+void m_stkdefaultparams(M_NOPAR);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(M_NOPAR);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(M_NOPAR);
+
+M_WCHAR *m_thisfile(M_NOPAR);
+
+int m_thisline(M_NOPAR);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(M_NOPAR);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Reads a name token */
-#if defined(M_PROTO)
void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
- M_WCHAR first ;
-#endif
{
M_WCHAR *p ;
M_HOLDTYPE dchar ;
}
/* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
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 (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
/* Have found one character in a possible short reference delimiter.
Prepare to look for the next one */
-#if defined(M_PROTO)
void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
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 ;
char mb_re,mb_seqchar, mb_rschar;
/* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
- int map ;
- LOGICAL useoradd ;
-#endif
{
int i ;
int sref ;
/* Returns a context-dependent delimiter string to input stream so
characters can be reread one at a time in another context */
-#if defined(M_PROTO)
void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
- M_WCHAR *delim ;
- LOGICAL flag ;
-#endif
{
M_WCHAR *p ;
/* 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
may be in the expansion of an entity*/
-#if defined(M_PROTO)
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] ;
int length;
/* Include generated code */
#include "stfile.c"
-#if defined(M_PROTO)
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_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
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
elements as well. */
-#if defined(M_PROTO)
LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
- M_ELEMENT val ;
- LOGICAL neednet ;
- #endif
{
M_PARSE *stackptr ;
M_OPENFSA *fsastack ;
/* Pushes a new item onto the parse stack, setting its element, current,
and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
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 ;
}
/* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
- M_ELEMENT val ;
- LOGICAL net ;
-#endif
{
m_transition(val, TRUE) ;
if (val) {
/* Returns TRUE iff LABEL allowed in the current state of the current
element (without expanding any minimization). May result in changes
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)
-#else
-LOGICAL m_transition(label, recur)
- M_ELEMENT label ;
- LOGICAL recur ;
-#endif
{
M_ARC parc ;
M_OPENFSA *newfsa ;
#include "tfile.c"
/* When a text character occurs */
-#if defined(M_PROTO)
void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
- M_WCHAR m_textchar ;
- #endif
{
char buffer[10] ;
char mb_re;
*/
#include "basic.h"
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
/* Test if a string contains only white space characters */
-#if defined(M_PROTO)
LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
/* For function prototypes */
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
-#else
-#define M_PROTO
+
#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
-
-int w_strcmp(
-#if defined(M_PROTO)
- const M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
- );
-
-int w_strlen(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
- M_WCHAR *string, const M_WCHAR chr
-#endif
- );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
- M_WCHAR *string1, M_WCHAR *string2
-#endif
- );
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
#define CONTINIT(a)
#endif
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpdlmptr(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void dumpdlmptr(M_NOPAR);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
-void dumptree(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void dumptree(LOGICAL sparse);
-void enterdelim(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void enterdelim(int n);
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_error(char *text);
-void m_err1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void m_err1(char *text, char *arg);
-void getcode(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void getcode(int n);
-void getcolon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void getcolon(M_NOPAR);
-int getcontext(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+int getcontext(M_NOPAR);
-LOGICAL getdname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+LOGICAL getdname(M_NOPAR);
-void inccon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void inccon(M_NOPAR);
-void incdelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void incdelim(M_NOPAR);
-void loaddelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void loaddelim(M_NOPAR);
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+void main(int argc, char **argv);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void nextcon(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void nextcon(LOGICAL sparse);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
-void printval(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
+void printval(FILE *file, M_TRIE *value);
-void prtctxt(
-#if defined(M_PROTO)
- int column, int value
-#endif
- ) ;
+void prtctxt(int column, int value);
-int readchar(
-#if defined(M_PROTO)
- LOGICAL cap
-#endif
- ) ;
+int readchar(LOGICAL cap);
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void skiptoend(M_NOPAR);
-void unread(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+void unread(int c);
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void warning(char *text);
-void warning1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void warning1(char *text, char *arg);
-void warning2(
-#if defined(M_PROTO)
- char *text, char *arg1, char *arg2
-#endif
- ) ;
+void warning2(char *text, char *arg1, char *arg2);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
#define NOMORE -1
}
/* Output the generated data structures */
-#if defined(M_PROTO)
void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
- LOGICAL sparse;
-#endif
{
int i, count = 0;
}
/* Output transition matrix */
-#if defined(M_PROTO)
void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
- LOGICAL sparse;
-#endif
{
int i, j;
int firstinrow;
/* Read the next input character */
-#if defined(M_PROTO)
int readchar(LOGICAL cap)
-#else
-int readchar(cap)
- LOGICAL cap;
-#endif
{
int c;
M_WCHAR wnl;
#endif
#include "basic.h"
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void main(argc, argv)
- int argc ;
- char **argv ;
+void main(int argc, char **argv)
{
if (argc != 2) {
fprintf(stderr, "Usage: emptyfil filename\n") ;
/* Entout has procedures to write generated entity TRIE */
-void entptr(
-#if defined(M_PROTO)
- M_ENTITY *data
-#endif
- ) ;
+void entptr(M_ENTITY *data);
-char *typetype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+char *typetype(int n);
-char *typewhere(
-#if defined(M_PROTO)
- unsigned char n
-#endif
- ) ;
+char *typewhere(unsigned char n);
/* Macro names written to output file */
char xdbuild[] = "M_DBUILD" ;
}
/* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
- unsigned char n ;
-#endif
{
switch(n) {
case M_DBUILD: return(xdbuild) ;
extern int m_line ;
extern LOGICAL errexit ;
-void eprefix(
-#if defined(M_PROTO)
- LOGICAL flag
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
- M_WCHAR *arg5
-#endif
- ) ;
-
-void esuffix(
-#if defined(M_PROTO)
- void
-#endif
- ) ;
-
-void msgline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void msg1line(
-#if defined(M_PROTO)
- char *text, char *arg1
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *text
-#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
- ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(M_NOPAR);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
/* Write error message prefix */
-#if defined(M_PROTO)
void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
- LOGICAL flag ;
-#endif
{
if (flag) errexit = TRUE ;
fprintf(stderr, "\n**** ") ;
/* Writes an error message with one argument to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
- char *text;
- M_WCHAR *arg ;
-#endif
{
char *mb_arg;
m_free(mb_arg,"multi-byte string");
}
-#if defined(M_PROTO)
void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg ;
-#endif
{
eprefix(TRUE) ;
fprintf(stderr, text, arg) ;
/* Writes an error message with two arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with three arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with five arguments to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
/* Writes a nonfatal error message with one argument to standard error
and file "error" */
-#if defined(M_PROTO)
void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
{
char *mb_arg;
/* Writes a nonfatal error message with two arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with three arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with four arguments to standard error
and file "error" */
-#if defined(M_PROTO)
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
#endif
#include "basic.h"
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
/* Exit function called by utilities used in PARSER and other programs in
the MARKUP system */
char linedir[] = "#line" ;
char *p = linedir, *q = linedir + 1 ;
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+void main(int argc, char **argv);
-void copyfile(
-#if defined(m_proto)
- char *pfile1, char *pfile2
-#endif
- ) ;
+void copyfile(char *pfile1, char *pfile2);
-int nextchar(
-#if defined (M_PROTO)
- FILE *file, struct data *data
-#endif
- ) ;
+int nextchar(FILE *file, struct data *data);
void main(argc, argv)
int argc ;
#endif
#include "basic.h"
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const char *arg
-#endif
- ) ;
+void m_err1(const char *text, const char *arg);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
+void m_inctest(int *count, int limit, char *message);
/* Increment a count and test against a limit */
void m_inctest(count, limit, message)
#include "common.h"
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)
{
#include <string.h>
#include "basic.h"
-char *m_itoa(
-#if defined(M_PROTO)
- int n, char *s
-#endif
- ) ;
+char *m_itoa(int n, char *s);
-void reverse(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+void reverse(char *s);
char *m_itoa(n, s) /* convert n to characters in s */
char s[];
#include "basic.h"
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-#if defined(M_PROTO)
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) ;
return(FALSE) ;
#include "basic.h"
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-
-
/* Force a letter to lowercase */
-int m_lower(c)
- int c ;
+int m_lower(int c)
{
if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ;
return(c) ;
extern LOGICAL m_heapchk ;
extern LOGICAL m_malftrace ;
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_errline(char *text);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
+void m_free(void *block, char *msg);
-void m_heapdump(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void m_heapdump(M_NOPAR);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
+void *m_realloc(void *ptr, int size, char *msg);
-void *m_trace(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void *m_trace(char *text);
-void *m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
+void *m_wctrace(M_WCHAR *text);
void m_free(block, msg)
void *block ;
extern FILE *m_errfile ;
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
/* Open a file and check that the open succeeded */
-void m_openchk(ptr, name, mode)
- FILE **ptr ;
- char *name, *mode ;
+void m_openchk(FILE **ptrm, char *name, char *mode)
{
*ptr = fopen(name, mode) ;
if (*ptr) return ;
/* 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
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 )
-#else
-M_WCHAR *m_partype(par, string)
- int par ;
- M_WCHAR *string ;
-#endif /* M_PROTO */
{
LOGICAL first = TRUE ;
int kw ;
#if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j)
-int m_sprscon(
-#if defined(M_PROTO)
- int i, int j
-#endif
- ) ;
+int m_sprscon(int i, int j);
#else
#define m_newcon(i, j) m_nextcon[i][j]
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void m_entercharintrie(
-#if defined(M_PROTO)
- M_TRIE **currentnode, M_WCHAR c
-#endif
- ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
/* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
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_lookfortrie(p, xtrie) looks for string p in the specified trie,
returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
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 ;
}
/* Enters a string and associated data value into a trie */
-void *m_ntrtrie(p, xtrie, dataval)
- M_WCHAR *p ;
- M_TRIE *xtrie ;
- void *dataval ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval)
{
M_TRIE *currentnode ;
void *n ;
} ;
-M_TRIE *m_gettrienode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+M_TRIE *m_gettrienode(M_NOPAR);
-void *m_lookfortrie(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_TRIE *xtrie
-#endif
- ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
-void *m_ntrtrie(
-#if defined(M_PROTO)
- M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
- ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
-void *m_resettrie(
-#if defined(M_PROTO)
- M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
- ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void printval(
-#if defined(M_PROTO)
- FILE *file, void *value
-#endif
- ) ;
+void printval(FILE *file, void *value);
/* Count the descendants of a node in order to generate declarations for
the packed form of a trie*/
FILE *file ;
M_TRIE *trieptr ;
int *count ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value);
{
M_TRIE *p ;
int savecount ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *xtrie, char *extname, int *count,
- void (*proc)(void *value)
-#endif
- ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+ void (*proc)(void *value));
/* Write the C declaration of a trie */
void m_dumptrie(file, xtrie, extname, count, proc)
M_TRIE *xtrie ;
char *extname ;
int *count ;
- void (*proc)(
-#if defined(M_PROTO)
- void *value
-#endif
- ) ;
+ void (*proc)(void *value);
{
int firstson ;
M_TRIE *p ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)(FILE *file, void *value));
/* Write the declaration of a packed trie to the specified files */
void dumpptrie(intname, extname, file, externdef, defdef, proc)
FILE *file ;
char *externdef ;
char *defdef ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value);
{
LOGICAL first = TRUE ;
int count = 0 ;
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie,
- M_WCHAR *name
-#endif
- ) ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
/* Look for the string NAME in the packed trie PTRIE */
-int m_packedlook(xptrie, name)
-M_PTRIE *xptrie ;
-M_WCHAR *name ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name)
{
int current = 0 ;
int i ;
#include "common.h"
extern M_CHARTYPE m_ctarray[256] ;
-int m_wcupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_WCHAR *q
-#endif
- ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const char *q
-#endif
- ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
- const char *p, const char *q
-#endif
- ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
-#if defined(M_PROTO)
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 {
if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
return(0) ;
}
-#if defined(M_PROTO)
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;
int retval;
return retval;
}
-#if defined(M_PROTO)
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;
int retval;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-int m_upper(c)
- int c ;
+int m_upper(int c)
{
if (c >= 'a' && c <= 'z') c += 'A' - 'a' ;
return(c) ;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-int m_upstrcmp(
-#if defined(M_PROTO)
- char *p, char *q
-#endif
- ) ;
+int m_upstrcmp(char *p, char *q);
int m_upstrcmp(p, q)
char *p, *q ;
/* compare two wide character strings */
-#if defined(M_PROTO)
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;
/* copy a wide character string */
-#if defined(M_PROTO)
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;
/* 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)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int max;
-#endif
{
M_WCHAR *string1start;
/* get the length of a wide character string */
-#if defined(M_PROTO)
int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
{
int length;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
{
char *mb_string;
int length;
/* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
#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 */
-#if defined(M_PROTO)
LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
- M_WCHAR c ;
-#endif
{
char mb_c[32]; /* arbitrarily large */
int length;
BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
+M_WCHAR *MakeWideCharString(const char *from);
/* Addarc adds an arc from FSA state <from> to state <to> setting other
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)
-#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 ;
int determ ;
/* Saves the name of an element appearing on the left-hand side of a
grammar rule */
-#if defined(M_PROTO)
void savelhs(LOGICAL param)
-#else
-void savelhs(param)
- LOGICAL param ;
-#endif
{
STATE *end ;
ELTSTRUCT *errelt ;
/* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
int len ;
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
int i, ret ;
}
/* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
{
PTYPE *kw ;
int keycount ;
/* Proto.h contains function prototypes for program BUILD. */
-int addarc(
-#if defined(M_PROTO)
- STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
- int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void adddefent(
-#if defined(M_PROTO)
- M_WCHAR *mapname
-#endif
- ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
- M_WCHAR *name
-#endif
- ) ;
-
-void addex(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
- M_WCHAR *p, LOGICAL define
-#endif
- ) ;
-
-void addndent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void addpar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addsref(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void checkand(
-#if defined(M_PROTO)
- ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
- ELTSTRUCT **errelt
-#endif
- ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
- STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
- ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
- STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
- STATELIST *from, STATELIST **to
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void defmapname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-char *deftype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void dellist(
-#if defined(M_PROTO)
- STATELIST **list
-#endif
- ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
- FILE *file,
- M_TRIE *value
-#endif
- ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)( FILE *, M_TRIE *)
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
+ int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(M_NOPAR);
+
+void addkeyword(M_NOPAR);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(M_NOPAR);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
+ ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(M_NOPAR);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(M_NOPAR);
+
+void done(M_NOPAR);
+
+void dumpentnode(FILE *file, M_TRIE *value);
+
+void dumpmapnode(FILE *file, M_TRIE *value);
+
+void dumpsrefnode(FILE *file,
+ M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
- FILE *tempfile
-#endif
- ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endmodel(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-char *enttype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void exout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freetree(
-#if defined(M_PROTO)
- TREE *ruletree
-#endif
- ) ;
-
-void found(
-#if defined(M_PROTO)
- LOGICAL *flag, char *delim
-#endif
- ) ;
-
-void fsa(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-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
- ) ;
+ void (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(M_NOPAR);
+
+void endmodel(M_NOPAR);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+ANDGROUP *getand(M_NOPAR);
+
+LOGICAL getname(int first);
+
+STATE *getstate(M_NOPAR);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(M_NOPAR);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(M_NOPAR);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(M_NOPAR);
+
+void prulend(M_NOPAR);
+
+void push(M_NOPAR);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(M_NOPAR);
+
+void rulend(M_NOPAR);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(M_NOPAR);
+
+int scan(M_NOPAR);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(M_NOPAR);
+
+int m_sprscon(int i, int j);
+
+void srefout(M_NOPAR);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(M_NOPAR);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Add a short reference map name */
-#if defined(M_PROTO)
LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
{
MAP *old;
MAP *new;
/* 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)
-#else
-void closeiffile(flag, file, count, table, proto)
- LOGICAL flag;
- FILE *file;
- int count;
- char *table;
- char *proto;
-#endif
{
int i;
endcode(flag, file);
if (count) {
fprintf(file,
- "void (*m_%stable[])(\n#if defined(M_PROTO)\n %s\n#endif\n ) = {\n",
+ "void (*m_%stable[])(%s) = {\n",
table, proto);
fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n",
table);
}
else
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);
fclose(file);
}
}
/* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
- LOGICAL flag;
- FILE *file;
-#endif
{
if (flag) fprintf(file, "}}\n\n");
}
*flag = TRUE;
/* protoype */
fprintf(file,
- "void m_%s%d(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n",
+ "void m_%s%d(%s);\n",
prefix,
caseno,
proto);
/* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-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);
+fprintf(file, "void m_%s%d(%s)\n {\n", prefix, caseno, proto);
for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
{
/* Proto.h contains function prototypes for program ELTDEF. */
-void actptrout(
-#if defined(M_PROTO)
- ACTION **array, char *name
-#endif
- ) ;
-
-void addent(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void cvalue(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
+void actptrout(ACTION **array, char *name);
+
+void addent(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(M_NOPAR);
+
+
+void done(M_NOPAR);
+
+void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void endcode(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file
-#endif
- ) ;
-
-void endini(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-void enttype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#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(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freechain(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int *getaction(
-#if defined(M_PROTO)
- ACTION **array
-#endif
- ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void outpval(
-#if defined(M_PROTO)
- M_TRIE *p
-#endif
- ) ;
-
-void outstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-int scan(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void startcode(
-#if defined(M_PROTO)
- int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
- char *formal, char *formtype
-#endif
- ) ;
-
-void startelement(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storecvar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storepname(
-#if defined(M_PROTO)
- M_NOPAR
-#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 value(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void warning1(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+ void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(M_NOPAR);
+
+void endsignon(M_NOPAR);
+
+void endstring(M_NOPAR);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(M_NOPAR);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(M_NOPAR);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(M_NOPAR);
+
+void skiptoend(M_NOPAR);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+ char *formal, char *formtype);
+
+void startelement(M_NOPAR);
+
+void storecvar(M_NOPAR);
+
+void storepname(M_NOPAR);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
#include "userinc.h"
#include "globdec.h"
-#if defined(M_PROTO)
int vextextsize(const M_WCHAR *keyword)
-#else
-int vextextsize(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NORMAL;
return NORMAL;
}
-#if defined(M_PROTO)
int vgloss(const M_WCHAR *keyword)
-#else
-int vgloss(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return GLOSS;
return GLOSS;
}
-#if defined(M_PROTO)
int vcenter(const M_WCHAR *keyword)
-#else
-int vcenter(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return CENTER;
return CENTER;
}
-#if defined(M_PROTO)
int vnumber(const M_WCHAR *keyword)
-#else
-int vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NONUMBER;
return NONUMBER;
}
-#if defined(M_PROTO)
LOGICAL vstack(const M_WCHAR *keyword)
-#else
-LOGICAL vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return FALSE;
return FALSE;
}
-#if defined(M_PROTO)
int vordertype(const M_WCHAR *keyword)
-#else
-int vordertype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return ARABIC;
return ARABIC;
}
-#if defined(M_PROTO)
int vspacing(const M_WCHAR *keyword)
-#else
-int vspacing(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return LOOSE;
return LOOSE;
}
-#if defined(M_PROTO)
int vlonglabel(const M_WCHAR *keyword)
-#else
-int vlonglabel(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return WRAP;
return WRAP;
}
-#if defined(M_PROTO)
int vtype(const M_WCHAR *keyword)
-#else
-int vtype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return BULLET;
/* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
/* Function prototypes for HP Tag/TeX translator */
-void assert_hometopic_exists(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void assert_hometopic_exists(M_NOPAR);
/* osf has basename() defined in system header file, change
* basename() to fbasename(). --XPG4 standard.
*/
-void fbasename(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void chapstart(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-void checkgloss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *checkid(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-void checkmsghead (
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void dumpxref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void echohead(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void mb_echohead(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void endhead(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void esoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void vexoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void exoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void imoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-int getqualified (
-#if defined(M_PROTO)
- M_WCHAR *qualname, M_WCHAR *unqualname
-#endif
- ) ;
-
-void handle_link_and_graphic(
-#if defined(M_PROTO)
- M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
- M_WCHAR *glinktype, M_WCHAR *gdescription
-#endif
- );
-
-void idstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void indexchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void Item(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-char *m_itoa(
-#if defined(M_PROTO)
- int n, char *s
-#endif
- ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-void loadxref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-void options(
-#if defined(M_PROTO)
- LOGICAL filelenonly
-#endif
- ) ;
-
-void outchar(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
-
-void outpi(
-#if defined(M_PROTO)
- int enttype, M_WCHAR *pi, M_WCHAR *entname
-#endif
- ) ;
-
-void realoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
-
-void rsectstart(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-void rseqend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *searchforfile(
-#if defined(M_PROTO)
- M_WCHAR *file
-#endif
- ) ;
-
-void setid(
-#if defined(M_PROTO)
- M_WCHAR *id,
+void fbasename(M_NOPAR);
+
+void chapstart(M_WCHAR *id);
+
+void checkgloss(M_NOPAR);
+
+M_WCHAR *checkid(M_WCHAR *id);
+
+void checkmsghead (M_NOPAR);
+
+void dumpxref(M_NOPAR);
+
+void echohead(M_WCHAR *p);
+
+void mb_echohead(char *p);
+
+void endhead(M_NOPAR);
+
+void esoutchar(M_WCHAR textchar);
+
+void vexoutchar(M_WCHAR textchar);
+
+void exoutchar(M_WCHAR textchar);
+
+void imoutchar(M_WCHAR textchar);
+
+int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
+
+void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
+ M_WCHAR *glinktype, M_WCHAR *gdescription);
+
+void idstring(M_WCHAR *string);
+
+void indexchar(M_WCHAR textchar);
+
+void Item(M_WCHAR *id);
+
+char *m_itoa(int n, char *s);
+
+LOGICAL m_letter(M_WCHAR c);
+
+void loadxref(M_NOPAR);
+
+int m_lower(int c);
+
+void options(LOGICAL filelenonly);
+
+void outchar(M_WCHAR textchar, FILE *outfile );
+
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
+
+void realoutchar(M_WCHAR textchar, FILE *outfile);
+
+void rsectstart(M_WCHAR *id);
+
+void rseqend(M_NOPAR);
+
+M_WCHAR *searchforfile(M_WCHAR *file);
+
+void setid(M_WCHAR *id,
LOGICAL where,
LOGICAL csensitive,
LOGICAL inchapter,
char *chapter,
M_WCHAR *xrffile,
int xrfline,
- LOGICAL xrefable
-#endif
- ) ;
-
-void setopt(
-#if defined(M_PROTO)
- char *string, LOGICAL filelenonly
-#endif
- ) ;
-
-LOGICAL setvalopt(
-#if defined(M_PROTO)
- int thisopt, char *string, LOGICAL filelenonly
-#endif
- ) ;
-
-void shchar(
-#if defined(M_PROTO)
- M_WCHAR textchar,
+ LOGICAL xrefable );
+
+void setopt(char *string, LOGICAL filelenonly);
+
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
+
+void shchar(M_WCHAR textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void mb_shchar(
-#if defined(M_PROTO)
- char textchar,
+void mb_shchar(char textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void shstring(
-#if defined(M_PROTO)
- M_WCHAR *addstring,
+void shstring(M_WCHAR *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void mb_shstring(
-#if defined(M_PROTO)
- char *addstring,
+void mb_shstring(char *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void starthelpnode(
-#if defined(M_PROTO)
- M_WCHAR *ssi,
+void starthelpnode(M_WCHAR *ssi,
M_WCHAR *id,
- int level
-#endif
- ) ;
+ int level);
-void mb_starthelpnode(
-#if defined(M_PROTO)
- char *ssi,
+void mb_starthelpnode(char *ssi,
char *id,
- int level
-#endif
- ) ;
-
-void StartLabList(
-#if defined(M_PROTO)
- M_WCHAR *spacing,
- M_WCHAR *longlabel
-#endif
- ) ;
-
-void StartList(
-#if defined(M_PROTO)
- M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont
-#endif
- ) ;
-
-void EndList(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void strcode(
-#if defined(M_PROTO)
- M_WCHAR *string, FILE *outfile
-#endif
- ) ;
-
-void mb_strcode(
-#if defined(M_PROTO)
- char *string, FILE *outfile
-#endif
- ) ;
-
-char *strstr(
-#if defined(M_PROTO)
- const char *s1, const char *s2
-#endif
- ) ;
-
-void svhdstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void svtcstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void termchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void termpi(
-#if defined(M_PROTO)
- int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname
-#endif
- ) ;
-
-void texinit(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int vextextsize(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vgloss(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vcenter(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vnumber(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-LOGICAL vstack(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vordertype(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vlonglabel(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vspacing(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vtype(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-void xrefexpand(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-char *GetDefaultHeaderString(
-#if defined(M_PROTO)
- char *elementName,
+ int level);
+
+void StartLabList(M_WCHAR *spacing,
+ M_WCHAR *longlabel);
+
+void StartList(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
+
+void EndList(M_NOPAR);
+
+void strcode(M_WCHAR *string, FILE *outfile);
+
+void mb_strcode(char *string, FILE *outfile);
+
+char *strstr(const char *s1, const char *s2);
+
+void svhdstring(M_WCHAR *string);
+
+void svtcstring(M_WCHAR *string);
+
+void termchar(M_WCHAR textchar);
+
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
+
+void texinit(M_NOPAR);
+
+int vextextsize(const M_WCHAR *keyword);
+
+int vgloss(const M_WCHAR *keyword);
+
+int vcenter(const M_WCHAR *keyword);
+
+int vnumber(const M_WCHAR *keyword);
+
+LOGICAL vstack(const M_WCHAR *keyword);
+
+int vordertype(const M_WCHAR *keyword);
+
+int vlonglabel(const M_WCHAR *keyword);
+
+int vspacing(const M_WCHAR *keyword);
+
+int vtype(const M_WCHAR *keyword);
+
+void xrefexpand(M_WCHAR *id);
+
+int m_upper(int c);
+
+char *GetDefaultHeaderString(char *elementName,
unsigned char desiredType,
- char *defaultString
-#endif
- ) ;
-
-
-void SetDefaultLocale(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
-
-void paragraph(
-#if defined(M_PROTO)
- M_WCHAR *indent,
+ char *defaultString);
+
+
+void SetDefaultLocale(M_NOPAR);
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+void paragraph(M_WCHAR *indent,
M_WCHAR *id,
M_WCHAR *gentity,
M_WCHAR *gposition,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
- M_WCHAR *gdescription
-#endif
- );
+ M_WCHAR *gdescription);
-void figure(
-#if defined(M_PROTO)
- M_WCHAR *number,
+void figure( M_WCHAR *number,
M_WCHAR *tonumber,
M_WCHAR *id,
M_WCHAR *file,
M_WCHAR *cappos,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
- M_WCHAR *gdescription
-#endif
- );
+ M_WCHAR *gdescription);
-void endterm(
-#if defined(M_PROTO)
- M_WCHAR *base,
+void endterm( M_WCHAR *base,
M_WCHAR *gloss,
- char *linktype
-#endif
- );
-
-M_WCHAR wc_toupper(
-#if defined(M_PROTO)
- M_WCHAR wc
-#endif
- );
-
-M_WCHAR *wc_stringtoupper(
-#if defined(M_PROTO)
- M_WCHAR *wcp
-#endif
- );
-
-int NextId(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
-);
-
-char *GetLanguage(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
-);
-
-char *GetCharset(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
-);
-
-void HandleLink(
-#if defined(M_PROTO)
- M_WCHAR *hyperlink,
+ char *linktype);
+
+M_WCHAR wc_toupper( M_WCHAR wc);
+
+M_WCHAR *wc_stringtoupper( M_WCHAR *wcp);
+
+int NextId(M_NOPAR);
+
+char *GetLanguage(M_NOPAR);
+
+char *GetCharset(M_NOPAR);
+
+void HandleLink( M_WCHAR *hyperlink,
M_WCHAR *type,
- M_WCHAR *description
-#endif
- );
-
-char *mb_realloc(
-#if defined(M_PROTO)
- char *ptr, long size
-#endif
- );
-
-char *mb_malloc(
-#if defined(M_PROTO)
- long size
-#endif
- );
-
-void mb_free(
-#if defined(M_PROTO)
- char **pptr
-#endif
- );
-
-void Add2ToRowVec(
-#if defined(M_PROTO)
- int *length, char **rowvec, char *id1, char *id2
-#endif
- );
-
-void StartEx(
-#if defined(M_PROTO)
-M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize
-#endif
- );
-
-void EndEx(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-void StartNCW(
-#if defined(M_PROTO)
- char *which
-#endif
- );
-
-void StartBlock(
-#if defined(M_PROTO)
- char *pclass, char *ssi, char *id
-#endif
- );
-
-void AddToSNB(
-#if defined(M_PROTO)
- char *id, char *iconName
-#endif
- );
-
-void StartNCWtext(
-#if defined(M_PROTO)
- char *which, char *iconFile, char *headingString
-#endif
- );
-
-void IncludeToss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-M_WCHAR *CycleEnt(
-#if defined(M_PROTO)
- LOGICAL init,
+ M_WCHAR *description);
+
+char *mb_realloc( char *ptr, long size);
+
+char *mb_malloc( long size);
+
+void mb_free( char **pptr);
+
+void Add2ToRowVec( int *length, char **rowvec, char *id1, char *id2);
+
+void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize);
+
+void EndEx(M_NOPAR);
+
+void StartNCW(char *which);
+
+void StartBlock(char *pclass, char *ssi, char *id);
+
+void AddToSNB(char *id, char *iconName);
+
+void StartNCWtext(char *which, char *iconFile, char *headingString);
+
+void IncludeToss(M_NOPAR);
+
+M_WCHAR *CycleEnt( LOGICAL init,
unsigned char *type,
M_WCHAR ***content,
- unsigned char *wheredef
-#endif
- );
-
-void ModifyEntities(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-void PushForm(
-#if defined(M_PROTO)
- char *class,
+ unsigned char *wheredef);
+
+void ModifyEntities(M_NOPAR);
+
+void PushForm(char *class,
char *ssi,
- char *id
-#endif
- ) ;
+ char *id);
-void PushForm2(
-#if defined(M_PROTO)
- char *class,
+void PushForm2(char *class,
char *ssi,
char *id1,
- char *id2
-#endif
- ) ;
-
-void PopForm(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void PopForm2(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void PopFormMaybe(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void EmitSavedAnchors(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void CloseVirpage(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+ char *id2);
+
+void PopForm(M_NOPAR);
+
+void PopForm2(M_NOPAR);
+
+void PopFormMaybe(M_NOPAR);
+
+void EmitSavedAnchors(M_NOPAR);
+
+void CloseVirpage(M_NOPAR);
/* construct a qualified file name */
-#if defined(M_PROTO)
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)
}
/* Process an item in a list */
-#if defined(M_PROTO)
void Item(M_WCHAR *id)
-#else
-void Item(id)
-M_WCHAR *id;
-#endif
{
char orderString[32];
static char *ROMAN0[] =
/* Start a new helpnode */
-#if defined(M_PROTO)
void starthelpnode(M_WCHAR *ssi,
M_WCHAR *id,
int level)
-#else
-void starthelpnode(ssi, id, level)
-M_WCHAR *ssi;
-M_WCHAR *id;
-int level;
-#endif
{
int i;
char *mbyte, *mb_ssi;
} /* End starthelpnode(id) */
-#if defined(M_PROTO)
void mb_starthelpnode(char *ssi,
char *id,
int level)
-#else
-void mb_starthelpnode(ssi, id, level)
-char *ssi;
-char *id;
-int level;
-#endif
{
M_WCHAR *wc_ssi, *wc_id;
/* Start a list */
-#if defined(M_PROTO)
void StartList(M_WCHAR *type,
M_WCHAR *order,
M_WCHAR *spacing,
M_WCHAR *cont)
-#else
-void StartList(type, order, spacing, cont)
-M_WCHAR *type, *order, *spacing, *cont;
-#endif
{
LIST *nextlist;
CONTCHAIN *chain;
the string returned must be m_free'd.
*/
char *
-#if defined(M_PROTO)
GetDefaultHeaderString(
char *elementName,
unsigned char desiredType,
char *defaultString )
-#else
-GetDefaultHeaderString(elementName, desiredType, defaultString)
-char *elementName;
-unsigned char desiredType;
-char *defaultString;
-#endif
{
unsigned char type,wheredef;
M_WCHAR *content;
* standard versions.
*/
static void
-#if defined(M_PROTO)
SetStdLocale(char *pLang, char *pCharset)
-#else
-SetStdLocale(pLang, pCharset)
-char *pLang;
-char *pCharset;
-#endif
{
static const char *cString = "C";
static const char *isoString = "ISO-8859-1";
* fashion.
*/
static char *
-#if defined(M_PROTO)
-GetStdLocale()
-#else
GetStdLocale()
-#endif
{
static char buffer[256];
static char *cString = "C";
}
-#if defined(M_PROTO)
void paragraph(M_WCHAR *indent,
M_WCHAR *id,
M_WCHAR *gentity,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
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;
}
-#if defined(M_PROTO)
void figure(
M_WCHAR *number,
M_WCHAR *tonumber,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
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];
unsigned char etype,wheredef;
m_free(string, "default header string return");
}
-#if defined(M_PROTO)
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 dterm[MAXTERM+1];
if (echo) mb_echohead("++");
}
-#if defined(M_PROTO)
M_WCHAR wc_toupper(M_WCHAR wc)
-#else
-M_WCHAR wc_toupper(wc)
-M_WCHAR wc;
-#endif
{
if ((wc >= 0) && (wc <= 255))
{
return wc;
}
-#if defined(M_PROTO)
M_WCHAR *wc_stringtoupper(M_WCHAR *wcp)
-#else
-M_WCHAR *wc_stringtoupper(wcp)
-M_WCHAR *wcp;
-#endif
{
M_WCHAR *newstring, *nsp;
}
-#if defined(M_PROTO)
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 buffer[BIGBUF];
}
-#if defined(M_PROTO)
char *mb_realloc(char *ptr, long size)
-#else
-char *mb_realloc(ptr, size)
-char *ptr;
-long size;
-#endif
{
void *vptr;
size_t ssize;
}
-#if defined(M_PROTO)
char *mb_malloc(long size)
-#else
-char *mb_malloc(size)
-long size;
-#endif
{
char *cptr;
size_t ssize;
}
-#if defined(M_PROTO)
void mb_free(char **pptr)
-#else
-void *mb_free(pptr)
-char **pptr;
-#endif
{
#if DEBUG_MB_MALLOC
*pptr = NULL;
}
-#if defined(M_PROTO)
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];
int rowVecLen;
}
-#if defined(M_PROTO)
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];
int rowVecLen;
}
-#if defined(M_PROTO)
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);
stackex = vstack(notes);
}
-#if defined(M_PROTO)
-void EndEx()
-#else
-void EndEx()
-#endif
+void EndEx(void)
{
char *annotation;
int annotLen;
}
-#if defined(M_PROTO)
void StartNCW(char *which)
-#else
-void StartNCW(which)
-char *which;
-#endif
{
notehead = FALSE;
PushForm(NULL, which, NULL);
}
-#if defined(M_PROTO)
void StartBlock(char *pclass, char *ssi, char *id)
-#else
-void StartBlock(pclass, ssi, id)
-char *pclass, *ssi, *id;
-#endif
{
char localId[32];
char *realId;
}
-#if defined(M_PROTO)
void StartNCWtext(char *which, char *iconFile, char *headingString)
-#else
-void StartNCWtext(which, iconFile, headingString)
-char *which;
-char *iconFile;
-char *headingString;
-#endif
{
char *icon, *heading;
}
-#if defined(M_PROTO)
void AddToSNB(char *id, char *xid)
-#else
-void AddToSNB(id, xid)
-char *id;
-char *xid;
-#endif
{
char tmpsnb[BIGBUF];
int snblen;
}
-#if defined(M_PROTO)
-void IncludeToss()
-#else
void IncludeToss()
-#endif
{
char pathbuf[BIGBUF];
char *try = pathbuf;
/* Cyclent.c contains procedure m_cyclent(), callable by interface
designers, to cycle through all defined entities, returning information
about them */
-#if defined(M_PROTO)
M_WCHAR *CycleEnt(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 *ancestor[M_NAMELEN + 1] ;
}
-#if defined(M_PROTO)
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 *realId;
}
-#if defined(M_PROTO)
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];
int stackSize;
#define TAGDOTOPT "helptag.opt"
#define DOTOPT ".opt"
-#if defined(M_PROTO)
void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
- LOGICAL filelenonly;
-#endif
{
int i;
FILE *optfile;
/* Set a single option */
/* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int thisopt;
}
/* Process a value for a command line option */
-#if defined(M_PROTO)
LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int i;
/* Process a character in an environment where spaces must be escaped */
-#if defined(M_PROTO)
void esoutchar(M_WCHAR textchar)
-#else
-void esoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
static M_WCHAR wsp = 0;
}
/* Process a character in a verbatim example */
-#if defined(M_PROTO)
void vexoutchar(M_WCHAR textchar)
-#else
-void vexoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
static M_WCHAR wla = 0;
char *holdSaveExSeg;
}
/* Process a character in an example */
-#if defined(M_PROTO)
void exoutchar(M_WCHAR textchar)
-#else
-void exoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
char exbuff[32]; /* arbitrarily large */
int bufflen;
}
/* Process a character in an image paragraph */
-#if defined(M_PROTO)
void imoutchar(M_WCHAR textchar)
-#else
-void imoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
char imbuff[32]; /* arbitrarily large */
int bufflen;
}
/* Write a character to be passed to the index file */
-#if defined(M_PROTO)
void indexchar(M_WCHAR textchar)
-#else
-void indexchar(textchar)
-M_WCHAR textchar;
-#endif
{
if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
{
/* Processes a data character */
-#if defined(M_PROTO)
void outchar(M_WCHAR textchar, FILE *outfile)
-#else
-void outchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
{
M_WCHAR buffer[2];
static M_WCHAR wnl = 0;
/* Really output a character */
-#if defined(M_PROTO)
void realoutchar(M_WCHAR textchar, FILE *outfile)
-#else
-void realoutchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
{
char mb_textchar[32]; /* arbitrarily large */
int length, i;
/* Save a character in the array used to store table of contents entries
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)
-#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 */
unsigned char index;
}
-#if defined(M_PROTO)
void mb_shchar(char textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
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;
}
/* Process a character in a term */
-#if defined(M_PROTO)
void termchar(M_WCHAR textchar)
-#else
-void termchar(textchar)
-M_WCHAR textchar;
-#endif
{
int length;
char mb_textchar[32]; /* arbitrarily large */
/* Save a cross-reference ID and associated expansion */
-#if defined(M_PROTO)
void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
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 *xref;
}
/* 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)
-#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;
M_PARSE *stackp;
}
/* Output a start-string or end-string */
-#if defined(M_PROTO)
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];
int i, par;
#include "parser.h"
#include "entext.h"
-#if defined(M_PROTO)
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 *ancestor[M_NAMELEN + 1] ;
#include "entext.h"
/* Process the name in a usemap delaration */
-#if defined(M_PROTO)
void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
- M_WCHAR *name ;
- LOGICAL useoradd ;
-#endif
{
int mapid ;
}
/* Issue error message (one argument) */
-#if defined(M_PROTO)
-void m_err1(
- const char *text,
- const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
- char *text;
- M_WCHAR *arg;
-#endif
+void m_err1(const char *text, const M_WCHAR *arg)
{
char *buffer, *mb_arg;
}
-#if defined(M_PROTO)
void m_mberr1(
const char *text,
const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg;
-#endif
{
M_WCHAR *wc_arg;
}
/* Issue error message (two arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
-#endif
{
char *buffer;
char *mb_arg1,*mb_arg2;
}
/* Issue error message (three arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
- M_WCHAR *arg3;
-#endif
{
char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3;
}
/* Issue error message (four arguments) */
-#if defined(M_PROTO)
void m_err4(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg2,
M_WCHAR *arg3,
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 *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
}
/* Issue error message (five arguments) */
-#if defined(M_PROTO)
void m_err5(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg3,
M_WCHAR *arg4,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
}
/* Issue error message (six arguments) */
-#if defined(M_PROTO)
void m_err6(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg4,
M_WCHAR *arg5,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
}
/* Issue error message (seven arguments) */
-#if defined(M_PROTO)
void m_err7(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg5,
M_WCHAR *arg6,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
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
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 )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
{
M_ELEMENT eltid ;
int par ;
}
/* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
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 &&
m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
/* Temporary pointers to parameter values. Used while scanning start tag
before element is placed on parse stack.*/
M_PAREXTERN
-#if defined M_PROTO
-#endif
M_WCHAR *m_poccur[
#if defined(M_PARDEF)
M_MAXPAR ? M_MAXPAR : 1
/* Function callable by interface designers. Returns TRUE if specified value
is a legal value for the indicated parameter of the given element,
FALSE otherwise. */
-#if defined(M_PROTO)
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 ;
int par ;
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: proto.h /main/3 1995/11/08 09:42:21 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void m_attval(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL neednet
-#endif
- ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
- M_WCHAR *name, LOGICAL useoradd
-#endif
- ) ;
-
-void m_closent(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
- int m_ent
-#endif
- ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
- LOGICAL init, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
- M_ELEMENT c
-#endif
- ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
- M_ENTITY *openent
-#endif
- ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err4(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5
-#endif
- ) ;
-
-void m_err6(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
- ) ;
-
-void m_err7(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
- M_ELEMENT elt
-#endif
- ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
- ) ;
-
-void m_expline(
-#if defined(M_PROTO)
- LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
- ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_PARSE *stackptr
-#endif
- ) ;
-
-int m_findact(
-#if defined(M_PROTO)
- M_ELEMENT elt, int *array
-#endif
- ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
- M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
- LOGICAL wild
-#endif
- ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
- const char *elt, const char *param, const M_WCHAR *value
-#endif
- ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
- M_STATE from, int *newleft
-#endif
- ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
- M_MIN *min
- , char *msg
-#endif
- ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
- int srlen, int context
-#endif
- ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
- M_HOLDTYPE *dchar
-#endif
- ) ;
-
-int m_getc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
- int n, LOGICAL *flag
-#endif
- ) ;
-
-void m_getline(
-#if defined(M_PROTO)
- M_WCHAR **file, int *line
-#endif
- ) ;
-
-void m_getname(
-#if defined(M_PROTO)
- M_WCHAR first
-#endif
- ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
- int *c, M_HOLDTYPE *dchar, int context
-#endif
- ) ;
-
-void m_globes(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_globss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_level(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
- char *elt
-#endif
- ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-void m_longent(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
- M_WCHAR *name, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
- ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
- M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
- ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
- int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
- unsigned char type
-#endif
- ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
- M_WCHAR *entcontent
-#endif
- ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
- ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
- M_WCHAR *elt, int n
-#endif
- ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
- char *elt, int n
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
- int par, M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
- ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
- M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
- ) ;
-
-void m_pop(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_push(
-#if defined(M_PROTO)
- M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
- ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
- void *data, int n
-#endif
- ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
-
-int m_scan(
-#if defined(M_PROTO)
- LOGICAL prolog
-#endif
- ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
- int map, LOGICAL useoradd
-#endif
- ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
- M_WCHAR **cvar, int par
-#endif
- ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
- M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
- ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
- int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
- ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
- int scanval
-#endif
- ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
- M_ELEMENT scanval
-#endif
- ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL net
-#endif
- ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
- M_WCHAR m_textchar
-#endif
- ) ;
-
-void m_textout(
-#if defined(M_PROTO)
- char *format, LOGICAL start, LOGICAL end
-#endif
- ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
- M_ELEMENT label, LOGICAL recur
-#endif
- ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
- M_WCHAR *delim, LOGICAL flag
-#endif
- ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
- ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#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
- ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+int m_actgetc(M_NOPAR);
+
+void m_adjuststate(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(M_NOPAR);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(M_NOPAR);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(M_NOPAR);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(M_NOPAR);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(M_NOPAR);
+
+void m_exit(int status);
+
+void m_etcomplete(M_NOPAR);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(M_NOPAR);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(M_NOPAR);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
+ LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min
+ , char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(M_NOPAR);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(M_NOPAR);
+
+void m_globss(M_NOPAR);
+
+void m_holdproc(M_NOPAR);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(M_NOPAR);
+
+void m_initialize(M_NOPAR);
+
+void m_lastchars(M_NOPAR);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
+ unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(M_NOPAR);
+
+LOGICAL m_omitend(M_NOPAR);
+
+LOGICAL m_omitstart(M_NOPAR);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(M_NOPAR);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(M_NOPAR);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(M_NOPAR);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(LOGICAL prolog);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(M_NOPAR);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(M_NOPAR);
+
+void m_signmsg(char *p);
+
+void m_sigre(M_NOPAR);
+
+void m_startdoc(M_NOPAR);
+
+void m_startmsg(M_NOPAR);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(M_NOPAR);
+
+void m_stkdefaultparams(M_NOPAR);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(M_NOPAR);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(M_NOPAR);
+
+M_WCHAR *m_thisfile(M_NOPAR);
+
+int m_thisline(M_NOPAR);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(M_NOPAR);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Reads a name token */
-#if defined(M_PROTO)
void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
- M_WCHAR first ;
-#endif
{
M_WCHAR *p ;
M_HOLDTYPE dchar ;
}
/* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
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 (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
/* Have found one character in a possible short reference delimiter.
Prepare to look for the next one */
-#if defined(M_PROTO)
void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
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 ;
char mb_re,mb_seqchar, mb_rschar;
}
/* Scanner */
-#if defined(M_PROTO)
int m_scan(LOGICAL prolog)
-#else
-int m_scan(prolog)
- LOGICAL prolog ;
-#endif
{
int c ;
M_HOLDTYPE dchar ;
/* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
- int map ;
- LOGICAL useoradd ;
-#endif
{
int i ;
int sref ;
/* Returns a context-dependent delimiter string to input stream so
characters can be reread one at a time in another context */
-#if defined(M_PROTO)
void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
- M_WCHAR *delim ;
- LOGICAL flag ;
-#endif
{
M_WCHAR *p ;
/* 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
may be in the expansion of an entity*/
-#if defined(M_PROTO)
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] ;
int length;
/* Include generated code */
#include "stfile.c"
-#if defined(M_PROTO)
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_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
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
elements as well. */
-#if defined(M_PROTO)
LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
- M_ELEMENT val ;
- LOGICAL neednet ;
- #endif
{
M_PARSE *stackptr ;
M_OPENFSA *fsastack ;
/* Pushes a new item onto the parse stack, setting its element, current,
and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
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 ;
}
/* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
- M_ELEMENT val ;
- LOGICAL net ;
-#endif
{
m_transition(val, TRUE) ;
if (val) {
/* Returns TRUE iff LABEL allowed in the current state of the current
element (without expanding any minimization). May result in changes
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)
-#else
-LOGICAL m_transition(label, recur)
- M_ELEMENT label ;
- LOGICAL recur ;
-#endif
{
M_ARC parc ;
M_OPENFSA *newfsa ;
#include "tfile.c"
/* When a text character occurs */
-#if defined(M_PROTO)
void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
- M_WCHAR m_textchar ;
- #endif
{
char buffer[10] ;
char mb_re;
*/
#include "basic.h"
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
/* Test if a string contains only white space characters */
-#if defined(M_PROTO)
LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
/* For function prototypes */
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
-#else
-#define M_PROTO
+
#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
-
-int w_strcmp(
-#if defined(M_PROTO)
- const M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
- );
-
-int w_strlen(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
- M_WCHAR *string, const M_WCHAR chr
-#endif
- );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
- M_WCHAR *string1, M_WCHAR *string2
-#endif
- );
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
-) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
+
+void m_free(void *block, char *msg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+int mb_getwc(void *m_ptr);
#define CONTINIT(a)
#endif
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpdlmptr(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void dumpdlmptr(M_NOPAR);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
-void dumptree(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void dumptree(LOGICAL sparse);
-void enterdelim(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void enterdelim(int n);
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_error(char *text);
-void m_err1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void m_err1(char *text, char *arg);
-void getcode(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void getcode(int n);
-void getcolon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void getcolon(M_NOPAR);
-int getContext(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+int getContext(M_NOPAR);
-LOGICAL getdname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+LOGICAL getdname(M_NOPAR);
-void inccon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void inccon(M_NOPAR);
-void incdelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void incdelim(M_NOPAR);
-void loaddelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void loaddelim(M_NOPAR);
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+int main(int argc, char **argv);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void nextcon(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void nextcon(LOGICAL sparse);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
-void printval(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
+void printval(FILE *file, M_TRIE *value);
-void prtctxt(
-#if defined(M_PROTO)
- int column, int value
-#endif
- ) ;
+void prtctxt(int column, int value);
-int readchar(
-#if defined(M_PROTO)
- LOGICAL cap
-#endif
- ) ;
+int readchar(LOGICAL cap);
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void skiptoend(M_NOPAR);
-void unread(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+void unread(int c);
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void warning(char *text);
-void warning1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void warning1(char *text, char *arg);
-void warning2(
-#if defined(M_PROTO)
- char *text, char *arg1, char *arg2
-#endif
- ) ;
+void warning2(char *text, char *arg1, char *arg2);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
#define NOMORE -1
}
/* Output the generated data structures */
-#if defined(M_PROTO)
void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
- LOGICAL sparse;
-#endif
{
int i, count = 0;
}
/* Output transition matrix */
-#if defined(M_PROTO)
void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
- LOGICAL sparse;
-#endif
{
int i, j;
int firstinrow;
/* Read the next input character */
-#if defined(M_PROTO)
int readchar(LOGICAL cap)
-#else
-int readchar(cap)
- LOGICAL cap;
-#endif
{
int c;
M_WCHAR wnl;
#endif
#include "basic.h"
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+void main(int argc, char **argv);
void main(argc, argv)
int argc ;
/* Entout has procedures to write generated entity TRIE */
-void entptr(
-#if defined(M_PROTO)
- M_ENTITY *data
-#endif
- ) ;
+void entptr(M_ENTITY *data);
-char *typetype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+char *typetype(int n);
-char *typewhere(
-#if defined(M_PROTO)
- unsigned char n
-#endif
- ) ;
+char *typewhere(unsigned char n);
/* Macro names written to output file */
char xdbuild[] = "M_DBUILD" ;
}
/* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
- unsigned char n ;
-#endif
{
switch(n) {
case M_DBUILD: return(xdbuild) ;
extern int m_line ;
extern LOGICAL errexit ;
-void eprefix(
-#if defined(M_PROTO)
- LOGICAL flag
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
- M_WCHAR *arg5
-#endif
- ) ;
-
-void esuffix(
-#if defined(M_PROTO)
- void
-#endif
- ) ;
-
-void msgline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void msg1line(
-#if defined(M_PROTO)
- char *text, char *arg1
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *text
-#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
- ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(M_NOPAR);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
/* Write error message prefix */
-#if defined(M_PROTO)
void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
- LOGICAL flag ;
-#endif
{
if (flag) errexit = TRUE ;
fprintf(stderr, "\n**** ") ;
/* Writes an error message with one argument to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
- char *text;
- M_WCHAR *arg ;
-#endif
{
char *mb_arg;
m_free(mb_arg,"multi-byte string");
}
-#if defined(M_PROTO)
void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg ;
-#endif
{
eprefix(TRUE) ;
fprintf(stderr, text, arg) ;
/* Writes an error message with two arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with three arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with five arguments to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
/* Writes a nonfatal error message with one argument to standard error
and file "error" */
-#if defined(M_PROTO)
void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
{
char *mb_arg;
/* Writes a nonfatal error message with two arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with three arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with four arguments to standard error
and file "error" */
-#if defined(M_PROTO)
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
#endif
#include "basic.h"
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
/* Exit function called by utilities used in PARSER and other programs in
the MARKUP system */
char linedir[] = "#line" ;
char *p = linedir, *q = linedir + 1 ;
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+void main(int argc, char **argv);
-void copyfile(
-#if defined(m_proto)
- char *pfile1, char *pfile2
-#endif
- ) ;
+void copyfile(char *pfile1, char *pfile2);
-int nextchar(
-#if defined (M_PROTO)
- FILE *file, struct data *data
-#endif
- ) ;
+int nextchar(FILE *file, struct data *data);
void main(argc, argv)
int argc ;
#endif
#include "basic.h"
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const char *arg
-#endif
- ) ;
+void m_err1(const char *text, const char *arg);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
+void m_inctest(int *count, int limit, char *message);
/* Increment a count and test against a limit */
void m_inctest(count, limit, message)
#include "common.h"
extern char m_chartype[M_CHARSETLEN] ;
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
void m_initctype(M_NOPAR)
{
int i ;
#include <string.h>
#include "basic.h"
-char *m_itoa(
-#if defined(M_PROTO)
- int n, char *s
-#endif
- ) ;
+char *m_itoa(int n, char *s);
-void reverse(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+void reverse(char *s);
char *m_itoa(n, s) /* convert n to characters in s */
char s[];
#include "basic.h"
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-#if defined(M_PROTO)
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) ;
return(FALSE) ;
#include "basic.h"
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
extern LOGICAL m_heapchk ;
extern LOGICAL m_malftrace ;
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_errline(char *text);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
+void m_free(void *block, char *msg);
-void m_heapdump(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void m_heapdump(M_NOPAR);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
+void *m_realloc(void *ptr, int size, char *msg);
-void *m_trace(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void *m_trace(char *text);
-void *m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
+void *m_wctrace(M_WCHAR *text);
void m_free(block, msg)
void *block ;
extern FILE *m_errfile ;
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
/* Open a file and check that the open succeeded */
void m_openchk(ptr, name, mode)
/* 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
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 )
-#else
-M_WCHAR *m_partype(par, string)
- int par ;
- M_WCHAR *string ;
-#endif /* M_PROTO */
{
LOGICAL first = TRUE ;
int kw ;
#if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j)
-int m_sprscon(
-#if defined(M_PROTO)
- int i, int j
-#endif
- ) ;
+int m_sprscon(int i, int j);
#else
#define m_newcon(i, j) m_nextcon[i][j]
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void m_entercharintrie(
-#if defined(M_PROTO)
- M_TRIE **currentnode, M_WCHAR c
-#endif
- ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
/* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
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_lookfortrie(p, xtrie) looks for string p in the specified trie,
returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
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 *m_gettrienode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+M_TRIE *m_gettrienode(M_NOPAR);
-void *m_lookfortrie(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_TRIE *xtrie
-#endif
- ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
-void *m_ntrtrie(
-#if defined(M_PROTO)
- M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
- ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
-void *m_resettrie(
-#if defined(M_PROTO)
- M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
- ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void printval(
-#if defined(M_PROTO)
- FILE *file, void *value
-#endif
- ) ;
+void printval(FILE *file, void *value);
/* Count the descendants of a node in order to generate declarations for
the packed form of a trie*/
FILE *file ;
M_TRIE *trieptr ;
int *count ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value);
{
M_TRIE *p ;
int savecount ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *xtrie, char *extname, int *count,
- void (*proc)(void *value)
-#endif
- ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(void *value));
/* Write the C declaration of a trie */
void m_dumptrie(file, xtrie, extname, count, proc)
M_TRIE *xtrie ;
char *extname ;
int *count ;
- void (*proc)(
-#if defined(M_PROTO)
- void *value
-#endif
- ) ;
+ void (*proc)(void *value);
{
int firstson ;
M_TRIE *p ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)(FILE *file, void *value));
/* Write the declaration of a packed trie to the specified files */
void dumpptrie(intname, extname, file, externdef, defdef, proc)
FILE *file ;
char *externdef ;
char *defdef ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value) ;
{
LOGICAL first = TRUE ;
int count = 0 ;
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie,
- M_WCHAR *name
-#endif
- ) ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
/* Look for the string NAME in the packed trie PTRIE */
int m_packedlook(xptrie, name)
#include "common.h"
extern M_CHARTYPE m_ctarray[256] ;
-int m_wcupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_WCHAR *q
-#endif
- ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const char *q
-#endif
- ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
- const char *p, const char *q
-#endif
- ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
-#if defined(M_PROTO)
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 {
if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
return(0) ;
}
-#if defined(M_PROTO)
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;
int retval;
return retval;
}
-#if defined(M_PROTO)
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;
int retval;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-int m_upper(c)
- int c ;
+int m_upper(int c)
{
if (c >= 'a' && c <= 'z') c += 'A' - 'a' ;
return(c) ;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-int m_upstrcmp(
-#if defined(M_PROTO)
- char *p, char *q
-#endif
- ) ;
-
-int m_upstrcmp(p, q)
- char *p, *q ;
+int m_upstrcmp(char *p, char *q)
{
do {
if (m_upper((int) *p) < m_upper((int) *q)) return(-1) ;
/* compare two wide character strings */
-#if defined(M_PROTO)
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;
/* copy a wide character string */
-#if defined(M_PROTO)
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;
/* 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)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int max;
-#endif
{
M_WCHAR *string1start;
/* get the length of a wide character string */
-#if defined(M_PROTO)
int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
{
int length;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
{
char *mb_string;
int length, retVal;
/* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
#include "basic.h"
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
/* Test if character c is a blank, tab, or carriage return */
-#if defined(M_PROTO)
LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
- M_WCHAR c ;
-#endif
{
char mb_c[32]; /* arbitrarily large */
int length;
BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
+M_WCHAR *MakeWideCharString(const char *from);
/* Addarc adds an arc from FSA state <from> to state <to> setting other
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)
-#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 ;
int determ ;
/* Saves the name of an element appearing on the left-hand side of a
grammar rule */
-#if defined(M_PROTO)
void savelhs(LOGICAL param)
-#else
-void savelhs(param)
- LOGICAL param ;
-#endif
{
STATE *end ;
ELTSTRUCT *errelt ;
/* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
int len ;
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
int i, ret ;
}
/* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
{
PTYPE *kw ;
int keycount ;
/* Proto.h contains function prototypes for program BUILD. */
-int addarc(
-#if defined(M_PROTO)
- STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
- int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void adddefent(
-#if defined(M_PROTO)
- M_WCHAR *mapname
-#endif
- ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
- M_WCHAR *name
-#endif
- ) ;
-
-void addex(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
- M_WCHAR *p, LOGICAL define
-#endif
- ) ;
-
-void addndent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void addpar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addsref(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void checkand(
-#if defined(M_PROTO)
- ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
- ELTSTRUCT **errelt
-#endif
- ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
- STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
- ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
- STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
- STATELIST *from, STATELIST **to
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void defmapname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-char *deftype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void dellist(
-#if defined(M_PROTO)
- STATELIST **list
-#endif
- ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
- FILE *file,
- M_TRIE *value
-#endif
- ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)( FILE *, M_TRIE *)
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
+ int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(M_NOPAR);
+
+void addkeyword(M_NOPAR);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(M_NOPAR);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
+ ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(M_NOPAR);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(M_NOPAR);
+
+void done(M_NOPAR);
+
+void dumpentnode(FILE *file, M_TRIE *value);
+
+void dumpmapnode(FILE *file, M_TRIE *value);
+
+void dumpsrefnode(FILE *file,
+ M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
- FILE *tempfile
-#endif
- ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endmodel(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-char *enttype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void exout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freetree(
-#if defined(M_PROTO)
- TREE *ruletree
-#endif
- ) ;
-
-void found(
-#if defined(M_PROTO)
- LOGICAL *flag, char *delim
-#endif
- ) ;
-
-void fsa(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-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
- ) ;
+ void (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(M_NOPAR);
+
+void endmodel(M_NOPAR);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+ANDGROUP *getand(M_NOPAR);
+
+LOGICAL getname(int first);
+
+STATE *getstate(M_NOPAR);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(M_NOPAR);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(M_NOPAR);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(M_NOPAR);
+
+void prulend(M_NOPAR);
+
+void push(M_NOPAR);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(M_NOPAR);
+
+void rulend(M_NOPAR);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(M_NOPAR);
+
+int scan(M_NOPAR);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(M_NOPAR);
+
+int m_sprscon(int i, int j);
+
+void srefout(M_NOPAR);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(M_NOPAR);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Add a short reference map name */
-#if defined(M_PROTO)
LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
{
MAP *old;
MAP *new;
/* 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)
-#else
-void closeiffile(flag, file, count, table, proto)
- LOGICAL flag;
- FILE *file;
- int count;
- char *table;
- char *proto;
-#endif
{
int i;
endcode(flag, file);
if (count) {
fprintf(file,
- "void (*m_%stable[])(\n#if defined(M_PROTO)\n %s\n#endif\n ) = {\n",
+ "void (*m_%stable[])(%s) = {\n",
table, proto);
fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n",
table);
}
else
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);
fclose(file);
}
}
/* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
- LOGICAL flag;
- FILE *file;
-#endif
{
if (flag) fprintf(file, "}}\n\n");
}
*flag = TRUE;
/* protoype */
fprintf(file,
- "void m_%s%d(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n",
+ "void m_%s%d(%s) ;\n",
prefix,
caseno,
proto);
/* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-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);
+fprintf(file, "void m_%s%d(%s)\n {\n", prefix, caseno, proto);
for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
{
/* Proto.h contains function prototypes for program ELTDEF. */
-void actptrout(
-#if defined(M_PROTO)
- ACTION **array, char *name
-#endif
- ) ;
-
-void addent(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void cvalue(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
+void actptrout(ACTION **array, char *name);
+
+void addent(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(M_NOPAR);
+
+
+void done(M_NOPAR);
+
+void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void endcode(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file
-#endif
- ) ;
-
-void endini(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-void enttype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#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(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freechain(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int *getaction(
-#if defined(M_PROTO)
- ACTION **array
-#endif
- ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void outpval(
-#if defined(M_PROTO)
- M_TRIE *p
-#endif
- ) ;
-
-void outstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-int scan(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void startcode(
-#if defined(M_PROTO)
- int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
- char *formal, char *formtype
-#endif
- ) ;
-
-void startelement(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storecvar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storepname(
-#if defined(M_PROTO)
- M_NOPAR
-#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 value(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void warning1(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+ void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(M_NOPAR);
+
+void endsignon(M_NOPAR);
+
+void endstring(M_NOPAR);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(M_NOPAR);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(M_NOPAR);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(M_NOPAR);
+
+void skiptoend(M_NOPAR);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+ char *formal, char *formtype);
+
+void startelement(M_NOPAR);
+
+void storecvar(M_NOPAR);
+
+void storepname(M_NOPAR);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
#include "userinc.h"
#include "globdec.h"
-#if defined(M_PROTO)
int vextextsize(const M_WCHAR *keyword)
-#else
-int vextextsize(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NORMAL;
return NORMAL;
}
-#if defined(M_PROTO)
int vgloss(const M_WCHAR *keyword)
-#else
-int vgloss(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return GLOSS;
return GLOSS;
}
-#if defined(M_PROTO)
int vcenter(const M_WCHAR *keyword)
-#else
-int vcenter(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return CENTER;
return CENTER;
}
-#if defined(M_PROTO)
int vnumber(const M_WCHAR *keyword)
-#else
-int vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NONUMBER;
return NONUMBER;
}
-#if defined(M_PROTO)
LOGICAL vstack(const M_WCHAR *keyword)
-#else
-LOGICAL vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return FALSE;
return FALSE;
}
-#if defined(M_PROTO)
int vordertype(const M_WCHAR *keyword)
-#else
-int vordertype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return ARABIC;
return ARABIC;
}
-#if defined(M_PROTO)
int vrsectpage(const M_WCHAR *keyword)
-#else
-int vrsectpage(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return NEWPAGE;
return NEWPAGE;
}
-#if defined(M_PROTO)
int vlonglabel(const M_WCHAR *keyword)
-#else
-int vlonglabel(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return WRAP;
return WRAP;
}
-#if defined(M_PROTO)
int vspacing(const M_WCHAR *keyword)
-#else
-int vspacing(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return LOOSE;
return LOOSE;
}
-#if defined(M_PROTO)
int vtype(const M_WCHAR *keyword)
-#else
-int vtype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
{
if (!keyword) return BULLET;
/* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
/* Function prototypes for HP Tag/TeX translator */
-void assert_hometopic_exists(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void assert_hometopic_exists(M_NOPAR);
/* conflict with prototype defined for basename() in <string.h> on osf,
so use fbasename */
-void fbasename(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void chapstart(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-void checkgloss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *checkid(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-void checkmsghead (
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void dumpxref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void echohead(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void mb_echohead(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void endhead(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void esoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void vexoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void exoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void imoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-int getqualified (
-#if defined(M_PROTO)
- M_WCHAR *qualname, M_WCHAR *unqualname
-#endif
- ) ;
-
-void handle_link_and_graphic(
-#if defined(M_PROTO)
- M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
- M_WCHAR *glinktype, M_WCHAR *gdescription
-#endif
- );
-
-void idstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void indexchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void Item(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-char *m_itoa(
-#if defined(M_PROTO)
- int n, char *s
-#endif
- ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-void loadxref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-void options(
-#if defined(M_PROTO)
- LOGICAL filelenonly
-#endif
- ) ;
-
-void outchar(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
-
-void outpi(
-#if defined(M_PROTO)
- int enttype, M_WCHAR *pi, M_WCHAR *entname
-#endif
- ) ;
-
-void realoutchar(
-#if defined(M_PROTO)
- M_WCHAR textchar, FILE *outfile
-#endif
- ) ;
-
-void rsectstart(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-void rseqend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *searchforfile(
-#if defined(M_PROTO)
- M_WCHAR *file
-#endif
- ) ;
-
-void setid(
-#if defined(M_PROTO)
- M_WCHAR *id,
+void fbasename(M_NOPAR);
+
+void chapstart(M_WCHAR *id);
+
+void checkgloss(M_NOPAR);
+
+M_WCHAR *checkid(M_WCHAR *id);
+
+void checkmsghead (M_NOPAR);
+
+void dumpxref(M_NOPAR);
+
+void echohead(M_WCHAR *p);
+
+void mb_echohead(char *p);
+
+void endhead(M_NOPAR);
+
+void esoutchar(M_WCHAR textchar);
+
+void vexoutchar(M_WCHAR textchar);
+
+void exoutchar(M_WCHAR textchar);
+
+void imoutchar(M_WCHAR textchar);
+
+int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
+
+void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
+ M_WCHAR *glinktype, M_WCHAR *gdescription);
+
+void idstring(M_WCHAR *string);
+
+void indexchar(M_WCHAR textchar);
+
+void Item(M_WCHAR *id);
+
+char *m_itoa(int n, char *s);
+
+LOGICAL m_letter(M_WCHAR c);
+
+void loadxref(M_NOPAR);
+
+int m_lower(int c);
+
+void options(LOGICAL filelenonly);
+
+void outchar(M_WCHAR textchar, FILE *outfile );
+
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
+
+void realoutchar(M_WCHAR textchar, FILE *outfile);
+
+void rsectstart(M_WCHAR *id);
+
+void rseqend(M_NOPAR);
+
+M_WCHAR *searchforfile(M_WCHAR *file);
+
+void setid(M_WCHAR *id,
LOGICAL where,
LOGICAL csensitive,
LOGICAL inchapter,
char *chapter,
M_WCHAR *xrffile,
int xrfline,
- LOGICAL xrefable
-#endif
- ) ;
-
-void setopt(
-#if defined(M_PROTO)
- char *string, LOGICAL filelenonly
-#endif
- ) ;
-
-LOGICAL setvalopt(
-#if defined(M_PROTO)
- int thisopt, char *string, LOGICAL filelenonly
-#endif
- ) ;
-
-void shchar(
-#if defined(M_PROTO)
- M_WCHAR textchar,
+ LOGICAL xrefable);
+
+void setopt(char *string, LOGICAL filelenonly);
+
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
+
+void shchar(M_WCHAR textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void mb_shchar(
-#if defined(M_PROTO)
- char textchar,
+void mb_shchar(char textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void shstring(
-#if defined(M_PROTO)
- M_WCHAR *addstring,
+void shstring(M_WCHAR *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void mb_shstring(
-#if defined(M_PROTO)
- char *addstring,
+void mb_shstring(char *addstring,
int *len,
int max,
M_WCHAR *storestring,
char *msg,
- LOGICAL *errflg
-#endif
- ) ;
+ LOGICAL *errflg);
-void starthelpnode(
-#if defined(M_PROTO)
- M_WCHAR *ssi,
+void starthelpnode(M_WCHAR *ssi,
M_WCHAR *id,
- int level
-#endif
- ) ;
+ int level);
-void mb_starthelpnode(
-#if defined(M_PROTO)
- char *ssi,
+void mb_starthelpnode(char *ssi,
char *id,
- int level
-#endif
- ) ;
-
-void StartLabList(
-#if defined(M_PROTO)
- M_WCHAR *spacing,
- M_WCHAR *longlabel
-#endif
- ) ;
-
-void StartList(
-#if defined(M_PROTO)
- M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont
-#endif
- ) ;
-
-void EndList(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void strcode(
-#if defined(M_PROTO)
- M_WCHAR *string, FILE *outfile
-#endif
- ) ;
-
-void mb_strcode(
-#if defined(M_PROTO)
- char *string, FILE *outfile
-#endif
- ) ;
-
-char *strstr(
-#if defined(M_PROTO)
- const char *s1, const char *s2
-#endif
- ) ;
-
-void svhdstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void svtcstring(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void termchar(
-#if defined(M_PROTO)
- M_WCHAR textchar
-#endif
- ) ;
-
-void termpi(
-#if defined(M_PROTO)
- int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname
-#endif
- ) ;
-
-void texinit(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int vextextsize(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vgloss(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vcenter(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vnumber(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-LOGICAL vstack(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vordertype(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vlonglabel(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vspacing(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-int vtype(
-#if defined(M_PROTO)
- const M_WCHAR *keyword
-#endif
- ) ;
-
-void xrefexpand(
-#if defined(M_PROTO)
- M_WCHAR *id
-#endif
- ) ;
-
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-char *GetDefaultHeaderString(
-#if defined(M_PROTO)
- char *elementName,
+ int level);
+
+void StartLabList(M_WCHAR *spacing,
+ M_WCHAR *longlabel);
+
+void StartList(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
+
+void EndList(M_NOPAR);
+
+void strcode(M_WCHAR *string, FILE *outfile);
+
+void mb_strcode(char *string, FILE *outfile);
+
+char *strstr(const char *s1, const char *s2);
+
+void svhdstring(M_WCHAR *string);
+
+void svtcstring(M_WCHAR *string);
+
+void termchar(M_WCHAR textchar);
+
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
+
+void texinit(M_NOPAR);
+
+int vextextsize(const M_WCHAR *keyword);
+
+int vgloss(const M_WCHAR *keyword);
+
+int vcenter(const M_WCHAR *keyword);
+
+int vnumber(const M_WCHAR *keyword);
+
+LOGICAL vstack(const M_WCHAR *keyword);
+
+int vordertype(const M_WCHAR *keyword);
+
+int vlonglabel(const M_WCHAR *keyword);
+
+int vspacing(const M_WCHAR *keyword);
+
+int vtype(const M_WCHAR *keyword);
+
+void xrefexpand(M_WCHAR *id);
+
+int m_upper(int c);
+
+char *GetDefaultHeaderString(char *elementName,
unsigned char desiredType,
- char *defaultString
-#endif
- ) ;
-
-
-void SetDefaultLocale(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
-
-void paragraph(
-#if defined(M_PROTO)
- M_WCHAR *indent,
+ char *defaultString);
+
+
+void SetDefaultLocale(M_NOPAR);
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+void paragraph(M_WCHAR *indent,
M_WCHAR *id,
M_WCHAR *gentity,
M_WCHAR *gposition,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
- M_WCHAR *gdescription
-#endif
- );
+ M_WCHAR *gdescription);
-void figure(
-#if defined(M_PROTO)
- M_WCHAR *number,
+void figure( M_WCHAR *number,
M_WCHAR *tonumber,
M_WCHAR *id,
M_WCHAR *file,
M_WCHAR *cappos,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
- M_WCHAR *gdescription
-#endif
- );
+ M_WCHAR *gdescription);
-void endterm(
-#if defined(M_PROTO)
- M_WCHAR *base,
+void endterm( M_WCHAR *base,
M_WCHAR *gloss,
- char *linktype
-#endif
- );
-
-M_WCHAR wc_toupper(
-#if defined(M_PROTO)
- M_WCHAR wc
-#endif
- );
-
-M_WCHAR *wc_stringtoupper(
-#if defined(M_PROTO)
- M_WCHAR *wcp
-#endif
- );
-
-int NextId(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
-);
-
-char *GetLanguage(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
-);
-
-char *GetCharset(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
-);
-
-void HandleLink(
-#if defined(M_PROTO)
- M_WCHAR *hyperlink,
+ char *linktype);
+
+M_WCHAR wc_toupper( M_WCHAR wc);
+
+M_WCHAR *wc_stringtoupper( M_WCHAR *wcp);
+
+int NextId(M_NOPAR);
+
+char *GetLanguage(M_NOPAR);
+
+char *GetCharset(M_NOPAR);
+
+void HandleLink( M_WCHAR *hyperlink,
M_WCHAR *type,
- M_WCHAR *description
-#endif
- );
-
-char *mb_realloc(
-#if defined(M_PROTO)
- char *ptr, long size
-#endif
- );
-
-char *mb_malloc(
-#if defined(M_PROTO)
- long size
-#endif
- );
-
-void mb_free(
-#if defined(M_PROTO)
- char **pptr
-#endif
- );
-
-void Add2ToRowVec(
-#if defined(M_PROTO)
- int *length, char **rowvec, char *id1, char *id2
-#endif
- );
-
-void StartEx(
-#if defined(M_PROTO)
-M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize
-#endif
- );
-
-void EndEx(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-void StartNCW(
-#if defined(M_PROTO)
- char *which
-#endif
- );
-
-void StartBlock(
-#if defined(M_PROTO)
- char *pclass, char *ssi, char *id
-#endif
- );
-
-void AddToSNB(
-#if defined(M_PROTO)
- char *id, char *iconName
-#endif
- );
-
-void StartNCWtext(
-#if defined(M_PROTO)
- char *which, char *iconFile, char *headingString
-#endif
- );
-
-void IncludeToss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-M_WCHAR *CycleEnt(
-#if defined(M_PROTO)
- LOGICAL init,
+ M_WCHAR *description);
+
+char *mb_realloc( char *ptr, long size);
+
+char *mb_malloc( long size);
+
+void mb_free( char **pptr);
+
+void Add2ToRowVec( int *length, char **rowvec, char *id1, char *id2);
+
+void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize);
+
+void EndEx(M_NOPAR);
+
+void StartNCW(char *which);
+
+void StartBlock(char *pclass, char *ssi, char *id);
+
+void AddToSNB(char *id, char *iconName);
+
+void StartNCWtext(char *which, char *iconFile, char *headingString);
+
+void IncludeToss(M_NOPAR);
+
+M_WCHAR *CycleEnt( LOGICAL init,
unsigned char *type,
M_WCHAR ***content,
- unsigned char *wheredef
-#endif
- );
-
-void ModifyEntities(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- );
-
-void PushForm(
-#if defined(M_PROTO)
- char *class,
+ unsigned char *wheredef);
+
+void ModifyEntities(M_NOPAR);
+
+void PushForm(char *class,
char *ssi,
- char *id
-#endif
- ) ;
+ char *id);
-void PushForm2(
-#if defined(M_PROTO)
- char *class,
+void PushForm2(char *class,
char *ssi,
char *id1,
- char *id2
-#endif
- ) ;
-
-void PopForm(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void PopForm2(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void PopFormMaybe(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void EmitSavedAnchors(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void CloseVirpage(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+ char *id2);
+
+void PopForm(M_NOPAR);
+
+void PopForm2(M_NOPAR);
+
+void PopFormMaybe(M_NOPAR);
+
+void EmitSavedAnchors(M_NOPAR);
+
+void CloseVirpage(M_NOPAR);
/* construct a qualified file name */
-#if defined(M_PROTO)
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)
FILE *f;
}
/* Process an item in a list */
-#if defined(M_PROTO)
void Item(M_WCHAR *id)
-#else
-void Item(id)
-M_WCHAR *id;
-#endif
{
char orderString[32];
static char *ROMAN0[] =
/* Start a new helpnode */
-#if defined(M_PROTO)
void starthelpnode(M_WCHAR *ssi,
M_WCHAR *id,
int level)
-#else
-void starthelpnode(ssi, id, level)
-M_WCHAR *ssi;
-M_WCHAR *id;
-int level;
-#endif
{
int i;
char *mbyte, *mb_ssi;
} /* End starthelpnode(id) */
-#if defined(M_PROTO)
void mb_starthelpnode(char *ssi,
char *id,
int level)
-#else
-void mb_starthelpnode(ssi, id, level)
-char *ssi;
-char *id;
-int level;
-#endif
{
M_WCHAR *wc_ssi, *wc_id;
/* Start a list */
-#if defined(M_PROTO)
void StartList(M_WCHAR *type,
M_WCHAR *order,
M_WCHAR *spacing,
M_WCHAR *cont)
-#else
-void StartList(type, order, spacing, cont)
-M_WCHAR *type, *order, *spacing, *cont;
-#endif
{
LIST *nextlist;
CONTCHAIN *chain;
the string returned must be m_free'd.
*/
char *
-#if defined(M_PROTO)
GetDefaultHeaderString(
char *elementName,
unsigned char desiredType,
char *defaultString )
-#else
-GetDefaultHeaderString(elementName, desiredType, defaultString)
-char *elementName;
-unsigned char desiredType;
-char *defaultString;
-#endif
{
unsigned char type,wheredef;
M_WCHAR *content;
* standard versions.
*/
static void
-#if defined(M_PROTO)
SetStdLocale(char *pLang, char *pCharset)
-#else
-SetStdLocale(pLang, pCharset)
-char *pLang;
-char *pCharset;
-#endif
{
static const char *cString = "C";
static const char *isoString = "ISO-8859-1";
* fashion.
*/
static char *
-#if defined(M_PROTO)
-GetStdLocale()
-#else
-GetStdLocale()
-#endif
+GetStdLocale(void)
{
static char buffer[256];
static char *cString = "C";
}
-#if defined(M_PROTO)
void paragraph(M_WCHAR *indent,
M_WCHAR *id,
M_WCHAR *gentity,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
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;
}
-#if defined(M_PROTO)
void figure(
M_WCHAR *number,
M_WCHAR *tonumber,
M_WCHAR *ghyperlink,
M_WCHAR *glinktype,
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];
unsigned char etype,wheredef;
m_free(string, "default header string return");
}
-#if defined(M_PROTO)
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 dterm[MAXTERM+1];
if (echo) mb_echohead("++");
}
-#if defined(M_PROTO)
M_WCHAR wc_toupper(M_WCHAR wc)
-#else
-M_WCHAR wc_toupper(wc)
-M_WCHAR wc;
-#endif
{
if ((wc >= 0) && (wc <= 255))
{
return wc;
}
-#if defined(M_PROTO)
M_WCHAR *wc_stringtoupper(M_WCHAR *wcp)
-#else
-M_WCHAR *wc_stringtoupper(wcp)
-M_WCHAR *wcp;
-#endif
{
M_WCHAR *newstring, *nsp;
}
-#if defined(M_PROTO)
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 buffer[BIGBUF];
}
-#if defined(M_PROTO)
char *mb_realloc(char *ptr, long size)
-#else
-char *mb_realloc(ptr, size)
-char *ptr;
-long size;
-#endif
{
void *vptr;
size_t ssize;
}
-#if defined(M_PROTO)
char *mb_malloc(long size)
-#else
-char *mb_malloc(size)
-long size;
-#endif
{
char *cptr;
size_t ssize;
}
-#if defined(M_PROTO)
void mb_free(char **pptr)
-#else
-void *mb_free(pptr)
-char **pptr;
-#endif
{
#if DEBUG_MB_MALLOC
*pptr = NULL;
}
-#if defined(M_PROTO)
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];
int rowVecLen;
}
-#if defined(M_PROTO)
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];
int rowVecLen;
}
-#if defined(M_PROTO)
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);
stackex = vstack(notes);
}
-#if defined(M_PROTO)
-void EndEx()
-#else
-void EndEx()
-#endif
+void EndEx(void)
{
char *annotation;
int annotLen;
}
-#if defined(M_PROTO)
void StartNCW(char *which)
-#else
-void StartNCW(which)
-char *which;
-#endif
{
notehead = FALSE;
PushForm(NULL, which, NULL);
}
-#if defined(M_PROTO)
void StartBlock(char *pclass, char *ssi, char *id)
-#else
-void StartBlock(pclass, ssi, id)
-char *pclass, *ssi, *id;
-#endif
{
char localId[32];
char *realId;
}
-#if defined(M_PROTO)
void StartNCWtext(char *which, char *iconFile, char *headingString)
-#else
-void StartNCWtext(which, iconFile, headingString)
-char *which;
-char *iconFile;
-char *headingString;
-#endif
{
char *icon, *heading;
}
-#if defined(M_PROTO)
void AddToSNB(char *id, char *xid)
-#else
-void AddToSNB(id, xid)
-char *id;
-char *xid;
-#endif
{
char tmpsnb[BIGBUF];
int snblen;
}
-#if defined(M_PROTO)
-void IncludeToss()
-#else
-void IncludeToss()
-#endif
+void IncludeToss(void)
{
char pathbuf[BIGBUF];
char *try = pathbuf;
/* Cyclent.c contains procedure m_cyclent(), callable by interface
designers, to cycle through all defined entities, returning information
about them */
-#if defined(M_PROTO)
M_WCHAR *CycleEnt(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 *ancestor[M_NAMELEN + 1] ;
}
-#if defined(M_PROTO)
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 *realId;
}
-#if defined(M_PROTO)
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];
int stackSize;
#define TAGDOTOPT "helptag.opt"
#define DOTOPT ".opt"
-#if defined(M_PROTO)
void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
- LOGICAL filelenonly;
-#endif
{
int i;
FILE *optfile;
/* Set a single option */
/* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int thisopt;
}
/* Process a value for a command line option */
-#if defined(M_PROTO)
LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int i;
/* Process a character in an environment where spaces must be escaped */
-#if defined(M_PROTO)
void esoutchar(M_WCHAR textchar)
-#else
-void esoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
static M_WCHAR wsp = 0;
}
/* Process a character in a verbatim example */
-#if defined(M_PROTO)
void vexoutchar(M_WCHAR textchar)
-#else
-void vexoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
static M_WCHAR wla = 0;
char *holdSaveExSeg;
}
/* Process a character in an example */
-#if defined(M_PROTO)
void exoutchar(M_WCHAR textchar)
-#else
-void exoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
char exbuff[32]; /* arbitrarily large */
int bufflen;
}
/* Process a character in an image paragraph */
-#if defined(M_PROTO)
void imoutchar(M_WCHAR textchar)
-#else
-void imoutchar(textchar)
-M_WCHAR textchar;
-#endif
{
char imbuff[32]; /* arbitrarily large */
int bufflen;
}
/* Write a character to be passed to the index file */
-#if defined(M_PROTO)
void indexchar(M_WCHAR textchar)
-#else
-void indexchar(textchar)
-M_WCHAR textchar;
-#endif
{
if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
{
/* Processes a data character */
-#if defined(M_PROTO)
void outchar(M_WCHAR textchar, FILE *outfile)
-#else
-void outchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
{
M_WCHAR buffer[2];
static M_WCHAR wnl = 0;
/* Really output a character */
-#if defined(M_PROTO)
void realoutchar(M_WCHAR textchar, FILE *outfile)
-#else
-void realoutchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
{
char mb_textchar[32]; /* arbitrarily large */
int length, i;
/* Save a character in the array used to store table of contents entries
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)
-#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 */
unsigned char index;
}
-#if defined(M_PROTO)
void mb_shchar(char textchar,
int *len,
int max,
M_WCHAR *string,
void (*proc)(M_WCHAR *string),
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;
}
/* Process a character in a term */
-#if defined(M_PROTO)
void termchar(M_WCHAR textchar)
-#else
-void termchar(textchar)
-M_WCHAR textchar;
-#endif
{
int length;
char mb_textchar[32]; /* arbitrarily large */
/* Save a cross-reference ID and associated expansion */
-#if defined(M_PROTO)
void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
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 *xref;
}
/* 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)
-#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;
M_PARSE *stackp;
}
/* Output a start-string or end-string */
-#if defined(M_PROTO)
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];
int i, par;
#include "parser.h"
#include "entext.h"
-#if defined(M_PROTO)
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 *ancestor[M_NAMELEN + 1] ;
#include "entext.h"
/* Process the name in a usemap delaration */
-#if defined(M_PROTO)
void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
- M_WCHAR *name ;
- LOGICAL useoradd ;
-#endif
{
int mapid ;
}
/* Issue error message (one argument) */
-#if defined(M_PROTO)
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;
}
-#if defined(M_PROTO)
void m_mberr1(
const char *text,
const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg;
-#endif
{
M_WCHAR *wc_arg;
}
/* Issue error message (two arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
-#endif
{
char *buffer;
char *mb_arg1,*mb_arg2;
}
/* Issue error message (three arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
- M_WCHAR *arg3;
-#endif
{
char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3;
}
/* Issue error message (four arguments) */
-#if defined(M_PROTO)
void m_err4(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg2,
M_WCHAR *arg3,
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 *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
}
/* Issue error message (five arguments) */
-#if defined(M_PROTO)
void m_err5(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg3,
M_WCHAR *arg4,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
}
/* Issue error message (six arguments) */
-#if defined(M_PROTO)
void m_err6(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg4,
M_WCHAR *arg5,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
}
/* Issue error message (seven arguments) */
-#if defined(M_PROTO)
void m_err7(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg5,
M_WCHAR *arg6,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
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
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 )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
{
M_ELEMENT eltid ;
int par ;
}
/* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
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 &&
m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
/* Temporary pointers to parameter values. Used while scanning start tag
before element is placed on parse stack.*/
M_PAREXTERN
-#if defined M_PROTO
-#endif
M_WCHAR *m_poccur[
#if defined(M_PARDEF)
M_MAXPAR ? M_MAXPAR : 1
/* Function callable by interface designers. Returns TRUE if specified value
is a legal value for the indicated parameter of the given element,
FALSE otherwise. */
-#if defined(M_PROTO)
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 ;
int par ;
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: proto.h /main/3 1995/11/08 10:24:42 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void m_attval(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL neednet
-#endif
- ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
- M_WCHAR *name, LOGICAL useoradd
-#endif
- ) ;
-
-void m_closent(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
- int m_ent
-#endif
- ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
- LOGICAL init, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
- M_ELEMENT c
-#endif
- ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
- M_ENTITY *openent
-#endif
- ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err4(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5
-#endif
- ) ;
-
-void m_err6(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
- ) ;
-
-void m_err7(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
- M_ELEMENT elt
-#endif
- ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
- ) ;
-
-void m_expline(
-#if defined(M_PROTO)
- LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
- ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_PARSE *stackptr
-#endif
- ) ;
-
-int m_findact(
-#if defined(M_PROTO)
- M_ELEMENT elt, int *array
-#endif
- ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
- M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
- LOGICAL wild
-#endif
- ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
- const char *elt, const char *param, const M_WCHAR *value
-#endif
- ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
- M_STATE from, int *newleft
-#endif
- ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
- M_MIN *min
- , char *msg
-#endif
- ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
- int srlen, int context
-#endif
- ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
- M_HOLDTYPE *dchar
-#endif
- ) ;
-
-int m_getc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
- int n, LOGICAL *flag
-#endif
- ) ;
-
-void m_getline(
-#if defined(M_PROTO)
- M_WCHAR **file, int *line
-#endif
- ) ;
-
-void m_getname(
-#if defined(M_PROTO)
- M_WCHAR first
-#endif
- ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
- int *c, M_HOLDTYPE *dchar, int context
-#endif
- ) ;
-
-void m_globes(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_globss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_level(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
- char *elt
-#endif
- ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-void m_longent(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
- M_WCHAR *name, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
- ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
- M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
- ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
- int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
- unsigned char type
-#endif
- ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
- M_WCHAR *entcontent
-#endif
- ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
- ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
- M_WCHAR *elt, int n
-#endif
- ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
- char *elt, int n
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
- int par, M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
- ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
- M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
- ) ;
-
-void m_pop(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_push(
-#if defined(M_PROTO)
- M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
- ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
- void *data, int n
-#endif
- ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
-
-int m_scan(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
- int map, LOGICAL useoradd
-#endif
- ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
- M_WCHAR **cvar, int par
-#endif
- ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
- M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
- ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
- int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
- ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
- int scanval
-#endif
- ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
- M_ELEMENT scanval
-#endif
- ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL net
-#endif
- ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
- M_WCHAR m_textchar
-#endif
- ) ;
-
-void m_textout(
-#if defined(M_PROTO)
- char *format, LOGICAL start, LOGICAL end
-#endif
- ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
- M_ELEMENT label, LOGICAL recur
-#endif
- ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
- M_WCHAR *delim, LOGICAL flag
-#endif
- ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
- ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#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
- ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+int m_actgetc(M_NOPAR);
+
+void m_adjuststate(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(M_NOPAR);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(M_NOPAR);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(M_NOPAR);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(M_NOPAR);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(M_NOPAR);
+
+void m_exit(int status);
+
+void m_etcomplete(M_NOPAR);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(M_NOPAR);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(M_NOPAR);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
+ LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min
+ , char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(M_NOPAR);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(M_NOPAR);
+
+void m_globss(M_NOPAR);
+
+void m_holdproc(M_NOPAR);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(M_NOPAR);
+
+void m_initialize(M_NOPAR);
+
+void m_lastchars(M_NOPAR);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
+ unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(M_NOPAR);
+
+LOGICAL m_omitend(M_NOPAR);
+
+LOGICAL m_omitstart(M_NOPAR);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(M_NOPAR);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(M_NOPAR);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(M_NOPAR);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(M_NOPAR);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(M_NOPAR);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(M_NOPAR);
+
+void m_signmsg(char *p);
+
+void m_sigre(M_NOPAR);
+
+void m_startdoc(M_NOPAR);
+
+void m_startmsg(M_NOPAR);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(M_NOPAR);
+
+void m_stkdefaultparams(M_NOPAR);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(M_NOPAR);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(M_NOPAR);
+
+M_WCHAR *m_thisfile(M_NOPAR);
+
+int m_thisline(M_NOPAR);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(M_NOPAR);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Reads a name token */
-#if defined(M_PROTO)
void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
- M_WCHAR first ;
-#endif
{
M_WCHAR *p ;
M_HOLDTYPE dchar ;
}
/* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
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 (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
/* Have found one character in a possible short reference delimiter.
Prepare to look for the next one */
-#if defined(M_PROTO)
void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
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 ;
char mb_re,mb_seqchar, mb_rschar;
/* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
- int map ;
- LOGICAL useoradd ;
-#endif
{
int i ;
int sref ;
/* Returns a context-dependent delimiter string to input stream so
characters can be reread one at a time in another context */
-#if defined(M_PROTO)
void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
- M_WCHAR *delim ;
- LOGICAL flag ;
-#endif
{
M_WCHAR *p ;
/* 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
may be in the expansion of an entity*/
-#if defined(M_PROTO)
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] ;
int length;
/* Include generated code */
#include "stfile.c"
-#if defined(M_PROTO)
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_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
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
elements as well. */
-#if defined(M_PROTO)
LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
- M_ELEMENT val ;
- LOGICAL neednet ;
- #endif
{
M_PARSE *stackptr ;
M_OPENFSA *fsastack ;
/* Pushes a new item onto the parse stack, setting its element, current,
and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
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 ;
}
/* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
- M_ELEMENT val ;
- LOGICAL net ;
-#endif
{
m_transition(val, TRUE) ;
if (val) {
/* Returns TRUE iff LABEL allowed in the current state of the current
element (without expanding any minimization). May result in changes
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)
-#else
-LOGICAL m_transition(label, recur)
- M_ELEMENT label ;
- LOGICAL recur ;
-#endif
{
M_ARC parc ;
M_OPENFSA *newfsa ;
#include "tfile.c"
/* When a text character occurs */
-#if defined(M_PROTO)
void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
- M_WCHAR m_textchar ;
- #endif
{
char buffer[10] ;
char mb_re;
*/
#include "basic.h"
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
/* Test if a string contains only white space characters */
-#if defined(M_PROTO)
LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
/* For function prototypes */
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
-#else
-#define M_PROTO
+
#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
-
-int w_strcmp(
-#if defined(M_PROTO)
- const M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
- );
-
-int w_strlen(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
- M_WCHAR *string, const M_WCHAR chr
-#endif
- );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
- M_WCHAR *string1, M_WCHAR *string2
-#endif
- );
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
+
+void m_free(void *block, char *msg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+int mb_getwc(void *m_ptr);
#define CONTINIT(a)
#endif
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpdlmptr(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void dumpdlmptr(M_NOPAR);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
-void dumptree(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void dumptree(LOGICAL sparse);
-void enterdelim(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void enterdelim(int n);
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_error(char *text);
-void m_err1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void m_err1(char *text, char *arg);
-void getcode(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void getcode(int n);
-void getcolon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void getcolon(M_NOPAR);
-int getContext(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+int getContext(M_NOPAR);
-LOGICAL getdname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+LOGICAL getdname(M_NOPAR);
-void inccon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void inccon(M_NOPAR);
-void incdelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void incdelim(M_NOPAR);
-void loaddelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void loaddelim(M_NOPAR);
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+int main(int argc, char **argv);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void nextcon(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void nextcon(LOGICAL sparse);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
-void printval(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
+void printval(FILE *file, M_TRIE *value);
-void prtctxt(
-#if defined(M_PROTO)
- int column, int value
-#endif
- ) ;
+void prtctxt(int column, int value);
-int readchar(
-#if defined(M_PROTO)
- LOGICAL cap
-#endif
- ) ;
+int readchar(LOGICAL cap);
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void skiptoend(M_NOPAR);
-void unread(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+void unread(int c);
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void warning(char *text);
-void warning1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void warning1(char *text, char *arg);
-void warning2(
-#if defined(M_PROTO)
- char *text, char *arg1, char *arg2
-#endif
- ) ;
+void warning2(char *text, char *arg1, char *arg2);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
#define NOMORE -1
}
/* Output the generated data structures */
-#if defined(M_PROTO)
void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
- LOGICAL sparse;
-#endif
{
int i, count = 0;
}
/* Output transition matrix */
-#if defined(M_PROTO)
void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
- LOGICAL sparse;
-#endif
{
int i, j;
int firstinrow;
/* Read the next input character */
-#if defined(M_PROTO)
int readchar(LOGICAL cap)
-#else
-int readchar(cap)
- LOGICAL cap;
-#endif
{
int c;
M_WCHAR wnl;
#endif
#include "basic.h"
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void main(argc, argv)
- int argc ;
- char **argv ;
+void main(int argc, char **argv)
{
if (argc != 2) {
fprintf(stderr, "Usage: emptyfil filename\n") ;
/* Entout has procedures to write generated entity TRIE */
-void entptr(
-#if defined(M_PROTO)
- M_ENTITY *data
-#endif
- ) ;
+void entptr(M_ENTITY *data);
-char *typetype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+char *typetype(int n);
-char *typewhere(
-#if defined(M_PROTO)
- unsigned char n
-#endif
- ) ;
+char *typewhere(unsigned char n);
/* Macro names written to output file */
char xdbuild[] = "M_DBUILD" ;
}
/* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
- unsigned char n ;
-#endif
{
switch(n) {
case M_DBUILD: return(xdbuild) ;
extern int m_line ;
extern LOGICAL errexit ;
-void eprefix(
-#if defined(M_PROTO)
- LOGICAL flag
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
- M_WCHAR *arg5
-#endif
- ) ;
-
-void esuffix(
-#if defined(M_PROTO)
- void
-#endif
- ) ;
-
-void msgline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void msg1line(
-#if defined(M_PROTO)
- char *text, char *arg1
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *text
-#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
- ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(M_NOPAR);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
/* Write error message prefix */
-#if defined(M_PROTO)
void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
- LOGICAL flag ;
-#endif
{
if (flag) errexit = TRUE ;
fprintf(stderr, "\n**** ") ;
/* Writes an error message with one argument to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
- char *text;
- M_WCHAR *arg ;
-#endif
{
char *mb_arg;
m_free(mb_arg,"multi-byte string");
}
-#if defined(M_PROTO)
void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg ;
-#endif
{
eprefix(TRUE) ;
fprintf(stderr, text, arg) ;
/* Writes an error message with two arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with three arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with five arguments to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
/* Writes a nonfatal error message with one argument to standard error
and file "error" */
-#if defined(M_PROTO)
void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
{
char *mb_arg;
/* Writes a nonfatal error message with two arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with three arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with four arguments to standard error
and file "error" */
-#if defined(M_PROTO)
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
#endif
#include "basic.h"
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
/* Exit function called by utilities used in PARSER and other programs in
the MARKUP system */
char linedir[] = "#line" ;
char *p = linedir, *q = linedir + 1 ;
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+int main(int argc, char **argv);
-void copyfile(
-#if defined(m_proto)
- char *pfile1, char *pfile2
-#endif
- ) ;
+void copyfile(char *pfile1, char *pfile2);
-int nextchar(
-#if defined (M_PROTO)
- FILE *file, struct data *data
-#endif
- ) ;
+int nextchar(FILE *file, struct data *data);
int main(argc, argv)
int argc ;
#endif
#include "basic.h"
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const char *arg
-#endif
- ) ;
+void m_err1(const char *text, const char *arg);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
+void m_inctest(int *count, int limit, char *message);
/* Increment a count and test against a limit */
void m_inctest(count, limit, message)
#include "common.h"
extern char m_chartype[M_CHARSETLEN] ;
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
void m_initctype(M_NOPAR)
{
int i ;
#include <string.h>
#include "basic.h"
-char *m_itoa(
-#if defined(M_PROTO)
- int n, char *s
-#endif
- ) ;
+char *m_itoa(int n, char *s);
-void reverse(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+void reverse(char *s);
char *m_itoa(n, s) /* convert n to characters in s */
char s[];
#include "basic.h"
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-#if defined(M_PROTO)
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) ;
return(FALSE) ;
#include "basic.h"
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
extern LOGICAL m_heapchk ;
extern LOGICAL m_malftrace ;
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_errline(char *text);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
+void m_free(void *block, char *msg);
-void m_heapdump(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void m_heapdump(M_NOPAR);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
+void *m_realloc(void *ptr, int size, char *msg);
-void *m_trace(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void *m_trace(char *text);
-void *m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
+void *m_wctrace(M_WCHAR *text);
void m_free(block, msg)
void *block ;
extern FILE *m_errfile ;
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
/* Open a file and check that the open succeeded */
void m_openchk(ptr, name, mode)
/* 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
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 )
-#else
-M_WCHAR *m_partype(par, string)
- int par ;
- M_WCHAR *string ;
-#endif /* M_PROTO */
{
LOGICAL first = TRUE ;
int kw ;
#if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j)
-int m_sprscon(
-#if defined(M_PROTO)
- int i, int j
-#endif
- ) ;
+int m_sprscon(int i, int j);
#else
#define m_newcon(i, j) m_nextcon[i][j]
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void m_entercharintrie(
-#if defined(M_PROTO)
- M_TRIE **currentnode, M_WCHAR c
-#endif
- ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
/* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
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_lookfortrie(p, xtrie) looks for string p in the specified trie,
returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
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 *m_gettrienode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+M_TRIE *m_gettrienode(M_NOPAR);
-void *m_lookfortrie(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_TRIE *xtrie
-#endif
- ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
-void *m_ntrtrie(
-#if defined(M_PROTO)
- M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
- ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
-void *m_resettrie(
-#if defined(M_PROTO)
- M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
- ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void printval(
-#if defined(M_PROTO)
- FILE *file, void *value
-#endif
- ) ;
+void printval(FILE *file, void *value);
/* Count the descendants of a node in order to generate declarations for
the packed form of a trie*/
FILE *file ;
M_TRIE *trieptr ;
int *count ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value);
{
M_TRIE *p ;
int savecount ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *xtrie, char *extname, int *count,
- void (*proc)(void *value)
-#endif
- ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+ void (*proc)(void *value));
/* Write the C declaration of a trie */
void m_dumptrie(file, xtrie, extname, count, proc)
M_TRIE *xtrie ;
char *extname ;
int *count ;
- void (*proc)(
-#if defined(M_PROTO)
- void *value
-#endif
- ) ;
+ void (*proc)(void *value);
{
int firstson ;
M_TRIE *p ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)(FILE *file, void *value));
/* Write the declaration of a packed trie to the specified files */
void dumpptrie(intname, extname, file, externdef, defdef, proc)
FILE *file ;
char *externdef ;
char *defdef ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value);
{
LOGICAL first = TRUE ;
int count = 0 ;
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie,
- M_WCHAR *name
-#endif
- ) ;
+int m_packedlook(M_PTRIE *xptrie,
+ M_WCHAR *name);
/* Look for the string NAME in the packed trie PTRIE */
int m_packedlook(xptrie, name)
#include "common.h"
extern M_CHARTYPE m_ctarray[256] ;
-int m_wcupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_WCHAR *q
-#endif
- ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const char *q
-#endif
- ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
- const char *p, const char *q
-#endif
- ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
-#if defined(M_PROTO)
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 {
if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
return(0) ;
}
-#if defined(M_PROTO)
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;
int retval;
return retval;
}
-#if defined(M_PROTO)
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;
int retval;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-int m_upper(c)
- int c ;
+int m_upper(int c)
{
if (c >= 'a' && c <= 'z') c += 'A' - 'a' ;
return(c) ;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-int m_upstrcmp(
-#if defined(M_PROTO)
- char *p, char *q
-#endif
- ) ;
-
-int m_upstrcmp(p, q)
- char *p, *q ;
+int m_upstrcmp(char *p, char *q)
{
do {
if (m_upper((int) *p) < m_upper((int) *q)) return(-1) ;
/* compare two wide character strings */
-#if defined(M_PROTO)
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;
/* copy a wide character string */
-#if defined(M_PROTO)
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;
/* 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)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int max;
-#endif
{
M_WCHAR *string1start;
/* get the length of a wide character string */
-#if defined(M_PROTO)
int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
{
int length;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
{
char *mb_string;
int length, retVal;
/* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
#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 */
-#if defined(M_PROTO)
LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
- M_WCHAR c ;
-#endif
{
char mb_c[32]; /* arbitrarily large */
int length;
BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
+M_WCHAR *MakeWideCharString(const char *from);
/* Addarc adds an arc from FSA state <from> to state <to> setting other
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)
-#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 ;
int determ ;
/* Saves the name of an element appearing on the left-hand side of a
grammar rule */
-#if defined(M_PROTO)
void savelhs(LOGICAL param)
-#else
-void savelhs(param)
- LOGICAL param ;
-#endif
{
STATE *end ;
ELTSTRUCT *errelt ;
/* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
int len ;
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
int i, ret ;
}
/* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
{
PTYPE *kw ;
int keycount ;
/* Proto.h contains function prototypes for program BUILD. */
-int addarc(
-#if defined(M_PROTO)
- STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
- int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void adddefent(
-#if defined(M_PROTO)
- M_WCHAR *mapname
-#endif
- ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
- M_WCHAR *name
-#endif
- ) ;
-
-void addex(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
- M_WCHAR *p, LOGICAL define
-#endif
- ) ;
-
-void addndent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void addpar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void addsref(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void checkand(
-#if defined(M_PROTO)
- ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
- ELTSTRUCT **errelt
-#endif
- ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
- STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
- ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
- STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
- ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
- STATELIST *from, STATELIST **to
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void defmapname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-char *deftype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void dellist(
-#if defined(M_PROTO)
- STATELIST **list
-#endif
- ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
- FILE *file,
- M_TRIE *value
-#endif
- ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)( FILE *, M_TRIE *)
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
+ int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(M_NOPAR);
+
+void addkeyword(M_NOPAR);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(M_NOPAR);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
+ ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(M_NOPAR);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(M_NOPAR);
+
+void done(M_NOPAR);
+
+void dumpentnode(FILE *file, M_TRIE *value);
+
+void dumpmapnode(FILE *file, M_TRIE *value);
+
+void dumpsrefnode(FILE *file,
+ M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
- FILE *tempfile
-#endif
- ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endmodel(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-char *enttype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void exout(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freetree(
-#if defined(M_PROTO)
- TREE *ruletree
-#endif
- ) ;
-
-void found(
-#if defined(M_PROTO)
- LOGICAL *flag, char *delim
-#endif
- ) ;
-
-void fsa(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-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
- ) ;
+ void (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(M_NOPAR);
+
+void endmodel(M_NOPAR);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+ANDGROUP *getand(M_NOPAR);
+
+LOGICAL getname(int first);
+
+STATE *getstate(M_NOPAR);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(M_NOPAR);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(M_NOPAR);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(M_NOPAR);
+
+void prulend(M_NOPAR);
+
+void push(M_NOPAR);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(M_NOPAR);
+
+void rulend(M_NOPAR);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(M_NOPAR);
+
+int scan(M_NOPAR);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(M_NOPAR);
+
+int m_sprscon(int i, int j);
+
+void srefout(M_NOPAR);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(M_NOPAR);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Add a short reference map name */
-#if defined(M_PROTO)
LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
{
MAP *old;
MAP *new;
/* 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)
-#else
-void closeiffile(flag, file, count, table, proto)
- LOGICAL flag;
- FILE *file;
- int count;
- char *table;
- char *proto;
-#endif
{
int i;
endcode(flag, file);
if (count) {
fprintf(file,
- "void (*m_%stable[])(\n#if defined(M_PROTO)\n %s\n#endif\n ) = {\n",
+ "void (*m_%stable[])(%s) = {\n",
table, proto);
fprintf(file, " m_%s1, /* Place holder for 1-based indexing */\n",
table);
}
else
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);
fclose(file);
}
}
/* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
- LOGICAL flag;
- FILE *file;
-#endif
{
if (flag) fprintf(file, "}}\n\n");
}
*flag = TRUE;
/* protoype */
fprintf(file,
- "void m_%s%d(\n#if defined(M_PROTO)\n %s\n#endif\n ) ;\n",
+ "void m_%s%d(%s);\n",
prefix,
caseno,
proto);
/* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-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);
+fprintf(file, "void m_%s%d(%s)\n {\n", prefix, caseno, proto);
for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
{
/* Proto.h contains function prototypes for program ELTDEF. */
-void actptrout(
-#if defined(M_PROTO)
- ACTION **array, char *name
-#endif
- ) ;
-
-void addent(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
- ) ;
-
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
-
-void cvalue(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-
-void done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file,
+void actptrout(ACTION **array, char *name);
+
+void addent(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(M_NOPAR);
+
+
+void done(M_NOPAR);
+
+void m_dumptrie(FILE *file,
M_TRIE *xtrie,
char *extname,
int *count,
- void (*proc)(M_ENTITY *)
-#endif
- ) ;
-
-void endcode(
-#if defined(M_PROTO)
- LOGICAL flag, FILE *file
-#endif
- ) ;
-
-void endini(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void endstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void entout(
-#if defined(M_PROTO)
- char *fname
-#endif
- ) ;
-
-void enttype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#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(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void freechain(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int getachar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int *getaction(
-#if defined(M_PROTO)
- ACTION **array
-#endif
- ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void getname(
-#if defined(M_PROTO)
- int first
-#endif
- ) ;
-
-int gettoken(
-#if defined(M_PROTO)
- int *c, int context
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void outpval(
-#if defined(M_PROTO)
- M_TRIE *p
-#endif
- ) ;
-
-void outstring(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-int scan(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void startcode(
-#if defined(M_PROTO)
- int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
- char *formal, char *formtype
-#endif
- ) ;
-
-void startelement(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storecvar(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void storepname(
-#if defined(M_PROTO)
- M_NOPAR
-#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 value(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void warning1(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+ void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(M_NOPAR);
+
+void endsignon(M_NOPAR);
+
+void endstring(M_NOPAR);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(M_NOPAR);
+
+int getachar(M_NOPAR);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(M_NOPAR);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(M_NOPAR);
+
+void initialize(M_NOPAR);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(M_NOPAR);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(M_NOPAR);
+
+void skiptoend(M_NOPAR);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+ char *formal, char *formtype);
+
+void startelement(M_NOPAR);
+
+void storecvar(M_NOPAR);
+
+void storepname(M_NOPAR);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
/* Function prototypes for HP Tag/TeX translator */
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-void options(
-#if defined(M_PROTO)
- LOGICAL filelenonly
-#endif
- ) ;
-
-void setopt(
-#if defined(M_PROTO)
- char *string, LOGICAL filelenonly
-#endif
- ) ;
-
-LOGICAL setvalopt(
-#if defined(M_PROTO)
- int thisopt, char *string, LOGICAL filelenonly
-#endif
- ) ;
-
-char *strstr(
-#if defined(M_PROTO)
- const char *s1, const char *s2
-#endif
- ) ;
-
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
-
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
-
-void PutString(
-#if defined(M_PROTO)
- char *string
-#endif
- ) ;
-
-void PutWString(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void PutWChar(
-#if defined(M_PROTO)
- M_WCHAR wchar
-#endif
- ) ;
-
-void SaveWChar(
-#if defined(M_PROTO)
- M_WCHAR wchar
-#endif
- ) ;
-
-void OpenTag(
-#if defined(M_PROTO)
- LOGICAL hasAttributes,
- LOGICAL newlineOK
-#endif
- ) ;
-
-void CloseTag(
-#if defined(M_PROTO)
- LOGICAL newlineOK
-#endif
- ) ;
-
-void ImpliedlAttribute(
-#if defined(M_PROTO)
- char *name,
- M_WCHAR *value
-#endif
- ) ;
-
-void RequiredAttribute(
-#if defined(M_PROTO)
- char *name,
- M_WCHAR *value
-#endif
- ) ;
-
-M_WCHAR *CopyWString(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-void MakeNewElement(
-#if defined(M_PROTO)
- ElementTypes type
-#endif
- ) ;
-
-void DeleteElement(
-#if defined(M_PROTO)
- ElementPtr pElement
-#endif
- ) ;
-
-void OptimizeAndEmit(
-#if defined(M_PROTO)
- ElementPtr pVirpage
-#endif
- ) ;
-
-void PushCurrentElement(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void PopCurrentElement(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-char *mb_realloc(
-#if defined(M_PROTO)
- char *ptr, long size
-#endif
- );
-
-char *mb_malloc(
-#if defined(M_PROTO)
- long size
-#endif
- );
-
-void mb_free(
-#if defined(M_PROTO)
- char **pptr
-#endif
- );
-
-void EmitSDL(
-#if defined(M_PROTO)
- ElementPtr pVirpage
-#endif
- ) ;
-
-int OpenFile(
-#if defined(M_PROTO)
- char *name, int type, int code
-#endif
- ) ;
-
-int ReadFile(
-#if defined(M_PROTO)
- int fd, char *name, char *buffer, int amount, int code
-#endif
- ) ;
-
-int WriteFile(
-#if defined(M_PROTO)
- int fd, char *name, char *buffer, int amount, int code
-#endif
- ) ;
-
-int FileExists(
-#if defined(M_PROTO)
- char *name
-#endif
- ) ;
-
-void AssertFileIsReadable(
-#if defined(M_PROTO)
- char *name, int code
-#endif
- ) ;
-
-int FileSize(
-#if defined(M_PROTO)
- char *name, int code
-#endif
- ) ;
-
-void CloseFile(
-#if defined(M_PROTO)
- int fd, char *name, int code
-#endif
- ) ;
-
-FILE *FopenFile(
-#if defined(M_PROTO)
- char *name, int type, int code
-#endif
- ) ;
-
-int GetALine(
-#if defined(M_PROTO)
- FILE *file, char *name, char *line, int max, int code
-#endif
- ) ;
-
-int FreadFile(
-#if defined(M_PROTO)
- FILE *file, char *name, char *buffer, int amount, int code
-#endif
- ) ;
-
-void FwriteFile(
-#if defined(M_PROTO)
- FILE *file, char *name, char *buffer, size_t amount, int code
-#endif
- ) ;
-
-void FcloseFile(
-#if defined(M_PROTO)
- FILE *file, char *name, int code
-#endif
- ) ;
-
-int StringToUpper(
-#if defined(M_PROTO)
- char *string
-#endif
- ) ;
-
-void BuildIndex(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void OpenDocument(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void CloseDocument(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void UpdateTossFileName(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void SetLocale(
-#if defined(M_PROTO)
- M_WCHAR *pLang, M_WCHAR *pCharset
-#endif
- ) ;
+int m_lower(int c);
+
+void options(LOGICAL filelenonly);
+
+void setopt(char *string, LOGICAL filelenonly);
+
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
+
+char *strstr(const char *s1, const char *s2);
+
+int m_upper(int c);
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+void PutString(char *string);
+
+void PutWString(M_WCHAR *string);
+
+void PutWChar(M_WCHAR wchar);
+
+void SaveWChar(M_WCHAR wchar);
+
+void OpenTag(LOGICAL hasAttributes,
+ LOGICAL newlineOK);
+
+void CloseTag(LOGICAL newlineOK);
+
+void ImpliedlAttribute(char *name,
+ M_WCHAR *value);
+
+void RequiredAttribute(char *name,
+ M_WCHAR *value);
+
+M_WCHAR *CopyWString(M_WCHAR *string);
+
+void MakeNewElement(ElementTypes type);
+
+void DeleteElement(ElementPtr pElement);
+
+void OptimizeAndEmit(ElementPtr pVirpage);
+
+void PushCurrentElement(M_NOPAR);
+
+void PopCurrentElement(M_NOPAR);
+
+char *mb_realloc( char *ptr, long size);
+
+char *mb_malloc( long size);
+
+void mb_free( char **pptr);
+
+void EmitSDL(ElementPtr pVirpage);
+
+int OpenFile(char *name, int type, int code);
+
+int ReadFile(int fd, char *name, char *buffer, int amount, int code);
+
+int WriteFile(int fd, char *name, char *buffer, int amount, int code);
+
+int FileExists(char *name);
+
+void AssertFileIsReadable(char *name, int code);
+
+int FileSize(char *name, int code);
+
+void CloseFile(int fd, char *name, int code);
+
+FILE *FopenFile(char *name, int type, int code);
+
+int GetALine(FILE *file, char *name, char *line, int max, int code);
+
+int FreadFile(FILE *file, char *name, char *buffer, int amount, int code);
+
+void FwriteFile(FILE *file, char *name, char *buffer, size_t amount, int code);
+
+void FcloseFile(FILE *file, char *name, int code);
+
+int StringToUpper(char *string);
+
+void BuildIndex(M_NOPAR);
+
+void OpenDocument(M_NOPAR);
+
+void CloseDocument(M_NOPAR);
+
+void UpdateTossFileName(M_NOPAR);
+
+void SetLocale(M_WCHAR *pLang, M_WCHAR *pCharset);
#define TAGDOTOPT "helptag.opt"
#define DOTOPT ".opt"
-#if defined(M_PROTO)
void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
- LOGICAL filelenonly;
-#endif
{
int i;
FILE *optfile;
/* Set a single option */
/* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int thisopt;
}
/* Process a value for a command line option */
-#if defined(M_PROTO)
LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
{
char *p;
int i;
#include "userinc.h"
#include "globdec.h"
-#if defined(M_PROTO)
void PutString(char *string)
-#else
-void PutString(string)
-char *string;
-#endif
{
fputs(string, outFile);
}
-#if defined(M_PROTO)
void PutWString(M_WCHAR *string)
-#else
-void PutWString(string)
-M_WCHAR *string;
-#endif
{
char *mb_string;
m_free(mb_string, "Multi-byte string");
}
-#if defined(M_PROTO)
void PutWChar(M_WCHAR wchar)
-#else
-void PutWChar(wchar)
-M_WCHAR wchar;
-#endif
{
M_WCHAR wc_string[2];
char *mb_string;
m_free(mb_string, "Multi-byte string");
}
-#if defined(M_PROTO)
void SaveWChar(M_WCHAR wchar)
-#else
-void SaveWChar(wchar)
-M_WCHAR wchar;
-#endif
{
CDATA_el *pCdata;
static char wideCharacterString[] = "wide character string";
-#if defined(M_PROTO)
char *mb_malloc(long size)
-#else
-char *mb_malloc(size)
-long size;
-#endif
{
char *cptr;
size_t ssize;
}
-#if defined(M_PROTO)
void mb_free(char **pptr)
-#else
-void *mb_free(pptr)
-char **pptr;
-#endif
{
#if DEBUG_MB_MALLOC
}
-#if defined(M_PROTO)
char *mb_realloc(char *ptr, long size)
-#else
-char *mb_realloc(ptr, size)
-char *ptr;
-long size;
-#endif
{
void *vptr;
size_t ssize;
}
-#if defined(M_PROTO)
void OpenTag(LOGICAL hasAttributes, LOGICAL newlineOK)
-#else
-void OpenTag(hasAttributes, newlineOK)
- LOGICAL hasAttributes;
- LOGICAL newlineOK;
-#endif
{
PutString("<");
PutWString(m_parent(0));
}
-#if defined(M_PROTO)
static void OpenNamedTag(char *name, LOGICAL hasAttributes, LOGICAL newlineOK)
-#else
-static void OpenNamedTag(name, hasAttributes, newlineOK)
- LOGICAL hasAttributes;
- LOGICAL newlineOK;
- char *name;
-#endif
{
PutString("<");
PutString(name);
}
-#if defined(M_PROTO)
void CloseTag(LOGICAL newlineOK)
-#else
-void CloseTag(newlineOK)
- LOGICAL newlineOK;
-#endif
{
char *etagc;
}
-#if defined(M_PROTO)
static void CloseNamedTag(char *name, LOGICAL newlineOK)
-#else
-static void CloseNamedTag(name, newlineOK)
- LOGICAL newlineOK;
- char *name;
-#endif
{
char *etagc;
}
-#if defined(M_PROTO)
void ImpliedAttribute(char *name, M_WCHAR *value)
-#else
-void ImpliedAttribute(name, value)
- char *name;
- M_WCHAR *value;
-#endif
{
if (value)
{
}
-#if defined(M_PROTO)
void RequiredAttribute(char *name, M_WCHAR *value)
-#else
-void RequiredAttribute(name, value)
- char *name;
- M_WCHAR *value;
-#endif
{
M_WCHAR null;
M_WCHAR *wc_name;
}
-#if defined(M_PROTO)
M_WCHAR *CopyWString(M_WCHAR *string)
-#else
-M_WCHAR *CopyWString(string)
- M_WCHAR *string;
-#endif
{
M_WCHAR *retVal;
}
-#if defined(M_PROTO)
void MakeNewElement(ElementTypes type)
-#else
-void MakeNewElement(type)
- ElementTypes type;
-#endif
{
pCurrentElement = (ElementPtr) mb_malloc(sizeof(Element));
memset((void *) pCurrentElement, 0, sizeof(Element));
}
-#if defined(M_PROTO)
void DeleteElement(ElementPtr pElement)
-#else
-void DeleteElement(pElement)
- ElementPtr pElement;
-#endif
{
switch (pElement->type)
{
static int thisElementStackSize = 0;
static int thisElementStackTop = -1;
-#if defined(M_PROTO)
static void PushThisElement(ElementPtr pThis)
-#else
-static void PushThisElement(pThis)
- ElementPtr pThis;
-#endif
{
thisElementStackTop++;
if (thisElementStackSize == 0)
* the .sdl file. These occurrences are an artifact of translation
* and seem to be easier to get rid of here than in the first pass.
*/
-#if defined(M_PROTO)
static void RemoveSuperfluousBlocks(ElementPtr *ppBlockOrForm)
-#else
-static void RemoveSuperfluousBlocks(ppBlockOrForm)
- ElementPtr *ppBlockOrForm;
-#endif
{
ElementPtr pElement, pFdata;
ElementPtr *ppBack;
}
-#if defined(M_PROTO)
static void ReplaceFormWithBlock(ElementPtr *ppBlockOrForm)
-#else
-static void ReplaceFormWithBlock(ppBlockOrForm)
- ElementPtr ppBlockOrForm;
-#endif
{
ElementPtr pElement, pFstyle, pFrowvec, pFdata, pSubElement;
ElementPtr *ppBack;
}
-#if defined(M_PROTO)
static void OptimizeSDL(ElementPtr *ppBlockOrForm)
-#else
-static void OptimizeSDL(ppBlockOrForm)
- ElementPtr ppBlockOrForm;
-#endif
{
ReplaceFormWithBlock(ppBlockOrForm);
RemoveSuperfluousBlocks(ppBlockOrForm);
* update the offsets when adding the INDEX and LOIDS; also when
* compressing the VSTRUCT
*/
-#if defined(M_PROTO)
static void AddToLOIDS(char *pElementName,
M_WCHAR *pwcId,
M_WCHAR *pwcSSI,
M_WCHAR *pwcLevel,
long int virpageOffset)
-#else
-static void AddToLOIDS(pElementName, pwcId, pwcSSI, pwcLevel, virpageOffset)
-char *pElementName;
-M_WCHAR *pwcId;
-M_WCHAR *pwcSSI;
-M_WCHAR *pwcLevel;
-long int virpageOffset;
-#endif
{
LoidsPtr pNewId;
/* compress or decompress a file; return the size after (de)compression
*/
-#if defined(M_PROTO)
static int Compress(char *fileName, char *zFileName, LOGICAL doCompress)
-#else
-int Compress(fileName, zFileName, doCompress)
- char *fileName;
- char *zFileName;
- LOGICAL doCompress;
-#endif
{
char cmd[BUFSIZ];
int errStatus;
/* A function too lookup a TOSS element and mark it as used if the
* lookup succeeds.
*/
-#if defined(M_PROTO)
static void MarkUsedStyle(M_WCHAR *level, M_WCHAR *class, M_WCHAR *ssi)
-#else
-static void MarkUsedStyle(level, class, ssi)
- M_WCHAR *level;
- M_WCHAR *class;
- M_WCHAR *ssi;
-#endif
{
ElementPtr pThis;
M_WCHAR *rlevel = NULL, *rclass = NULL, *rssi = NULL;
/* Look for "rid" in the "pSnb" list. Return the element if found,
* NULL otherwise.
*/
-#if defined(M_PROTO)
static ElementPtr LookupInSnb(ElementPtr pSnb, M_WCHAR *rid)
-#else
-static ElementPtr LookupInSnb(pSnb, rid)
- ElementPtr pSnb;
- M_WCHAR *rid;
-#endif
{
ElementPtr pThis;
M_WCHAR **pId;
* nodes in the sub-tree are either marked or all clear. Once a clear
* node is found, the tree is not descended further.
*/
-#if defined(M_PROTO)
static void ClearTree(ElementPtr pRoot)
-#else
-static void ClearTree(pRoot)
- ElementPtr pRoot;
-#endif
{
ElementPtr pThis;
static char errMess[] =
/* A function to mark all elements in the TOSS that have been used
* by the document up to this point.
*/
-#if defined(M_PROTO)
static void MarkUsedTOSS(ElementPtr pRoot)
-#else
-static void MarkUsedTOSS(pRoot)
- ElementPtr pRoot;
-#endif
{
ElementPtr pParent, pSnb, pItem, pThis;
static char errMess[] =
}
-#if defined(M_PROTO)
void EmitSDL(ElementPtr pRoot)
-#else
-void EmitSDL(pRoot)
- ElementPtr pRoot;
-#endif
{
ElementPtr pThis, pThat;
long int virpageOffset;
}
-#if defined(M_PROTO)
void OptimizeAndEmit(ElementPtr pVirpage)
-#else
-void OptimizeAndEmit(pVirpage)
- ElementPtr pVirpage;
-#endif
{
if (optimizeFlag)
OptimizeSDL(&(pVirpage->u.u_virpage.pBlockOrForm));
* Of course, when using the unbuffered versions we attempt to read in
* BUFSIZ characters at a time.
*/
-#if defined(M_PROTO)
int OpenFile(char *name, int type, int code)
-#else
-int OpenFile(name, type, code)
- char *name;
- int type;
- int code;
-#endif
{
int fd;
int oflag, mode;
}
-#if defined(M_PROTO)
int ReadFile(int fd, char *name, char *buffer, int amount, int code)
-#else
-int ReadFile(fd, name, buffer, amount, code)
- int fd;
- char *name;
- char *buffer;
- int amount;
- int code;
-#endif
{
int length;
}
-#if defined(M_PROTO)
int WriteFile(int fd, char *name, char *buffer, int amount, int code)
-#else
-int WriteFile(fd, name, buffer, amount, code)
-int fd;
- char *name;
- char *buffer;
- int amount;
- int code;
-#endif
{
int length;
}
-#if defined(M_PROTO)
int FileExists(char *name)
-#else
-int FileExists(name)
- char *name;
-#endif
{
if (access(name, F_OK) == 0) return 1;
return 0;
}
-#if defined(M_PROTO)
void AssertFileIsReadable(char *name, int code)
-#else
-void AssertFileIsReadable(name, code)
- char *name;
- int code;
-#endif
{
if (access(name, R_OK) == -1)
{
}
-#if defined(M_PROTO)
int FileSize(char *name, int code)
-#else
-int FileSize(name, code)
- char *name;
- int code;
-#endif
{
struct stat buf;
}
-#if defined(M_PROTO)
void CloseFile(int fd, char *name, int code)
-#else
-void CloseFile(fd, name, code)
- int fd;
- char *name;
- int code;
-#endif
{
if (close(fd) == -1)
{
}
-#if defined(M_PROTO)
FILE * FopenFile(char *name, int type, int code)
-#else
-FILE * FopenFile(name, type, code)
- char *name;
- int type;
- int code;
-#endif
{
FILE *file;
char *mode;
}
-#if defined(M_PROTO)
int GetALine(FILE *file, char *name, char *line, int max, int code)
-#else
-int GetALine(file, name, line, max, code)
- FILE *file;
- char *name;
- char *line;
- int max;
- int code;
-#endif
{
char *pc;
int length;
}
-#if defined(M_PROTO)
int FreadFile(FILE *file, char *name, char *buffer, int amount, int code)
-#else
-int FreadFile(file, name, buffer, amount, code)
- FILE *file;
- char *name;
- char *buffer;
- int amount;
- int code;
-#endif
{
int length;
}
-#if defined(M_PROTO)
void FwriteFile(FILE *file, char *name, char *buffer, size_t amount, int code)
-#else
-void FwriteFile(file, name, buffer, amount, code)
- FILE *file;
- char *name;
- char *buffer;
- size_t amount;
- int code;
-#endif
{
if (fwrite(buffer, 1, amount, file) != amount)
{
}
-#if defined(M_PROTO)
void FcloseFile(FILE *file, char *name, int code)
-#else
-void FcloseFile(file, name, code)
- FILE *file;
- char *name;
- int code;
-#endif
{
if (fclose(file) != 0)
{
}
-#if defined(M_PROTO)
int StringToUpper(char *string)
-#else
-int StringToUpper(string)
- char *string;
-#endif
{
char *pc, c;
/* Cyclent.c contains procedure m_cyclent(), callable by interface
designers, to cycle through all defined entities, returning information
about them */
-#if defined(M_PROTO)
static M_WCHAR *CycleEnt(LOGICAL init,
unsigned char *type,
M_WCHAR ***content,
unsigned char *wheredef)
-#else
-static M_WCHAR *m_CycleEnt(init, type, content, wheredef)
- LOGICAL init ;
- unsigned char *type ;
- M_WCHAR ***content ;
- unsigned char *wheredef ;
-#endif
{
static M_TRIE *current ;
static M_TRIE *ancestor[M_NAMELEN + 1] ;
* standard versions.
*/
void
-#if defined(M_PROTO)
SetLocale(M_WCHAR *pLang, M_WCHAR *pCharset)
-#else
-SetLocale(pLang, pCharset)
-M_WCHAR *pLang;
-M_WCHAR *pCharset;
-#endif
{
const char cString[] = "C";
_DtXlateDb myDb = NULL;
}
/* 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)
-#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;
M_PARSE *stackp;
}
/* Output a start-string or end-string */
-#if defined(M_PROTO)
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];
int i, par;
#include "parser.h"
#include "entext.h"
-#if defined(M_PROTO)
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 *ancestor[M_NAMELEN + 1] ;
#include "entext.h"
/* Process the name in a usemap delaration */
-#if defined(M_PROTO)
void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
- M_WCHAR *name ;
- LOGICAL useoradd ;
-#endif
{
int mapid ;
}
/* Issue error message (one argument) */
-#if defined(M_PROTO)
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;
}
-#if defined(M_PROTO)
void m_mberr1(
const char *text,
const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg;
-#endif
{
M_WCHAR *wc_arg;
}
/* Issue error message (two arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
-#endif
{
char *buffer;
char *mb_arg1,*mb_arg2;
}
/* Issue error message (three arguments) */
-#if defined(M_PROTO)
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;
- M_WCHAR *arg2;
- M_WCHAR *arg3;
-#endif
{
char *buffer;
char *mb_arg1, *mb_arg2, *mb_arg3;
}
/* Issue error message (four arguments) */
-#if defined(M_PROTO)
void m_err4(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg2,
M_WCHAR *arg3,
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 *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
}
/* Issue error message (five arguments) */
-#if defined(M_PROTO)
void m_err5(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg3,
M_WCHAR *arg4,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
}
/* Issue error message (six arguments) */
-#if defined(M_PROTO)
void m_err6(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg4,
M_WCHAR *arg5,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
}
/* Issue error message (seven arguments) */
-#if defined(M_PROTO)
void m_err7(
char *text,
M_WCHAR *arg1,
M_WCHAR *arg5,
M_WCHAR *arg6,
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 *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
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
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 )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
{
M_ELEMENT eltid ;
int par ;
}
/* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
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 &&
m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
/* Temporary pointers to parameter values. Used while scanning start tag
before element is placed on parse stack.*/
M_PAREXTERN
-#if defined M_PROTO
-#endif
M_WCHAR *m_poccur[
#if defined(M_PARDEF)
M_MAXPAR ? M_MAXPAR : 1
/* Function callable by interface designers. Returns TRUE if specified value
is a legal value for the indicated parameter of the given element,
FALSE otherwise. */
-#if defined(M_PROTO)
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 ;
int par ;
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: proto.h /main/3 1995/11/08 10:57:56 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
-
-void m_attval(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL neednet
-#endif
- ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
- M_WCHAR *name, LOGICAL useoradd
-#endif
- ) ;
-
-void m_closent(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
- int m_ent
-#endif
- ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
- LOGICAL init, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_done(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
- M_WCHAR *file, int line
-#endif
- ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
- int type
-#endif
- ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
- M_ELEMENT c
-#endif
- ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
- M_ENTITY *openent
-#endif
- ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err4(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5
-#endif
- ) ;
-
-void m_err6(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
- ) ;
-
-void m_err7(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
- M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
- M_ELEMENT elt
-#endif
- ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
- ) ;
-
-void m_expline(
-#if defined(M_PROTO)
- LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
- ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
- LOGICAL *expstart, M_PARSE *stackptr
-#endif
- ) ;
-
-int m_findact(
-#if defined(M_PROTO)
- M_ELEMENT elt, int *array
-#endif
- ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
- M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
- LOGICAL wild
-#endif
- ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
- const char *elt, const char *param, const M_WCHAR *value
-#endif
- ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
- M_STATE from, int *newleft
-#endif
- ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
- M_ELEMENT val
-#endif
- ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
- M_MIN *min
- , char *msg
-#endif
- ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
- M_PARSE *stackelt
-#endif
- ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
- int srlen, int context
-#endif
- ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
- M_HOLDTYPE *dchar
-#endif
- ) ;
-
-int m_getc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
- int n, LOGICAL *flag
-#endif
- ) ;
-
-void m_getline(
-#if defined(M_PROTO)
- M_WCHAR **file, int *line
-#endif
- ) ;
-
-void m_getname(
-#if defined(M_PROTO)
- M_WCHAR first
-#endif
- ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
- int *c, M_HOLDTYPE *dchar, int context
-#endif
- ) ;
-
-void m_globes(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_globss(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_level(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
- char *elt
-#endif
- ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
- int delim
-#endif
- ) ;
-
-void m_longent(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
- M_WCHAR *name, unsigned char *type, M_WCHAR **content,
- unsigned char *wheredef
-#endif
- ) ;
-
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
- ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
- M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
- ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
- int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
- unsigned char type
-#endif
- ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
- M_WCHAR *entcontent
-#endif
- ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie, M_WCHAR *name
-#endif
- ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
- M_WCHAR *elt
-#endif
- ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
- ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
- M_WCHAR *elt, int n
-#endif
- ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
- char *elt, int n
-#endif
- ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#endif
- ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
- int par, M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
- M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
- ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
- M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
- ) ;
-
-void m_pop(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_push(
-#if defined(M_PROTO)
- M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
- ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
- void *data, int n
-#endif
- ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
-
-int m_scan(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
- int map, LOGICAL useoradd
-#endif
- ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
- M_WCHAR **cvar, int par
-#endif
- ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
- int context
-#endif
- ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
- M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
- ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
- int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
- ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
- M_ELEMENT m_elt
-#endif
- ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
- int m_action
-#endif
- ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
- int scanval
-#endif
- ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
- M_ELEMENT scanval
-#endif
- ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
- M_ELEMENT val, LOGICAL net
-#endif
- ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
- M_WCHAR m_textchar
-#endif
- ) ;
-
-void m_textout(
-#if defined(M_PROTO)
- char *format, LOGICAL start, LOGICAL end
-#endif
- ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *p
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *p
-#endif
- ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
- M_ELEMENT label, LOGICAL recur
-#endif
- ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
- M_WCHAR *delim, LOGICAL flag
-#endif
- ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
- int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
- ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
- const int par, const M_WCHAR *string
-#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
- ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
- M_WCHAR *string
-#endif
- ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+int m_actgetc(M_NOPAR);
+
+void m_adjuststate(M_NOPAR);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(M_NOPAR);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(M_NOPAR);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(M_NOPAR);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(M_NOPAR);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+ M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(M_NOPAR);
+
+void m_exit(int status);
+
+void m_etcomplete(M_NOPAR);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(M_NOPAR);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(M_NOPAR);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index,
+ LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(M_NOPAR);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min
+ , char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(M_NOPAR);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(M_NOPAR);
+
+void m_globss(M_NOPAR);
+
+void m_holdproc(M_NOPAR);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(M_NOPAR);
+
+void m_initialize(M_NOPAR);
+
+void m_lastchars(M_NOPAR);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
+ unsigned char *wheredef);
+
+void main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank,
+ unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(M_NOPAR);
+
+LOGICAL m_omitend(M_NOPAR);
+
+LOGICAL m_omitstart(M_NOPAR);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(M_NOPAR);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(M_NOPAR);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(M_NOPAR);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(M_NOPAR);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(M_NOPAR);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(M_NOPAR);
+
+void m_signmsg(char *p);
+
+void m_sigre(M_NOPAR);
+
+void m_startdoc(M_NOPAR);
+
+void m_startmsg(M_NOPAR);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(M_NOPAR);
+
+void m_stkdefaultparams(M_NOPAR);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(M_NOPAR);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(M_NOPAR);
+
+M_WCHAR *m_thisfile(M_NOPAR);
+
+int m_thisline(M_NOPAR);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(M_NOPAR);
+
+LOGICAL m_whitespace(M_WCHAR c);
}
/* Reads a name token */
-#if defined(M_PROTO)
void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
- M_WCHAR first ;
-#endif
{
M_WCHAR *p ;
M_HOLDTYPE dchar ;
}
/* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
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 (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
/* Have found one character in a possible short reference delimiter.
Prepare to look for the next one */
-#if defined(M_PROTO)
void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
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 ;
char mb_re,mb_seqchar, mb_rschar;
/* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
- int map ;
- LOGICAL useoradd ;
-#endif
{
int i ;
int sref ;
/* Returns a context-dependent delimiter string to input stream so
characters can be reread one at a time in another context */
-#if defined(M_PROTO)
void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
- M_WCHAR *delim ;
- LOGICAL flag ;
-#endif
{
M_WCHAR *p ;
/* 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
may be in the expansion of an entity*/
-#if defined(M_PROTO)
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] ;
int length;
/* Include generated code */
#include "stfile.c"
-#if defined(M_PROTO)
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_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
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
elements as well. */
-#if defined(M_PROTO)
LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
- M_ELEMENT val ;
- LOGICAL neednet ;
- #endif
{
M_PARSE *stackptr ;
M_OPENFSA *fsastack ;
/* Pushes a new item onto the parse stack, setting its element, current,
and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
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 ;
}
/* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
- M_ELEMENT val ;
- LOGICAL net ;
-#endif
{
m_transition(val, TRUE) ;
if (val) {
/* Returns TRUE iff LABEL allowed in the current state of the current
element (without expanding any minimization). May result in changes
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)
-#else
-LOGICAL m_transition(label, recur)
- M_ELEMENT label ;
- LOGICAL recur ;
-#endif
{
M_ARC parc ;
M_OPENFSA *newfsa ;
#define M_BUFLEN (32)
/* When a text character occurs */
-#if defined(M_PROTO)
void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
- M_WCHAR m_textchar ;
- #endif
{
char buffer[M_BUFLEN] ;
char mb_re;
*/
#include "basic.h"
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
/* Test if a string contains only white space characters */
-#if defined(M_PROTO)
LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
{
const M_WCHAR *p ;
/* For function prototypes */
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
-#else
-#define M_PROTO
+
#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
- const M_WCHAR *from
-#endif
- );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
- const char *from
-#endif
- );
-
-int w_strcmp(
-#if defined(M_PROTO)
- const M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-int w_strncmp(
-#if defined(M_PROTO)
- const M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
- );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2
-#endif
- );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
- M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
- );
-
-int w_strlen(
-#if defined(M_PROTO)
- const M_WCHAR *string
-#endif
- );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
- M_WCHAR *string, const M_WCHAR chr
-#endif
- );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
- M_WCHAR *string1, M_WCHAR *string2
-#endif
- );
-
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
-
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
- void *m_ptr
-#endif
- ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+int w_strncmp(const M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
+
+void m_free(void *block, char *msg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+int mb_getwc(void *m_ptr);
#define CONTINIT(a)
#endif
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpdlmptr(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void dumpdlmptr(M_NOPAR);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
-void dumptree(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void dumptree(LOGICAL sparse);
-void enterdelim(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void enterdelim(int n);
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_error(char *text);
-void m_err1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void m_err1(char *text, char *arg);
-void getcode(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+void getcode(int n);
-void getcolon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void getcolon(M_NOPAR);
-int getContext(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+int getContext(M_NOPAR);
-LOGICAL getdname(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+LOGICAL getdname(M_NOPAR);
-void inccon(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void inccon(M_NOPAR);
-void incdelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void incdelim(M_NOPAR);
-void loaddelim(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void loaddelim(M_NOPAR);
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
-int main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+int main(int argc, char **argv);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void nextcon(
-#if defined(M_PROTO)
- LOGICAL sparse
-#endif
- ) ;
+void nextcon(LOGICAL sparse);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
-void printval(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *value
-#endif
- ) ;
+void printval(FILE *file, M_TRIE *value);
-void prtctxt(
-#if defined(M_PROTO)
- int column, int value
-#endif
- ) ;
+void prtctxt(int column, int value);
-int readchar(
-#if defined(M_PROTO)
- LOGICAL cap
-#endif
- ) ;
+int readchar(LOGICAL cap);
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void skiptoend(M_NOPAR);
-void unread(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+void unread(int c);
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-void warning(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void warning(char *text);
-void warning1(
-#if defined(M_PROTO)
- char *text, char *arg
-#endif
- ) ;
+void warning1(char *text, char *arg);
-void warning2(
-#if defined(M_PROTO)
- char *text, char *arg1, char *arg2
-#endif
- ) ;
+void warning2(char *text, char *arg1, char *arg2);
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
#define NOMORE -1
}
/* Output the generated data structures */
-#if defined(M_PROTO)
void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
- LOGICAL sparse;
-#endif
{
int i, count = 0;
}
/* Output transition matrix */
-#if defined(M_PROTO)
void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
- LOGICAL sparse;
-#endif
{
int i, j;
int firstinrow;
/* Read the next input character */
-#if defined(M_PROTO)
int readchar(LOGICAL cap)
-#else
-int readchar(cap)
- LOGICAL cap;
-#endif
{
int c;
M_WCHAR wnl;
#endif
#include "basic.h"
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+void main(int argc, char **argv);
void main(argc, argv)
int argc ;
/* Entout has procedures to write generated entity TRIE */
-void entptr(
-#if defined(M_PROTO)
- M_ENTITY *data
-#endif
- ) ;
+void entptr(M_ENTITY *data);
-char *typetype(
-#if defined(M_PROTO)
- int n
-#endif
- ) ;
+char *typetype(int n);
-char *typewhere(
-#if defined(M_PROTO)
- unsigned char n
-#endif
- ) ;
+char *typewhere(unsigned char n);
/* Macro names written to output file */
char xdbuild[] = "M_DBUILD" ;
}
/* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
- unsigned char n ;
-#endif
{
switch(n) {
case M_DBUILD: return(xdbuild) ;
extern int m_line ;
extern LOGICAL errexit ;
-void eprefix(
-#if defined(M_PROTO)
- LOGICAL flag
-#endif
- ) ;
-
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_error(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void m_err1(
-#if defined(M_PROTO)
- char *text, const M_WCHAR *arg
-#endif
- ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
- char *text, const char *arg
-#endif
- ) ;
-
-void m_err2(
-#if defined(M_PROTO)
- const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
- ) ;
-
-void m_err3(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
- ) ;
-
-void m_err5(
-#if defined(M_PROTO)
- char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
- M_WCHAR *arg5
-#endif
- ) ;
-
-void esuffix(
-#if defined(M_PROTO)
- void
-#endif
- ) ;
-
-void msgline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
-
-void msg1line(
-#if defined(M_PROTO)
- char *text, char *arg1
-#endif
- ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
-
-void m_trace(
-#if defined(M_PROTO)
- char *text
-#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
- ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(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);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(M_NOPAR);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(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);
/* Write error message prefix */
-#if defined(M_PROTO)
void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
- LOGICAL flag ;
-#endif
{
if (flag) errexit = TRUE ;
fprintf(stderr, "\n**** ") ;
/* Writes an error message with one argument to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
- char *text;
- M_WCHAR *arg ;
-#endif
{
char *mb_arg;
m_free(mb_arg,"multi-byte string");
}
-#if defined(M_PROTO)
void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
- char *text;
- char *arg ;
-#endif
{
eprefix(TRUE) ;
fprintf(stderr, text, arg) ;
/* Writes an error message with two arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with three arguments to standard error and file
"error" */
-#if defined(M_PROTO)
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;
/* Writes an error message with five arguments to standard error and file
"error" */
-#if defined(M_PROTO)
void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
/* Writes a nonfatal error message with one argument to standard error
and file "error" */
-#if defined(M_PROTO)
void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
{
char *mb_arg;
/* Writes a nonfatal error message with two arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with three arguments to standard error
and file "error" */
-#if defined(M_PROTO)
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;
/* Writes a nonfatal error message with four arguments to standard error
and file "error" */
-#if defined(M_PROTO)
void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
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;
#endif
#include "basic.h"
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
/* Exit function called by utilities used in PARSER and other programs in
the MARKUP system */
char linedir[] = "#line" ;
char *p = linedir, *q = linedir + 1 ;
-void main(
-#if defined(M_PROTO)
- int argc, char **argv
-#endif
- ) ;
+void main(int argc, char **argv);
-void copyfile(
-#if defined(m_proto)
- char *pfile1, char *pfile2
-#endif
- ) ;
+void copyfile(char *pfile1, char *pfile2);
-int nextchar(
-#if defined (M_PROTO)
- FILE *file, struct data *data
-#endif
- ) ;
+int nextchar(FILE *file, struct data *data);
void main(argc, argv)
int argc ;
#endif
#include "basic.h"
-void m_err1(
-#if defined(M_PROTO)
- const char *text, const char *arg
-#endif
- ) ;
+void m_err1(const char *text, const char *arg);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_inctest(
-#if defined(M_PROTO)
- int *count, int limit, char *message
-#endif
- ) ;
+void m_inctest(int *count, int limit, char *message);
/* Increment a count and test against a limit */
void m_inctest(count, limit, message)
#include "common.h"
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)
{
#include <string.h>
#include "basic.h"
-char *m_itoa(
-#if defined(M_PROTO)
- int n, char *s
-#endif
- ) ;
+char *m_itoa(int n, char *s);
-void reverse(
-#if defined(M_PROTO)
- char *s
-#endif
- ) ;
+void reverse(char *s);
char *m_itoa(n, s) /* convert n to characters in s */
char s[];
#include "basic.h"
-LOGICAL m_letter(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
-
-#if defined(M_PROTO)
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) ;
return(FALSE) ;
#include "basic.h"
-int m_lower(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_lower(int c);
extern LOGICAL m_heapchk ;
extern LOGICAL m_malftrace ;
-void m_errline(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void m_errline(char *text);
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_free(
-#if defined(M_PROTO)
- void *block, char *msg
-#endif
- ) ;
+void m_free(void *block, char *msg);
-void m_heapdump(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+void m_heapdump(M_NOPAR);
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void *m_realloc(
-#if defined(M_PROTO)
- void *ptr, int size, char *msg
-#endif
- ) ;
+void *m_realloc(void *ptr, int size, char *msg);
-void *m_trace(
-#if defined(M_PROTO)
- char *text
-#endif
- ) ;
+void *m_trace(char *text);
-void *m_wctrace(
-#if defined(M_PROTO)
- M_WCHAR *text
-#endif
- ) ;
+void *m_wctrace(M_WCHAR *text);
void m_free(void *block, char *msg)
{
extern FILE *m_errfile ;
-void m_exit(
-#if defined(M_PROTO)
- int status
-#endif
- ) ;
+void m_exit(int status);
-void m_openchk(
-#if defined(M_PROTO)
- FILE **ptr, char *name, char *mode
-#endif
- ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
/* Open a file and check that the open succeeded */
void m_openchk(ptr, name, mode)
/* 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
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 )
-#else
-M_WCHAR *m_partype(par, string)
- int par ;
- M_WCHAR *string ;
-#endif /* M_PROTO */
{
LOGICAL first = TRUE ;
int kw ;
#if defined(sparse)
#define m_newcon(i, j) m_sprscon(i, j)
-int m_sprscon(
-#if defined(M_PROTO)
- int i, int j
-#endif
- ) ;
+int m_sprscon(int i, int j);
#else
#define m_newcon(i, j) m_nextcon[i][j]
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-void *m_malloc(
-#if defined(M_PROTO)
- int size, char *msg
-#endif
- ) ;
+void *m_malloc(int size, char *msg);
-void m_entercharintrie(
-#if defined(M_PROTO)
- M_TRIE **currentnode, M_WCHAR c
-#endif
- ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
/* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
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_lookfortrie(p, xtrie) looks for string p in the specified trie,
returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
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 *m_gettrienode(
-#if defined(M_PROTO)
- M_NOPAR
-#endif
- ) ;
+M_TRIE *m_gettrienode(M_NOPAR);
-void *m_lookfortrie(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_TRIE *xtrie
-#endif
- ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
-void *m_ntrtrie(
-#if defined(M_PROTO)
- M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
- ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
-void *m_resettrie(
-#if defined(M_PROTO)
- M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
- ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void printval(
-#if defined(M_PROTO)
- FILE *file, void *value
-#endif
- ) ;
+void printval(FILE *file, void *value);
/* Count the descendants of a node in order to generate declarations for
the packed form of a trie*/
FILE *file ;
M_TRIE *trieptr ;
int *count ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value) ;
{
M_TRIE *p ;
int savecount ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void m_dumptrie(
-#if defined(M_PROTO)
- FILE *file, M_TRIE *xtrie, char *extname, int *count,
- void (*proc)(void *value)
-#endif
- ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+ void (*proc)(void *value));
/* Write the C declaration of a trie */
void m_dumptrie(file, xtrie, extname, count, proc)
M_TRIE *xtrie ;
char *extname ;
int *count ;
- void (*proc)(
-#if defined(M_PROTO)
- void *value
-#endif
- ) ;
+ void (*proc)(void *value) ;
{
int firstson ;
M_TRIE *p ;
#include "basic.h"
#include "trie.h"
-void countdown(
-#if defined(M_PROTO)
- M_TRIE *parent, int *count
-#endif
- ) ;
+void countdown(M_TRIE *parent, int *count);
-void dumpnode(
-#if defined(M_PROTO)
- LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+ void (*proc)(FILE *file, void *value));
-void dumpptrie(
-#if defined(M_PROTO)
- M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
- void (*proc)(FILE *file, void *value)
-#endif
- ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+ void (*proc)(FILE *file, void *value));
/* Write the declaration of a packed trie to the specified files */
void dumpptrie(intname, extname, file, externdef, defdef, proc)
FILE *file ;
char *externdef ;
char *defdef ;
- void (*proc) (
-#if defined (M_PROTO)
- FILE *file,
- void *value
-#endif
- ) ;
+ void (*proc) (FILE *file, void *value);
{
LOGICAL first = TRUE ;
int count = 0 ;
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
-int m_packedlook(
-#if defined(M_PROTO)
- M_PTRIE *xptrie,
- M_WCHAR *name
-#endif
- ) ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
/* Look for the string NAME in the packed trie PTRIE */
int m_packedlook(xptrie, name)
#include "common.h"
extern M_CHARTYPE m_ctarray[256] ;
-int m_wcupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const M_WCHAR *q
-#endif
- ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
- const M_WCHAR *p, const char *q
-#endif
- ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
- const char *p, const char *q
-#endif
- ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
-#if defined(M_PROTO)
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 {
if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
return(0) ;
}
-#if defined(M_PROTO)
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;
int retval;
return retval;
}
-#if defined(M_PROTO)
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;
int retval;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
int m_upper(c)
int c ;
#include "basic.h"
-int m_upper(
-#if defined(M_PROTO)
- int c
-#endif
- ) ;
+int m_upper(int c);
-int m_upstrcmp(
-#if defined(M_PROTO)
- char *p, char *q
-#endif
- ) ;
+int m_upstrcmp(char *p, char *q);
int m_upstrcmp(p, q)
char *p, *q ;
/* compare two wide character strings */
-#if defined(M_PROTO)
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;
/* compare two wide character strings to length "n" */
-#if defined(M_PROTO)
int w_strncmp(const M_WCHAR *string1, const M_WCHAR *string2, int max)
-#else
-int w_strcmp(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int max;
-#endif
{
M_WCHAR c1, c2, null;
/* copy a wide character string */
-#if defined(M_PROTO)
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;
/* 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)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int max;
-#endif
{
M_WCHAR *string1start;
/* get the length of a wide character string */
-#if defined(M_PROTO)
int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
{
int length;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
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;
/* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
{
char *mb_string;
int length, retVal;
/* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
#include "basic.h"
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
- M_WCHAR c
-#endif
- ) ;
+LOGICAL m_whitespace(M_WCHAR c);
/* Test if character c is a blank, tab, or carriage return */
-#if defined(M_PROTO)
LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
- M_WCHAR c ;
-#endif
{
char mb_c[32]; /* arbitrarily large */
int length;