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

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

View File

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

View File

@@ -37,18 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Addarc adds an arc from FSA state <from> to state <to> setting other
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 ;
@@ -630,12 +619,7 @@ LOGICAL samelabelarc(a, s)
/* 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 ;

View File

@@ -124,12 +124,7 @@ newpar->ptypep = NULL ;
/* 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 ;
@@ -205,12 +200,7 @@ switch (newpar->type)
/* 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 ;
@@ -296,12 +286,7 @@ ruleinit() ;
}
/* 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 ;

View File

@@ -28,587 +28,203 @@
/* 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
) ;
int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional,
int id, LOGICAL minim, ELTSTRUCT **errelt);
void adddefent(
#if defined(M_PROTO)
M_WCHAR *mapname
#endif
) ;
void adddefent(M_WCHAR *mapname);
LOGICAL addent(
#if defined(M_PROTO)
M_WCHAR *name
#endif
) ;
LOGICAL addent(M_WCHAR *name);
void addex(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void addex(M_NOPAR);
void addkeyword(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void addkeyword(M_NOPAR);
LOGICAL addmapname(
#if defined(M_PROTO)
M_WCHAR *p, LOGICAL define
#endif
) ;
LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
void addndent(
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void addndent(M_WCHAR *p);
void addpar(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void addpar(M_NOPAR);
void addsref(
#if defined(M_PROTO)
M_WCHAR *p
#endif
) ;
void addsref(M_WCHAR *p);
LOGICAL m_allwhite(
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
LOGICAL m_allwhite(const M_WCHAR *string);
void checkand(
#if defined(M_PROTO)
ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
ELTSTRUCT **errelt
#endif
) ;
void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root,
ELTSTRUCT **errelt);
LOGICAL checkdefault(
#if defined(M_PROTO)
const M_WCHAR *string
#endif
) ;
LOGICAL checkdefault(const M_WCHAR *string);
int checkdfsa(
#if defined(M_PROTO)
STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
#endif
) ;
int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
int checkrepeat(
#if defined(M_PROTO)
STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
#endif
) ;
int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
void copyintolist(
#if defined(M_PROTO)
STATELIST *from, STATELIST **to
#endif
) ;
void copyintolist(STATELIST *from, STATELIST **to);
void countdown(
#if defined(M_PROTO)
M_TRIE *parent, int *count
#endif
) ;
void countdown(M_TRIE *parent, int *count);
void defmapname(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void defmapname(M_NOPAR);
char *deftype(
#if defined(M_PROTO)
int n
#endif
) ;
char *deftype(int n);
void dellist(
#if defined(M_PROTO)
STATELIST **list
#endif
) ;
void dellist(STATELIST **list);
void delstartarcs(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void delstartarcs(M_NOPAR);
void done(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void done(M_NOPAR);
void dumpentnode(
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void dumpentnode(FILE *file, M_TRIE *value);
void dumpmapnode(
#if defined(M_PROTO)
FILE *file, M_TRIE *value
#endif
) ;
void dumpmapnode(FILE *file, M_TRIE *value);
void dumpsrefnode(
#if defined(M_PROTO)
FILE *file,
M_TRIE *value
#endif
) ;
void dumpsrefnode(FILE *file,
M_TRIE *value);
void dumpptrie(
#if defined(M_PROTO)
M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
void (*proc)( FILE *, M_TRIE *)
#endif
) ;
void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
void (*proc)( FILE *, M_TRIE *));
void m_dumptrie(
#if defined(M_PROTO)
FILE *file,
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);

View File

@@ -101,13 +101,7 @@ return(TRUE);
}
/* 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;

View File

@@ -66,23 +66,14 @@ void actptrout(array, name)
/* 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);
@@ -94,7 +85,7 @@ void closeiffile(flag, file, count, table, proto)
}
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);
}
@@ -193,13 +184,7 @@ void done(M_NOPAR)
}
/* 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");
}
@@ -563,21 +548,13 @@ endcode(*flag, file);
*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)
{

View File

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

View File

@@ -25,269 +25,93 @@
/* Function prototypes for HP Tag/TeX translator */
int m_lower(
#if defined(M_PROTO)
int c
#endif
) ;
int m_lower(int c);
void options(
#if defined(M_PROTO)
LOGICAL filelenonly
#endif
) ;
void options(LOGICAL filelenonly);
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);
char *strstr(
#if defined(M_PROTO)
const char *s1, const char *s2
#endif
) ;
char *strstr(const char *s1, const char *s2);
int m_upper(
#if defined(M_PROTO)
int c
#endif
) ;
int m_upper(int c);
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 PutString(
#if defined(M_PROTO)
char *string
#endif
) ;
void PutString(char *string);
void PutWString(
#if defined(M_PROTO)
M_WCHAR *string
#endif
) ;
void PutWString(M_WCHAR *string);
void PutWChar(
#if defined(M_PROTO)
M_WCHAR wchar
#endif
) ;
void PutWChar(M_WCHAR wchar);
void SaveWChar(
#if defined(M_PROTO)
M_WCHAR wchar
#endif
) ;
void SaveWChar(M_WCHAR wchar);
void OpenTag(
#if defined(M_PROTO)
LOGICAL hasAttributes,
LOGICAL newlineOK
#endif
) ;
void OpenTag(LOGICAL hasAttributes,
LOGICAL newlineOK);
void CloseTag(
#if defined(M_PROTO)
LOGICAL newlineOK
#endif
) ;
void CloseTag(LOGICAL newlineOK);
void ImpliedlAttribute(
#if defined(M_PROTO)
char *name,
M_WCHAR *value
#endif
) ;
void ImpliedlAttribute(char *name,
M_WCHAR *value);
void RequiredAttribute(
#if defined(M_PROTO)
char *name,
M_WCHAR *value
#endif
) ;
void RequiredAttribute(char *name,
M_WCHAR *value);
M_WCHAR *CopyWString(
#if defined(M_PROTO)
M_WCHAR *string
#endif
) ;
M_WCHAR *CopyWString(M_WCHAR *string);
void MakeNewElement(
#if defined(M_PROTO)
ElementTypes type
#endif
) ;
void MakeNewElement(ElementTypes type);
void DeleteElement(
#if defined(M_PROTO)
ElementPtr pElement
#endif
) ;
void DeleteElement(ElementPtr pElement);
void OptimizeAndEmit(
#if defined(M_PROTO)
ElementPtr pVirpage
#endif
) ;
void OptimizeAndEmit(ElementPtr pVirpage);
void PushCurrentElement(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void PushCurrentElement(M_NOPAR);
void PopCurrentElement(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void PopCurrentElement(M_NOPAR);
char *mb_realloc(
#if defined(M_PROTO)
char *ptr, long size
#endif
);
char *mb_realloc( char *ptr, long size);
char *mb_malloc(
#if defined(M_PROTO)
long size
#endif
);
char *mb_malloc( long size);
void mb_free(
#if defined(M_PROTO)
char **pptr
#endif
);
void mb_free( char **pptr);
void EmitSDL(
#if defined(M_PROTO)
ElementPtr pVirpage
#endif
) ;
void EmitSDL(ElementPtr pVirpage);
int OpenFile(
#if defined(M_PROTO)
char *name, int type, int code
#endif
) ;
int OpenFile(char *name, int type, int code);
int ReadFile(
#if defined(M_PROTO)
int fd, char *name, char *buffer, int amount, int code
#endif
) ;
int ReadFile(int fd, char *name, char *buffer, int amount, int code);
int WriteFile(
#if defined(M_PROTO)
int fd, char *name, char *buffer, int amount, int code
#endif
) ;
int WriteFile(int fd, char *name, char *buffer, int amount, int code);
int FileExists(
#if defined(M_PROTO)
char *name
#endif
) ;
int FileExists(char *name);
void AssertFileIsReadable(
#if defined(M_PROTO)
char *name, int code
#endif
) ;
void AssertFileIsReadable(char *name, int code);
int FileSize(
#if defined(M_PROTO)
char *name, int code
#endif
) ;
int FileSize(char *name, int code);
void CloseFile(
#if defined(M_PROTO)
int fd, char *name, int code
#endif
) ;
void CloseFile(int fd, char *name, int code);
FILE *FopenFile(
#if defined(M_PROTO)
char *name, int type, int code
#endif
) ;
FILE *FopenFile(char *name, int type, int code);
int GetALine(
#if defined(M_PROTO)
FILE *file, char *name, char *line, int max, int code
#endif
) ;
int GetALine(FILE *file, char *name, char *line, int max, int code);
int FreadFile(
#if defined(M_PROTO)
FILE *file, char *name, char *buffer, int amount, int code
#endif
) ;
int FreadFile(FILE *file, char *name, char *buffer, int amount, int code);
void FwriteFile(
#if defined(M_PROTO)
FILE *file, char *name, char *buffer, size_t amount, int code
#endif
) ;
void FwriteFile(FILE *file, char *name, char *buffer, size_t amount, int code);
void FcloseFile(
#if defined(M_PROTO)
FILE *file, char *name, int code
#endif
) ;
void FcloseFile(FILE *file, char *name, int code);
int StringToUpper(
#if defined(M_PROTO)
char *string
#endif
) ;
int StringToUpper(char *string);
void BuildIndex(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void BuildIndex(M_NOPAR);
void OpenDocument(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void OpenDocument(M_NOPAR);
void CloseDocument(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void CloseDocument(M_NOPAR);
void UpdateTossFileName(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void UpdateTossFileName(M_NOPAR);
void SetLocale(
#if defined(M_PROTO)
M_WCHAR *pLang, M_WCHAR *pCharset
#endif
) ;
void SetLocale(M_WCHAR *pLang, M_WCHAR *pCharset);

View File

@@ -37,12 +37,7 @@
#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;
@@ -149,13 +144,7 @@ optval = M_NULLVAL;
/* 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;
@@ -207,14 +196,7 @@ else switch(thisopt + 1)
}
/* 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;

View File

@@ -27,22 +27,12 @@
#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;
@@ -51,12 +41,7 @@ fputs(mb_string, outFile);
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;
@@ -68,12 +53,7 @@ fputs(mb_string, outFile);
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;

View File

@@ -51,12 +51,7 @@ static int nIds;
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;
@@ -74,12 +69,7 @@ return cptr;
}
#if defined(M_PROTO)
void mb_free(char **pptr)
#else
void *mb_free(pptr)
char **pptr;
#endif
{
#if DEBUG_MB_MALLOC
@@ -92,13 +82,7 @@ free((void *) *pptr);
}
#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;
@@ -118,13 +102,7 @@ return (char *) vptr;
}
#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));
@@ -137,14 +115,7 @@ if (!hasAttributes)
}
#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);
@@ -157,12 +128,7 @@ if (!hasAttributes)
}
#if defined(M_PROTO)
void CloseTag(LOGICAL newlineOK)
#else
void CloseTag(newlineOK)
LOGICAL newlineOK;
#endif
{
char *etagc;
@@ -176,13 +142,7 @@ PutString(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;
@@ -196,13 +156,7 @@ PutString(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)
{
@@ -215,13 +169,7 @@ 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;
@@ -242,12 +190,7 @@ PutString("\"");
}
#if defined(M_PROTO)
M_WCHAR *CopyWString(M_WCHAR *string)
#else
M_WCHAR *CopyWString(string)
M_WCHAR *string;
#endif
{
M_WCHAR *retVal;
@@ -259,12 +202,7 @@ return 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));
@@ -278,12 +216,7 @@ if (type == e_cdata)
}
#if defined(M_PROTO)
void DeleteElement(ElementPtr pElement)
#else
void DeleteElement(pElement)
ElementPtr pElement;
#endif
{
switch (pElement->type)
{
@@ -952,12 +885,7 @@ static ElementPtr *thisElementStack;
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)
@@ -1017,12 +945,7 @@ return pThisElement;
* 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;
@@ -1061,12 +984,7 @@ while (pElement)
}
#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;
@@ -1250,12 +1168,7 @@ m_free(wc_quote1, wideCharacterString);
}
#if defined(M_PROTO)
static void OptimizeSDL(ElementPtr *ppBlockOrForm)
#else
static void OptimizeSDL(ppBlockOrForm)
ElementPtr ppBlockOrForm;
#endif
{
ReplaceFormWithBlock(ppBlockOrForm);
RemoveSuperfluousBlocks(ppBlockOrForm);
@@ -1266,20 +1179,11 @@ 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;
@@ -1312,14 +1216,7 @@ pLoidsEnd = 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;
@@ -1550,14 +1447,7 @@ unlink(compZFileName);
/* 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;
@@ -1619,13 +1509,7 @@ while (pThis)
/* 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;
@@ -1694,12 +1578,7 @@ return NULL;
* 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[] =
@@ -2351,12 +2230,7 @@ while (pThis)
/* 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[] =
@@ -3374,12 +3248,7 @@ while (pThis)
}
#if defined(M_PROTO)
void EmitSDL(ElementPtr pRoot)
#else
void EmitSDL(pRoot)
ElementPtr pRoot;
#endif
{
ElementPtr pThis, pThat;
long int virpageOffset;
@@ -4945,12 +4814,7 @@ if (doCompression)
}
#if defined(M_PROTO)
void OptimizeAndEmit(ElementPtr pVirpage)
#else
void OptimizeAndEmit(pVirpage)
ElementPtr pVirpage;
#endif
{
if (optimizeFlag)
OptimizeSDL(&(pVirpage->u.u_virpage.pBlockOrForm));
@@ -5115,14 +4979,7 @@ strcat(vstructFileName, "vstr");
* 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;
@@ -5157,16 +5014,7 @@ return fd;
}
#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;
@@ -5185,16 +5033,7 @@ return 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;
@@ -5213,25 +5052,14 @@ return 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)
{
@@ -5250,13 +5078,7 @@ 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;
@@ -5279,14 +5101,7 @@ return buf.st_size;
}
#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)
{
@@ -5302,14 +5117,7 @@ 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;
@@ -5363,16 +5171,7 @@ return file;
}
#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;
@@ -5425,16 +5224,7 @@ return 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;
@@ -5453,16 +5243,7 @@ return 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)
{
@@ -5478,14 +5259,7 @@ 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)
{
@@ -5501,12 +5275,7 @@ if (fclose(file) != 0)
}
#if defined(M_PROTO)
int StringToUpper(char *string)
#else
int StringToUpper(string)
char *string;
#endif
{
char *pc, c;
@@ -6691,18 +6460,10 @@ unlink(tempFileName);
/* 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] ;
@@ -6782,13 +6543,7 @@ while (name = CycleEnt(FALSE, &type, &content, &wheredef));
* 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;

View File

@@ -107,17 +107,7 @@ int m_findact(elt, array)
}
/* 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;
@@ -241,14 +231,7 @@ void m_strtaction(m_elt)
}
/* 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;

View File

@@ -36,15 +36,7 @@
#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] ;

View File

@@ -43,13 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#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 ;

View File

@@ -52,15 +52,9 @@ void m_error(text)
}
/* 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;
@@ -77,15 +71,9 @@ m_esuffix();
}
#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;
@@ -95,17 +83,10 @@ void m_err1(text, 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;
@@ -126,19 +107,11 @@ void m_err2(text, arg1, 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;
@@ -164,21 +137,12 @@ void m_err3(text, arg1, arg2, 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;
@@ -207,7 +171,6 @@ void m_err4(text, arg1, arg2, arg3, arg4)
}
/* Issue error message (five arguments) */
#if defined(M_PROTO)
void m_err5(
char *text,
M_WCHAR *arg1,
@@ -215,15 +178,6 @@ void m_err5(
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;
@@ -261,7 +215,6 @@ void m_err5(text, arg1, arg2, arg3, arg4, arg5)
}
/* Issue error message (six arguments) */
#if defined(M_PROTO)
void m_err6(
char *text,
M_WCHAR *arg1,
@@ -270,16 +223,6 @@ void m_err6(
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;
@@ -321,7 +264,6 @@ void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
}
/* Issue error message (seven arguments) */
#if defined(M_PROTO)
void m_err7(
char *text,
M_WCHAR *arg1,
@@ -331,17 +273,6 @@ void m_err7(
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;

View File

@@ -41,14 +41,7 @@
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 ;

View File

@@ -290,13 +290,7 @@ void m_stkparams(M_NOPAR)
}
/* 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 ;

View File

@@ -345,8 +345,6 @@ M_PAREXTERN int m_wsused ;
/* 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

View File

@@ -34,14 +34,7 @@
/* 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 ;

File diff suppressed because it is too large Load Diff

View File

@@ -402,12 +402,7 @@ int m_getachar(dchar)
}
/* 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 ;
@@ -649,14 +644,7 @@ void m_litproc(delim)
}
/* 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);
@@ -669,18 +657,8 @@ void m_missingtagc(c, dchar, start)
/* 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;
@@ -863,13 +841,7 @@ int m_scan(M_NOPAR)
/* 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 ;
@@ -1087,13 +1059,7 @@ void m_sigre(M_NOPAR)
/* 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 ;
@@ -1110,14 +1076,7 @@ void m_undodelim(delim, flag)
/* 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;

View File

@@ -31,14 +31,7 @@
/* 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) ;

View File

@@ -88,13 +88,7 @@ int m_checkstart(val)
If VAL is not the element at the top of the parse stack, m_ckend
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 ;
@@ -426,14 +420,7 @@ void m_pop(M_NOPAR)
/* 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 ;
@@ -654,13 +641,7 @@ LOGICAL m_strtproc(scanval)
}
/* 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) {
@@ -726,13 +707,7 @@ LOGICAL m_textpermitted(M_NOPAR)
/* 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 ;

View File

@@ -38,12 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#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;

View File

@@ -26,25 +26,12 @@
*/
#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 ;

View File

@@ -46,93 +46,31 @@ typedef wchar_t M_WCHAR;
/* 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
);
char *MakeMByteString(const M_WCHAR *from);
M_WCHAR *MakeWideCharString(
#if defined(M_PROTO)
const char *from
#endif
);
M_WCHAR *MakeWideCharString(const char *from);
int w_strcmp(
#if defined(M_PROTO)
const M_WCHAR *string1, const M_WCHAR *string2
#endif
);
int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
int w_strncmp(
#if defined(M_PROTO)
const M_WCHAR *string1, const M_WCHAR *string2, int max
#endif
);
int w_strncmp(const M_WCHAR *string1, const M_WCHAR *string2, int max);
M_WCHAR *w_strcpy(
#if defined(M_PROTO)
M_WCHAR *string1, const M_WCHAR *string2
#endif
);
M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
M_WCHAR *w_strncpy(
#if defined(M_PROTO)
M_WCHAR *string1, const M_WCHAR *string2, int max
#endif
);
M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
int w_strlen(
#if defined(M_PROTO)
const M_WCHAR *string
#endif
);
int w_strlen(const M_WCHAR *string);
M_WCHAR *w_strchr(
#if defined(M_PROTO)
M_WCHAR *string, const M_WCHAR chr
#endif
);
M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
M_WCHAR *w_strstr(
#if defined(M_PROTO)
M_WCHAR *string1, M_WCHAR *string2
#endif
);
M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
void *m_malloc(
#if defined(M_PROTO)
int size, char *msg
#endif
) ;
void *m_malloc(int size, char *msg);
void m_free(
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void m_free(void *block, char *msg);
void m_err2(
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
int mb_getwc(
#if defined(M_PROTO)
void *m_ptr
#endif
) ;
int mb_getwc(void *m_ptr);

View File

@@ -37,179 +37,63 @@ This product and information is proprietary of Tandem Computers Incorporated.
#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

View File

@@ -55,12 +55,7 @@ void dumpdlmptr(M_NOPAR)
}
/* Output the generated data structures */
#if defined(M_PROTO)
void dumptree(LOGICAL sparse)
#else
void dumptree(sparse)
LOGICAL sparse;
#endif
{
int i, count = 0;
@@ -573,12 +568,7 @@ loading = FALSE;
}
/* Output transition matrix */
#if defined(M_PROTO)
void nextcon(LOGICAL sparse)
#else
void nextcon(sparse)
LOGICAL sparse;
#endif
{
int i, j;
int firstinrow;
@@ -645,12 +635,7 @@ void prtctxt(column, value)
/* 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;

View File

@@ -29,11 +29,7 @@
#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 ;

View File

@@ -25,23 +25,11 @@
/* 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" ;
@@ -212,12 +200,7 @@ char *typetype(n)
}
/* 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) ;

View File

@@ -33,128 +33,47 @@ extern FILE *m_errfile ;
extern int m_line ;
extern LOGICAL errexit ;
void eprefix(
#if defined(M_PROTO)
LOGICAL flag
#endif
) ;
void eprefix(LOGICAL flag);
void m_errline(
#if defined(M_PROTO)
char *text
#endif
) ;
void m_errline(char *text);
void m_error(
#if defined(M_PROTO)
char *text
#endif
) ;
void m_error(char *text);
void m_err1(
#if defined(M_PROTO)
char *text, const M_WCHAR *arg
#endif
) ;
void m_err1(char *text, const M_WCHAR *arg);
void m_mberr1(
#if defined(M_PROTO)
char *text, const char *arg
#endif
) ;
void m_mberr1(char *text, const char *arg);
void m_err2(
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
void m_err3(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
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_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
M_WCHAR *arg5);
void esuffix(
#if defined(M_PROTO)
void
#endif
) ;
void esuffix(void);
void msgline(
#if defined(M_PROTO)
char *text
#endif
) ;
void msgline(char *text);
void msg1line(
#if defined(M_PROTO)
char *text, char *arg1
#endif
) ;
void msg1line(char *text, char *arg1);
void skiptoend(
#if defined(M_PROTO)
M_NOPAR
#endif
) ;
void skiptoend(M_NOPAR);
void m_wctrace(
#if defined(M_PROTO)
M_WCHAR *text
#endif
) ;
void m_wctrace(M_WCHAR *text);
void m_trace(
#if defined(M_PROTO)
char *text
#endif
) ;
void m_trace(char *text);
void warning(
#if defined(M_PROTO)
char *text
#endif
) ;
void warning(char *text);
void warning1(
#if defined(M_PROTO)
char *text, M_WCHAR *arg
#endif
) ;
void warning1(char *text, M_WCHAR *arg);
void warning2(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2
#endif
) ;
void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
void warning3(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
#endif
) ;
void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
void warning4(
#if defined(M_PROTO)
char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
#endif
) ;
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**** ") ;
@@ -184,13 +103,7 @@ void m_error(text)
/* 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;
@@ -203,13 +116,7 @@ skiptoend() ;
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) ;
@@ -220,13 +127,7 @@ skiptoend() ;
/* 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;
@@ -243,13 +144,7 @@ m_free(mb_arg2,"multi-byte string");
/* 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;
@@ -268,14 +163,8 @@ m_free(mb_arg3,"multi-byte string");
/* 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;
@@ -347,13 +236,7 @@ void warning(text)
/* 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;
@@ -367,13 +250,7 @@ m_free(mb_arg,"multi-byte string");
/* 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;
@@ -389,13 +266,7 @@ m_free(mb_arg2,"multi-byte string");
/* 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;
@@ -413,14 +284,8 @@ m_free(mb_arg3,"multi-byte string");
/* 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;

View File

@@ -30,11 +30,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
#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 */

View File

@@ -58,23 +58,11 @@ struct data {
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 ;

View File

@@ -30,23 +30,11 @@
#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)

View File

@@ -29,11 +29,7 @@
#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)
{

View File

@@ -27,17 +27,9 @@
#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[];

View File

@@ -27,18 +27,7 @@
#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) ;

View File

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

View File

@@ -36,53 +36,21 @@
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)
{

View File

@@ -33,17 +33,9 @@
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)

View File

@@ -33,13 +33,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
/* Check to see if string is a valid value for parameter par. If so
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 ;

View File

@@ -29,11 +29,7 @@
#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]

View File

@@ -45,26 +45,12 @@ extern FILE *m_errfile ;
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 ;
@@ -112,13 +98,7 @@ M_TRIE *m_gettrienode(M_NOPAR)
/* 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 ;

View File

@@ -51,26 +51,10 @@ struct m_ptrie {
} ;
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);

View File

@@ -31,24 +31,12 @@
#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*/
@@ -71,12 +59,7 @@ void dumpnode(first, file, trieptr, count, proc)
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 ;

View File

@@ -29,18 +29,10 @@
#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)
@@ -48,11 +40,7 @@ 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 ;

View File

@@ -29,25 +29,13 @@
#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)
@@ -56,12 +44,7 @@ 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 ;

View File

@@ -36,12 +36,7 @@
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)

View File

@@ -32,30 +32,13 @@
#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) ;
@@ -65,13 +48,7 @@ int m_wcupstrcmp(p, q)
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;
@@ -82,13 +59,7 @@ int m_wcmbupstrcmp(p, q)
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;

View File

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

View File

@@ -29,17 +29,9 @@
#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 ;

View File

@@ -32,13 +32,7 @@
/* 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;
@@ -60,14 +54,7 @@ while (1)
/* 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;
@@ -91,13 +78,7 @@ return 0;
/* 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;
@@ -110,14 +91,7 @@ return 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;
@@ -130,12 +104,7 @@ return 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;
@@ -148,12 +117,7 @@ return 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;
@@ -173,12 +137,7 @@ else
/* 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;
@@ -213,12 +172,7 @@ return NULL;
/* 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;
@@ -248,12 +202,7 @@ return mb_string;
/* 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;

View File

@@ -27,19 +27,10 @@
#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;