Resolve many build warnings

This patch fixes many warnings from the beginning of the build up to
and including the depend stage. Nearly all warnings should be gone
even with -Wall.
This commit is contained in:
Ulrich Wilkens
2014-09-23 23:16:35 +02:00
committed by Jon Trulson
parent 2bf29e5d63
commit 42e891d9e7
125 changed files with 1926 additions and 1440 deletions

View File

@@ -41,7 +41,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entdef.h"
/* Main procedure */
void main(argc, argv)
int main(argc, argv)
int argc ;
char **argv ;
{
@@ -67,8 +67,9 @@ while (TRUE)
if (scantrace)
printf(
"m_prevcon=%d, m_token=%d, curcon=%d, scanval = %c (%d), line=%d\n",
m_prevcon, m_token, curcon, scanval, scanval, m_line) ;
m_prevcon, m_token, curcon, (char)scanval, (int)scanval, m_line) ;
#include "case.c"
if (m_token == ENDFILE) exit(FALSE) ;
}
return 0;
}

View File

@@ -43,7 +43,7 @@ LOGICAL *flag;
char *delim;
{
M_WCHAR wcbuff[129];
size_t length;
ssize_t length;
wcbuff[128] = 0;
length = mbstowcs(wcbuff,delim,128);
@@ -73,7 +73,7 @@ m_openchk(&m_errfile, "error", "w") ;
fprintf(stderr, "MARKUP System - BUILD %s\n", M_VERSION) ;
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
if (! standard)
warning("Warning: optional enhancements of SGML enabled.") ;
warning("Info: optional enhancements of SGML enabled.") ;
mb_delims = mb_dlmptr;
wc_delims = m_dlmptr;
@@ -112,7 +112,7 @@ void ruleinit(M_NOPAR)
/* Rule end processing */
void rulend(M_NOPAR)
{
STATE *fsa ;
STATE *fsa = NULL ;
LOGICAL canbenull ;
LHS *lhsp ;
LHS *discard ;
@@ -153,7 +153,7 @@ void rulend(M_NOPAR)
void skiptoend(M_NOPAR)
{
int i ;
static errlev = 0 ;
static int errlev = 0 ;
if (! errlev++) {
curcon = ERROR ;

View File

@@ -42,7 +42,7 @@ ELTSTRUCT *ntrelt(p)
int length ;
new = (ELTSTRUCT *) m_malloc(sizeof(ELTSTRUCT), "element structure") ;
if (old = (ELTSTRUCT *) m_ntrtrie(p, &eltree, (M_TRIE *) new)) {
if ((old = (ELTSTRUCT *) m_ntrtrie(p, &eltree, (M_TRIE *) new))) {
m_free((M_POINTER) new, "element structure") ;
return(old) ;
}
@@ -55,7 +55,7 @@ ELTSTRUCT *ntrelt(p)
w_strcpy(new->enptr, p) ;
new->model = M_NULLVAL ;
new->content = M_NULLVAL ;
new->inptr = new->exptr = NULL ;
new->inptr = new->exptr = 0 ;
new->parptr = NULL ;
new->parindex = M_NULLVAL ;
new->paramcount = M_NULLVAL ;

View File

@@ -85,11 +85,11 @@ void checkand(andstart, andptr, start, root, errelt)
for (pand = parc->group ; pand ; pand = pand->next)
checkand(andstart, andptr, pand->start, root, errelt) ;
}
else if (c = checkdfsa(andptr->start,
else if ((c = checkdfsa(andptr->start,
parc->label,
parc->group,
parc->id,
errelt))
errelt)))
nondeterm(root, c, *errelt) ;
}
}
@@ -112,7 +112,7 @@ int checkdfsa(from, label, and, id, errelt)
if (parc->group) {
if (and == parc->group) return(ANDCONFLICT) ;
for (group = parc->group ; group ; group = group->next)
if (c = checkdfsa(group->start, label, and, id, errelt))
if ((c = checkdfsa(group->start, label, and, id, errelt)))
return(c) ;
}
else if (! and && label == parc->label && parc->id != id) {
@@ -138,14 +138,14 @@ int checkrepeat(from, and, errelt)
for (; and ; and = and->next)
for (parc = and->start->first ; parc ; parc = parc->next) {
if (parc->group)
if (c = checkrepeat(from, parc->group, errelt)) return(c) ;
if ((c = checkrepeat(from, parc->group, errelt))) return(c) ;
else ;
else
if (c = checkdfsa(from,
if ((c = checkdfsa(from,
parc->label,
M_NULLVAL,
parc->id,
errelt))
errelt)))
return(c) ;
else ;
}
@@ -239,7 +239,7 @@ void makeand(canbenull, root, optional)
TREE *child ;
STATELIST *start, *final ;
LOGICAL groupbenull ;
ANDGROUP *andptr, *saveand, *otherand ;
ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
STATELIST *index ;
ELTSTRUCT *errelt ;
@@ -579,7 +579,7 @@ void repeat(root)
for (a = top->starta ; a ; a = a->next) {
for (final = top->allfinal ; final ; final = final->next) {
if (a->group)
if (c = checkrepeat(final->value, a->group, &errelt)) {
if ((c = checkrepeat(final->value, a->group, &errelt))) {
wtemp = MakeWideCharString(root->occurrence == PLUS ? plus : rep);
warning1("Conflict in use of %s", wtemp);
m_free(wtemp, "wide character string");
@@ -588,11 +588,11 @@ void repeat(root)
else
;
else
if (c = checkdfsa(final->value,
if ((c = checkdfsa(final->value,
a->label,
a->group,
a->id,
&errelt))
&errelt)))
nondeterm (root, c, errelt) ;
else
;
@@ -600,14 +600,14 @@ void repeat(root)
for (final = top->finals ; final ; final = final->next) {
if (samelabelarc(a, final->value)) continue ;
if (a->group)
if (c = checkrepeat(final->value, a->group, &errelt))
if ((c = checkrepeat(final->value, a->group, &errelt)))
nondeterm(root, c, errelt) ;
if (a->label ||
a->group ||
! final->value->frompcdata) {
if (c = addarc(final->value, a->to, a->label,
if ((c = addarc(final->value, a->to, a->label,
a->group, TRUE, a->id,
a->minim, &errelt))
a->minim, &errelt)))
nondeterm(root, c, errelt) ;
if (permitspcd(a)) final->value->datacontent = TRUE ;
}
@@ -697,7 +697,7 @@ void simplebranch(root, value, group, optional)
states of and-groups that terminate at the start state of the new
arc */
for (index = top->allfinal ; index ; index = index->next)
if (c = checkdfsa(index->value, value, group, root->eltid, &errelt))
if ((c = checkdfsa(index->value, value, group, root->eltid, &errelt)))
nondeterm(root, c, errelt) ;
for (index = top->starts ; index ; index = index->next) {
if (! group && ! value && index->value->frompcdata)

View File

@@ -31,6 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#if defined(MSDOS)
#include <process.h>
#endif
@@ -195,7 +196,7 @@ void eltreeout(M_NOPAR)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = eltp->enptr ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -211,14 +212,14 @@ void eltreeout(M_NOPAR)
else fputs(",\n", dtd) ;
if (! eltp->content)
warning1("No content model for element %s", eltp->enptr) ;
fprintf(dtd, " %d, %d, %s, ",
fprintf(dtd, " {%d, %d, %s, ",
enameindex, eltp->model ? eltp->model->count : 0,
typecon(eltp->content)) ;
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
fprintf(dtd, "%d, %d, %d",
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
enameindex += w_strlen(eltp->enptr) + 1 ;
fprintf(dtd, ", %s, %s, %s",
fprintf(dtd, ", %s, %s, %s}",
boolean(eltp->stmin), boolean(eltp->etmin), boolean(eltp->useoradd)) ;
}
fputs(ndif, dtd) ;
@@ -259,7 +260,7 @@ void exout(M_NOPAR)
if (! first) fputs(",\n", dtd) ;
first = FALSE ;
exindex++ ;
fprintf(dtd, " %d, %d", ex->element, ex->next ? exindex + 1 : 0) ;
fprintf(dtd, " {%d, %d}", ex->element, ex->next ? exindex + 1 : 0) ;
}
fputs(ndif, dtd) ;
}
@@ -294,7 +295,7 @@ void fsa(M_NOPAR)
for (pstate = firststate ; pstate ; pstate = pstate->next) {
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %s, %s, %d",
fprintf(dtd, " {%s, %s, %d}",
boolean(pstate->final), boolean(pstate->datacontent),
pstate->first ? ++arcount : 0) ;
for (parc = pstate->first ; parc ; parc = parc->next) {
@@ -319,7 +320,7 @@ void fsa(M_NOPAR)
for (pand = firstand ; pand ; pand = pand->nextptr) {
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %d, %d",
fprintf(dtd, " {%d, %d}",
pand->start->count,
pand->next ? pand->next->count : M_NULLVAL) ;
}
@@ -352,7 +353,7 @@ if (kwlen)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = ptypep->keyword ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -372,7 +373,7 @@ if (deflen)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = paramp->defstring ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -392,7 +393,7 @@ if (ptypelen)
{
if (first) first = FALSE ;
else fprintf(dtd, ",\n") ;
fprintf(dtd, " %d, %d", kw, ptypep->next) ;
fprintf(dtd, " {%d, %d}", kw, ptypep->next) ;
kw += w_strlen(ptypep->keyword) + 1 ;
}
fputs(ndif, dtd) ;
@@ -412,21 +413,21 @@ if (parcount)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd,
" %d, %s, %d, %s, ",
" {%d, %s, %d, %s, ",
pnameindex,
partype(paramp->type),
paramp->kwlist,
deftype(paramp->deftype)) ;
pnameindex += w_strlen(paramp->paramname) + 1 ;
if (paramp->defval)
fprintf(dtd, "&m_keyword[%d]", paramp->defval - 1) ;
fprintf(dtd, "&m_keyword[%d]}", paramp->defval - 1) ;
else if (paramp->defstring)
{
fprintf(dtd, "&m_defval[%d]", defindex) ;
fprintf(dtd, "&m_defval[%d]}", defindex) ;
defindex += w_strlen(paramp->defstring) + 1 ;
}
else
fputs("NULL", dtd) ;
fputs("NULL}", dtd) ;
}
fputs(ndif, dtd) ;
}
@@ -443,7 +444,7 @@ if (pnamelen)
{
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = paramp->paramname ; *p ; p++) fprintf(dtd, " %d,\n", *p) ;
for (p = paramp->paramname ; *p ; p++) fprintf(dtd, " %d,\n", (int)*p);
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -534,10 +535,10 @@ void srefout(M_NOPAR)
count++ ;
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %d, %d, ", j + 1, mapbysref[sreflen * i + j]) ;
fprintf(dtd, " {%d, %d, ", j + 1, mapbysref[sreflen * i + j]) ;
for (j++ ; j < sreflen ; j++)
if (mapbysref[sreflen * i + j]) break ;
fprintf(dtd, "%d", j < sreflen ? count + 1 : 0) ;
fprintf(dtd, "%d}", j < sreflen ? count + 1 : 0) ;
}
else j++ ;
fputs(ndif, dtd) ;
@@ -557,7 +558,7 @@ char *mb_paramname;
int indent ;
int i ;
fprintf(tempfile, "\n<ELEMENT %s>\n", eltp->enptr) ;
fprintf(tempfile, "\n<ELEMENT %s>\n", (char *)eltp->enptr) ;
if (eltp->parptr)
{
fputs(" /*\n", tempfile) ;
@@ -570,7 +571,8 @@ if (eltp->parptr)
{
int length;
char mbyte[32]; /* larger than any multibyte character */
char *pc, c;
char *pc;
unsigned char c;
length = wctomb(mbyte, *p);
if (length < 0)
@@ -600,8 +602,8 @@ if (eltp->parptr)
mb_keyword = MakeMByteString(ptypep->keyword);
fprintf(tempfile,
"%s = %s",
ptypep->keyword,
ptypep->keyword) ;
(char *)ptypep->keyword,
(char *)ptypep->keyword) ;
m_free(mb_keyword,"multi-byte string");
ptypep = ptypep->next ? ptypep->nextptr : (PTYPE *) NULL ;
if (ptypep)
@@ -640,7 +642,7 @@ void template(M_NOPAR)
undefent = TRUE ;
}
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
ent->name,
(char *)ent->name,
enttype(ent->type)
) ;
}

View File

@@ -89,7 +89,7 @@ ptypelen++ ;
/* Add a parameter to the current element */
void addpar(M_NOPAR)
{
PARAMETER *paramp, *last ;
PARAMETER *paramp, *last = NULL ;
int length ;
parcount++ ;
@@ -200,6 +200,7 @@ switch (newpar->type)
}
break ;
}
return(FALSE);
}
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
@@ -212,7 +213,7 @@ M_WCHAR *string ;
#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
int i ;
int i, ret ;
switch (newpar->type)
{
@@ -238,7 +239,7 @@ switch (newpar->type)
for (p = string, i = 0 ; *p ; p++, i++)
if (m_whitespace(*p))
{
mbtowc(p, " ", 1);
ret = mbtowc(p, " ", 1);
for (q = p + 1 ; m_whitespace(*q); q++) ;
w_strcpy(p + 1, q) ;
}
@@ -262,10 +263,13 @@ switch (newpar->type)
mbyte[1] = 0;
}
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
mbtowc(string, " ", 1);
{
ret = mbtowc(string, " ", 1);
}
}
return ;
}
(void) ret;
}
/* Called at end of parameter attribute list rule */

View File

@@ -330,7 +330,7 @@ LOGICAL litproc(
#endif
) ;
void main(
int main(
#if defined(M_PROTO)
int argc, char **argv
#endif

View File

@@ -80,9 +80,10 @@ int c;
int n;
M_WCHAR wsp, wnl, wtb;
mbtowc(&wsp, " ", 1);
mbtowc(&wnl, "\n", 1);
mbtowc(&wtb, "\t", 1);
int
ret = mbtowc(&wsp, " ", 1);
ret = mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wtb, "\t", 1);
while (TRUE)
{
@@ -158,13 +159,14 @@ while (TRUE)
{
char mbyte[32]; /* bigger than the biggest multibyte char */
wctomb(mbyte, c);
ret = wctomb(mbyte, c);
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
m_error("Unexpected character");
}
} /* End while */
(void) ret;
} /* End scan */
#include "scanutil.c"

View File

@@ -40,7 +40,7 @@ void adddefent(mapname)
M_WCHAR *mapname;
{
M_WCHAR *p;
int n, length;
int n;
char c;
if (!wc_prefix)
@@ -59,8 +59,9 @@ for (n = egensuf ; n ; n /= 10)
return;
}
c = ('0' + (n % 10));
mbtowc(p, &c, 1);
*p++;
int ret = mbtowc(p, &c, 1);
(void) ret;
p++;
}
*p = M_EOS;
egensuf++;
@@ -80,7 +81,7 @@ M_WCHAR *name;
M_ENTITY *new;
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity");
if (entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new))
if ((entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new)))
{
m_free((M_POINTER) new, "entity");
return(FALSE);
@@ -113,7 +114,7 @@ MAP *new;
LOGICAL retval;
new = (MAP *) m_malloc(sizeof(MAP), "map");
if (old = (MAP *) m_ntrtrie(p, &maptree, (M_TRIE *) new))
if ((old = (MAP *) m_ntrtrie(p, &maptree, (M_TRIE *) new)))
{
m_free(new, "map");
curmap = old->map;
@@ -153,7 +154,7 @@ int noseq = 0;
/* Define the delimiter */
delim = (SREFSTRUCT *)
m_malloc(sizeof(SREFSTRUCT), "short reference delimiter");
if (prevsr = (SREFSTRUCT *) m_ntrtrie(p, &sreftree, (M_TRIE *) delim))
if ((prevsr = (SREFSTRUCT *) m_ntrtrie(p, &sreftree, (M_TRIE *) delim)))
{
m_free(delim, "short reference delimiter");
delim = prevsr;

View File

@@ -626,7 +626,7 @@ name
pcchain:pcchain {
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
(*nextchain)->next = NULL ;
if ((*nextchain)->elt = m_packedlook(m_entree, name))
if (((*nextchain)->elt = m_packedlook(m_entree, name)))
(*nextchain)->elt++ ;
else
m_err1("Undefined element: %s", name) ;
@@ -660,61 +660,61 @@ text
}
}
globdef:globdef {
fprintf(globdef, "%c", textchar) ;
fprintf(globdef, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
globdec:globdec {
fprintf(globdec, "%c", textchar) ;
fprintf(globdec, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
iniss:iniss,
inss:inss {
if (! stringstart) fprintf(string, ",\n") ;
fprintf(string, " %d", textchar) ;
fprintf(string, " %d", (int)textchar) ;
stringstart = FALSE ;
stringcnt++ ;
}
inies:inies,
ines:ines {
if (! stringstart) fprintf(string, ",\n") ;
fprintf(string, " %d", textchar) ;
fprintf(string, " %d", (int)textchar) ;
stringstart = FALSE ;
stringcnt++ ;
}
inisc:inisc,
insc:insc {
fprintf(sfile, "%c", textchar) ;
fprintf(sfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
iniec:iniec,
inec:inec {
fprintf(efile, "%c", textchar) ;
fprintf(efile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
initc:initc,
intc:intc {
fprintf(tfile, "%c", textchar) ;
fprintf(tfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inipc:inipc,
inpc:inpc {
fprintf(pfile, "%c", textchar) ;
fprintf(pfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inistc:inistc,
instc:instc {
fprintf(stfile, "%c", textchar) ;
fprintf(stfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inentc:inentc {
fprintf(entfile, "%c", textchar) ;
fprintf(entfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}

View File

@@ -49,13 +49,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entity.h"
/* Main program */
void main(argc, argv)
int main(argc, argv)
int argc ;
char **argv ;
{
int m_token ;
if (argc > 2)
if (argc > 2) {
if (*argv[2] == '-') {
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
if (strchr(argv[2], 'A')) m_malftrace = TRUE ;
@@ -70,6 +70,7 @@ void main(argc, argv)
fprintf(stderr,
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
) ;
}
if (argc < 2) {
fprintf(stderr, "**** Specify interface file ****\n") ;
exit(TRUE) ;
@@ -84,7 +85,7 @@ void main(argc, argv)
if (scantrace)
printf(
"Main: m_prevcon=%d,m_token=%d,curcon=%d,textchar='%c'(%d), line=%d\n",
m_prevcon, m_token, curcon, textchar, textchar, m_line) ;
m_prevcon, m_token, curcon, (char)textchar, (int)textchar, m_line) ;
#include "case.c"
if (m_token == ENDFILE) break ;
if (! curcon) {
@@ -93,4 +94,5 @@ void main(argc, argv)
}
}
done() ;
return 0;
}

View File

@@ -106,7 +106,7 @@ void cvalue(M_NOPAR)
PARVAL *new;
new = (PARVAL *) m_malloc(sizeof(PARVAL), "parameter value");
if (pval = (PARVAL *) m_ntrtrie(name, &parval, (M_TRIE *) new))
if ((pval = (PARVAL *) m_ntrtrie(name, &parval, (M_TRIE *) new)))
m_free(new, "parameter value");
else {
new->line = 0;
@@ -467,7 +467,7 @@ for ( ; p ; p = p->next)
iffile);
fprintf(pvalh, "#define %s \"", mb_cname);
m_free(mb_cname,"multi-byte string");
if (q = ((PARVAL *) p->data)->value)
if ((q = ((PARVAL *) p->data)->value))
for ( ; *q ; q++)
{
char mbq[32]; /* larger than largest possible mbyte char */
@@ -498,7 +498,7 @@ for ( ; p ; p = p->next)
void skiptoend(M_NOPAR)
{
int i;
static errlev = 0;
static int errlev = 0;
CVARSTRUCT *cvarp, *dvarp;
for (cvarp = cvarlist ; cvarp ;) {
@@ -615,7 +615,7 @@ void startelement(M_NOPAR)
m_free(discard, "C variable");
}
cvarlist = NULL;
if (openelt = m_packedlook(m_entree, name)) {
if ((openelt = m_packedlook(m_entree, name))) {
if (processed[openelt - 1])
warning1("Warning: Element %s already processed", name);
processed[openelt - 1] = TRUE;
@@ -670,7 +670,7 @@ if (m_partype(cvarlist->param + m_element[openelt - 1].parptr, p))
{
M_WCHAR *w_buffer;
sprintf(buffer, "%d", pval->line);
snprintf(buffer, 5, "%d", pval->line);
w_buffer = MakeWideCharString(buffer);
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
pval->cname,

View File

@@ -40,7 +40,7 @@ void addent(M_NOPAR)
M_ENTITY *new ;
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity") ;
if (entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new)) {
if ((entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new))) {
m_free(new, "entity") ;
if (! entity->wheredef) return ;
if (entity->wheredef == M_DBUILD) {

View File

@@ -226,7 +226,7 @@ LOGICAL litproc(
#endif
) ;
void main(
int main(
#if defined(M_PROTO)
int argc, char **argv
#endif

View File

@@ -53,7 +53,8 @@ M_WCHAR *p, wus;
int c, cttype;
LOGICAL cname;
mbtowc(&wus, "_", 1);
int ret = mbtowc(&wus, "_", 1);
(void) ret;
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
*(p = name) = (M_WCHAR) first;
@@ -92,7 +93,8 @@ int n;
static char unexp[] = "c";
M_WCHAR wus;
mbtowc(&wus, "_", 1);
int ret = mbtowc(&wus, "_", 1);
(void) ret;
while (TRUE)
{

View File

@@ -112,3 +112,21 @@ void *m_malloc(
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
) ;

View File

@@ -29,262 +29,262 @@ by HP Tag are marked "(invalid)". */
M_CHARTYPE m_ctarray[M_CHARSETLEN]
= {
/* Char Name Type, Upper, Lower */
/* 0: ^@ NUL */ M_NONNAME, 0, 0,
/* 1: ^A SOH */ M_NONNAME, 1, 1,
/* 2: ^B STX */ M_NONNAME, 2, 2,
/* 3: ^C ETX */ M_NONNAME, 3, 3,
/* 4: ^D EOT */ M_NONNAME, 4, 4,
/* 5: ^E ENQ */ M_NONNAME, 5, 5,
/* 6: ^F ACK */ M_NONNAME, 6, 6,
/* 7: ^G BEL */ M_NONNAME, 7, 7,
/* 8: ^H BS */ M_NONNAME, 8, 8,
/* 9: ^I HT */ M_NONNAME, 9, 9,
/* 10: ^J LF */ M_NONNAME, 10, 10,
/* 11: ^K VT */ M_NONNAME, 11, 11,
/* 12: ^L FF */ M_NONNAME, 12, 12,
/* 13: ^M CR */ M_NONNAME, 13, 13,
/* 14: ^N SO */ M_NONNAME, 14, 14,
/* 15: ^O SI */ M_NONNAME, 15, 15,
/* 16: ^P DLE */ M_NONNAME, 16, 16,
/* 17: ^Q DC1 */ M_NONNAME, 17, 17,
/* 18: ^R DC2 */ M_NONNAME, 18, 18,
/* 19: ^S DC3 */ M_NONNAME, 19, 19,
/* 20: ^T DC4 */ M_NONNAME, 20, 20,
/* 21: ^U NAK */ M_NONNAME, 21, 21,
/* 22: ^V SYN */ M_NONNAME, 22, 22,
/* 23: ^W ETB */ M_NONNAME, 23, 23,
/* 24: ^X CAN */ M_NONNAME, 24, 24,
/* 25: ^Y EM */ M_NONNAME, 25, 25,
/* 26: ^Z SUB */ M_NONNAME, 26, 26,
/* 27: ^[ ESC */ M_NONNAME, 27, 27,
/* 28: ^\ FS */ M_NONNAME, 28, 28,
/* 29: ^] GS */ M_NONNAME, 29, 29,
/* 30: ^^ RS */ M_NONNAME, 30, 30,
/* 31: ^_ US */ M_NONNAME, 31, 31,
/* 32: SP */ M_NONNAME, 32, 32,
/* 33: ! */ M_NONNAME, 33, 33,
/* 34: " */ M_NONNAME, 34, 34,
/* 35: # */ M_NONNAME, 35, 35,
/* 36: $ */ M_NONNAME, 36, 36,
/* 37: % */ M_NONNAME, 37, 37,
/* 38: & */ M_NONNAME, 38, 38,
/* 39: ' */ M_NONNAME, 39, 39,
/* 40: ( */ M_NONNAME, 40, 40,
/* 41: ) */ M_NONNAME, 41, 41,
/* 42: * */ M_NONNAME, 42, 42,
/* 43: + */ M_NAMECHAR, 43, 43,
/* 44: , */ M_NONNAME, 44, 44,
/* 45: - */ M_NAMECHAR, 45, 45,
/* 46: . */ M_NAMECHAR, 46, 46,
/* 47: / */ M_NONNAME, 47, 47,
/* 48: 0 */ M_DIGIT, 48, 48,
/* 49: 1 */ M_DIGIT, 49, 49,
/* 50: 2 */ M_DIGIT, 50, 50,
/* 51: 3 */ M_DIGIT, 51, 51,
/* 52: 4 */ M_DIGIT, 52, 52,
/* 53: 5 */ M_DIGIT, 53, 53,
/* 54: 6 */ M_DIGIT, 54, 54,
/* 55: 7 */ M_DIGIT, 55, 55,
/* 56: 8 */ M_DIGIT, 56, 56,
/* 57: 9 */ M_DIGIT, 57, 57,
/* 58: : */ M_NONNAME, 58, 58,
/* 59: ; */ M_NONNAME, 59, 59,
/* 60: < */ M_NONNAME, 60, 60,
/* 61: = */ M_NONNAME, 61, 61,
/* 62: > */ M_NONNAME, 62, 62,
/* 63: ? */ M_NONNAME, 63, 63,
/* 64: @ */ M_NONNAME, 64, 64,
/* 65: A */ M_NMSTART, 65, 97,
/* 66: B */ M_NMSTART, 66, 98,
/* 67: C */ M_NMSTART, 67, 99,
/* 68: D */ M_NMSTART, 68, 100,
/* 69: E */ M_NMSTART, 69, 101,
/* 70: F */ M_NMSTART, 70, 102,
/* 71: G */ M_NMSTART, 71, 103,
/* 72: H */ M_NMSTART, 72, 104,
/* 73: I */ M_NMSTART, 73, 105,
/* 74: J */ M_NMSTART, 74, 106,
/* 75: K */ M_NMSTART, 75, 107,
/* 76: L */ M_NMSTART, 76, 108,
/* 77: M */ M_NMSTART, 77, 109,
/* 78: N */ M_NMSTART, 78, 110,
/* 79: O */ M_NMSTART, 79, 111,
/* 80: P */ M_NMSTART, 80, 112,
/* 81: Q */ M_NMSTART, 81, 113,
/* 82: R */ M_NMSTART, 82, 114,
/* 83: S */ M_NMSTART, 83, 115,
/* 84: T */ M_NMSTART, 84, 116,
/* 85: U */ M_NMSTART, 85, 117,
/* 86: V */ M_NMSTART, 86, 118,
/* 87: W */ M_NMSTART, 87, 119,
/* 88: X */ M_NMSTART, 88, 120,
/* 89: Y */ M_NMSTART, 89, 121,
/* 90: Z */ M_NMSTART, 90, 122,
/* 91: [ */ M_NONNAME, 91, 91,
/* 92: \\ */ M_NONNAME, 92, 92,
/* 93: ] */ M_NONNAME, 93, 93,
/* 94: ^ */ M_NONNAME, 94, 94,
/* 95: _ */ M_NONNAME, 95, 95,
/* 96: ` */ M_NONNAME, 96, 96,
/* 97: a */ M_NMSTART, 65, 97,
/* 98: b */ M_NMSTART, 66, 98,
/* 99: c */ M_NMSTART, 67, 99,
/* 100: d */ M_NMSTART, 68, 100,
/* 101: e */ M_NMSTART, 69, 101,
/* 102: f */ M_NMSTART, 70, 102,
/* 103: g */ M_NMSTART, 71, 103,
/* 104: h */ M_NMSTART, 72, 104,
/* 105: i */ M_NMSTART, 73, 105,
/* 106: j */ M_NMSTART, 74, 106,
/* 107: k */ M_NMSTART, 75, 107,
/* 108: l */ M_NMSTART, 76, 108,
/* 109: m */ M_NMSTART, 77, 109,
/* 110: n */ M_NMSTART, 78, 110,
/* 111: o */ M_NMSTART, 79, 111,
/* 112: p */ M_NMSTART, 80, 112,
/* 113: q */ M_NMSTART, 81, 113,
/* 114: r */ M_NMSTART, 82, 114,
/* 115: s */ M_NMSTART, 83, 115,
/* 116: t */ M_NMSTART, 84, 116,
/* 117: u */ M_NMSTART, 85, 117,
/* 118: v */ M_NMSTART, 86, 118,
/* 119: w */ M_NMSTART, 87, 119,
/* 120: x */ M_NMSTART, 88, 120,
/* 121: y */ M_NMSTART, 89, 121,
/* 122: z */ M_NMSTART, 90, 122,
/* 123: { */ M_NONNAME, 123, 123,
/* 124: | */ M_NONNAME, 124, 124,
/* 125: } */ M_NONNAME, 125, 125,
/* 126: ~ */ M_NONNAME, 126, 126,
/* 127: DEL */ M_NONNAME, 127, 127,
/* 128: undefined */ M_NONNAME, 128, 128,
/* 129: undefined */ M_NONNAME, 129, 129,
/* 130: undefined */ M_NONNAME, 130, 130,
/* 131: undefined */ M_NONNAME, 131, 131,
/* 132: undefined */ M_NONNAME, 132, 132,
/* 133: undefined */ M_NONNAME, 133, 133,
/* 134: undefined */ M_NONNAME, 134, 134,
/* 135: undefined */ M_NONNAME, 135, 135,
/* 136: undefined */ M_NONNAME, 136, 136,
/* 137: undefined */ M_NONNAME, 137, 137,
/* 138: undefined */ M_NONNAME, 138, 138,
/* 139: undefined */ M_NONNAME, 139, 139,
/* 140: undefined */ M_NONNAME, 140, 140,
/* 141: undefined */ M_NONNAME, 141, 141,
/* 142: undefined */ M_NONNAME, 142, 142,
/* 143: undefined */ M_NONNAME, 143, 143,
/* 144: undefined */ M_NONNAME, 144, 144,
/* 145: undefined */ M_NONNAME, 145, 145,
/* 146: undefined */ M_NONNAME, 146, 146,
/* 147: undefined */ M_NONNAME, 147, 147,
/* 148: undefined */ M_NONNAME, 148, 148,
/* 149: undefined */ M_NONNAME, 149, 149,
/* 150: undefined */ M_NONNAME, 150, 150,
/* 151: undefined */ M_NONNAME, 151, 151,
/* 152: undefined */ M_NONNAME, 152, 152,
/* 153: undefined */ M_NONNAME, 153, 153,
/* 154: undefined */ M_NONNAME, 154, 154,
/* 155: undefined */ M_NONNAME, 155, 155,
/* 156: undefined */ M_NONNAME, 156, 156,
/* 157: undefined */ M_NONNAME, 157, 157,
/* 158: undefined */ M_NONNAME, 158, 158,
/* 159: undefined */ M_NONNAME, 159, 159,
/* 160: undefined */ M_NONNAME, 160, 160,
/* 161: A grave */ M_NMSTART, 161, 200,
/* 162: A circumflex */ M_NMSTART, 162, 192,
/* 163: E grave */ M_NMSTART, 163, 201,
/* 164: E circumflex */ M_NMSTART, 164, 193,
/* 165: E dieresis */ M_NMSTART, 165, 205,
/* 166: I circumflex */ M_NMSTART, 166, 209,
/* 167: I dieresis */ M_NMSTART, 167, 221,
/* 168: acute accent */ M_NONNAME, 168, 168,
/* 169: grave accent */ M_NONNAME, 169, 169,
/* 170: circumflex */ M_NONNAME, 170, 170,
/* 171: dieresis */ M_NONNAME, 171, 171,
/* 172: tilde */ M_NONNAME, 172, 172,
/* 173: U grave */ M_NMSTART, 173, 203,
/* 174: U circumflex */ M_NMSTART, 174, 195,
/* 175: Italian Lira (invalid) */ M_NONNAME, 175, 175,
/* 176: overbar (invalid) */ M_NONNAME, 176, 176,
/* 177: Y acute */ M_NMSTART, 177, 178,
/* 178: y acute */ M_NMSTART, 177, 178,
/* 179: degree (invalid) */ M_NONNAME, 179, 179,
/* 180: C cedilla */ M_NMSTART, 180, 181,
/* 181: c cedilla */ M_NMSTART, 180, 181,
/* 182: N tilde */ M_NMSTART, 182, 183,
/* 183: n tilde */ M_NMSTART, 182, 183,
/* 184: inverted exclamation mark */ M_NONNAME, 184, 184,
/* 185: inverted question mark */ M_NONNAME, 185, 185,
/* 186: currency sign (invalid) */ M_NONNAME, 186, 186,
/* 187: pound sterling (invalid) */ M_NONNAME, 187, 187,
/* 188: Yen */ M_NONNAME, 188, 188,
/* 189: Section sign (invalid) */ M_NONNAME, 189, 189,
/* 190: florin (invalid) */ M_NONNAME, 190, 190,
/* 191: Cent sign (invalid) */ M_NONNAME, 191, 191,
/* 192: a circumflex */ M_NMSTART, 162, 192,
/* 193: e circumflex */ M_NMSTART, 164, 193,
/* 194: o circumflex */ M_NMSTART, 223, 194,
/* 195: u circumflex */ M_NMSTART, 174, 195,
/* 196: a acute */ M_NMSTART, 224, 196,
/* 197: e acute */ M_NMSTART, 220, 197,
/* 198: o acute */ M_NMSTART, 231, 198,
/* 199: u acute */ M_NMSTART, 237, 199,
/* 200: a grave */ M_NMSTART, 161, 200,
/* 201: e grave */ M_NMSTART, 163, 201,
/* 202: o grave */ M_NMSTART, 232, 202,
/* 203: u grave */ M_NMSTART, 173, 203,
/* 204: a dieresis */ M_NMSTART, 216, 204,
/* 205: e dieresis */ M_NMSTART, 165, 205,
/* 206: o dieresis */ M_NMSTART, 218, 206,
/* 207: u dieresis */ M_NMSTART, 219, 207,
/* 208: A angstrom */ M_NMSTART, 208, 212,
/* 209: i circumflex */ M_NMSTART, 166, 209,
/* 210: O slash */ M_NMSTART, 210, 214,
/* 211: AE ligature */ M_NMSTART, 211, 215,
/* 212: a angstrom */ M_NMSTART, 208, 212,
/* 213: i acute */ M_NMSTART, 229, 213,
/* 214: o slash */ M_NMSTART, 210, 214,
/* 215: ae ligature */ M_NMSTART, 211, 215,
/* 216: A dieresis */ M_NMSTART, 216, 204,
/* 217: i grave */ M_NMSTART, 230, 217,
/* 218: O dieresis */ M_NMSTART, 218, 206,
/* 219: U dieresis */ M_NMSTART, 219, 207,
/* 220: E acute */ M_NMSTART, 220, 197,
/* 221: i dieresis */ M_NMSTART, 167, 221,
/* 222: SS ligature */ M_NMSTART, 222, 222,
/* 223: O circumflex */ M_NMSTART, 223, 194,
/* 224: A acute */ M_NMSTART, 224, 196,
/* 225: A tilde */ M_NMSTART, 225, 226,
/* 226: a tilde */ M_NMSTART, 225, 226,
/* 227: Eth (invalid) */ M_NMSTART, 227, 228,
/* 228: eth (invalid) */ M_NMSTART, 227, 228,
/* 229: I acute */ M_NMSTART, 229, 213,
/* 230: I grave */ M_NMSTART, 230, 217,
/* 231: O acute */ M_NMSTART, 231, 198,
/* 232: O grave */ M_NMSTART, 232, 202,
/* 233: O tilde */ M_NMSTART, 233, 234,
/* 234: o tilde */ M_NMSTART, 233, 234,
/* 235: S caron */ M_NMSTART, 235, 236,
/* 236: s caron */ M_NMSTART, 235, 236,
/* 237: U acute */ M_NMSTART, 237, 199,
/* 238: Y dieresis */ M_NMSTART, 238, 239,
/* 239: y dieresis */ M_NMSTART, 238, 239,
/* 240: Thorn (invalid) */ M_NMSTART, 240, 241,
/* 241: thorn (invalid) */ M_NMSTART, 240, 241,
/* 242: undefined */ M_NONNAME, 242, 242,
/* 243: mu (invalid) */ M_NONNAME, 243, 243,
/* 244: paragraph sign (invalid) */ M_NONNAME, 244, 244,
/* 245: fraction 3/4 (invalid) */ M_NONNAME, 245, 245,
/* 246: long dash (invalid) */ M_NONNAME, 246, 246,
/* 247: fraction 1/4 (invalid) */ M_NONNAME, 247, 247,
/* 248: fraction 1/2 (invalid) */ M_NONNAME, 248, 248,
/* 249: Female ordinal (invalid) */ M_NONNAME, 249, 249,
/* 250: Male ordinal (invalid) */ M_NONNAME, 250, 250,
/* 251: French double open quote(invalid) */ M_NONNAME, 251, 251,
/* 252: Solid square (invalid) */ M_NONNAME, 252, 252,
/* 253: French double close quote(invalid) */ M_NONNAME, 253, 253,
/* 254: Plus over minus sign(invalid)*/ M_NONNAME, 254, 254,
/* 255: undefined */ M_NONNAME, 255, 255,
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
/* 2: ^B STX */ {M_NONNAME, 2, 2},
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
/* 8: ^H BS */ {M_NONNAME, 8, 8},
/* 9: ^I HT */ {M_NONNAME, 9, 9},
/* 10: ^J LF */ {M_NONNAME, 10, 10},
/* 11: ^K VT */ {M_NONNAME, 11, 11},
/* 12: ^L FF */ {M_NONNAME, 12, 12},
/* 13: ^M CR */ {M_NONNAME, 13, 13},
/* 14: ^N SO */ {M_NONNAME, 14, 14},
/* 15: ^O SI */ {M_NONNAME, 15, 15},
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
/* 29: ^] GS */ {M_NONNAME, 29, 29},
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
/* 31: ^_ US */ {M_NONNAME, 31, 31},
/* 32: SP */ {M_NONNAME, 32, 32},
/* 33: ! */ {M_NONNAME, 33, 33},
/* 34: " */ {M_NONNAME, 34, 34},
/* 35: # */ {M_NONNAME, 35, 35},
/* 36: $ */ {M_NONNAME, 36, 36},
/* 37: % */ {M_NONNAME, 37, 37},
/* 38: & */ {M_NONNAME, 38, 38},
/* 39: ' */ {M_NONNAME, 39, 39},
/* 40: ( */ {M_NONNAME, 40, 40},
/* 41: ) */ {M_NONNAME, 41, 41},
/* 42: * */ {M_NONNAME, 42, 42},
/* 43: + */ {M_NAMECHAR, 43, 43},
/* 44: , */ {M_NONNAME, 44, 44},
/* 45: - */ {M_NAMECHAR, 45, 45},
/* 46: . */ {M_NAMECHAR, 46, 46},
/* 47: / */ {M_NONNAME, 47, 47},
/* 48: 0 */ {M_DIGIT, 48, 48},
/* 49: 1 */ {M_DIGIT, 49, 49},
/* 50: 2 */ {M_DIGIT, 50, 50},
/* 51: 3 */ {M_DIGIT, 51, 51},
/* 52: 4 */ {M_DIGIT, 52, 52},
/* 53: 5 */ {M_DIGIT, 53, 53},
/* 54: 6 */ {M_DIGIT, 54, 54},
/* 55: 7 */ {M_DIGIT, 55, 55},
/* 56: 8 */ {M_DIGIT, 56, 56},
/* 57: 9 */ {M_DIGIT, 57, 57},
/* 58: : */ {M_NONNAME, 58, 58},
/* 59: ; */ {M_NONNAME, 59, 59},
/* 60: < */ {M_NONNAME, 60, 60},
/* 61: = */ {M_NONNAME, 61, 61},
/* 62: > */ {M_NONNAME, 62, 62},
/* 63: ? */ {M_NONNAME, 63, 63},
/* 64: @ */ {M_NONNAME, 64, 64},
/* 65: A */ {M_NMSTART, 65, 97},
/* 66: B */ {M_NMSTART, 66, 98},
/* 67: C */ {M_NMSTART, 67, 99},
/* 68: D */ {M_NMSTART, 68, 100},
/* 69: E */ {M_NMSTART, 69, 101},
/* 70: F */ {M_NMSTART, 70, 102},
/* 71: G */ {M_NMSTART, 71, 103},
/* 72: H */ {M_NMSTART, 72, 104},
/* 73: I */ {M_NMSTART, 73, 105},
/* 74: J */ {M_NMSTART, 74, 106},
/* 75: K */ {M_NMSTART, 75, 107},
/* 76: L */ {M_NMSTART, 76, 108},
/* 77: M */ {M_NMSTART, 77, 109},
/* 78: N */ {M_NMSTART, 78, 110},
/* 79: O */ {M_NMSTART, 79, 111},
/* 80: P */ {M_NMSTART, 80, 112},
/* 81: Q */ {M_NMSTART, 81, 113},
/* 82: R */ {M_NMSTART, 82, 114},
/* 83: S */ {M_NMSTART, 83, 115},
/* 84: T */ {M_NMSTART, 84, 116},
/* 85: U */ {M_NMSTART, 85, 117},
/* 86: V */ {M_NMSTART, 86, 118},
/* 87: W */ {M_NMSTART, 87, 119},
/* 88: X */ {M_NMSTART, 88, 120},
/* 89: Y */ {M_NMSTART, 89, 121},
/* 90: Z */ {M_NMSTART, 90, 122},
/* 91: [ */ {M_NONNAME, 91, 91},
/* 92: \\ */ {M_NONNAME, 92, 92},
/* 93: ] */ {M_NONNAME, 93, 93},
/* 94: ^ */ {M_NONNAME, 94, 94},
/* 95: _ */ {M_NONNAME, 95, 95},
/* 96: ` */ {M_NONNAME, 96, 96},
/* 97: a */ {M_NMSTART, 65, 97},
/* 98: b */ {M_NMSTART, 66, 98},
/* 99: c */ {M_NMSTART, 67, 99},
/* 100: d */ {M_NMSTART, 68, 100},
/* 101: e */ {M_NMSTART, 69, 101},
/* 102: f */ {M_NMSTART, 70, 102},
/* 103: g */ {M_NMSTART, 71, 103},
/* 104: h */ {M_NMSTART, 72, 104},
/* 105: i */ {M_NMSTART, 73, 105},
/* 106: j */ {M_NMSTART, 74, 106},
/* 107: k */ {M_NMSTART, 75, 107},
/* 108: l */ {M_NMSTART, 76, 108},
/* 109: m */ {M_NMSTART, 77, 109},
/* 110: n */ {M_NMSTART, 78, 110},
/* 111: o */ {M_NMSTART, 79, 111},
/* 112: p */ {M_NMSTART, 80, 112},
/* 113: q */ {M_NMSTART, 81, 113},
/* 114: r */ {M_NMSTART, 82, 114},
/* 115: s */ {M_NMSTART, 83, 115},
/* 116: t */ {M_NMSTART, 84, 116},
/* 117: u */ {M_NMSTART, 85, 117},
/* 118: v */ {M_NMSTART, 86, 118},
/* 119: w */ {M_NMSTART, 87, 119},
/* 120: x */ {M_NMSTART, 88, 120},
/* 121: y */ {M_NMSTART, 89, 121},
/* 122: z */ {M_NMSTART, 90, 122},
/* 123: { */ {M_NONNAME, 123, 123},
/* 124: | */ {M_NONNAME, 124, 124},
/* 125: } */ {M_NONNAME, 125, 125},
/* 126: ~ */ {M_NONNAME, 126, 126},
/* 127: DEL */ {M_NONNAME, 127, 127},
/* 128: undefined */ {M_NONNAME, 128, 128},
/* 129: undefined */ {M_NONNAME, 129, 129},
/* 130: undefined */ {M_NONNAME, 130, 130},
/* 131: undefined */ {M_NONNAME, 131, 131},
/* 132: undefined */ {M_NONNAME, 132, 132},
/* 133: undefined */ {M_NONNAME, 133, 133},
/* 134: undefined */ {M_NONNAME, 134, 134},
/* 135: undefined */ {M_NONNAME, 135, 135},
/* 136: undefined */ {M_NONNAME, 136, 136},
/* 137: undefined */ {M_NONNAME, 137, 137},
/* 138: undefined */ {M_NONNAME, 138, 138},
/* 139: undefined */ {M_NONNAME, 139, 139},
/* 140: undefined */ {M_NONNAME, 140, 140},
/* 141: undefined */ {M_NONNAME, 141, 141},
/* 142: undefined */ {M_NONNAME, 142, 142},
/* 143: undefined */ {M_NONNAME, 143, 143},
/* 144: undefined */ {M_NONNAME, 144, 144},
/* 145: undefined */ {M_NONNAME, 145, 145},
/* 146: undefined */ {M_NONNAME, 146, 146},
/* 147: undefined */ {M_NONNAME, 147, 147},
/* 148: undefined */ {M_NONNAME, 148, 148},
/* 149: undefined */ {M_NONNAME, 149, 149},
/* 150: undefined */ {M_NONNAME, 150, 150},
/* 151: undefined */ {M_NONNAME, 151, 151},
/* 152: undefined */ {M_NONNAME, 152, 152},
/* 153: undefined */ {M_NONNAME, 153, 153},
/* 154: undefined */ {M_NONNAME, 154, 154},
/* 155: undefined */ {M_NONNAME, 155, 155},
/* 156: undefined */ {M_NONNAME, 156, 156},
/* 157: undefined */ {M_NONNAME, 157, 157},
/* 158: undefined */ {M_NONNAME, 158, 158},
/* 159: undefined */ {M_NONNAME, 159, 159},
/* 160: undefined */ {M_NONNAME, 160, 160},
/* 161: A grave */ {M_NMSTART, 161, 200},
/* 162: A circumflex */ {M_NMSTART, 162, 192},
/* 163: E grave */ {M_NMSTART, 163, 201},
/* 164: E circumflex */ {M_NMSTART, 164, 193},
/* 165: E dieresis */ {M_NMSTART, 165, 205},
/* 166: I circumflex */ {M_NMSTART, 166, 209},
/* 167: I dieresis */ {M_NMSTART, 167, 221},
/* 168: acute accent */ {M_NONNAME, 168, 168},
/* 169: grave accent */ {M_NONNAME, 169, 169},
/* 170: circumflex */ {M_NONNAME, 170, 170},
/* 171: dieresis */ {M_NONNAME, 171, 171},
/* 172: tilde */ {M_NONNAME, 172, 172},
/* 173: U grave */ {M_NMSTART, 173, 203},
/* 174: U circumflex */ {M_NMSTART, 174, 195},
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
/* 177: Y acute */ {M_NMSTART, 177, 178},
/* 178: y acute */ {M_NMSTART, 177, 178},
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
/* 180: C cedilla */ {M_NMSTART, 180, 181},
/* 181: c cedilla */ {M_NMSTART, 180, 181},
/* 182: N tilde */ {M_NMSTART, 182, 183},
/* 183: n tilde */ {M_NMSTART, 182, 183},
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
/* 188: Yen */ {M_NONNAME, 188, 188},
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
/* 192: a circumflex */ {M_NMSTART, 162, 192},
/* 193: e circumflex */ {M_NMSTART, 164, 193},
/* 194: o circumflex */ {M_NMSTART, 223, 194},
/* 195: u circumflex */ {M_NMSTART, 174, 195},
/* 196: a acute */ {M_NMSTART, 224, 196},
/* 197: e acute */ {M_NMSTART, 220, 197},
/* 198: o acute */ {M_NMSTART, 231, 198},
/* 199: u acute */ {M_NMSTART, 237, 199},
/* 200: a grave */ {M_NMSTART, 161, 200},
/* 201: e grave */ {M_NMSTART, 163, 201},
/* 202: o grave */ {M_NMSTART, 232, 202},
/* 203: u grave */ {M_NMSTART, 173, 203},
/* 204: a dieresis */ {M_NMSTART, 216, 204},
/* 205: e dieresis */ {M_NMSTART, 165, 205},
/* 206: o dieresis */ {M_NMSTART, 218, 206},
/* 207: u dieresis */ {M_NMSTART, 219, 207},
/* 208: A angstrom */ {M_NMSTART, 208, 212},
/* 209: i circumflex */ {M_NMSTART, 166, 209},
/* 210: O slash */ {M_NMSTART, 210, 214},
/* 211: AE ligature */ {M_NMSTART, 211, 215},
/* 212: a angstrom */ {M_NMSTART, 208, 212},
/* 213: i acute */ {M_NMSTART, 229, 213},
/* 214: o slash */ {M_NMSTART, 210, 214},
/* 215: ae ligature */ {M_NMSTART, 211, 215},
/* 216: A dieresis */ {M_NMSTART, 216, 204},
/* 217: i grave */ {M_NMSTART, 230, 217},
/* 218: O dieresis */ {M_NMSTART, 218, 206},
/* 219: U dieresis */ {M_NMSTART, 219, 207},
/* 220: E acute */ {M_NMSTART, 220, 197},
/* 221: i dieresis */ {M_NMSTART, 167, 221},
/* 222: SS ligature */ {M_NMSTART, 222, 222},
/* 223: O circumflex */ {M_NMSTART, 223, 194},
/* 224: A acute */ {M_NMSTART, 224, 196},
/* 225: A tilde */ {M_NMSTART, 225, 226},
/* 226: a tilde */ {M_NMSTART, 225, 226},
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
/* 229: I acute */ {M_NMSTART, 229, 213},
/* 230: I grave */ {M_NMSTART, 230, 217},
/* 231: O acute */ {M_NMSTART, 231, 198},
/* 232: O grave */ {M_NMSTART, 232, 202},
/* 233: O tilde */ {M_NMSTART, 233, 234},
/* 234: o tilde */ {M_NMSTART, 233, 234},
/* 235: S caron */ {M_NMSTART, 235, 236},
/* 236: s caron */ {M_NMSTART, 235, 236},
/* 237: U acute */ {M_NMSTART, 237, 199},
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
/* 239: y dieresis */ {M_NMSTART, 238, 239},
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
/* 242: undefined */ {M_NONNAME, 242, 242},
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
/* 255: undefined */ {M_NONNAME, 255, 255},
} ;

View File

@@ -127,11 +127,13 @@ M_WCHAR wlb = 0, wcm, wnl, wsl, wst;
if (!wlb)
{
mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
mbtowc(&wcm, ",", 1);
mbtowc(&wnl, "\n", 1);
mbtowc(&wsl, "/", 1);
mbtowc(&wst, "*", 1);
int
ret = mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
ret = mbtowc(&wcm, ",", 1);
ret = mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wsl, "/", 1);
ret = mbtowc(&wst, "*", 1);
(void) ret;
}
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
@@ -226,7 +228,8 @@ M_WCHAR wcl;
char unexp[32]; /* arbitraily large */
int length;
mbtowc(&wcl, ":", 1);
int ret = mbtowc(&wcl, ":", 1);
(void) ret;
while (TRUE)
{
@@ -252,9 +255,11 @@ char *mb_name;
if (!wsm)
{
mbtowc(&wsm, ";", 1);
mbtowc(&wcl, ":", 1);
mbtowc(&wcm, ",", 1);
int
ret = mbtowc(&wsm, ";", 1);
ret = mbtowc(&wcl, ":", 1);
ret = mbtowc(&wcm, ",", 1);
(void) ret;
}
while (TRUE)
@@ -333,7 +338,7 @@ c = readchar(TRUE))
*p++ = (M_WCHAR) c;
}
*p = M_EOS;
if (dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie))
if ((dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie)))
{
withdelim = TRUE;
curdelim = dstruct->count - 1;
@@ -451,7 +456,8 @@ int i;
M_WCHAR wnl;
char *mb_dname, *mb_dstring;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
loading = TRUE;
while ((c = getc(ddat)) != EOF)
@@ -526,13 +532,13 @@ while ((c = getc(ddat)) != EOF)
fprintf(delim,
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
mb_dname,
strlen(mb_dstring) + 1);
(int)strlen(mb_dstring) + 1);
for (p = dstring ; *p ; p++)
{
char *pc;
char mb_p[32]; /* arbitrarily large */
int length, i;
int length;
length = wctomb(mb_p, *p);
mb_p[length] = 0;
@@ -629,7 +635,7 @@ void prtctxt(column, value)
if (! first) fprintf(delim, ",\n");
first = FALSE;
fprintf(delim, " %d, %d", column, value);
fprintf(delim, " {%d, %d}", column, value);
nonzero++;
}
@@ -645,7 +651,8 @@ int readchar(cap)
int c;
M_WCHAR wnl;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
c = mb_getwc(cdat); /* use mb_getwc so we read multi-byte chars */
if (cap && c != EOF) c = m_upper(c);
@@ -667,7 +674,8 @@ int c;
{
M_WCHAR wnl;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
ungetc(c, cdat);
if (c == wnl) m_line--;

View File

@@ -72,8 +72,8 @@ void entout(fname)
int nameindex ;
LOGICAL start ;
strcpy(efilename, fname) ;
strcpy(&efilename[strlen(efilename)], ".h") ;
strncpy(efilename, fname, ENTFILENAME) ;
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
m_openchk(&entfile, efilename, "w") ;
fprintf(entfile, "#include \"entdef.h\"\n") ;
@@ -101,7 +101,7 @@ void entout(fname)
if (start) fputs(",\n", entfile) ;
start = TRUE ;
for (p = ent->content ; *p ; p++)
fprintf(entfile, " %d,\n", *p) ;
fprintf(entfile, " %d,\n", (int)*p) ;
fputs(" 0", entfile) ;
}
fprintf(entfile, "}\n#endif\n") ;
@@ -112,7 +112,7 @@ void entout(fname)
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
for (ent = firstent ; ent ; ent = ent->next) {
for (p = ent->name ; *p ; p++)
fprintf(entfile, " %d,\n", *p) ;
fprintf(entfile, " %d,\n", (int)*p) ;
if (ent != lastent) fputs(" 0,\n", entfile) ;
else fputs(" 0\n", entfile) ;
}
@@ -130,7 +130,7 @@ void entout(fname)
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
for (ent = firstent, conindex = 0, nameindex = 0 ;
ent ; ent = ent->next) {
fprintf(entfile, " %s, %s, ",
fprintf(entfile, " {%s, %s, ",
typetype(ent->type),
typewhere(ent->wheredef)) ;
if (ent->content) {
@@ -143,10 +143,10 @@ void entout(fname)
#if defined(BUILDEXTERN)
fprintf(entfile, ", %d", ent->index) ;
if (ent != lastent)
fprintf(entfile, ", &m_entities[%d], 0", ent->index) ;
else fputs(", NULL, 0", entfile) ;
fprintf(entfile, ", &m_entities[%d], 0}", ent->index) ;
else fputs(", NULL, 0}", entfile) ;
#else
fprintf(entfile, ", %d", ent->codeindex) ;
fprintf(entfile, ", %d}", ent->codeindex) ;
#endif
if (ent != lastent) fprintf(entfile, ", \n") ;
else fprintf(entfile, "}\n#endif\n") ;
@@ -159,7 +159,7 @@ void entout(fname)
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
if (m_enttrie->data) {
count = 0 ;
fputs("#if defined(M_ENTDEF)\n = {\n 0, NULL, &m_enttrie[1]", entfile) ;
fputs("#if defined(M_ENTDEF)\n = {\n {0, NULL, &m_enttrie[1]}", entfile) ;
m_dumptrie(entfile, m_enttrie->data, "m_enttrie", &count, entptr) ;
fprintf(entfile, "}\n#endif\n") ;
}
@@ -225,6 +225,7 @@ char *typewhere(n)
case M_DELTDEF: return(xdeltdef) ;
case FALSE: return("0") ;
}
return("0");
}

View File

@@ -306,8 +306,8 @@ void esuffix(M_NOPAR)
void msgline(text)
char *text ;
{
fprintf(stderr, text) ;
fprintf(m_errfile, text) ;
fprintf(stderr, "%s", text) ;
fprintf(m_errfile, "%s", text) ;
}
/* Print something to both stderr and m_errfile */

View File

@@ -130,17 +130,19 @@ void copyfile(pfile1,pfile2)
{
int ret;
char *pcmd;
int slen;
/* malloc space for the system command: two filenames, plus a command,
spaces, and the terminating null */
pcmd = (char *) malloc(strlen(pfile1) + strlen(pfile2) + 8);
slen = strlen(pfile1) + strlen(pfile2) + 8;
pcmd = (char *) malloc(slen);
#if defined(MSDOS)
ret = sprintf(pcmd,"copy %s %s",pfile1,pfile2);
ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
#else
ret = sprintf(pcmd,"cp %s %s",pfile1,pfile2);
ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
#endif
ret = system(pcmd);
ret = sprintf(pcmd,"touch %s",pfile2);
ret = snprintf(pcmd, slen, "touch %s",pfile2);
ret = system(pcmd);
}

View File

@@ -96,11 +96,11 @@ void m_free(block, msg)
free(block) ;
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) block >> 16),
(unsigned int) block, msg) ;
#else
sprintf(buffer, " %9p", block, msg) ;
snprintf(buffer, 32, " %9p", block) ;
#endif
m_trace(buffer) ;
m_trace("- Freed ") ;
@@ -171,14 +171,14 @@ void *m_malloc(size, msg)
}
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
#else
sprintf(buffer, " %9p", p) ;
snprintf(buffer, 32, " %9p", p) ;
#endif
m_trace(buffer) ;
m_trace("- Allocated ") ;
sprintf(buffer, "%6d", size) ;
snprintf(buffer, 32, "%6d", size) ;
m_trace(buffer) ;
m_trace(" bytes for ") ;
m_trace(msg) ;
@@ -212,14 +212,14 @@ void *m_realloc(ptr, size, msg)
}
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
#else
sprintf(buffer, " %9p", p) ;
snprintf(buffer, 32, " %9p", p) ;
#endif
m_trace(buffer) ;
m_trace("- Re-allocated ") ;
sprintf(buffer, "%6d", size) ;
snprintf(buffer, 32, "%6d", size) ;
m_trace(buffer) ;
m_trace(" bytes for ") ;
m_trace(msg) ;

View File

@@ -33,7 +33,7 @@ int getachar(M_NOPAR)
int c;
M_WCHAR wc,wnl;
char mbyte[32]; /* bigger than any possible multibyte char */
int length;
int length, ret;
if (toundo) wc = (M_WCHAR) savechar[--toundo];
else
@@ -58,10 +58,11 @@ else
return(EOF);
}
}
mbtowc(&wc,mbyte,length);
ret = mbtowc(&wc,mbyte,length);
}
mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wnl, "\n", 1);
(void) ret;
if (wc == wnl) m_line++;
if (wc == 65535)
@@ -246,7 +247,8 @@ if (toundo >= SAVECHAR)
savechar[toundo++] = c;
if (toundo > maxundo) maxundo = toundo;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
if (c == wnl) m_line--;
}

View File

@@ -149,7 +149,7 @@ void *m_ntrtrie(p, xtrie, dataval)
M_TRIE *currentnode ;
void *n ;
if (n = m_lookfortrie(p, xtrie)) return(n) ;
if ((n = m_lookfortrie(p, xtrie))) return(n) ;
currentnode = xtrie ;
for ( ; *p ; p++)
m_entercharintrie(&currentnode, m_ctupper(*p)) ;

View File

@@ -88,12 +88,12 @@ void dumpnode(first, file, trieptr, count, proc)
/* generate a child */
if (*first) *first = FALSE ;
else fprintf(file, ",\n") ;
fprintf(file, " ") ;
fprintf(file, " {") ;
if (p->next) fprintf(file, "TRUE, ") ;
else fprintf(file, "FALSE, ") ;
fprintf(file, "%d", p->symbol) ;
if (p->symbol) fprintf(file, ", %d", *count) ;
else (*proc)(file, p->data) ;
fprintf(file, "%d", (int)p->symbol) ;
if (p->symbol) fprintf(file, ", %d}", *count) ;
else { (*proc)(file, p->data) ; fprintf(file, "}") ; }
/* count the children of the child*/
if (p->symbol) countdown(p, count) ;
@@ -110,5 +110,5 @@ void printval(file, value)
FILE *file ;
void *value ;
{
fprintf(file, ", %d", (int) value) ;
fprintf(file, ", %ld", (long) value) ;
}

View File

@@ -62,14 +62,14 @@ void m_dumptrie(file, xtrie, extname, count, proc)
for (p = xtrie ; p ; p = p->next) {
(*count)++ ;
fprintf(file, ",\n %d, ", p-> symbol) ;
fprintf(file, ",\n {%d, ", (int)p-> symbol) ;
if (p->next) fprintf(file, "&%s[%d], ", extname, *count + 1) ;
else fputs("NULL, ", file) ;
if (p->symbol) {
fprintf(file, "&%s[%d]", extname, firstson) ;
fprintf(file, "&%s[%d]}", extname, firstson) ;
countdown(p, &firstson) ;
}
else (*proc) (p->data) ;
else { (*proc) (p->data) ; fprintf(file, "}") ; }
}
for (p = xtrie ; p ; p = p->next)

View File

@@ -72,7 +72,7 @@ M_WCHAR *string1start;
string1start = string1;
while (*string1++ = *string2++);
while ((*string1++ = *string2++));
return string1start;
}
@@ -205,7 +205,7 @@ length = (length + sizeof(M_WCHAR) - 1) / sizeof(M_WCHAR);
mb_string = (char *) m_malloc(length, "multi-byte string");
length = 0;
while (wc = *wc_string++)
while ((wc = *wc_string++))
{
if ((retVal = wctomb(&mb_string[length], wc)) > 0)
length += retVal;
@@ -226,7 +226,6 @@ char *mb_string;
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
char c;
if (!mb_string)
mb_string = "";
@@ -244,8 +243,9 @@ while (mb_string[length])
badOne[0] = mb_string[length];
badOne[1] = 0;
sprintf(buffer, "0x%x", mb_string[length]);
m_err2("invalid multibyte character found: '%c' (%s)", badOne, buffer);
snprintf(buffer, 32, "0x%x", mb_string[length]);
m_err2("invalid multibyte character found: '%c' (%s)",
(M_WCHAR *)badOne, (M_WCHAR *)buffer);
incr = 1;
}
length += incr;
@@ -263,7 +263,6 @@ void *m_ptr;
{
int c;
M_WCHAR wc;
char badch[2];
char mbyte[32]; /* make this bigger than any possible multi-byte char */
int length;
@@ -288,7 +287,8 @@ while (1)
return(EOF);
}
}
mbtowc(&wc,mbyte,length);
int ret = mbtowc(&wc,mbyte,length);
(void) ret;
return((int) wc);
}

View File

@@ -41,7 +41,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entdef.h"
/* Main procedure */
void main(argc, argv)
int main(argc, argv)
int argc ;
char **argv ;
{
@@ -67,8 +67,9 @@ while (TRUE)
if (scantrace)
printf(
"m_prevcon=%d, m_token=%d, curcon=%d, scanval = %c (%d), line=%d\n",
m_prevcon, m_token, curcon, scanval, scanval, m_line) ;
m_prevcon, m_token, curcon, (char)scanval, (int)scanval, m_line) ;
#include "case.c"
if (m_token == ENDFILE) exit(FALSE) ;
}
return 0;
}

View File

@@ -43,7 +43,7 @@ LOGICAL *flag;
char *delim;
{
M_WCHAR wcbuff[129];
size_t length;
ssize_t length;
wcbuff[128] = 0;
length = mbstowcs(wcbuff,delim,128);
@@ -73,7 +73,7 @@ m_openchk(&m_errfile, "error", "w") ;
fprintf(stderr, "MARKUP System - BUILD %s\n", M_VERSION) ;
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
if (! standard)
warning("Warning: optional enhancements of SGML enabled.") ;
warning("Info: optional enhancements of SGML enabled.") ;
mb_delims = mb_dlmptr;
wc_delims = m_dlmptr;
@@ -112,7 +112,7 @@ void ruleinit(M_NOPAR)
/* Rule end processing */
void rulend(M_NOPAR)
{
STATE *fsa ;
STATE *fsa = NULL ;
LOGICAL canbenull ;
LHS *lhsp ;
LHS *discard ;
@@ -153,7 +153,7 @@ void rulend(M_NOPAR)
void skiptoend(M_NOPAR)
{
int i ;
static errlev = 0 ;
static int errlev = 0 ;
if (! errlev++) {
curcon = ERROR ;

View File

@@ -42,7 +42,7 @@ ELTSTRUCT *ntrelt(p)
int length ;
new = (ELTSTRUCT *) m_malloc(sizeof(ELTSTRUCT), "element structure") ;
if (old = (ELTSTRUCT *) m_ntrtrie(p, &eltree, (M_TRIE *) new)) {
if ((old = (ELTSTRUCT *) m_ntrtrie(p, &eltree, (M_TRIE *) new))) {
m_free((M_POINTER) new, "element structure") ;
return(old) ;
}

View File

@@ -85,11 +85,11 @@ void checkand(andstart, andptr, start, root, errelt)
for (pand = parc->group ; pand ; pand = pand->next)
checkand(andstart, andptr, pand->start, root, errelt) ;
}
else if (c = checkdfsa(andptr->start,
else if ((c = checkdfsa(andptr->start,
parc->label,
parc->group,
parc->id,
errelt))
errelt)))
nondeterm(root, c, *errelt) ;
}
}
@@ -112,7 +112,7 @@ int checkdfsa(from, label, and, id, errelt)
if (parc->group) {
if (and == parc->group) return(ANDCONFLICT) ;
for (group = parc->group ; group ; group = group->next)
if (c = checkdfsa(group->start, label, and, id, errelt))
if ((c = checkdfsa(group->start, label, and, id, errelt)))
return(c) ;
}
else if (! and && label == parc->label && parc->id != id) {
@@ -138,14 +138,14 @@ int checkrepeat(from, and, errelt)
for (; and ; and = and->next)
for (parc = and->start->first ; parc ; parc = parc->next) {
if (parc->group)
if (c = checkrepeat(from, parc->group, errelt)) return(c) ;
if ((c = checkrepeat(from, parc->group, errelt))) return(c) ;
else ;
else
if (c = checkdfsa(from,
if ((c = checkdfsa(from,
parc->label,
M_NULLVAL,
parc->id,
errelt))
errelt)))
return(c) ;
else ;
}
@@ -239,7 +239,7 @@ void makeand(canbenull, root, optional)
TREE *child ;
STATELIST *start, *final ;
LOGICAL groupbenull ;
ANDGROUP *andptr, *saveand, *otherand ;
ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
STATELIST *index ;
ELTSTRUCT *errelt ;
@@ -579,7 +579,7 @@ void repeat(root)
for (a = top->starta ; a ; a = a->next) {
for (final = top->allfinal ; final ; final = final->next) {
if (a->group)
if (c = checkrepeat(final->value, a->group, &errelt)) {
if ((c = checkrepeat(final->value, a->group, &errelt))) {
wtemp = MakeWideCharString(root->occurrence == PLUS ? plus : rep);
warning1("Conflict in use of %s", wtemp);
m_free(wtemp, "wide character string");
@@ -588,11 +588,11 @@ void repeat(root)
else
;
else
if (c = checkdfsa(final->value,
if ((c = checkdfsa(final->value,
a->label,
a->group,
a->id,
&errelt))
&errelt)))
nondeterm (root, c, errelt) ;
else
;
@@ -600,14 +600,14 @@ void repeat(root)
for (final = top->finals ; final ; final = final->next) {
if (samelabelarc(a, final->value)) continue ;
if (a->group)
if (c = checkrepeat(final->value, a->group, &errelt))
if ((c = checkrepeat(final->value, a->group, &errelt)))
nondeterm(root, c, errelt) ;
if (a->label ||
a->group ||
! final->value->frompcdata) {
if (c = addarc(final->value, a->to, a->label,
if ((c = addarc(final->value, a->to, a->label,
a->group, TRUE, a->id,
a->minim, &errelt))
a->minim, &errelt)))
nondeterm(root, c, errelt) ;
if (permitspcd(a)) final->value->datacontent = TRUE ;
}
@@ -697,7 +697,7 @@ void simplebranch(root, value, group, optional)
states of and-groups that terminate at the start state of the new
arc */
for (index = top->allfinal ; index ; index = index->next)
if (c = checkdfsa(index->value, value, group, root->eltid, &errelt))
if ((c = checkdfsa(index->value, value, group, root->eltid, &errelt)))
nondeterm(root, c, errelt) ;
for (index = top->starts ; index ; index = index->next) {
if (! group && ! value && index->value->frompcdata)

View File

@@ -31,6 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#if defined(MSDOS)
#include <process.h>
#endif
@@ -195,7 +196,7 @@ void eltreeout(M_NOPAR)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = eltp->enptr ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -211,14 +212,14 @@ void eltreeout(M_NOPAR)
else fputs(",\n", dtd) ;
if (! eltp->content)
warning1("No content model for element %s", eltp->enptr) ;
fprintf(dtd, " %d, %d, %s, ",
fprintf(dtd, " {%d, %d, %s, ",
enameindex, eltp->model ? eltp->model->count : 0,
typecon(eltp->content)) ;
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
fprintf(dtd, "%d, %d, %d",
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
enameindex += w_strlen(eltp->enptr) + 1 ;
fprintf(dtd, ", %s, %s, %s",
fprintf(dtd, ", %s, %s, %s}",
boolean(eltp->stmin), boolean(eltp->etmin), boolean(eltp->useoradd)) ;
}
fputs(ndif, dtd) ;
@@ -259,7 +260,7 @@ void exout(M_NOPAR)
if (! first) fputs(",\n", dtd) ;
first = FALSE ;
exindex++ ;
fprintf(dtd, " %d, %d", ex->element, ex->next ? exindex + 1 : 0) ;
fprintf(dtd, " {%d, %d}", ex->element, ex->next ? exindex + 1 : 0) ;
}
fputs(ndif, dtd) ;
}
@@ -294,7 +295,7 @@ void fsa(M_NOPAR)
for (pstate = firststate ; pstate ; pstate = pstate->next) {
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %s, %s, %d",
fprintf(dtd, " {%s, %s, %d}",
boolean(pstate->final), boolean(pstate->datacontent),
pstate->first ? ++arcount : 0) ;
for (parc = pstate->first ; parc ; parc = parc->next) {
@@ -319,7 +320,7 @@ void fsa(M_NOPAR)
for (pand = firstand ; pand ; pand = pand->nextptr) {
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %d, %d",
fprintf(dtd, " {%d, %d}",
pand->start->count,
pand->next ? pand->next->count : M_NULLVAL) ;
}
@@ -352,7 +353,7 @@ if (kwlen)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = ptypep->keyword ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -372,7 +373,7 @@ if (deflen)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = paramp->defstring ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -392,7 +393,7 @@ if (ptypelen)
{
if (first) first = FALSE ;
else fprintf(dtd, ",\n") ;
fprintf(dtd, " %d, %d", kw, ptypep->next) ;
fprintf(dtd, " {%d, %d}", kw, ptypep->next) ;
kw += w_strlen(ptypep->keyword) + 1 ;
}
fputs(ndif, dtd) ;
@@ -412,21 +413,21 @@ if (parcount)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd,
" %d, %s, %d, %s, ",
" {%d, %s, %d, %s, ",
pnameindex,
partype(paramp->type),
paramp->kwlist,
deftype(paramp->deftype)) ;
pnameindex += w_strlen(paramp->paramname) + 1 ;
if (paramp->defval)
fprintf(dtd, "&m_keyword[%d]", paramp->defval - 1) ;
fprintf(dtd, "&m_keyword[%d]}", paramp->defval - 1) ;
else if (paramp->defstring)
{
fprintf(dtd, "&m_defval[%d]", defindex) ;
fprintf(dtd, "&m_defval[%d]}", defindex) ;
defindex += w_strlen(paramp->defstring) + 1 ;
}
else
fputs("NULL", dtd) ;
fputs("NULL}", dtd) ;
}
fputs(ndif, dtd) ;
}
@@ -443,7 +444,7 @@ if (pnamelen)
{
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = paramp->paramname ; *p ; p++) fprintf(dtd, " %d,\n", *p) ;
for (p = paramp->paramname ; *p ; p++) fprintf(dtd, " %d,\n", (int)*p);
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -534,10 +535,10 @@ void srefout(M_NOPAR)
count++ ;
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %d, %d, ", j + 1, mapbysref[sreflen * i + j]) ;
fprintf(dtd, " {%d, %d, ", j + 1, mapbysref[sreflen * i + j]) ;
for (j++ ; j < sreflen ; j++)
if (mapbysref[sreflen * i + j]) break ;
fprintf(dtd, "%d", j < sreflen ? count + 1 : 0) ;
fprintf(dtd, "%d}", j < sreflen ? count + 1 : 0) ;
}
else j++ ;
fputs(ndif, dtd) ;
@@ -557,7 +558,7 @@ char *mb_paramname;
int indent ;
int i ;
fprintf(tempfile, "\n<ELEMENT %s>\n", eltp->enptr) ;
fprintf(tempfile, "\n<ELEMENT %s>\n", (char *)eltp->enptr) ;
if (eltp->parptr)
{
fputs(" /*\n", tempfile) ;
@@ -570,7 +571,8 @@ if (eltp->parptr)
{
int length;
char mbyte[32]; /* larger than any multibyte character */
char *pc, c;
char *pc;
unsigned char c;
length = wctomb(mbyte, *p);
if (length < 0)
@@ -600,8 +602,8 @@ if (eltp->parptr)
mb_keyword = MakeMByteString(ptypep->keyword);
fprintf(tempfile,
"%s = %s",
ptypep->keyword,
ptypep->keyword) ;
(char *)ptypep->keyword,
(char *)ptypep->keyword) ;
m_free(mb_keyword,"multi-byte string");
ptypep = ptypep->next ? ptypep->nextptr : (PTYPE *) NULL ;
if (ptypep)
@@ -640,7 +642,7 @@ void template(M_NOPAR)
undefent = TRUE ;
}
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
ent->name,
(char *)ent->name,
enttype(ent->type)
) ;
}

View File

@@ -89,7 +89,7 @@ ptypelen++ ;
/* Add a parameter to the current element */
void addpar(M_NOPAR)
{
PARAMETER *paramp, *last ;
PARAMETER *paramp, *last = NULL ;
int length ;
parcount++ ;
@@ -200,6 +200,7 @@ switch (newpar->type)
}
break ;
}
return(FALSE);
}
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
@@ -212,7 +213,7 @@ M_WCHAR *string ;
#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
int i ;
int i, ret ;
switch (newpar->type)
{
@@ -238,7 +239,7 @@ switch (newpar->type)
for (p = string, i = 0 ; *p ; p++, i++)
if (m_whitespace(*p))
{
mbtowc(p, " ", 1);
ret = mbtowc(p, " ", 1);
for (q = p + 1 ; m_whitespace(*q); q++) ;
w_strcpy(p + 1, q) ;
}
@@ -262,10 +263,13 @@ switch (newpar->type)
mbyte[1] = 0;
}
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
mbtowc(string, " ", 1);
{
ret = mbtowc(string, " ", 1);
}
}
return ;
}
(void) ret;
}
/* Called at end of parameter attribute list rule */

View File

@@ -330,7 +330,7 @@ LOGICAL litproc(
#endif
) ;
void main(
int main(
#if defined(M_PROTO)
int argc, char **argv
#endif

View File

@@ -80,9 +80,10 @@ int c;
int n;
M_WCHAR wsp, wnl, wtb;
mbtowc(&wsp, " ", 1);
mbtowc(&wnl, "\n", 1);
mbtowc(&wtb, "\t", 1);
int
ret = mbtowc(&wsp, " ", 1);
ret = mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wtb, "\t", 1);
while (TRUE)
{
@@ -158,13 +159,14 @@ while (TRUE)
{
char mbyte[32]; /* bigger than the biggest multibyte char */
wctomb(mbyte, c);
ret = wctomb(mbyte, c);
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
m_error("Unexpected character");
}
} /* End while */
(void) ret;
} /* End scan */
#include "scanutil.c"

View File

@@ -40,7 +40,7 @@ void adddefent(mapname)
M_WCHAR *mapname;
{
M_WCHAR *p;
int n, length;
int n;
char c;
if (!wc_prefix)
@@ -59,8 +59,9 @@ for (n = egensuf ; n ; n /= 10)
return;
}
c = ('0' + (n % 10));
mbtowc(p, &c, 1);
*p++;
int ret = mbtowc(p, &c, 1);
(void) ret;
p++;
}
*p = M_EOS;
egensuf++;
@@ -80,7 +81,7 @@ M_WCHAR *name;
M_ENTITY *new;
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity");
if (entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new))
if ((entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new)))
{
m_free((M_POINTER) new, "entity");
return(FALSE);
@@ -113,7 +114,7 @@ MAP *new;
LOGICAL retval;
new = (MAP *) m_malloc(sizeof(MAP), "map");
if (old = (MAP *) m_ntrtrie(p, &maptree, (M_TRIE *) new))
if ((old = (MAP *) m_ntrtrie(p, &maptree, (M_TRIE *) new)))
{
m_free(new, "map");
curmap = old->map;
@@ -153,7 +154,7 @@ int noseq = 0;
/* Define the delimiter */
delim = (SREFSTRUCT *)
m_malloc(sizeof(SREFSTRUCT), "short reference delimiter");
if (prevsr = (SREFSTRUCT *) m_ntrtrie(p, &sreftree, (M_TRIE *) delim))
if ((prevsr = (SREFSTRUCT *) m_ntrtrie(p, &sreftree, (M_TRIE *) delim)))
{
m_free(delim, "short reference delimiter");
delim = prevsr;

View File

@@ -626,7 +626,7 @@ name
pcchain:pcchain {
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
(*nextchain)->next = NULL ;
if ((*nextchain)->elt = m_packedlook(m_entree, name))
if (((*nextchain)->elt = m_packedlook(m_entree, name)))
(*nextchain)->elt++ ;
else
m_err1("Undefined element: %s", name) ;
@@ -660,61 +660,61 @@ text
}
}
globdef:globdef {
fprintf(globdef, "%c", textchar) ;
fprintf(globdef, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
globdec:globdec {
fprintf(globdec, "%c", textchar) ;
fprintf(globdec, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
iniss:iniss,
inss:inss {
if (! stringstart) fprintf(string, ",\n") ;
fprintf(string, " %d", textchar) ;
fprintf(string, " %d", (int)textchar) ;
stringstart = FALSE ;
stringcnt++ ;
}
inies:inies,
ines:ines {
if (! stringstart) fprintf(string, ",\n") ;
fprintf(string, " %d", textchar) ;
fprintf(string, " %d", (int)textchar) ;
stringstart = FALSE ;
stringcnt++ ;
}
inisc:inisc,
insc:insc {
fprintf(sfile, "%c", textchar) ;
fprintf(sfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
iniec:iniec,
inec:inec {
fprintf(efile, "%c", textchar) ;
fprintf(efile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
initc:initc,
intc:intc {
fprintf(tfile, "%c", textchar) ;
fprintf(tfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inipc:inipc,
inpc:inpc {
fprintf(pfile, "%c", textchar) ;
fprintf(pfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inistc:inistc,
instc:instc {
fprintf(stfile, "%c", textchar) ;
fprintf(stfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inentc:inentc {
fprintf(entfile, "%c", textchar) ;
fprintf(entfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}

View File

@@ -55,7 +55,7 @@ int main(argc, argv)
{
int m_token ;
if (argc > 2)
if (argc > 2) {
if (*argv[2] == '-') {
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
if (strchr(argv[2], 'A')) m_malftrace = TRUE ;
@@ -70,6 +70,7 @@ int main(argc, argv)
fprintf(stderr,
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
) ;
}
if (argc < 2) {
fprintf(stderr, "**** Specify interface file ****\n") ;
exit(TRUE) ;
@@ -84,7 +85,7 @@ int main(argc, argv)
if (scantrace)
printf(
"Main: m_prevcon=%d,m_token=%d,curcon=%d,textchar='%c'(%d), line=%d\n",
m_prevcon, m_token, curcon, textchar, textchar, m_line) ;
m_prevcon, m_token, curcon, (char)textchar, (int)textchar, m_line) ;
#include "case.c"
if (m_token == ENDFILE) break ;
if (! curcon) {

View File

@@ -106,7 +106,7 @@ void cvalue(M_NOPAR)
PARVAL *new;
new = (PARVAL *) m_malloc(sizeof(PARVAL), "parameter value");
if (pval = (PARVAL *) m_ntrtrie(name, &parval, (M_TRIE *) new))
if ((pval = (PARVAL *) m_ntrtrie(name, &parval, (M_TRIE *) new)))
m_free(new, "parameter value");
else {
new->line = 0;
@@ -467,7 +467,7 @@ for ( ; p ; p = p->next)
iffile);
fprintf(pvalh, "#define %s \"", mb_cname);
m_free(mb_cname,"multi-byte string");
if (q = ((PARVAL *) p->data)->value)
if ((q = ((PARVAL *) p->data)->value))
for ( ; *q ; q++)
{
char mbq[32]; /* larger than largest possible mbyte char */
@@ -498,7 +498,7 @@ for ( ; p ; p = p->next)
void skiptoend(M_NOPAR)
{
int i;
static errlev = 0;
static int errlev = 0;
CVARSTRUCT *cvarp, *dvarp;
for (cvarp = cvarlist ; cvarp ;) {
@@ -615,7 +615,7 @@ void startelement(M_NOPAR)
m_free(discard, "C variable");
}
cvarlist = NULL;
if (openelt = m_packedlook(m_entree, name)) {
if ((openelt = m_packedlook(m_entree, name))) {
if (processed[openelt - 1])
warning1("Warning: Element %s already processed", name);
processed[openelt - 1] = TRUE;
@@ -670,7 +670,7 @@ if (m_partype(cvarlist->param + m_element[openelt - 1].parptr, p))
{
M_WCHAR *w_buffer;
sprintf(buffer, "%d", pval->line);
snprintf(buffer, 5, "%d", pval->line);
w_buffer = MakeWideCharString(buffer);
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
pval->cname,

View File

@@ -40,7 +40,7 @@ void addent(M_NOPAR)
M_ENTITY *new ;
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity") ;
if (entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new)) {
if ((entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new))) {
m_free(new, "entity") ;
if (! entity->wheredef) return ;
if (entity->wheredef == M_DBUILD) {

View File

@@ -53,7 +53,8 @@ M_WCHAR *p, wus;
int c, cttype;
LOGICAL cname;
mbtowc(&wus, "_", 1);
int ret = mbtowc(&wus, "_", 1);
(void) ret;
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
*(p = name) = (M_WCHAR) first;
@@ -92,7 +93,8 @@ int n;
static char unexp[] = "c";
M_WCHAR wus;
mbtowc(&wus, "_", 1);
int ret = mbtowc(&wus, "_", 1);
(void) ret;
while (TRUE)
{

View File

@@ -112,3 +112,21 @@ void *m_malloc(
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
) ;

View File

@@ -29,262 +29,262 @@ by HP Tag are marked "(invalid)". */
M_CHARTYPE m_ctarray[M_CHARSETLEN]
= {
/* Char Name Type, Upper, Lower */
/* 0: ^@ NUL */ M_NONNAME, 0, 0,
/* 1: ^A SOH */ M_NONNAME, 1, 1,
/* 2: ^B STX */ M_NONNAME, 2, 2,
/* 3: ^C ETX */ M_NONNAME, 3, 3,
/* 4: ^D EOT */ M_NONNAME, 4, 4,
/* 5: ^E ENQ */ M_NONNAME, 5, 5,
/* 6: ^F ACK */ M_NONNAME, 6, 6,
/* 7: ^G BEL */ M_NONNAME, 7, 7,
/* 8: ^H BS */ M_NONNAME, 8, 8,
/* 9: ^I HT */ M_NONNAME, 9, 9,
/* 10: ^J LF */ M_NONNAME, 10, 10,
/* 11: ^K VT */ M_NONNAME, 11, 11,
/* 12: ^L FF */ M_NONNAME, 12, 12,
/* 13: ^M CR */ M_NONNAME, 13, 13,
/* 14: ^N SO */ M_NONNAME, 14, 14,
/* 15: ^O SI */ M_NONNAME, 15, 15,
/* 16: ^P DLE */ M_NONNAME, 16, 16,
/* 17: ^Q DC1 */ M_NONNAME, 17, 17,
/* 18: ^R DC2 */ M_NONNAME, 18, 18,
/* 19: ^S DC3 */ M_NONNAME, 19, 19,
/* 20: ^T DC4 */ M_NONNAME, 20, 20,
/* 21: ^U NAK */ M_NONNAME, 21, 21,
/* 22: ^V SYN */ M_NONNAME, 22, 22,
/* 23: ^W ETB */ M_NONNAME, 23, 23,
/* 24: ^X CAN */ M_NONNAME, 24, 24,
/* 25: ^Y EM */ M_NONNAME, 25, 25,
/* 26: ^Z SUB */ M_NONNAME, 26, 26,
/* 27: ^[ ESC */ M_NONNAME, 27, 27,
/* 28: ^\ FS */ M_NONNAME, 28, 28,
/* 29: ^] GS */ M_NONNAME, 29, 29,
/* 30: ^^ RS */ M_NONNAME, 30, 30,
/* 31: ^_ US */ M_NONNAME, 31, 31,
/* 32: SP */ M_NONNAME, 32, 32,
/* 33: ! */ M_NONNAME, 33, 33,
/* 34: " */ M_NONNAME, 34, 34,
/* 35: # */ M_NONNAME, 35, 35,
/* 36: $ */ M_NONNAME, 36, 36,
/* 37: % */ M_NONNAME, 37, 37,
/* 38: & */ M_NONNAME, 38, 38,
/* 39: ' */ M_NONNAME, 39, 39,
/* 40: ( */ M_NONNAME, 40, 40,
/* 41: ) */ M_NONNAME, 41, 41,
/* 42: * */ M_NONNAME, 42, 42,
/* 43: + */ M_NAMECHAR, 43, 43,
/* 44: , */ M_NONNAME, 44, 44,
/* 45: - */ M_NAMECHAR, 45, 45,
/* 46: . */ M_NAMECHAR, 46, 46,
/* 47: / */ M_NONNAME, 47, 47,
/* 48: 0 */ M_DIGIT, 48, 48,
/* 49: 1 */ M_DIGIT, 49, 49,
/* 50: 2 */ M_DIGIT, 50, 50,
/* 51: 3 */ M_DIGIT, 51, 51,
/* 52: 4 */ M_DIGIT, 52, 52,
/* 53: 5 */ M_DIGIT, 53, 53,
/* 54: 6 */ M_DIGIT, 54, 54,
/* 55: 7 */ M_DIGIT, 55, 55,
/* 56: 8 */ M_DIGIT, 56, 56,
/* 57: 9 */ M_DIGIT, 57, 57,
/* 58: : */ M_NONNAME, 58, 58,
/* 59: ; */ M_NONNAME, 59, 59,
/* 60: < */ M_NONNAME, 60, 60,
/* 61: = */ M_NONNAME, 61, 61,
/* 62: > */ M_NONNAME, 62, 62,
/* 63: ? */ M_NONNAME, 63, 63,
/* 64: @ */ M_NONNAME, 64, 64,
/* 65: A */ M_NMSTART, 65, 97,
/* 66: B */ M_NMSTART, 66, 98,
/* 67: C */ M_NMSTART, 67, 99,
/* 68: D */ M_NMSTART, 68, 100,
/* 69: E */ M_NMSTART, 69, 101,
/* 70: F */ M_NMSTART, 70, 102,
/* 71: G */ M_NMSTART, 71, 103,
/* 72: H */ M_NMSTART, 72, 104,
/* 73: I */ M_NMSTART, 73, 105,
/* 74: J */ M_NMSTART, 74, 106,
/* 75: K */ M_NMSTART, 75, 107,
/* 76: L */ M_NMSTART, 76, 108,
/* 77: M */ M_NMSTART, 77, 109,
/* 78: N */ M_NMSTART, 78, 110,
/* 79: O */ M_NMSTART, 79, 111,
/* 80: P */ M_NMSTART, 80, 112,
/* 81: Q */ M_NMSTART, 81, 113,
/* 82: R */ M_NMSTART, 82, 114,
/* 83: S */ M_NMSTART, 83, 115,
/* 84: T */ M_NMSTART, 84, 116,
/* 85: U */ M_NMSTART, 85, 117,
/* 86: V */ M_NMSTART, 86, 118,
/* 87: W */ M_NMSTART, 87, 119,
/* 88: X */ M_NMSTART, 88, 120,
/* 89: Y */ M_NMSTART, 89, 121,
/* 90: Z */ M_NMSTART, 90, 122,
/* 91: [ */ M_NONNAME, 91, 91,
/* 92: \\ */ M_NONNAME, 92, 92,
/* 93: ] */ M_NONNAME, 93, 93,
/* 94: ^ */ M_NONNAME, 94, 94,
/* 95: _ */ M_NONNAME, 95, 95,
/* 96: ` */ M_NONNAME, 96, 96,
/* 97: a */ M_NMSTART, 65, 97,
/* 98: b */ M_NMSTART, 66, 98,
/* 99: c */ M_NMSTART, 67, 99,
/* 100: d */ M_NMSTART, 68, 100,
/* 101: e */ M_NMSTART, 69, 101,
/* 102: f */ M_NMSTART, 70, 102,
/* 103: g */ M_NMSTART, 71, 103,
/* 104: h */ M_NMSTART, 72, 104,
/* 105: i */ M_NMSTART, 73, 105,
/* 106: j */ M_NMSTART, 74, 106,
/* 107: k */ M_NMSTART, 75, 107,
/* 108: l */ M_NMSTART, 76, 108,
/* 109: m */ M_NMSTART, 77, 109,
/* 110: n */ M_NMSTART, 78, 110,
/* 111: o */ M_NMSTART, 79, 111,
/* 112: p */ M_NMSTART, 80, 112,
/* 113: q */ M_NMSTART, 81, 113,
/* 114: r */ M_NMSTART, 82, 114,
/* 115: s */ M_NMSTART, 83, 115,
/* 116: t */ M_NMSTART, 84, 116,
/* 117: u */ M_NMSTART, 85, 117,
/* 118: v */ M_NMSTART, 86, 118,
/* 119: w */ M_NMSTART, 87, 119,
/* 120: x */ M_NMSTART, 88, 120,
/* 121: y */ M_NMSTART, 89, 121,
/* 122: z */ M_NMSTART, 90, 122,
/* 123: { */ M_NONNAME, 123, 123,
/* 124: | */ M_NONNAME, 124, 124,
/* 125: } */ M_NONNAME, 125, 125,
/* 126: ~ */ M_NONNAME, 126, 126,
/* 127: DEL */ M_NONNAME, 127, 127,
/* 128: undefined */ M_NONNAME, 128, 128,
/* 129: undefined */ M_NONNAME, 129, 129,
/* 130: undefined */ M_NONNAME, 130, 130,
/* 131: undefined */ M_NONNAME, 131, 131,
/* 132: undefined */ M_NONNAME, 132, 132,
/* 133: undefined */ M_NONNAME, 133, 133,
/* 134: undefined */ M_NONNAME, 134, 134,
/* 135: undefined */ M_NONNAME, 135, 135,
/* 136: undefined */ M_NONNAME, 136, 136,
/* 137: undefined */ M_NONNAME, 137, 137,
/* 138: undefined */ M_NONNAME, 138, 138,
/* 139: undefined */ M_NONNAME, 139, 139,
/* 140: undefined */ M_NONNAME, 140, 140,
/* 141: undefined */ M_NONNAME, 141, 141,
/* 142: undefined */ M_NONNAME, 142, 142,
/* 143: undefined */ M_NONNAME, 143, 143,
/* 144: undefined */ M_NONNAME, 144, 144,
/* 145: undefined */ M_NONNAME, 145, 145,
/* 146: undefined */ M_NONNAME, 146, 146,
/* 147: undefined */ M_NONNAME, 147, 147,
/* 148: undefined */ M_NONNAME, 148, 148,
/* 149: undefined */ M_NONNAME, 149, 149,
/* 150: undefined */ M_NONNAME, 150, 150,
/* 151: undefined */ M_NONNAME, 151, 151,
/* 152: undefined */ M_NONNAME, 152, 152,
/* 153: undefined */ M_NONNAME, 153, 153,
/* 154: undefined */ M_NONNAME, 154, 154,
/* 155: undefined */ M_NONNAME, 155, 155,
/* 156: undefined */ M_NONNAME, 156, 156,
/* 157: undefined */ M_NONNAME, 157, 157,
/* 158: undefined */ M_NONNAME, 158, 158,
/* 159: undefined */ M_NONNAME, 159, 159,
/* 160: undefined */ M_NONNAME, 160, 160,
/* 161: A grave */ M_NMSTART, 161, 200,
/* 162: A circumflex */ M_NMSTART, 162, 192,
/* 163: E grave */ M_NMSTART, 163, 201,
/* 164: E circumflex */ M_NMSTART, 164, 193,
/* 165: E dieresis */ M_NMSTART, 165, 205,
/* 166: I circumflex */ M_NMSTART, 166, 209,
/* 167: I dieresis */ M_NMSTART, 167, 221,
/* 168: acute accent */ M_NONNAME, 168, 168,
/* 169: grave accent */ M_NONNAME, 169, 169,
/* 170: circumflex */ M_NONNAME, 170, 170,
/* 171: dieresis */ M_NONNAME, 171, 171,
/* 172: tilde */ M_NONNAME, 172, 172,
/* 173: U grave */ M_NMSTART, 173, 203,
/* 174: U circumflex */ M_NMSTART, 174, 195,
/* 175: Italian Lira (invalid) */ M_NONNAME, 175, 175,
/* 176: overbar (invalid) */ M_NONNAME, 176, 176,
/* 177: Y acute */ M_NMSTART, 177, 178,
/* 178: y acute */ M_NMSTART, 177, 178,
/* 179: degree (invalid) */ M_NONNAME, 179, 179,
/* 180: C cedilla */ M_NMSTART, 180, 181,
/* 181: c cedilla */ M_NMSTART, 180, 181,
/* 182: N tilde */ M_NMSTART, 182, 183,
/* 183: n tilde */ M_NMSTART, 182, 183,
/* 184: inverted exclamation mark */ M_NONNAME, 184, 184,
/* 185: inverted question mark */ M_NONNAME, 185, 185,
/* 186: currency sign (invalid) */ M_NONNAME, 186, 186,
/* 187: pound sterling (invalid) */ M_NONNAME, 187, 187,
/* 188: Yen */ M_NONNAME, 188, 188,
/* 189: Section sign (invalid) */ M_NONNAME, 189, 189,
/* 190: florin (invalid) */ M_NONNAME, 190, 190,
/* 191: Cent sign (invalid) */ M_NONNAME, 191, 191,
/* 192: a circumflex */ M_NMSTART, 162, 192,
/* 193: e circumflex */ M_NMSTART, 164, 193,
/* 194: o circumflex */ M_NMSTART, 223, 194,
/* 195: u circumflex */ M_NMSTART, 174, 195,
/* 196: a acute */ M_NMSTART, 224, 196,
/* 197: e acute */ M_NMSTART, 220, 197,
/* 198: o acute */ M_NMSTART, 231, 198,
/* 199: u acute */ M_NMSTART, 237, 199,
/* 200: a grave */ M_NMSTART, 161, 200,
/* 201: e grave */ M_NMSTART, 163, 201,
/* 202: o grave */ M_NMSTART, 232, 202,
/* 203: u grave */ M_NMSTART, 173, 203,
/* 204: a dieresis */ M_NMSTART, 216, 204,
/* 205: e dieresis */ M_NMSTART, 165, 205,
/* 206: o dieresis */ M_NMSTART, 218, 206,
/* 207: u dieresis */ M_NMSTART, 219, 207,
/* 208: A angstrom */ M_NMSTART, 208, 212,
/* 209: i circumflex */ M_NMSTART, 166, 209,
/* 210: O slash */ M_NMSTART, 210, 214,
/* 211: AE ligature */ M_NMSTART, 211, 215,
/* 212: a angstrom */ M_NMSTART, 208, 212,
/* 213: i acute */ M_NMSTART, 229, 213,
/* 214: o slash */ M_NMSTART, 210, 214,
/* 215: ae ligature */ M_NMSTART, 211, 215,
/* 216: A dieresis */ M_NMSTART, 216, 204,
/* 217: i grave */ M_NMSTART, 230, 217,
/* 218: O dieresis */ M_NMSTART, 218, 206,
/* 219: U dieresis */ M_NMSTART, 219, 207,
/* 220: E acute */ M_NMSTART, 220, 197,
/* 221: i dieresis */ M_NMSTART, 167, 221,
/* 222: SS ligature */ M_NMSTART, 222, 222,
/* 223: O circumflex */ M_NMSTART, 223, 194,
/* 224: A acute */ M_NMSTART, 224, 196,
/* 225: A tilde */ M_NMSTART, 225, 226,
/* 226: a tilde */ M_NMSTART, 225, 226,
/* 227: Eth (invalid) */ M_NMSTART, 227, 228,
/* 228: eth (invalid) */ M_NMSTART, 227, 228,
/* 229: I acute */ M_NMSTART, 229, 213,
/* 230: I grave */ M_NMSTART, 230, 217,
/* 231: O acute */ M_NMSTART, 231, 198,
/* 232: O grave */ M_NMSTART, 232, 202,
/* 233: O tilde */ M_NMSTART, 233, 234,
/* 234: o tilde */ M_NMSTART, 233, 234,
/* 235: S caron */ M_NMSTART, 235, 236,
/* 236: s caron */ M_NMSTART, 235, 236,
/* 237: U acute */ M_NMSTART, 237, 199,
/* 238: Y dieresis */ M_NMSTART, 238, 239,
/* 239: y dieresis */ M_NMSTART, 238, 239,
/* 240: Thorn (invalid) */ M_NMSTART, 240, 241,
/* 241: thorn (invalid) */ M_NMSTART, 240, 241,
/* 242: undefined */ M_NONNAME, 242, 242,
/* 243: mu (invalid) */ M_NONNAME, 243, 243,
/* 244: paragraph sign (invalid) */ M_NONNAME, 244, 244,
/* 245: fraction 3/4 (invalid) */ M_NONNAME, 245, 245,
/* 246: long dash (invalid) */ M_NONNAME, 246, 246,
/* 247: fraction 1/4 (invalid) */ M_NONNAME, 247, 247,
/* 248: fraction 1/2 (invalid) */ M_NONNAME, 248, 248,
/* 249: Female ordinal (invalid) */ M_NONNAME, 249, 249,
/* 250: Male ordinal (invalid) */ M_NONNAME, 250, 250,
/* 251: French double open quote(invalid) */ M_NONNAME, 251, 251,
/* 252: Solid square (invalid) */ M_NONNAME, 252, 252,
/* 253: French double close quote(invalid) */ M_NONNAME, 253, 253,
/* 254: Plus over minus sign(invalid)*/ M_NONNAME, 254, 254,
/* 255: undefined */ M_NONNAME, 255, 255,
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
/* 2: ^B STX */ {M_NONNAME, 2, 2},
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
/* 8: ^H BS */ {M_NONNAME, 8, 8},
/* 9: ^I HT */ {M_NONNAME, 9, 9},
/* 10: ^J LF */ {M_NONNAME, 10, 10},
/* 11: ^K VT */ {M_NONNAME, 11, 11},
/* 12: ^L FF */ {M_NONNAME, 12, 12},
/* 13: ^M CR */ {M_NONNAME, 13, 13},
/* 14: ^N SO */ {M_NONNAME, 14, 14},
/* 15: ^O SI */ {M_NONNAME, 15, 15},
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
/* 29: ^] GS */ {M_NONNAME, 29, 29},
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
/* 31: ^_ US */ {M_NONNAME, 31, 31},
/* 32: SP */ {M_NONNAME, 32, 32},
/* 33: ! */ {M_NONNAME, 33, 33},
/* 34: " */ {M_NONNAME, 34, 34},
/* 35: # */ {M_NONNAME, 35, 35},
/* 36: $ */ {M_NONNAME, 36, 36},
/* 37: % */ {M_NONNAME, 37, 37},
/* 38: & */ {M_NONNAME, 38, 38},
/* 39: ' */ {M_NONNAME, 39, 39},
/* 40: ( */ {M_NONNAME, 40, 40},
/* 41: ) */ {M_NONNAME, 41, 41},
/* 42: * */ {M_NONNAME, 42, 42},
/* 43: + */ {M_NAMECHAR, 43, 43},
/* 44: , */ {M_NONNAME, 44, 44},
/* 45: - */ {M_NAMECHAR, 45, 45},
/* 46: . */ {M_NAMECHAR, 46, 46},
/* 47: / */ {M_NONNAME, 47, 47},
/* 48: 0 */ {M_DIGIT, 48, 48},
/* 49: 1 */ {M_DIGIT, 49, 49},
/* 50: 2 */ {M_DIGIT, 50, 50},
/* 51: 3 */ {M_DIGIT, 51, 51},
/* 52: 4 */ {M_DIGIT, 52, 52},
/* 53: 5 */ {M_DIGIT, 53, 53},
/* 54: 6 */ {M_DIGIT, 54, 54},
/* 55: 7 */ {M_DIGIT, 55, 55},
/* 56: 8 */ {M_DIGIT, 56, 56},
/* 57: 9 */ {M_DIGIT, 57, 57},
/* 58: : */ {M_NONNAME, 58, 58},
/* 59: ; */ {M_NONNAME, 59, 59},
/* 60: < */ {M_NONNAME, 60, 60},
/* 61: = */ {M_NONNAME, 61, 61},
/* 62: > */ {M_NONNAME, 62, 62},
/* 63: ? */ {M_NONNAME, 63, 63},
/* 64: @ */ {M_NONNAME, 64, 64},
/* 65: A */ {M_NMSTART, 65, 97},
/* 66: B */ {M_NMSTART, 66, 98},
/* 67: C */ {M_NMSTART, 67, 99},
/* 68: D */ {M_NMSTART, 68, 100},
/* 69: E */ {M_NMSTART, 69, 101},
/* 70: F */ {M_NMSTART, 70, 102},
/* 71: G */ {M_NMSTART, 71, 103},
/* 72: H */ {M_NMSTART, 72, 104},
/* 73: I */ {M_NMSTART, 73, 105},
/* 74: J */ {M_NMSTART, 74, 106},
/* 75: K */ {M_NMSTART, 75, 107},
/* 76: L */ {M_NMSTART, 76, 108},
/* 77: M */ {M_NMSTART, 77, 109},
/* 78: N */ {M_NMSTART, 78, 110},
/* 79: O */ {M_NMSTART, 79, 111},
/* 80: P */ {M_NMSTART, 80, 112},
/* 81: Q */ {M_NMSTART, 81, 113},
/* 82: R */ {M_NMSTART, 82, 114},
/* 83: S */ {M_NMSTART, 83, 115},
/* 84: T */ {M_NMSTART, 84, 116},
/* 85: U */ {M_NMSTART, 85, 117},
/* 86: V */ {M_NMSTART, 86, 118},
/* 87: W */ {M_NMSTART, 87, 119},
/* 88: X */ {M_NMSTART, 88, 120},
/* 89: Y */ {M_NMSTART, 89, 121},
/* 90: Z */ {M_NMSTART, 90, 122},
/* 91: [ */ {M_NONNAME, 91, 91},
/* 92: \\ */ {M_NONNAME, 92, 92},
/* 93: ] */ {M_NONNAME, 93, 93},
/* 94: ^ */ {M_NONNAME, 94, 94},
/* 95: _ */ {M_NONNAME, 95, 95},
/* 96: ` */ {M_NONNAME, 96, 96},
/* 97: a */ {M_NMSTART, 65, 97},
/* 98: b */ {M_NMSTART, 66, 98},
/* 99: c */ {M_NMSTART, 67, 99},
/* 100: d */ {M_NMSTART, 68, 100},
/* 101: e */ {M_NMSTART, 69, 101},
/* 102: f */ {M_NMSTART, 70, 102},
/* 103: g */ {M_NMSTART, 71, 103},
/* 104: h */ {M_NMSTART, 72, 104},
/* 105: i */ {M_NMSTART, 73, 105},
/* 106: j */ {M_NMSTART, 74, 106},
/* 107: k */ {M_NMSTART, 75, 107},
/* 108: l */ {M_NMSTART, 76, 108},
/* 109: m */ {M_NMSTART, 77, 109},
/* 110: n */ {M_NMSTART, 78, 110},
/* 111: o */ {M_NMSTART, 79, 111},
/* 112: p */ {M_NMSTART, 80, 112},
/* 113: q */ {M_NMSTART, 81, 113},
/* 114: r */ {M_NMSTART, 82, 114},
/* 115: s */ {M_NMSTART, 83, 115},
/* 116: t */ {M_NMSTART, 84, 116},
/* 117: u */ {M_NMSTART, 85, 117},
/* 118: v */ {M_NMSTART, 86, 118},
/* 119: w */ {M_NMSTART, 87, 119},
/* 120: x */ {M_NMSTART, 88, 120},
/* 121: y */ {M_NMSTART, 89, 121},
/* 122: z */ {M_NMSTART, 90, 122},
/* 123: { */ {M_NONNAME, 123, 123},
/* 124: | */ {M_NONNAME, 124, 124},
/* 125: } */ {M_NONNAME, 125, 125},
/* 126: ~ */ {M_NONNAME, 126, 126},
/* 127: DEL */ {M_NONNAME, 127, 127},
/* 128: undefined */ {M_NONNAME, 128, 128},
/* 129: undefined */ {M_NONNAME, 129, 129},
/* 130: undefined */ {M_NONNAME, 130, 130},
/* 131: undefined */ {M_NONNAME, 131, 131},
/* 132: undefined */ {M_NONNAME, 132, 132},
/* 133: undefined */ {M_NONNAME, 133, 133},
/* 134: undefined */ {M_NONNAME, 134, 134},
/* 135: undefined */ {M_NONNAME, 135, 135},
/* 136: undefined */ {M_NONNAME, 136, 136},
/* 137: undefined */ {M_NONNAME, 137, 137},
/* 138: undefined */ {M_NONNAME, 138, 138},
/* 139: undefined */ {M_NONNAME, 139, 139},
/* 140: undefined */ {M_NONNAME, 140, 140},
/* 141: undefined */ {M_NONNAME, 141, 141},
/* 142: undefined */ {M_NONNAME, 142, 142},
/* 143: undefined */ {M_NONNAME, 143, 143},
/* 144: undefined */ {M_NONNAME, 144, 144},
/* 145: undefined */ {M_NONNAME, 145, 145},
/* 146: undefined */ {M_NONNAME, 146, 146},
/* 147: undefined */ {M_NONNAME, 147, 147},
/* 148: undefined */ {M_NONNAME, 148, 148},
/* 149: undefined */ {M_NONNAME, 149, 149},
/* 150: undefined */ {M_NONNAME, 150, 150},
/* 151: undefined */ {M_NONNAME, 151, 151},
/* 152: undefined */ {M_NONNAME, 152, 152},
/* 153: undefined */ {M_NONNAME, 153, 153},
/* 154: undefined */ {M_NONNAME, 154, 154},
/* 155: undefined */ {M_NONNAME, 155, 155},
/* 156: undefined */ {M_NONNAME, 156, 156},
/* 157: undefined */ {M_NONNAME, 157, 157},
/* 158: undefined */ {M_NONNAME, 158, 158},
/* 159: undefined */ {M_NONNAME, 159, 159},
/* 160: undefined */ {M_NONNAME, 160, 160},
/* 161: A grave */ {M_NMSTART, 161, 200},
/* 162: A circumflex */ {M_NMSTART, 162, 192},
/* 163: E grave */ {M_NMSTART, 163, 201},
/* 164: E circumflex */ {M_NMSTART, 164, 193},
/* 165: E dieresis */ {M_NMSTART, 165, 205},
/* 166: I circumflex */ {M_NMSTART, 166, 209},
/* 167: I dieresis */ {M_NMSTART, 167, 221},
/* 168: acute accent */ {M_NONNAME, 168, 168},
/* 169: grave accent */ {M_NONNAME, 169, 169},
/* 170: circumflex */ {M_NONNAME, 170, 170},
/* 171: dieresis */ {M_NONNAME, 171, 171},
/* 172: tilde */ {M_NONNAME, 172, 172},
/* 173: U grave */ {M_NMSTART, 173, 203},
/* 174: U circumflex */ {M_NMSTART, 174, 195},
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
/* 177: Y acute */ {M_NMSTART, 177, 178},
/* 178: y acute */ {M_NMSTART, 177, 178},
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
/* 180: C cedilla */ {M_NMSTART, 180, 181},
/* 181: c cedilla */ {M_NMSTART, 180, 181},
/* 182: N tilde */ {M_NMSTART, 182, 183},
/* 183: n tilde */ {M_NMSTART, 182, 183},
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
/* 188: Yen */ {M_NONNAME, 188, 188},
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
/* 192: a circumflex */ {M_NMSTART, 162, 192},
/* 193: e circumflex */ {M_NMSTART, 164, 193},
/* 194: o circumflex */ {M_NMSTART, 223, 194},
/* 195: u circumflex */ {M_NMSTART, 174, 195},
/* 196: a acute */ {M_NMSTART, 224, 196},
/* 197: e acute */ {M_NMSTART, 220, 197},
/* 198: o acute */ {M_NMSTART, 231, 198},
/* 199: u acute */ {M_NMSTART, 237, 199},
/* 200: a grave */ {M_NMSTART, 161, 200},
/* 201: e grave */ {M_NMSTART, 163, 201},
/* 202: o grave */ {M_NMSTART, 232, 202},
/* 203: u grave */ {M_NMSTART, 173, 203},
/* 204: a dieresis */ {M_NMSTART, 216, 204},
/* 205: e dieresis */ {M_NMSTART, 165, 205},
/* 206: o dieresis */ {M_NMSTART, 218, 206},
/* 207: u dieresis */ {M_NMSTART, 219, 207},
/* 208: A angstrom */ {M_NMSTART, 208, 212},
/* 209: i circumflex */ {M_NMSTART, 166, 209},
/* 210: O slash */ {M_NMSTART, 210, 214},
/* 211: AE ligature */ {M_NMSTART, 211, 215},
/* 212: a angstrom */ {M_NMSTART, 208, 212},
/* 213: i acute */ {M_NMSTART, 229, 213},
/* 214: o slash */ {M_NMSTART, 210, 214},
/* 215: ae ligature */ {M_NMSTART, 211, 215},
/* 216: A dieresis */ {M_NMSTART, 216, 204},
/* 217: i grave */ {M_NMSTART, 230, 217},
/* 218: O dieresis */ {M_NMSTART, 218, 206},
/* 219: U dieresis */ {M_NMSTART, 219, 207},
/* 220: E acute */ {M_NMSTART, 220, 197},
/* 221: i dieresis */ {M_NMSTART, 167, 221},
/* 222: SS ligature */ {M_NMSTART, 222, 222},
/* 223: O circumflex */ {M_NMSTART, 223, 194},
/* 224: A acute */ {M_NMSTART, 224, 196},
/* 225: A tilde */ {M_NMSTART, 225, 226},
/* 226: a tilde */ {M_NMSTART, 225, 226},
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
/* 229: I acute */ {M_NMSTART, 229, 213},
/* 230: I grave */ {M_NMSTART, 230, 217},
/* 231: O acute */ {M_NMSTART, 231, 198},
/* 232: O grave */ {M_NMSTART, 232, 202},
/* 233: O tilde */ {M_NMSTART, 233, 234},
/* 234: o tilde */ {M_NMSTART, 233, 234},
/* 235: S caron */ {M_NMSTART, 235, 236},
/* 236: s caron */ {M_NMSTART, 235, 236},
/* 237: U acute */ {M_NMSTART, 237, 199},
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
/* 239: y dieresis */ {M_NMSTART, 238, 239},
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
/* 242: undefined */ {M_NONNAME, 242, 242},
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
/* 255: undefined */ {M_NONNAME, 255, 255},
} ;

View File

@@ -127,11 +127,13 @@ M_WCHAR wlb = 0, wcm, wnl, wsl, wst;
if (!wlb)
{
mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
mbtowc(&wcm, ",", 1);
mbtowc(&wnl, "\n", 1);
mbtowc(&wsl, "/", 1);
mbtowc(&wst, "*", 1);
int
ret = mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
ret = mbtowc(&wcm, ",", 1);
ret = mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wsl, "/", 1);
ret = mbtowc(&wst, "*", 1);
(void) ret;
}
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
@@ -226,7 +228,8 @@ M_WCHAR wcl;
char unexp[32]; /* arbitraily large */
int length;
mbtowc(&wcl, ":", 1);
int ret = mbtowc(&wcl, ":", 1);
(void) ret;
while (TRUE)
{
@@ -252,9 +255,11 @@ char *mb_name;
if (!wsm)
{
mbtowc(&wsm, ";", 1);
mbtowc(&wcl, ":", 1);
mbtowc(&wcm, ",", 1);
int
ret = mbtowc(&wsm, ";", 1);
ret = mbtowc(&wcl, ":", 1);
ret = mbtowc(&wcm, ",", 1);
(void) ret;
}
while (TRUE)
@@ -333,7 +338,7 @@ c = readchar(TRUE))
*p++ = (M_WCHAR) c;
}
*p = M_EOS;
if (dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie))
if ((dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie)))
{
withdelim = TRUE;
curdelim = dstruct->count - 1;
@@ -451,7 +456,8 @@ int i;
M_WCHAR wnl;
char *mb_dname, *mb_dstring;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
loading = TRUE;
while ((c = getc(ddat)) != EOF)
@@ -526,13 +532,13 @@ while ((c = getc(ddat)) != EOF)
fprintf(delim,
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
mb_dname,
strlen(mb_dstring) + 1);
(int)strlen(mb_dstring) + 1);
for (p = dstring ; *p ; p++)
{
char *pc;
char mb_p[32]; /* arbitrarily large */
int length, i;
int length;
length = wctomb(mb_p, *p);
mb_p[length] = 0;
@@ -629,7 +635,7 @@ void prtctxt(column, value)
if (! first) fprintf(delim, ",\n");
first = FALSE;
fprintf(delim, " %d, %d", column, value);
fprintf(delim, " {%d, %d}", column, value);
nonzero++;
}
@@ -645,7 +651,8 @@ int readchar(cap)
int c;
M_WCHAR wnl;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
c = mb_getwc(cdat); /* use mb_getwc so we read multi-byte chars */
if (cap && c != EOF) c = m_upper(c);
@@ -667,7 +674,8 @@ int c;
{
M_WCHAR wnl;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
ungetc(c, cdat);
if (c == wnl) m_line--;

View File

@@ -72,8 +72,8 @@ void entout(fname)
int nameindex ;
LOGICAL start ;
strcpy(efilename, fname) ;
strcpy(&efilename[strlen(efilename)], ".h") ;
strncpy(efilename, fname, ENTFILENAME) ;
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
m_openchk(&entfile, efilename, "w") ;
fprintf(entfile, "#include \"entdef.h\"\n") ;
@@ -101,7 +101,7 @@ void entout(fname)
if (start) fputs(",\n", entfile) ;
start = TRUE ;
for (p = ent->content ; *p ; p++)
fprintf(entfile, " %d,\n", *p) ;
fprintf(entfile, " %d,\n", (int)*p) ;
fputs(" 0", entfile) ;
}
fprintf(entfile, "}\n#endif\n") ;
@@ -112,7 +112,7 @@ void entout(fname)
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
for (ent = firstent ; ent ; ent = ent->next) {
for (p = ent->name ; *p ; p++)
fprintf(entfile, " %d,\n", *p) ;
fprintf(entfile, " %d,\n", (int)*p) ;
if (ent != lastent) fputs(" 0,\n", entfile) ;
else fputs(" 0\n", entfile) ;
}
@@ -130,7 +130,7 @@ void entout(fname)
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
for (ent = firstent, conindex = 0, nameindex = 0 ;
ent ; ent = ent->next) {
fprintf(entfile, " %s, %s, ",
fprintf(entfile, " {%s, %s, ",
typetype(ent->type),
typewhere(ent->wheredef)) ;
if (ent->content) {
@@ -143,10 +143,10 @@ void entout(fname)
#if defined(BUILDEXTERN)
fprintf(entfile, ", %d", ent->index) ;
if (ent != lastent)
fprintf(entfile, ", &m_entities[%d], 0", ent->index) ;
else fputs(", NULL, 0", entfile) ;
fprintf(entfile, ", &m_entities[%d], 0}", ent->index) ;
else fputs(", NULL, 0}", entfile) ;
#else
fprintf(entfile, ", %d", ent->codeindex) ;
fprintf(entfile, ", %d}", ent->codeindex) ;
#endif
if (ent != lastent) fprintf(entfile, ", \n") ;
else fprintf(entfile, "}\n#endif\n") ;
@@ -159,7 +159,7 @@ void entout(fname)
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
if (m_enttrie->data) {
count = 0 ;
fputs("#if defined(M_ENTDEF)\n = {\n 0, NULL, &m_enttrie[1]", entfile) ;
fputs("#if defined(M_ENTDEF)\n = {\n {0, NULL, &m_enttrie[1]}", entfile) ;
m_dumptrie(entfile, m_enttrie->data, "m_enttrie", &count, entptr) ;
fprintf(entfile, "}\n#endif\n") ;
}
@@ -225,6 +225,7 @@ char *typewhere(n)
case M_DELTDEF: return(xdeltdef) ;
case FALSE: return("0") ;
}
return("0");
}

View File

@@ -130,17 +130,19 @@ void copyfile(pfile1,pfile2)
{
int ret;
char *pcmd;
int slen;
/* malloc space for the system command: two filenames, plus a command,
spaces, and the terminating null */
pcmd = (char *) malloc(strlen(pfile1) + strlen(pfile2) + 8);
slen = strlen(pfile1) + strlen(pfile2) + 8;
pcmd = (char *) malloc(slen);
#if defined(MSDOS)
ret = sprintf(pcmd,"copy %s %s",pfile1,pfile2);
ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
#else
ret = sprintf(pcmd,"cp %s %s",pfile1,pfile2);
ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
#endif
ret = system(pcmd);
ret = sprintf(pcmd,"touch %s",pfile2);
ret = snprintf(pcmd, slen, "touch %s",pfile2);
ret = system(pcmd);
}

View File

@@ -96,11 +96,11 @@ void m_free(block, msg)
free(block) ;
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) block >> 16),
(unsigned int) block, msg) ;
#else
sprintf(buffer, " %9p", block, msg) ;
snprintf(buffer, 32, " %9p", block) ;
#endif
m_trace(buffer) ;
m_trace("- Freed ") ;
@@ -171,14 +171,14 @@ void *m_malloc(size, msg)
}
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
#else
sprintf(buffer, " %9p", p) ;
snprintf(buffer, 32, " %9p", p) ;
#endif
m_trace(buffer) ;
m_trace("- Allocated ") ;
sprintf(buffer, "%6d", size) ;
snprintf(buffer, 32, "%6d", size) ;
m_trace(buffer) ;
m_trace(" bytes for ") ;
m_trace(msg) ;
@@ -212,14 +212,14 @@ void *m_realloc(ptr, size, msg)
}
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
#else
sprintf(buffer, " %9p", p) ;
snprintf(buffer, 32, " %9p", p) ;
#endif
m_trace(buffer) ;
m_trace("- Re-allocated ") ;
sprintf(buffer, "%6d", size) ;
snprintf(buffer, 32, "%6d", size) ;
m_trace(buffer) ;
m_trace(" bytes for ") ;
m_trace(msg) ;

View File

@@ -33,7 +33,7 @@ int getachar(M_NOPAR)
int c;
M_WCHAR wc,wnl;
char mbyte[32]; /* bigger than any possible multibyte char */
int length;
int length, ret;
if (toundo) wc = (M_WCHAR) savechar[--toundo];
else
@@ -58,10 +58,11 @@ else
return(EOF);
}
}
mbtowc(&wc,mbyte,length);
ret = mbtowc(&wc,mbyte,length);
}
mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wnl, "\n", 1);
(void) ret;
if (wc == wnl) m_line++;
if (wc == 65535)
@@ -246,7 +247,8 @@ if (toundo >= SAVECHAR)
savechar[toundo++] = c;
if (toundo > maxundo) maxundo = toundo;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
if (c == wnl) m_line--;
}

View File

@@ -149,7 +149,7 @@ void *m_ntrtrie(p, xtrie, dataval)
M_TRIE *currentnode ;
void *n ;
if (n = m_lookfortrie(p, xtrie)) return(n) ;
if ((n = m_lookfortrie(p, xtrie))) return(n) ;
currentnode = xtrie ;
for ( ; *p ; p++)
m_entercharintrie(&currentnode, m_ctupper(*p)) ;

View File

@@ -88,12 +88,12 @@ void dumpnode(first, file, trieptr, count, proc)
/* generate a child */
if (*first) *first = FALSE ;
else fprintf(file, ",\n") ;
fprintf(file, " ") ;
fprintf(file, " {") ;
if (p->next) fprintf(file, "TRUE, ") ;
else fprintf(file, "FALSE, ") ;
fprintf(file, "%d", p->symbol) ;
if (p->symbol) fprintf(file, ", %d", *count) ;
else (*proc)(file, p->data) ;
fprintf(file, "%d", (int)p->symbol) ;
if (p->symbol) fprintf(file, ", %d}", *count) ;
else { (*proc)(file, p->data) ; fprintf(file, "}") ; }
/* count the children of the child*/
if (p->symbol) countdown(p, count) ;
@@ -110,5 +110,5 @@ void printval(file, value)
FILE *file ;
void *value ;
{
fprintf(file, ", %d", (int) value) ;
fprintf(file, ", %ld", (long) value) ;
}

View File

@@ -62,14 +62,14 @@ void m_dumptrie(file, xtrie, extname, count, proc)
for (p = xtrie ; p ; p = p->next) {
(*count)++ ;
fprintf(file, ",\n %d, ", p-> symbol) ;
fprintf(file, ",\n {%d, ", (int)p-> symbol) ;
if (p->next) fprintf(file, "&%s[%d], ", extname, *count + 1) ;
else fputs("NULL, ", file) ;
if (p->symbol) {
fprintf(file, "&%s[%d]", extname, firstson) ;
fprintf(file, "&%s[%d]}", extname, firstson) ;
countdown(p, &firstson) ;
}
else (*proc) (p->data) ;
else { (*proc) (p->data) ; fprintf(file, "}") ; }
}
for (p = xtrie ; p ; p = p->next)

View File

@@ -72,7 +72,7 @@ M_WCHAR *string1start;
string1start = string1;
while (*string1++ = *string2++);
while ((*string1++ = *string2++));
return string1start;
}
@@ -205,7 +205,7 @@ length = (length + sizeof(M_WCHAR) - 1) / sizeof(M_WCHAR);
mb_string = (char *) m_malloc(length, "multi-byte string");
length = 0;
while (wc = *wc_string++)
while ((wc = *wc_string++))
{
if ((retVal = wctomb(&mb_string[length], wc)) > 0)
length += retVal;
@@ -226,7 +226,6 @@ char *mb_string;
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
char c;
if (!mb_string)
mb_string = "";
@@ -244,8 +243,9 @@ while (mb_string[length])
badOne[0] = mb_string[length];
badOne[1] = 0;
sprintf(buffer, "0x%x", mb_string[length]);
m_err2("invalid multibyte character found: '%c' (%s)", badOne, buffer);
snprintf(buffer, 32, "0x%x", mb_string[length]);
m_err2("invalid multibyte character found: '%c' (%s)",
(M_WCHAR *)badOne, (M_WCHAR *)buffer);
incr = 1;
}
length += incr;
@@ -263,7 +263,6 @@ void *m_ptr;
{
int c;
M_WCHAR wc;
char badch[2];
char mbyte[32]; /* make this bigger than any possible multi-byte char */
int length;
@@ -288,7 +287,8 @@ while (1)
return(EOF);
}
}
mbtowc(&wc,mbyte,length);
int ret = mbtowc(&wc,mbyte,length);
(void) ret;
return((int) wc);
}

View File

@@ -41,7 +41,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entdef.h"
/* Main procedure */
void main(argc, argv)
int main(argc, argv)
int argc ;
char **argv ;
{
@@ -67,8 +67,9 @@ while (TRUE)
if (scantrace)
printf(
"m_prevcon=%d, m_token=%d, curcon=%d, scanval = %c (%d), line=%d\n",
m_prevcon, m_token, curcon, scanval, scanval, m_line) ;
m_prevcon, m_token, curcon, (char)scanval, (int)scanval, m_line) ;
#include "case.c"
if (m_token == ENDFILE) exit(FALSE) ;
}
return 0;
}

View File

@@ -43,7 +43,7 @@ LOGICAL *flag;
char *delim;
{
M_WCHAR wcbuff[129];
size_t length;
ssize_t length;
wcbuff[128] = 0;
length = mbstowcs(wcbuff,delim,128);
@@ -73,7 +73,7 @@ m_openchk(&m_errfile, "error", "w") ;
fprintf(stderr, "MARKUP System - BUILD %s\n", M_VERSION) ;
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
if (! standard)
warning("Warning: optional enhancements of SGML enabled.") ;
warning("Info: optional enhancements of SGML enabled.") ;
mb_delims = mb_dlmptr;
wc_delims = m_dlmptr;
@@ -112,7 +112,7 @@ void ruleinit(M_NOPAR)
/* Rule end processing */
void rulend(M_NOPAR)
{
STATE *fsa ;
STATE *fsa = NULL ;
LOGICAL canbenull ;
LHS *lhsp ;
LHS *discard ;
@@ -153,7 +153,7 @@ void rulend(M_NOPAR)
void skiptoend(M_NOPAR)
{
int i ;
static errlev = 0 ;
static int errlev = 0 ;
if (! errlev++) {
curcon = ERROR ;

View File

@@ -42,7 +42,7 @@ ELTSTRUCT *ntrelt(p)
int length ;
new = (ELTSTRUCT *) m_malloc(sizeof(ELTSTRUCT), "element structure") ;
if (old = (ELTSTRUCT *) m_ntrtrie(p, &eltree, (M_TRIE *) new)) {
if ((old = (ELTSTRUCT *) m_ntrtrie(p, &eltree, (M_TRIE *) new))) {
m_free((M_POINTER) new, "element structure") ;
return(old) ;
}
@@ -55,7 +55,7 @@ ELTSTRUCT *ntrelt(p)
w_strcpy(new->enptr, p) ;
new->model = M_NULLVAL ;
new->content = M_NULLVAL ;
new->inptr = new->exptr = NULL ;
new->inptr = new->exptr = 0 ;
new->parptr = NULL ;
new->parindex = M_NULLVAL ;
new->paramcount = M_NULLVAL ;

View File

@@ -85,11 +85,11 @@ void checkand(andstart, andptr, start, root, errelt)
for (pand = parc->group ; pand ; pand = pand->next)
checkand(andstart, andptr, pand->start, root, errelt) ;
}
else if (c = checkdfsa(andptr->start,
else if ((c = checkdfsa(andptr->start,
parc->label,
parc->group,
parc->id,
errelt))
errelt)))
nondeterm(root, c, *errelt) ;
}
}
@@ -112,7 +112,7 @@ int checkdfsa(from, label, and, id, errelt)
if (parc->group) {
if (and == parc->group) return(ANDCONFLICT) ;
for (group = parc->group ; group ; group = group->next)
if (c = checkdfsa(group->start, label, and, id, errelt))
if ((c = checkdfsa(group->start, label, and, id, errelt)))
return(c) ;
}
else if (! and && label == parc->label && parc->id != id) {
@@ -138,14 +138,14 @@ int checkrepeat(from, and, errelt)
for (; and ; and = and->next)
for (parc = and->start->first ; parc ; parc = parc->next) {
if (parc->group)
if (c = checkrepeat(from, parc->group, errelt)) return(c) ;
if ((c = checkrepeat(from, parc->group, errelt))) return(c) ;
else ;
else
if (c = checkdfsa(from,
if ((c = checkdfsa(from,
parc->label,
M_NULLVAL,
parc->id,
errelt))
errelt)))
return(c) ;
else ;
}
@@ -239,7 +239,7 @@ void makeand(canbenull, root, optional)
TREE *child ;
STATELIST *start, *final ;
LOGICAL groupbenull ;
ANDGROUP *andptr, *saveand, *otherand ;
ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
STATELIST *index ;
ELTSTRUCT *errelt ;
@@ -579,7 +579,7 @@ void repeat(root)
for (a = top->starta ; a ; a = a->next) {
for (final = top->allfinal ; final ; final = final->next) {
if (a->group)
if (c = checkrepeat(final->value, a->group, &errelt)) {
if ((c = checkrepeat(final->value, a->group, &errelt))) {
wtemp = MakeWideCharString(root->occurrence == PLUS ? plus : rep);
warning1("Conflict in use of %s", wtemp);
m_free(wtemp, "wide character string");
@@ -588,11 +588,11 @@ void repeat(root)
else
;
else
if (c = checkdfsa(final->value,
if ((c = checkdfsa(final->value,
a->label,
a->group,
a->id,
&errelt))
&errelt)))
nondeterm (root, c, errelt) ;
else
;
@@ -600,14 +600,14 @@ void repeat(root)
for (final = top->finals ; final ; final = final->next) {
if (samelabelarc(a, final->value)) continue ;
if (a->group)
if (c = checkrepeat(final->value, a->group, &errelt))
if ((c = checkrepeat(final->value, a->group, &errelt)))
nondeterm(root, c, errelt) ;
if (a->label ||
a->group ||
! final->value->frompcdata) {
if (c = addarc(final->value, a->to, a->label,
if ((c = addarc(final->value, a->to, a->label,
a->group, TRUE, a->id,
a->minim, &errelt))
a->minim, &errelt)))
nondeterm(root, c, errelt) ;
if (permitspcd(a)) final->value->datacontent = TRUE ;
}
@@ -697,7 +697,7 @@ void simplebranch(root, value, group, optional)
states of and-groups that terminate at the start state of the new
arc */
for (index = top->allfinal ; index ; index = index->next)
if (c = checkdfsa(index->value, value, group, root->eltid, &errelt))
if ((c = checkdfsa(index->value, value, group, root->eltid, &errelt)))
nondeterm(root, c, errelt) ;
for (index = top->starts ; index ; index = index->next) {
if (! group && ! value && index->value->frompcdata)

View File

@@ -31,6 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#if defined(MSDOS)
#include <process.h>
#endif
@@ -195,7 +196,7 @@ void eltreeout(M_NOPAR)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = eltp->enptr ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -211,14 +212,14 @@ void eltreeout(M_NOPAR)
else fputs(",\n", dtd) ;
if (! eltp->content)
warning1("No content model for element %s", eltp->enptr) ;
fprintf(dtd, " %d, %d, %s, ",
fprintf(dtd, " {%d, %d, %s, ",
enameindex, eltp->model ? eltp->model->count : 0,
typecon(eltp->content)) ;
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
fprintf(dtd, "%d, %d, %d",
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
enameindex += w_strlen(eltp->enptr) + 1 ;
fprintf(dtd, ", %s, %s, %s",
fprintf(dtd, ", %s, %s, %s}",
boolean(eltp->stmin), boolean(eltp->etmin), boolean(eltp->useoradd)) ;
}
fputs(ndif, dtd) ;
@@ -259,7 +260,7 @@ void exout(M_NOPAR)
if (! first) fputs(",\n", dtd) ;
first = FALSE ;
exindex++ ;
fprintf(dtd, " %d, %d", ex->element, ex->next ? exindex + 1 : 0) ;
fprintf(dtd, " {%d, %d}", ex->element, ex->next ? exindex + 1 : 0) ;
}
fputs(ndif, dtd) ;
}
@@ -294,7 +295,7 @@ void fsa(M_NOPAR)
for (pstate = firststate ; pstate ; pstate = pstate->next) {
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %s, %s, %d",
fprintf(dtd, " {%s, %s, %d}",
boolean(pstate->final), boolean(pstate->datacontent),
pstate->first ? ++arcount : 0) ;
for (parc = pstate->first ; parc ; parc = parc->next) {
@@ -319,7 +320,7 @@ void fsa(M_NOPAR)
for (pand = firstand ; pand ; pand = pand->nextptr) {
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %d, %d",
fprintf(dtd, " {%d, %d}",
pand->start->count,
pand->next ? pand->next->count : M_NULLVAL) ;
}
@@ -352,7 +353,7 @@ if (kwlen)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = ptypep->keyword ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -372,7 +373,7 @@ if (deflen)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = paramp->defstring ; *p ; p++)
fprintf(dtd, " %d,\n", *p) ;
fprintf(dtd, " %d,\n", (int)*p) ;
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -392,7 +393,7 @@ if (ptypelen)
{
if (first) first = FALSE ;
else fprintf(dtd, ",\n") ;
fprintf(dtd, " %d, %d", kw, ptypep->next) ;
fprintf(dtd, " {%d, %d}", kw, ptypep->next) ;
kw += w_strlen(ptypep->keyword) + 1 ;
}
fputs(ndif, dtd) ;
@@ -412,21 +413,21 @@ if (parcount)
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd,
" %d, %s, %d, %s, ",
" {%d, %s, %d, %s, ",
pnameindex,
partype(paramp->type),
paramp->kwlist,
deftype(paramp->deftype) );
pnameindex += w_strlen(paramp->paramname) + 1 ;
if (paramp->defval)
fprintf(dtd, "&m_keyword[%d]", paramp->defval - 1) ;
fprintf(dtd, "&m_keyword[%d]}", paramp->defval - 1) ;
else if (paramp->defstring)
{
fprintf(dtd, "&m_defval[%d]", defindex) ;
fprintf(dtd, "&m_defval[%d]}", defindex) ;
defindex += w_strlen(paramp->defstring) + 1 ;
}
else
fputs("NULL", dtd) ;
fputs("NULL}", dtd) ;
}
fputs(ndif, dtd) ;
}
@@ -443,7 +444,7 @@ if (pnamelen)
{
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
for (p = paramp->paramname ; *p ; p++) fprintf(dtd, " %d,\n", *p) ;
for (p = paramp->paramname ; *p ; p++) fprintf(dtd, " %d,\n", (int)*p);
fputs(" 0", dtd) ;
}
fputs(ndif, dtd) ;
@@ -534,10 +535,10 @@ void srefout(M_NOPAR)
count++ ;
if (first) first = FALSE ;
else fputs(",\n", dtd) ;
fprintf(dtd, " %d, %d, ", j + 1, mapbysref[sreflen * i + j]) ;
fprintf(dtd, " {%d, %d, ", j + 1, mapbysref[sreflen * i + j]) ;
for (j++ ; j < sreflen ; j++)
if (mapbysref[sreflen * i + j]) break ;
fprintf(dtd, "%d", j < sreflen ? count + 1 : 0) ;
fprintf(dtd, "%d}", j < sreflen ? count + 1 : 0) ;
}
else j++ ;
fputs(ndif, dtd) ;
@@ -573,7 +574,8 @@ if (eltp->parptr)
{
int length;
char mbyte[32]; /* larger than any multibyte character */
char *pc, c;
char *pc;
unsigned char c;
length = wctomb(mbyte, *p);
if (length < 0)
@@ -645,7 +647,7 @@ void template(M_NOPAR)
}
mb_name = MakeMByteString(ent->name);
fprintf(tempfile, "<!ENTITY %s %s \"\">\n", mb_name, ent->type) ;
fprintf(tempfile, "<!ENTITY %s %d \"\">\n", mb_name, ent->type);
m_free(mb_name, "wide character ent->name");
}
}

View File

@@ -89,7 +89,7 @@ ptypelen++ ;
/* Add a parameter to the current element */
void addpar(M_NOPAR)
{
PARAMETER *paramp, *last ;
PARAMETER *paramp, *last = NULL ;
int length ;
parcount++ ;
@@ -200,6 +200,7 @@ switch (newpar->type)
}
break ;
}
return(FALSE);
}
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
@@ -212,7 +213,7 @@ M_WCHAR *string ;
#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
int i ;
int i, ret ;
switch (newpar->type)
{
@@ -238,7 +239,7 @@ switch (newpar->type)
for (p = string, i = 0 ; *p ; p++, i++)
if (m_whitespace(*p))
{
mbtowc(p, " ", 1);
ret = mbtowc(p, " ", 1);
for (q = p + 1 ; m_whitespace(*q); q++) ;
w_strcpy(p + 1, q) ;
}
@@ -262,10 +263,13 @@ switch (newpar->type)
mbyte[1] = 0;
}
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
mbtowc(string, " ", 1);
{
ret = mbtowc(string, " ", 1);
}
}
return ;
}
(void) ret;
}
/* Called at end of parameter attribute list rule */

View File

@@ -330,7 +330,7 @@ LOGICAL litproc(
#endif
) ;
void main(
int main(
#if defined(M_PROTO)
int argc, char **argv
#endif

View File

@@ -80,9 +80,10 @@ int c;
int n;
M_WCHAR wsp, wnl, wtb;
mbtowc(&wsp, " ", 1);
mbtowc(&wnl, "\n", 1);
mbtowc(&wtb, "\t", 1);
int
ret = mbtowc(&wsp, " ", 1);
ret = mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wtb, "\t", 1);
while (TRUE)
{
@@ -158,13 +159,14 @@ while (TRUE)
{
char mbyte[32]; /* bigger than the biggest multibyte char */
wctomb(mbyte, c);
ret = wctomb(mbyte, c);
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
m_error("Unexpected character");
}
} /* End while */
(void) ret;
} /* End scan */
#include "scanutil.c"

View File

@@ -40,7 +40,7 @@ void adddefent(mapname)
M_WCHAR *mapname;
{
M_WCHAR *p;
int n, length;
int n;
char c;
if (!wc_prefix)
@@ -59,8 +59,9 @@ for (n = egensuf ; n ; n /= 10)
return;
}
c = ('0' + (n % 10));
mbtowc(p, &c, 1);
*p++;
int ret = mbtowc(p, &c, 1);
(void) ret;
p++;
}
*p = M_EOS;
egensuf++;
@@ -80,7 +81,7 @@ M_WCHAR *name;
M_ENTITY *new;
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity");
if (entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new))
if ((entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new)))
{
m_free((M_POINTER) new, "entity");
return(FALSE);
@@ -113,7 +114,7 @@ MAP *new;
LOGICAL retval;
new = (MAP *) m_malloc(sizeof(MAP), "map");
if (old = (MAP *) m_ntrtrie(p, &maptree, (M_TRIE *) new))
if ((old = (MAP *) m_ntrtrie(p, &maptree, (M_TRIE *) new)))
{
m_free(new, "map");
curmap = old->map;
@@ -153,7 +154,7 @@ int noseq = 0;
/* Define the delimiter */
delim = (SREFSTRUCT *)
m_malloc(sizeof(SREFSTRUCT), "short reference delimiter");
if (prevsr = (SREFSTRUCT *) m_ntrtrie(p, &sreftree, (M_TRIE *) delim))
if ((prevsr = (SREFSTRUCT *) m_ntrtrie(p, &sreftree, (M_TRIE *) delim)))
{
m_free(delim, "short reference delimiter");
delim = prevsr;

View File

@@ -626,7 +626,7 @@ name
pcchain:pcchain {
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
(*nextchain)->next = NULL ;
if ((*nextchain)->elt = m_packedlook(m_entree, name))
if (((*nextchain)->elt = m_packedlook(m_entree, name)))
(*nextchain)->elt++ ;
else
m_err1("Undefined element: %s", name) ;
@@ -660,61 +660,61 @@ text
}
}
globdef:globdef {
fprintf(globdef, "%c", textchar) ;
fprintf(globdef, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
globdec:globdec {
fprintf(globdec, "%c", textchar) ;
fprintf(globdec, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
iniss:iniss,
inss:inss {
if (! stringstart) fprintf(string, ",\n") ;
fprintf(string, " %d", textchar) ;
fprintf(string, " %d", (int)textchar) ;
stringstart = FALSE ;
stringcnt++ ;
}
inies:inies,
ines:ines {
if (! stringstart) fprintf(string, ",\n") ;
fprintf(string, " %d", textchar) ;
fprintf(string, " %d", (int)textchar) ;
stringstart = FALSE ;
stringcnt++ ;
}
inisc:inisc,
insc:insc {
fprintf(sfile, "%c", textchar) ;
fprintf(sfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
iniec:iniec,
inec:inec {
fprintf(efile, "%c", textchar) ;
fprintf(efile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
initc:initc,
intc:intc {
fprintf(tfile, "%c", textchar) ;
fprintf(tfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inipc:inipc,
inpc:inpc {
fprintf(pfile, "%c", textchar) ;
fprintf(pfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inistc:inistc,
instc:instc {
fprintf(stfile, "%c", textchar) ;
fprintf(stfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}
inentc:inentc {
fprintf(entfile, "%c", textchar) ;
fprintf(entfile, "%c", (char)textchar) ;
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
m_line, iffile) ; */
}

View File

@@ -49,13 +49,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
#include "entity.h"
/* Main program */
void main(argc, argv)
int main(argc, argv)
int argc ;
char **argv ;
{
int m_token ;
if (argc > 2)
if (argc > 2) {
if (*argv[2] == '-') {
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
if (strchr(argv[2], 'A')) m_malftrace = TRUE ;
@@ -70,6 +70,7 @@ void main(argc, argv)
fprintf(stderr,
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
) ;
}
if (argc < 2) {
fprintf(stderr, "**** Specify interface file ****\n") ;
exit(TRUE) ;
@@ -84,7 +85,7 @@ void main(argc, argv)
if (scantrace)
printf(
"Main: m_prevcon=%d,m_token=%d,curcon=%d,textchar='%c'(%d), line=%d\n",
m_prevcon, m_token, curcon, textchar, textchar, m_line) ;
m_prevcon, m_token, curcon, (char)textchar, (int)textchar, m_line) ;
#include "case.c"
if (m_token == ENDFILE) break ;
if (! curcon) {
@@ -93,4 +94,5 @@ void main(argc, argv)
}
}
done() ;
return 0;
}

View File

@@ -106,7 +106,7 @@ void cvalue(M_NOPAR)
PARVAL *new;
new = (PARVAL *) m_malloc(sizeof(PARVAL), "parameter value");
if (pval = (PARVAL *) m_ntrtrie(name, &parval, (M_TRIE *) new))
if ((pval = (PARVAL *) m_ntrtrie(name, &parval, (M_TRIE *) new)))
m_free(new, "parameter value");
else {
new->line = 0;
@@ -467,7 +467,7 @@ for ( ; p ; p = p->next)
iffile);
fprintf(pvalh, "#define %s \"", mb_cname);
m_free(mb_cname,"multi-byte string");
if (q = ((PARVAL *) p->data)->value)
if ((q = ((PARVAL *) p->data)->value))
for ( ; *q ; q++)
{
char mbq[32]; /* larger than largest possible mbyte char */
@@ -498,7 +498,7 @@ for ( ; p ; p = p->next)
void skiptoend(M_NOPAR)
{
int i;
static errlev = 0;
static int errlev = 0;
CVARSTRUCT *cvarp, *dvarp;
for (cvarp = cvarlist ; cvarp ;) {
@@ -615,7 +615,7 @@ void startelement(M_NOPAR)
m_free(discard, "C variable");
}
cvarlist = NULL;
if (openelt = m_packedlook(m_entree, name)) {
if ((openelt = m_packedlook(m_entree, name))) {
if (processed[openelt - 1])
warning1("Warning: Element %s already processed", name);
processed[openelt - 1] = TRUE;
@@ -670,7 +670,7 @@ if (m_partype(cvarlist->param + m_element[openelt - 1].parptr, p))
{
M_WCHAR *w_buffer;
sprintf(buffer, "%d", pval->line);
snprintf(buffer, 5, "%d", pval->line);
w_buffer = MakeWideCharString(buffer);
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
pval->cname,

View File

@@ -40,7 +40,7 @@ void addent(M_NOPAR)
M_ENTITY *new ;
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity") ;
if (entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new)) {
if ((entity = (M_ENTITY *) m_ntrtrie(name, m_enttrie, (M_TRIE *) new))) {
m_free(new, "entity") ;
if (! entity->wheredef) return ;
if (entity->wheredef == M_DBUILD) {

View File

@@ -226,7 +226,7 @@ LOGICAL litproc(
#endif
) ;
void main(
int main(
#if defined(M_PROTO)
int argc, char **argv
#endif

View File

@@ -53,7 +53,8 @@ M_WCHAR *p, wus;
int c, cttype;
LOGICAL cname;
mbtowc(&wus, "_", 1);
int ret = mbtowc(&wus, "_", 1);
(void) ret;
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
*(p = name) = (M_WCHAR) first;
@@ -92,7 +93,8 @@ int n;
static char unexp[] = "c";
M_WCHAR wus;
mbtowc(&wus, "_", 1);
int ret = mbtowc(&wus, "_", 1);
(void) ret;
while (TRUE)
{

View File

@@ -118,3 +118,21 @@ void *m_malloc(
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
) ;

View File

@@ -29,262 +29,262 @@ by HP Tag are marked "(invalid)". */
M_CHARTYPE m_ctarray[M_CHARSETLEN]
= {
/* Char Name Type, Upper, Lower */
/* 0: ^@ NUL */ M_NONNAME, 0, 0,
/* 1: ^A SOH */ M_NONNAME, 1, 1,
/* 2: ^B STX */ M_NONNAME, 2, 2,
/* 3: ^C ETX */ M_NONNAME, 3, 3,
/* 4: ^D EOT */ M_NONNAME, 4, 4,
/* 5: ^E ENQ */ M_NONNAME, 5, 5,
/* 6: ^F ACK */ M_NONNAME, 6, 6,
/* 7: ^G BEL */ M_NONNAME, 7, 7,
/* 8: ^H BS */ M_NONNAME, 8, 8,
/* 9: ^I HT */ M_NONNAME, 9, 9,
/* 10: ^J LF */ M_NONNAME, 10, 10,
/* 11: ^K VT */ M_NONNAME, 11, 11,
/* 12: ^L FF */ M_NONNAME, 12, 12,
/* 13: ^M CR */ M_NONNAME, 13, 13,
/* 14: ^N SO */ M_NONNAME, 14, 14,
/* 15: ^O SI */ M_NONNAME, 15, 15,
/* 16: ^P DLE */ M_NONNAME, 16, 16,
/* 17: ^Q DC1 */ M_NONNAME, 17, 17,
/* 18: ^R DC2 */ M_NONNAME, 18, 18,
/* 19: ^S DC3 */ M_NONNAME, 19, 19,
/* 20: ^T DC4 */ M_NONNAME, 20, 20,
/* 21: ^U NAK */ M_NONNAME, 21, 21,
/* 22: ^V SYN */ M_NONNAME, 22, 22,
/* 23: ^W ETB */ M_NONNAME, 23, 23,
/* 24: ^X CAN */ M_NONNAME, 24, 24,
/* 25: ^Y EM */ M_NONNAME, 25, 25,
/* 26: ^Z SUB */ M_NONNAME, 26, 26,
/* 27: ^[ ESC */ M_NONNAME, 27, 27,
/* 28: ^\ FS */ M_NONNAME, 28, 28,
/* 29: ^] GS */ M_NONNAME, 29, 29,
/* 30: ^^ RS */ M_NONNAME, 30, 30,
/* 31: ^_ US */ M_NONNAME, 31, 31,
/* 32: SP */ M_NONNAME, 32, 32,
/* 33: ! */ M_NONNAME, 33, 33,
/* 34: " */ M_NONNAME, 34, 34,
/* 35: # */ M_NONNAME, 35, 35,
/* 36: $ */ M_NONNAME, 36, 36,
/* 37: % */ M_NONNAME, 37, 37,
/* 38: & */ M_NONNAME, 38, 38,
/* 39: ' */ M_NONNAME, 39, 39,
/* 40: ( */ M_NONNAME, 40, 40,
/* 41: ) */ M_NONNAME, 41, 41,
/* 42: * */ M_NONNAME, 42, 42,
/* 43: + */ M_NAMECHAR, 43, 43,
/* 44: , */ M_NONNAME, 44, 44,
/* 45: - */ M_NAMECHAR, 45, 45,
/* 46: . */ M_NAMECHAR, 46, 46,
/* 47: / */ M_NONNAME, 47, 47,
/* 48: 0 */ M_DIGIT, 48, 48,
/* 49: 1 */ M_DIGIT, 49, 49,
/* 50: 2 */ M_DIGIT, 50, 50,
/* 51: 3 */ M_DIGIT, 51, 51,
/* 52: 4 */ M_DIGIT, 52, 52,
/* 53: 5 */ M_DIGIT, 53, 53,
/* 54: 6 */ M_DIGIT, 54, 54,
/* 55: 7 */ M_DIGIT, 55, 55,
/* 56: 8 */ M_DIGIT, 56, 56,
/* 57: 9 */ M_DIGIT, 57, 57,
/* 58: : */ M_NONNAME, 58, 58,
/* 59: ; */ M_NONNAME, 59, 59,
/* 60: < */ M_NONNAME, 60, 60,
/* 61: = */ M_NONNAME, 61, 61,
/* 62: > */ M_NONNAME, 62, 62,
/* 63: ? */ M_NONNAME, 63, 63,
/* 64: @ */ M_NONNAME, 64, 64,
/* 65: A */ M_NMSTART, 65, 97,
/* 66: B */ M_NMSTART, 66, 98,
/* 67: C */ M_NMSTART, 67, 99,
/* 68: D */ M_NMSTART, 68, 100,
/* 69: E */ M_NMSTART, 69, 101,
/* 70: F */ M_NMSTART, 70, 102,
/* 71: G */ M_NMSTART, 71, 103,
/* 72: H */ M_NMSTART, 72, 104,
/* 73: I */ M_NMSTART, 73, 105,
/* 74: J */ M_NMSTART, 74, 106,
/* 75: K */ M_NMSTART, 75, 107,
/* 76: L */ M_NMSTART, 76, 108,
/* 77: M */ M_NMSTART, 77, 109,
/* 78: N */ M_NMSTART, 78, 110,
/* 79: O */ M_NMSTART, 79, 111,
/* 80: P */ M_NMSTART, 80, 112,
/* 81: Q */ M_NMSTART, 81, 113,
/* 82: R */ M_NMSTART, 82, 114,
/* 83: S */ M_NMSTART, 83, 115,
/* 84: T */ M_NMSTART, 84, 116,
/* 85: U */ M_NMSTART, 85, 117,
/* 86: V */ M_NMSTART, 86, 118,
/* 87: W */ M_NMSTART, 87, 119,
/* 88: X */ M_NMSTART, 88, 120,
/* 89: Y */ M_NMSTART, 89, 121,
/* 90: Z */ M_NMSTART, 90, 122,
/* 91: [ */ M_NONNAME, 91, 91,
/* 92: \\ */ M_NONNAME, 92, 92,
/* 93: ] */ M_NONNAME, 93, 93,
/* 94: ^ */ M_NONNAME, 94, 94,
/* 95: _ */ M_NONNAME, 95, 95,
/* 96: ` */ M_NONNAME, 96, 96,
/* 97: a */ M_NMSTART, 65, 97,
/* 98: b */ M_NMSTART, 66, 98,
/* 99: c */ M_NMSTART, 67, 99,
/* 100: d */ M_NMSTART, 68, 100,
/* 101: e */ M_NMSTART, 69, 101,
/* 102: f */ M_NMSTART, 70, 102,
/* 103: g */ M_NMSTART, 71, 103,
/* 104: h */ M_NMSTART, 72, 104,
/* 105: i */ M_NMSTART, 73, 105,
/* 106: j */ M_NMSTART, 74, 106,
/* 107: k */ M_NMSTART, 75, 107,
/* 108: l */ M_NMSTART, 76, 108,
/* 109: m */ M_NMSTART, 77, 109,
/* 110: n */ M_NMSTART, 78, 110,
/* 111: o */ M_NMSTART, 79, 111,
/* 112: p */ M_NMSTART, 80, 112,
/* 113: q */ M_NMSTART, 81, 113,
/* 114: r */ M_NMSTART, 82, 114,
/* 115: s */ M_NMSTART, 83, 115,
/* 116: t */ M_NMSTART, 84, 116,
/* 117: u */ M_NMSTART, 85, 117,
/* 118: v */ M_NMSTART, 86, 118,
/* 119: w */ M_NMSTART, 87, 119,
/* 120: x */ M_NMSTART, 88, 120,
/* 121: y */ M_NMSTART, 89, 121,
/* 122: z */ M_NMSTART, 90, 122,
/* 123: { */ M_NONNAME, 123, 123,
/* 124: | */ M_NONNAME, 124, 124,
/* 125: } */ M_NONNAME, 125, 125,
/* 126: ~ */ M_NONNAME, 126, 126,
/* 127: DEL */ M_NONNAME, 127, 127,
/* 128: undefined */ M_NONNAME, 128, 128,
/* 129: undefined */ M_NONNAME, 129, 129,
/* 130: undefined */ M_NONNAME, 130, 130,
/* 131: undefined */ M_NONNAME, 131, 131,
/* 132: undefined */ M_NONNAME, 132, 132,
/* 133: undefined */ M_NONNAME, 133, 133,
/* 134: undefined */ M_NONNAME, 134, 134,
/* 135: undefined */ M_NONNAME, 135, 135,
/* 136: undefined */ M_NONNAME, 136, 136,
/* 137: undefined */ M_NONNAME, 137, 137,
/* 138: undefined */ M_NONNAME, 138, 138,
/* 139: undefined */ M_NONNAME, 139, 139,
/* 140: undefined */ M_NONNAME, 140, 140,
/* 141: undefined */ M_NONNAME, 141, 141,
/* 142: undefined */ M_NONNAME, 142, 142,
/* 143: undefined */ M_NONNAME, 143, 143,
/* 144: undefined */ M_NONNAME, 144, 144,
/* 145: undefined */ M_NONNAME, 145, 145,
/* 146: undefined */ M_NONNAME, 146, 146,
/* 147: undefined */ M_NONNAME, 147, 147,
/* 148: undefined */ M_NONNAME, 148, 148,
/* 149: undefined */ M_NONNAME, 149, 149,
/* 150: undefined */ M_NONNAME, 150, 150,
/* 151: undefined */ M_NONNAME, 151, 151,
/* 152: undefined */ M_NONNAME, 152, 152,
/* 153: undefined */ M_NONNAME, 153, 153,
/* 154: undefined */ M_NONNAME, 154, 154,
/* 155: undefined */ M_NONNAME, 155, 155,
/* 156: undefined */ M_NONNAME, 156, 156,
/* 157: undefined */ M_NONNAME, 157, 157,
/* 158: undefined */ M_NONNAME, 158, 158,
/* 159: undefined */ M_NONNAME, 159, 159,
/* 160: undefined */ M_NONNAME, 160, 160,
/* 161: A grave */ M_NMSTART, 161, 200,
/* 162: A circumflex */ M_NMSTART, 162, 192,
/* 163: E grave */ M_NMSTART, 163, 201,
/* 164: E circumflex */ M_NMSTART, 164, 193,
/* 165: E dieresis */ M_NMSTART, 165, 205,
/* 166: I circumflex */ M_NMSTART, 166, 209,
/* 167: I dieresis */ M_NMSTART, 167, 221,
/* 168: acute accent */ M_NONNAME, 168, 168,
/* 169: grave accent */ M_NONNAME, 169, 169,
/* 170: circumflex */ M_NONNAME, 170, 170,
/* 171: dieresis */ M_NONNAME, 171, 171,
/* 172: tilde */ M_NONNAME, 172, 172,
/* 173: U grave */ M_NMSTART, 173, 203,
/* 174: U circumflex */ M_NMSTART, 174, 195,
/* 175: Italian Lira (invalid) */ M_NONNAME, 175, 175,
/* 176: overbar (invalid) */ M_NONNAME, 176, 176,
/* 177: Y acute */ M_NMSTART, 177, 178,
/* 178: y acute */ M_NMSTART, 177, 178,
/* 179: degree (invalid) */ M_NONNAME, 179, 179,
/* 180: C cedilla */ M_NMSTART, 180, 181,
/* 181: c cedilla */ M_NMSTART, 180, 181,
/* 182: N tilde */ M_NMSTART, 182, 183,
/* 183: n tilde */ M_NMSTART, 182, 183,
/* 184: inverted exclamation mark */ M_NONNAME, 184, 184,
/* 185: inverted question mark */ M_NONNAME, 185, 185,
/* 186: currency sign (invalid) */ M_NONNAME, 186, 186,
/* 187: pound sterling (invalid) */ M_NONNAME, 187, 187,
/* 188: Yen */ M_NONNAME, 188, 188,
/* 189: Section sign (invalid) */ M_NONNAME, 189, 189,
/* 190: florin (invalid) */ M_NONNAME, 190, 190,
/* 191: Cent sign (invalid) */ M_NONNAME, 191, 191,
/* 192: a circumflex */ M_NMSTART, 162, 192,
/* 193: e circumflex */ M_NMSTART, 164, 193,
/* 194: o circumflex */ M_NMSTART, 223, 194,
/* 195: u circumflex */ M_NMSTART, 174, 195,
/* 196: a acute */ M_NMSTART, 224, 196,
/* 197: e acute */ M_NMSTART, 220, 197,
/* 198: o acute */ M_NMSTART, 231, 198,
/* 199: u acute */ M_NMSTART, 237, 199,
/* 200: a grave */ M_NMSTART, 161, 200,
/* 201: e grave */ M_NMSTART, 163, 201,
/* 202: o grave */ M_NMSTART, 232, 202,
/* 203: u grave */ M_NMSTART, 173, 203,
/* 204: a dieresis */ M_NMSTART, 216, 204,
/* 205: e dieresis */ M_NMSTART, 165, 205,
/* 206: o dieresis */ M_NMSTART, 218, 206,
/* 207: u dieresis */ M_NMSTART, 219, 207,
/* 208: A angstrom */ M_NMSTART, 208, 212,
/* 209: i circumflex */ M_NMSTART, 166, 209,
/* 210: O slash */ M_NMSTART, 210, 214,
/* 211: AE ligature */ M_NMSTART, 211, 215,
/* 212: a angstrom */ M_NMSTART, 208, 212,
/* 213: i acute */ M_NMSTART, 229, 213,
/* 214: o slash */ M_NMSTART, 210, 214,
/* 215: ae ligature */ M_NMSTART, 211, 215,
/* 216: A dieresis */ M_NMSTART, 216, 204,
/* 217: i grave */ M_NMSTART, 230, 217,
/* 218: O dieresis */ M_NMSTART, 218, 206,
/* 219: U dieresis */ M_NMSTART, 219, 207,
/* 220: E acute */ M_NMSTART, 220, 197,
/* 221: i dieresis */ M_NMSTART, 167, 221,
/* 222: SS ligature */ M_NMSTART, 222, 222,
/* 223: O circumflex */ M_NMSTART, 223, 194,
/* 224: A acute */ M_NMSTART, 224, 196,
/* 225: A tilde */ M_NMSTART, 225, 226,
/* 226: a tilde */ M_NMSTART, 225, 226,
/* 227: Eth (invalid) */ M_NMSTART, 227, 228,
/* 228: eth (invalid) */ M_NMSTART, 227, 228,
/* 229: I acute */ M_NMSTART, 229, 213,
/* 230: I grave */ M_NMSTART, 230, 217,
/* 231: O acute */ M_NMSTART, 231, 198,
/* 232: O grave */ M_NMSTART, 232, 202,
/* 233: O tilde */ M_NMSTART, 233, 234,
/* 234: o tilde */ M_NMSTART, 233, 234,
/* 235: S caron */ M_NMSTART, 235, 236,
/* 236: s caron */ M_NMSTART, 235, 236,
/* 237: U acute */ M_NMSTART, 237, 199,
/* 238: Y dieresis */ M_NMSTART, 238, 239,
/* 239: y dieresis */ M_NMSTART, 238, 239,
/* 240: Thorn (invalid) */ M_NMSTART, 240, 241,
/* 241: thorn (invalid) */ M_NMSTART, 240, 241,
/* 242: undefined */ M_NONNAME, 242, 242,
/* 243: mu (invalid) */ M_NONNAME, 243, 243,
/* 244: paragraph sign (invalid) */ M_NONNAME, 244, 244,
/* 245: fraction 3/4 (invalid) */ M_NONNAME, 245, 245,
/* 246: long dash (invalid) */ M_NONNAME, 246, 246,
/* 247: fraction 1/4 (invalid) */ M_NONNAME, 247, 247,
/* 248: fraction 1/2 (invalid) */ M_NONNAME, 248, 248,
/* 249: Female ordinal (invalid) */ M_NONNAME, 249, 249,
/* 250: Male ordinal (invalid) */ M_NONNAME, 250, 250,
/* 251: French double open quote(invalid) */ M_NONNAME, 251, 251,
/* 252: Solid square (invalid) */ M_NONNAME, 252, 252,
/* 253: French double close quote(invalid) */ M_NONNAME, 253, 253,
/* 254: Plus over minus sign(invalid)*/ M_NONNAME, 254, 254,
/* 255: undefined */ M_NONNAME, 255, 255,
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
/* 2: ^B STX */ {M_NONNAME, 2, 2},
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
/* 8: ^H BS */ {M_NONNAME, 8, 8},
/* 9: ^I HT */ {M_NONNAME, 9, 9},
/* 10: ^J LF */ {M_NONNAME, 10, 10},
/* 11: ^K VT */ {M_NONNAME, 11, 11},
/* 12: ^L FF */ {M_NONNAME, 12, 12},
/* 13: ^M CR */ {M_NONNAME, 13, 13},
/* 14: ^N SO */ {M_NONNAME, 14, 14},
/* 15: ^O SI */ {M_NONNAME, 15, 15},
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
/* 29: ^] GS */ {M_NONNAME, 29, 29},
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
/* 31: ^_ US */ {M_NONNAME, 31, 31},
/* 32: SP */ {M_NONNAME, 32, 32},
/* 33: ! */ {M_NONNAME, 33, 33},
/* 34: " */ {M_NONNAME, 34, 34},
/* 35: # */ {M_NONNAME, 35, 35},
/* 36: $ */ {M_NONNAME, 36, 36},
/* 37: % */ {M_NONNAME, 37, 37},
/* 38: & */ {M_NONNAME, 38, 38},
/* 39: ' */ {M_NONNAME, 39, 39},
/* 40: ( */ {M_NONNAME, 40, 40},
/* 41: ) */ {M_NONNAME, 41, 41},
/* 42: * */ {M_NONNAME, 42, 42},
/* 43: + */ {M_NAMECHAR, 43, 43},
/* 44: , */ {M_NONNAME, 44, 44},
/* 45: - */ {M_NAMECHAR, 45, 45},
/* 46: . */ {M_NAMECHAR, 46, 46},
/* 47: / */ {M_NONNAME, 47, 47},
/* 48: 0 */ {M_DIGIT, 48, 48},
/* 49: 1 */ {M_DIGIT, 49, 49},
/* 50: 2 */ {M_DIGIT, 50, 50},
/* 51: 3 */ {M_DIGIT, 51, 51},
/* 52: 4 */ {M_DIGIT, 52, 52},
/* 53: 5 */ {M_DIGIT, 53, 53},
/* 54: 6 */ {M_DIGIT, 54, 54},
/* 55: 7 */ {M_DIGIT, 55, 55},
/* 56: 8 */ {M_DIGIT, 56, 56},
/* 57: 9 */ {M_DIGIT, 57, 57},
/* 58: : */ {M_NONNAME, 58, 58},
/* 59: ; */ {M_NONNAME, 59, 59},
/* 60: < */ {M_NONNAME, 60, 60},
/* 61: = */ {M_NONNAME, 61, 61},
/* 62: > */ {M_NONNAME, 62, 62},
/* 63: ? */ {M_NONNAME, 63, 63},
/* 64: @ */ {M_NONNAME, 64, 64},
/* 65: A */ {M_NMSTART, 65, 97},
/* 66: B */ {M_NMSTART, 66, 98},
/* 67: C */ {M_NMSTART, 67, 99},
/* 68: D */ {M_NMSTART, 68, 100},
/* 69: E */ {M_NMSTART, 69, 101},
/* 70: F */ {M_NMSTART, 70, 102},
/* 71: G */ {M_NMSTART, 71, 103},
/* 72: H */ {M_NMSTART, 72, 104},
/* 73: I */ {M_NMSTART, 73, 105},
/* 74: J */ {M_NMSTART, 74, 106},
/* 75: K */ {M_NMSTART, 75, 107},
/* 76: L */ {M_NMSTART, 76, 108},
/* 77: M */ {M_NMSTART, 77, 109},
/* 78: N */ {M_NMSTART, 78, 110},
/* 79: O */ {M_NMSTART, 79, 111},
/* 80: P */ {M_NMSTART, 80, 112},
/* 81: Q */ {M_NMSTART, 81, 113},
/* 82: R */ {M_NMSTART, 82, 114},
/* 83: S */ {M_NMSTART, 83, 115},
/* 84: T */ {M_NMSTART, 84, 116},
/* 85: U */ {M_NMSTART, 85, 117},
/* 86: V */ {M_NMSTART, 86, 118},
/* 87: W */ {M_NMSTART, 87, 119},
/* 88: X */ {M_NMSTART, 88, 120},
/* 89: Y */ {M_NMSTART, 89, 121},
/* 90: Z */ {M_NMSTART, 90, 122},
/* 91: [ */ {M_NONNAME, 91, 91},
/* 92: \\ */ {M_NONNAME, 92, 92},
/* 93: ] */ {M_NONNAME, 93, 93},
/* 94: ^ */ {M_NONNAME, 94, 94},
/* 95: _ */ {M_NONNAME, 95, 95},
/* 96: ` */ {M_NONNAME, 96, 96},
/* 97: a */ {M_NMSTART, 65, 97},
/* 98: b */ {M_NMSTART, 66, 98},
/* 99: c */ {M_NMSTART, 67, 99},
/* 100: d */ {M_NMSTART, 68, 100},
/* 101: e */ {M_NMSTART, 69, 101},
/* 102: f */ {M_NMSTART, 70, 102},
/* 103: g */ {M_NMSTART, 71, 103},
/* 104: h */ {M_NMSTART, 72, 104},
/* 105: i */ {M_NMSTART, 73, 105},
/* 106: j */ {M_NMSTART, 74, 106},
/* 107: k */ {M_NMSTART, 75, 107},
/* 108: l */ {M_NMSTART, 76, 108},
/* 109: m */ {M_NMSTART, 77, 109},
/* 110: n */ {M_NMSTART, 78, 110},
/* 111: o */ {M_NMSTART, 79, 111},
/* 112: p */ {M_NMSTART, 80, 112},
/* 113: q */ {M_NMSTART, 81, 113},
/* 114: r */ {M_NMSTART, 82, 114},
/* 115: s */ {M_NMSTART, 83, 115},
/* 116: t */ {M_NMSTART, 84, 116},
/* 117: u */ {M_NMSTART, 85, 117},
/* 118: v */ {M_NMSTART, 86, 118},
/* 119: w */ {M_NMSTART, 87, 119},
/* 120: x */ {M_NMSTART, 88, 120},
/* 121: y */ {M_NMSTART, 89, 121},
/* 122: z */ {M_NMSTART, 90, 122},
/* 123: { */ {M_NONNAME, 123, 123},
/* 124: | */ {M_NONNAME, 124, 124},
/* 125: } */ {M_NONNAME, 125, 125},
/* 126: ~ */ {M_NONNAME, 126, 126},
/* 127: DEL */ {M_NONNAME, 127, 127},
/* 128: undefined */ {M_NONNAME, 128, 128},
/* 129: undefined */ {M_NONNAME, 129, 129},
/* 130: undefined */ {M_NONNAME, 130, 130},
/* 131: undefined */ {M_NONNAME, 131, 131},
/* 132: undefined */ {M_NONNAME, 132, 132},
/* 133: undefined */ {M_NONNAME, 133, 133},
/* 134: undefined */ {M_NONNAME, 134, 134},
/* 135: undefined */ {M_NONNAME, 135, 135},
/* 136: undefined */ {M_NONNAME, 136, 136},
/* 137: undefined */ {M_NONNAME, 137, 137},
/* 138: undefined */ {M_NONNAME, 138, 138},
/* 139: undefined */ {M_NONNAME, 139, 139},
/* 140: undefined */ {M_NONNAME, 140, 140},
/* 141: undefined */ {M_NONNAME, 141, 141},
/* 142: undefined */ {M_NONNAME, 142, 142},
/* 143: undefined */ {M_NONNAME, 143, 143},
/* 144: undefined */ {M_NONNAME, 144, 144},
/* 145: undefined */ {M_NONNAME, 145, 145},
/* 146: undefined */ {M_NONNAME, 146, 146},
/* 147: undefined */ {M_NONNAME, 147, 147},
/* 148: undefined */ {M_NONNAME, 148, 148},
/* 149: undefined */ {M_NONNAME, 149, 149},
/* 150: undefined */ {M_NONNAME, 150, 150},
/* 151: undefined */ {M_NONNAME, 151, 151},
/* 152: undefined */ {M_NONNAME, 152, 152},
/* 153: undefined */ {M_NONNAME, 153, 153},
/* 154: undefined */ {M_NONNAME, 154, 154},
/* 155: undefined */ {M_NONNAME, 155, 155},
/* 156: undefined */ {M_NONNAME, 156, 156},
/* 157: undefined */ {M_NONNAME, 157, 157},
/* 158: undefined */ {M_NONNAME, 158, 158},
/* 159: undefined */ {M_NONNAME, 159, 159},
/* 160: undefined */ {M_NONNAME, 160, 160},
/* 161: A grave */ {M_NMSTART, 161, 200},
/* 162: A circumflex */ {M_NMSTART, 162, 192},
/* 163: E grave */ {M_NMSTART, 163, 201},
/* 164: E circumflex */ {M_NMSTART, 164, 193},
/* 165: E dieresis */ {M_NMSTART, 165, 205},
/* 166: I circumflex */ {M_NMSTART, 166, 209},
/* 167: I dieresis */ {M_NMSTART, 167, 221},
/* 168: acute accent */ {M_NONNAME, 168, 168},
/* 169: grave accent */ {M_NONNAME, 169, 169},
/* 170: circumflex */ {M_NONNAME, 170, 170},
/* 171: dieresis */ {M_NONNAME, 171, 171},
/* 172: tilde */ {M_NONNAME, 172, 172},
/* 173: U grave */ {M_NMSTART, 173, 203},
/* 174: U circumflex */ {M_NMSTART, 174, 195},
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
/* 177: Y acute */ {M_NMSTART, 177, 178},
/* 178: y acute */ {M_NMSTART, 177, 178},
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
/* 180: C cedilla */ {M_NMSTART, 180, 181},
/* 181: c cedilla */ {M_NMSTART, 180, 181},
/* 182: N tilde */ {M_NMSTART, 182, 183},
/* 183: n tilde */ {M_NMSTART, 182, 183},
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
/* 188: Yen */ {M_NONNAME, 188, 188},
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
/* 192: a circumflex */ {M_NMSTART, 162, 192},
/* 193: e circumflex */ {M_NMSTART, 164, 193},
/* 194: o circumflex */ {M_NMSTART, 223, 194},
/* 195: u circumflex */ {M_NMSTART, 174, 195},
/* 196: a acute */ {M_NMSTART, 224, 196},
/* 197: e acute */ {M_NMSTART, 220, 197},
/* 198: o acute */ {M_NMSTART, 231, 198},
/* 199: u acute */ {M_NMSTART, 237, 199},
/* 200: a grave */ {M_NMSTART, 161, 200},
/* 201: e grave */ {M_NMSTART, 163, 201},
/* 202: o grave */ {M_NMSTART, 232, 202},
/* 203: u grave */ {M_NMSTART, 173, 203},
/* 204: a dieresis */ {M_NMSTART, 216, 204},
/* 205: e dieresis */ {M_NMSTART, 165, 205},
/* 206: o dieresis */ {M_NMSTART, 218, 206},
/* 207: u dieresis */ {M_NMSTART, 219, 207},
/* 208: A angstrom */ {M_NMSTART, 208, 212},
/* 209: i circumflex */ {M_NMSTART, 166, 209},
/* 210: O slash */ {M_NMSTART, 210, 214},
/* 211: AE ligature */ {M_NMSTART, 211, 215},
/* 212: a angstrom */ {M_NMSTART, 208, 212},
/* 213: i acute */ {M_NMSTART, 229, 213},
/* 214: o slash */ {M_NMSTART, 210, 214},
/* 215: ae ligature */ {M_NMSTART, 211, 215},
/* 216: A dieresis */ {M_NMSTART, 216, 204},
/* 217: i grave */ {M_NMSTART, 230, 217},
/* 218: O dieresis */ {M_NMSTART, 218, 206},
/* 219: U dieresis */ {M_NMSTART, 219, 207},
/* 220: E acute */ {M_NMSTART, 220, 197},
/* 221: i dieresis */ {M_NMSTART, 167, 221},
/* 222: SS ligature */ {M_NMSTART, 222, 222},
/* 223: O circumflex */ {M_NMSTART, 223, 194},
/* 224: A acute */ {M_NMSTART, 224, 196},
/* 225: A tilde */ {M_NMSTART, 225, 226},
/* 226: a tilde */ {M_NMSTART, 225, 226},
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
/* 229: I acute */ {M_NMSTART, 229, 213},
/* 230: I grave */ {M_NMSTART, 230, 217},
/* 231: O acute */ {M_NMSTART, 231, 198},
/* 232: O grave */ {M_NMSTART, 232, 202},
/* 233: O tilde */ {M_NMSTART, 233, 234},
/* 234: o tilde */ {M_NMSTART, 233, 234},
/* 235: S caron */ {M_NMSTART, 235, 236},
/* 236: s caron */ {M_NMSTART, 235, 236},
/* 237: U acute */ {M_NMSTART, 237, 199},
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
/* 239: y dieresis */ {M_NMSTART, 238, 239},
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
/* 242: undefined */ {M_NONNAME, 242, 242},
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
/* 255: undefined */ {M_NONNAME, 255, 255},
} ;

View File

@@ -127,7 +127,7 @@ int m_lower(
#endif
) ;
void main(
int main(
#if defined(M_PROTO)
int argc, char **argv
#endif

View File

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

View File

@@ -127,11 +127,13 @@ M_WCHAR wlb = 0, wcm, wnl, wsl, wst;
if (!wlb)
{
mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
mbtowc(&wcm, ",", 1);
mbtowc(&wnl, "\n", 1);
mbtowc(&wsl, "/", 1);
mbtowc(&wst, "*", 1);
int
ret = mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
ret = mbtowc(&wcm, ",", 1);
ret = mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wsl, "/", 1);
ret = mbtowc(&wst, "*", 1);
(void) ret;
}
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
@@ -226,7 +228,8 @@ M_WCHAR wcl;
char unexp[32]; /* arbitraily large */
int length;
mbtowc(&wcl, ":", 1);
int ret = mbtowc(&wcl, ":", 1);
(void) ret;
while (TRUE)
{
@@ -252,9 +255,11 @@ char *mb_name;
if (!wsm)
{
mbtowc(&wsm, ";", 1);
mbtowc(&wcl, ":", 1);
mbtowc(&wcm, ",", 1);
int
ret = mbtowc(&wsm, ";", 1);
ret = mbtowc(&wcl, ":", 1);
ret = mbtowc(&wcm, ",", 1);
(void) ret;
}
while (TRUE)
@@ -333,7 +338,7 @@ c = readchar(TRUE))
*p++ = (M_WCHAR) c;
}
*p = M_EOS;
if (dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie))
if ((dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie)))
{
withdelim = TRUE;
curdelim = dstruct->count - 1;
@@ -451,7 +456,8 @@ int i;
M_WCHAR wnl;
char *mb_dname, *mb_dstring;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
loading = TRUE;
while ((c = getc(ddat)) != EOF)
@@ -526,13 +532,13 @@ while ((c = getc(ddat)) != EOF)
fprintf(delim,
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
mb_dname,
strlen(mb_dstring) + 1);
(int)strlen(mb_dstring) + 1);
for (p = dstring ; *p ; p++)
{
char *pc;
char mb_p[32]; /* arbitrarily large */
int length, i;
int length;
length = wctomb(mb_p, *p);
mb_p[length] = 0;
@@ -629,7 +635,7 @@ void prtctxt(column, value)
if (! first) fprintf(delim, ",\n");
first = FALSE;
fprintf(delim, " %d, %d", column, value);
fprintf(delim, " {%d, %d}", column, value);
nonzero++;
}
@@ -645,7 +651,8 @@ int readchar(cap)
int c;
M_WCHAR wnl;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
c = mb_getwc(cdat); /* use mb_getwc so we read multi-byte chars */
if (cap && c != EOF) c = m_upper(c);
@@ -667,7 +674,8 @@ int c;
{
M_WCHAR wnl;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
ungetc(c, cdat);
if (c == wnl) m_line--;

View File

@@ -72,8 +72,8 @@ void entout(fname)
int nameindex ;
LOGICAL start ;
strcpy(efilename, fname) ;
strcpy(&efilename[strlen(efilename)], ".h") ;
strncpy(efilename, fname, ENTFILENAME) ;
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
m_openchk(&entfile, efilename, "w") ;
fprintf(entfile, "#include \"entdef.h\"\n") ;
@@ -101,7 +101,7 @@ void entout(fname)
if (start) fputs(",\n", entfile) ;
start = TRUE ;
for (p = ent->content ; *p ; p++)
fprintf(entfile, " %d,\n", *p) ;
fprintf(entfile, " %d,\n", (int)*p) ;
fputs(" 0", entfile) ;
}
fprintf(entfile, "}\n#endif\n") ;
@@ -112,7 +112,7 @@ void entout(fname)
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
for (ent = firstent ; ent ; ent = ent->next) {
for (p = ent->name ; *p ; p++)
fprintf(entfile, " %d,\n", *p) ;
fprintf(entfile, " %d,\n", (int)*p) ;
if (ent != lastent) fputs(" 0,\n", entfile) ;
else fputs(" 0\n", entfile) ;
}
@@ -130,7 +130,7 @@ void entout(fname)
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
for (ent = firstent, conindex = 0, nameindex = 0 ;
ent ; ent = ent->next) {
fprintf(entfile, " %s, %s, ",
fprintf(entfile, " {%s, %s, ",
typetype(ent->type),
typewhere(ent->wheredef)) ;
if (ent->content) {
@@ -143,10 +143,10 @@ void entout(fname)
#if defined(BUILDEXTERN)
fprintf(entfile, ", %d", ent->index) ;
if (ent != lastent)
fprintf(entfile, ", &m_entities[%d], 0", ent->index) ;
else fputs(", NULL, 0", entfile) ;
fprintf(entfile, ", &m_entities[%d], 0}", ent->index) ;
else fputs(", NULL, 0}", entfile) ;
#else
fprintf(entfile, ", %d", ent->codeindex) ;
fprintf(entfile, ", %d}", ent->codeindex) ;
#endif
if (ent != lastent) fprintf(entfile, ", \n") ;
else fprintf(entfile, "}\n#endif\n") ;
@@ -159,7 +159,7 @@ void entout(fname)
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
if (m_enttrie->data) {
count = 0 ;
fputs("#if defined(M_ENTDEF)\n = {\n 0, NULL, &m_enttrie[1]", entfile) ;
fputs("#if defined(M_ENTDEF)\n = {\n {0, NULL, &m_enttrie[1]}", entfile) ;
m_dumptrie(entfile, m_enttrie->data, "m_enttrie", &count, entptr) ;
fprintf(entfile, "}\n#endif\n") ;
}
@@ -225,6 +225,7 @@ char *typewhere(n)
case M_DELTDEF: return(xdeltdef) ;
case FALSE: return("0") ;
}
return("0");
}

View File

@@ -306,8 +306,8 @@ void esuffix(M_NOPAR)
void msgline(text)
char *text ;
{
fprintf(stderr, text) ;
fprintf(m_errfile, text) ;
fprintf(stderr, "%s", text) ;
fprintf(m_errfile, "%s", text) ;
}
/* Print something to both stderr and m_errfile */

View File

@@ -130,17 +130,19 @@ void copyfile(pfile1,pfile2)
{
int ret;
char *pcmd;
int slen;
/* malloc space for the system command: two filenames, plus a command,
spaces, and the terminating null */
pcmd = (char *) malloc(strlen(pfile1) + strlen(pfile2) + 8);
slen = strlen(pfile1) + strlen(pfile2) + 8;
pcmd = (char *) malloc(slen);
#if defined(MSDOS)
ret = sprintf(pcmd,"copy %s %s",pfile1,pfile2);
ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
#else
ret = sprintf(pcmd,"cp %s %s",pfile1,pfile2);
ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
#endif
ret = system(pcmd);
ret = sprintf(pcmd,"touch %s",pfile2);
ret = snprintf(pcmd, slen, "touch %s",pfile2);
ret = system(pcmd);
}

View File

@@ -96,11 +96,11 @@ void m_free(block, msg)
free(block) ;
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) block >> 16),
(unsigned int) block, msg) ;
#else
sprintf(buffer, " %9p", block, msg) ;
snprintf(buffer, 32, " %9p", block) ;
#endif
m_trace(buffer) ;
m_trace("- Freed ") ;
@@ -171,14 +171,14 @@ void *m_malloc(size, msg)
}
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
#else
sprintf(buffer, " %9p", p) ;
snprintf(buffer, 32, " %9p", p) ;
#endif
m_trace(buffer) ;
m_trace("- Allocated ") ;
sprintf(buffer, "%6d", size) ;
snprintf(buffer, 32, "%6d", size) ;
m_trace(buffer) ;
m_trace(" bytes for ") ;
m_trace(msg) ;
@@ -212,14 +212,14 @@ void *m_realloc(ptr, size, msg)
}
if (m_malftrace) {
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
sprintf(buffer, "%5x:%5x",
snprintf(buffer, 32, "%5x:%5x",
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
#else
sprintf(buffer, " %9p", p) ;
snprintf(buffer, 32, " %9p", p) ;
#endif
m_trace(buffer) ;
m_trace("- Re-allocated ") ;
sprintf(buffer, "%6d", size) ;
snprintf(buffer, 32, "%6d", size) ;
m_trace(buffer) ;
m_trace(" bytes for ") ;
m_trace(msg) ;

View File

@@ -33,7 +33,7 @@ int getachar(M_NOPAR)
int c;
M_WCHAR wc,wnl;
char mbyte[32]; /* bigger than any possible multibyte char */
int length;
int length, ret;
if (toundo) wc = (M_WCHAR) savechar[--toundo];
else
@@ -58,10 +58,11 @@ else
return(EOF);
}
}
mbtowc(&wc,mbyte,length);
ret = mbtowc(&wc,mbyte,length);
}
mbtowc(&wnl, "\n", 1);
ret = mbtowc(&wnl, "\n", 1);
(void) ret;
if (wc == wnl) m_line++;
if (wc == 65535)
@@ -246,7 +247,8 @@ if (toundo >= SAVECHAR)
savechar[toundo++] = c;
if (toundo > maxundo) maxundo = toundo;
mbtowc(&wnl, "\n", 1);
int ret = mbtowc(&wnl, "\n", 1);
(void) ret;
if (c == wnl) m_line--;
}

View File

@@ -149,7 +149,7 @@ void *m_ntrtrie(p, xtrie, dataval)
M_TRIE *currentnode ;
void *n ;
if (n = m_lookfortrie(p, xtrie)) return(n) ;
if ((n = m_lookfortrie(p, xtrie))) return(n) ;
currentnode = xtrie ;
for ( ; *p ; p++)
m_entercharintrie(&currentnode, m_ctupper(*p)) ;

View File

@@ -88,12 +88,12 @@ void dumpnode(first, file, trieptr, count, proc)
/* generate a child */
if (*first) *first = FALSE ;
else fprintf(file, ",\n") ;
fprintf(file, " ") ;
fprintf(file, " {") ;
if (p->next) fprintf(file, "TRUE, ") ;
else fprintf(file, "FALSE, ") ;
fprintf(file, "%d", p->symbol) ;
if (p->symbol) fprintf(file, ", %d", *count) ;
else (*proc)(file, p->data) ;
fprintf(file, "%d", (int)p->symbol) ;
if (p->symbol) fprintf(file, ", %d}", *count) ;
else { (*proc)(file, p->data) ; fprintf(file, "}") ; }
/* count the children of the child*/
if (p->symbol) countdown(p, count) ;
@@ -110,5 +110,5 @@ void printval(file, value)
FILE *file ;
void *value ;
{
fprintf(file, ", %d", (int) value) ;
fprintf(file, ", %ld", (long) value) ;
}

View File

@@ -62,14 +62,14 @@ void m_dumptrie(file, xtrie, extname, count, proc)
for (p = xtrie ; p ; p = p->next) {
(*count)++ ;
fprintf(file, ",\n %d, ", p-> symbol) ;
fprintf(file, ",\n {%d, ", (int)p-> symbol) ;
if (p->next) fprintf(file, "&%s[%d], ", extname, *count + 1) ;
else fputs("NULL, ", file) ;
if (p->symbol) {
fprintf(file, "&%s[%d]", extname, firstson) ;
fprintf(file, "&%s[%d]}", extname, firstson) ;
countdown(p, &firstson) ;
}
else (*proc) (p->data) ;
else { (*proc) (p->data) ; fprintf(file, "}") ; }
}
for (p = xtrie ; p ; p = p->next)

View File

@@ -103,7 +103,7 @@ M_WCHAR *string1start;
string1start = string1;
while (*string1++ = *string2++);
while ((*string1++ = *string2++));
return string1start;
}
@@ -236,7 +236,7 @@ length = (length + sizeof(M_WCHAR) - 1) / sizeof(M_WCHAR);
mb_string = (char *) m_malloc(length, "multi-byte string");
length = 0;
while (wc = *wc_string++)
while ((wc = *wc_string++))
{
if ((retVal = wctomb(&mb_string[length], wc)) > 0)
length += retVal;
@@ -257,7 +257,6 @@ char *mb_string;
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
char c;
if (!mb_string)
mb_string = "";
@@ -275,8 +274,9 @@ while (mb_string[length])
badOne[0] = mb_string[length];
badOne[1] = 0;
sprintf(buffer, "0x%x", mb_string[length]);
m_err2("invalid multibyte character found: '%c' (%s)", badOne, buffer);
snprintf(buffer, 32, "0x%x", mb_string[length]);
m_err2("invalid multibyte character found: '%c' (%s)",
(M_WCHAR *)badOne, (M_WCHAR *)buffer);
incr = 1;
}
length += incr;
@@ -294,7 +294,6 @@ void *m_ptr;
{
int c;
M_WCHAR wc;
char badch[2];
char mbyte[32]; /* make this bigger than any possible multi-byte char */
int length;
@@ -319,7 +318,8 @@ while (1)
return(EOF);
}
}
mbtowc(&wc,mbyte,length);
int ret = mbtowc(&wc,mbyte,length);
(void) ret;
return((int) wc);
}