programs/dtappbuilder/src/ab/Makefile.hpux
programs/dtappbuilder/src/ab/Makefile.osf1
programs/dtappbuilder/src/ab/Makefile.sunos
+programs/dtappbuilder/src/ab/Makefile.unixware
programs/dtappbuilder/src/ab/Makefile.uxp
+programs/dtappbuilder/src/ab/Makefile.linux
+programs/dtappbuilder/src/ab/Makefile.freebsd
+programs/dtappbuilder/src/ab/Makefile.netbsd
+programs/dtappbuilder/src/ab/Makefile.openbsd
programs/dtappbuilder/src/ab/about_box.res
programs/dtappbuilder/src/ab/about_box_ui.c
programs/dtappbuilder/src/ab/about_box_ui.h
programs/ttsnoop/Makefile.hpux
programs/ttsnoop/Makefile.osf1
programs/ttsnoop/Makefile.sunos
+programs/ttsnoop/Makefile.unixware
programs/ttsnoop/Makefile.uxp
+programs/ttsnoop/Makefile.linux
+programs/ttsnoop/Makefile.freebsd
+programs/ttsnoop/Makefile.netbsd
+programs/ttsnoop/Makefile.openbsd
programs/ttsnoop/Ttsnoop
programs/ttsnoop/apiTracer_stubs.C
programs/ttsnoop/apiTracer_stubs.c.BAK
# This is just a sequence of bootstrapping steps we have to do.
# The steps are listed as separate targets so clearmake can wink in
# the Makefile.proto files.
-Makefile.boot: imake.proto $(DEPENDSRC)/Makefile.proto depend.bootstrap $(IMAKESRC)/Makefile.proto imake.bootstrap
+Makefile.boot: imake.proto $(DEPENDSRC)/Makefile.proto depend.bootstrap $(IMAKESRC)/Makefile.proto imake.bootstrap $(DEPENDSRC)/proto.clean
imake.proto:
cd $(IMAKESRC) && $(MAKE) $(FLAGS)
else exit 0; fi
$(MAKE) $(MFLAGS) xmakefile
+$(DEPENDSRC)/proto.clean:
+ cd $(DEPENDSRC) && $(RM) -r Makefile.proto
+
Makefile::
$(MAKE) $(MFLAGS) xmakefile
* MakeLintSubdirs (dirs,target,subtarget)
* LintSubdirs (dirs)
* MakeLintLibSubdirs (dirs)
+ * MakeMakeOneSubdirs ()
* MakeMakeSubdirs (dirs,target)
* MakefileSubdirs (dirs)
* CppScriptTarget (dst,src,defs,deplist)
#endif /* MakeLintLibSubdirs */
+/*
+ * MakeMakeOneSubdirs - generate rules to recreate $(ONESUBDIR)/Makefile
+ * as part of the specified step in the build. This separate, explicit target
+ * exists so that clearmake will know what its goal is and do wink-in.
+ */
+#ifndef MakeMakeOneSubdirs
+#define MakeMakeOneSubdirs() @@\
+$(ONESUBDIR)/Makefile: @@\
+ @MakeFlagsToShellFlags(n,executeit="no"); \ @@\
+ cd $(ONESUBDIR); \ @@\
+ if [ "$$executeit" != "no" ]; then \ @@\
+ ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\
+ fi;
+#endif /* MakeMakeOneSubdirs */
+
+
/*
* MakeMakeSubdirs - generate rules to recursively recreate Makefiles as part
* of the specified step in the build. If $(TOP) is set to an absolute path,
* do not prepend the ../ prefix. This makes running things outside of the
* source tree much easier.
- * $(ONESUBDIR)/Makefile exists as a separate, explicit target so that
- * clearmake will know what its goal is and do wink-in.
*/
#ifndef MakeMakeSubdirs
#define MakeMakeSubdirs(dirs,target) @@\
-$(ONESUBDIR)/Makefile: @@\
- @MakeFlagsToShellFlags(n,executeit="no"); \ @@\
- cd $(ONESUBDIR); \ @@\
- if [ "$$executeit" != "no" ]; then \ @@\
- ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\
- fi; @@\
- @@\
target:: @@\
-@MakeFlagsToShellFlags(ik,set +e); \ @@\
MakeFlagsToShellFlags(n,executeit="no"); \ @@\
*/
#ifndef MakefileSubdirs
#define MakefileSubdirs(dirs) @@\
+MakeMakeOneSubdirs() @@\
MakeMakeSubdirs(dirs,Makefiles)
#endif /* MakefileSubdirs */
#define LibraryCplusplusOptions -Wall -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch
#endif
+#define DependFileName .depend
+
#define ArchitectureDefines -DOPENBSD_ARCHITECTURE
#define BuildLibPathVar LD_LIBRARY_PATH
# if UseInstalledCDE
# define DtCodeGen dtcodegen
# else
-# define DtCodeGen $(CLIENTENVSETUP) $(CDESRC)/dtappbuilder/src/abmf/dtcodegen
+# define DtCodeGen $(CLIENTENVSETUP) $(DTCODEGENCAT) $(CDESRC)/dtappbuilder/src/abmf/dtcodegen
# endif
#endif
int main(void)
{
- write(1, imake_ccflags, sizeof(imake_ccflags) - 1);
+ ssize_t ret = write(1, imake_ccflags, sizeof(imake_ccflags) - 1);
return EXIT_SUCCESS;
}
tmpMakefile = Makefile;
else {
tmpMakefile = Strdup(tmpMakefile);
- mkstemp(tmpMakefile);
+ int ret = mkstemp(tmpMakefile);
+ (void) ret;
}
AddMakeArg("-f");
AddMakeArg( tmpMakefile );
- sprintf(makeMacro, "MAKE=%s", program);
+ snprintf(makeMacro, BUFSIZ, "MAKE=%s", program);
AddMakeArg( makeMacro );
- sprintf(makefileMacro, "MAKEFILE=%s", Imakefile);
+ snprintf(makefileMacro, BUFSIZ, "MAKEFILE=%s", Imakefile);
AddMakeArg( makefileMacro );
if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL)
{
errno = 0;
if (access(fname, R_OK) == 0) {
- LogMsg(OverrideWarning, fname);
+ if(errno)
+ LogMsg(OverrideWarning, fname);
return (fprintf(inFile, LocalDefineFmt, defsym, fname) < 0 ||
fprintf(inFile, IncludeFmt, defsym) < 0);
}
case 's':
if (arg > 0)
*ptr++ = ' ';
- strcpy(ptr, name->sysname);
+ strncpy(ptr, name->sysname, SYS_NMLN);
ptr += strlen(ptr);
break;
case 'n':
if (arg > 0)
*ptr++ = ' ';
- strcpy(ptr, name->nodename);
+ strncpy(ptr, name->nodename, SYS_NMLN);
ptr += strlen(ptr);
break;
case 'r':
if (arg > 0)
*ptr++ = ' ';
- strcpy(ptr, name->release);
+ strncpy(ptr, name->release, SYS_NMLN);
ptr += strlen(ptr);
break;
case 'v':
if (arg > 0)
*ptr++ = ' ';
- strcpy(ptr, name->version);
+ strncpy(ptr, name->version, SYS_NMLN);
ptr += strlen(ptr);
break;
case 'm':
if (arg > 0)
*ptr++ = ' ';
- strcpy(ptr, name->machine);
+ strncpy(ptr, name->machine, SYS_NMLN);
ptr += strlen(ptr);
break;
/* Parse the buffer. The sscanf() return value is rarely correct. */
*result = '\0';
- (void) sscanf(buf, fmt + arg + 1, result);
+ int ret = sscanf(buf, fmt + arg + 1, result);
+ (void) ret;
}
#endif
*/
if (readlink (libcso, buf, PATH_MAX) >= 0) {
for (ptr = buf; *ptr && !isdigit (*ptr); ptr++);
- (void) sscanf (ptr, "%d.%d.%d", &libcmajor, &libcminor, &libcteeny);
+ int ret = sscanf (ptr, "%d.%d.%d", &libcmajor, &libcminor, &libcteeny);
+ (void) ret;
fprintf(inFile, "#define DefaultLinuxCLibMajorVersion %d\n", libcmajor);
fprintf(inFile, "#define DefaultLinuxCLibMinorVersion %d\n", libcminor);
fprintf(inFile, "#define DefaultLinuxCLibTeenyVersion %d\n", libcteeny);
memset(&aout, '\0', PATH_MAX);
if (!lstat(getenv("TMPDIR"), &sb) && S_ISDIR(sb.st_mode))
- strcpy(aout, getenv("TMPDIR"));
+ strncpy(aout, getenv("TMPDIR"), PATH_MAX);
#ifdef P_tmpdir /* defined by XPG and XOPEN, but don't assume we have it */
else if (!lstat(P_tmpdir, &sb) && S_ISDIR(sb.st_mode))
- strcpy(aout, P_tmpdir);
+ strncpy(aout, P_tmpdir, PATH_MAX);
#endif
else if (!lstat("/tmp", &sb) && S_ISDIR(sb.st_mode))
- strcpy(aout, "/tmp");
+ strncpy(aout, "/tmp", PATH_MAX);
else
abort();
- strcpy(aout+strlen(aout), "/imaketmp.XXXXXX");
+ strncpy(aout+strlen(aout), "/imaketmp.XXXXXX", 16);
if ((fd = mkstemp(aout)) == -1)
abort ();
abort ();
while (fgets (command, len, fp))
- fprintf (inFile, command);
+ fprintf (inFile, "%s", command);
len = pclose (fp);
remove (aout);
c = fgetc (ldprog);
} while (c != EOF && !isdigit (c));
ungetc (c, ldprog);
- (void) fscanf (ldprog, "%d.%d", &ldmajor, &ldminor);
+ int ret = fscanf (ldprog, "%d.%d", &ldmajor, &ldminor);
+ (void) ret;
fprintf(inFile, "#define DefaultLinuxBinUtilsMajorVersion %d\n",
ldmajor * 10 + ldminor);
pclose (ldprog);
char* vptr;
struct stat sb;
FILE* ccproc;
+ int ret;
if (lstat (sunpro_cc, &sb) == 0) {
- strcpy (cmd, sunpro_cc);
- strcat (cmd, " -V 2>&1");
+ strncpy (cmd, sunpro_cc, PATH_MAX);
+ strncat (cmd, " -V 2>&1", 8);
if ((ccproc = popen (cmd, "r")) != NULL) {
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
vptr = strrchr (buf, 'C');
for (; !isdigit(*vptr); vptr++);
- (void) sscanf (vptr, "%d.%d", &cmajor, &cminor);
+ ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
fprintf (inFile,
"#define DefaultSunProCCompilerMajorVersion %d\n",
cmajor);
}
}
if (lstat (sunpro_CC, &sb) == 0) {
- strcpy (cmd, sunpro_CC);
- strcat (cmd, " -V 2>&1");
+ strncpy (cmd, sunpro_CC, PATH_MAX);
+ strncat (cmd, " -V 2>&1", 8);
if ((ccproc = popen (cmd, "r")) != NULL) {
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
vptr = strrchr (buf, 'C');
for (; !isdigit(*vptr); vptr++);
- (void) sscanf (vptr, "%d.%d", &cmajor, &cminor);
+ ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
fprintf (inFile,
"#define DefaultSunProCplusplusCompilerMajorVersion %d\n",
cmajor);
pclose (ccproc);
}
}
+ (void) ret;
}
#endif
buf[0] = '\0';
for (i = 0; i < sizeof gcc_path / sizeof gcc_path[0]; i++) {
if (lstat (gcc_path[i], &sb) == 0) {
- strcpy (cmd, gcc_path[i]);
- strcat (cmd, " --print-libgcc-file-name");
+ strncpy (cmd, gcc_path[i], PATH_MAX - 25);
+ strncpy (cmd + strlen(cmd), " --print-libgcc-file-name", 25);
if ((gccproc = popen (cmd, "r")) != NULL) {
if (fgets (buf, PATH_MAX, gccproc) != NULL) {
ptr = strstr (buf, "libgcc.a");
- if (ptr) strcpy (ptr, "include");
+ if (ptr) strncpy (ptr, "include", 7);
}
(void) pclose (gccproc);
break;
fprintf(inFile, IncludeFmt, ImakeTmplSym) < 0 ||
optional_include(inFile, "IMAKE_ADMIN_MACROS", "adminmacros") ||
optional_include(inFile, "IMAKE_LOCAL_MACROS", "localmacros") ||
- fflush(inFile) ||
+ fflush(inFile) ||
fclose(inFile))
LogFatal("Cannot write to %s.", masterc);
/*
strcmp(ptoken, "undef")) {
if (outFile == NULL) {
tmpImakefile = Strdup(tmpImakefile);
- mkstemp(tmpImakefile);
+ int ret = mkstemp(tmpImakefile);
+ (void) ret;
outFile = fopen(tmpImakefile, "w");
if (outFile == NULL)
LogFatal("Cannot open %s for write.",
if (*pend == 'l' && pend[1] == 'i' && pend[2] == 'n' &&
pend[3] == 'e' && pend[4] == ' ')
pend += 5;
- if (isdigit(*pend)) {
+ if (isdigit((int)*pend)) {
do {
pend++;
- } while (isdigit(*pend));
+ } while (isdigit((int)*pend));
if (*pend == '\n' || *pend == '\0')
return(TRUE);
if (*pend++ == ' ' && *pend == '"')
(pend[5] == ' ' || pend[5] == '\t' || pend[5] == '\0'))
{
*pend = '#';
- strcpy(pend+1, pend+5);
+ strncpy(pend+1, pend+5, 1);
}
#ifdef MAGIC_MAKE_VARS
if (*pend == 'X' && pend[1] == 'V' && pend[2] == 'A' &&
pend[7] >= '0' && pend[7] <= '9')
{
i = pend[7] - '0';
- sprintf(varbuf, "%0.4d", xvariable);
+ snprintf(varbuf, 5, "%0.4d", xvariable);
strncpy(pend+4, varbuf, 4);
xvariables[i] = xvariable;
xvariable = (xvariable + 1) % 10000;
pend[7] <= '9')
{
i = pend[7] - '0';
- sprintf(varbuf, "%0.4d", xvariables[i]);
+ snprintf(varbuf, 5, "%0.4d", xvariables[i]);
strncpy(pend+4, varbuf, 4);
}
}
if (! tmpfd)
LogFatal("cannot reopen %s.", tmpfname);
#else /* !SYSV */
- ftruncate(fileno(tmpfd), (off_t) 0);
+ int ret = ftruncate(fileno(tmpfd), (off_t) 0);
+ (void) ret;
#endif /* !SYSV */
initialized = TRUE;
fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");
for (p1 = pline; p1 < end; p1++) {
if (*p1 == '@' && *(p1+1) == '@'
/* ignore ClearCase version-extended pathnames */
- && !(p1 != pline && !isspace(*(p1-1)) && *(p1+2) == '/'))
+ && !(p1 != pline && !isspace((int)*(p1-1))
+ && *(p1+2) == '/'))
{ /* soft EOL */
*p1++ = '\0';
p1++; /* skip over second @ */
{
char *new = Emalloc(strlen(cp) + 1);
- strcpy(new, cp);
+ strncpy(new, cp, strlen(cp) + 1);
return new;
}
int prefixlen;
int i;
- sprintf (prefix, "\"%s\":%d", filename, lineno);
+ snprintf (prefix, 300, "\"%s\":%d", filename, lineno);
prefixlen = strlen(prefix);
fprintf (stderr, "%s: %s", prefix, pd->line);
i = cp - pd->line;
return 0;
do {
var = (*s)->s_value;
- if (!isvarfirstletter(*var) || !strcmp((*s)->s_name, var))
+ if (!isvarfirstletter((int)*var) || !strcmp((*s)->s_name, var))
break;
s = lookup_variable (ip, var, strlen(var));
} while (s);
}
-cppsetup(line, filep, inc)
+int cppsetup(line, filep, inc)
register char *line;
register struct filepointer *filep;
register struct inclist *inc;
char *realloc();
#endif
+int match();
char *copy();
char *base_name();
char *our_getline();
struct symtab **isdefined();
struct symtab **fdefined();
struct filepointer *getfile();
+void included_by();
struct inclist *newinclude();
+void inc_clean();
struct inclist *inc_path();
+void freefile();
+void define2();
+void define();
+int find_includes();
+void recursive_pr_include();
+void add_include();
+int cppsetup();
#if NeedVarargsPrototypes
extern void fatalerr(char *, ...);
#include "ifparser.h"
#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
#include <limits.h>
/****************************************************************************
#define DO(val) if (!(val)) return NULL
#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff))
-#define SKIPSPACE(ccc) while (isspace(*ccc)) ccc++
-#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
+#define SKIPSPACE(ccc) while (isspace((int)*ccc)) ccc++
+#define isvarfirstletter(ccc) (isalpha((int)ccc) || (ccc) == '_')
static const char *
*varp = cp;
/* EMPTY */
- for (cp++; isalnum(*cp) || *cp == '_'; cp++) ;
+ for (cp++; isalnum((int)*cp) || *cp == '_'; cp++) ;
return cp;
}
long base = 10;
SKIPSPACE (cp);
- if (!isdigit(*cp))
+ if (!isdigit((int)*cp))
return CALLFUNC(g, handle_error) (g, cp, "number");
*valp = 0;
return cp + 1;
case 'd':
- if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
+ if (strncmp (cp, "defined", 7) == 0 && !isalnum((int)cp[7])) {
int paren = 0;
int len;
/* fall out */
}
- if (isdigit(*cp)) {
+ if (isdigit((int)*cp)) {
DO (cp = parse_number (g, cp, valp));
} else if (!isvarfirstletter(*cp))
return CALLFUNC(g, handle_error) (g, cp, "variable or number");
struct stat st;
char buf[ BUFSIZ ], **pp;
- sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component);
+ snprintf(buf, BUFSIZ, "%s%s%s", dir, *dir ? "/" : "", component);
for (pp=notdotdot; *pp; pp++)
if (strcmp(*pp, buf) == 0)
return (TRUE);
/*
* copy the reconstituted path back to our pointer.
*/
- strcpy(path, newpath);
+ strncpy(path, newpath, BUFSIZ);
}
/*
if (*p == '/')
break;
if (p == file)
- strcpy(path, include);
+ strncpy(path, include, BUFSIZ);
else {
strncpy(path, file, (p-file) + 1);
path[ (p-file) + 1 ] = '\0';
- strcpy(path + (p-file) + 1, include);
+ strncpy(path + (p-file) + 1, include,
+ BUFSIZ - (p-file) - 1);
}
remove_dotdot(path);
if (stat(path, &st) == 0) {
*/
if (!found)
for (pp = includedirs; *pp; pp++) {
- sprintf(path, "%s/%s", *pp, include);
+ snprintf(path, BUFSIZ, "%s/%s", *pp, include);
remove_dotdot(path);
if (stat(path, &st) == 0) {
ip = newinclude(path, include);
struct sigaction sig_act;
#endif /* USGISH */
-main(argc, argv)
+int main(argc, argv)
int argc;
char **argv;
{
{
register char *p = (char *)malloc(strlen(str) + 1);
- strcpy(p, str);
+ strncpy(p, str, strlen(str) + 1);
return(p);
}
-match(str, list)
+int match(str, list)
register char *str, **list;
{
register int i;
stat(makefile, &st);
if ((fdin = fopen(makefile, "r")) == NULL)
fatalerr("cannot open \"%s\"\n", makefile);
- sprintf(backup, "%s.bak", makefile);
+ snprintf(backup, BUFSIZ, "%s.bak", makefile);
unlink(backup);
#ifdef WIN32
fclose(fdin);
#include "def.h"
+static int deftype();
+static int zero_value();
+static int merge2defines();
+
extern char *directives[];
extern struct inclist maininclist;
register char *line;
register int type;
- while (line = our_getline(filep)) {
+ while ((line = our_getline(filep))) {
switch(type = deftype(line, filep, file_red, file, FALSE)) {
case IF:
case IFFALSE:
/*
* separate the name of a single symbol.
*/
- while (isalnum(*p) || *p == '_')
+ while (isalnum((int)*p) || *p == '_')
*line++ = *p++;
*line = '\0';
break;
if (file->i_flags & DEFCHECKED)
return(NULL);
file->i_flags |= DEFCHECKED;
- if (val = slookup(symbol, file))
+ if ((val = slookup(symbol, file)))
debug(1,("%s defined in %s as %s\n",
symbol, file->i_file, (*val)->s_value));
if (val == NULL && file->i_list)
{
register struct symtab **val;
- if (val = slookup(symbol, &maininclist)) {
+ if ((val = slookup(symbol, &maininclist))) {
debug(1,("%s defined on command line\n", symbol));
if (srcfile != NULL) *srcfile = &maininclist;
return(val);
}
- if (val = fdefined(symbol, file, srcfile))
+ if ((val = fdefined(symbol, file, srcfile)))
return(val);
debug(1,("%s not defined in %s\n", symbol, file->i_file));
return(NULL);
register struct filepointer *filep;
register struct inclist *file_red;
{
- if (cppsetup(exp, filep, file_red))
+ if ((cppsetup(exp, filep, file_red)))
return(IFFALSE);
else
return(IF);
/* Separate symbol name and its value */
val = def;
- while (isalnum(*val) || *val == '_')
+ while (isalnum((int)*val) || *val == '_')
val++;
if (*val)
*val++ = '\0';
register int type;
boolean recfailOK;
- while (line = our_getline(filep)) {
+ while ((line = our_getline(filep))) {
switch(type = deftype(line, filep, file_red, file, TRUE)) {
case IF:
doif:
len = strlen(ip->i_file)+1;
if (current_len + len > width || file != lastfile) {
lastfile = file;
- sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
- ip->i_file);
+ snprintf(buf, BUFSIZ, "\n%s%s%s: %s", objprefix, base,
+ objsuffix, ip->i_file);
len = current_len = strlen(buf);
}
else {
buf[0] = ' ';
- strcpy(buf+1, ip->i_file);
+ strncpy(buf+1, ip->i_file, BUFSIZ - 1);
current_len += len;
}
fwrite(buf, len, 1, stdout);
{
FILE* f;
char* tmp;
- Table* t;
- TableEnt* te;
+
+
static void (*headerproc[])() = {
DefaultWriteHeader, ArrayperWriteHeader,
IntelABIWriteHeader, IntelABIWriteHeader,
if (strcmp (prefixstr, "Xm") == 0) {
if ((fileprotstr = malloc (strlen (phile->name) + 3)) == NULL)
exit (1);
- (void) sprintf (fileprotstr, "_%s_", phile->name);
+ (void) snprintf (fileprotstr, strlen (phile->name) + 3,
+ "_%s_", phile->name);
} else {
if ((fileprotstr = malloc (strlen (phile->name) + strlen (prefixstr) + 3)) == NULL)
exit (1);
- (void) sprintf (fileprotstr, "_%s%s_", prefixstr, phile->name);
+ (void) snprintf (fileprotstr,
+ strlen (phile->name) + strlen (prefixstr) + 3,
+ "_%s%s_", prefixstr, phile->name);
}
for (tmp = fileprotstr; *tmp; tmp++) if (*tmp == '.') *tmp = '_';
}
(void) printf ("%s %sConst char %s%s[] = \"%s\";\n",
externdefstr, conststr ? conststr : prefixstr,
- te->left, te->right);
+ prefixstr, te->left, te->right);
}
}
}
exit(1);
if ((phile->name = malloc (strlen (buf + strlen (file_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (phile->name, buf + strlen (file_str) + 1);
+ (void) strncpy (phile->name, buf + strlen (file_str) + 1,
+ strlen (buf + strlen (file_str)) + 1);
phile->table = NULL;
phile->tablecurrent = NULL;
phile->tabletail = &phile->table;
exit(1);
if ((table->name = malloc (strlen (buf + strlen (table_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (table->name, buf + strlen (table_str) + 1);
+ (void) strncpy (table->name, buf + strlen (table_str) + 1,
+ strlen (buf + strlen (table_str)) + 1);
table->tableent = NULL;
table->tableentcurrent = NULL;
table->tableenttail = &table->tableent;
case X_PREFIX_TOKEN:
if ((prefixstr = malloc (strlen (buf + strlen (prefix_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (prefixstr, buf + strlen (prefix_str) + 1);
+ (void) strncpy (prefixstr, buf + strlen (prefix_str) + 1,
+ strlen (buf + strlen (prefix_str)) + 1);
break;
case X_FEATURE_TOKEN:
if ((featurestr = malloc (strlen (buf + strlen (feature_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (featurestr, buf + strlen (feature_str) + 1);
+ (void) strncpy (featurestr, buf + strlen (feature_str) + 1,
+ strlen (buf + strlen (feature_str)) + 1);
break;
case X_EXTERNREF_TOKEN:
if ((externrefstr = malloc (strlen (buf + strlen (externref_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (externrefstr, buf + strlen (externref_str) + 1);
+ (void) strncpy (externrefstr, buf + strlen (externref_str) + 1,
+ strlen (buf + strlen (externref_str)) + 1);
break;
case X_EXTERNDEF_TOKEN:
if ((externdefstr = malloc (strlen (buf + strlen (externdef_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (externdefstr, buf + strlen (externdef_str) + 1);
+ (void) strncpy (externdefstr, buf + strlen (externdef_str) + 1,
+ strlen (buf + strlen (externdef_str)) + 1);
break;
case X_CTMPL_TOKEN:
if ((ctmplstr = malloc (strlen (buf + strlen (ctmpl_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (ctmplstr, buf + strlen (ctmpl_str) + 1);
+ (void) strncpy (ctmplstr, buf + strlen (ctmpl_str) + 1,
+ strlen (buf + strlen (ctmpl_str)) + 1);
break;
case X_HTMPL_TOKEN:
if ((filecurrent->tmpl = fopen (buf + strlen (htmpl_str) + 1, "r")) == NULL) {
case X_CONST_TOKEN:
if ((conststr = malloc (strlen (buf + strlen (const_str)) + 1)) == NULL)
exit(1);
- (void) strcpy (conststr, buf + strlen (const_str) + 1);
+ (void) strncpy (conststr, buf + strlen (const_str) + 1,
+ strlen (buf + strlen (const_str)) + 1);
break;
default:
{
int rlen;
int len;
- if (right = index(buf, ' '))
+ if ((right = index(buf, ' ')))
*right++ = 0;
else
right = buf + 1;
if (buf[0] == 'H') {
- strcpy (lbuf, prefixstr);
- strcat (lbuf, right);
+ strncpy (lbuf, prefixstr, 1024);
+ strncat (lbuf, right, strlen(right));
right = lbuf;
}
if ((tableent = (TableEnt*)malloc(sizeof(TableEnt) + len)) == NULL)
exit(1);
tableent->left = (char *)(tableent + 1);
- strcpy(tableent->left, buf);
+ strncpy(tableent->left, buf, llen);
if (llen != len) {
tableent->right = tableent->left + llen;
- strcpy(tableent->right, right);
+ strncpy(tableent->right, right, rlen);
} else {
tableent->right = tableent->left + 1;
}
$(TERMVIEW_OBJS)
#include <Library.tmpl>
-
-DependTarget()
#include "TermPrimLineFontP.h"
+int getopt(int argc, char * const argv[], const char *optstring);
int ParseChar(char **str);
int parseCoord(char **str, char *val, signed char *offset);
char * parseToken(char **str);
int argc;
char **argv;
{
- int charNum = 0;
char buffer[BUFSIZ];
char *bufPtr;
char orig[BUFSIZ];
register int i;
register char *c;
FILE *f;
- FILE *tmp;
- extern int getopt();
- extern int optind;
extern char *optarg;
- extern int opterr;
- int resolution = 75; /* dots per inch */
- int points;
char *prefix = "_Term";
charType *charList = (charType *) 0;
int charCount = 0; /* total number of chars in font*/
char *datafilename = "linegen.data";
- int dummyInt;
- int error;
while (EOF != (i = getopt(argc, argv, "p:f:"))) {
switch (i) {
}
/* back up buffer... */
- (void) strcpy(orig, buffer);
+ (void) strncpy(orig, buffer, BUFSIZ);
bufPtr = buffer;
{
char buffer[BUFSIZ];
- if (isprint(val)) {
+ if (isprint((int)val)) {
if (val == '^') {
- (void) strcpy(buffer, "'^^'");
+ (void) strncpy(buffer, "'^^'", BUFSIZ);
} else if (val == '\\') {
- (void) strcpy(buffer, "'\\\\'");
+ (void) strncpy(buffer, "'\\\\'", BUFSIZ);
} else if (val == '\'') {
- (void) strcpy(buffer, "'\\\''");
+ (void) strncpy(buffer, "'\\\''", BUFSIZ);
} else {
- (void) sprintf(buffer, "'%c'", val);
+ (void) snprintf(buffer, BUFSIZ, "'%c'", val);
}
- } else if (iscntrl(val)) {
- (void) sprintf(buffer, "'^%c'", val);
+ } else if (iscntrl((int)val)) {
+ (void) snprintf(buffer, BUFSIZ, "'^%c'", val);
} else {
- (void) sprintf(buffer, "'\\%03o'", val);
+ (void) snprintf(buffer, BUFSIZ, "'\\%03o'", val);
}
return(strdup(buffer));
entry.c free.c hash.c \
iso8601.c laccess.c lutil.c \
match.c nametbl.c refree.c \
- reparser.y rescan.c rpccalls.c \
+ reparser.c rescan.c rpccalls.c \
rtable2_clnt.c rtable2_xdr.c rtable3_clnt.c \
rtable3_xdr.c rtable4_clnt.c rtable4_xdr.c \
table.c updateattrs.c xtclient.c \
#include <Library.tmpl>
+#if defined(RsArchitecture) || defined(AlphaArchitecture)
DependTarget()
+#endif
* So, when 'all' is made in this directory, redo make includes/depend.
* An imake hack no doubt, but it is necessary for now.
*/
-all:: generated_includes depend
+all:: generated_includes abdepend
#include "../ab.tmpl"
#include "../ab.rules"
../libABobjXm/libABobjXm.msg \
../libABil/libABil.msg
+AB_MAKEFILES = \
+ Makefile.aix \
+ Makefile.hpux \
+ Makefile.sunos \
+ Makefile.osf1 \
+ Makefile.uxp \
+ Makefile.unixware \
+ Makefile.linux \
+ Makefile.freebsd \
+ Makefile.netbsd \
+ Makefile.openbsd
+
#ifndef UngeneratedSource
#define UngeneratedSource(macro, suffix) @@\
macro = \ @@\
UngeneratedSource(NONTGTS.c,.c)
UngeneratedSource(NONTGTS.o,.o)
-SRCS = $(TARGETS.c) $(TARGETS.c.stubs) $(NONTGTS.c)
-OBJS = $(TARGETS.o) $(TARGETS.o.stubs) $(NONTGTS.o)
+SRCS2 = $(TARGETS.c) $(TARGETS.c.stubs) $(NONTGTS.c)
+OBJS2 = $(TARGETS.o) $(TARGETS.o.stubs) $(NONTGTS.o)
SYS_LIBRARIES = -lm $(ICONVSYSLIB) $(DYNLIBSYSLIB) $(REGEXSYSLIB)
$(TTLIB) $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
$(UTILLIB)
-$(OBJS): $(SOURCES.h)
+/* dtcodegen needs path to catalogfile */
+DTCODEGENCAT = NLSPATH=$(CDESRC)/dtappbuilder/src/abmf/dtcodegen.cat
+
+$(OBJS2): $(SOURCES.h)
XCOMM dtcodegen wants to rewrite some files, so we make copies for it.
dtbuilder.msg: dtbuilder.msg.src
includes:: dtbuilder.msg dtbuilder.c
-ComplexProgramTarget(dtbuilder)
+all:: $(PROGRAMS)
+
+ComplexProgramTarget_2(dtbuilder,$(LOCAL_LIBRARIES),)
+
+abdepend:: DependFileName
+
+DependFileName::
+ -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) $(SRCS2)) > $@
+
+clean::
+ RemoveFile(ProgramTargetName(PROGRAMS))
AbMessageCatalogTarget(dtbuilder)
all:: dtbuilder dtbuilder.cat
clean::
- $(RM) $(TARGETS.h) $(TARGETS.c) .dtcodegen.log *.delta dtbuilder.c dtbuilder.msg
+ $(RM) $(TARGETS.h) $(TARGETS.c) $(AB_MAKEFILES) .dtcodegen.log *.delta dtbuilder.c dtbuilder.msg
CppSourceFile(Dtbuilder,Dtbuilder.src,$(LOCAL_CPP_DEFINES),)
static int write_aix_stuff(File makeFile, AbmfLibs libs);
static int write_hpux_stuff(File makeFile, AbmfLibs libs);
static int write_sunos_params(File makeFile, AbmfLibs libs);
+static int write_unixware_params(File makeFile, AbmfLibs libs);
static int write_uxp_params(File makeFile, AbmfLibs libs);
static int write_osf1_stuff(File makeFile, AbmfLibs libs);
-
-#ifdef USL
- /*
- * USL specific changes were added ifdef USL due to time constraints
- * These ifdefs should be removed in the next release
- */
-static int write_unixware_params(File makeFile, AbmfLibs libs);
-#endif
+static int write_lnx_params(File makeFile, AbmfLibs libs);
+static int write_fbsd_params(File makeFile, AbmfLibs libs);
+static int write_nbsd_params(File makeFile, AbmfLibs libs);
+static int write_obsd_params(File makeFile, AbmfLibs libs);
static int determine_aix_libs(AbmfLibs libs, ABObj project);
static int determine_hpux_libs(AbmfLibs libs, ABObj project);
static int determine_sunos_libs(AbmfLibs libs, ABObj project);
+static int determine_unixware_libs(AbmfLibs libs, ABObj project);
static int determine_uxp_libs(AbmfLibs libs, ABObj project);
static int determine_osf1_libs(AbmfLibs libs, ABObj project);
-#ifdef USL
-static int determine_unixware_libs(AbmfLibs libs, ABObj project);
-#endif
+static int determine_lnx_libs(AbmfLibs libs, ABObj project);
+static int determine_fbsd_libs(AbmfLibs libs, ABObj project);
+static int determine_nbsd_libs(AbmfLibs libs, ABObj project);
+static int determine_obsd_libs(AbmfLibs libs, ABObj project);
static int write_file_header(
GenCodeInfo genCodeInfo,
case AB_OS_OSF1:
return_value = determine_osf1_libs(libs, project);
break;
-#ifdef USL
case AB_OS_UNIXWARE:
return_value = determine_unixware_libs(libs, project);
break;
-#endif
case AB_OS_UXP:
return_value = determine_uxp_libs(libs, project);
break;
+ case AB_OS_LNX:
+ return_value = determine_lnx_libs(libs, project);
+ break;
+ case AB_OS_FBSD:
+ return_value = determine_fbsd_libs(libs, project);
+ break;
+ case AB_OS_NBSD:
+ return_value = determine_nbsd_libs(libs, project);
+ break;
+ case AB_OS_OBSD:
+ return_value = determine_obsd_libs(libs, project);
+ break;
}
return return_value;
return 0;
}
-#ifdef USL
static int
determine_unixware_libs(AbmfLibs libs, ABObj project)
{
return 0;
}
-#endif
+
+static int
+determine_lnx_libs(AbmfLibs libs, ABObj project)
+{
+ return 0;
+}
+
+static int
+determine_fbsd_libs(AbmfLibs libs, ABObj project)
+{
+ return 0;
+}
+
+static int
+determine_nbsd_libs(AbmfLibs libs, ABObj project)
+{
+ return 0;
+}
+
+static int
+determine_obsd_libs(AbmfLibs libs, ABObj project)
+{
+ return 0;
+}
static STRING
get_string_for_lib(AbmfLibDesc lib, AB_OS_TYPE osType)
return_value = write_sunos_params(makeFile, libs);
break;
+ case AB_OS_UNIXWARE:
+ return_value = write_unixware_params(makeFile, libs);
+ break;
+
case AB_OS_UXP:
return_value = write_uxp_params(makeFile, libs);
break;
return_value = write_osf1_stuff(makeFile, libs);
break;
-#ifdef USL
- case AB_OS_UNIXWARE:
- return_value = write_unixware_params(makeFile, libs);
+ case AB_OS_LNX:
+ return_value = write_lnx_params(makeFile, libs);
+ break;
+
+ case AB_OS_FBSD:
+ return_value = write_fbsd_params(makeFile, libs);
+ break;
+
+ case AB_OS_NBSD:
+ return_value = write_nbsd_params(makeFile, libs);
+ break;
+
+ case AB_OS_OBSD:
+ return_value = write_obsd_params(makeFile, libs);
break;
-#endif
}
return return_value;
return 0;
}
-#ifdef USL
static int
write_unixware_params(File makeFile, AbmfLibs libs)
{
return 0;
}
-#endif /*** USL***/
+static int
+write_lnx_params(File makeFile, AbmfLibs libs)
+{
+ STRING osName = util_os_type_to_string(AB_OS_LNX);
+
+ abio_printf(makeFile,
+ "\n"
+"###########################################################################\n"
+"# These are the %s-dependent configuration parameters that must be\n"
+"# set in order for any application to build.\n"
+"###########################################################################\n",
+ osName);
+
+ abio_puts(makeFile,
+"\n"
+".KEEP_STATE:\n"
+"\n"
+" RM = rm -f\n"
+" INCLUDES = -I/usr/dt/include -I/X11/include\n"
+"\n"
+" STD_DEFINES = \n"
+" ANSI_DEFINES = \n"
+"\n"
+" CDEBUGFLAGS = -g\n"
+" COPTFLAGS = -O2\n"
+" SYS_LIBRARIES = -lgen -lm\n"
+" CDE_LIBPATH = /usr/dt/lib\n"
+" CDE_LDFLAGS = -L$(CDE_LIBPATH)\n"
+" ALLX_LIBPATH = /X11/lib\n"
+" ALLX_LDFLAGS = -L$(ALLX_LIBPATH)\n"
+);
+ write_local_libraries(makeFile, libs, AB_OS_LNX);
+
+ abio_puts(makeFile,
+"\n"
+" CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES)"
+ " $(ANSI_DEFINES)\n"
+" LDLIBS = $(SYS_LIBRARIES)\n"
+" LDOPTIONS = $(CDE_LDFLAGS) $(ALLX_LDFLAGS)\n"
+"\n"
+);
+
+ return 0;
+}
+
+static int
+write_fbsd_params(File makeFile, AbmfLibs libs)
+{
+ STRING osName = util_os_type_to_string(AB_OS_FBSD);
+
+ abio_printf(makeFile,
+ "\n"
+"###########################################################################\n"
+"# These are the %s-dependent configuration parameters that must be\n"
+"# set in order for any application to build.\n"
+"###########################################################################\n",
+ osName);
+
+ abio_puts(makeFile,
+"\n"
+".KEEP_STATE:\n"
+"\n"
+" RM = rm -f\n"
+" INCLUDES = -I/usr/dt/include -I/X11/include\n"
+"\n"
+" STD_DEFINES = \n"
+" ANSI_DEFINES = \n"
+"\n"
+" CDEBUGFLAGS = -g\n"
+" COPTFLAGS = -O2\n"
+" SYS_LIBRARIES = -lgen -lm\n"
+" CDE_LIBPATH = /usr/dt/lib\n"
+" CDE_LDFLAGS = -L$(CDE_LIBPATH)\n"
+" ALLX_LIBPATH = /X11/lib\n"
+" ALLX_LDFLAGS = -L$(ALLX_LIBPATH)\n"
+);
+ write_local_libraries(makeFile, libs, AB_OS_FBSD);
+
+ abio_puts(makeFile,
+"\n"
+" CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES)"
+ " $(ANSI_DEFINES)\n"
+" LDLIBS = $(SYS_LIBRARIES)\n"
+" LDOPTIONS = $(CDE_LDFLAGS) $(ALLX_LDFLAGS)\n"
+"\n"
+);
+
+ return 0;
+}
+
+static int
+write_nbsd_params(File makeFile, AbmfLibs libs)
+{
+ STRING osName = util_os_type_to_string(AB_OS_NBSD);
+
+ abio_printf(makeFile,
+ "\n"
+"###########################################################################\n"
+"# These are the %s-dependent configuration parameters that must be\n"
+"# set in order for any application to build.\n"
+"###########################################################################\n",
+ osName);
+
+ abio_puts(makeFile,
+"\n"
+".KEEP_STATE:\n"
+"\n"
+" RM = rm -f\n"
+" INCLUDES = -I/usr/dt/include -I/X11/include\n"
+"\n"
+" STD_DEFINES = \n"
+" ANSI_DEFINES = \n"
+"\n"
+" CDEBUGFLAGS = -g\n"
+" COPTFLAGS = -O2\n"
+" SYS_LIBRARIES = -lgen -lm\n"
+" CDE_LIBPATH = /usr/dt/lib\n"
+" CDE_LDFLAGS = -L$(CDE_LIBPATH)\n"
+" ALLX_LIBPATH = /X11/lib\n"
+" ALLX_LDFLAGS = -L$(ALLX_LIBPATH)\n"
+);
+ write_local_libraries(makeFile, libs, AB_OS_NBSD);
+
+ abio_puts(makeFile,
+"\n"
+" CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES)"
+ " $(ANSI_DEFINES)\n"
+" LDLIBS = $(SYS_LIBRARIES)\n"
+" LDOPTIONS = $(CDE_LDFLAGS) $(ALLX_LDFLAGS)\n"
+"\n"
+);
+
+ return 0;
+}
+
+static int
+write_obsd_params(File makeFile, AbmfLibs libs)
+{
+ STRING osName = util_os_type_to_string(AB_OS_OBSD);
+
+ abio_printf(makeFile,
+ "\n"
+"###########################################################################\n"
+"# These are the %s-dependent configuration parameters that must be\n"
+"# set in order for any application to build.\n"
+"###########################################################################\n",
+ osName);
+
+ abio_puts(makeFile,
+"\n"
+".KEEP_STATE:\n"
+"\n"
+" RM = rm -f\n"
+" INCLUDES = -I/usr/dt/include -I/X11/include\n"
+"\n"
+" STD_DEFINES = \n"
+" ANSI_DEFINES = \n"
+"\n"
+" CDEBUGFLAGS = -g\n"
+" COPTFLAGS = -O2\n"
+" SYS_LIBRARIES = -lgen -lm\n"
+" CDE_LIBPATH = /usr/dt/lib\n"
+" CDE_LDFLAGS = -L$(CDE_LIBPATH)\n"
+" ALLX_LIBPATH = /X11/lib\n"
+" ALLX_LDFLAGS = -L$(ALLX_LIBPATH)\n"
+);
+ write_local_libraries(makeFile, libs, AB_OS_OBSD);
+
+ abio_puts(makeFile,
+"\n"
+" CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES)"
+ " $(ANSI_DEFINES)\n"
+" LDLIBS = $(SYS_LIBRARIES)\n"
+" LDOPTIONS = $(CDE_LDFLAGS) $(ALLX_LDFLAGS)\n"
+"\n"
+);
+
+ return 0;
+}
static int
write_local_libraries(
" $(RM) $(CLEAN_FILES)\n"
"\n"
"scour:\n"
-" $(RM) $(CLEAN_FILES) $(TARGETS.h.merged) $(TARGETS.c.merged) Makefile Makefile.aix Makefile.hpux Makefile.sunos \\\n"
-" Makefile.osf1\n"
+" $(RM) $(CLEAN_FILES) $(TARGETS.h.merged) $(TARGETS.c.merged) \\\n"
+" Makefile Makefile.aix Makefile.hpux Makefile.sunos \\\n"
+" Makefile.osf1 Makefile.uxp Makefile.unixware Makefile.linux \\\n"
+" Makefile.freebsd Makefile.netbsd Makefile.openbsd\n"
);
return 0;
struct utsname sysInfo;
int aixIndex = -1;
int hpIndex = -1;
+ int sunIndex = -1;
+ int unixwareIndex = -1;
int uxpIndex = -1;
int osf1Index = -1;
-
-#ifdef USL
- /*
- * These changes were made ifdef USL due to time constraint.
- * ifdefs should be removed in next release
- */
- int unixwareIndex = -1;
-#endif
-
- int sunIndex = -1;
+ int lnxIndex = -1;
+ int fbsdIndex = -1;
+ int nbsdIndex = -1;
+ int obsdIndex = -1;
if (osTypeDefined)
{
aixIndex = util_strcasestr(sysInfo.sysname, "aix");
hpIndex = util_strcasestr(sysInfo.sysname, "hp");
sunIndex = util_strcasestr(sysInfo.sysname, "sun");
+ unixwareIndex = util_strcasestr(sysInfo.sysname, "UNIX_SV");
uxpIndex = util_strcasestr(sysInfo.sysname, "UNIX_System_V");
osf1Index = util_strcasestr(sysInfo.sysname, "osf1");
-
-#ifdef USL
- /*
- * These changes were made ifdef USL due to time constraint.
- * ifdefs should be removed in next release
- */
- unixwareIndex = util_strcasestr(sysInfo.sysname, "UNIX_SV");
-#endif
+ lnxIndex = util_strcasestr(sysInfo.sysname, "linux");
+ fbsdIndex = util_strcasestr(sysInfo.sysname, "freebsd");
+ nbsdIndex = util_strcasestr(sysInfo.sysname, "netbsd");
+ obsdIndex = util_strcasestr(sysInfo.sysname, "openbsd");
if (aixIndex < 0) aixIndex = INT_MAX;
if (hpIndex < 0) hpIndex = INT_MAX;
if (sunIndex < 0) sunIndex = INT_MAX;
+ if (unixwareIndex < 0) unixwareIndex = INT_MAX;
if (uxpIndex < 0) uxpIndex = INT_MAX;
if (osf1Index < 0) osf1Index = INT_MAX;
+ if (lnxIndex < 0) lnxIndex = INT_MAX;
+ if (fbsdIndex < 0) fbsdIndex = INT_MAX;
+ if (nbsdIndex < 0) nbsdIndex = INT_MAX;
+ if (obsdIndex < 0) obsdIndex = INT_MAX;
-#ifdef USL
- /*
- * These changes were made ifdef USL due to time constraint.
- * ifdefs should be removed in next release
- */
- if (unixwareIndex < 0) unixwareIndex = INT_MAX;
-#endif
-
-#ifndef USL
+#define IS_MATCH(a,b,c,d,e,f,g,h,i,j) \
+ (((a) < (b)) && ((a) < (c)) && ((a) < (d)) && ((a) < (e)) && ((a) < (f)) && \
+ ((a) < (g)) && ((a) < (h)) && ((a) < (i)) && ((a) < (j)))
-#define IS_MATCH(a,b,c,d,e) \
- (((a) < (b)) && ((a) < (c)) && ((a) < (d))&& ((a) < (e)))
-
- if (IS_MATCH(aixIndex, hpIndex, sunIndex, osf1Index, uxpIndex))
+ if (IS_MATCH(aixIndex, hpIndex, sunIndex, osf1Index, unixwareIndex,
+ uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
return AB_OS_AIX;
}
- if (IS_MATCH(hpIndex, aixIndex, sunIndex, osf1Index, uxpIndex))
+ if (IS_MATCH(hpIndex, aixIndex, sunIndex, osf1Index, unixwareIndex,
+ uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
return AB_OS_HPUX;
}
- if (IS_MATCH(sunIndex, aixIndex, hpIndex, osf1Index, uxpIndex))
+ if (IS_MATCH(sunIndex, aixIndex, hpIndex, osf1Index, unixwareIndex,
+ uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
return AB_OS_SUNOS;
}
- if (IS_MATCH(osf1Index, aixIndex, hpIndex, sunIndex, uxpIndex))
+ if (IS_MATCH(osf1Index, aixIndex, hpIndex, sunIndex, unixwareIndex,
+ uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
return AB_OS_OSF1;
}
- if (IS_MATCH(uxpIndex, aixIndex, hpIndex, sunIndex, osf1Index))
+ if (IS_MATCH(uxpIndex, aixIndex, hpIndex, sunIndex, unixwareIndex,
+ osf1Index, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
return AB_OS_UXP;
}
-
-#else
-#define IS_MATCH(a,b,c,d,e,f) \
- (((a) < (b)) && ((a) < (c)) && ((a) < (d)) && ((a) < (e)) && ((a) < (f)))
-
- if (IS_MATCH(aixIndex, hpIndex, sunIndex, osf1Index, unixwareIndex, uxpIndex))
- {
- return AB_OS_AIX;
- }
- if (IS_MATCH(hpIndex, aixIndex, sunIndex, osf1Index, unixwareIndex, uxpIndex))
+ if (IS_MATCH(unixwareIndex, aixIndex, hpIndex, sunIndex, osf1Index,
+ uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
- return AB_OS_HPUX;
+ return AB_OS_UNIXWARE;
}
- if (IS_MATCH(sunIndex, aixIndex, hpIndex, osf1Index, unixwareIndex, uxpIndex))
+ if (IS_MATCH(lnxIndex, aixIndex, hpIndex, sunIndex, osf1Index,
+ unixwareIndex, uxpIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
- return AB_OS_SUNOS;
+ return AB_OS_LNX;
}
- if (IS_MATCH(osf1Index, aixIndex, hpIndex, sunIndex, unixwareIndex, uxpIndex))
+ if (IS_MATCH(fbsdIndex, aixIndex, hpIndex, sunIndex, osf1Index,
+ unixwareIndex, uxpIndex, lnxIndex, nbsdIndex, obsdIndex))
{
- return AB_OS_OSF1;
+ return AB_OS_FBSD;
}
- if (IS_MATCH(uxpIndex, aixIndex, hpIndex, sunIndex, unixwareIndex, osf1Index))
+ if (IS_MATCH(nbsdIndex, aixIndex, hpIndex, sunIndex, osf1Index,
+ unixwareIndex, uxpIndex, lnxIndex, fbsdIndex, obsdIndex))
{
- return AB_OS_UXP;
+ return AB_OS_NBSD;
}
- if (IS_MATCH(unixwareIndex, aixIndex, hpIndex, sunIndex, osf1Index, uxpIndex))
+ if (IS_MATCH(obsdIndex, aixIndex, hpIndex, sunIndex, osf1Index,
+ unixwareIndex, uxpIndex, lnxIndex, fbsdIndex, nbsdIndex))
{
- return AB_OS_UNIXWARE;
+ return AB_OS_OBSD;
}
-#endif /**USL**/
+
osTypeDefined = TRUE;
epilogue:
AB_OS_AIX,
AB_OS_SUNOS,
AB_OS_OSF1,
-#ifdef USL
AB_OS_UNIXWARE,
-#endif
AB_OS_UXP,
+ AB_OS_LNX,
+ AB_OS_FBSD,
+ AB_OS_NBSD,
+ AB_OS_OBSD,
AB_OS_TYPE_NUM_VALUES /* must be last */
} AB_OS_TYPE;
case AB_OS_AIX: typeString = "aix"; break;
case AB_OS_HPUX: typeString = "hpux"; break;
case AB_OS_SUNOS: typeString = "sunos"; break;
+ case AB_OS_UNIXWARE: typeString = "unixware"; break;
case AB_OS_UXP: typeString = "uxp"; break;
case AB_OS_OSF1: typeString = "osf1"; break;
-
-#ifdef USL
- /*
- * The USL specific changes were made ifdef USL due to time constraint
- * They should be removed in the next release
- */
- case AB_OS_UNIXWARE: typeString = "unixware"; break;
-#endif
+ case AB_OS_LNX: typeString = "linux"; break;
+ case AB_OS_FBSD: typeString = "freebsd"; break;
+ case AB_OS_NBSD: typeString = "netbsd"; break;
+ case AB_OS_OBSD: typeString = "openbsd"; break;
}
return typeString;
case AB_OS_AIX: nameString = "AIX"; break;
case AB_OS_HPUX: nameString = "HP-UX"; break;
case AB_OS_SUNOS: nameString = "SunOS"; break;
+ case AB_OS_UNIXWARE: nameString = "UnixWare"; break;
case AB_OS_UXP: nameString = "UXP"; break;
case AB_OS_OSF1: nameString = "OSF/1"; break;
+ case AB_OS_LNX: nameString = "Linux"; break;
+ case AB_OS_FBSD: nameString = "FreeBSD"; break;
+ case AB_OS_NBSD: nameString = "NetBSD"; break;
+ case AB_OS_OBSD: nameString = "OpenBSD"; break;
}
return nameString;
#endif
SRCS = \
- parser.y access.c callback.c \
+ parser.c access.c callback.c \
cmscalendar.c cmsconvert.c cmsentry.c \
cmsmatch.c delete.c garbage.c \
insert.c lexit.c list.c \
parser.o: parser.c
+includes:: parser.c
+
clean::
$(RM) parser.c
$(_NULLCMD_) > parser.h
#include "entdef.h"
/* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
int argc ;
char **argv ;
{
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;
}
char *delim;
{
M_WCHAR wcbuff[129];
-size_t length;
+ssize_t length;
wcbuff[128] = 0;
length = mbstowcs(wcbuff,delim,128);
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;
/* Rule end processing */
void rulend(M_NOPAR)
{
- STATE *fsa ;
+ STATE *fsa = NULL ;
LOGICAL canbenull ;
LHS *lhsp ;
LHS *discard ;
void skiptoend(M_NOPAR)
{
int i ;
- static errlev = 0 ;
+ static int errlev = 0 ;
if (! errlev++) {
curcon = ERROR ;
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) ;
}
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 ;
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) ;
}
}
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) {
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 ;
}
TREE *child ;
STATELIST *start, *final ;
LOGICAL groupbenull ;
- ANDGROUP *andptr, *saveand, *otherand ;
+ ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
STATELIST *index ;
ELTSTRUCT *errelt ;
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");
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
;
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 ;
}
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)
#include <string.h>
#include <stdlib.h>
+#include <ctype.h>
#if defined(MSDOS)
#include <process.h>
#endif
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) ;
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) ;
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) ;
}
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) {
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) ;
}
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) ;
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) ;
{
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) ;
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) ;
}
{
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) ;
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) ;
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) ;
{
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)
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)
undefent = TRUE ;
}
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
- ent->name,
+ (char *)ent->name,
enttype(ent->type)
) ;
}
/* Add a parameter to the current element */
void addpar(M_NOPAR)
{
-PARAMETER *paramp, *last ;
+PARAMETER *paramp, *last = NULL ;
int length ;
parcount++ ;
}
break ;
}
+ return(FALSE);
}
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
-int i ;
+int i, ret ;
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) ;
}
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 */
#endif
) ;
-void main(
+int main(
#if defined(M_PROTO)
int argc, char **argv
#endif
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)
{
{
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"
M_WCHAR *mapname;
{
M_WCHAR *p;
-int n, length;
+int n;
char c;
if (!wc_prefix)
return;
}
c = ('0' + (n % 10));
- mbtowc(p, &c, 1);
- *p++;
+ int ret = mbtowc(p, &c, 1);
+ (void) ret;
+ p++;
}
*p = M_EOS;
egensuf++;
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);
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;
/* 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;
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) ;
}
}
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) ; */
}
#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 ;
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) ;
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) {
}
}
done() ;
+ return 0;
}
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;
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 */
void skiptoend(M_NOPAR)
{
int i;
- static errlev = 0;
+ static int errlev = 0;
CVARSTRUCT *cvarp, *dvarp;
for (cvarp = cvarlist ; cvarp ;) {
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;
{
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,
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) {
#endif
) ;
-void main(
+int main(
#if defined(M_PROTO)
int argc, char **argv
#endif
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;
static char unexp[] = "c";
M_WCHAR wus;
-mbtowc(&wus, "_", 1);
+int ret = mbtowc(&wus, "_", 1);
+(void) ret;
while (TRUE)
{
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
+ ) ;
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},
} ;
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))));
char unexp[32]; /* arbitraily large */
int length;
-mbtowc(&wcl, ":", 1);
+int ret = mbtowc(&wcl, ":", 1);
+(void) ret;
while (TRUE)
{
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)
*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;
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)
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;
if (! first) fprintf(delim, ",\n");
first = FALSE;
- fprintf(delim, " %d, %d", column, value);
+ fprintf(delim, " {%d, %d}", column, value);
nonzero++;
}
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);
{
M_WCHAR wnl;
-mbtowc(&wnl, "\n", 1);
+int ret = mbtowc(&wnl, "\n", 1);
+(void) ret;
ungetc(c, cdat);
if (c == wnl) m_line--;
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") ;
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") ;
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) ;
}
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) {
#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") ;
"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") ;
}
case M_DELTDEF: return(xdeltdef) ;
case FALSE: return("0") ;
}
+ return("0");
}
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 */
{
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);
}
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 ") ;
}
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) ;
}
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) ;
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
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)
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--;
}
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(¤tnode, m_ctupper(*p)) ;
/* 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) ;
FILE *file ;
void *value ;
{
- fprintf(file, ", %d", (int) value) ;
+ fprintf(file, ", %ld", (long) value) ;
}
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)
string1start = string1;
-while (*string1++ = *string2++);
+while ((*string1++ = *string2++));
return string1start;
}
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;
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
-char c;
if (!mb_string)
mb_string = "";
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;
{
int c;
M_WCHAR wc;
-char badch[2];
char mbyte[32]; /* make this bigger than any possible multi-byte char */
int length;
return(EOF);
}
}
-mbtowc(&wc,mbyte,length);
+int ret = mbtowc(&wc,mbyte,length);
+(void) ret;
return((int) wc);
}
#include "entdef.h"
/* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
int argc ;
char **argv ;
{
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;
}
char *delim;
{
M_WCHAR wcbuff[129];
-size_t length;
+ssize_t length;
wcbuff[128] = 0;
length = mbstowcs(wcbuff,delim,128);
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;
/* Rule end processing */
void rulend(M_NOPAR)
{
- STATE *fsa ;
+ STATE *fsa = NULL ;
LOGICAL canbenull ;
LHS *lhsp ;
LHS *discard ;
void skiptoend(M_NOPAR)
{
int i ;
- static errlev = 0 ;
+ static int errlev = 0 ;
if (! errlev++) {
curcon = ERROR ;
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) ;
}
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) ;
}
}
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) {
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 ;
}
TREE *child ;
STATELIST *start, *final ;
LOGICAL groupbenull ;
- ANDGROUP *andptr, *saveand, *otherand ;
+ ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
STATELIST *index ;
ELTSTRUCT *errelt ;
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");
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
;
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 ;
}
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)
#include <string.h>
#include <stdlib.h>
+#include <ctype.h>
#if defined(MSDOS)
#include <process.h>
#endif
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) ;
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) ;
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) ;
}
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) {
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) ;
}
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) ;
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) ;
{
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) ;
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) ;
}
{
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) ;
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) ;
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) ;
{
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)
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)
undefent = TRUE ;
}
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
- ent->name,
+ (char *)ent->name,
enttype(ent->type)
) ;
}
/* Add a parameter to the current element */
void addpar(M_NOPAR)
{
-PARAMETER *paramp, *last ;
+PARAMETER *paramp, *last = NULL ;
int length ;
parcount++ ;
}
break ;
}
+ return(FALSE);
}
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
-int i ;
+int i, ret ;
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) ;
}
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 */
#endif
) ;
-void main(
+int main(
#if defined(M_PROTO)
int argc, char **argv
#endif
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)
{
{
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"
M_WCHAR *mapname;
{
M_WCHAR *p;
-int n, length;
+int n;
char c;
if (!wc_prefix)
return;
}
c = ('0' + (n % 10));
- mbtowc(p, &c, 1);
- *p++;
+ int ret = mbtowc(p, &c, 1);
+ (void) ret;
+ p++;
}
*p = M_EOS;
egensuf++;
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);
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;
/* 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;
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) ;
}
}
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) ; */
}
{
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 ;
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) ;
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) {
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;
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 */
void skiptoend(M_NOPAR)
{
int i;
- static errlev = 0;
+ static int errlev = 0;
CVARSTRUCT *cvarp, *dvarp;
for (cvarp = cvarlist ; cvarp ;) {
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;
{
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,
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) {
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;
static char unexp[] = "c";
M_WCHAR wus;
-mbtowc(&wus, "_", 1);
+int ret = mbtowc(&wus, "_", 1);
+(void) ret;
while (TRUE)
{
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
+ ) ;
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},
} ;
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))));
char unexp[32]; /* arbitraily large */
int length;
-mbtowc(&wcl, ":", 1);
+int ret = mbtowc(&wcl, ":", 1);
+(void) ret;
while (TRUE)
{
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)
*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;
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)
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;
if (! first) fprintf(delim, ",\n");
first = FALSE;
- fprintf(delim, " %d, %d", column, value);
+ fprintf(delim, " {%d, %d}", column, value);
nonzero++;
}
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);
{
M_WCHAR wnl;
-mbtowc(&wnl, "\n", 1);
+int ret = mbtowc(&wnl, "\n", 1);
+(void) ret;
ungetc(c, cdat);
if (c == wnl) m_line--;
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") ;
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") ;
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) ;
}
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) {
#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") ;
"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") ;
}
case M_DELTDEF: return(xdeltdef) ;
case FALSE: return("0") ;
}
+ return("0");
}
{
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);
}
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 ") ;
}
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) ;
}
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) ;
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
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)
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--;
}
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(¤tnode, m_ctupper(*p)) ;
/* 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) ;
FILE *file ;
void *value ;
{
- fprintf(file, ", %d", (int) value) ;
+ fprintf(file, ", %ld", (long) value) ;
}
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)
string1start = string1;
-while (*string1++ = *string2++);
+while ((*string1++ = *string2++));
return string1start;
}
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;
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
-char c;
if (!mb_string)
mb_string = "";
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;
{
int c;
M_WCHAR wc;
-char badch[2];
char mbyte[32]; /* make this bigger than any possible multi-byte char */
int length;
return(EOF);
}
}
-mbtowc(&wc,mbyte,length);
+int ret = mbtowc(&wc,mbyte,length);
+(void) ret;
return((int) wc);
}
#include "entdef.h"
/* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
int argc ;
char **argv ;
{
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;
}
char *delim;
{
M_WCHAR wcbuff[129];
-size_t length;
+ssize_t length;
wcbuff[128] = 0;
length = mbstowcs(wcbuff,delim,128);
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;
/* Rule end processing */
void rulend(M_NOPAR)
{
- STATE *fsa ;
+ STATE *fsa = NULL ;
LOGICAL canbenull ;
LHS *lhsp ;
LHS *discard ;
void skiptoend(M_NOPAR)
{
int i ;
- static errlev = 0 ;
+ static int errlev = 0 ;
if (! errlev++) {
curcon = ERROR ;
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) ;
}
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 ;
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) ;
}
}
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) {
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 ;
}
TREE *child ;
STATELIST *start, *final ;
LOGICAL groupbenull ;
- ANDGROUP *andptr, *saveand, *otherand ;
+ ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
STATELIST *index ;
ELTSTRUCT *errelt ;
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");
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
;
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 ;
}
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)
#include <string.h>
#include <stdlib.h>
+#include <ctype.h>
#if defined(MSDOS)
#include <process.h>
#endif
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) ;
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) ;
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) ;
}
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) {
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) ;
}
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) ;
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) ;
{
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) ;
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) ;
}
{
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) ;
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) ;
{
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)
}
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");
}
}
/* Add a parameter to the current element */
void addpar(M_NOPAR)
{
-PARAMETER *paramp, *last ;
+PARAMETER *paramp, *last = NULL ;
int length ;
parcount++ ;
}
break ;
}
+ return(FALSE);
}
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
#endif /* M_PROTO */
{
M_WCHAR *p, *q ;
-int i ;
+int i, ret ;
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) ;
}
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 */
#endif
) ;
-void main(
+int main(
#if defined(M_PROTO)
int argc, char **argv
#endif
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)
{
{
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"
M_WCHAR *mapname;
{
M_WCHAR *p;
-int n, length;
+int n;
char c;
if (!wc_prefix)
return;
}
c = ('0' + (n % 10));
- mbtowc(p, &c, 1);
- *p++;
+ int ret = mbtowc(p, &c, 1);
+ (void) ret;
+ p++;
}
*p = M_EOS;
egensuf++;
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);
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;
/* 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;
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) ;
}
}
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) ; */
}
#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 ;
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) ;
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) {
}
}
done() ;
+ return 0;
}
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;
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 */
void skiptoend(M_NOPAR)
{
int i;
- static errlev = 0;
+ static int errlev = 0;
CVARSTRUCT *cvarp, *dvarp;
for (cvarp = cvarlist ; cvarp ;) {
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;
{
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,
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) {
#endif
) ;
-void main(
+int main(
#if defined(M_PROTO)
int argc, char **argv
#endif
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;
static char unexp[] = "c";
M_WCHAR wus;
-mbtowc(&wus, "_", 1);
+int ret = mbtowc(&wus, "_", 1);
+(void) ret;
while (TRUE)
{
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
+ ) ;
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},
} ;
#endif
) ;
-void main(
+int main(
#if defined(M_PROTO)
int argc, char **argv
#endif
#include "cont.h"
/* Main procedure */
-void main(argc, argv)
+int main(argc, argv)
int argc ;
char **argv ;
{
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))));
char unexp[32]; /* arbitraily large */
int length;
-mbtowc(&wcl, ":", 1);
+int ret = mbtowc(&wcl, ":", 1);
+(void) ret;
while (TRUE)
{
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)
*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;
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)
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;
if (! first) fprintf(delim, ",\n");
first = FALSE;
- fprintf(delim, " %d, %d", column, value);
+ fprintf(delim, " {%d, %d}", column, value);
nonzero++;
}
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);
{
M_WCHAR wnl;
-mbtowc(&wnl, "\n", 1);
+int ret = mbtowc(&wnl, "\n", 1);
+(void) ret;
ungetc(c, cdat);
if (c == wnl) m_line--;
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") ;
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") ;
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) ;
}
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) {
#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") ;
"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") ;
}
case M_DELTDEF: return(xdeltdef) ;
case FALSE: return("0") ;
}
+ return("0");
}
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 */
{
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);
}
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 ") ;
}
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) ;
}
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) ;
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
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)
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--;
}
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(¤tnode, m_ctupper(*p)) ;
/* 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) ;
FILE *file ;
void *value ;
{
- fprintf(file, ", %d", (int) value) ;
+ fprintf(file, ", %ld", (long) value) ;
}
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)
string1start = string1;
-while (*string1++ = *string2++);
+while ((*string1++ = *string2++));
return string1start;
}
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;
{
M_WCHAR *wc_string, *wc_stringStart;
int length, incr;
-char c;
if (!mb_string)
mb_string = "";
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;
{
int c;
M_WCHAR wc;
-char badch[2];
char mbyte[32]; /* make this bigger than any possible multi-byte char */
int length;
return(EOF);
}
}
-mbtowc(&wc,mbyte,length);
+int ret = mbtowc(&wc,mbyte,length);
+(void) ret;
return((int) wc);
}
XCOMM Variables to switch on debug mode temporarily
XCOMM CDEBUGFLAGS = -g -DDEBUG
XCOMM CXXDEBUGFLAGS = -g -DDEBUG
-
-DependTarget()
rchild->pgno, bl->flags & P_BIGKEY);
memmove(dest, bl->bytes, nksize ? nksize : bl->ksize);
if (bl->flags & P_BIGKEY &&
- bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
+ bt_preserve(t, *(char *)bl->bytes) == RET_ERROR)
goto err1;
break;
case P_RINTERNAL:
* so it isn't deleted when the leaf copy of the key is deleted.
*/
if (bl->flags & P_BIGKEY &&
- bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
+ bt_preserve(t, *(char *)bl->bytes) == RET_ERROR)
return (RET_ERROR);
break;
case P_BINTERNAL:
if ((mp = malloc(sizeof(MPOOL))) == NULL)
return (NULL);
- mp->free.cnext = mp->free.cprev = (BKT *)&mp->free;
- mp->lru.cnext = mp->lru.cprev = (BKT *)&mp->lru;
+ mp->free.cnext = mp->free.cprev = (BKT *)(void *)&mp->free;
+ mp->lru.cnext = mp->lru.cprev = (BKT *)(void *)&mp->lru;
for (entry = 0; entry < HASHSIZE; ++entry)
mp->hashtable[entry].hnext = mp->hashtable[entry].hprev =
mp->hashtable[entry].cnext = mp->hashtable[entry].cprev =
BKT *b, *next;
/* Free up any space allocated to the lru pages. */
- for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = next) {
+ for (b = mp->lru.cprev; b != (BKT *)(void *)&mp->lru; b = next) {
next = b->cprev;
free(b);
}
{
BKT *b;
- for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = b->cprev)
+ for (b = mp->lru.cprev; b != (BKT *)(void *)&mp->lru; b = b->cprev)
if (b->flags & MPOOL_DIRTY && mpool_write(mp, b) == RET_ERROR)
return (RET_ERROR);
return (fsync(mp->fd) ? RET_ERROR : RET_SUCCESS);
* any lists. If we don't find anything we grow the cache anyway.
* The cache never shrinks.
*/
- for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = b->cprev)
+ for (b = mp->lru.cprev; b != (BKT *)(void *)&mp->lru; b = b->cprev)
if (!(b->flags & MPOOL_PINNED)) {
if (b->flags & MPOOL_DIRTY &&
mpool_write(mp, b) == RET_ERROR)
}
#define inschain(bp, dp) { \
(bp)->cnext = (dp)->cnext; \
- (bp)->cprev = (struct BKT *)(dp); \
+ (bp)->cprev = (struct BKT *)(void *)(dp); \
(dp)->cnext->cprev = (bp); \
(dp)->cnext = (bp); \
}
break;
}
- buf.get(*(long*)&dt);
+ buf.get(*(char*)&dt);
return true;
}
unsigned long xmu_length;
XmuConvertStandardSelection(w, req->time, &selection, &target, &type_return,
- (caddr_t*)&xmu_targets, &xmu_length,
+ (caddr_t*)(void*)&xmu_targets, &xmu_length,
&format_return);
assert( type_return == XA_ATOM );
assert( format_return == sizeof(Atom) * 8 );
{
char *name;
_DtCanvasGetSelection(f_help_dsp_area->canvas,
- _DtCvSELECTED_TEXT, ((_DtCvPointer *)&name));
+ _DtCvSELECTED_TEXT, ((_DtCvPointer *)(void*)&name));
#ifdef BOOKMARK_DEBUG
cerr << "Bookmark Name: [" << name << "]" << endl;
1L, 1L, False,
_DT_SM_WINDOW_INFO,
&type, &format, &nitems, &after,
- (unsigned char **)&sm_prop_window) ;
+ (unsigned char **)(void*)&sm_prop_window) ;
#ifdef DEBUG
// property.smWindow = (unsigned long) smGD.topLevelWindow;
0L, (long)8, False,
XA_STRING,
&type, &format, &nitems, &after,
- (unsigned char **)&dt_locale) ;
+ (unsigned char **)(void*)&dt_locale) ;
#ifdef DEBUG
printf( "desktop's locale is %s\n", dt_locale ) ;
OBJS1= cgmcmds.o \
cgmcommon.o \
cgmio.o \
- cgmtext.o \
- getcgm.o
+ cgmtext.o
SRCS1= cgmcmds.c \
cgmcommon.c \
cgmio.c \
- cgmtext.c \
- getcgm.c
+ cgmtext.c
+
+SRCS2= getcgm.c
+OBJS2= getcgm.o
NormalCplusplusObjectRule()
NormalLibraryObjectRule()
-NormalLibraryTarget(cgm, $(OBJS1))
+NormalLibraryTarget2(cgm, $(OBJS1), $(OBJS2))
AllTarget($(PROGRAMS))
-SRCS2 = testcgm.c
-OBJS2 = testcgm.o
+SRCS3 = testcgm.c
+OBJS3 = testcgm.o
-ComplexProgramTarget_2($(PROGRAMS),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))
+ComplexProgramTarget_3($(PROGRAMS),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))
-DependTarget3($(SRCS1),$(SRCS2),NullParameter)
+DependTarget3($(SRCS1),$(SRCS2),$(SRCS3))
clean::
RemoveFiles($(PROGRAMS))
const int GR_ENCODING_TEXT = 1;
//-------------------------------------------------------------------------
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 4
+GR_TYPE __attribute__((optimize("O0")))
+#else
GR_TYPE
+#endif
GraphicsTask::graphics_type( const char *gname )
{
form("cannot reopen graphics file %s\n", gname)));
}
- hdrptr = (XWDFileHeader *)header;
+ hdrptr = (XWDFileHeader *)(void*)header;
// Initialize the structure
for (CARD32 ndx = 0; ndx < sz_XWDheader; ndx++) {
header[ndx] = (CARD32) 0;
$(RM) libMMDBTemplates.a
ptclean
#endif
-
-DependTarget()
#include <stdio.h>
#include <stdlib.h>
-main(argc, argv)
+int main(argc, argv)
int argc ;
char **argv;
{
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
+#if 0
static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
+#endif
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
#define yy_new_buffer yy_create_buffer
+#if 0
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
+#endif
YY_DECL
{
return ( yy_is_jam ? 0 : yy_current_state );
}
-
+#if 0
#ifdef YY_USE_PROTOS
static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
#else
*/
YY_DO_BEFORE_ACTION; /* set up yytext again */
}
+#endif
+#if 0
#ifdef __cplusplus
static int yyinput()
#else
return ( c );
}
+#endif
#ifdef YY_USE_PROTOS
#include <stdio.h>
#include <stdlib.h>
-main(argc, argv)
+int main(argc, argv)
int argc ;
char **argv ;
{
echo "rm ksh93/src/cmd/ksh93/FEATURE/*"
rm -f ksh93/src/cmd/ksh93/FEATURE/*
+echo "mkdir ksh93/src/cmd/ksh93/FEATURE"
+mkdir -p ksh93/src/cmd/ksh93/FEATURE
echo "cp /dev/null ksh93/src/cmd/ksh93/FEATURE/options"
cp /dev/null ksh93/src/cmd/ksh93/FEATURE/options
echo "cp /dev/null ksh93/src/cmd/ksh93/FEATURE/setjmp"
echo "cp /dev/null ksh93/src/cmd/ksh93/FEATURE/dynamic"
cp /dev/null ksh93/src/cmd/ksh93/FEATURE/dynamic
+echo "mkdir ksh93/include/ast"
+mkdir -p ksh93/include/ast
+echo "cp /dev/null ksh93/include/ast/ast.h"
+cp /dev/null ksh93/include/ast/ast.h
+echo "cp /dev/null ksh93/include/ast/cmd.h"
+cp /dev/null ksh93/include/ast/cmd.h
+echo "cp /dev/null ksh93/include/ast/error.h"
+cp /dev/null ksh93/include/ast/error.h
+echo "cp /dev/null ksh93/include/ast/hash.h"
+cp /dev/null ksh93/include/ast/hash.h
+echo "cp /dev/null ksh93/include/ast/option.h"
+cp /dev/null ksh93/include/ast/option.h
+echo "cp /dev/null ksh93/include/ast/sfio.h"
+cp /dev/null ksh93/include/ast/sfio.h
+echo "cp /dev/null ksh93/include/ast/sig.h"
+cp /dev/null ksh93/include/ast/sig.h
+echo "cp /dev/null ksh93/include/ast/stak.h"
+cp /dev/null ksh93/include/ast/stak.h
+
echo "rm ksh93/src/cmd/pax/FEATURE/*"
rm -f ksh93/src/cmd/pax/FEATURE/*
MAKEMESSCAT = $(KORNSHELL) $(CDESRC)/localized/util/makeMessCat
SYM2NUM_CMD = $(KORNSHELL) $(CDESRC)/dtprintinfo/sym2num
-
-MsgCatRule()
LinkFile(libdtcm.msg,$(CDESRC)/dtcm/libDtCmP/libdtcm.msg)
LinkFile(libDtMail.msg,$(CDESRC)/dtmail/libDtMail/Common/libDtMail.msg)
+MsgCatRule()
+
clean::
for i in *.msg; do \
[ -z $$i ] && continue; \
SpecialCplusplusObjectRule(parser_inst,parser_inst,$(CXXTEMPLATEFLAGS))
SpecialCplusplusObjectRule(xentmgr_inst,xentmgr_inst,$(CXXTEMPLATEFLAGS))
+includes:: $(GENERATED_SRCS)
+
NormalCplusplusObjectRule()
ComplexCplusplusProgramTarget($(PROGRAMS))
DEPLIBS = $(DEPDTTERMLIB) DepDtClientLibs $(DEPUTILLIB)
LOCAL_LIBRARIES = $(DTTERMLIB) DtClientLibs $(UTILLIB)
SYS_LIBRARIES = DtClientSysLibs DtClientExtraLibs
+DTCODEGENCAT = NLSPATH=$(CDESRC)/dtappbuilder/src/abmf/dtcodegen.cat
XCOMM ##########################################################################
ttChooser_stubs.C ttsnoop.C \
ttsnoop_stubs.C
-SRCS.h = $(TARGETS.h.merged) $(TARGETS.h) tt_c++.h DtTt.h
+SRCS2.h = $(TARGETS.h.merged) $(TARGETS.h) tt_c++.h DtTt.h
-SRCS = $(TARGETS.C.merged) $(TARGETS.c) tt_c++.C DtTt.C
+SRCS2 = $(TARGETS.C.merged) $(TARGETS.c) tt_c++.C DtTt.C
-OBJS = \
+OBJS2 = \
DtTt.o apiTracer_stubs.o \
apiTracer_ui.o argChooser_stubs.o \
argChooser_ui.o callbackChooser_stubs.o \
tt_c++.o ttsnoop.o \
ttsnoop_stubs.o ttsnoop_ui.o
+AB_MAKEFILES = \
+ Makefile.aix \
+ Makefile.hpux \
+ Makefile.sunos \
+ Makefile.osf1 \
+ Makefile.uxp \
+ Makefile.unixware \
+ Makefile.linux \
+ Makefile.freebsd \
+ Makefile.netbsd \
+ Makefile.openbsd
XCOMM ###
XCOMM ### This is basically a kludge since dtappbuilder is not being
XCOMM ### localincludes:: $(TARGETS.h) $(TARGETS.c)
XCOMM ###
-all:: targets
+all:: targets ttdepend
targets:: $(TARGETS.h) $(TARGETS.c)
NormalCplusplusObjectRule()
-ComplexCplusplusProgramTarget($(PROGRAMS))
+all:: $(PROGRAMS)
+
+ComplexCplusplusProgramTarget_2($(PROGRAMS),$(LOCAL_LIBRARIES),)
+
+ttdepend:: DependFileName
+
+DependFileName::
+ -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) $(SRCS2)) > $@
+
+clean::
+ RemoveFile(ProgramTargetName(PROGRAMS))
XCOMM #####################################################################
CodeGenTarget(callbackChooser)
CLEAN_FILES = core .dtcodegen.log *.BAK *.delta *.patched \
- $(PROGRAMS) $(OBJS) $(TARGETS.c) $(TARGETS.h) \
+ $(PROGRAMS) $(OBJS2) $(TARGETS.c) $(TARGETS.h) \
$(TARGETS.c.temp) $(TARGETS.C.merged) Ttsnoop
clean::
- $(RM) $(CLEAN_FILES)
+ $(RM) $(CLEAN_FILES) $(AB_MAKEFILES)
scour:
$(RM) $(CLEAN_FILES) $(TARGETS.h.merged) Makefile Makefile.aix Makefile.hpux Makefile.sunos