1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Resolve many build warnings

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

10
cde/.gitignore vendored
View file

@ -209,7 +209,12 @@ programs/dtappbuilder/src/ab/Makefile.aix
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
@ -2263,7 +2268,12 @@ programs/ttsnoop/Makefile.aix
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

View file

@ -127,7 +127,7 @@ World.doc:
# 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)
@ -152,6 +152,9 @@ imake.bootstrap:
else exit 0; fi
$(MAKE) $(MFLAGS) xmakefile
$(DEPENDSRC)/proto.clean:
cd $(DEPENDSRC) && $(RM) -r Makefile.proto
Makefile::
$(MAKE) $(MFLAGS) xmakefile

View file

@ -154,6 +154,7 @@ XCOMM rules: $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
* MakeLintSubdirs (dirs,target,subtarget)
* LintSubdirs (dirs)
* MakeLintLibSubdirs (dirs)
* MakeMakeOneSubdirs ()
* MakeMakeSubdirs (dirs,target)
* MakefileSubdirs (dirs)
* CppScriptTarget (dst,src,defs,deplist)
@ -2298,22 +2299,29 @@ MakeLintSubdirs(dirs,lintlib,lintlib)
/*
* 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.
* 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 MakeMakeSubdirs
#define MakeMakeSubdirs(dirs,target) @@\
#ifndef MakeMakeOneSubdirs
#define MakeMakeOneSubdirs() @@\
$(ONESUBDIR)/Makefile: @@\
@MakeFlagsToShellFlags(n,executeit="no"); \ @@\
cd $(ONESUBDIR); \ @@\
if [ "$$executeit" != "no" ]; then \ @@\
ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\
fi; @@\
@@\
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.
*/
#ifndef MakeMakeSubdirs
#define MakeMakeSubdirs(dirs,target) @@\
target:: @@\
-@MakeFlagsToShellFlags(ik,set +e); \ @@\
MakeFlagsToShellFlags(n,executeit="no"); \ @@\
@ -2380,6 +2388,7 @@ target:: @@\
*/
#ifndef MakefileSubdirs
#define MakefileSubdirs(dirs) @@\
MakeMakeOneSubdirs() @@\
MakeMakeSubdirs(dirs,Makefiles)
#endif /* MakefileSubdirs */

View file

@ -1048,6 +1048,8 @@ CXXDEPENDINCLUDE != echo | `CcCmd -print-prog-name=cc1plus` -v 2>&1 | \
#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

View file

@ -223,7 +223,7 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $
# 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

View file

@ -61,7 +61,7 @@ in this Software without prior written authorization from The Open Group .
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;
}

View file

@ -405,13 +405,14 @@ main(int argc, char *argv[])
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)
@ -709,6 +710,7 @@ optional_include(FILE *inFile, const char *defsym, const char *fname)
{
errno = 0;
if (access(fname, R_OK) == 0) {
if(errno)
LogMsg(OverrideWarning, fname);
return (fprintf(inFile, LocalDefineFmt, defsym, fname) < 0 ||
fprintf(inFile, IncludeFmt, defsym) < 0);
@ -780,35 +782,35 @@ parse_utsname(struct utsname *name, const char *fmt, char *result, const char *m
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;
@ -823,7 +825,8 @@ parse_utsname(struct utsname *name, const char *fmt, char *result, const char *m
/* 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
@ -993,7 +996,8 @@ get_libc_version(FILE *inFile)
*/
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);
@ -1014,17 +1018,17 @@ get_libc_version(FILE *inFile)
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 ();
@ -1051,7 +1055,7 @@ get_libc_version(FILE *inFile)
abort ();
while (fgets (command, len, fp))
fprintf (inFile, command);
fprintf (inFile, "%s", command);
len = pclose (fp);
remove (aout);
@ -1073,7 +1077,8 @@ get_ld_version(FILE *inFile)
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);
@ -1097,15 +1102,16 @@ get_sun_compiler_versions(FILE *inFile)
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);
@ -1118,13 +1124,13 @@ get_sun_compiler_versions(FILE *inFile)
}
}
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);
@ -1136,6 +1142,7 @@ get_sun_compiler_versions(FILE *inFile)
pclose (ccproc);
}
}
(void) ret;
}
#endif
@ -1159,12 +1166,12 @@ get_gcc_incdir(FILE *inFile)
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;
@ -1334,7 +1341,8 @@ CleanCppInput(char *imakefile)
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.",
@ -1413,10 +1421,10 @@ isempty(char *line)
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 == '"')
@ -1432,7 +1440,7 @@ isempty(char *line)
(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' &&
@ -1445,7 +1453,7 @@ isempty(char *line)
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;
@ -1455,7 +1463,7 @@ isempty(char *line)
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);
}
}
@ -1504,7 +1512,8 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
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");
@ -1515,7 +1524,8 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
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 @ */
@ -1652,6 +1662,6 @@ Strdup(const char *cp)
{
char *new = Emalloc(strlen(cp) + 1);
strcpy(new, cp);
strncpy(new, cp, strlen(cp) + 1);
return new;
}

View file

@ -161,7 +161,7 @@ my_if_errors (ip, cp, expecting)
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;
@ -224,7 +224,7 @@ my_eval_variable (ip, var, len)
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);
@ -235,7 +235,7 @@ my_eval_variable (ip, var, len)
}
cppsetup(line, filep, inc)
int cppsetup(line, filep, inc)
register char *line;
register struct filepointer *filep;
register struct inclist *inc;

View file

@ -148,6 +148,7 @@ char *malloc();
char *realloc();
#endif
int match();
char *copy();
char *base_name();
char *our_getline();
@ -155,8 +156,17 @@ struct symtab **slookup();
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 *, ...);

View file

@ -81,6 +81,8 @@
#include "ifparser.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
/****************************************************************************
@ -89,8 +91,8 @@
#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 *
@ -106,7 +108,7 @@ parse_variable (g, cp, varp)
*varp = cp;
/* EMPTY */
for (cp++; isalnum(*cp) || *cp == '_'; cp++) ;
for (cp++; isalnum((int)*cp) || *cp == '_'; cp++) ;
return cp;
}
@ -120,7 +122,7 @@ parse_number (g, cp, valp)
long base = 10;
SKIPSPACE (cp);
if (!isdigit(*cp))
if (!isdigit((int)*cp))
return CALLFUNC(g, handle_error) (g, cp, "number");
*valp = 0;
@ -248,7 +250,7 @@ parse_value (g, cp, valp)
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;
@ -269,7 +271,7 @@ parse_value (g, cp, valp)
/* 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");

View file

@ -79,7 +79,7 @@ issymbolic(dir, component)
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);
@ -166,7 +166,7 @@ remove_dotdot(path)
/*
* copy the reconstituted path back to our pointer.
*/
strcpy(path, newpath);
strncpy(path, newpath, BUFSIZ);
}
/*
@ -299,11 +299,12 @@ struct inclist *inc_path(file, include, dot)
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) {
@ -320,7 +321,7 @@ struct inclist *inc_path(file, include, dot)
*/
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);

View file

@ -148,7 +148,7 @@ catch (sig)
struct sigaction sig_act;
#endif /* USGISH */
main(argc, argv)
int main(argc, argv)
int argc;
char **argv;
{
@ -491,11 +491,11 @@ char *copy(str)
{
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;
@ -642,7 +642,7 @@ redirect(line, makefile)
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);

View file

@ -45,6 +45,10 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
static int deftype();
static int zero_value();
static int merge2defines();
extern char *directives[];
extern struct inclist maininclist;
@ -56,7 +60,7 @@ gobble(filep, file, file_red)
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:
@ -189,7 +193,7 @@ int deftype (line, filep, file_red, file, parse_it)
/*
* separate the name of a single symbol.
*/
while (isalnum(*p) || *p == '_')
while (isalnum((int)*p) || *p == '_')
*line++ = *p++;
*line = '\0';
break;
@ -265,7 +269,7 @@ struct symtab **fdefined(symbol, file, srcfile)
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)
@ -294,12 +298,12 @@ struct symtab **isdefined(symbol, file, srcfile)
{
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);
@ -314,7 +318,7 @@ zero_value(exp, filep, file_red)
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);
@ -413,7 +417,7 @@ define(def, file)
/* Separate symbol name and its value */
val = def;
while (isalnum(*val) || *val == '_')
while (isalnum((int)*val) || *val == '_')
val++;
if (*val)
*val++ = '\0';
@ -549,7 +553,7 @@ find_includes(filep, file, file_red, recursion, failOK)
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:

View file

@ -107,13 +107,13 @@ pr(ip, file, base)
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);

View file

@ -261,8 +261,8 @@ static void WriteHeader (tagline, phile, abi)
{
FILE* f;
char* tmp;
Table* t;
TableEnt* te;
static void (*headerproc[])() = {
DefaultWriteHeader, ArrayperWriteHeader,
IntelABIWriteHeader, IntelABIWriteHeader,
@ -284,11 +284,14 @@ static void WriteHeader (tagline, phile, abi)
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 = '_';
@ -404,7 +407,7 @@ static void ArrayperWriteSource (abi)
}
(void) printf ("%s %sConst char %s%s[] = \"%s\";\n",
externdefstr, conststr ? conststr : prefixstr,
te->left, te->right);
prefixstr, te->left, te->right);
}
}
}
@ -520,7 +523,8 @@ static void DoLine(buf)
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;
@ -539,7 +543,8 @@ static void DoLine(buf)
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;
@ -554,27 +559,32 @@ static void DoLine(buf)
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) {
@ -586,7 +596,8 @@ static void DoLine(buf)
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:
{
@ -596,13 +607,13 @@ static void DoLine(buf)
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;
}
@ -612,10 +623,10 @@ static void DoLine(buf)
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;
}

View file

@ -84,5 +84,3 @@ OBJS = \
$(TERMVIEW_OBJS)
#include <Library.tmpl>
DependTarget()

View file

@ -41,6 +41,7 @@ static char rcs_id[] = "$XConsortium: lineToData.c /main/1 1996/04/21 19:20:58 d
#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);
@ -60,20 +61,13 @@ main(argc, argv)
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;
@ -99,8 +93,6 @@ char **argv;
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) {
@ -139,7 +131,7 @@ char **argv;
}
/* back up buffer... */
(void) strcpy(orig, buffer);
(void) strncpy(orig, buffer, BUFSIZ);
bufPtr = buffer;
@ -734,20 +726,20 @@ vis(char val)
{
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));

View file

@ -53,7 +53,7 @@ SRCS = agent.c agent_xdr.c api.c \
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 \

View file

@ -211,4 +211,6 @@ OBJS = $(OBJS_1) $(OBJS_2) $(OBJS_3)
#include <Library.tmpl>
#if defined(RsArchitecture) || defined(AlphaArchitecture)
DependTarget()
#endif

View file

@ -24,7 +24,7 @@ XCOMM (c) Copyright 1996 Hitachi.
* 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"
@ -174,6 +174,18 @@ SOURCES.msg = \
../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 = \ @@\
@ -240,8 +252,8 @@ Concat(x_util,suffix)
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)
@ -276,7 +288,10 @@ LOCAL_LIBRARIES = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \
$(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
@ -286,7 +301,17 @@ dtbuilder.c: dtbuilder.c.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)
@ -294,7 +319,7 @@ XCOMM Try to replace the original dtbuilder.msg.src file if necessary.
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),)

View file

@ -101,25 +101,24 @@ static int write_os_params(
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,
@ -239,14 +238,24 @@ determine_libs(AbmfLibs libs, ABObj project, AB_OS_TYPE osType)
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;
@ -288,13 +297,35 @@ determine_osf1_libs(AbmfLibs libs, ABObj project)
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)
@ -491,6 +522,10 @@ write_os_params(
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;
@ -499,11 +534,21 @@ write_os_params(
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;
@ -732,7 +777,6 @@ write_osf1_stuff(File makeFile, AbmfLibs libs)
return 0;
}
#ifdef USL
static int
write_unixware_params(File makeFile, AbmfLibs libs)
{
@ -774,7 +818,185 @@ 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(
@ -1112,8 +1334,10 @@ write_targets(
" $(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;

View file

@ -249,18 +249,14 @@ util_get_os_type(void)
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)
{
@ -274,86 +270,80 @@ util_get_os_type(void)
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
#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)))
#ifndef USL
#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))
{
return AB_OS_HPUX;
}
if (IS_MATCH(sunIndex, aixIndex, hpIndex, osf1Index, unixwareIndex, uxpIndex))
{
return AB_OS_SUNOS;
}
if (IS_MATCH(osf1Index, aixIndex, hpIndex, sunIndex, unixwareIndex, uxpIndex))
{
return AB_OS_OSF1;
}
if (IS_MATCH(uxpIndex, aixIndex, hpIndex, sunIndex, unixwareIndex, osf1Index))
{
return AB_OS_UXP;
}
if (IS_MATCH(unixwareIndex, aixIndex, hpIndex, sunIndex, osf1Index, uxpIndex))
if (IS_MATCH(unixwareIndex, aixIndex, hpIndex, sunIndex, osf1Index,
uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
return AB_OS_UNIXWARE;
}
#endif /**USL**/
if (IS_MATCH(lnxIndex, aixIndex, hpIndex, sunIndex, osf1Index,
unixwareIndex, uxpIndex, fbsdIndex, nbsdIndex, obsdIndex))
{
return AB_OS_LNX;
}
if (IS_MATCH(fbsdIndex, aixIndex, hpIndex, sunIndex, osf1Index,
unixwareIndex, uxpIndex, lnxIndex, nbsdIndex, obsdIndex))
{
return AB_OS_FBSD;
}
if (IS_MATCH(nbsdIndex, aixIndex, hpIndex, sunIndex, osf1Index,
unixwareIndex, uxpIndex, lnxIndex, fbsdIndex, obsdIndex))
{
return AB_OS_NBSD;
}
if (IS_MATCH(obsdIndex, aixIndex, hpIndex, sunIndex, osf1Index,
unixwareIndex, uxpIndex, lnxIndex, fbsdIndex, nbsdIndex))
{
return AB_OS_OBSD;
}
osTypeDefined = TRUE;
epilogue:

View file

@ -82,10 +82,12 @@ typedef enum
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;

View file

@ -854,16 +854,13 @@ util_os_type_to_ident(AB_OS_TYPE osType)
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;
@ -883,8 +880,13 @@ util_os_type_to_string(AB_OS_TYPE osType)
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;

View file

@ -50,7 +50,7 @@ EXTRA_LIBRARIES = -lsocket -lnsl -lintl
#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 \
@ -91,6 +91,8 @@ NormalProgramTarget($(PROGRAM),$(OBJS),,$(LOCAL_LIBRARIES),)
parser.o: parser.c
includes:: parser.c
clean::
$(RM) parser.c
$(_NULLCMD_) > parser.h

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -112,3 +112,21 @@ void *m_malloc(
int size, char *msg
#endif
) ;
void m_free(
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void m_err2(
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
int mb_getwc(
#if defined(M_PROTO)
void *m_ptr
#endif
) ;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -112,3 +112,21 @@ void *m_malloc(
int size, char *msg
#endif
) ;
void m_free(
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void m_err2(
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
int mb_getwc(
#if defined(M_PROTO)
void *m_ptr
#endif
) ;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -118,3 +118,21 @@ void *m_malloc(
int size, char *msg
#endif
) ;
void m_free(
#if defined(M_PROTO)
void *block, char *msg
#endif
) ;
void m_err2(
#if defined(M_PROTO)
const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
#endif
) ;
int mb_getwc(
#if defined(M_PROTO)
void *m_ptr
#endif
) ;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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