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:
parent
2bf29e5d63
commit
42e891d9e7
125 changed files with 1926 additions and 1440 deletions
10
cde/.gitignore
vendored
10
cde/.gitignore
vendored
|
@ -209,7 +209,12 @@ programs/dtappbuilder/src/ab/Makefile.aix
|
||||||
programs/dtappbuilder/src/ab/Makefile.hpux
|
programs/dtappbuilder/src/ab/Makefile.hpux
|
||||||
programs/dtappbuilder/src/ab/Makefile.osf1
|
programs/dtappbuilder/src/ab/Makefile.osf1
|
||||||
programs/dtappbuilder/src/ab/Makefile.sunos
|
programs/dtappbuilder/src/ab/Makefile.sunos
|
||||||
|
programs/dtappbuilder/src/ab/Makefile.unixware
|
||||||
programs/dtappbuilder/src/ab/Makefile.uxp
|
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.res
|
||||||
programs/dtappbuilder/src/ab/about_box_ui.c
|
programs/dtappbuilder/src/ab/about_box_ui.c
|
||||||
programs/dtappbuilder/src/ab/about_box_ui.h
|
programs/dtappbuilder/src/ab/about_box_ui.h
|
||||||
|
@ -2263,7 +2268,12 @@ programs/ttsnoop/Makefile.aix
|
||||||
programs/ttsnoop/Makefile.hpux
|
programs/ttsnoop/Makefile.hpux
|
||||||
programs/ttsnoop/Makefile.osf1
|
programs/ttsnoop/Makefile.osf1
|
||||||
programs/ttsnoop/Makefile.sunos
|
programs/ttsnoop/Makefile.sunos
|
||||||
|
programs/ttsnoop/Makefile.unixware
|
||||||
programs/ttsnoop/Makefile.uxp
|
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/Ttsnoop
|
||||||
programs/ttsnoop/apiTracer_stubs.C
|
programs/ttsnoop/apiTracer_stubs.C
|
||||||
programs/ttsnoop/apiTracer_stubs.c.BAK
|
programs/ttsnoop/apiTracer_stubs.c.BAK
|
||||||
|
|
|
@ -127,7 +127,7 @@ World.doc:
|
||||||
# This is just a sequence of bootstrapping steps we have to do.
|
# 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 steps are listed as separate targets so clearmake can wink in
|
||||||
# the Makefile.proto files.
|
# 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:
|
imake.proto:
|
||||||
cd $(IMAKESRC) && $(MAKE) $(FLAGS)
|
cd $(IMAKESRC) && $(MAKE) $(FLAGS)
|
||||||
|
@ -152,6 +152,9 @@ imake.bootstrap:
|
||||||
else exit 0; fi
|
else exit 0; fi
|
||||||
$(MAKE) $(MFLAGS) xmakefile
|
$(MAKE) $(MFLAGS) xmakefile
|
||||||
|
|
||||||
|
$(DEPENDSRC)/proto.clean:
|
||||||
|
cd $(DEPENDSRC) && $(RM) -r Makefile.proto
|
||||||
|
|
||||||
Makefile::
|
Makefile::
|
||||||
$(MAKE) $(MFLAGS) xmakefile
|
$(MAKE) $(MFLAGS) xmakefile
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ XCOMM rules: $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
|
||||||
* MakeLintSubdirs (dirs,target,subtarget)
|
* MakeLintSubdirs (dirs,target,subtarget)
|
||||||
* LintSubdirs (dirs)
|
* LintSubdirs (dirs)
|
||||||
* MakeLintLibSubdirs (dirs)
|
* MakeLintLibSubdirs (dirs)
|
||||||
|
* MakeMakeOneSubdirs ()
|
||||||
* MakeMakeSubdirs (dirs,target)
|
* MakeMakeSubdirs (dirs,target)
|
||||||
* MakefileSubdirs (dirs)
|
* MakefileSubdirs (dirs)
|
||||||
* CppScriptTarget (dst,src,defs,deplist)
|
* CppScriptTarget (dst,src,defs,deplist)
|
||||||
|
@ -2298,22 +2299,29 @@ MakeLintSubdirs(dirs,lintlib,lintlib)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MakeMakeSubdirs - generate rules to recursively recreate Makefiles as part
|
* MakeMakeOneSubdirs - generate rules to recreate $(ONESUBDIR)/Makefile
|
||||||
* of the specified step in the build. If $(TOP) is set to an absolute path,
|
* as part of the specified step in the build. This separate, explicit target
|
||||||
* do not prepend the ../ prefix. This makes running things outside of the
|
* exists so that clearmake will know what its goal is and do wink-in.
|
||||||
* source tree much easier.
|
|
||||||
* $(ONESUBDIR)/Makefile exists as a separate, explicit target so that
|
|
||||||
* clearmake will know what its goal is and do wink-in.
|
|
||||||
*/
|
*/
|
||||||
#ifndef MakeMakeSubdirs
|
#ifndef MakeMakeOneSubdirs
|
||||||
#define MakeMakeSubdirs(dirs,target) @@\
|
#define MakeMakeOneSubdirs() @@\
|
||||||
$(ONESUBDIR)/Makefile: @@\
|
$(ONESUBDIR)/Makefile: @@\
|
||||||
@MakeFlagsToShellFlags(n,executeit="no"); \ @@\
|
@MakeFlagsToShellFlags(n,executeit="no"); \ @@\
|
||||||
cd $(ONESUBDIR); \ @@\
|
cd $(ONESUBDIR); \ @@\
|
||||||
if [ "$$executeit" != "no" ]; then \ @@\
|
if [ "$$executeit" != "no" ]; then \ @@\
|
||||||
ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\
|
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:: @@\
|
target:: @@\
|
||||||
-@MakeFlagsToShellFlags(ik,set +e); \ @@\
|
-@MakeFlagsToShellFlags(ik,set +e); \ @@\
|
||||||
MakeFlagsToShellFlags(n,executeit="no"); \ @@\
|
MakeFlagsToShellFlags(n,executeit="no"); \ @@\
|
||||||
|
@ -2380,6 +2388,7 @@ target:: @@\
|
||||||
*/
|
*/
|
||||||
#ifndef MakefileSubdirs
|
#ifndef MakefileSubdirs
|
||||||
#define MakefileSubdirs(dirs) @@\
|
#define MakefileSubdirs(dirs) @@\
|
||||||
|
MakeMakeOneSubdirs() @@\
|
||||||
MakeMakeSubdirs(dirs,Makefiles)
|
MakeMakeSubdirs(dirs,Makefiles)
|
||||||
#endif /* MakefileSubdirs */
|
#endif /* MakefileSubdirs */
|
||||||
|
|
||||||
|
|
|
@ -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
|
#define LibraryCplusplusOptions -Wall -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DependFileName .depend
|
||||||
|
|
||||||
#define ArchitectureDefines -DOPENBSD_ARCHITECTURE
|
#define ArchitectureDefines -DOPENBSD_ARCHITECTURE
|
||||||
|
|
||||||
#define BuildLibPathVar LD_LIBRARY_PATH
|
#define BuildLibPathVar LD_LIBRARY_PATH
|
||||||
|
|
|
@ -223,7 +223,7 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $
|
||||||
# if UseInstalledCDE
|
# if UseInstalledCDE
|
||||||
# define DtCodeGen dtcodegen
|
# define DtCodeGen dtcodegen
|
||||||
# else
|
# else
|
||||||
# define DtCodeGen $(CLIENTENVSETUP) $(CDESRC)/dtappbuilder/src/abmf/dtcodegen
|
# define DtCodeGen $(CLIENTENVSETUP) $(DTCODEGENCAT) $(CDESRC)/dtappbuilder/src/abmf/dtcodegen
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ in this Software without prior written authorization from The Open Group .
|
||||||
|
|
||||||
int main(void)
|
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;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -405,13 +405,14 @@ main(int argc, char *argv[])
|
||||||
tmpMakefile = Makefile;
|
tmpMakefile = Makefile;
|
||||||
else {
|
else {
|
||||||
tmpMakefile = Strdup(tmpMakefile);
|
tmpMakefile = Strdup(tmpMakefile);
|
||||||
mkstemp(tmpMakefile);
|
int ret = mkstemp(tmpMakefile);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
AddMakeArg("-f");
|
AddMakeArg("-f");
|
||||||
AddMakeArg( tmpMakefile );
|
AddMakeArg( tmpMakefile );
|
||||||
sprintf(makeMacro, "MAKE=%s", program);
|
snprintf(makeMacro, BUFSIZ, "MAKE=%s", program);
|
||||||
AddMakeArg( makeMacro );
|
AddMakeArg( makeMacro );
|
||||||
sprintf(makefileMacro, "MAKEFILE=%s", Imakefile);
|
snprintf(makefileMacro, BUFSIZ, "MAKEFILE=%s", Imakefile);
|
||||||
AddMakeArg( makefileMacro );
|
AddMakeArg( makefileMacro );
|
||||||
|
|
||||||
if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL)
|
if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL)
|
||||||
|
@ -709,7 +710,8 @@ optional_include(FILE *inFile, const char *defsym, const char *fname)
|
||||||
{
|
{
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (access(fname, R_OK) == 0) {
|
if (access(fname, R_OK) == 0) {
|
||||||
LogMsg(OverrideWarning, fname);
|
if(errno)
|
||||||
|
LogMsg(OverrideWarning, fname);
|
||||||
return (fprintf(inFile, LocalDefineFmt, defsym, fname) < 0 ||
|
return (fprintf(inFile, LocalDefineFmt, defsym, fname) < 0 ||
|
||||||
fprintf(inFile, IncludeFmt, defsym) < 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':
|
case 's':
|
||||||
if (arg > 0)
|
if (arg > 0)
|
||||||
*ptr++ = ' ';
|
*ptr++ = ' ';
|
||||||
strcpy(ptr, name->sysname);
|
strncpy(ptr, name->sysname, SYS_NMLN);
|
||||||
ptr += strlen(ptr);
|
ptr += strlen(ptr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'n':
|
case 'n':
|
||||||
if (arg > 0)
|
if (arg > 0)
|
||||||
*ptr++ = ' ';
|
*ptr++ = ' ';
|
||||||
strcpy(ptr, name->nodename);
|
strncpy(ptr, name->nodename, SYS_NMLN);
|
||||||
ptr += strlen(ptr);
|
ptr += strlen(ptr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
if (arg > 0)
|
if (arg > 0)
|
||||||
*ptr++ = ' ';
|
*ptr++ = ' ';
|
||||||
strcpy(ptr, name->release);
|
strncpy(ptr, name->release, SYS_NMLN);
|
||||||
ptr += strlen(ptr);
|
ptr += strlen(ptr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
if (arg > 0)
|
if (arg > 0)
|
||||||
*ptr++ = ' ';
|
*ptr++ = ' ';
|
||||||
strcpy(ptr, name->version);
|
strncpy(ptr, name->version, SYS_NMLN);
|
||||||
ptr += strlen(ptr);
|
ptr += strlen(ptr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
if (arg > 0)
|
if (arg > 0)
|
||||||
*ptr++ = ' ';
|
*ptr++ = ' ';
|
||||||
strcpy(ptr, name->machine);
|
strncpy(ptr, name->machine, SYS_NMLN);
|
||||||
ptr += strlen(ptr);
|
ptr += strlen(ptr);
|
||||||
break;
|
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. */
|
/* Parse the buffer. The sscanf() return value is rarely correct. */
|
||||||
*result = '\0';
|
*result = '\0';
|
||||||
(void) sscanf(buf, fmt + arg + 1, result);
|
int ret = sscanf(buf, fmt + arg + 1, result);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -993,7 +996,8 @@ get_libc_version(FILE *inFile)
|
||||||
*/
|
*/
|
||||||
if (readlink (libcso, buf, PATH_MAX) >= 0) {
|
if (readlink (libcso, buf, PATH_MAX) >= 0) {
|
||||||
for (ptr = buf; *ptr && !isdigit (*ptr); ptr++);
|
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 DefaultLinuxCLibMajorVersion %d\n", libcmajor);
|
||||||
fprintf(inFile, "#define DefaultLinuxCLibMinorVersion %d\n", libcminor);
|
fprintf(inFile, "#define DefaultLinuxCLibMinorVersion %d\n", libcminor);
|
||||||
fprintf(inFile, "#define DefaultLinuxCLibTeenyVersion %d\n", libcteeny);
|
fprintf(inFile, "#define DefaultLinuxCLibTeenyVersion %d\n", libcteeny);
|
||||||
|
@ -1014,17 +1018,17 @@ get_libc_version(FILE *inFile)
|
||||||
memset(&aout, '\0', PATH_MAX);
|
memset(&aout, '\0', PATH_MAX);
|
||||||
|
|
||||||
if (!lstat(getenv("TMPDIR"), &sb) && S_ISDIR(sb.st_mode))
|
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 */
|
#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))
|
else if (!lstat(P_tmpdir, &sb) && S_ISDIR(sb.st_mode))
|
||||||
strcpy(aout, P_tmpdir);
|
strncpy(aout, P_tmpdir, PATH_MAX);
|
||||||
#endif
|
#endif
|
||||||
else if (!lstat("/tmp", &sb) && S_ISDIR(sb.st_mode))
|
else if (!lstat("/tmp", &sb) && S_ISDIR(sb.st_mode))
|
||||||
strcpy(aout, "/tmp");
|
strncpy(aout, "/tmp", PATH_MAX);
|
||||||
else
|
else
|
||||||
abort();
|
abort();
|
||||||
|
|
||||||
strcpy(aout+strlen(aout), "/imaketmp.XXXXXX");
|
strncpy(aout+strlen(aout), "/imaketmp.XXXXXX", 16);
|
||||||
|
|
||||||
if ((fd = mkstemp(aout)) == -1)
|
if ((fd = mkstemp(aout)) == -1)
|
||||||
abort ();
|
abort ();
|
||||||
|
@ -1051,7 +1055,7 @@ get_libc_version(FILE *inFile)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
while (fgets (command, len, fp))
|
while (fgets (command, len, fp))
|
||||||
fprintf (inFile, command);
|
fprintf (inFile, "%s", command);
|
||||||
|
|
||||||
len = pclose (fp);
|
len = pclose (fp);
|
||||||
remove (aout);
|
remove (aout);
|
||||||
|
@ -1073,7 +1077,8 @@ get_ld_version(FILE *inFile)
|
||||||
c = fgetc (ldprog);
|
c = fgetc (ldprog);
|
||||||
} while (c != EOF && !isdigit (c));
|
} while (c != EOF && !isdigit (c));
|
||||||
ungetc (c, ldprog);
|
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",
|
fprintf(inFile, "#define DefaultLinuxBinUtilsMajorVersion %d\n",
|
||||||
ldmajor * 10 + ldminor);
|
ldmajor * 10 + ldminor);
|
||||||
pclose (ldprog);
|
pclose (ldprog);
|
||||||
|
@ -1097,15 +1102,16 @@ get_sun_compiler_versions(FILE *inFile)
|
||||||
char* vptr;
|
char* vptr;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
FILE* ccproc;
|
FILE* ccproc;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (lstat (sunpro_cc, &sb) == 0) {
|
if (lstat (sunpro_cc, &sb) == 0) {
|
||||||
strcpy (cmd, sunpro_cc);
|
strncpy (cmd, sunpro_cc, PATH_MAX);
|
||||||
strcat (cmd, " -V 2>&1");
|
strncat (cmd, " -V 2>&1", 8);
|
||||||
if ((ccproc = popen (cmd, "r")) != NULL) {
|
if ((ccproc = popen (cmd, "r")) != NULL) {
|
||||||
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
||||||
vptr = strrchr (buf, 'C');
|
vptr = strrchr (buf, 'C');
|
||||||
for (; !isdigit(*vptr); vptr++);
|
for (; !isdigit(*vptr); vptr++);
|
||||||
(void) sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
||||||
fprintf (inFile,
|
fprintf (inFile,
|
||||||
"#define DefaultSunProCCompilerMajorVersion %d\n",
|
"#define DefaultSunProCCompilerMajorVersion %d\n",
|
||||||
cmajor);
|
cmajor);
|
||||||
|
@ -1118,13 +1124,13 @@ get_sun_compiler_versions(FILE *inFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lstat (sunpro_CC, &sb) == 0) {
|
if (lstat (sunpro_CC, &sb) == 0) {
|
||||||
strcpy (cmd, sunpro_CC);
|
strncpy (cmd, sunpro_CC, PATH_MAX);
|
||||||
strcat (cmd, " -V 2>&1");
|
strncat (cmd, " -V 2>&1", 8);
|
||||||
if ((ccproc = popen (cmd, "r")) != NULL) {
|
if ((ccproc = popen (cmd, "r")) != NULL) {
|
||||||
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
||||||
vptr = strrchr (buf, 'C');
|
vptr = strrchr (buf, 'C');
|
||||||
for (; !isdigit(*vptr); vptr++);
|
for (; !isdigit(*vptr); vptr++);
|
||||||
(void) sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
||||||
fprintf (inFile,
|
fprintf (inFile,
|
||||||
"#define DefaultSunProCplusplusCompilerMajorVersion %d\n",
|
"#define DefaultSunProCplusplusCompilerMajorVersion %d\n",
|
||||||
cmajor);
|
cmajor);
|
||||||
|
@ -1136,6 +1142,7 @@ get_sun_compiler_versions(FILE *inFile)
|
||||||
pclose (ccproc);
|
pclose (ccproc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1159,12 +1166,12 @@ get_gcc_incdir(FILE *inFile)
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
for (i = 0; i < sizeof gcc_path / sizeof gcc_path[0]; i++) {
|
for (i = 0; i < sizeof gcc_path / sizeof gcc_path[0]; i++) {
|
||||||
if (lstat (gcc_path[i], &sb) == 0) {
|
if (lstat (gcc_path[i], &sb) == 0) {
|
||||||
strcpy (cmd, gcc_path[i]);
|
strncpy (cmd, gcc_path[i], PATH_MAX - 25);
|
||||||
strcat (cmd, " --print-libgcc-file-name");
|
strncpy (cmd + strlen(cmd), " --print-libgcc-file-name", 25);
|
||||||
if ((gccproc = popen (cmd, "r")) != NULL) {
|
if ((gccproc = popen (cmd, "r")) != NULL) {
|
||||||
if (fgets (buf, PATH_MAX, gccproc) != NULL) {
|
if (fgets (buf, PATH_MAX, gccproc) != NULL) {
|
||||||
ptr = strstr (buf, "libgcc.a");
|
ptr = strstr (buf, "libgcc.a");
|
||||||
if (ptr) strcpy (ptr, "include");
|
if (ptr) strncpy (ptr, "include", 7);
|
||||||
}
|
}
|
||||||
(void) pclose (gccproc);
|
(void) pclose (gccproc);
|
||||||
break;
|
break;
|
||||||
|
@ -1262,7 +1269,7 @@ cppit(const char *imakefile, const char *template, const char *masterc, FILE *ou
|
||||||
fprintf(inFile, IncludeFmt, ImakeTmplSym) < 0 ||
|
fprintf(inFile, IncludeFmt, ImakeTmplSym) < 0 ||
|
||||||
optional_include(inFile, "IMAKE_ADMIN_MACROS", "adminmacros") ||
|
optional_include(inFile, "IMAKE_ADMIN_MACROS", "adminmacros") ||
|
||||||
optional_include(inFile, "IMAKE_LOCAL_MACROS", "localmacros") ||
|
optional_include(inFile, "IMAKE_LOCAL_MACROS", "localmacros") ||
|
||||||
fflush(inFile) ||
|
fflush(inFile) ||
|
||||||
fclose(inFile))
|
fclose(inFile))
|
||||||
LogFatal("Cannot write to %s.", masterc);
|
LogFatal("Cannot write to %s.", masterc);
|
||||||
/*
|
/*
|
||||||
|
@ -1334,7 +1341,8 @@ CleanCppInput(char *imakefile)
|
||||||
strcmp(ptoken, "undef")) {
|
strcmp(ptoken, "undef")) {
|
||||||
if (outFile == NULL) {
|
if (outFile == NULL) {
|
||||||
tmpImakefile = Strdup(tmpImakefile);
|
tmpImakefile = Strdup(tmpImakefile);
|
||||||
mkstemp(tmpImakefile);
|
int ret = mkstemp(tmpImakefile);
|
||||||
|
(void) ret;
|
||||||
outFile = fopen(tmpImakefile, "w");
|
outFile = fopen(tmpImakefile, "w");
|
||||||
if (outFile == NULL)
|
if (outFile == NULL)
|
||||||
LogFatal("Cannot open %s for write.",
|
LogFatal("Cannot open %s for write.",
|
||||||
|
@ -1413,10 +1421,10 @@ isempty(char *line)
|
||||||
if (*pend == 'l' && pend[1] == 'i' && pend[2] == 'n' &&
|
if (*pend == 'l' && pend[1] == 'i' && pend[2] == 'n' &&
|
||||||
pend[3] == 'e' && pend[4] == ' ')
|
pend[3] == 'e' && pend[4] == ' ')
|
||||||
pend += 5;
|
pend += 5;
|
||||||
if (isdigit(*pend)) {
|
if (isdigit((int)*pend)) {
|
||||||
do {
|
do {
|
||||||
pend++;
|
pend++;
|
||||||
} while (isdigit(*pend));
|
} while (isdigit((int)*pend));
|
||||||
if (*pend == '\n' || *pend == '\0')
|
if (*pend == '\n' || *pend == '\0')
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
if (*pend++ == ' ' && *pend == '"')
|
if (*pend++ == ' ' && *pend == '"')
|
||||||
|
@ -1432,7 +1440,7 @@ isempty(char *line)
|
||||||
(pend[5] == ' ' || pend[5] == '\t' || pend[5] == '\0'))
|
(pend[5] == ' ' || pend[5] == '\t' || pend[5] == '\0'))
|
||||||
{
|
{
|
||||||
*pend = '#';
|
*pend = '#';
|
||||||
strcpy(pend+1, pend+5);
|
strncpy(pend+1, pend+5, 1);
|
||||||
}
|
}
|
||||||
#ifdef MAGIC_MAKE_VARS
|
#ifdef MAGIC_MAKE_VARS
|
||||||
if (*pend == 'X' && pend[1] == 'V' && pend[2] == 'A' &&
|
if (*pend == 'X' && pend[1] == 'V' && pend[2] == 'A' &&
|
||||||
|
@ -1445,7 +1453,7 @@ isempty(char *line)
|
||||||
pend[7] >= '0' && pend[7] <= '9')
|
pend[7] >= '0' && pend[7] <= '9')
|
||||||
{
|
{
|
||||||
i = pend[7] - '0';
|
i = pend[7] - '0';
|
||||||
sprintf(varbuf, "%0.4d", xvariable);
|
snprintf(varbuf, 5, "%0.4d", xvariable);
|
||||||
strncpy(pend+4, varbuf, 4);
|
strncpy(pend+4, varbuf, 4);
|
||||||
xvariables[i] = xvariable;
|
xvariables[i] = xvariable;
|
||||||
xvariable = (xvariable + 1) % 10000;
|
xvariable = (xvariable + 1) % 10000;
|
||||||
|
@ -1455,7 +1463,7 @@ isempty(char *line)
|
||||||
pend[7] <= '9')
|
pend[7] <= '9')
|
||||||
{
|
{
|
||||||
i = pend[7] - '0';
|
i = pend[7] - '0';
|
||||||
sprintf(varbuf, "%0.4d", xvariables[i]);
|
snprintf(varbuf, 5, "%0.4d", xvariables[i]);
|
||||||
strncpy(pend+4, varbuf, 4);
|
strncpy(pend+4, varbuf, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1504,7 +1512,8 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
|
||||||
if (! tmpfd)
|
if (! tmpfd)
|
||||||
LogFatal("cannot reopen %s.", tmpfname);
|
LogFatal("cannot reopen %s.", tmpfname);
|
||||||
#else /* !SYSV */
|
#else /* !SYSV */
|
||||||
ftruncate(fileno(tmpfd), (off_t) 0);
|
int ret = ftruncate(fileno(tmpfd), (off_t) 0);
|
||||||
|
(void) ret;
|
||||||
#endif /* !SYSV */
|
#endif /* !SYSV */
|
||||||
initialized = TRUE;
|
initialized = TRUE;
|
||||||
fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");
|
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++) {
|
for (p1 = pline; p1 < end; p1++) {
|
||||||
if (*p1 == '@' && *(p1+1) == '@'
|
if (*p1 == '@' && *(p1+1) == '@'
|
||||||
/* ignore ClearCase version-extended pathnames */
|
/* ignore ClearCase version-extended pathnames */
|
||||||
&& !(p1 != pline && !isspace(*(p1-1)) && *(p1+2) == '/'))
|
&& !(p1 != pline && !isspace((int)*(p1-1))
|
||||||
|
&& *(p1+2) == '/'))
|
||||||
{ /* soft EOL */
|
{ /* soft EOL */
|
||||||
*p1++ = '\0';
|
*p1++ = '\0';
|
||||||
p1++; /* skip over second @ */
|
p1++; /* skip over second @ */
|
||||||
|
@ -1652,6 +1662,6 @@ Strdup(const char *cp)
|
||||||
{
|
{
|
||||||
char *new = Emalloc(strlen(cp) + 1);
|
char *new = Emalloc(strlen(cp) + 1);
|
||||||
|
|
||||||
strcpy(new, cp);
|
strncpy(new, cp, strlen(cp) + 1);
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ my_if_errors (ip, cp, expecting)
|
||||||
int prefixlen;
|
int prefixlen;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sprintf (prefix, "\"%s\":%d", filename, lineno);
|
snprintf (prefix, 300, "\"%s\":%d", filename, lineno);
|
||||||
prefixlen = strlen(prefix);
|
prefixlen = strlen(prefix);
|
||||||
fprintf (stderr, "%s: %s", prefix, pd->line);
|
fprintf (stderr, "%s: %s", prefix, pd->line);
|
||||||
i = cp - pd->line;
|
i = cp - pd->line;
|
||||||
|
@ -224,7 +224,7 @@ my_eval_variable (ip, var, len)
|
||||||
return 0;
|
return 0;
|
||||||
do {
|
do {
|
||||||
var = (*s)->s_value;
|
var = (*s)->s_value;
|
||||||
if (!isvarfirstletter(*var) || !strcmp((*s)->s_name, var))
|
if (!isvarfirstletter((int)*var) || !strcmp((*s)->s_name, var))
|
||||||
break;
|
break;
|
||||||
s = lookup_variable (ip, var, strlen(var));
|
s = lookup_variable (ip, var, strlen(var));
|
||||||
} while (s);
|
} 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 char *line;
|
||||||
register struct filepointer *filep;
|
register struct filepointer *filep;
|
||||||
register struct inclist *inc;
|
register struct inclist *inc;
|
||||||
|
|
|
@ -148,6 +148,7 @@ char *malloc();
|
||||||
char *realloc();
|
char *realloc();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int match();
|
||||||
char *copy();
|
char *copy();
|
||||||
char *base_name();
|
char *base_name();
|
||||||
char *our_getline();
|
char *our_getline();
|
||||||
|
@ -155,8 +156,17 @@ struct symtab **slookup();
|
||||||
struct symtab **isdefined();
|
struct symtab **isdefined();
|
||||||
struct symtab **fdefined();
|
struct symtab **fdefined();
|
||||||
struct filepointer *getfile();
|
struct filepointer *getfile();
|
||||||
|
void included_by();
|
||||||
struct inclist *newinclude();
|
struct inclist *newinclude();
|
||||||
|
void inc_clean();
|
||||||
struct inclist *inc_path();
|
struct inclist *inc_path();
|
||||||
|
void freefile();
|
||||||
|
void define2();
|
||||||
|
void define();
|
||||||
|
int find_includes();
|
||||||
|
void recursive_pr_include();
|
||||||
|
void add_include();
|
||||||
|
int cppsetup();
|
||||||
|
|
||||||
#if NeedVarargsPrototypes
|
#if NeedVarargsPrototypes
|
||||||
extern void fatalerr(char *, ...);
|
extern void fatalerr(char *, ...);
|
||||||
|
|
|
@ -81,6 +81,8 @@
|
||||||
|
|
||||||
#include "ifparser.h"
|
#include "ifparser.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -89,8 +91,8 @@
|
||||||
|
|
||||||
#define DO(val) if (!(val)) return NULL
|
#define DO(val) if (!(val)) return NULL
|
||||||
#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff))
|
#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff))
|
||||||
#define SKIPSPACE(ccc) while (isspace(*ccc)) ccc++
|
#define SKIPSPACE(ccc) while (isspace((int)*ccc)) ccc++
|
||||||
#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
|
#define isvarfirstletter(ccc) (isalpha((int)ccc) || (ccc) == '_')
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
@ -106,7 +108,7 @@ parse_variable (g, cp, varp)
|
||||||
|
|
||||||
*varp = cp;
|
*varp = cp;
|
||||||
/* EMPTY */
|
/* EMPTY */
|
||||||
for (cp++; isalnum(*cp) || *cp == '_'; cp++) ;
|
for (cp++; isalnum((int)*cp) || *cp == '_'; cp++) ;
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +122,7 @@ parse_number (g, cp, valp)
|
||||||
long base = 10;
|
long base = 10;
|
||||||
SKIPSPACE (cp);
|
SKIPSPACE (cp);
|
||||||
|
|
||||||
if (!isdigit(*cp))
|
if (!isdigit((int)*cp))
|
||||||
return CALLFUNC(g, handle_error) (g, cp, "number");
|
return CALLFUNC(g, handle_error) (g, cp, "number");
|
||||||
|
|
||||||
*valp = 0;
|
*valp = 0;
|
||||||
|
@ -248,7 +250,7 @@ parse_value (g, cp, valp)
|
||||||
return cp + 1;
|
return cp + 1;
|
||||||
|
|
||||||
case 'd':
|
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 paren = 0;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
@ -269,7 +271,7 @@ parse_value (g, cp, valp)
|
||||||
/* fall out */
|
/* fall out */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isdigit(*cp)) {
|
if (isdigit((int)*cp)) {
|
||||||
DO (cp = parse_number (g, cp, valp));
|
DO (cp = parse_number (g, cp, valp));
|
||||||
} else if (!isvarfirstletter(*cp))
|
} else if (!isvarfirstletter(*cp))
|
||||||
return CALLFUNC(g, handle_error) (g, cp, "variable or number");
|
return CALLFUNC(g, handle_error) (g, cp, "variable or number");
|
||||||
|
|
|
@ -79,7 +79,7 @@ issymbolic(dir, component)
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char buf[ BUFSIZ ], **pp;
|
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++)
|
for (pp=notdotdot; *pp; pp++)
|
||||||
if (strcmp(*pp, buf) == 0)
|
if (strcmp(*pp, buf) == 0)
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -166,7 +166,7 @@ remove_dotdot(path)
|
||||||
/*
|
/*
|
||||||
* copy the reconstituted path back to our pointer.
|
* 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 == '/')
|
if (*p == '/')
|
||||||
break;
|
break;
|
||||||
if (p == file)
|
if (p == file)
|
||||||
strcpy(path, include);
|
strncpy(path, include, BUFSIZ);
|
||||||
else {
|
else {
|
||||||
strncpy(path, file, (p-file) + 1);
|
strncpy(path, file, (p-file) + 1);
|
||||||
path[ (p-file) + 1 ] = '\0';
|
path[ (p-file) + 1 ] = '\0';
|
||||||
strcpy(path + (p-file) + 1, include);
|
strncpy(path + (p-file) + 1, include,
|
||||||
|
BUFSIZ - (p-file) - 1);
|
||||||
}
|
}
|
||||||
remove_dotdot(path);
|
remove_dotdot(path);
|
||||||
if (stat(path, &st) == 0) {
|
if (stat(path, &st) == 0) {
|
||||||
|
@ -320,7 +321,7 @@ struct inclist *inc_path(file, include, dot)
|
||||||
*/
|
*/
|
||||||
if (!found)
|
if (!found)
|
||||||
for (pp = includedirs; *pp; pp++) {
|
for (pp = includedirs; *pp; pp++) {
|
||||||
sprintf(path, "%s/%s", *pp, include);
|
snprintf(path, BUFSIZ, "%s/%s", *pp, include);
|
||||||
remove_dotdot(path);
|
remove_dotdot(path);
|
||||||
if (stat(path, &st) == 0) {
|
if (stat(path, &st) == 0) {
|
||||||
ip = newinclude(path, include);
|
ip = newinclude(path, include);
|
||||||
|
|
|
@ -148,7 +148,7 @@ catch (sig)
|
||||||
struct sigaction sig_act;
|
struct sigaction sig_act;
|
||||||
#endif /* USGISH */
|
#endif /* USGISH */
|
||||||
|
|
||||||
main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
|
@ -491,11 +491,11 @@ char *copy(str)
|
||||||
{
|
{
|
||||||
register char *p = (char *)malloc(strlen(str) + 1);
|
register char *p = (char *)malloc(strlen(str) + 1);
|
||||||
|
|
||||||
strcpy(p, str);
|
strncpy(p, str, strlen(str) + 1);
|
||||||
return(p);
|
return(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
match(str, list)
|
int match(str, list)
|
||||||
register char *str, **list;
|
register char *str, **list;
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
@ -642,7 +642,7 @@ redirect(line, makefile)
|
||||||
stat(makefile, &st);
|
stat(makefile, &st);
|
||||||
if ((fdin = fopen(makefile, "r")) == NULL)
|
if ((fdin = fopen(makefile, "r")) == NULL)
|
||||||
fatalerr("cannot open \"%s\"\n", makefile);
|
fatalerr("cannot open \"%s\"\n", makefile);
|
||||||
sprintf(backup, "%s.bak", makefile);
|
snprintf(backup, BUFSIZ, "%s.bak", makefile);
|
||||||
unlink(backup);
|
unlink(backup);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
fclose(fdin);
|
fclose(fdin);
|
||||||
|
|
|
@ -45,6 +45,10 @@ in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
|
||||||
|
static int deftype();
|
||||||
|
static int zero_value();
|
||||||
|
static int merge2defines();
|
||||||
|
|
||||||
extern char *directives[];
|
extern char *directives[];
|
||||||
extern struct inclist maininclist;
|
extern struct inclist maininclist;
|
||||||
|
|
||||||
|
@ -56,7 +60,7 @@ gobble(filep, file, file_red)
|
||||||
register char *line;
|
register char *line;
|
||||||
register int type;
|
register int type;
|
||||||
|
|
||||||
while (line = our_getline(filep)) {
|
while ((line = our_getline(filep))) {
|
||||||
switch(type = deftype(line, filep, file_red, file, FALSE)) {
|
switch(type = deftype(line, filep, file_red, file, FALSE)) {
|
||||||
case IF:
|
case IF:
|
||||||
case IFFALSE:
|
case IFFALSE:
|
||||||
|
@ -189,7 +193,7 @@ int deftype (line, filep, file_red, file, parse_it)
|
||||||
/*
|
/*
|
||||||
* separate the name of a single symbol.
|
* separate the name of a single symbol.
|
||||||
*/
|
*/
|
||||||
while (isalnum(*p) || *p == '_')
|
while (isalnum((int)*p) || *p == '_')
|
||||||
*line++ = *p++;
|
*line++ = *p++;
|
||||||
*line = '\0';
|
*line = '\0';
|
||||||
break;
|
break;
|
||||||
|
@ -265,7 +269,7 @@ struct symtab **fdefined(symbol, file, srcfile)
|
||||||
if (file->i_flags & DEFCHECKED)
|
if (file->i_flags & DEFCHECKED)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
file->i_flags |= DEFCHECKED;
|
file->i_flags |= DEFCHECKED;
|
||||||
if (val = slookup(symbol, file))
|
if ((val = slookup(symbol, file)))
|
||||||
debug(1,("%s defined in %s as %s\n",
|
debug(1,("%s defined in %s as %s\n",
|
||||||
symbol, file->i_file, (*val)->s_value));
|
symbol, file->i_file, (*val)->s_value));
|
||||||
if (val == NULL && file->i_list)
|
if (val == NULL && file->i_list)
|
||||||
|
@ -294,12 +298,12 @@ struct symtab **isdefined(symbol, file, srcfile)
|
||||||
{
|
{
|
||||||
register struct symtab **val;
|
register struct symtab **val;
|
||||||
|
|
||||||
if (val = slookup(symbol, &maininclist)) {
|
if ((val = slookup(symbol, &maininclist))) {
|
||||||
debug(1,("%s defined on command line\n", symbol));
|
debug(1,("%s defined on command line\n", symbol));
|
||||||
if (srcfile != NULL) *srcfile = &maininclist;
|
if (srcfile != NULL) *srcfile = &maininclist;
|
||||||
return(val);
|
return(val);
|
||||||
}
|
}
|
||||||
if (val = fdefined(symbol, file, srcfile))
|
if ((val = fdefined(symbol, file, srcfile)))
|
||||||
return(val);
|
return(val);
|
||||||
debug(1,("%s not defined in %s\n", symbol, file->i_file));
|
debug(1,("%s not defined in %s\n", symbol, file->i_file));
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
@ -314,7 +318,7 @@ zero_value(exp, filep, file_red)
|
||||||
register struct filepointer *filep;
|
register struct filepointer *filep;
|
||||||
register struct inclist *file_red;
|
register struct inclist *file_red;
|
||||||
{
|
{
|
||||||
if (cppsetup(exp, filep, file_red))
|
if ((cppsetup(exp, filep, file_red)))
|
||||||
return(IFFALSE);
|
return(IFFALSE);
|
||||||
else
|
else
|
||||||
return(IF);
|
return(IF);
|
||||||
|
@ -413,7 +417,7 @@ define(def, file)
|
||||||
|
|
||||||
/* Separate symbol name and its value */
|
/* Separate symbol name and its value */
|
||||||
val = def;
|
val = def;
|
||||||
while (isalnum(*val) || *val == '_')
|
while (isalnum((int)*val) || *val == '_')
|
||||||
val++;
|
val++;
|
||||||
if (*val)
|
if (*val)
|
||||||
*val++ = '\0';
|
*val++ = '\0';
|
||||||
|
@ -549,7 +553,7 @@ find_includes(filep, file, file_red, recursion, failOK)
|
||||||
register int type;
|
register int type;
|
||||||
boolean recfailOK;
|
boolean recfailOK;
|
||||||
|
|
||||||
while (line = our_getline(filep)) {
|
while ((line = our_getline(filep))) {
|
||||||
switch(type = deftype(line, filep, file_red, file, TRUE)) {
|
switch(type = deftype(line, filep, file_red, file, TRUE)) {
|
||||||
case IF:
|
case IF:
|
||||||
doif:
|
doif:
|
||||||
|
|
|
@ -107,13 +107,13 @@ pr(ip, file, base)
|
||||||
len = strlen(ip->i_file)+1;
|
len = strlen(ip->i_file)+1;
|
||||||
if (current_len + len > width || file != lastfile) {
|
if (current_len + len > width || file != lastfile) {
|
||||||
lastfile = file;
|
lastfile = file;
|
||||||
sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
|
snprintf(buf, BUFSIZ, "\n%s%s%s: %s", objprefix, base,
|
||||||
ip->i_file);
|
objsuffix, ip->i_file);
|
||||||
len = current_len = strlen(buf);
|
len = current_len = strlen(buf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buf[0] = ' ';
|
buf[0] = ' ';
|
||||||
strcpy(buf+1, ip->i_file);
|
strncpy(buf+1, ip->i_file, BUFSIZ - 1);
|
||||||
current_len += len;
|
current_len += len;
|
||||||
}
|
}
|
||||||
fwrite(buf, len, 1, stdout);
|
fwrite(buf, len, 1, stdout);
|
||||||
|
|
|
@ -261,8 +261,8 @@ static void WriteHeader (tagline, phile, abi)
|
||||||
{
|
{
|
||||||
FILE* f;
|
FILE* f;
|
||||||
char* tmp;
|
char* tmp;
|
||||||
Table* t;
|
|
||||||
TableEnt* te;
|
|
||||||
static void (*headerproc[])() = {
|
static void (*headerproc[])() = {
|
||||||
DefaultWriteHeader, ArrayperWriteHeader,
|
DefaultWriteHeader, ArrayperWriteHeader,
|
||||||
IntelABIWriteHeader, IntelABIWriteHeader,
|
IntelABIWriteHeader, IntelABIWriteHeader,
|
||||||
|
@ -284,11 +284,14 @@ static void WriteHeader (tagline, phile, abi)
|
||||||
if (strcmp (prefixstr, "Xm") == 0) {
|
if (strcmp (prefixstr, "Xm") == 0) {
|
||||||
if ((fileprotstr = malloc (strlen (phile->name) + 3)) == NULL)
|
if ((fileprotstr = malloc (strlen (phile->name) + 3)) == NULL)
|
||||||
exit (1);
|
exit (1);
|
||||||
(void) sprintf (fileprotstr, "_%s_", phile->name);
|
(void) snprintf (fileprotstr, strlen (phile->name) + 3,
|
||||||
|
"_%s_", phile->name);
|
||||||
} else {
|
} else {
|
||||||
if ((fileprotstr = malloc (strlen (phile->name) + strlen (prefixstr) + 3)) == NULL)
|
if ((fileprotstr = malloc (strlen (phile->name) + strlen (prefixstr) + 3)) == NULL)
|
||||||
exit (1);
|
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 = '_';
|
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",
|
(void) printf ("%s %sConst char %s%s[] = \"%s\";\n",
|
||||||
externdefstr, conststr ? conststr : prefixstr,
|
externdefstr, conststr ? conststr : prefixstr,
|
||||||
te->left, te->right);
|
prefixstr, te->left, te->right);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -520,7 +523,8 @@ static void DoLine(buf)
|
||||||
exit(1);
|
exit(1);
|
||||||
if ((phile->name = malloc (strlen (buf + strlen (file_str)) + 1)) == NULL)
|
if ((phile->name = malloc (strlen (buf + strlen (file_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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->table = NULL;
|
||||||
phile->tablecurrent = NULL;
|
phile->tablecurrent = NULL;
|
||||||
phile->tabletail = &phile->table;
|
phile->tabletail = &phile->table;
|
||||||
|
@ -539,7 +543,8 @@ static void DoLine(buf)
|
||||||
exit(1);
|
exit(1);
|
||||||
if ((table->name = malloc (strlen (buf + strlen (table_str)) + 1)) == NULL)
|
if ((table->name = malloc (strlen (buf + strlen (table_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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->tableent = NULL;
|
||||||
table->tableentcurrent = NULL;
|
table->tableentcurrent = NULL;
|
||||||
table->tableenttail = &table->tableent;
|
table->tableenttail = &table->tableent;
|
||||||
|
@ -554,27 +559,32 @@ static void DoLine(buf)
|
||||||
case X_PREFIX_TOKEN:
|
case X_PREFIX_TOKEN:
|
||||||
if ((prefixstr = malloc (strlen (buf + strlen (prefix_str)) + 1)) == NULL)
|
if ((prefixstr = malloc (strlen (buf + strlen (prefix_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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;
|
break;
|
||||||
case X_FEATURE_TOKEN:
|
case X_FEATURE_TOKEN:
|
||||||
if ((featurestr = malloc (strlen (buf + strlen (feature_str)) + 1)) == NULL)
|
if ((featurestr = malloc (strlen (buf + strlen (feature_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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;
|
break;
|
||||||
case X_EXTERNREF_TOKEN:
|
case X_EXTERNREF_TOKEN:
|
||||||
if ((externrefstr = malloc (strlen (buf + strlen (externref_str)) + 1)) == NULL)
|
if ((externrefstr = malloc (strlen (buf + strlen (externref_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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;
|
break;
|
||||||
case X_EXTERNDEF_TOKEN:
|
case X_EXTERNDEF_TOKEN:
|
||||||
if ((externdefstr = malloc (strlen (buf + strlen (externdef_str)) + 1)) == NULL)
|
if ((externdefstr = malloc (strlen (buf + strlen (externdef_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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;
|
break;
|
||||||
case X_CTMPL_TOKEN:
|
case X_CTMPL_TOKEN:
|
||||||
if ((ctmplstr = malloc (strlen (buf + strlen (ctmpl_str)) + 1)) == NULL)
|
if ((ctmplstr = malloc (strlen (buf + strlen (ctmpl_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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;
|
break;
|
||||||
case X_HTMPL_TOKEN:
|
case X_HTMPL_TOKEN:
|
||||||
if ((filecurrent->tmpl = fopen (buf + strlen (htmpl_str) + 1, "r")) == NULL) {
|
if ((filecurrent->tmpl = fopen (buf + strlen (htmpl_str) + 1, "r")) == NULL) {
|
||||||
|
@ -586,7 +596,8 @@ static void DoLine(buf)
|
||||||
case X_CONST_TOKEN:
|
case X_CONST_TOKEN:
|
||||||
if ((conststr = malloc (strlen (buf + strlen (const_str)) + 1)) == NULL)
|
if ((conststr = malloc (strlen (buf + strlen (const_str)) + 1)) == NULL)
|
||||||
exit(1);
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
@ -596,13 +607,13 @@ static void DoLine(buf)
|
||||||
int rlen;
|
int rlen;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (right = index(buf, ' '))
|
if ((right = index(buf, ' ')))
|
||||||
*right++ = 0;
|
*right++ = 0;
|
||||||
else
|
else
|
||||||
right = buf + 1;
|
right = buf + 1;
|
||||||
if (buf[0] == 'H') {
|
if (buf[0] == 'H') {
|
||||||
strcpy (lbuf, prefixstr);
|
strncpy (lbuf, prefixstr, 1024);
|
||||||
strcat (lbuf, right);
|
strncat (lbuf, right, strlen(right));
|
||||||
right = lbuf;
|
right = lbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -612,10 +623,10 @@ static void DoLine(buf)
|
||||||
if ((tableent = (TableEnt*)malloc(sizeof(TableEnt) + len)) == NULL)
|
if ((tableent = (TableEnt*)malloc(sizeof(TableEnt) + len)) == NULL)
|
||||||
exit(1);
|
exit(1);
|
||||||
tableent->left = (char *)(tableent + 1);
|
tableent->left = (char *)(tableent + 1);
|
||||||
strcpy(tableent->left, buf);
|
strncpy(tableent->left, buf, llen);
|
||||||
if (llen != len) {
|
if (llen != len) {
|
||||||
tableent->right = tableent->left + llen;
|
tableent->right = tableent->left + llen;
|
||||||
strcpy(tableent->right, right);
|
strncpy(tableent->right, right, rlen);
|
||||||
} else {
|
} else {
|
||||||
tableent->right = tableent->left + 1;
|
tableent->right = tableent->left + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,5 +84,3 @@ OBJS = \
|
||||||
$(TERMVIEW_OBJS)
|
$(TERMVIEW_OBJS)
|
||||||
|
|
||||||
#include <Library.tmpl>
|
#include <Library.tmpl>
|
||||||
|
|
||||||
DependTarget()
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ static char rcs_id[] = "$XConsortium: lineToData.c /main/1 1996/04/21 19:20:58 d
|
||||||
|
|
||||||
#include "TermPrimLineFontP.h"
|
#include "TermPrimLineFontP.h"
|
||||||
|
|
||||||
|
int getopt(int argc, char * const argv[], const char *optstring);
|
||||||
int ParseChar(char **str);
|
int ParseChar(char **str);
|
||||||
int parseCoord(char **str, char *val, signed char *offset);
|
int parseCoord(char **str, char *val, signed char *offset);
|
||||||
char * parseToken(char **str);
|
char * parseToken(char **str);
|
||||||
|
@ -60,20 +61,13 @@ main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
int charNum = 0;
|
|
||||||
char buffer[BUFSIZ];
|
char buffer[BUFSIZ];
|
||||||
char *bufPtr;
|
char *bufPtr;
|
||||||
char orig[BUFSIZ];
|
char orig[BUFSIZ];
|
||||||
register int i;
|
register int i;
|
||||||
register char *c;
|
register char *c;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
FILE *tmp;
|
|
||||||
extern int getopt();
|
|
||||||
extern int optind;
|
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int opterr;
|
|
||||||
int resolution = 75; /* dots per inch */
|
|
||||||
int points;
|
|
||||||
char *prefix = "_Term";
|
char *prefix = "_Term";
|
||||||
|
|
||||||
charType *charList = (charType *) 0;
|
charType *charList = (charType *) 0;
|
||||||
|
@ -99,8 +93,6 @@ char **argv;
|
||||||
int charCount = 0; /* total number of chars in font*/
|
int charCount = 0; /* total number of chars in font*/
|
||||||
|
|
||||||
char *datafilename = "linegen.data";
|
char *datafilename = "linegen.data";
|
||||||
int dummyInt;
|
|
||||||
int error;
|
|
||||||
|
|
||||||
while (EOF != (i = getopt(argc, argv, "p:f:"))) {
|
while (EOF != (i = getopt(argc, argv, "p:f:"))) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
|
@ -139,7 +131,7 @@ char **argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* back up buffer... */
|
/* back up buffer... */
|
||||||
(void) strcpy(orig, buffer);
|
(void) strncpy(orig, buffer, BUFSIZ);
|
||||||
|
|
||||||
bufPtr = buffer;
|
bufPtr = buffer;
|
||||||
|
|
||||||
|
@ -734,20 +726,20 @@ vis(char val)
|
||||||
{
|
{
|
||||||
char buffer[BUFSIZ];
|
char buffer[BUFSIZ];
|
||||||
|
|
||||||
if (isprint(val)) {
|
if (isprint((int)val)) {
|
||||||
if (val == '^') {
|
if (val == '^') {
|
||||||
(void) strcpy(buffer, "'^^'");
|
(void) strncpy(buffer, "'^^'", BUFSIZ);
|
||||||
} else if (val == '\\') {
|
} else if (val == '\\') {
|
||||||
(void) strcpy(buffer, "'\\\\'");
|
(void) strncpy(buffer, "'\\\\'", BUFSIZ);
|
||||||
} else if (val == '\'') {
|
} else if (val == '\'') {
|
||||||
(void) strcpy(buffer, "'\\\''");
|
(void) strncpy(buffer, "'\\\''", BUFSIZ);
|
||||||
} else {
|
} else {
|
||||||
(void) sprintf(buffer, "'%c'", val);
|
(void) snprintf(buffer, BUFSIZ, "'%c'", val);
|
||||||
}
|
}
|
||||||
} else if (iscntrl(val)) {
|
} else if (iscntrl((int)val)) {
|
||||||
(void) sprintf(buffer, "'^%c'", val);
|
(void) snprintf(buffer, BUFSIZ, "'^%c'", val);
|
||||||
} else {
|
} else {
|
||||||
(void) sprintf(buffer, "'\\%03o'", val);
|
(void) snprintf(buffer, BUFSIZ, "'\\%03o'", val);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(strdup(buffer));
|
return(strdup(buffer));
|
||||||
|
|
|
@ -53,7 +53,7 @@ SRCS = agent.c agent_xdr.c api.c \
|
||||||
entry.c free.c hash.c \
|
entry.c free.c hash.c \
|
||||||
iso8601.c laccess.c lutil.c \
|
iso8601.c laccess.c lutil.c \
|
||||||
match.c nametbl.c refree.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 \
|
rtable2_clnt.c rtable2_xdr.c rtable3_clnt.c \
|
||||||
rtable3_xdr.c rtable4_clnt.c rtable4_xdr.c \
|
rtable3_xdr.c rtable4_clnt.c rtable4_xdr.c \
|
||||||
table.c updateattrs.c xtclient.c \
|
table.c updateattrs.c xtclient.c \
|
||||||
|
|
|
@ -211,4 +211,6 @@ OBJS = $(OBJS_1) $(OBJS_2) $(OBJS_3)
|
||||||
|
|
||||||
#include <Library.tmpl>
|
#include <Library.tmpl>
|
||||||
|
|
||||||
|
#if defined(RsArchitecture) || defined(AlphaArchitecture)
|
||||||
DependTarget()
|
DependTarget()
|
||||||
|
#endif
|
||||||
|
|
|
@ -24,7 +24,7 @@ XCOMM (c) Copyright 1996 Hitachi.
|
||||||
* So, when 'all' is made in this directory, redo make includes/depend.
|
* So, when 'all' is made in this directory, redo make includes/depend.
|
||||||
* An imake hack no doubt, but it is necessary for now.
|
* An imake hack no doubt, but it is necessary for now.
|
||||||
*/
|
*/
|
||||||
all:: generated_includes depend
|
all:: generated_includes abdepend
|
||||||
|
|
||||||
#include "../ab.tmpl"
|
#include "../ab.tmpl"
|
||||||
#include "../ab.rules"
|
#include "../ab.rules"
|
||||||
|
@ -174,6 +174,18 @@ SOURCES.msg = \
|
||||||
../libABobjXm/libABobjXm.msg \
|
../libABobjXm/libABobjXm.msg \
|
||||||
../libABil/libABil.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
|
#ifndef UngeneratedSource
|
||||||
#define UngeneratedSource(macro, suffix) @@\
|
#define UngeneratedSource(macro, suffix) @@\
|
||||||
macro = \ @@\
|
macro = \ @@\
|
||||||
|
@ -240,8 +252,8 @@ Concat(x_util,suffix)
|
||||||
UngeneratedSource(NONTGTS.c,.c)
|
UngeneratedSource(NONTGTS.c,.c)
|
||||||
UngeneratedSource(NONTGTS.o,.o)
|
UngeneratedSource(NONTGTS.o,.o)
|
||||||
|
|
||||||
SRCS = $(TARGETS.c) $(TARGETS.c.stubs) $(NONTGTS.c)
|
SRCS2 = $(TARGETS.c) $(TARGETS.c.stubs) $(NONTGTS.c)
|
||||||
OBJS = $(TARGETS.o) $(TARGETS.o.stubs) $(NONTGTS.o)
|
OBJS2 = $(TARGETS.o) $(TARGETS.o.stubs) $(NONTGTS.o)
|
||||||
|
|
||||||
SYS_LIBRARIES = -lm $(ICONVSYSLIB) $(DYNLIBSYSLIB) $(REGEXSYSLIB)
|
SYS_LIBRARIES = -lm $(ICONVSYSLIB) $(DYNLIBSYSLIB) $(REGEXSYSLIB)
|
||||||
|
|
||||||
|
@ -276,7 +288,10 @@ LOCAL_LIBRARIES = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \
|
||||||
$(TTLIB) $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
|
$(TTLIB) $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
|
||||||
$(UTILLIB)
|
$(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.
|
XCOMM dtcodegen wants to rewrite some files, so we make copies for it.
|
||||||
dtbuilder.msg: dtbuilder.msg.src
|
dtbuilder.msg: dtbuilder.msg.src
|
||||||
|
@ -286,7 +301,17 @@ dtbuilder.c: dtbuilder.c.src
|
||||||
|
|
||||||
includes:: dtbuilder.msg dtbuilder.c
|
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)
|
AbMessageCatalogTarget(dtbuilder)
|
||||||
|
|
||||||
|
@ -294,7 +319,7 @@ XCOMM Try to replace the original dtbuilder.msg.src file if necessary.
|
||||||
all:: dtbuilder dtbuilder.cat
|
all:: dtbuilder dtbuilder.cat
|
||||||
|
|
||||||
clean::
|
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),)
|
CppSourceFile(Dtbuilder,Dtbuilder.src,$(LOCAL_CPP_DEFINES),)
|
||||||
|
|
||||||
|
|
|
@ -101,25 +101,24 @@ static int write_os_params(
|
||||||
static int write_aix_stuff(File makeFile, AbmfLibs libs);
|
static int write_aix_stuff(File makeFile, AbmfLibs libs);
|
||||||
static int write_hpux_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_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_uxp_params(File makeFile, AbmfLibs libs);
|
||||||
static int write_osf1_stuff(File makeFile, AbmfLibs libs);
|
static int write_osf1_stuff(File makeFile, AbmfLibs libs);
|
||||||
|
static int write_lnx_params(File makeFile, AbmfLibs libs);
|
||||||
#ifdef USL
|
static int write_fbsd_params(File makeFile, AbmfLibs libs);
|
||||||
/*
|
static int write_nbsd_params(File makeFile, AbmfLibs libs);
|
||||||
* USL specific changes were added ifdef USL due to time constraints
|
static int write_obsd_params(File makeFile, AbmfLibs libs);
|
||||||
* These ifdefs should be removed in the next release
|
|
||||||
*/
|
|
||||||
static int write_unixware_params(File makeFile, AbmfLibs libs);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int determine_aix_libs(AbmfLibs libs, ABObj project);
|
static int determine_aix_libs(AbmfLibs libs, ABObj project);
|
||||||
static int determine_hpux_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_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_uxp_libs(AbmfLibs libs, ABObj project);
|
||||||
static int determine_osf1_libs(AbmfLibs libs, ABObj project);
|
static int determine_osf1_libs(AbmfLibs libs, ABObj project);
|
||||||
#ifdef USL
|
static int determine_lnx_libs(AbmfLibs libs, ABObj project);
|
||||||
static int determine_unixware_libs(AbmfLibs libs, ABObj project);
|
static int determine_fbsd_libs(AbmfLibs libs, ABObj project);
|
||||||
#endif
|
static int determine_nbsd_libs(AbmfLibs libs, ABObj project);
|
||||||
|
static int determine_obsd_libs(AbmfLibs libs, ABObj project);
|
||||||
|
|
||||||
static int write_file_header(
|
static int write_file_header(
|
||||||
GenCodeInfo genCodeInfo,
|
GenCodeInfo genCodeInfo,
|
||||||
|
@ -239,14 +238,24 @@ determine_libs(AbmfLibs libs, ABObj project, AB_OS_TYPE osType)
|
||||||
case AB_OS_OSF1:
|
case AB_OS_OSF1:
|
||||||
return_value = determine_osf1_libs(libs, project);
|
return_value = determine_osf1_libs(libs, project);
|
||||||
break;
|
break;
|
||||||
#ifdef USL
|
|
||||||
case AB_OS_UNIXWARE:
|
case AB_OS_UNIXWARE:
|
||||||
return_value = determine_unixware_libs(libs, project);
|
return_value = determine_unixware_libs(libs, project);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case AB_OS_UXP:
|
case AB_OS_UXP:
|
||||||
return_value = determine_uxp_libs(libs, project);
|
return_value = determine_uxp_libs(libs, project);
|
||||||
break;
|
break;
|
||||||
|
case AB_OS_LNX:
|
||||||
|
return_value = determine_lnx_libs(libs, project);
|
||||||
|
break;
|
||||||
|
case AB_OS_FBSD:
|
||||||
|
return_value = determine_fbsd_libs(libs, project);
|
||||||
|
break;
|
||||||
|
case AB_OS_NBSD:
|
||||||
|
return_value = determine_nbsd_libs(libs, project);
|
||||||
|
break;
|
||||||
|
case AB_OS_OBSD:
|
||||||
|
return_value = determine_obsd_libs(libs, project);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return return_value;
|
return return_value;
|
||||||
|
@ -288,13 +297,35 @@ determine_osf1_libs(AbmfLibs libs, ABObj project)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USL
|
|
||||||
static int
|
static int
|
||||||
determine_unixware_libs(AbmfLibs libs, ABObj project)
|
determine_unixware_libs(AbmfLibs libs, ABObj project)
|
||||||
{
|
{
|
||||||
return 0;
|
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
|
static STRING
|
||||||
get_string_for_lib(AbmfLibDesc lib, AB_OS_TYPE osType)
|
get_string_for_lib(AbmfLibDesc lib, AB_OS_TYPE osType)
|
||||||
|
@ -491,6 +522,10 @@ write_os_params(
|
||||||
return_value = write_sunos_params(makeFile, libs);
|
return_value = write_sunos_params(makeFile, libs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case AB_OS_UNIXWARE:
|
||||||
|
return_value = write_unixware_params(makeFile, libs);
|
||||||
|
break;
|
||||||
|
|
||||||
case AB_OS_UXP:
|
case AB_OS_UXP:
|
||||||
return_value = write_uxp_params(makeFile, libs);
|
return_value = write_uxp_params(makeFile, libs);
|
||||||
break;
|
break;
|
||||||
|
@ -499,11 +534,21 @@ write_os_params(
|
||||||
return_value = write_osf1_stuff(makeFile, libs);
|
return_value = write_osf1_stuff(makeFile, libs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef USL
|
case AB_OS_LNX:
|
||||||
case AB_OS_UNIXWARE:
|
return_value = write_lnx_params(makeFile, libs);
|
||||||
return_value = write_unixware_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;
|
break;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return return_value;
|
return return_value;
|
||||||
|
@ -732,7 +777,6 @@ write_osf1_stuff(File makeFile, AbmfLibs libs)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USL
|
|
||||||
static int
|
static int
|
||||||
write_unixware_params(File makeFile, AbmfLibs libs)
|
write_unixware_params(File makeFile, AbmfLibs libs)
|
||||||
{
|
{
|
||||||
|
@ -774,7 +818,185 @@ write_unixware_params(File makeFile, AbmfLibs libs)
|
||||||
return 0;
|
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
|
static int
|
||||||
write_local_libraries(
|
write_local_libraries(
|
||||||
|
@ -1112,8 +1334,10 @@ write_targets(
|
||||||
" $(RM) $(CLEAN_FILES)\n"
|
" $(RM) $(CLEAN_FILES)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"scour:\n"
|
"scour:\n"
|
||||||
" $(RM) $(CLEAN_FILES) $(TARGETS.h.merged) $(TARGETS.c.merged) Makefile Makefile.aix Makefile.hpux Makefile.sunos \\\n"
|
" $(RM) $(CLEAN_FILES) $(TARGETS.h.merged) $(TARGETS.c.merged) \\\n"
|
||||||
" Makefile.osf1\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;
|
return 0;
|
||||||
|
|
|
@ -249,18 +249,14 @@ util_get_os_type(void)
|
||||||
struct utsname sysInfo;
|
struct utsname sysInfo;
|
||||||
int aixIndex = -1;
|
int aixIndex = -1;
|
||||||
int hpIndex = -1;
|
int hpIndex = -1;
|
||||||
|
int sunIndex = -1;
|
||||||
|
int unixwareIndex = -1;
|
||||||
int uxpIndex = -1;
|
int uxpIndex = -1;
|
||||||
int osf1Index = -1;
|
int osf1Index = -1;
|
||||||
|
int lnxIndex = -1;
|
||||||
#ifdef USL
|
int fbsdIndex = -1;
|
||||||
/*
|
int nbsdIndex = -1;
|
||||||
* These changes were made ifdef USL due to time constraint.
|
int obsdIndex = -1;
|
||||||
* ifdefs should be removed in next release
|
|
||||||
*/
|
|
||||||
int unixwareIndex = -1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int sunIndex = -1;
|
|
||||||
|
|
||||||
if (osTypeDefined)
|
if (osTypeDefined)
|
||||||
{
|
{
|
||||||
|
@ -274,86 +270,80 @@ util_get_os_type(void)
|
||||||
aixIndex = util_strcasestr(sysInfo.sysname, "aix");
|
aixIndex = util_strcasestr(sysInfo.sysname, "aix");
|
||||||
hpIndex = util_strcasestr(sysInfo.sysname, "hp");
|
hpIndex = util_strcasestr(sysInfo.sysname, "hp");
|
||||||
sunIndex = util_strcasestr(sysInfo.sysname, "sun");
|
sunIndex = util_strcasestr(sysInfo.sysname, "sun");
|
||||||
|
unixwareIndex = util_strcasestr(sysInfo.sysname, "UNIX_SV");
|
||||||
uxpIndex = util_strcasestr(sysInfo.sysname, "UNIX_System_V");
|
uxpIndex = util_strcasestr(sysInfo.sysname, "UNIX_System_V");
|
||||||
osf1Index = util_strcasestr(sysInfo.sysname, "osf1");
|
osf1Index = util_strcasestr(sysInfo.sysname, "osf1");
|
||||||
|
lnxIndex = util_strcasestr(sysInfo.sysname, "linux");
|
||||||
#ifdef USL
|
fbsdIndex = util_strcasestr(sysInfo.sysname, "freebsd");
|
||||||
/*
|
nbsdIndex = util_strcasestr(sysInfo.sysname, "netbsd");
|
||||||
* These changes were made ifdef USL due to time constraint.
|
obsdIndex = util_strcasestr(sysInfo.sysname, "openbsd");
|
||||||
* ifdefs should be removed in next release
|
|
||||||
*/
|
|
||||||
unixwareIndex = util_strcasestr(sysInfo.sysname, "UNIX_SV");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (aixIndex < 0) aixIndex = INT_MAX;
|
if (aixIndex < 0) aixIndex = INT_MAX;
|
||||||
if (hpIndex < 0) hpIndex = INT_MAX;
|
if (hpIndex < 0) hpIndex = INT_MAX;
|
||||||
if (sunIndex < 0) sunIndex = INT_MAX;
|
if (sunIndex < 0) sunIndex = INT_MAX;
|
||||||
|
if (unixwareIndex < 0) unixwareIndex = INT_MAX;
|
||||||
if (uxpIndex < 0) uxpIndex = INT_MAX;
|
if (uxpIndex < 0) uxpIndex = INT_MAX;
|
||||||
if (osf1Index < 0) osf1Index = 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
|
#define IS_MATCH(a,b,c,d,e,f,g,h,i,j) \
|
||||||
/*
|
(((a) < (b)) && ((a) < (c)) && ((a) < (d)) && ((a) < (e)) && ((a) < (f)) && \
|
||||||
* These changes were made ifdef USL due to time constraint.
|
((a) < (g)) && ((a) < (h)) && ((a) < (i)) && ((a) < (j)))
|
||||||
* ifdefs should be removed in next release
|
|
||||||
*/
|
|
||||||
if (unixwareIndex < 0) unixwareIndex = INT_MAX;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef USL
|
if (IS_MATCH(aixIndex, hpIndex, sunIndex, osf1Index, unixwareIndex,
|
||||||
|
uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
|
||||||
#define IS_MATCH(a,b,c,d,e) \
|
|
||||||
(((a) < (b)) && ((a) < (c)) && ((a) < (d))&& ((a) < (e)))
|
|
||||||
|
|
||||||
if (IS_MATCH(aixIndex, hpIndex, sunIndex, osf1Index, uxpIndex))
|
|
||||||
{
|
{
|
||||||
return AB_OS_AIX;
|
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;
|
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;
|
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;
|
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;
|
return AB_OS_UXP;
|
||||||
}
|
}
|
||||||
|
if (IS_MATCH(unixwareIndex, aixIndex, hpIndex, sunIndex, osf1Index,
|
||||||
#else
|
uxpIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex))
|
||||||
#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))
|
|
||||||
{
|
{
|
||||||
return AB_OS_UNIXWARE;
|
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;
|
osTypeDefined = TRUE;
|
||||||
|
|
||||||
epilogue:
|
epilogue:
|
||||||
|
|
|
@ -82,10 +82,12 @@ typedef enum
|
||||||
AB_OS_AIX,
|
AB_OS_AIX,
|
||||||
AB_OS_SUNOS,
|
AB_OS_SUNOS,
|
||||||
AB_OS_OSF1,
|
AB_OS_OSF1,
|
||||||
#ifdef USL
|
|
||||||
AB_OS_UNIXWARE,
|
AB_OS_UNIXWARE,
|
||||||
#endif
|
|
||||||
AB_OS_UXP,
|
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_NUM_VALUES /* must be last */
|
||||||
} AB_OS_TYPE;
|
} AB_OS_TYPE;
|
||||||
|
|
||||||
|
|
|
@ -854,16 +854,13 @@ util_os_type_to_ident(AB_OS_TYPE osType)
|
||||||
case AB_OS_AIX: typeString = "aix"; break;
|
case AB_OS_AIX: typeString = "aix"; break;
|
||||||
case AB_OS_HPUX: typeString = "hpux"; break;
|
case AB_OS_HPUX: typeString = "hpux"; break;
|
||||||
case AB_OS_SUNOS: typeString = "sunos"; 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_UXP: typeString = "uxp"; break;
|
||||||
case AB_OS_OSF1: typeString = "osf1"; break;
|
case AB_OS_OSF1: typeString = "osf1"; break;
|
||||||
|
case AB_OS_LNX: typeString = "linux"; break;
|
||||||
#ifdef USL
|
case AB_OS_FBSD: typeString = "freebsd"; break;
|
||||||
/*
|
case AB_OS_NBSD: typeString = "netbsd"; break;
|
||||||
* The USL specific changes were made ifdef USL due to time constraint
|
case AB_OS_OBSD: typeString = "openbsd"; break;
|
||||||
* They should be removed in the next release
|
|
||||||
*/
|
|
||||||
case AB_OS_UNIXWARE: typeString = "unixware"; break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return typeString;
|
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_AIX: nameString = "AIX"; break;
|
||||||
case AB_OS_HPUX: nameString = "HP-UX"; break;
|
case AB_OS_HPUX: nameString = "HP-UX"; break;
|
||||||
case AB_OS_SUNOS: nameString = "SunOS"; 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_UXP: nameString = "UXP"; break;
|
||||||
case AB_OS_OSF1: nameString = "OSF/1"; 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;
|
return nameString;
|
||||||
|
|
|
@ -50,7 +50,7 @@ EXTRA_LIBRARIES = -lsocket -lnsl -lintl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SRCS = \
|
SRCS = \
|
||||||
parser.y access.c callback.c \
|
parser.c access.c callback.c \
|
||||||
cmscalendar.c cmsconvert.c cmsentry.c \
|
cmscalendar.c cmsconvert.c cmsentry.c \
|
||||||
cmsmatch.c delete.c garbage.c \
|
cmsmatch.c delete.c garbage.c \
|
||||||
insert.c lexit.c list.c \
|
insert.c lexit.c list.c \
|
||||||
|
@ -91,6 +91,8 @@ NormalProgramTarget($(PROGRAM),$(OBJS),,$(LOCAL_LIBRARIES),)
|
||||||
|
|
||||||
parser.o: parser.c
|
parser.o: parser.c
|
||||||
|
|
||||||
|
includes:: parser.c
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
$(RM) parser.c
|
$(RM) parser.c
|
||||||
$(_NULLCMD_) > parser.h
|
$(_NULLCMD_) > parser.h
|
||||||
|
|
|
@ -41,7 +41,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
#include "entdef.h"
|
#include "entdef.h"
|
||||||
|
|
||||||
/* Main procedure */
|
/* Main procedure */
|
||||||
void main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc ;
|
int argc ;
|
||||||
char **argv ;
|
char **argv ;
|
||||||
{
|
{
|
||||||
|
@ -67,8 +67,9 @@ while (TRUE)
|
||||||
if (scantrace)
|
if (scantrace)
|
||||||
printf(
|
printf(
|
||||||
"m_prevcon=%d, m_token=%d, curcon=%d, scanval = %c (%d), line=%d\n",
|
"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"
|
#include "case.c"
|
||||||
if (m_token == ENDFILE) exit(FALSE) ;
|
if (m_token == ENDFILE) exit(FALSE) ;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ LOGICAL *flag;
|
||||||
char *delim;
|
char *delim;
|
||||||
{
|
{
|
||||||
M_WCHAR wcbuff[129];
|
M_WCHAR wcbuff[129];
|
||||||
size_t length;
|
ssize_t length;
|
||||||
|
|
||||||
wcbuff[128] = 0;
|
wcbuff[128] = 0;
|
||||||
length = mbstowcs(wcbuff,delim,128);
|
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, "MARKUP System - BUILD %s\n", M_VERSION) ;
|
||||||
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
|
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
|
||||||
if (! standard)
|
if (! standard)
|
||||||
warning("Warning: optional enhancements of SGML enabled.") ;
|
warning("Info: optional enhancements of SGML enabled.") ;
|
||||||
|
|
||||||
mb_delims = mb_dlmptr;
|
mb_delims = mb_dlmptr;
|
||||||
wc_delims = m_dlmptr;
|
wc_delims = m_dlmptr;
|
||||||
|
@ -112,7 +112,7 @@ void ruleinit(M_NOPAR)
|
||||||
/* Rule end processing */
|
/* Rule end processing */
|
||||||
void rulend(M_NOPAR)
|
void rulend(M_NOPAR)
|
||||||
{
|
{
|
||||||
STATE *fsa ;
|
STATE *fsa = NULL ;
|
||||||
LOGICAL canbenull ;
|
LOGICAL canbenull ;
|
||||||
LHS *lhsp ;
|
LHS *lhsp ;
|
||||||
LHS *discard ;
|
LHS *discard ;
|
||||||
|
@ -153,7 +153,7 @@ void rulend(M_NOPAR)
|
||||||
void skiptoend(M_NOPAR)
|
void skiptoend(M_NOPAR)
|
||||||
{
|
{
|
||||||
int i ;
|
int i ;
|
||||||
static errlev = 0 ;
|
static int errlev = 0 ;
|
||||||
|
|
||||||
if (! errlev++) {
|
if (! errlev++) {
|
||||||
curcon = ERROR ;
|
curcon = ERROR ;
|
||||||
|
|
|
@ -42,7 +42,7 @@ ELTSTRUCT *ntrelt(p)
|
||||||
int length ;
|
int length ;
|
||||||
|
|
||||||
new = (ELTSTRUCT *) m_malloc(sizeof(ELTSTRUCT), "element structure") ;
|
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") ;
|
m_free((M_POINTER) new, "element structure") ;
|
||||||
return(old) ;
|
return(old) ;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ ELTSTRUCT *ntrelt(p)
|
||||||
w_strcpy(new->enptr, p) ;
|
w_strcpy(new->enptr, p) ;
|
||||||
new->model = M_NULLVAL ;
|
new->model = M_NULLVAL ;
|
||||||
new->content = M_NULLVAL ;
|
new->content = M_NULLVAL ;
|
||||||
new->inptr = new->exptr = NULL ;
|
new->inptr = new->exptr = 0 ;
|
||||||
new->parptr = NULL ;
|
new->parptr = NULL ;
|
||||||
new->parindex = M_NULLVAL ;
|
new->parindex = M_NULLVAL ;
|
||||||
new->paramcount = M_NULLVAL ;
|
new->paramcount = M_NULLVAL ;
|
||||||
|
|
|
@ -85,11 +85,11 @@ void checkand(andstart, andptr, start, root, errelt)
|
||||||
for (pand = parc->group ; pand ; pand = pand->next)
|
for (pand = parc->group ; pand ; pand = pand->next)
|
||||||
checkand(andstart, andptr, pand->start, root, errelt) ;
|
checkand(andstart, andptr, pand->start, root, errelt) ;
|
||||||
}
|
}
|
||||||
else if (c = checkdfsa(andptr->start,
|
else if ((c = checkdfsa(andptr->start,
|
||||||
parc->label,
|
parc->label,
|
||||||
parc->group,
|
parc->group,
|
||||||
parc->id,
|
parc->id,
|
||||||
errelt))
|
errelt)))
|
||||||
nondeterm(root, c, *errelt) ;
|
nondeterm(root, c, *errelt) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ int checkdfsa(from, label, and, id, errelt)
|
||||||
if (parc->group) {
|
if (parc->group) {
|
||||||
if (and == parc->group) return(ANDCONFLICT) ;
|
if (and == parc->group) return(ANDCONFLICT) ;
|
||||||
for (group = parc->group ; group ; group = group->next)
|
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) ;
|
return(c) ;
|
||||||
}
|
}
|
||||||
else if (! and && label == parc->label && parc->id != id) {
|
else if (! and && label == parc->label && parc->id != id) {
|
||||||
|
@ -138,14 +138,14 @@ int checkrepeat(from, and, errelt)
|
||||||
for (; and ; and = and->next)
|
for (; and ; and = and->next)
|
||||||
for (parc = and->start->first ; parc ; parc = parc->next) {
|
for (parc = and->start->first ; parc ; parc = parc->next) {
|
||||||
if (parc->group)
|
if (parc->group)
|
||||||
if (c = checkrepeat(from, parc->group, errelt)) return(c) ;
|
if ((c = checkrepeat(from, parc->group, errelt))) return(c) ;
|
||||||
else ;
|
else ;
|
||||||
else
|
else
|
||||||
if (c = checkdfsa(from,
|
if ((c = checkdfsa(from,
|
||||||
parc->label,
|
parc->label,
|
||||||
M_NULLVAL,
|
M_NULLVAL,
|
||||||
parc->id,
|
parc->id,
|
||||||
errelt))
|
errelt)))
|
||||||
return(c) ;
|
return(c) ;
|
||||||
else ;
|
else ;
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ void makeand(canbenull, root, optional)
|
||||||
TREE *child ;
|
TREE *child ;
|
||||||
STATELIST *start, *final ;
|
STATELIST *start, *final ;
|
||||||
LOGICAL groupbenull ;
|
LOGICAL groupbenull ;
|
||||||
ANDGROUP *andptr, *saveand, *otherand ;
|
ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
|
||||||
STATELIST *index ;
|
STATELIST *index ;
|
||||||
ELTSTRUCT *errelt ;
|
ELTSTRUCT *errelt ;
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ void repeat(root)
|
||||||
for (a = top->starta ; a ; a = a->next) {
|
for (a = top->starta ; a ; a = a->next) {
|
||||||
for (final = top->allfinal ; final ; final = final->next) {
|
for (final = top->allfinal ; final ; final = final->next) {
|
||||||
if (a->group)
|
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);
|
wtemp = MakeWideCharString(root->occurrence == PLUS ? plus : rep);
|
||||||
warning1("Conflict in use of %s", wtemp);
|
warning1("Conflict in use of %s", wtemp);
|
||||||
m_free(wtemp, "wide character string");
|
m_free(wtemp, "wide character string");
|
||||||
|
@ -588,11 +588,11 @@ void repeat(root)
|
||||||
else
|
else
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
if (c = checkdfsa(final->value,
|
if ((c = checkdfsa(final->value,
|
||||||
a->label,
|
a->label,
|
||||||
a->group,
|
a->group,
|
||||||
a->id,
|
a->id,
|
||||||
&errelt))
|
&errelt)))
|
||||||
nondeterm (root, c, errelt) ;
|
nondeterm (root, c, errelt) ;
|
||||||
else
|
else
|
||||||
;
|
;
|
||||||
|
@ -600,14 +600,14 @@ void repeat(root)
|
||||||
for (final = top->finals ; final ; final = final->next) {
|
for (final = top->finals ; final ; final = final->next) {
|
||||||
if (samelabelarc(a, final->value)) continue ;
|
if (samelabelarc(a, final->value)) continue ;
|
||||||
if (a->group)
|
if (a->group)
|
||||||
if (c = checkrepeat(final->value, a->group, &errelt))
|
if ((c = checkrepeat(final->value, a->group, &errelt)))
|
||||||
nondeterm(root, c, errelt) ;
|
nondeterm(root, c, errelt) ;
|
||||||
if (a->label ||
|
if (a->label ||
|
||||||
a->group ||
|
a->group ||
|
||||||
! final->value->frompcdata) {
|
! 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->group, TRUE, a->id,
|
||||||
a->minim, &errelt))
|
a->minim, &errelt)))
|
||||||
nondeterm(root, c, errelt) ;
|
nondeterm(root, c, errelt) ;
|
||||||
if (permitspcd(a)) final->value->datacontent = TRUE ;
|
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
|
states of and-groups that terminate at the start state of the new
|
||||||
arc */
|
arc */
|
||||||
for (index = top->allfinal ; index ; index = index->next)
|
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) ;
|
nondeterm(root, c, errelt) ;
|
||||||
for (index = top->starts ; index ; index = index->next) {
|
for (index = top->starts ; index ; index = index->next) {
|
||||||
if (! group && ! value && index->value->frompcdata)
|
if (! group && ! value && index->value->frompcdata)
|
||||||
|
|
|
@ -31,6 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
#if defined(MSDOS)
|
#if defined(MSDOS)
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,7 +196,7 @@ void eltreeout(M_NOPAR)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = eltp->enptr ; *p ; p++)
|
for (p = eltp->enptr ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -211,14 +212,14 @@ void eltreeout(M_NOPAR)
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
if (! eltp->content)
|
if (! eltp->content)
|
||||||
warning1("No content model for element %s", eltp->enptr) ;
|
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,
|
enameindex, eltp->model ? eltp->model->count : 0,
|
||||||
typecon(eltp->content)) ;
|
typecon(eltp->content)) ;
|
||||||
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
|
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
|
||||||
fprintf(dtd, "%d, %d, %d",
|
fprintf(dtd, "%d, %d, %d",
|
||||||
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
|
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
|
||||||
enameindex += w_strlen(eltp->enptr) + 1 ;
|
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)) ;
|
boolean(eltp->stmin), boolean(eltp->etmin), boolean(eltp->useoradd)) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -259,7 +260,7 @@ void exout(M_NOPAR)
|
||||||
if (! first) fputs(",\n", dtd) ;
|
if (! first) fputs(",\n", dtd) ;
|
||||||
first = FALSE ;
|
first = FALSE ;
|
||||||
exindex++ ;
|
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) ;
|
fputs(ndif, dtd) ;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +295,7 @@ void fsa(M_NOPAR)
|
||||||
for (pstate = firststate ; pstate ; pstate = pstate->next) {
|
for (pstate = firststate ; pstate ; pstate = pstate->next) {
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd, " %s, %s, %d",
|
fprintf(dtd, " {%s, %s, %d}",
|
||||||
boolean(pstate->final), boolean(pstate->datacontent),
|
boolean(pstate->final), boolean(pstate->datacontent),
|
||||||
pstate->first ? ++arcount : 0) ;
|
pstate->first ? ++arcount : 0) ;
|
||||||
for (parc = pstate->first ; parc ; parc = parc->next) {
|
for (parc = pstate->first ; parc ; parc = parc->next) {
|
||||||
|
@ -319,7 +320,7 @@ void fsa(M_NOPAR)
|
||||||
for (pand = firstand ; pand ; pand = pand->nextptr) {
|
for (pand = firstand ; pand ; pand = pand->nextptr) {
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd, " %d, %d",
|
fprintf(dtd, " {%d, %d}",
|
||||||
pand->start->count,
|
pand->start->count,
|
||||||
pand->next ? pand->next->count : M_NULLVAL) ;
|
pand->next ? pand->next->count : M_NULLVAL) ;
|
||||||
}
|
}
|
||||||
|
@ -352,7 +353,7 @@ if (kwlen)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = ptypep->keyword ; *p ; p++)
|
for (p = ptypep->keyword ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -372,7 +373,7 @@ if (deflen)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = paramp->defstring ; *p ; p++)
|
for (p = paramp->defstring ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -392,7 +393,7 @@ if (ptypelen)
|
||||||
{
|
{
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fprintf(dtd, ",\n") ;
|
else fprintf(dtd, ",\n") ;
|
||||||
fprintf(dtd, " %d, %d", kw, ptypep->next) ;
|
fprintf(dtd, " {%d, %d}", kw, ptypep->next) ;
|
||||||
kw += w_strlen(ptypep->keyword) + 1 ;
|
kw += w_strlen(ptypep->keyword) + 1 ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -412,21 +413,21 @@ if (parcount)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd,
|
fprintf(dtd,
|
||||||
" %d, %s, %d, %s, ",
|
" {%d, %s, %d, %s, ",
|
||||||
pnameindex,
|
pnameindex,
|
||||||
partype(paramp->type),
|
partype(paramp->type),
|
||||||
paramp->kwlist,
|
paramp->kwlist,
|
||||||
deftype(paramp->deftype)) ;
|
deftype(paramp->deftype)) ;
|
||||||
pnameindex += w_strlen(paramp->paramname) + 1 ;
|
pnameindex += w_strlen(paramp->paramname) + 1 ;
|
||||||
if (paramp->defval)
|
if (paramp->defval)
|
||||||
fprintf(dtd, "&m_keyword[%d]", paramp->defval - 1) ;
|
fprintf(dtd, "&m_keyword[%d]}", paramp->defval - 1) ;
|
||||||
else if (paramp->defstring)
|
else if (paramp->defstring)
|
||||||
{
|
{
|
||||||
fprintf(dtd, "&m_defval[%d]", defindex) ;
|
fprintf(dtd, "&m_defval[%d]}", defindex) ;
|
||||||
defindex += w_strlen(paramp->defstring) + 1 ;
|
defindex += w_strlen(paramp->defstring) + 1 ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fputs("NULL", dtd) ;
|
fputs("NULL}", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +444,7 @@ if (pnamelen)
|
||||||
{
|
{
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
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(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -534,10 +535,10 @@ void srefout(M_NOPAR)
|
||||||
count++ ;
|
count++ ;
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
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++)
|
for (j++ ; j < sreflen ; j++)
|
||||||
if (mapbysref[sreflen * i + j]) break ;
|
if (mapbysref[sreflen * i + j]) break ;
|
||||||
fprintf(dtd, "%d", j < sreflen ? count + 1 : 0) ;
|
fprintf(dtd, "%d}", j < sreflen ? count + 1 : 0) ;
|
||||||
}
|
}
|
||||||
else j++ ;
|
else j++ ;
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -557,7 +558,7 @@ char *mb_paramname;
|
||||||
int indent ;
|
int indent ;
|
||||||
int i ;
|
int i ;
|
||||||
|
|
||||||
fprintf(tempfile, "\n<ELEMENT %s>\n", eltp->enptr) ;
|
fprintf(tempfile, "\n<ELEMENT %s>\n", (char *)eltp->enptr) ;
|
||||||
if (eltp->parptr)
|
if (eltp->parptr)
|
||||||
{
|
{
|
||||||
fputs(" /*\n", tempfile) ;
|
fputs(" /*\n", tempfile) ;
|
||||||
|
@ -570,7 +571,8 @@ if (eltp->parptr)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
char mbyte[32]; /* larger than any multibyte character */
|
char mbyte[32]; /* larger than any multibyte character */
|
||||||
char *pc, c;
|
char *pc;
|
||||||
|
unsigned char c;
|
||||||
|
|
||||||
length = wctomb(mbyte, *p);
|
length = wctomb(mbyte, *p);
|
||||||
if (length < 0)
|
if (length < 0)
|
||||||
|
@ -600,8 +602,8 @@ if (eltp->parptr)
|
||||||
mb_keyword = MakeMByteString(ptypep->keyword);
|
mb_keyword = MakeMByteString(ptypep->keyword);
|
||||||
fprintf(tempfile,
|
fprintf(tempfile,
|
||||||
"%s = %s",
|
"%s = %s",
|
||||||
ptypep->keyword,
|
(char *)ptypep->keyword,
|
||||||
ptypep->keyword) ;
|
(char *)ptypep->keyword) ;
|
||||||
m_free(mb_keyword,"multi-byte string");
|
m_free(mb_keyword,"multi-byte string");
|
||||||
ptypep = ptypep->next ? ptypep->nextptr : (PTYPE *) NULL ;
|
ptypep = ptypep->next ? ptypep->nextptr : (PTYPE *) NULL ;
|
||||||
if (ptypep)
|
if (ptypep)
|
||||||
|
@ -640,7 +642,7 @@ void template(M_NOPAR)
|
||||||
undefent = TRUE ;
|
undefent = TRUE ;
|
||||||
}
|
}
|
||||||
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
|
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
|
||||||
ent->name,
|
(char *)ent->name,
|
||||||
enttype(ent->type)
|
enttype(ent->type)
|
||||||
) ;
|
) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ ptypelen++ ;
|
||||||
/* Add a parameter to the current element */
|
/* Add a parameter to the current element */
|
||||||
void addpar(M_NOPAR)
|
void addpar(M_NOPAR)
|
||||||
{
|
{
|
||||||
PARAMETER *paramp, *last ;
|
PARAMETER *paramp, *last = NULL ;
|
||||||
int length ;
|
int length ;
|
||||||
|
|
||||||
parcount++ ;
|
parcount++ ;
|
||||||
|
@ -200,6 +200,7 @@ switch (newpar->type)
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
|
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
|
||||||
|
@ -212,7 +213,7 @@ M_WCHAR *string ;
|
||||||
#endif /* M_PROTO */
|
#endif /* M_PROTO */
|
||||||
{
|
{
|
||||||
M_WCHAR *p, *q ;
|
M_WCHAR *p, *q ;
|
||||||
int i ;
|
int i, ret ;
|
||||||
|
|
||||||
switch (newpar->type)
|
switch (newpar->type)
|
||||||
{
|
{
|
||||||
|
@ -238,7 +239,7 @@ switch (newpar->type)
|
||||||
for (p = string, i = 0 ; *p ; p++, i++)
|
for (p = string, i = 0 ; *p ; p++, i++)
|
||||||
if (m_whitespace(*p))
|
if (m_whitespace(*p))
|
||||||
{
|
{
|
||||||
mbtowc(p, " ", 1);
|
ret = mbtowc(p, " ", 1);
|
||||||
for (q = p + 1 ; m_whitespace(*q); q++) ;
|
for (q = p + 1 ; m_whitespace(*q); q++) ;
|
||||||
w_strcpy(p + 1, q) ;
|
w_strcpy(p + 1, q) ;
|
||||||
}
|
}
|
||||||
|
@ -262,10 +263,13 @@ switch (newpar->type)
|
||||||
mbyte[1] = 0;
|
mbyte[1] = 0;
|
||||||
}
|
}
|
||||||
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
|
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
|
||||||
mbtowc(string, " ", 1);
|
{
|
||||||
|
ret = mbtowc(string, " ", 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called at end of parameter attribute list rule */
|
/* Called at end of parameter attribute list rule */
|
||||||
|
|
|
@ -330,7 +330,7 @@ LOGICAL litproc(
|
||||||
#endif
|
#endif
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
void main(
|
int main(
|
||||||
#if defined(M_PROTO)
|
#if defined(M_PROTO)
|
||||||
int argc, char **argv
|
int argc, char **argv
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -80,9 +80,10 @@ int c;
|
||||||
int n;
|
int n;
|
||||||
M_WCHAR wsp, wnl, wtb;
|
M_WCHAR wsp, wnl, wtb;
|
||||||
|
|
||||||
mbtowc(&wsp, " ", 1);
|
int
|
||||||
mbtowc(&wnl, "\n", 1);
|
ret = mbtowc(&wsp, " ", 1);
|
||||||
mbtowc(&wtb, "\t", 1);
|
ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
ret = mbtowc(&wtb, "\t", 1);
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -158,13 +159,14 @@ while (TRUE)
|
||||||
{
|
{
|
||||||
char mbyte[32]; /* bigger than the biggest multibyte char */
|
char mbyte[32]; /* bigger than the biggest multibyte char */
|
||||||
|
|
||||||
wctomb(mbyte, c);
|
ret = wctomb(mbyte, c);
|
||||||
|
|
||||||
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
|
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
|
||||||
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
|
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
|
||||||
m_error("Unexpected character");
|
m_error("Unexpected character");
|
||||||
}
|
}
|
||||||
} /* End while */
|
} /* End while */
|
||||||
|
(void) ret;
|
||||||
} /* End scan */
|
} /* End scan */
|
||||||
|
|
||||||
#include "scanutil.c"
|
#include "scanutil.c"
|
||||||
|
|
|
@ -40,7 +40,7 @@ void adddefent(mapname)
|
||||||
M_WCHAR *mapname;
|
M_WCHAR *mapname;
|
||||||
{
|
{
|
||||||
M_WCHAR *p;
|
M_WCHAR *p;
|
||||||
int n, length;
|
int n;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
if (!wc_prefix)
|
if (!wc_prefix)
|
||||||
|
@ -59,8 +59,9 @@ for (n = egensuf ; n ; n /= 10)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
c = ('0' + (n % 10));
|
c = ('0' + (n % 10));
|
||||||
mbtowc(p, &c, 1);
|
int ret = mbtowc(p, &c, 1);
|
||||||
*p++;
|
(void) ret;
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
*p = M_EOS;
|
*p = M_EOS;
|
||||||
egensuf++;
|
egensuf++;
|
||||||
|
@ -80,7 +81,7 @@ M_WCHAR *name;
|
||||||
M_ENTITY *new;
|
M_ENTITY *new;
|
||||||
|
|
||||||
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity");
|
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");
|
m_free((M_POINTER) new, "entity");
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
@ -113,7 +114,7 @@ MAP *new;
|
||||||
LOGICAL retval;
|
LOGICAL retval;
|
||||||
|
|
||||||
new = (MAP *) m_malloc(sizeof(MAP), "map");
|
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");
|
m_free(new, "map");
|
||||||
curmap = old->map;
|
curmap = old->map;
|
||||||
|
@ -153,7 +154,7 @@ int noseq = 0;
|
||||||
/* Define the delimiter */
|
/* Define the delimiter */
|
||||||
delim = (SREFSTRUCT *)
|
delim = (SREFSTRUCT *)
|
||||||
m_malloc(sizeof(SREFSTRUCT), "short reference delimiter");
|
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");
|
m_free(delim, "short reference delimiter");
|
||||||
delim = prevsr;
|
delim = prevsr;
|
||||||
|
|
|
@ -626,7 +626,7 @@ name
|
||||||
pcchain:pcchain {
|
pcchain:pcchain {
|
||||||
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
|
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
|
||||||
(*nextchain)->next = NULL ;
|
(*nextchain)->next = NULL ;
|
||||||
if ((*nextchain)->elt = m_packedlook(m_entree, name))
|
if (((*nextchain)->elt = m_packedlook(m_entree, name)))
|
||||||
(*nextchain)->elt++ ;
|
(*nextchain)->elt++ ;
|
||||||
else
|
else
|
||||||
m_err1("Undefined element: %s", name) ;
|
m_err1("Undefined element: %s", name) ;
|
||||||
|
@ -660,61 +660,61 @@ text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globdef:globdef {
|
globdef:globdef {
|
||||||
fprintf(globdef, "%c", textchar) ;
|
fprintf(globdef, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
globdec:globdec {
|
globdec:globdec {
|
||||||
fprintf(globdec, "%c", textchar) ;
|
fprintf(globdec, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
iniss:iniss,
|
iniss:iniss,
|
||||||
inss:inss {
|
inss:inss {
|
||||||
if (! stringstart) fprintf(string, ",\n") ;
|
if (! stringstart) fprintf(string, ",\n") ;
|
||||||
fprintf(string, " %d", textchar) ;
|
fprintf(string, " %d", (int)textchar) ;
|
||||||
stringstart = FALSE ;
|
stringstart = FALSE ;
|
||||||
stringcnt++ ;
|
stringcnt++ ;
|
||||||
}
|
}
|
||||||
inies:inies,
|
inies:inies,
|
||||||
ines:ines {
|
ines:ines {
|
||||||
if (! stringstart) fprintf(string, ",\n") ;
|
if (! stringstart) fprintf(string, ",\n") ;
|
||||||
fprintf(string, " %d", textchar) ;
|
fprintf(string, " %d", (int)textchar) ;
|
||||||
stringstart = FALSE ;
|
stringstart = FALSE ;
|
||||||
stringcnt++ ;
|
stringcnt++ ;
|
||||||
}
|
}
|
||||||
inisc:inisc,
|
inisc:inisc,
|
||||||
insc:insc {
|
insc:insc {
|
||||||
fprintf(sfile, "%c", textchar) ;
|
fprintf(sfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
iniec:iniec,
|
iniec:iniec,
|
||||||
inec:inec {
|
inec:inec {
|
||||||
fprintf(efile, "%c", textchar) ;
|
fprintf(efile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
initc:initc,
|
initc:initc,
|
||||||
intc:intc {
|
intc:intc {
|
||||||
fprintf(tfile, "%c", textchar) ;
|
fprintf(tfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inipc:inipc,
|
inipc:inipc,
|
||||||
inpc:inpc {
|
inpc:inpc {
|
||||||
fprintf(pfile, "%c", textchar) ;
|
fprintf(pfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inistc:inistc,
|
inistc:inistc,
|
||||||
instc:instc {
|
instc:instc {
|
||||||
fprintf(stfile, "%c", textchar) ;
|
fprintf(stfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inentc:inentc {
|
inentc:inentc {
|
||||||
fprintf(entfile, "%c", textchar) ;
|
fprintf(entfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,13 +49,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
|
|
||||||
/* Main program */
|
/* Main program */
|
||||||
void main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc ;
|
int argc ;
|
||||||
char **argv ;
|
char **argv ;
|
||||||
{
|
{
|
||||||
int m_token ;
|
int m_token ;
|
||||||
|
|
||||||
if (argc > 2)
|
if (argc > 2) {
|
||||||
if (*argv[2] == '-') {
|
if (*argv[2] == '-') {
|
||||||
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
|
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
|
||||||
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,
|
fprintf(stderr,
|
||||||
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
|
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
|
||||||
) ;
|
) ;
|
||||||
|
}
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
fprintf(stderr, "**** Specify interface file ****\n") ;
|
fprintf(stderr, "**** Specify interface file ****\n") ;
|
||||||
exit(TRUE) ;
|
exit(TRUE) ;
|
||||||
|
@ -84,7 +85,7 @@ void main(argc, argv)
|
||||||
if (scantrace)
|
if (scantrace)
|
||||||
printf(
|
printf(
|
||||||
"Main: m_prevcon=%d,m_token=%d,curcon=%d,textchar='%c'(%d), line=%d\n",
|
"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"
|
#include "case.c"
|
||||||
if (m_token == ENDFILE) break ;
|
if (m_token == ENDFILE) break ;
|
||||||
if (! curcon) {
|
if (! curcon) {
|
||||||
|
@ -93,4 +94,5 @@ void main(argc, argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
done() ;
|
done() ;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ void cvalue(M_NOPAR)
|
||||||
PARVAL *new;
|
PARVAL *new;
|
||||||
|
|
||||||
new = (PARVAL *) m_malloc(sizeof(PARVAL), "parameter value");
|
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");
|
m_free(new, "parameter value");
|
||||||
else {
|
else {
|
||||||
new->line = 0;
|
new->line = 0;
|
||||||
|
@ -467,7 +467,7 @@ for ( ; p ; p = p->next)
|
||||||
iffile);
|
iffile);
|
||||||
fprintf(pvalh, "#define %s \"", mb_cname);
|
fprintf(pvalh, "#define %s \"", mb_cname);
|
||||||
m_free(mb_cname,"multi-byte string");
|
m_free(mb_cname,"multi-byte string");
|
||||||
if (q = ((PARVAL *) p->data)->value)
|
if ((q = ((PARVAL *) p->data)->value))
|
||||||
for ( ; *q ; q++)
|
for ( ; *q ; q++)
|
||||||
{
|
{
|
||||||
char mbq[32]; /* larger than largest possible mbyte char */
|
char mbq[32]; /* larger than largest possible mbyte char */
|
||||||
|
@ -498,7 +498,7 @@ for ( ; p ; p = p->next)
|
||||||
void skiptoend(M_NOPAR)
|
void skiptoend(M_NOPAR)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static errlev = 0;
|
static int errlev = 0;
|
||||||
CVARSTRUCT *cvarp, *dvarp;
|
CVARSTRUCT *cvarp, *dvarp;
|
||||||
|
|
||||||
for (cvarp = cvarlist ; cvarp ;) {
|
for (cvarp = cvarlist ; cvarp ;) {
|
||||||
|
@ -615,7 +615,7 @@ void startelement(M_NOPAR)
|
||||||
m_free(discard, "C variable");
|
m_free(discard, "C variable");
|
||||||
}
|
}
|
||||||
cvarlist = NULL;
|
cvarlist = NULL;
|
||||||
if (openelt = m_packedlook(m_entree, name)) {
|
if ((openelt = m_packedlook(m_entree, name))) {
|
||||||
if (processed[openelt - 1])
|
if (processed[openelt - 1])
|
||||||
warning1("Warning: Element %s already processed", name);
|
warning1("Warning: Element %s already processed", name);
|
||||||
processed[openelt - 1] = TRUE;
|
processed[openelt - 1] = TRUE;
|
||||||
|
@ -670,7 +670,7 @@ if (m_partype(cvarlist->param + m_element[openelt - 1].parptr, p))
|
||||||
{
|
{
|
||||||
M_WCHAR *w_buffer;
|
M_WCHAR *w_buffer;
|
||||||
|
|
||||||
sprintf(buffer, "%d", pval->line);
|
snprintf(buffer, 5, "%d", pval->line);
|
||||||
w_buffer = MakeWideCharString(buffer);
|
w_buffer = MakeWideCharString(buffer);
|
||||||
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
|
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
|
||||||
pval->cname,
|
pval->cname,
|
||||||
|
|
|
@ -40,7 +40,7 @@ void addent(M_NOPAR)
|
||||||
M_ENTITY *new ;
|
M_ENTITY *new ;
|
||||||
|
|
||||||
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity") ;
|
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") ;
|
m_free(new, "entity") ;
|
||||||
if (! entity->wheredef) return ;
|
if (! entity->wheredef) return ;
|
||||||
if (entity->wheredef == M_DBUILD) {
|
if (entity->wheredef == M_DBUILD) {
|
||||||
|
|
|
@ -226,7 +226,7 @@ LOGICAL litproc(
|
||||||
#endif
|
#endif
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
void main(
|
int main(
|
||||||
#if defined(M_PROTO)
|
#if defined(M_PROTO)
|
||||||
int argc, char **argv
|
int argc, char **argv
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -53,7 +53,8 @@ M_WCHAR *p, wus;
|
||||||
int c, cttype;
|
int c, cttype;
|
||||||
LOGICAL cname;
|
LOGICAL cname;
|
||||||
|
|
||||||
mbtowc(&wus, "_", 1);
|
int ret = mbtowc(&wus, "_", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
|
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
|
||||||
*(p = name) = (M_WCHAR) first;
|
*(p = name) = (M_WCHAR) first;
|
||||||
|
@ -92,7 +93,8 @@ int n;
|
||||||
static char unexp[] = "c";
|
static char unexp[] = "c";
|
||||||
M_WCHAR wus;
|
M_WCHAR wus;
|
||||||
|
|
||||||
mbtowc(&wus, "_", 1);
|
int ret = mbtowc(&wus, "_", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,3 +112,21 @@ void *m_malloc(
|
||||||
int size, char *msg
|
int size, char *msg
|
||||||
#endif
|
#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
|
||||||
|
) ;
|
||||||
|
|
|
@ -29,262 +29,262 @@ by HP Tag are marked "(invalid)". */
|
||||||
M_CHARTYPE m_ctarray[M_CHARSETLEN]
|
M_CHARTYPE m_ctarray[M_CHARSETLEN]
|
||||||
= {
|
= {
|
||||||
/* Char Name Type, Upper, Lower */
|
/* Char Name Type, Upper, Lower */
|
||||||
/* 0: ^@ NUL */ M_NONNAME, 0, 0,
|
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
|
||||||
/* 1: ^A SOH */ M_NONNAME, 1, 1,
|
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
|
||||||
/* 2: ^B STX */ M_NONNAME, 2, 2,
|
/* 2: ^B STX */ {M_NONNAME, 2, 2},
|
||||||
/* 3: ^C ETX */ M_NONNAME, 3, 3,
|
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
|
||||||
/* 4: ^D EOT */ M_NONNAME, 4, 4,
|
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
|
||||||
/* 5: ^E ENQ */ M_NONNAME, 5, 5,
|
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
|
||||||
/* 6: ^F ACK */ M_NONNAME, 6, 6,
|
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
|
||||||
/* 7: ^G BEL */ M_NONNAME, 7, 7,
|
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
|
||||||
/* 8: ^H BS */ M_NONNAME, 8, 8,
|
/* 8: ^H BS */ {M_NONNAME, 8, 8},
|
||||||
/* 9: ^I HT */ M_NONNAME, 9, 9,
|
/* 9: ^I HT */ {M_NONNAME, 9, 9},
|
||||||
/* 10: ^J LF */ M_NONNAME, 10, 10,
|
/* 10: ^J LF */ {M_NONNAME, 10, 10},
|
||||||
/* 11: ^K VT */ M_NONNAME, 11, 11,
|
/* 11: ^K VT */ {M_NONNAME, 11, 11},
|
||||||
/* 12: ^L FF */ M_NONNAME, 12, 12,
|
/* 12: ^L FF */ {M_NONNAME, 12, 12},
|
||||||
/* 13: ^M CR */ M_NONNAME, 13, 13,
|
/* 13: ^M CR */ {M_NONNAME, 13, 13},
|
||||||
/* 14: ^N SO */ M_NONNAME, 14, 14,
|
/* 14: ^N SO */ {M_NONNAME, 14, 14},
|
||||||
/* 15: ^O SI */ M_NONNAME, 15, 15,
|
/* 15: ^O SI */ {M_NONNAME, 15, 15},
|
||||||
/* 16: ^P DLE */ M_NONNAME, 16, 16,
|
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
|
||||||
/* 17: ^Q DC1 */ M_NONNAME, 17, 17,
|
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
|
||||||
/* 18: ^R DC2 */ M_NONNAME, 18, 18,
|
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
|
||||||
/* 19: ^S DC3 */ M_NONNAME, 19, 19,
|
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
|
||||||
/* 20: ^T DC4 */ M_NONNAME, 20, 20,
|
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
|
||||||
/* 21: ^U NAK */ M_NONNAME, 21, 21,
|
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
|
||||||
/* 22: ^V SYN */ M_NONNAME, 22, 22,
|
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
|
||||||
/* 23: ^W ETB */ M_NONNAME, 23, 23,
|
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
|
||||||
/* 24: ^X CAN */ M_NONNAME, 24, 24,
|
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
|
||||||
/* 25: ^Y EM */ M_NONNAME, 25, 25,
|
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
|
||||||
/* 26: ^Z SUB */ M_NONNAME, 26, 26,
|
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
|
||||||
/* 27: ^[ ESC */ M_NONNAME, 27, 27,
|
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
|
||||||
/* 28: ^\ FS */ M_NONNAME, 28, 28,
|
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
|
||||||
/* 29: ^] GS */ M_NONNAME, 29, 29,
|
/* 29: ^] GS */ {M_NONNAME, 29, 29},
|
||||||
/* 30: ^^ RS */ M_NONNAME, 30, 30,
|
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
|
||||||
/* 31: ^_ US */ M_NONNAME, 31, 31,
|
/* 31: ^_ US */ {M_NONNAME, 31, 31},
|
||||||
/* 32: SP */ M_NONNAME, 32, 32,
|
/* 32: SP */ {M_NONNAME, 32, 32},
|
||||||
/* 33: ! */ M_NONNAME, 33, 33,
|
/* 33: ! */ {M_NONNAME, 33, 33},
|
||||||
/* 34: " */ M_NONNAME, 34, 34,
|
/* 34: " */ {M_NONNAME, 34, 34},
|
||||||
/* 35: # */ M_NONNAME, 35, 35,
|
/* 35: # */ {M_NONNAME, 35, 35},
|
||||||
/* 36: $ */ M_NONNAME, 36, 36,
|
/* 36: $ */ {M_NONNAME, 36, 36},
|
||||||
/* 37: % */ M_NONNAME, 37, 37,
|
/* 37: % */ {M_NONNAME, 37, 37},
|
||||||
/* 38: & */ M_NONNAME, 38, 38,
|
/* 38: & */ {M_NONNAME, 38, 38},
|
||||||
/* 39: ' */ M_NONNAME, 39, 39,
|
/* 39: ' */ {M_NONNAME, 39, 39},
|
||||||
/* 40: ( */ M_NONNAME, 40, 40,
|
/* 40: ( */ {M_NONNAME, 40, 40},
|
||||||
/* 41: ) */ M_NONNAME, 41, 41,
|
/* 41: ) */ {M_NONNAME, 41, 41},
|
||||||
/* 42: * */ M_NONNAME, 42, 42,
|
/* 42: * */ {M_NONNAME, 42, 42},
|
||||||
/* 43: + */ M_NAMECHAR, 43, 43,
|
/* 43: + */ {M_NAMECHAR, 43, 43},
|
||||||
/* 44: , */ M_NONNAME, 44, 44,
|
/* 44: , */ {M_NONNAME, 44, 44},
|
||||||
/* 45: - */ M_NAMECHAR, 45, 45,
|
/* 45: - */ {M_NAMECHAR, 45, 45},
|
||||||
/* 46: . */ M_NAMECHAR, 46, 46,
|
/* 46: . */ {M_NAMECHAR, 46, 46},
|
||||||
/* 47: / */ M_NONNAME, 47, 47,
|
/* 47: / */ {M_NONNAME, 47, 47},
|
||||||
/* 48: 0 */ M_DIGIT, 48, 48,
|
/* 48: 0 */ {M_DIGIT, 48, 48},
|
||||||
/* 49: 1 */ M_DIGIT, 49, 49,
|
/* 49: 1 */ {M_DIGIT, 49, 49},
|
||||||
/* 50: 2 */ M_DIGIT, 50, 50,
|
/* 50: 2 */ {M_DIGIT, 50, 50},
|
||||||
/* 51: 3 */ M_DIGIT, 51, 51,
|
/* 51: 3 */ {M_DIGIT, 51, 51},
|
||||||
/* 52: 4 */ M_DIGIT, 52, 52,
|
/* 52: 4 */ {M_DIGIT, 52, 52},
|
||||||
/* 53: 5 */ M_DIGIT, 53, 53,
|
/* 53: 5 */ {M_DIGIT, 53, 53},
|
||||||
/* 54: 6 */ M_DIGIT, 54, 54,
|
/* 54: 6 */ {M_DIGIT, 54, 54},
|
||||||
/* 55: 7 */ M_DIGIT, 55, 55,
|
/* 55: 7 */ {M_DIGIT, 55, 55},
|
||||||
/* 56: 8 */ M_DIGIT, 56, 56,
|
/* 56: 8 */ {M_DIGIT, 56, 56},
|
||||||
/* 57: 9 */ M_DIGIT, 57, 57,
|
/* 57: 9 */ {M_DIGIT, 57, 57},
|
||||||
/* 58: : */ M_NONNAME, 58, 58,
|
/* 58: : */ {M_NONNAME, 58, 58},
|
||||||
/* 59: ; */ M_NONNAME, 59, 59,
|
/* 59: ; */ {M_NONNAME, 59, 59},
|
||||||
/* 60: < */ M_NONNAME, 60, 60,
|
/* 60: < */ {M_NONNAME, 60, 60},
|
||||||
/* 61: = */ M_NONNAME, 61, 61,
|
/* 61: = */ {M_NONNAME, 61, 61},
|
||||||
/* 62: > */ M_NONNAME, 62, 62,
|
/* 62: > */ {M_NONNAME, 62, 62},
|
||||||
/* 63: ? */ M_NONNAME, 63, 63,
|
/* 63: ? */ {M_NONNAME, 63, 63},
|
||||||
/* 64: @ */ M_NONNAME, 64, 64,
|
/* 64: @ */ {M_NONNAME, 64, 64},
|
||||||
/* 65: A */ M_NMSTART, 65, 97,
|
/* 65: A */ {M_NMSTART, 65, 97},
|
||||||
/* 66: B */ M_NMSTART, 66, 98,
|
/* 66: B */ {M_NMSTART, 66, 98},
|
||||||
/* 67: C */ M_NMSTART, 67, 99,
|
/* 67: C */ {M_NMSTART, 67, 99},
|
||||||
/* 68: D */ M_NMSTART, 68, 100,
|
/* 68: D */ {M_NMSTART, 68, 100},
|
||||||
/* 69: E */ M_NMSTART, 69, 101,
|
/* 69: E */ {M_NMSTART, 69, 101},
|
||||||
/* 70: F */ M_NMSTART, 70, 102,
|
/* 70: F */ {M_NMSTART, 70, 102},
|
||||||
/* 71: G */ M_NMSTART, 71, 103,
|
/* 71: G */ {M_NMSTART, 71, 103},
|
||||||
/* 72: H */ M_NMSTART, 72, 104,
|
/* 72: H */ {M_NMSTART, 72, 104},
|
||||||
/* 73: I */ M_NMSTART, 73, 105,
|
/* 73: I */ {M_NMSTART, 73, 105},
|
||||||
/* 74: J */ M_NMSTART, 74, 106,
|
/* 74: J */ {M_NMSTART, 74, 106},
|
||||||
/* 75: K */ M_NMSTART, 75, 107,
|
/* 75: K */ {M_NMSTART, 75, 107},
|
||||||
/* 76: L */ M_NMSTART, 76, 108,
|
/* 76: L */ {M_NMSTART, 76, 108},
|
||||||
/* 77: M */ M_NMSTART, 77, 109,
|
/* 77: M */ {M_NMSTART, 77, 109},
|
||||||
/* 78: N */ M_NMSTART, 78, 110,
|
/* 78: N */ {M_NMSTART, 78, 110},
|
||||||
/* 79: O */ M_NMSTART, 79, 111,
|
/* 79: O */ {M_NMSTART, 79, 111},
|
||||||
/* 80: P */ M_NMSTART, 80, 112,
|
/* 80: P */ {M_NMSTART, 80, 112},
|
||||||
/* 81: Q */ M_NMSTART, 81, 113,
|
/* 81: Q */ {M_NMSTART, 81, 113},
|
||||||
/* 82: R */ M_NMSTART, 82, 114,
|
/* 82: R */ {M_NMSTART, 82, 114},
|
||||||
/* 83: S */ M_NMSTART, 83, 115,
|
/* 83: S */ {M_NMSTART, 83, 115},
|
||||||
/* 84: T */ M_NMSTART, 84, 116,
|
/* 84: T */ {M_NMSTART, 84, 116},
|
||||||
/* 85: U */ M_NMSTART, 85, 117,
|
/* 85: U */ {M_NMSTART, 85, 117},
|
||||||
/* 86: V */ M_NMSTART, 86, 118,
|
/* 86: V */ {M_NMSTART, 86, 118},
|
||||||
/* 87: W */ M_NMSTART, 87, 119,
|
/* 87: W */ {M_NMSTART, 87, 119},
|
||||||
/* 88: X */ M_NMSTART, 88, 120,
|
/* 88: X */ {M_NMSTART, 88, 120},
|
||||||
/* 89: Y */ M_NMSTART, 89, 121,
|
/* 89: Y */ {M_NMSTART, 89, 121},
|
||||||
/* 90: Z */ M_NMSTART, 90, 122,
|
/* 90: Z */ {M_NMSTART, 90, 122},
|
||||||
/* 91: [ */ M_NONNAME, 91, 91,
|
/* 91: [ */ {M_NONNAME, 91, 91},
|
||||||
/* 92: \\ */ M_NONNAME, 92, 92,
|
/* 92: \\ */ {M_NONNAME, 92, 92},
|
||||||
/* 93: ] */ M_NONNAME, 93, 93,
|
/* 93: ] */ {M_NONNAME, 93, 93},
|
||||||
/* 94: ^ */ M_NONNAME, 94, 94,
|
/* 94: ^ */ {M_NONNAME, 94, 94},
|
||||||
/* 95: _ */ M_NONNAME, 95, 95,
|
/* 95: _ */ {M_NONNAME, 95, 95},
|
||||||
/* 96: ` */ M_NONNAME, 96, 96,
|
/* 96: ` */ {M_NONNAME, 96, 96},
|
||||||
/* 97: a */ M_NMSTART, 65, 97,
|
/* 97: a */ {M_NMSTART, 65, 97},
|
||||||
/* 98: b */ M_NMSTART, 66, 98,
|
/* 98: b */ {M_NMSTART, 66, 98},
|
||||||
/* 99: c */ M_NMSTART, 67, 99,
|
/* 99: c */ {M_NMSTART, 67, 99},
|
||||||
/* 100: d */ M_NMSTART, 68, 100,
|
/* 100: d */ {M_NMSTART, 68, 100},
|
||||||
/* 101: e */ M_NMSTART, 69, 101,
|
/* 101: e */ {M_NMSTART, 69, 101},
|
||||||
/* 102: f */ M_NMSTART, 70, 102,
|
/* 102: f */ {M_NMSTART, 70, 102},
|
||||||
/* 103: g */ M_NMSTART, 71, 103,
|
/* 103: g */ {M_NMSTART, 71, 103},
|
||||||
/* 104: h */ M_NMSTART, 72, 104,
|
/* 104: h */ {M_NMSTART, 72, 104},
|
||||||
/* 105: i */ M_NMSTART, 73, 105,
|
/* 105: i */ {M_NMSTART, 73, 105},
|
||||||
/* 106: j */ M_NMSTART, 74, 106,
|
/* 106: j */ {M_NMSTART, 74, 106},
|
||||||
/* 107: k */ M_NMSTART, 75, 107,
|
/* 107: k */ {M_NMSTART, 75, 107},
|
||||||
/* 108: l */ M_NMSTART, 76, 108,
|
/* 108: l */ {M_NMSTART, 76, 108},
|
||||||
/* 109: m */ M_NMSTART, 77, 109,
|
/* 109: m */ {M_NMSTART, 77, 109},
|
||||||
/* 110: n */ M_NMSTART, 78, 110,
|
/* 110: n */ {M_NMSTART, 78, 110},
|
||||||
/* 111: o */ M_NMSTART, 79, 111,
|
/* 111: o */ {M_NMSTART, 79, 111},
|
||||||
/* 112: p */ M_NMSTART, 80, 112,
|
/* 112: p */ {M_NMSTART, 80, 112},
|
||||||
/* 113: q */ M_NMSTART, 81, 113,
|
/* 113: q */ {M_NMSTART, 81, 113},
|
||||||
/* 114: r */ M_NMSTART, 82, 114,
|
/* 114: r */ {M_NMSTART, 82, 114},
|
||||||
/* 115: s */ M_NMSTART, 83, 115,
|
/* 115: s */ {M_NMSTART, 83, 115},
|
||||||
/* 116: t */ M_NMSTART, 84, 116,
|
/* 116: t */ {M_NMSTART, 84, 116},
|
||||||
/* 117: u */ M_NMSTART, 85, 117,
|
/* 117: u */ {M_NMSTART, 85, 117},
|
||||||
/* 118: v */ M_NMSTART, 86, 118,
|
/* 118: v */ {M_NMSTART, 86, 118},
|
||||||
/* 119: w */ M_NMSTART, 87, 119,
|
/* 119: w */ {M_NMSTART, 87, 119},
|
||||||
/* 120: x */ M_NMSTART, 88, 120,
|
/* 120: x */ {M_NMSTART, 88, 120},
|
||||||
/* 121: y */ M_NMSTART, 89, 121,
|
/* 121: y */ {M_NMSTART, 89, 121},
|
||||||
/* 122: z */ M_NMSTART, 90, 122,
|
/* 122: z */ {M_NMSTART, 90, 122},
|
||||||
/* 123: { */ M_NONNAME, 123, 123,
|
/* 123: { */ {M_NONNAME, 123, 123},
|
||||||
/* 124: | */ M_NONNAME, 124, 124,
|
/* 124: | */ {M_NONNAME, 124, 124},
|
||||||
/* 125: } */ M_NONNAME, 125, 125,
|
/* 125: } */ {M_NONNAME, 125, 125},
|
||||||
/* 126: ~ */ M_NONNAME, 126, 126,
|
/* 126: ~ */ {M_NONNAME, 126, 126},
|
||||||
/* 127: DEL */ M_NONNAME, 127, 127,
|
/* 127: DEL */ {M_NONNAME, 127, 127},
|
||||||
/* 128: undefined */ M_NONNAME, 128, 128,
|
/* 128: undefined */ {M_NONNAME, 128, 128},
|
||||||
/* 129: undefined */ M_NONNAME, 129, 129,
|
/* 129: undefined */ {M_NONNAME, 129, 129},
|
||||||
/* 130: undefined */ M_NONNAME, 130, 130,
|
/* 130: undefined */ {M_NONNAME, 130, 130},
|
||||||
/* 131: undefined */ M_NONNAME, 131, 131,
|
/* 131: undefined */ {M_NONNAME, 131, 131},
|
||||||
/* 132: undefined */ M_NONNAME, 132, 132,
|
/* 132: undefined */ {M_NONNAME, 132, 132},
|
||||||
/* 133: undefined */ M_NONNAME, 133, 133,
|
/* 133: undefined */ {M_NONNAME, 133, 133},
|
||||||
/* 134: undefined */ M_NONNAME, 134, 134,
|
/* 134: undefined */ {M_NONNAME, 134, 134},
|
||||||
/* 135: undefined */ M_NONNAME, 135, 135,
|
/* 135: undefined */ {M_NONNAME, 135, 135},
|
||||||
/* 136: undefined */ M_NONNAME, 136, 136,
|
/* 136: undefined */ {M_NONNAME, 136, 136},
|
||||||
/* 137: undefined */ M_NONNAME, 137, 137,
|
/* 137: undefined */ {M_NONNAME, 137, 137},
|
||||||
/* 138: undefined */ M_NONNAME, 138, 138,
|
/* 138: undefined */ {M_NONNAME, 138, 138},
|
||||||
/* 139: undefined */ M_NONNAME, 139, 139,
|
/* 139: undefined */ {M_NONNAME, 139, 139},
|
||||||
/* 140: undefined */ M_NONNAME, 140, 140,
|
/* 140: undefined */ {M_NONNAME, 140, 140},
|
||||||
/* 141: undefined */ M_NONNAME, 141, 141,
|
/* 141: undefined */ {M_NONNAME, 141, 141},
|
||||||
/* 142: undefined */ M_NONNAME, 142, 142,
|
/* 142: undefined */ {M_NONNAME, 142, 142},
|
||||||
/* 143: undefined */ M_NONNAME, 143, 143,
|
/* 143: undefined */ {M_NONNAME, 143, 143},
|
||||||
/* 144: undefined */ M_NONNAME, 144, 144,
|
/* 144: undefined */ {M_NONNAME, 144, 144},
|
||||||
/* 145: undefined */ M_NONNAME, 145, 145,
|
/* 145: undefined */ {M_NONNAME, 145, 145},
|
||||||
/* 146: undefined */ M_NONNAME, 146, 146,
|
/* 146: undefined */ {M_NONNAME, 146, 146},
|
||||||
/* 147: undefined */ M_NONNAME, 147, 147,
|
/* 147: undefined */ {M_NONNAME, 147, 147},
|
||||||
/* 148: undefined */ M_NONNAME, 148, 148,
|
/* 148: undefined */ {M_NONNAME, 148, 148},
|
||||||
/* 149: undefined */ M_NONNAME, 149, 149,
|
/* 149: undefined */ {M_NONNAME, 149, 149},
|
||||||
/* 150: undefined */ M_NONNAME, 150, 150,
|
/* 150: undefined */ {M_NONNAME, 150, 150},
|
||||||
/* 151: undefined */ M_NONNAME, 151, 151,
|
/* 151: undefined */ {M_NONNAME, 151, 151},
|
||||||
/* 152: undefined */ M_NONNAME, 152, 152,
|
/* 152: undefined */ {M_NONNAME, 152, 152},
|
||||||
/* 153: undefined */ M_NONNAME, 153, 153,
|
/* 153: undefined */ {M_NONNAME, 153, 153},
|
||||||
/* 154: undefined */ M_NONNAME, 154, 154,
|
/* 154: undefined */ {M_NONNAME, 154, 154},
|
||||||
/* 155: undefined */ M_NONNAME, 155, 155,
|
/* 155: undefined */ {M_NONNAME, 155, 155},
|
||||||
/* 156: undefined */ M_NONNAME, 156, 156,
|
/* 156: undefined */ {M_NONNAME, 156, 156},
|
||||||
/* 157: undefined */ M_NONNAME, 157, 157,
|
/* 157: undefined */ {M_NONNAME, 157, 157},
|
||||||
/* 158: undefined */ M_NONNAME, 158, 158,
|
/* 158: undefined */ {M_NONNAME, 158, 158},
|
||||||
/* 159: undefined */ M_NONNAME, 159, 159,
|
/* 159: undefined */ {M_NONNAME, 159, 159},
|
||||||
/* 160: undefined */ M_NONNAME, 160, 160,
|
/* 160: undefined */ {M_NONNAME, 160, 160},
|
||||||
/* 161: A grave */ M_NMSTART, 161, 200,
|
/* 161: A grave */ {M_NMSTART, 161, 200},
|
||||||
/* 162: A circumflex */ M_NMSTART, 162, 192,
|
/* 162: A circumflex */ {M_NMSTART, 162, 192},
|
||||||
/* 163: E grave */ M_NMSTART, 163, 201,
|
/* 163: E grave */ {M_NMSTART, 163, 201},
|
||||||
/* 164: E circumflex */ M_NMSTART, 164, 193,
|
/* 164: E circumflex */ {M_NMSTART, 164, 193},
|
||||||
/* 165: E dieresis */ M_NMSTART, 165, 205,
|
/* 165: E dieresis */ {M_NMSTART, 165, 205},
|
||||||
/* 166: I circumflex */ M_NMSTART, 166, 209,
|
/* 166: I circumflex */ {M_NMSTART, 166, 209},
|
||||||
/* 167: I dieresis */ M_NMSTART, 167, 221,
|
/* 167: I dieresis */ {M_NMSTART, 167, 221},
|
||||||
/* 168: acute accent */ M_NONNAME, 168, 168,
|
/* 168: acute accent */ {M_NONNAME, 168, 168},
|
||||||
/* 169: grave accent */ M_NONNAME, 169, 169,
|
/* 169: grave accent */ {M_NONNAME, 169, 169},
|
||||||
/* 170: circumflex */ M_NONNAME, 170, 170,
|
/* 170: circumflex */ {M_NONNAME, 170, 170},
|
||||||
/* 171: dieresis */ M_NONNAME, 171, 171,
|
/* 171: dieresis */ {M_NONNAME, 171, 171},
|
||||||
/* 172: tilde */ M_NONNAME, 172, 172,
|
/* 172: tilde */ {M_NONNAME, 172, 172},
|
||||||
/* 173: U grave */ M_NMSTART, 173, 203,
|
/* 173: U grave */ {M_NMSTART, 173, 203},
|
||||||
/* 174: U circumflex */ M_NMSTART, 174, 195,
|
/* 174: U circumflex */ {M_NMSTART, 174, 195},
|
||||||
/* 175: Italian Lira (invalid) */ M_NONNAME, 175, 175,
|
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
|
||||||
/* 176: overbar (invalid) */ M_NONNAME, 176, 176,
|
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
|
||||||
/* 177: Y acute */ M_NMSTART, 177, 178,
|
/* 177: Y acute */ {M_NMSTART, 177, 178},
|
||||||
/* 178: y acute */ M_NMSTART, 177, 178,
|
/* 178: y acute */ {M_NMSTART, 177, 178},
|
||||||
/* 179: degree (invalid) */ M_NONNAME, 179, 179,
|
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
|
||||||
/* 180: C cedilla */ M_NMSTART, 180, 181,
|
/* 180: C cedilla */ {M_NMSTART, 180, 181},
|
||||||
/* 181: c cedilla */ M_NMSTART, 180, 181,
|
/* 181: c cedilla */ {M_NMSTART, 180, 181},
|
||||||
/* 182: N tilde */ M_NMSTART, 182, 183,
|
/* 182: N tilde */ {M_NMSTART, 182, 183},
|
||||||
/* 183: n tilde */ M_NMSTART, 182, 183,
|
/* 183: n tilde */ {M_NMSTART, 182, 183},
|
||||||
/* 184: inverted exclamation mark */ M_NONNAME, 184, 184,
|
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
|
||||||
/* 185: inverted question mark */ M_NONNAME, 185, 185,
|
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
|
||||||
/* 186: currency sign (invalid) */ M_NONNAME, 186, 186,
|
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
|
||||||
/* 187: pound sterling (invalid) */ M_NONNAME, 187, 187,
|
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
|
||||||
/* 188: Yen */ M_NONNAME, 188, 188,
|
/* 188: Yen */ {M_NONNAME, 188, 188},
|
||||||
/* 189: Section sign (invalid) */ M_NONNAME, 189, 189,
|
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
|
||||||
/* 190: florin (invalid) */ M_NONNAME, 190, 190,
|
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
|
||||||
/* 191: Cent sign (invalid) */ M_NONNAME, 191, 191,
|
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
|
||||||
/* 192: a circumflex */ M_NMSTART, 162, 192,
|
/* 192: a circumflex */ {M_NMSTART, 162, 192},
|
||||||
/* 193: e circumflex */ M_NMSTART, 164, 193,
|
/* 193: e circumflex */ {M_NMSTART, 164, 193},
|
||||||
/* 194: o circumflex */ M_NMSTART, 223, 194,
|
/* 194: o circumflex */ {M_NMSTART, 223, 194},
|
||||||
/* 195: u circumflex */ M_NMSTART, 174, 195,
|
/* 195: u circumflex */ {M_NMSTART, 174, 195},
|
||||||
/* 196: a acute */ M_NMSTART, 224, 196,
|
/* 196: a acute */ {M_NMSTART, 224, 196},
|
||||||
/* 197: e acute */ M_NMSTART, 220, 197,
|
/* 197: e acute */ {M_NMSTART, 220, 197},
|
||||||
/* 198: o acute */ M_NMSTART, 231, 198,
|
/* 198: o acute */ {M_NMSTART, 231, 198},
|
||||||
/* 199: u acute */ M_NMSTART, 237, 199,
|
/* 199: u acute */ {M_NMSTART, 237, 199},
|
||||||
/* 200: a grave */ M_NMSTART, 161, 200,
|
/* 200: a grave */ {M_NMSTART, 161, 200},
|
||||||
/* 201: e grave */ M_NMSTART, 163, 201,
|
/* 201: e grave */ {M_NMSTART, 163, 201},
|
||||||
/* 202: o grave */ M_NMSTART, 232, 202,
|
/* 202: o grave */ {M_NMSTART, 232, 202},
|
||||||
/* 203: u grave */ M_NMSTART, 173, 203,
|
/* 203: u grave */ {M_NMSTART, 173, 203},
|
||||||
/* 204: a dieresis */ M_NMSTART, 216, 204,
|
/* 204: a dieresis */ {M_NMSTART, 216, 204},
|
||||||
/* 205: e dieresis */ M_NMSTART, 165, 205,
|
/* 205: e dieresis */ {M_NMSTART, 165, 205},
|
||||||
/* 206: o dieresis */ M_NMSTART, 218, 206,
|
/* 206: o dieresis */ {M_NMSTART, 218, 206},
|
||||||
/* 207: u dieresis */ M_NMSTART, 219, 207,
|
/* 207: u dieresis */ {M_NMSTART, 219, 207},
|
||||||
/* 208: A angstrom */ M_NMSTART, 208, 212,
|
/* 208: A angstrom */ {M_NMSTART, 208, 212},
|
||||||
/* 209: i circumflex */ M_NMSTART, 166, 209,
|
/* 209: i circumflex */ {M_NMSTART, 166, 209},
|
||||||
/* 210: O slash */ M_NMSTART, 210, 214,
|
/* 210: O slash */ {M_NMSTART, 210, 214},
|
||||||
/* 211: AE ligature */ M_NMSTART, 211, 215,
|
/* 211: AE ligature */ {M_NMSTART, 211, 215},
|
||||||
/* 212: a angstrom */ M_NMSTART, 208, 212,
|
/* 212: a angstrom */ {M_NMSTART, 208, 212},
|
||||||
/* 213: i acute */ M_NMSTART, 229, 213,
|
/* 213: i acute */ {M_NMSTART, 229, 213},
|
||||||
/* 214: o slash */ M_NMSTART, 210, 214,
|
/* 214: o slash */ {M_NMSTART, 210, 214},
|
||||||
/* 215: ae ligature */ M_NMSTART, 211, 215,
|
/* 215: ae ligature */ {M_NMSTART, 211, 215},
|
||||||
/* 216: A dieresis */ M_NMSTART, 216, 204,
|
/* 216: A dieresis */ {M_NMSTART, 216, 204},
|
||||||
/* 217: i grave */ M_NMSTART, 230, 217,
|
/* 217: i grave */ {M_NMSTART, 230, 217},
|
||||||
/* 218: O dieresis */ M_NMSTART, 218, 206,
|
/* 218: O dieresis */ {M_NMSTART, 218, 206},
|
||||||
/* 219: U dieresis */ M_NMSTART, 219, 207,
|
/* 219: U dieresis */ {M_NMSTART, 219, 207},
|
||||||
/* 220: E acute */ M_NMSTART, 220, 197,
|
/* 220: E acute */ {M_NMSTART, 220, 197},
|
||||||
/* 221: i dieresis */ M_NMSTART, 167, 221,
|
/* 221: i dieresis */ {M_NMSTART, 167, 221},
|
||||||
/* 222: SS ligature */ M_NMSTART, 222, 222,
|
/* 222: SS ligature */ {M_NMSTART, 222, 222},
|
||||||
/* 223: O circumflex */ M_NMSTART, 223, 194,
|
/* 223: O circumflex */ {M_NMSTART, 223, 194},
|
||||||
/* 224: A acute */ M_NMSTART, 224, 196,
|
/* 224: A acute */ {M_NMSTART, 224, 196},
|
||||||
/* 225: A tilde */ M_NMSTART, 225, 226,
|
/* 225: A tilde */ {M_NMSTART, 225, 226},
|
||||||
/* 226: a tilde */ M_NMSTART, 225, 226,
|
/* 226: a tilde */ {M_NMSTART, 225, 226},
|
||||||
/* 227: Eth (invalid) */ M_NMSTART, 227, 228,
|
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
|
||||||
/* 228: eth (invalid) */ M_NMSTART, 227, 228,
|
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
|
||||||
/* 229: I acute */ M_NMSTART, 229, 213,
|
/* 229: I acute */ {M_NMSTART, 229, 213},
|
||||||
/* 230: I grave */ M_NMSTART, 230, 217,
|
/* 230: I grave */ {M_NMSTART, 230, 217},
|
||||||
/* 231: O acute */ M_NMSTART, 231, 198,
|
/* 231: O acute */ {M_NMSTART, 231, 198},
|
||||||
/* 232: O grave */ M_NMSTART, 232, 202,
|
/* 232: O grave */ {M_NMSTART, 232, 202},
|
||||||
/* 233: O tilde */ M_NMSTART, 233, 234,
|
/* 233: O tilde */ {M_NMSTART, 233, 234},
|
||||||
/* 234: o tilde */ M_NMSTART, 233, 234,
|
/* 234: o tilde */ {M_NMSTART, 233, 234},
|
||||||
/* 235: S caron */ M_NMSTART, 235, 236,
|
/* 235: S caron */ {M_NMSTART, 235, 236},
|
||||||
/* 236: s caron */ M_NMSTART, 235, 236,
|
/* 236: s caron */ {M_NMSTART, 235, 236},
|
||||||
/* 237: U acute */ M_NMSTART, 237, 199,
|
/* 237: U acute */ {M_NMSTART, 237, 199},
|
||||||
/* 238: Y dieresis */ M_NMSTART, 238, 239,
|
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
|
||||||
/* 239: y dieresis */ M_NMSTART, 238, 239,
|
/* 239: y dieresis */ {M_NMSTART, 238, 239},
|
||||||
/* 240: Thorn (invalid) */ M_NMSTART, 240, 241,
|
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
|
||||||
/* 241: thorn (invalid) */ M_NMSTART, 240, 241,
|
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
|
||||||
/* 242: undefined */ M_NONNAME, 242, 242,
|
/* 242: undefined */ {M_NONNAME, 242, 242},
|
||||||
/* 243: mu (invalid) */ M_NONNAME, 243, 243,
|
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
|
||||||
/* 244: paragraph sign (invalid) */ M_NONNAME, 244, 244,
|
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
|
||||||
/* 245: fraction 3/4 (invalid) */ M_NONNAME, 245, 245,
|
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
|
||||||
/* 246: long dash (invalid) */ M_NONNAME, 246, 246,
|
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
|
||||||
/* 247: fraction 1/4 (invalid) */ M_NONNAME, 247, 247,
|
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
|
||||||
/* 248: fraction 1/2 (invalid) */ M_NONNAME, 248, 248,
|
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
|
||||||
/* 249: Female ordinal (invalid) */ M_NONNAME, 249, 249,
|
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
|
||||||
/* 250: Male ordinal (invalid) */ M_NONNAME, 250, 250,
|
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
|
||||||
/* 251: French double open quote(invalid) */ M_NONNAME, 251, 251,
|
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
|
||||||
/* 252: Solid square (invalid) */ M_NONNAME, 252, 252,
|
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
|
||||||
/* 253: French double close quote(invalid) */ M_NONNAME, 253, 253,
|
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
|
||||||
/* 254: Plus over minus sign(invalid)*/ M_NONNAME, 254, 254,
|
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
|
||||||
/* 255: undefined */ M_NONNAME, 255, 255,
|
/* 255: undefined */ {M_NONNAME, 255, 255},
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -127,11 +127,13 @@ M_WCHAR wlb = 0, wcm, wnl, wsl, wst;
|
||||||
|
|
||||||
if (!wlb)
|
if (!wlb)
|
||||||
{
|
{
|
||||||
mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
|
int
|
||||||
mbtowc(&wcm, ",", 1);
|
ret = mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
|
||||||
mbtowc(&wnl, "\n", 1);
|
ret = mbtowc(&wcm, ",", 1);
|
||||||
mbtowc(&wsl, "/", 1);
|
ret = mbtowc(&wnl, "\n", 1);
|
||||||
mbtowc(&wst, "*", 1);
|
ret = mbtowc(&wsl, "/", 1);
|
||||||
|
ret = mbtowc(&wst, "*", 1);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
|
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
|
||||||
|
@ -226,7 +228,8 @@ M_WCHAR wcl;
|
||||||
char unexp[32]; /* arbitraily large */
|
char unexp[32]; /* arbitraily large */
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
mbtowc(&wcl, ":", 1);
|
int ret = mbtowc(&wcl, ":", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -252,9 +255,11 @@ char *mb_name;
|
||||||
|
|
||||||
if (!wsm)
|
if (!wsm)
|
||||||
{
|
{
|
||||||
mbtowc(&wsm, ";", 1);
|
int
|
||||||
mbtowc(&wcl, ":", 1);
|
ret = mbtowc(&wsm, ";", 1);
|
||||||
mbtowc(&wcm, ",", 1);
|
ret = mbtowc(&wcl, ":", 1);
|
||||||
|
ret = mbtowc(&wcm, ",", 1);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
|
@ -333,7 +338,7 @@ c = readchar(TRUE))
|
||||||
*p++ = (M_WCHAR) c;
|
*p++ = (M_WCHAR) c;
|
||||||
}
|
}
|
||||||
*p = M_EOS;
|
*p = M_EOS;
|
||||||
if (dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie))
|
if ((dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie)))
|
||||||
{
|
{
|
||||||
withdelim = TRUE;
|
withdelim = TRUE;
|
||||||
curdelim = dstruct->count - 1;
|
curdelim = dstruct->count - 1;
|
||||||
|
@ -451,7 +456,8 @@ int i;
|
||||||
M_WCHAR wnl;
|
M_WCHAR wnl;
|
||||||
char *mb_dname, *mb_dstring;
|
char *mb_dname, *mb_dstring;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
loading = TRUE;
|
loading = TRUE;
|
||||||
while ((c = getc(ddat)) != EOF)
|
while ((c = getc(ddat)) != EOF)
|
||||||
|
@ -526,13 +532,13 @@ while ((c = getc(ddat)) != EOF)
|
||||||
fprintf(delim,
|
fprintf(delim,
|
||||||
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
|
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
|
||||||
mb_dname,
|
mb_dname,
|
||||||
strlen(mb_dstring) + 1);
|
(int)strlen(mb_dstring) + 1);
|
||||||
|
|
||||||
for (p = dstring ; *p ; p++)
|
for (p = dstring ; *p ; p++)
|
||||||
{
|
{
|
||||||
char *pc;
|
char *pc;
|
||||||
char mb_p[32]; /* arbitrarily large */
|
char mb_p[32]; /* arbitrarily large */
|
||||||
int length, i;
|
int length;
|
||||||
|
|
||||||
length = wctomb(mb_p, *p);
|
length = wctomb(mb_p, *p);
|
||||||
mb_p[length] = 0;
|
mb_p[length] = 0;
|
||||||
|
@ -629,7 +635,7 @@ void prtctxt(column, value)
|
||||||
|
|
||||||
if (! first) fprintf(delim, ",\n");
|
if (! first) fprintf(delim, ",\n");
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
fprintf(delim, " %d, %d", column, value);
|
fprintf(delim, " {%d, %d}", column, value);
|
||||||
nonzero++;
|
nonzero++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +651,8 @@ int readchar(cap)
|
||||||
int c;
|
int c;
|
||||||
M_WCHAR wnl;
|
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 */
|
c = mb_getwc(cdat); /* use mb_getwc so we read multi-byte chars */
|
||||||
if (cap && c != EOF) c = m_upper(c);
|
if (cap && c != EOF) c = m_upper(c);
|
||||||
|
@ -667,7 +674,8 @@ int c;
|
||||||
{
|
{
|
||||||
M_WCHAR wnl;
|
M_WCHAR wnl;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
ungetc(c, cdat);
|
ungetc(c, cdat);
|
||||||
if (c == wnl) m_line--;
|
if (c == wnl) m_line--;
|
||||||
|
|
|
@ -72,8 +72,8 @@ void entout(fname)
|
||||||
int nameindex ;
|
int nameindex ;
|
||||||
LOGICAL start ;
|
LOGICAL start ;
|
||||||
|
|
||||||
strcpy(efilename, fname) ;
|
strncpy(efilename, fname, ENTFILENAME) ;
|
||||||
strcpy(&efilename[strlen(efilename)], ".h") ;
|
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
|
||||||
m_openchk(&entfile, efilename, "w") ;
|
m_openchk(&entfile, efilename, "w") ;
|
||||||
|
|
||||||
fprintf(entfile, "#include \"entdef.h\"\n") ;
|
fprintf(entfile, "#include \"entdef.h\"\n") ;
|
||||||
|
@ -101,7 +101,7 @@ void entout(fname)
|
||||||
if (start) fputs(",\n", entfile) ;
|
if (start) fputs(",\n", entfile) ;
|
||||||
start = TRUE ;
|
start = TRUE ;
|
||||||
for (p = ent->content ; *p ; p++)
|
for (p = ent->content ; *p ; p++)
|
||||||
fprintf(entfile, " %d,\n", *p) ;
|
fprintf(entfile, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", entfile) ;
|
fputs(" 0", entfile) ;
|
||||||
}
|
}
|
||||||
fprintf(entfile, "}\n#endif\n") ;
|
fprintf(entfile, "}\n#endif\n") ;
|
||||||
|
@ -112,7 +112,7 @@ void entout(fname)
|
||||||
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
|
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
|
||||||
for (ent = firstent ; ent ; ent = ent->next) {
|
for (ent = firstent ; ent ; ent = ent->next) {
|
||||||
for (p = ent->name ; *p ; p++)
|
for (p = ent->name ; *p ; p++)
|
||||||
fprintf(entfile, " %d,\n", *p) ;
|
fprintf(entfile, " %d,\n", (int)*p) ;
|
||||||
if (ent != lastent) fputs(" 0,\n", entfile) ;
|
if (ent != lastent) fputs(" 0,\n", entfile) ;
|
||||||
else fputs(" 0\n", entfile) ;
|
else fputs(" 0\n", entfile) ;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ void entout(fname)
|
||||||
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
|
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
|
||||||
for (ent = firstent, conindex = 0, nameindex = 0 ;
|
for (ent = firstent, conindex = 0, nameindex = 0 ;
|
||||||
ent ; ent = ent->next) {
|
ent ; ent = ent->next) {
|
||||||
fprintf(entfile, " %s, %s, ",
|
fprintf(entfile, " {%s, %s, ",
|
||||||
typetype(ent->type),
|
typetype(ent->type),
|
||||||
typewhere(ent->wheredef)) ;
|
typewhere(ent->wheredef)) ;
|
||||||
if (ent->content) {
|
if (ent->content) {
|
||||||
|
@ -143,10 +143,10 @@ void entout(fname)
|
||||||
#if defined(BUILDEXTERN)
|
#if defined(BUILDEXTERN)
|
||||||
fprintf(entfile, ", %d", ent->index) ;
|
fprintf(entfile, ", %d", ent->index) ;
|
||||||
if (ent != lastent)
|
if (ent != lastent)
|
||||||
fprintf(entfile, ", &m_entities[%d], 0", ent->index) ;
|
fprintf(entfile, ", &m_entities[%d], 0}", ent->index) ;
|
||||||
else fputs(", NULL, 0", entfile) ;
|
else fputs(", NULL, 0}", entfile) ;
|
||||||
#else
|
#else
|
||||||
fprintf(entfile, ", %d", ent->codeindex) ;
|
fprintf(entfile, ", %d}", ent->codeindex) ;
|
||||||
#endif
|
#endif
|
||||||
if (ent != lastent) fprintf(entfile, ", \n") ;
|
if (ent != lastent) fprintf(entfile, ", \n") ;
|
||||||
else fprintf(entfile, "}\n#endif\n") ;
|
else fprintf(entfile, "}\n#endif\n") ;
|
||||||
|
@ -159,7 +159,7 @@ void entout(fname)
|
||||||
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
|
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
|
||||||
if (m_enttrie->data) {
|
if (m_enttrie->data) {
|
||||||
count = 0 ;
|
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) ;
|
m_dumptrie(entfile, m_enttrie->data, "m_enttrie", &count, entptr) ;
|
||||||
fprintf(entfile, "}\n#endif\n") ;
|
fprintf(entfile, "}\n#endif\n") ;
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,7 @@ char *typewhere(n)
|
||||||
case M_DELTDEF: return(xdeltdef) ;
|
case M_DELTDEF: return(xdeltdef) ;
|
||||||
case FALSE: return("0") ;
|
case FALSE: return("0") ;
|
||||||
}
|
}
|
||||||
|
return("0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -306,8 +306,8 @@ void esuffix(M_NOPAR)
|
||||||
void msgline(text)
|
void msgline(text)
|
||||||
char *text ;
|
char *text ;
|
||||||
{
|
{
|
||||||
fprintf(stderr, text) ;
|
fprintf(stderr, "%s", text) ;
|
||||||
fprintf(m_errfile, text) ;
|
fprintf(m_errfile, "%s", text) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print something to both stderr and m_errfile */
|
/* Print something to both stderr and m_errfile */
|
||||||
|
|
|
@ -130,17 +130,19 @@ void copyfile(pfile1,pfile2)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
char *pcmd;
|
char *pcmd;
|
||||||
|
int slen;
|
||||||
|
|
||||||
/* malloc space for the system command: two filenames, plus a command,
|
/* malloc space for the system command: two filenames, plus a command,
|
||||||
spaces, and the terminating null */
|
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)
|
#if defined(MSDOS)
|
||||||
ret = sprintf(pcmd,"copy %s %s",pfile1,pfile2);
|
ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
|
||||||
#else
|
#else
|
||||||
ret = sprintf(pcmd,"cp %s %s",pfile1,pfile2);
|
ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
|
||||||
#endif
|
#endif
|
||||||
ret = system(pcmd);
|
ret = system(pcmd);
|
||||||
ret = sprintf(pcmd,"touch %s",pfile2);
|
ret = snprintf(pcmd, slen, "touch %s",pfile2);
|
||||||
ret = system(pcmd);
|
ret = system(pcmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,11 +96,11 @@ void m_free(block, msg)
|
||||||
free(block) ;
|
free(block) ;
|
||||||
if (m_malftrace) {
|
if (m_malftrace) {
|
||||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
|
#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) ((unsigned long) block >> 16),
|
||||||
(unsigned int) block, msg) ;
|
(unsigned int) block, msg) ;
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, " %9p", block, msg) ;
|
snprintf(buffer, 32, " %9p", block) ;
|
||||||
#endif
|
#endif
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace("- Freed ") ;
|
m_trace("- Freed ") ;
|
||||||
|
@ -171,14 +171,14 @@ void *m_malloc(size, msg)
|
||||||
}
|
}
|
||||||
if (m_malftrace) {
|
if (m_malftrace) {
|
||||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
|
#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) ;
|
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, " %9p", p) ;
|
snprintf(buffer, 32, " %9p", p) ;
|
||||||
#endif
|
#endif
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace("- Allocated ") ;
|
m_trace("- Allocated ") ;
|
||||||
sprintf(buffer, "%6d", size) ;
|
snprintf(buffer, 32, "%6d", size) ;
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace(" bytes for ") ;
|
m_trace(" bytes for ") ;
|
||||||
m_trace(msg) ;
|
m_trace(msg) ;
|
||||||
|
@ -212,14 +212,14 @@ void *m_realloc(ptr, size, msg)
|
||||||
}
|
}
|
||||||
if (m_malftrace) {
|
if (m_malftrace) {
|
||||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
|
#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) ;
|
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, " %9p", p) ;
|
snprintf(buffer, 32, " %9p", p) ;
|
||||||
#endif
|
#endif
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace("- Re-allocated ") ;
|
m_trace("- Re-allocated ") ;
|
||||||
sprintf(buffer, "%6d", size) ;
|
snprintf(buffer, 32, "%6d", size) ;
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace(" bytes for ") ;
|
m_trace(" bytes for ") ;
|
||||||
m_trace(msg) ;
|
m_trace(msg) ;
|
||||||
|
|
|
@ -33,7 +33,7 @@ int getachar(M_NOPAR)
|
||||||
int c;
|
int c;
|
||||||
M_WCHAR wc,wnl;
|
M_WCHAR wc,wnl;
|
||||||
char mbyte[32]; /* bigger than any possible multibyte char */
|
char mbyte[32]; /* bigger than any possible multibyte char */
|
||||||
int length;
|
int length, ret;
|
||||||
|
|
||||||
if (toundo) wc = (M_WCHAR) savechar[--toundo];
|
if (toundo) wc = (M_WCHAR) savechar[--toundo];
|
||||||
else
|
else
|
||||||
|
@ -58,10 +58,11 @@ else
|
||||||
return(EOF);
|
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 == wnl) m_line++;
|
||||||
|
|
||||||
if (wc == 65535)
|
if (wc == 65535)
|
||||||
|
@ -246,7 +247,8 @@ if (toundo >= SAVECHAR)
|
||||||
savechar[toundo++] = c;
|
savechar[toundo++] = c;
|
||||||
if (toundo > maxundo) maxundo = toundo;
|
if (toundo > maxundo) maxundo = toundo;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
if (c == wnl) m_line--;
|
if (c == wnl) m_line--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ void *m_ntrtrie(p, xtrie, dataval)
|
||||||
M_TRIE *currentnode ;
|
M_TRIE *currentnode ;
|
||||||
void *n ;
|
void *n ;
|
||||||
|
|
||||||
if (n = m_lookfortrie(p, xtrie)) return(n) ;
|
if ((n = m_lookfortrie(p, xtrie))) return(n) ;
|
||||||
currentnode = xtrie ;
|
currentnode = xtrie ;
|
||||||
for ( ; *p ; p++)
|
for ( ; *p ; p++)
|
||||||
m_entercharintrie(¤tnode, m_ctupper(*p)) ;
|
m_entercharintrie(¤tnode, m_ctupper(*p)) ;
|
||||||
|
|
|
@ -88,12 +88,12 @@ void dumpnode(first, file, trieptr, count, proc)
|
||||||
/* generate a child */
|
/* generate a child */
|
||||||
if (*first) *first = FALSE ;
|
if (*first) *first = FALSE ;
|
||||||
else fprintf(file, ",\n") ;
|
else fprintf(file, ",\n") ;
|
||||||
fprintf(file, " ") ;
|
fprintf(file, " {") ;
|
||||||
if (p->next) fprintf(file, "TRUE, ") ;
|
if (p->next) fprintf(file, "TRUE, ") ;
|
||||||
else fprintf(file, "FALSE, ") ;
|
else fprintf(file, "FALSE, ") ;
|
||||||
fprintf(file, "%d", p->symbol) ;
|
fprintf(file, "%d", (int)p->symbol) ;
|
||||||
if (p->symbol) fprintf(file, ", %d", *count) ;
|
if (p->symbol) fprintf(file, ", %d}", *count) ;
|
||||||
else (*proc)(file, p->data) ;
|
else { (*proc)(file, p->data) ; fprintf(file, "}") ; }
|
||||||
|
|
||||||
/* count the children of the child*/
|
/* count the children of the child*/
|
||||||
if (p->symbol) countdown(p, count) ;
|
if (p->symbol) countdown(p, count) ;
|
||||||
|
@ -110,5 +110,5 @@ void printval(file, value)
|
||||||
FILE *file ;
|
FILE *file ;
|
||||||
void *value ;
|
void *value ;
|
||||||
{
|
{
|
||||||
fprintf(file, ", %d", (int) value) ;
|
fprintf(file, ", %ld", (long) value) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,14 +62,14 @@ void m_dumptrie(file, xtrie, extname, count, proc)
|
||||||
|
|
||||||
for (p = xtrie ; p ; p = p->next) {
|
for (p = xtrie ; p ; p = p->next) {
|
||||||
(*count)++ ;
|
(*count)++ ;
|
||||||
fprintf(file, ",\n %d, ", p-> symbol) ;
|
fprintf(file, ",\n {%d, ", (int)p-> symbol) ;
|
||||||
if (p->next) fprintf(file, "&%s[%d], ", extname, *count + 1) ;
|
if (p->next) fprintf(file, "&%s[%d], ", extname, *count + 1) ;
|
||||||
else fputs("NULL, ", file) ;
|
else fputs("NULL, ", file) ;
|
||||||
if (p->symbol) {
|
if (p->symbol) {
|
||||||
fprintf(file, "&%s[%d]", extname, firstson) ;
|
fprintf(file, "&%s[%d]}", extname, firstson) ;
|
||||||
countdown(p, &firstson) ;
|
countdown(p, &firstson) ;
|
||||||
}
|
}
|
||||||
else (*proc) (p->data) ;
|
else { (*proc) (p->data) ; fprintf(file, "}") ; }
|
||||||
}
|
}
|
||||||
|
|
||||||
for (p = xtrie ; p ; p = p->next)
|
for (p = xtrie ; p ; p = p->next)
|
||||||
|
|
|
@ -72,7 +72,7 @@ M_WCHAR *string1start;
|
||||||
|
|
||||||
string1start = string1;
|
string1start = string1;
|
||||||
|
|
||||||
while (*string1++ = *string2++);
|
while ((*string1++ = *string2++));
|
||||||
|
|
||||||
return string1start;
|
return string1start;
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ length = (length + sizeof(M_WCHAR) - 1) / sizeof(M_WCHAR);
|
||||||
mb_string = (char *) m_malloc(length, "multi-byte string");
|
mb_string = (char *) m_malloc(length, "multi-byte string");
|
||||||
|
|
||||||
length = 0;
|
length = 0;
|
||||||
while (wc = *wc_string++)
|
while ((wc = *wc_string++))
|
||||||
{
|
{
|
||||||
if ((retVal = wctomb(&mb_string[length], wc)) > 0)
|
if ((retVal = wctomb(&mb_string[length], wc)) > 0)
|
||||||
length += retVal;
|
length += retVal;
|
||||||
|
@ -226,7 +226,6 @@ char *mb_string;
|
||||||
{
|
{
|
||||||
M_WCHAR *wc_string, *wc_stringStart;
|
M_WCHAR *wc_string, *wc_stringStart;
|
||||||
int length, incr;
|
int length, incr;
|
||||||
char c;
|
|
||||||
|
|
||||||
if (!mb_string)
|
if (!mb_string)
|
||||||
mb_string = "";
|
mb_string = "";
|
||||||
|
@ -244,8 +243,9 @@ while (mb_string[length])
|
||||||
|
|
||||||
badOne[0] = mb_string[length];
|
badOne[0] = mb_string[length];
|
||||||
badOne[1] = 0;
|
badOne[1] = 0;
|
||||||
sprintf(buffer, "0x%x", mb_string[length]);
|
snprintf(buffer, 32, "0x%x", mb_string[length]);
|
||||||
m_err2("invalid multibyte character found: '%c' (%s)", badOne, buffer);
|
m_err2("invalid multibyte character found: '%c' (%s)",
|
||||||
|
(M_WCHAR *)badOne, (M_WCHAR *)buffer);
|
||||||
incr = 1;
|
incr = 1;
|
||||||
}
|
}
|
||||||
length += incr;
|
length += incr;
|
||||||
|
@ -263,7 +263,6 @@ void *m_ptr;
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
M_WCHAR wc;
|
M_WCHAR wc;
|
||||||
char badch[2];
|
|
||||||
char mbyte[32]; /* make this bigger than any possible multi-byte char */
|
char mbyte[32]; /* make this bigger than any possible multi-byte char */
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
|
@ -288,7 +287,8 @@ while (1)
|
||||||
return(EOF);
|
return(EOF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mbtowc(&wc,mbyte,length);
|
int ret = mbtowc(&wc,mbyte,length);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
return((int) wc);
|
return((int) wc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
#include "entdef.h"
|
#include "entdef.h"
|
||||||
|
|
||||||
/* Main procedure */
|
/* Main procedure */
|
||||||
void main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc ;
|
int argc ;
|
||||||
char **argv ;
|
char **argv ;
|
||||||
{
|
{
|
||||||
|
@ -67,8 +67,9 @@ while (TRUE)
|
||||||
if (scantrace)
|
if (scantrace)
|
||||||
printf(
|
printf(
|
||||||
"m_prevcon=%d, m_token=%d, curcon=%d, scanval = %c (%d), line=%d\n",
|
"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"
|
#include "case.c"
|
||||||
if (m_token == ENDFILE) exit(FALSE) ;
|
if (m_token == ENDFILE) exit(FALSE) ;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ LOGICAL *flag;
|
||||||
char *delim;
|
char *delim;
|
||||||
{
|
{
|
||||||
M_WCHAR wcbuff[129];
|
M_WCHAR wcbuff[129];
|
||||||
size_t length;
|
ssize_t length;
|
||||||
|
|
||||||
wcbuff[128] = 0;
|
wcbuff[128] = 0;
|
||||||
length = mbstowcs(wcbuff,delim,128);
|
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, "MARKUP System - BUILD %s\n", M_VERSION) ;
|
||||||
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
|
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
|
||||||
if (! standard)
|
if (! standard)
|
||||||
warning("Warning: optional enhancements of SGML enabled.") ;
|
warning("Info: optional enhancements of SGML enabled.") ;
|
||||||
|
|
||||||
mb_delims = mb_dlmptr;
|
mb_delims = mb_dlmptr;
|
||||||
wc_delims = m_dlmptr;
|
wc_delims = m_dlmptr;
|
||||||
|
@ -112,7 +112,7 @@ void ruleinit(M_NOPAR)
|
||||||
/* Rule end processing */
|
/* Rule end processing */
|
||||||
void rulend(M_NOPAR)
|
void rulend(M_NOPAR)
|
||||||
{
|
{
|
||||||
STATE *fsa ;
|
STATE *fsa = NULL ;
|
||||||
LOGICAL canbenull ;
|
LOGICAL canbenull ;
|
||||||
LHS *lhsp ;
|
LHS *lhsp ;
|
||||||
LHS *discard ;
|
LHS *discard ;
|
||||||
|
@ -153,7 +153,7 @@ void rulend(M_NOPAR)
|
||||||
void skiptoend(M_NOPAR)
|
void skiptoend(M_NOPAR)
|
||||||
{
|
{
|
||||||
int i ;
|
int i ;
|
||||||
static errlev = 0 ;
|
static int errlev = 0 ;
|
||||||
|
|
||||||
if (! errlev++) {
|
if (! errlev++) {
|
||||||
curcon = ERROR ;
|
curcon = ERROR ;
|
||||||
|
|
|
@ -42,7 +42,7 @@ ELTSTRUCT *ntrelt(p)
|
||||||
int length ;
|
int length ;
|
||||||
|
|
||||||
new = (ELTSTRUCT *) m_malloc(sizeof(ELTSTRUCT), "element structure") ;
|
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") ;
|
m_free((M_POINTER) new, "element structure") ;
|
||||||
return(old) ;
|
return(old) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,11 +85,11 @@ void checkand(andstart, andptr, start, root, errelt)
|
||||||
for (pand = parc->group ; pand ; pand = pand->next)
|
for (pand = parc->group ; pand ; pand = pand->next)
|
||||||
checkand(andstart, andptr, pand->start, root, errelt) ;
|
checkand(andstart, andptr, pand->start, root, errelt) ;
|
||||||
}
|
}
|
||||||
else if (c = checkdfsa(andptr->start,
|
else if ((c = checkdfsa(andptr->start,
|
||||||
parc->label,
|
parc->label,
|
||||||
parc->group,
|
parc->group,
|
||||||
parc->id,
|
parc->id,
|
||||||
errelt))
|
errelt)))
|
||||||
nondeterm(root, c, *errelt) ;
|
nondeterm(root, c, *errelt) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ int checkdfsa(from, label, and, id, errelt)
|
||||||
if (parc->group) {
|
if (parc->group) {
|
||||||
if (and == parc->group) return(ANDCONFLICT) ;
|
if (and == parc->group) return(ANDCONFLICT) ;
|
||||||
for (group = parc->group ; group ; group = group->next)
|
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) ;
|
return(c) ;
|
||||||
}
|
}
|
||||||
else if (! and && label == parc->label && parc->id != id) {
|
else if (! and && label == parc->label && parc->id != id) {
|
||||||
|
@ -138,14 +138,14 @@ int checkrepeat(from, and, errelt)
|
||||||
for (; and ; and = and->next)
|
for (; and ; and = and->next)
|
||||||
for (parc = and->start->first ; parc ; parc = parc->next) {
|
for (parc = and->start->first ; parc ; parc = parc->next) {
|
||||||
if (parc->group)
|
if (parc->group)
|
||||||
if (c = checkrepeat(from, parc->group, errelt)) return(c) ;
|
if ((c = checkrepeat(from, parc->group, errelt))) return(c) ;
|
||||||
else ;
|
else ;
|
||||||
else
|
else
|
||||||
if (c = checkdfsa(from,
|
if ((c = checkdfsa(from,
|
||||||
parc->label,
|
parc->label,
|
||||||
M_NULLVAL,
|
M_NULLVAL,
|
||||||
parc->id,
|
parc->id,
|
||||||
errelt))
|
errelt)))
|
||||||
return(c) ;
|
return(c) ;
|
||||||
else ;
|
else ;
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ void makeand(canbenull, root, optional)
|
||||||
TREE *child ;
|
TREE *child ;
|
||||||
STATELIST *start, *final ;
|
STATELIST *start, *final ;
|
||||||
LOGICAL groupbenull ;
|
LOGICAL groupbenull ;
|
||||||
ANDGROUP *andptr, *saveand, *otherand ;
|
ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
|
||||||
STATELIST *index ;
|
STATELIST *index ;
|
||||||
ELTSTRUCT *errelt ;
|
ELTSTRUCT *errelt ;
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ void repeat(root)
|
||||||
for (a = top->starta ; a ; a = a->next) {
|
for (a = top->starta ; a ; a = a->next) {
|
||||||
for (final = top->allfinal ; final ; final = final->next) {
|
for (final = top->allfinal ; final ; final = final->next) {
|
||||||
if (a->group)
|
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);
|
wtemp = MakeWideCharString(root->occurrence == PLUS ? plus : rep);
|
||||||
warning1("Conflict in use of %s", wtemp);
|
warning1("Conflict in use of %s", wtemp);
|
||||||
m_free(wtemp, "wide character string");
|
m_free(wtemp, "wide character string");
|
||||||
|
@ -588,11 +588,11 @@ void repeat(root)
|
||||||
else
|
else
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
if (c = checkdfsa(final->value,
|
if ((c = checkdfsa(final->value,
|
||||||
a->label,
|
a->label,
|
||||||
a->group,
|
a->group,
|
||||||
a->id,
|
a->id,
|
||||||
&errelt))
|
&errelt)))
|
||||||
nondeterm (root, c, errelt) ;
|
nondeterm (root, c, errelt) ;
|
||||||
else
|
else
|
||||||
;
|
;
|
||||||
|
@ -600,14 +600,14 @@ void repeat(root)
|
||||||
for (final = top->finals ; final ; final = final->next) {
|
for (final = top->finals ; final ; final = final->next) {
|
||||||
if (samelabelarc(a, final->value)) continue ;
|
if (samelabelarc(a, final->value)) continue ;
|
||||||
if (a->group)
|
if (a->group)
|
||||||
if (c = checkrepeat(final->value, a->group, &errelt))
|
if ((c = checkrepeat(final->value, a->group, &errelt)))
|
||||||
nondeterm(root, c, errelt) ;
|
nondeterm(root, c, errelt) ;
|
||||||
if (a->label ||
|
if (a->label ||
|
||||||
a->group ||
|
a->group ||
|
||||||
! final->value->frompcdata) {
|
! 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->group, TRUE, a->id,
|
||||||
a->minim, &errelt))
|
a->minim, &errelt)))
|
||||||
nondeterm(root, c, errelt) ;
|
nondeterm(root, c, errelt) ;
|
||||||
if (permitspcd(a)) final->value->datacontent = TRUE ;
|
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
|
states of and-groups that terminate at the start state of the new
|
||||||
arc */
|
arc */
|
||||||
for (index = top->allfinal ; index ; index = index->next)
|
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) ;
|
nondeterm(root, c, errelt) ;
|
||||||
for (index = top->starts ; index ; index = index->next) {
|
for (index = top->starts ; index ; index = index->next) {
|
||||||
if (! group && ! value && index->value->frompcdata)
|
if (! group && ! value && index->value->frompcdata)
|
||||||
|
|
|
@ -31,6 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
#if defined(MSDOS)
|
#if defined(MSDOS)
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,7 +196,7 @@ void eltreeout(M_NOPAR)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = eltp->enptr ; *p ; p++)
|
for (p = eltp->enptr ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -211,14 +212,14 @@ void eltreeout(M_NOPAR)
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
if (! eltp->content)
|
if (! eltp->content)
|
||||||
warning1("No content model for element %s", eltp->enptr) ;
|
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,
|
enameindex, eltp->model ? eltp->model->count : 0,
|
||||||
typecon(eltp->content)) ;
|
typecon(eltp->content)) ;
|
||||||
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
|
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
|
||||||
fprintf(dtd, "%d, %d, %d",
|
fprintf(dtd, "%d, %d, %d",
|
||||||
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
|
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
|
||||||
enameindex += w_strlen(eltp->enptr) + 1 ;
|
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)) ;
|
boolean(eltp->stmin), boolean(eltp->etmin), boolean(eltp->useoradd)) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -259,7 +260,7 @@ void exout(M_NOPAR)
|
||||||
if (! first) fputs(",\n", dtd) ;
|
if (! first) fputs(",\n", dtd) ;
|
||||||
first = FALSE ;
|
first = FALSE ;
|
||||||
exindex++ ;
|
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) ;
|
fputs(ndif, dtd) ;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +295,7 @@ void fsa(M_NOPAR)
|
||||||
for (pstate = firststate ; pstate ; pstate = pstate->next) {
|
for (pstate = firststate ; pstate ; pstate = pstate->next) {
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd, " %s, %s, %d",
|
fprintf(dtd, " {%s, %s, %d}",
|
||||||
boolean(pstate->final), boolean(pstate->datacontent),
|
boolean(pstate->final), boolean(pstate->datacontent),
|
||||||
pstate->first ? ++arcount : 0) ;
|
pstate->first ? ++arcount : 0) ;
|
||||||
for (parc = pstate->first ; parc ; parc = parc->next) {
|
for (parc = pstate->first ; parc ; parc = parc->next) {
|
||||||
|
@ -319,7 +320,7 @@ void fsa(M_NOPAR)
|
||||||
for (pand = firstand ; pand ; pand = pand->nextptr) {
|
for (pand = firstand ; pand ; pand = pand->nextptr) {
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd, " %d, %d",
|
fprintf(dtd, " {%d, %d}",
|
||||||
pand->start->count,
|
pand->start->count,
|
||||||
pand->next ? pand->next->count : M_NULLVAL) ;
|
pand->next ? pand->next->count : M_NULLVAL) ;
|
||||||
}
|
}
|
||||||
|
@ -352,7 +353,7 @@ if (kwlen)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = ptypep->keyword ; *p ; p++)
|
for (p = ptypep->keyword ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -372,7 +373,7 @@ if (deflen)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = paramp->defstring ; *p ; p++)
|
for (p = paramp->defstring ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -392,7 +393,7 @@ if (ptypelen)
|
||||||
{
|
{
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fprintf(dtd, ",\n") ;
|
else fprintf(dtd, ",\n") ;
|
||||||
fprintf(dtd, " %d, %d", kw, ptypep->next) ;
|
fprintf(dtd, " {%d, %d}", kw, ptypep->next) ;
|
||||||
kw += w_strlen(ptypep->keyword) + 1 ;
|
kw += w_strlen(ptypep->keyword) + 1 ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -412,21 +413,21 @@ if (parcount)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd,
|
fprintf(dtd,
|
||||||
" %d, %s, %d, %s, ",
|
" {%d, %s, %d, %s, ",
|
||||||
pnameindex,
|
pnameindex,
|
||||||
partype(paramp->type),
|
partype(paramp->type),
|
||||||
paramp->kwlist,
|
paramp->kwlist,
|
||||||
deftype(paramp->deftype)) ;
|
deftype(paramp->deftype)) ;
|
||||||
pnameindex += w_strlen(paramp->paramname) + 1 ;
|
pnameindex += w_strlen(paramp->paramname) + 1 ;
|
||||||
if (paramp->defval)
|
if (paramp->defval)
|
||||||
fprintf(dtd, "&m_keyword[%d]", paramp->defval - 1) ;
|
fprintf(dtd, "&m_keyword[%d]}", paramp->defval - 1) ;
|
||||||
else if (paramp->defstring)
|
else if (paramp->defstring)
|
||||||
{
|
{
|
||||||
fprintf(dtd, "&m_defval[%d]", defindex) ;
|
fprintf(dtd, "&m_defval[%d]}", defindex) ;
|
||||||
defindex += w_strlen(paramp->defstring) + 1 ;
|
defindex += w_strlen(paramp->defstring) + 1 ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fputs("NULL", dtd) ;
|
fputs("NULL}", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +444,7 @@ if (pnamelen)
|
||||||
{
|
{
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
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(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -534,10 +535,10 @@ void srefout(M_NOPAR)
|
||||||
count++ ;
|
count++ ;
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
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++)
|
for (j++ ; j < sreflen ; j++)
|
||||||
if (mapbysref[sreflen * i + j]) break ;
|
if (mapbysref[sreflen * i + j]) break ;
|
||||||
fprintf(dtd, "%d", j < sreflen ? count + 1 : 0) ;
|
fprintf(dtd, "%d}", j < sreflen ? count + 1 : 0) ;
|
||||||
}
|
}
|
||||||
else j++ ;
|
else j++ ;
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -557,7 +558,7 @@ char *mb_paramname;
|
||||||
int indent ;
|
int indent ;
|
||||||
int i ;
|
int i ;
|
||||||
|
|
||||||
fprintf(tempfile, "\n<ELEMENT %s>\n", eltp->enptr) ;
|
fprintf(tempfile, "\n<ELEMENT %s>\n", (char *)eltp->enptr) ;
|
||||||
if (eltp->parptr)
|
if (eltp->parptr)
|
||||||
{
|
{
|
||||||
fputs(" /*\n", tempfile) ;
|
fputs(" /*\n", tempfile) ;
|
||||||
|
@ -570,7 +571,8 @@ if (eltp->parptr)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
char mbyte[32]; /* larger than any multibyte character */
|
char mbyte[32]; /* larger than any multibyte character */
|
||||||
char *pc, c;
|
char *pc;
|
||||||
|
unsigned char c;
|
||||||
|
|
||||||
length = wctomb(mbyte, *p);
|
length = wctomb(mbyte, *p);
|
||||||
if (length < 0)
|
if (length < 0)
|
||||||
|
@ -600,8 +602,8 @@ if (eltp->parptr)
|
||||||
mb_keyword = MakeMByteString(ptypep->keyword);
|
mb_keyword = MakeMByteString(ptypep->keyword);
|
||||||
fprintf(tempfile,
|
fprintf(tempfile,
|
||||||
"%s = %s",
|
"%s = %s",
|
||||||
ptypep->keyword,
|
(char *)ptypep->keyword,
|
||||||
ptypep->keyword) ;
|
(char *)ptypep->keyword) ;
|
||||||
m_free(mb_keyword,"multi-byte string");
|
m_free(mb_keyword,"multi-byte string");
|
||||||
ptypep = ptypep->next ? ptypep->nextptr : (PTYPE *) NULL ;
|
ptypep = ptypep->next ? ptypep->nextptr : (PTYPE *) NULL ;
|
||||||
if (ptypep)
|
if (ptypep)
|
||||||
|
@ -640,7 +642,7 @@ void template(M_NOPAR)
|
||||||
undefent = TRUE ;
|
undefent = TRUE ;
|
||||||
}
|
}
|
||||||
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
|
fprintf(tempfile, "<!ENTITY %s %s \"\">\n",
|
||||||
ent->name,
|
(char *)ent->name,
|
||||||
enttype(ent->type)
|
enttype(ent->type)
|
||||||
) ;
|
) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ ptypelen++ ;
|
||||||
/* Add a parameter to the current element */
|
/* Add a parameter to the current element */
|
||||||
void addpar(M_NOPAR)
|
void addpar(M_NOPAR)
|
||||||
{
|
{
|
||||||
PARAMETER *paramp, *last ;
|
PARAMETER *paramp, *last = NULL ;
|
||||||
int length ;
|
int length ;
|
||||||
|
|
||||||
parcount++ ;
|
parcount++ ;
|
||||||
|
@ -200,6 +200,7 @@ switch (newpar->type)
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
|
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
|
||||||
|
@ -212,7 +213,7 @@ M_WCHAR *string ;
|
||||||
#endif /* M_PROTO */
|
#endif /* M_PROTO */
|
||||||
{
|
{
|
||||||
M_WCHAR *p, *q ;
|
M_WCHAR *p, *q ;
|
||||||
int i ;
|
int i, ret ;
|
||||||
|
|
||||||
switch (newpar->type)
|
switch (newpar->type)
|
||||||
{
|
{
|
||||||
|
@ -238,7 +239,7 @@ switch (newpar->type)
|
||||||
for (p = string, i = 0 ; *p ; p++, i++)
|
for (p = string, i = 0 ; *p ; p++, i++)
|
||||||
if (m_whitespace(*p))
|
if (m_whitespace(*p))
|
||||||
{
|
{
|
||||||
mbtowc(p, " ", 1);
|
ret = mbtowc(p, " ", 1);
|
||||||
for (q = p + 1 ; m_whitespace(*q); q++) ;
|
for (q = p + 1 ; m_whitespace(*q); q++) ;
|
||||||
w_strcpy(p + 1, q) ;
|
w_strcpy(p + 1, q) ;
|
||||||
}
|
}
|
||||||
|
@ -262,10 +263,13 @@ switch (newpar->type)
|
||||||
mbyte[1] = 0;
|
mbyte[1] = 0;
|
||||||
}
|
}
|
||||||
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
|
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
|
||||||
mbtowc(string, " ", 1);
|
{
|
||||||
|
ret = mbtowc(string, " ", 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called at end of parameter attribute list rule */
|
/* Called at end of parameter attribute list rule */
|
||||||
|
|
|
@ -330,7 +330,7 @@ LOGICAL litproc(
|
||||||
#endif
|
#endif
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
void main(
|
int main(
|
||||||
#if defined(M_PROTO)
|
#if defined(M_PROTO)
|
||||||
int argc, char **argv
|
int argc, char **argv
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -80,9 +80,10 @@ int c;
|
||||||
int n;
|
int n;
|
||||||
M_WCHAR wsp, wnl, wtb;
|
M_WCHAR wsp, wnl, wtb;
|
||||||
|
|
||||||
mbtowc(&wsp, " ", 1);
|
int
|
||||||
mbtowc(&wnl, "\n", 1);
|
ret = mbtowc(&wsp, " ", 1);
|
||||||
mbtowc(&wtb, "\t", 1);
|
ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
ret = mbtowc(&wtb, "\t", 1);
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -158,13 +159,14 @@ while (TRUE)
|
||||||
{
|
{
|
||||||
char mbyte[32]; /* bigger than the biggest multibyte char */
|
char mbyte[32]; /* bigger than the biggest multibyte char */
|
||||||
|
|
||||||
wctomb(mbyte, c);
|
ret = wctomb(mbyte, c);
|
||||||
|
|
||||||
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
|
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
|
||||||
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
|
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
|
||||||
m_error("Unexpected character");
|
m_error("Unexpected character");
|
||||||
}
|
}
|
||||||
} /* End while */
|
} /* End while */
|
||||||
|
(void) ret;
|
||||||
} /* End scan */
|
} /* End scan */
|
||||||
|
|
||||||
#include "scanutil.c"
|
#include "scanutil.c"
|
||||||
|
|
|
@ -40,7 +40,7 @@ void adddefent(mapname)
|
||||||
M_WCHAR *mapname;
|
M_WCHAR *mapname;
|
||||||
{
|
{
|
||||||
M_WCHAR *p;
|
M_WCHAR *p;
|
||||||
int n, length;
|
int n;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
if (!wc_prefix)
|
if (!wc_prefix)
|
||||||
|
@ -59,8 +59,9 @@ for (n = egensuf ; n ; n /= 10)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
c = ('0' + (n % 10));
|
c = ('0' + (n % 10));
|
||||||
mbtowc(p, &c, 1);
|
int ret = mbtowc(p, &c, 1);
|
||||||
*p++;
|
(void) ret;
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
*p = M_EOS;
|
*p = M_EOS;
|
||||||
egensuf++;
|
egensuf++;
|
||||||
|
@ -80,7 +81,7 @@ M_WCHAR *name;
|
||||||
M_ENTITY *new;
|
M_ENTITY *new;
|
||||||
|
|
||||||
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity");
|
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");
|
m_free((M_POINTER) new, "entity");
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
@ -113,7 +114,7 @@ MAP *new;
|
||||||
LOGICAL retval;
|
LOGICAL retval;
|
||||||
|
|
||||||
new = (MAP *) m_malloc(sizeof(MAP), "map");
|
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");
|
m_free(new, "map");
|
||||||
curmap = old->map;
|
curmap = old->map;
|
||||||
|
@ -153,7 +154,7 @@ int noseq = 0;
|
||||||
/* Define the delimiter */
|
/* Define the delimiter */
|
||||||
delim = (SREFSTRUCT *)
|
delim = (SREFSTRUCT *)
|
||||||
m_malloc(sizeof(SREFSTRUCT), "short reference delimiter");
|
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");
|
m_free(delim, "short reference delimiter");
|
||||||
delim = prevsr;
|
delim = prevsr;
|
||||||
|
|
|
@ -626,7 +626,7 @@ name
|
||||||
pcchain:pcchain {
|
pcchain:pcchain {
|
||||||
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
|
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
|
||||||
(*nextchain)->next = NULL ;
|
(*nextchain)->next = NULL ;
|
||||||
if ((*nextchain)->elt = m_packedlook(m_entree, name))
|
if (((*nextchain)->elt = m_packedlook(m_entree, name)))
|
||||||
(*nextchain)->elt++ ;
|
(*nextchain)->elt++ ;
|
||||||
else
|
else
|
||||||
m_err1("Undefined element: %s", name) ;
|
m_err1("Undefined element: %s", name) ;
|
||||||
|
@ -660,61 +660,61 @@ text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globdef:globdef {
|
globdef:globdef {
|
||||||
fprintf(globdef, "%c", textchar) ;
|
fprintf(globdef, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
globdec:globdec {
|
globdec:globdec {
|
||||||
fprintf(globdec, "%c", textchar) ;
|
fprintf(globdec, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
iniss:iniss,
|
iniss:iniss,
|
||||||
inss:inss {
|
inss:inss {
|
||||||
if (! stringstart) fprintf(string, ",\n") ;
|
if (! stringstart) fprintf(string, ",\n") ;
|
||||||
fprintf(string, " %d", textchar) ;
|
fprintf(string, " %d", (int)textchar) ;
|
||||||
stringstart = FALSE ;
|
stringstart = FALSE ;
|
||||||
stringcnt++ ;
|
stringcnt++ ;
|
||||||
}
|
}
|
||||||
inies:inies,
|
inies:inies,
|
||||||
ines:ines {
|
ines:ines {
|
||||||
if (! stringstart) fprintf(string, ",\n") ;
|
if (! stringstart) fprintf(string, ",\n") ;
|
||||||
fprintf(string, " %d", textchar) ;
|
fprintf(string, " %d", (int)textchar) ;
|
||||||
stringstart = FALSE ;
|
stringstart = FALSE ;
|
||||||
stringcnt++ ;
|
stringcnt++ ;
|
||||||
}
|
}
|
||||||
inisc:inisc,
|
inisc:inisc,
|
||||||
insc:insc {
|
insc:insc {
|
||||||
fprintf(sfile, "%c", textchar) ;
|
fprintf(sfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
iniec:iniec,
|
iniec:iniec,
|
||||||
inec:inec {
|
inec:inec {
|
||||||
fprintf(efile, "%c", textchar) ;
|
fprintf(efile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
initc:initc,
|
initc:initc,
|
||||||
intc:intc {
|
intc:intc {
|
||||||
fprintf(tfile, "%c", textchar) ;
|
fprintf(tfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inipc:inipc,
|
inipc:inipc,
|
||||||
inpc:inpc {
|
inpc:inpc {
|
||||||
fprintf(pfile, "%c", textchar) ;
|
fprintf(pfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inistc:inistc,
|
inistc:inistc,
|
||||||
instc:instc {
|
instc:instc {
|
||||||
fprintf(stfile, "%c", textchar) ;
|
fprintf(stfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inentc:inentc {
|
inentc:inentc {
|
||||||
fprintf(entfile, "%c", textchar) ;
|
fprintf(entfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ int main(argc, argv)
|
||||||
{
|
{
|
||||||
int m_token ;
|
int m_token ;
|
||||||
|
|
||||||
if (argc > 2)
|
if (argc > 2) {
|
||||||
if (*argv[2] == '-') {
|
if (*argv[2] == '-') {
|
||||||
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
|
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
|
||||||
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,
|
fprintf(stderr,
|
||||||
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
|
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
|
||||||
) ;
|
) ;
|
||||||
|
}
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
fprintf(stderr, "**** Specify interface file ****\n") ;
|
fprintf(stderr, "**** Specify interface file ****\n") ;
|
||||||
exit(TRUE) ;
|
exit(TRUE) ;
|
||||||
|
@ -84,7 +85,7 @@ int main(argc, argv)
|
||||||
if (scantrace)
|
if (scantrace)
|
||||||
printf(
|
printf(
|
||||||
"Main: m_prevcon=%d,m_token=%d,curcon=%d,textchar='%c'(%d), line=%d\n",
|
"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"
|
#include "case.c"
|
||||||
if (m_token == ENDFILE) break ;
|
if (m_token == ENDFILE) break ;
|
||||||
if (! curcon) {
|
if (! curcon) {
|
||||||
|
|
|
@ -106,7 +106,7 @@ void cvalue(M_NOPAR)
|
||||||
PARVAL *new;
|
PARVAL *new;
|
||||||
|
|
||||||
new = (PARVAL *) m_malloc(sizeof(PARVAL), "parameter value");
|
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");
|
m_free(new, "parameter value");
|
||||||
else {
|
else {
|
||||||
new->line = 0;
|
new->line = 0;
|
||||||
|
@ -467,7 +467,7 @@ for ( ; p ; p = p->next)
|
||||||
iffile);
|
iffile);
|
||||||
fprintf(pvalh, "#define %s \"", mb_cname);
|
fprintf(pvalh, "#define %s \"", mb_cname);
|
||||||
m_free(mb_cname,"multi-byte string");
|
m_free(mb_cname,"multi-byte string");
|
||||||
if (q = ((PARVAL *) p->data)->value)
|
if ((q = ((PARVAL *) p->data)->value))
|
||||||
for ( ; *q ; q++)
|
for ( ; *q ; q++)
|
||||||
{
|
{
|
||||||
char mbq[32]; /* larger than largest possible mbyte char */
|
char mbq[32]; /* larger than largest possible mbyte char */
|
||||||
|
@ -498,7 +498,7 @@ for ( ; p ; p = p->next)
|
||||||
void skiptoend(M_NOPAR)
|
void skiptoend(M_NOPAR)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static errlev = 0;
|
static int errlev = 0;
|
||||||
CVARSTRUCT *cvarp, *dvarp;
|
CVARSTRUCT *cvarp, *dvarp;
|
||||||
|
|
||||||
for (cvarp = cvarlist ; cvarp ;) {
|
for (cvarp = cvarlist ; cvarp ;) {
|
||||||
|
@ -615,7 +615,7 @@ void startelement(M_NOPAR)
|
||||||
m_free(discard, "C variable");
|
m_free(discard, "C variable");
|
||||||
}
|
}
|
||||||
cvarlist = NULL;
|
cvarlist = NULL;
|
||||||
if (openelt = m_packedlook(m_entree, name)) {
|
if ((openelt = m_packedlook(m_entree, name))) {
|
||||||
if (processed[openelt - 1])
|
if (processed[openelt - 1])
|
||||||
warning1("Warning: Element %s already processed", name);
|
warning1("Warning: Element %s already processed", name);
|
||||||
processed[openelt - 1] = TRUE;
|
processed[openelt - 1] = TRUE;
|
||||||
|
@ -670,7 +670,7 @@ if (m_partype(cvarlist->param + m_element[openelt - 1].parptr, p))
|
||||||
{
|
{
|
||||||
M_WCHAR *w_buffer;
|
M_WCHAR *w_buffer;
|
||||||
|
|
||||||
sprintf(buffer, "%d", pval->line);
|
snprintf(buffer, 5, "%d", pval->line);
|
||||||
w_buffer = MakeWideCharString(buffer);
|
w_buffer = MakeWideCharString(buffer);
|
||||||
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
|
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
|
||||||
pval->cname,
|
pval->cname,
|
||||||
|
|
|
@ -40,7 +40,7 @@ void addent(M_NOPAR)
|
||||||
M_ENTITY *new ;
|
M_ENTITY *new ;
|
||||||
|
|
||||||
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity") ;
|
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") ;
|
m_free(new, "entity") ;
|
||||||
if (! entity->wheredef) return ;
|
if (! entity->wheredef) return ;
|
||||||
if (entity->wheredef == M_DBUILD) {
|
if (entity->wheredef == M_DBUILD) {
|
||||||
|
|
|
@ -53,7 +53,8 @@ M_WCHAR *p, wus;
|
||||||
int c, cttype;
|
int c, cttype;
|
||||||
LOGICAL cname;
|
LOGICAL cname;
|
||||||
|
|
||||||
mbtowc(&wus, "_", 1);
|
int ret = mbtowc(&wus, "_", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
|
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
|
||||||
*(p = name) = (M_WCHAR) first;
|
*(p = name) = (M_WCHAR) first;
|
||||||
|
@ -92,7 +93,8 @@ int n;
|
||||||
static char unexp[] = "c";
|
static char unexp[] = "c";
|
||||||
M_WCHAR wus;
|
M_WCHAR wus;
|
||||||
|
|
||||||
mbtowc(&wus, "_", 1);
|
int ret = mbtowc(&wus, "_", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,3 +112,21 @@ void *m_malloc(
|
||||||
int size, char *msg
|
int size, char *msg
|
||||||
#endif
|
#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
|
||||||
|
) ;
|
||||||
|
|
|
@ -29,262 +29,262 @@ by HP Tag are marked "(invalid)". */
|
||||||
M_CHARTYPE m_ctarray[M_CHARSETLEN]
|
M_CHARTYPE m_ctarray[M_CHARSETLEN]
|
||||||
= {
|
= {
|
||||||
/* Char Name Type, Upper, Lower */
|
/* Char Name Type, Upper, Lower */
|
||||||
/* 0: ^@ NUL */ M_NONNAME, 0, 0,
|
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
|
||||||
/* 1: ^A SOH */ M_NONNAME, 1, 1,
|
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
|
||||||
/* 2: ^B STX */ M_NONNAME, 2, 2,
|
/* 2: ^B STX */ {M_NONNAME, 2, 2},
|
||||||
/* 3: ^C ETX */ M_NONNAME, 3, 3,
|
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
|
||||||
/* 4: ^D EOT */ M_NONNAME, 4, 4,
|
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
|
||||||
/* 5: ^E ENQ */ M_NONNAME, 5, 5,
|
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
|
||||||
/* 6: ^F ACK */ M_NONNAME, 6, 6,
|
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
|
||||||
/* 7: ^G BEL */ M_NONNAME, 7, 7,
|
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
|
||||||
/* 8: ^H BS */ M_NONNAME, 8, 8,
|
/* 8: ^H BS */ {M_NONNAME, 8, 8},
|
||||||
/* 9: ^I HT */ M_NONNAME, 9, 9,
|
/* 9: ^I HT */ {M_NONNAME, 9, 9},
|
||||||
/* 10: ^J LF */ M_NONNAME, 10, 10,
|
/* 10: ^J LF */ {M_NONNAME, 10, 10},
|
||||||
/* 11: ^K VT */ M_NONNAME, 11, 11,
|
/* 11: ^K VT */ {M_NONNAME, 11, 11},
|
||||||
/* 12: ^L FF */ M_NONNAME, 12, 12,
|
/* 12: ^L FF */ {M_NONNAME, 12, 12},
|
||||||
/* 13: ^M CR */ M_NONNAME, 13, 13,
|
/* 13: ^M CR */ {M_NONNAME, 13, 13},
|
||||||
/* 14: ^N SO */ M_NONNAME, 14, 14,
|
/* 14: ^N SO */ {M_NONNAME, 14, 14},
|
||||||
/* 15: ^O SI */ M_NONNAME, 15, 15,
|
/* 15: ^O SI */ {M_NONNAME, 15, 15},
|
||||||
/* 16: ^P DLE */ M_NONNAME, 16, 16,
|
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
|
||||||
/* 17: ^Q DC1 */ M_NONNAME, 17, 17,
|
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
|
||||||
/* 18: ^R DC2 */ M_NONNAME, 18, 18,
|
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
|
||||||
/* 19: ^S DC3 */ M_NONNAME, 19, 19,
|
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
|
||||||
/* 20: ^T DC4 */ M_NONNAME, 20, 20,
|
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
|
||||||
/* 21: ^U NAK */ M_NONNAME, 21, 21,
|
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
|
||||||
/* 22: ^V SYN */ M_NONNAME, 22, 22,
|
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
|
||||||
/* 23: ^W ETB */ M_NONNAME, 23, 23,
|
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
|
||||||
/* 24: ^X CAN */ M_NONNAME, 24, 24,
|
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
|
||||||
/* 25: ^Y EM */ M_NONNAME, 25, 25,
|
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
|
||||||
/* 26: ^Z SUB */ M_NONNAME, 26, 26,
|
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
|
||||||
/* 27: ^[ ESC */ M_NONNAME, 27, 27,
|
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
|
||||||
/* 28: ^\ FS */ M_NONNAME, 28, 28,
|
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
|
||||||
/* 29: ^] GS */ M_NONNAME, 29, 29,
|
/* 29: ^] GS */ {M_NONNAME, 29, 29},
|
||||||
/* 30: ^^ RS */ M_NONNAME, 30, 30,
|
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
|
||||||
/* 31: ^_ US */ M_NONNAME, 31, 31,
|
/* 31: ^_ US */ {M_NONNAME, 31, 31},
|
||||||
/* 32: SP */ M_NONNAME, 32, 32,
|
/* 32: SP */ {M_NONNAME, 32, 32},
|
||||||
/* 33: ! */ M_NONNAME, 33, 33,
|
/* 33: ! */ {M_NONNAME, 33, 33},
|
||||||
/* 34: " */ M_NONNAME, 34, 34,
|
/* 34: " */ {M_NONNAME, 34, 34},
|
||||||
/* 35: # */ M_NONNAME, 35, 35,
|
/* 35: # */ {M_NONNAME, 35, 35},
|
||||||
/* 36: $ */ M_NONNAME, 36, 36,
|
/* 36: $ */ {M_NONNAME, 36, 36},
|
||||||
/* 37: % */ M_NONNAME, 37, 37,
|
/* 37: % */ {M_NONNAME, 37, 37},
|
||||||
/* 38: & */ M_NONNAME, 38, 38,
|
/* 38: & */ {M_NONNAME, 38, 38},
|
||||||
/* 39: ' */ M_NONNAME, 39, 39,
|
/* 39: ' */ {M_NONNAME, 39, 39},
|
||||||
/* 40: ( */ M_NONNAME, 40, 40,
|
/* 40: ( */ {M_NONNAME, 40, 40},
|
||||||
/* 41: ) */ M_NONNAME, 41, 41,
|
/* 41: ) */ {M_NONNAME, 41, 41},
|
||||||
/* 42: * */ M_NONNAME, 42, 42,
|
/* 42: * */ {M_NONNAME, 42, 42},
|
||||||
/* 43: + */ M_NAMECHAR, 43, 43,
|
/* 43: + */ {M_NAMECHAR, 43, 43},
|
||||||
/* 44: , */ M_NONNAME, 44, 44,
|
/* 44: , */ {M_NONNAME, 44, 44},
|
||||||
/* 45: - */ M_NAMECHAR, 45, 45,
|
/* 45: - */ {M_NAMECHAR, 45, 45},
|
||||||
/* 46: . */ M_NAMECHAR, 46, 46,
|
/* 46: . */ {M_NAMECHAR, 46, 46},
|
||||||
/* 47: / */ M_NONNAME, 47, 47,
|
/* 47: / */ {M_NONNAME, 47, 47},
|
||||||
/* 48: 0 */ M_DIGIT, 48, 48,
|
/* 48: 0 */ {M_DIGIT, 48, 48},
|
||||||
/* 49: 1 */ M_DIGIT, 49, 49,
|
/* 49: 1 */ {M_DIGIT, 49, 49},
|
||||||
/* 50: 2 */ M_DIGIT, 50, 50,
|
/* 50: 2 */ {M_DIGIT, 50, 50},
|
||||||
/* 51: 3 */ M_DIGIT, 51, 51,
|
/* 51: 3 */ {M_DIGIT, 51, 51},
|
||||||
/* 52: 4 */ M_DIGIT, 52, 52,
|
/* 52: 4 */ {M_DIGIT, 52, 52},
|
||||||
/* 53: 5 */ M_DIGIT, 53, 53,
|
/* 53: 5 */ {M_DIGIT, 53, 53},
|
||||||
/* 54: 6 */ M_DIGIT, 54, 54,
|
/* 54: 6 */ {M_DIGIT, 54, 54},
|
||||||
/* 55: 7 */ M_DIGIT, 55, 55,
|
/* 55: 7 */ {M_DIGIT, 55, 55},
|
||||||
/* 56: 8 */ M_DIGIT, 56, 56,
|
/* 56: 8 */ {M_DIGIT, 56, 56},
|
||||||
/* 57: 9 */ M_DIGIT, 57, 57,
|
/* 57: 9 */ {M_DIGIT, 57, 57},
|
||||||
/* 58: : */ M_NONNAME, 58, 58,
|
/* 58: : */ {M_NONNAME, 58, 58},
|
||||||
/* 59: ; */ M_NONNAME, 59, 59,
|
/* 59: ; */ {M_NONNAME, 59, 59},
|
||||||
/* 60: < */ M_NONNAME, 60, 60,
|
/* 60: < */ {M_NONNAME, 60, 60},
|
||||||
/* 61: = */ M_NONNAME, 61, 61,
|
/* 61: = */ {M_NONNAME, 61, 61},
|
||||||
/* 62: > */ M_NONNAME, 62, 62,
|
/* 62: > */ {M_NONNAME, 62, 62},
|
||||||
/* 63: ? */ M_NONNAME, 63, 63,
|
/* 63: ? */ {M_NONNAME, 63, 63},
|
||||||
/* 64: @ */ M_NONNAME, 64, 64,
|
/* 64: @ */ {M_NONNAME, 64, 64},
|
||||||
/* 65: A */ M_NMSTART, 65, 97,
|
/* 65: A */ {M_NMSTART, 65, 97},
|
||||||
/* 66: B */ M_NMSTART, 66, 98,
|
/* 66: B */ {M_NMSTART, 66, 98},
|
||||||
/* 67: C */ M_NMSTART, 67, 99,
|
/* 67: C */ {M_NMSTART, 67, 99},
|
||||||
/* 68: D */ M_NMSTART, 68, 100,
|
/* 68: D */ {M_NMSTART, 68, 100},
|
||||||
/* 69: E */ M_NMSTART, 69, 101,
|
/* 69: E */ {M_NMSTART, 69, 101},
|
||||||
/* 70: F */ M_NMSTART, 70, 102,
|
/* 70: F */ {M_NMSTART, 70, 102},
|
||||||
/* 71: G */ M_NMSTART, 71, 103,
|
/* 71: G */ {M_NMSTART, 71, 103},
|
||||||
/* 72: H */ M_NMSTART, 72, 104,
|
/* 72: H */ {M_NMSTART, 72, 104},
|
||||||
/* 73: I */ M_NMSTART, 73, 105,
|
/* 73: I */ {M_NMSTART, 73, 105},
|
||||||
/* 74: J */ M_NMSTART, 74, 106,
|
/* 74: J */ {M_NMSTART, 74, 106},
|
||||||
/* 75: K */ M_NMSTART, 75, 107,
|
/* 75: K */ {M_NMSTART, 75, 107},
|
||||||
/* 76: L */ M_NMSTART, 76, 108,
|
/* 76: L */ {M_NMSTART, 76, 108},
|
||||||
/* 77: M */ M_NMSTART, 77, 109,
|
/* 77: M */ {M_NMSTART, 77, 109},
|
||||||
/* 78: N */ M_NMSTART, 78, 110,
|
/* 78: N */ {M_NMSTART, 78, 110},
|
||||||
/* 79: O */ M_NMSTART, 79, 111,
|
/* 79: O */ {M_NMSTART, 79, 111},
|
||||||
/* 80: P */ M_NMSTART, 80, 112,
|
/* 80: P */ {M_NMSTART, 80, 112},
|
||||||
/* 81: Q */ M_NMSTART, 81, 113,
|
/* 81: Q */ {M_NMSTART, 81, 113},
|
||||||
/* 82: R */ M_NMSTART, 82, 114,
|
/* 82: R */ {M_NMSTART, 82, 114},
|
||||||
/* 83: S */ M_NMSTART, 83, 115,
|
/* 83: S */ {M_NMSTART, 83, 115},
|
||||||
/* 84: T */ M_NMSTART, 84, 116,
|
/* 84: T */ {M_NMSTART, 84, 116},
|
||||||
/* 85: U */ M_NMSTART, 85, 117,
|
/* 85: U */ {M_NMSTART, 85, 117},
|
||||||
/* 86: V */ M_NMSTART, 86, 118,
|
/* 86: V */ {M_NMSTART, 86, 118},
|
||||||
/* 87: W */ M_NMSTART, 87, 119,
|
/* 87: W */ {M_NMSTART, 87, 119},
|
||||||
/* 88: X */ M_NMSTART, 88, 120,
|
/* 88: X */ {M_NMSTART, 88, 120},
|
||||||
/* 89: Y */ M_NMSTART, 89, 121,
|
/* 89: Y */ {M_NMSTART, 89, 121},
|
||||||
/* 90: Z */ M_NMSTART, 90, 122,
|
/* 90: Z */ {M_NMSTART, 90, 122},
|
||||||
/* 91: [ */ M_NONNAME, 91, 91,
|
/* 91: [ */ {M_NONNAME, 91, 91},
|
||||||
/* 92: \\ */ M_NONNAME, 92, 92,
|
/* 92: \\ */ {M_NONNAME, 92, 92},
|
||||||
/* 93: ] */ M_NONNAME, 93, 93,
|
/* 93: ] */ {M_NONNAME, 93, 93},
|
||||||
/* 94: ^ */ M_NONNAME, 94, 94,
|
/* 94: ^ */ {M_NONNAME, 94, 94},
|
||||||
/* 95: _ */ M_NONNAME, 95, 95,
|
/* 95: _ */ {M_NONNAME, 95, 95},
|
||||||
/* 96: ` */ M_NONNAME, 96, 96,
|
/* 96: ` */ {M_NONNAME, 96, 96},
|
||||||
/* 97: a */ M_NMSTART, 65, 97,
|
/* 97: a */ {M_NMSTART, 65, 97},
|
||||||
/* 98: b */ M_NMSTART, 66, 98,
|
/* 98: b */ {M_NMSTART, 66, 98},
|
||||||
/* 99: c */ M_NMSTART, 67, 99,
|
/* 99: c */ {M_NMSTART, 67, 99},
|
||||||
/* 100: d */ M_NMSTART, 68, 100,
|
/* 100: d */ {M_NMSTART, 68, 100},
|
||||||
/* 101: e */ M_NMSTART, 69, 101,
|
/* 101: e */ {M_NMSTART, 69, 101},
|
||||||
/* 102: f */ M_NMSTART, 70, 102,
|
/* 102: f */ {M_NMSTART, 70, 102},
|
||||||
/* 103: g */ M_NMSTART, 71, 103,
|
/* 103: g */ {M_NMSTART, 71, 103},
|
||||||
/* 104: h */ M_NMSTART, 72, 104,
|
/* 104: h */ {M_NMSTART, 72, 104},
|
||||||
/* 105: i */ M_NMSTART, 73, 105,
|
/* 105: i */ {M_NMSTART, 73, 105},
|
||||||
/* 106: j */ M_NMSTART, 74, 106,
|
/* 106: j */ {M_NMSTART, 74, 106},
|
||||||
/* 107: k */ M_NMSTART, 75, 107,
|
/* 107: k */ {M_NMSTART, 75, 107},
|
||||||
/* 108: l */ M_NMSTART, 76, 108,
|
/* 108: l */ {M_NMSTART, 76, 108},
|
||||||
/* 109: m */ M_NMSTART, 77, 109,
|
/* 109: m */ {M_NMSTART, 77, 109},
|
||||||
/* 110: n */ M_NMSTART, 78, 110,
|
/* 110: n */ {M_NMSTART, 78, 110},
|
||||||
/* 111: o */ M_NMSTART, 79, 111,
|
/* 111: o */ {M_NMSTART, 79, 111},
|
||||||
/* 112: p */ M_NMSTART, 80, 112,
|
/* 112: p */ {M_NMSTART, 80, 112},
|
||||||
/* 113: q */ M_NMSTART, 81, 113,
|
/* 113: q */ {M_NMSTART, 81, 113},
|
||||||
/* 114: r */ M_NMSTART, 82, 114,
|
/* 114: r */ {M_NMSTART, 82, 114},
|
||||||
/* 115: s */ M_NMSTART, 83, 115,
|
/* 115: s */ {M_NMSTART, 83, 115},
|
||||||
/* 116: t */ M_NMSTART, 84, 116,
|
/* 116: t */ {M_NMSTART, 84, 116},
|
||||||
/* 117: u */ M_NMSTART, 85, 117,
|
/* 117: u */ {M_NMSTART, 85, 117},
|
||||||
/* 118: v */ M_NMSTART, 86, 118,
|
/* 118: v */ {M_NMSTART, 86, 118},
|
||||||
/* 119: w */ M_NMSTART, 87, 119,
|
/* 119: w */ {M_NMSTART, 87, 119},
|
||||||
/* 120: x */ M_NMSTART, 88, 120,
|
/* 120: x */ {M_NMSTART, 88, 120},
|
||||||
/* 121: y */ M_NMSTART, 89, 121,
|
/* 121: y */ {M_NMSTART, 89, 121},
|
||||||
/* 122: z */ M_NMSTART, 90, 122,
|
/* 122: z */ {M_NMSTART, 90, 122},
|
||||||
/* 123: { */ M_NONNAME, 123, 123,
|
/* 123: { */ {M_NONNAME, 123, 123},
|
||||||
/* 124: | */ M_NONNAME, 124, 124,
|
/* 124: | */ {M_NONNAME, 124, 124},
|
||||||
/* 125: } */ M_NONNAME, 125, 125,
|
/* 125: } */ {M_NONNAME, 125, 125},
|
||||||
/* 126: ~ */ M_NONNAME, 126, 126,
|
/* 126: ~ */ {M_NONNAME, 126, 126},
|
||||||
/* 127: DEL */ M_NONNAME, 127, 127,
|
/* 127: DEL */ {M_NONNAME, 127, 127},
|
||||||
/* 128: undefined */ M_NONNAME, 128, 128,
|
/* 128: undefined */ {M_NONNAME, 128, 128},
|
||||||
/* 129: undefined */ M_NONNAME, 129, 129,
|
/* 129: undefined */ {M_NONNAME, 129, 129},
|
||||||
/* 130: undefined */ M_NONNAME, 130, 130,
|
/* 130: undefined */ {M_NONNAME, 130, 130},
|
||||||
/* 131: undefined */ M_NONNAME, 131, 131,
|
/* 131: undefined */ {M_NONNAME, 131, 131},
|
||||||
/* 132: undefined */ M_NONNAME, 132, 132,
|
/* 132: undefined */ {M_NONNAME, 132, 132},
|
||||||
/* 133: undefined */ M_NONNAME, 133, 133,
|
/* 133: undefined */ {M_NONNAME, 133, 133},
|
||||||
/* 134: undefined */ M_NONNAME, 134, 134,
|
/* 134: undefined */ {M_NONNAME, 134, 134},
|
||||||
/* 135: undefined */ M_NONNAME, 135, 135,
|
/* 135: undefined */ {M_NONNAME, 135, 135},
|
||||||
/* 136: undefined */ M_NONNAME, 136, 136,
|
/* 136: undefined */ {M_NONNAME, 136, 136},
|
||||||
/* 137: undefined */ M_NONNAME, 137, 137,
|
/* 137: undefined */ {M_NONNAME, 137, 137},
|
||||||
/* 138: undefined */ M_NONNAME, 138, 138,
|
/* 138: undefined */ {M_NONNAME, 138, 138},
|
||||||
/* 139: undefined */ M_NONNAME, 139, 139,
|
/* 139: undefined */ {M_NONNAME, 139, 139},
|
||||||
/* 140: undefined */ M_NONNAME, 140, 140,
|
/* 140: undefined */ {M_NONNAME, 140, 140},
|
||||||
/* 141: undefined */ M_NONNAME, 141, 141,
|
/* 141: undefined */ {M_NONNAME, 141, 141},
|
||||||
/* 142: undefined */ M_NONNAME, 142, 142,
|
/* 142: undefined */ {M_NONNAME, 142, 142},
|
||||||
/* 143: undefined */ M_NONNAME, 143, 143,
|
/* 143: undefined */ {M_NONNAME, 143, 143},
|
||||||
/* 144: undefined */ M_NONNAME, 144, 144,
|
/* 144: undefined */ {M_NONNAME, 144, 144},
|
||||||
/* 145: undefined */ M_NONNAME, 145, 145,
|
/* 145: undefined */ {M_NONNAME, 145, 145},
|
||||||
/* 146: undefined */ M_NONNAME, 146, 146,
|
/* 146: undefined */ {M_NONNAME, 146, 146},
|
||||||
/* 147: undefined */ M_NONNAME, 147, 147,
|
/* 147: undefined */ {M_NONNAME, 147, 147},
|
||||||
/* 148: undefined */ M_NONNAME, 148, 148,
|
/* 148: undefined */ {M_NONNAME, 148, 148},
|
||||||
/* 149: undefined */ M_NONNAME, 149, 149,
|
/* 149: undefined */ {M_NONNAME, 149, 149},
|
||||||
/* 150: undefined */ M_NONNAME, 150, 150,
|
/* 150: undefined */ {M_NONNAME, 150, 150},
|
||||||
/* 151: undefined */ M_NONNAME, 151, 151,
|
/* 151: undefined */ {M_NONNAME, 151, 151},
|
||||||
/* 152: undefined */ M_NONNAME, 152, 152,
|
/* 152: undefined */ {M_NONNAME, 152, 152},
|
||||||
/* 153: undefined */ M_NONNAME, 153, 153,
|
/* 153: undefined */ {M_NONNAME, 153, 153},
|
||||||
/* 154: undefined */ M_NONNAME, 154, 154,
|
/* 154: undefined */ {M_NONNAME, 154, 154},
|
||||||
/* 155: undefined */ M_NONNAME, 155, 155,
|
/* 155: undefined */ {M_NONNAME, 155, 155},
|
||||||
/* 156: undefined */ M_NONNAME, 156, 156,
|
/* 156: undefined */ {M_NONNAME, 156, 156},
|
||||||
/* 157: undefined */ M_NONNAME, 157, 157,
|
/* 157: undefined */ {M_NONNAME, 157, 157},
|
||||||
/* 158: undefined */ M_NONNAME, 158, 158,
|
/* 158: undefined */ {M_NONNAME, 158, 158},
|
||||||
/* 159: undefined */ M_NONNAME, 159, 159,
|
/* 159: undefined */ {M_NONNAME, 159, 159},
|
||||||
/* 160: undefined */ M_NONNAME, 160, 160,
|
/* 160: undefined */ {M_NONNAME, 160, 160},
|
||||||
/* 161: A grave */ M_NMSTART, 161, 200,
|
/* 161: A grave */ {M_NMSTART, 161, 200},
|
||||||
/* 162: A circumflex */ M_NMSTART, 162, 192,
|
/* 162: A circumflex */ {M_NMSTART, 162, 192},
|
||||||
/* 163: E grave */ M_NMSTART, 163, 201,
|
/* 163: E grave */ {M_NMSTART, 163, 201},
|
||||||
/* 164: E circumflex */ M_NMSTART, 164, 193,
|
/* 164: E circumflex */ {M_NMSTART, 164, 193},
|
||||||
/* 165: E dieresis */ M_NMSTART, 165, 205,
|
/* 165: E dieresis */ {M_NMSTART, 165, 205},
|
||||||
/* 166: I circumflex */ M_NMSTART, 166, 209,
|
/* 166: I circumflex */ {M_NMSTART, 166, 209},
|
||||||
/* 167: I dieresis */ M_NMSTART, 167, 221,
|
/* 167: I dieresis */ {M_NMSTART, 167, 221},
|
||||||
/* 168: acute accent */ M_NONNAME, 168, 168,
|
/* 168: acute accent */ {M_NONNAME, 168, 168},
|
||||||
/* 169: grave accent */ M_NONNAME, 169, 169,
|
/* 169: grave accent */ {M_NONNAME, 169, 169},
|
||||||
/* 170: circumflex */ M_NONNAME, 170, 170,
|
/* 170: circumflex */ {M_NONNAME, 170, 170},
|
||||||
/* 171: dieresis */ M_NONNAME, 171, 171,
|
/* 171: dieresis */ {M_NONNAME, 171, 171},
|
||||||
/* 172: tilde */ M_NONNAME, 172, 172,
|
/* 172: tilde */ {M_NONNAME, 172, 172},
|
||||||
/* 173: U grave */ M_NMSTART, 173, 203,
|
/* 173: U grave */ {M_NMSTART, 173, 203},
|
||||||
/* 174: U circumflex */ M_NMSTART, 174, 195,
|
/* 174: U circumflex */ {M_NMSTART, 174, 195},
|
||||||
/* 175: Italian Lira (invalid) */ M_NONNAME, 175, 175,
|
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
|
||||||
/* 176: overbar (invalid) */ M_NONNAME, 176, 176,
|
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
|
||||||
/* 177: Y acute */ M_NMSTART, 177, 178,
|
/* 177: Y acute */ {M_NMSTART, 177, 178},
|
||||||
/* 178: y acute */ M_NMSTART, 177, 178,
|
/* 178: y acute */ {M_NMSTART, 177, 178},
|
||||||
/* 179: degree (invalid) */ M_NONNAME, 179, 179,
|
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
|
||||||
/* 180: C cedilla */ M_NMSTART, 180, 181,
|
/* 180: C cedilla */ {M_NMSTART, 180, 181},
|
||||||
/* 181: c cedilla */ M_NMSTART, 180, 181,
|
/* 181: c cedilla */ {M_NMSTART, 180, 181},
|
||||||
/* 182: N tilde */ M_NMSTART, 182, 183,
|
/* 182: N tilde */ {M_NMSTART, 182, 183},
|
||||||
/* 183: n tilde */ M_NMSTART, 182, 183,
|
/* 183: n tilde */ {M_NMSTART, 182, 183},
|
||||||
/* 184: inverted exclamation mark */ M_NONNAME, 184, 184,
|
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
|
||||||
/* 185: inverted question mark */ M_NONNAME, 185, 185,
|
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
|
||||||
/* 186: currency sign (invalid) */ M_NONNAME, 186, 186,
|
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
|
||||||
/* 187: pound sterling (invalid) */ M_NONNAME, 187, 187,
|
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
|
||||||
/* 188: Yen */ M_NONNAME, 188, 188,
|
/* 188: Yen */ {M_NONNAME, 188, 188},
|
||||||
/* 189: Section sign (invalid) */ M_NONNAME, 189, 189,
|
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
|
||||||
/* 190: florin (invalid) */ M_NONNAME, 190, 190,
|
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
|
||||||
/* 191: Cent sign (invalid) */ M_NONNAME, 191, 191,
|
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
|
||||||
/* 192: a circumflex */ M_NMSTART, 162, 192,
|
/* 192: a circumflex */ {M_NMSTART, 162, 192},
|
||||||
/* 193: e circumflex */ M_NMSTART, 164, 193,
|
/* 193: e circumflex */ {M_NMSTART, 164, 193},
|
||||||
/* 194: o circumflex */ M_NMSTART, 223, 194,
|
/* 194: o circumflex */ {M_NMSTART, 223, 194},
|
||||||
/* 195: u circumflex */ M_NMSTART, 174, 195,
|
/* 195: u circumflex */ {M_NMSTART, 174, 195},
|
||||||
/* 196: a acute */ M_NMSTART, 224, 196,
|
/* 196: a acute */ {M_NMSTART, 224, 196},
|
||||||
/* 197: e acute */ M_NMSTART, 220, 197,
|
/* 197: e acute */ {M_NMSTART, 220, 197},
|
||||||
/* 198: o acute */ M_NMSTART, 231, 198,
|
/* 198: o acute */ {M_NMSTART, 231, 198},
|
||||||
/* 199: u acute */ M_NMSTART, 237, 199,
|
/* 199: u acute */ {M_NMSTART, 237, 199},
|
||||||
/* 200: a grave */ M_NMSTART, 161, 200,
|
/* 200: a grave */ {M_NMSTART, 161, 200},
|
||||||
/* 201: e grave */ M_NMSTART, 163, 201,
|
/* 201: e grave */ {M_NMSTART, 163, 201},
|
||||||
/* 202: o grave */ M_NMSTART, 232, 202,
|
/* 202: o grave */ {M_NMSTART, 232, 202},
|
||||||
/* 203: u grave */ M_NMSTART, 173, 203,
|
/* 203: u grave */ {M_NMSTART, 173, 203},
|
||||||
/* 204: a dieresis */ M_NMSTART, 216, 204,
|
/* 204: a dieresis */ {M_NMSTART, 216, 204},
|
||||||
/* 205: e dieresis */ M_NMSTART, 165, 205,
|
/* 205: e dieresis */ {M_NMSTART, 165, 205},
|
||||||
/* 206: o dieresis */ M_NMSTART, 218, 206,
|
/* 206: o dieresis */ {M_NMSTART, 218, 206},
|
||||||
/* 207: u dieresis */ M_NMSTART, 219, 207,
|
/* 207: u dieresis */ {M_NMSTART, 219, 207},
|
||||||
/* 208: A angstrom */ M_NMSTART, 208, 212,
|
/* 208: A angstrom */ {M_NMSTART, 208, 212},
|
||||||
/* 209: i circumflex */ M_NMSTART, 166, 209,
|
/* 209: i circumflex */ {M_NMSTART, 166, 209},
|
||||||
/* 210: O slash */ M_NMSTART, 210, 214,
|
/* 210: O slash */ {M_NMSTART, 210, 214},
|
||||||
/* 211: AE ligature */ M_NMSTART, 211, 215,
|
/* 211: AE ligature */ {M_NMSTART, 211, 215},
|
||||||
/* 212: a angstrom */ M_NMSTART, 208, 212,
|
/* 212: a angstrom */ {M_NMSTART, 208, 212},
|
||||||
/* 213: i acute */ M_NMSTART, 229, 213,
|
/* 213: i acute */ {M_NMSTART, 229, 213},
|
||||||
/* 214: o slash */ M_NMSTART, 210, 214,
|
/* 214: o slash */ {M_NMSTART, 210, 214},
|
||||||
/* 215: ae ligature */ M_NMSTART, 211, 215,
|
/* 215: ae ligature */ {M_NMSTART, 211, 215},
|
||||||
/* 216: A dieresis */ M_NMSTART, 216, 204,
|
/* 216: A dieresis */ {M_NMSTART, 216, 204},
|
||||||
/* 217: i grave */ M_NMSTART, 230, 217,
|
/* 217: i grave */ {M_NMSTART, 230, 217},
|
||||||
/* 218: O dieresis */ M_NMSTART, 218, 206,
|
/* 218: O dieresis */ {M_NMSTART, 218, 206},
|
||||||
/* 219: U dieresis */ M_NMSTART, 219, 207,
|
/* 219: U dieresis */ {M_NMSTART, 219, 207},
|
||||||
/* 220: E acute */ M_NMSTART, 220, 197,
|
/* 220: E acute */ {M_NMSTART, 220, 197},
|
||||||
/* 221: i dieresis */ M_NMSTART, 167, 221,
|
/* 221: i dieresis */ {M_NMSTART, 167, 221},
|
||||||
/* 222: SS ligature */ M_NMSTART, 222, 222,
|
/* 222: SS ligature */ {M_NMSTART, 222, 222},
|
||||||
/* 223: O circumflex */ M_NMSTART, 223, 194,
|
/* 223: O circumflex */ {M_NMSTART, 223, 194},
|
||||||
/* 224: A acute */ M_NMSTART, 224, 196,
|
/* 224: A acute */ {M_NMSTART, 224, 196},
|
||||||
/* 225: A tilde */ M_NMSTART, 225, 226,
|
/* 225: A tilde */ {M_NMSTART, 225, 226},
|
||||||
/* 226: a tilde */ M_NMSTART, 225, 226,
|
/* 226: a tilde */ {M_NMSTART, 225, 226},
|
||||||
/* 227: Eth (invalid) */ M_NMSTART, 227, 228,
|
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
|
||||||
/* 228: eth (invalid) */ M_NMSTART, 227, 228,
|
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
|
||||||
/* 229: I acute */ M_NMSTART, 229, 213,
|
/* 229: I acute */ {M_NMSTART, 229, 213},
|
||||||
/* 230: I grave */ M_NMSTART, 230, 217,
|
/* 230: I grave */ {M_NMSTART, 230, 217},
|
||||||
/* 231: O acute */ M_NMSTART, 231, 198,
|
/* 231: O acute */ {M_NMSTART, 231, 198},
|
||||||
/* 232: O grave */ M_NMSTART, 232, 202,
|
/* 232: O grave */ {M_NMSTART, 232, 202},
|
||||||
/* 233: O tilde */ M_NMSTART, 233, 234,
|
/* 233: O tilde */ {M_NMSTART, 233, 234},
|
||||||
/* 234: o tilde */ M_NMSTART, 233, 234,
|
/* 234: o tilde */ {M_NMSTART, 233, 234},
|
||||||
/* 235: S caron */ M_NMSTART, 235, 236,
|
/* 235: S caron */ {M_NMSTART, 235, 236},
|
||||||
/* 236: s caron */ M_NMSTART, 235, 236,
|
/* 236: s caron */ {M_NMSTART, 235, 236},
|
||||||
/* 237: U acute */ M_NMSTART, 237, 199,
|
/* 237: U acute */ {M_NMSTART, 237, 199},
|
||||||
/* 238: Y dieresis */ M_NMSTART, 238, 239,
|
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
|
||||||
/* 239: y dieresis */ M_NMSTART, 238, 239,
|
/* 239: y dieresis */ {M_NMSTART, 238, 239},
|
||||||
/* 240: Thorn (invalid) */ M_NMSTART, 240, 241,
|
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
|
||||||
/* 241: thorn (invalid) */ M_NMSTART, 240, 241,
|
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
|
||||||
/* 242: undefined */ M_NONNAME, 242, 242,
|
/* 242: undefined */ {M_NONNAME, 242, 242},
|
||||||
/* 243: mu (invalid) */ M_NONNAME, 243, 243,
|
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
|
||||||
/* 244: paragraph sign (invalid) */ M_NONNAME, 244, 244,
|
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
|
||||||
/* 245: fraction 3/4 (invalid) */ M_NONNAME, 245, 245,
|
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
|
||||||
/* 246: long dash (invalid) */ M_NONNAME, 246, 246,
|
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
|
||||||
/* 247: fraction 1/4 (invalid) */ M_NONNAME, 247, 247,
|
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
|
||||||
/* 248: fraction 1/2 (invalid) */ M_NONNAME, 248, 248,
|
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
|
||||||
/* 249: Female ordinal (invalid) */ M_NONNAME, 249, 249,
|
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
|
||||||
/* 250: Male ordinal (invalid) */ M_NONNAME, 250, 250,
|
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
|
||||||
/* 251: French double open quote(invalid) */ M_NONNAME, 251, 251,
|
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
|
||||||
/* 252: Solid square (invalid) */ M_NONNAME, 252, 252,
|
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
|
||||||
/* 253: French double close quote(invalid) */ M_NONNAME, 253, 253,
|
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
|
||||||
/* 254: Plus over minus sign(invalid)*/ M_NONNAME, 254, 254,
|
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
|
||||||
/* 255: undefined */ M_NONNAME, 255, 255,
|
/* 255: undefined */ {M_NONNAME, 255, 255},
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -127,11 +127,13 @@ M_WCHAR wlb = 0, wcm, wnl, wsl, wst;
|
||||||
|
|
||||||
if (!wlb)
|
if (!wlb)
|
||||||
{
|
{
|
||||||
mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
|
int
|
||||||
mbtowc(&wcm, ",", 1);
|
ret = mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
|
||||||
mbtowc(&wnl, "\n", 1);
|
ret = mbtowc(&wcm, ",", 1);
|
||||||
mbtowc(&wsl, "/", 1);
|
ret = mbtowc(&wnl, "\n", 1);
|
||||||
mbtowc(&wst, "*", 1);
|
ret = mbtowc(&wsl, "/", 1);
|
||||||
|
ret = mbtowc(&wst, "*", 1);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
|
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
|
||||||
|
@ -226,7 +228,8 @@ M_WCHAR wcl;
|
||||||
char unexp[32]; /* arbitraily large */
|
char unexp[32]; /* arbitraily large */
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
mbtowc(&wcl, ":", 1);
|
int ret = mbtowc(&wcl, ":", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -252,9 +255,11 @@ char *mb_name;
|
||||||
|
|
||||||
if (!wsm)
|
if (!wsm)
|
||||||
{
|
{
|
||||||
mbtowc(&wsm, ";", 1);
|
int
|
||||||
mbtowc(&wcl, ":", 1);
|
ret = mbtowc(&wsm, ";", 1);
|
||||||
mbtowc(&wcm, ",", 1);
|
ret = mbtowc(&wcl, ":", 1);
|
||||||
|
ret = mbtowc(&wcm, ",", 1);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
|
@ -333,7 +338,7 @@ c = readchar(TRUE))
|
||||||
*p++ = (M_WCHAR) c;
|
*p++ = (M_WCHAR) c;
|
||||||
}
|
}
|
||||||
*p = M_EOS;
|
*p = M_EOS;
|
||||||
if (dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie))
|
if ((dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie)))
|
||||||
{
|
{
|
||||||
withdelim = TRUE;
|
withdelim = TRUE;
|
||||||
curdelim = dstruct->count - 1;
|
curdelim = dstruct->count - 1;
|
||||||
|
@ -451,7 +456,8 @@ int i;
|
||||||
M_WCHAR wnl;
|
M_WCHAR wnl;
|
||||||
char *mb_dname, *mb_dstring;
|
char *mb_dname, *mb_dstring;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
loading = TRUE;
|
loading = TRUE;
|
||||||
while ((c = getc(ddat)) != EOF)
|
while ((c = getc(ddat)) != EOF)
|
||||||
|
@ -526,13 +532,13 @@ while ((c = getc(ddat)) != EOF)
|
||||||
fprintf(delim,
|
fprintf(delim,
|
||||||
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
|
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
|
||||||
mb_dname,
|
mb_dname,
|
||||||
strlen(mb_dstring) + 1);
|
(int)strlen(mb_dstring) + 1);
|
||||||
|
|
||||||
for (p = dstring ; *p ; p++)
|
for (p = dstring ; *p ; p++)
|
||||||
{
|
{
|
||||||
char *pc;
|
char *pc;
|
||||||
char mb_p[32]; /* arbitrarily large */
|
char mb_p[32]; /* arbitrarily large */
|
||||||
int length, i;
|
int length;
|
||||||
|
|
||||||
length = wctomb(mb_p, *p);
|
length = wctomb(mb_p, *p);
|
||||||
mb_p[length] = 0;
|
mb_p[length] = 0;
|
||||||
|
@ -629,7 +635,7 @@ void prtctxt(column, value)
|
||||||
|
|
||||||
if (! first) fprintf(delim, ",\n");
|
if (! first) fprintf(delim, ",\n");
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
fprintf(delim, " %d, %d", column, value);
|
fprintf(delim, " {%d, %d}", column, value);
|
||||||
nonzero++;
|
nonzero++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +651,8 @@ int readchar(cap)
|
||||||
int c;
|
int c;
|
||||||
M_WCHAR wnl;
|
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 */
|
c = mb_getwc(cdat); /* use mb_getwc so we read multi-byte chars */
|
||||||
if (cap && c != EOF) c = m_upper(c);
|
if (cap && c != EOF) c = m_upper(c);
|
||||||
|
@ -667,7 +674,8 @@ int c;
|
||||||
{
|
{
|
||||||
M_WCHAR wnl;
|
M_WCHAR wnl;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
ungetc(c, cdat);
|
ungetc(c, cdat);
|
||||||
if (c == wnl) m_line--;
|
if (c == wnl) m_line--;
|
||||||
|
|
|
@ -72,8 +72,8 @@ void entout(fname)
|
||||||
int nameindex ;
|
int nameindex ;
|
||||||
LOGICAL start ;
|
LOGICAL start ;
|
||||||
|
|
||||||
strcpy(efilename, fname) ;
|
strncpy(efilename, fname, ENTFILENAME) ;
|
||||||
strcpy(&efilename[strlen(efilename)], ".h") ;
|
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
|
||||||
m_openchk(&entfile, efilename, "w") ;
|
m_openchk(&entfile, efilename, "w") ;
|
||||||
|
|
||||||
fprintf(entfile, "#include \"entdef.h\"\n") ;
|
fprintf(entfile, "#include \"entdef.h\"\n") ;
|
||||||
|
@ -101,7 +101,7 @@ void entout(fname)
|
||||||
if (start) fputs(",\n", entfile) ;
|
if (start) fputs(",\n", entfile) ;
|
||||||
start = TRUE ;
|
start = TRUE ;
|
||||||
for (p = ent->content ; *p ; p++)
|
for (p = ent->content ; *p ; p++)
|
||||||
fprintf(entfile, " %d,\n", *p) ;
|
fprintf(entfile, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", entfile) ;
|
fputs(" 0", entfile) ;
|
||||||
}
|
}
|
||||||
fprintf(entfile, "}\n#endif\n") ;
|
fprintf(entfile, "}\n#endif\n") ;
|
||||||
|
@ -112,7 +112,7 @@ void entout(fname)
|
||||||
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
|
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
|
||||||
for (ent = firstent ; ent ; ent = ent->next) {
|
for (ent = firstent ; ent ; ent = ent->next) {
|
||||||
for (p = ent->name ; *p ; p++)
|
for (p = ent->name ; *p ; p++)
|
||||||
fprintf(entfile, " %d,\n", *p) ;
|
fprintf(entfile, " %d,\n", (int)*p) ;
|
||||||
if (ent != lastent) fputs(" 0,\n", entfile) ;
|
if (ent != lastent) fputs(" 0,\n", entfile) ;
|
||||||
else fputs(" 0\n", entfile) ;
|
else fputs(" 0\n", entfile) ;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ void entout(fname)
|
||||||
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
|
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
|
||||||
for (ent = firstent, conindex = 0, nameindex = 0 ;
|
for (ent = firstent, conindex = 0, nameindex = 0 ;
|
||||||
ent ; ent = ent->next) {
|
ent ; ent = ent->next) {
|
||||||
fprintf(entfile, " %s, %s, ",
|
fprintf(entfile, " {%s, %s, ",
|
||||||
typetype(ent->type),
|
typetype(ent->type),
|
||||||
typewhere(ent->wheredef)) ;
|
typewhere(ent->wheredef)) ;
|
||||||
if (ent->content) {
|
if (ent->content) {
|
||||||
|
@ -143,10 +143,10 @@ void entout(fname)
|
||||||
#if defined(BUILDEXTERN)
|
#if defined(BUILDEXTERN)
|
||||||
fprintf(entfile, ", %d", ent->index) ;
|
fprintf(entfile, ", %d", ent->index) ;
|
||||||
if (ent != lastent)
|
if (ent != lastent)
|
||||||
fprintf(entfile, ", &m_entities[%d], 0", ent->index) ;
|
fprintf(entfile, ", &m_entities[%d], 0}", ent->index) ;
|
||||||
else fputs(", NULL, 0", entfile) ;
|
else fputs(", NULL, 0}", entfile) ;
|
||||||
#else
|
#else
|
||||||
fprintf(entfile, ", %d", ent->codeindex) ;
|
fprintf(entfile, ", %d}", ent->codeindex) ;
|
||||||
#endif
|
#endif
|
||||||
if (ent != lastent) fprintf(entfile, ", \n") ;
|
if (ent != lastent) fprintf(entfile, ", \n") ;
|
||||||
else fprintf(entfile, "}\n#endif\n") ;
|
else fprintf(entfile, "}\n#endif\n") ;
|
||||||
|
@ -159,7 +159,7 @@ void entout(fname)
|
||||||
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
|
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
|
||||||
if (m_enttrie->data) {
|
if (m_enttrie->data) {
|
||||||
count = 0 ;
|
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) ;
|
m_dumptrie(entfile, m_enttrie->data, "m_enttrie", &count, entptr) ;
|
||||||
fprintf(entfile, "}\n#endif\n") ;
|
fprintf(entfile, "}\n#endif\n") ;
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,7 @@ char *typewhere(n)
|
||||||
case M_DELTDEF: return(xdeltdef) ;
|
case M_DELTDEF: return(xdeltdef) ;
|
||||||
case FALSE: return("0") ;
|
case FALSE: return("0") ;
|
||||||
}
|
}
|
||||||
|
return("0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -130,17 +130,19 @@ void copyfile(pfile1,pfile2)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
char *pcmd;
|
char *pcmd;
|
||||||
|
int slen;
|
||||||
|
|
||||||
/* malloc space for the system command: two filenames, plus a command,
|
/* malloc space for the system command: two filenames, plus a command,
|
||||||
spaces, and the terminating null */
|
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)
|
#if defined(MSDOS)
|
||||||
ret = sprintf(pcmd,"copy %s %s",pfile1,pfile2);
|
ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
|
||||||
#else
|
#else
|
||||||
ret = sprintf(pcmd,"cp %s %s",pfile1,pfile2);
|
ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
|
||||||
#endif
|
#endif
|
||||||
ret = system(pcmd);
|
ret = system(pcmd);
|
||||||
ret = sprintf(pcmd,"touch %s",pfile2);
|
ret = snprintf(pcmd, slen, "touch %s",pfile2);
|
||||||
ret = system(pcmd);
|
ret = system(pcmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,11 +96,11 @@ void m_free(block, msg)
|
||||||
free(block) ;
|
free(block) ;
|
||||||
if (m_malftrace) {
|
if (m_malftrace) {
|
||||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
|
#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) ((unsigned long) block >> 16),
|
||||||
(unsigned int) block, msg) ;
|
(unsigned int) block, msg) ;
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, " %9p", block, msg) ;
|
snprintf(buffer, 32, " %9p", block) ;
|
||||||
#endif
|
#endif
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace("- Freed ") ;
|
m_trace("- Freed ") ;
|
||||||
|
@ -171,14 +171,14 @@ void *m_malloc(size, msg)
|
||||||
}
|
}
|
||||||
if (m_malftrace) {
|
if (m_malftrace) {
|
||||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
|
#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) ;
|
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, " %9p", p) ;
|
snprintf(buffer, 32, " %9p", p) ;
|
||||||
#endif
|
#endif
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace("- Allocated ") ;
|
m_trace("- Allocated ") ;
|
||||||
sprintf(buffer, "%6d", size) ;
|
snprintf(buffer, 32, "%6d", size) ;
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace(" bytes for ") ;
|
m_trace(" bytes for ") ;
|
||||||
m_trace(msg) ;
|
m_trace(msg) ;
|
||||||
|
@ -212,14 +212,14 @@ void *m_realloc(ptr, size, msg)
|
||||||
}
|
}
|
||||||
if (m_malftrace) {
|
if (m_malftrace) {
|
||||||
#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)
|
#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) ;
|
(unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ;
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, " %9p", p) ;
|
snprintf(buffer, 32, " %9p", p) ;
|
||||||
#endif
|
#endif
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace("- Re-allocated ") ;
|
m_trace("- Re-allocated ") ;
|
||||||
sprintf(buffer, "%6d", size) ;
|
snprintf(buffer, 32, "%6d", size) ;
|
||||||
m_trace(buffer) ;
|
m_trace(buffer) ;
|
||||||
m_trace(" bytes for ") ;
|
m_trace(" bytes for ") ;
|
||||||
m_trace(msg) ;
|
m_trace(msg) ;
|
||||||
|
|
|
@ -33,7 +33,7 @@ int getachar(M_NOPAR)
|
||||||
int c;
|
int c;
|
||||||
M_WCHAR wc,wnl;
|
M_WCHAR wc,wnl;
|
||||||
char mbyte[32]; /* bigger than any possible multibyte char */
|
char mbyte[32]; /* bigger than any possible multibyte char */
|
||||||
int length;
|
int length, ret;
|
||||||
|
|
||||||
if (toundo) wc = (M_WCHAR) savechar[--toundo];
|
if (toundo) wc = (M_WCHAR) savechar[--toundo];
|
||||||
else
|
else
|
||||||
|
@ -58,10 +58,11 @@ else
|
||||||
return(EOF);
|
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 == wnl) m_line++;
|
||||||
|
|
||||||
if (wc == 65535)
|
if (wc == 65535)
|
||||||
|
@ -246,7 +247,8 @@ if (toundo >= SAVECHAR)
|
||||||
savechar[toundo++] = c;
|
savechar[toundo++] = c;
|
||||||
if (toundo > maxundo) maxundo = toundo;
|
if (toundo > maxundo) maxundo = toundo;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
if (c == wnl) m_line--;
|
if (c == wnl) m_line--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ void *m_ntrtrie(p, xtrie, dataval)
|
||||||
M_TRIE *currentnode ;
|
M_TRIE *currentnode ;
|
||||||
void *n ;
|
void *n ;
|
||||||
|
|
||||||
if (n = m_lookfortrie(p, xtrie)) return(n) ;
|
if ((n = m_lookfortrie(p, xtrie))) return(n) ;
|
||||||
currentnode = xtrie ;
|
currentnode = xtrie ;
|
||||||
for ( ; *p ; p++)
|
for ( ; *p ; p++)
|
||||||
m_entercharintrie(¤tnode, m_ctupper(*p)) ;
|
m_entercharintrie(¤tnode, m_ctupper(*p)) ;
|
||||||
|
|
|
@ -88,12 +88,12 @@ void dumpnode(first, file, trieptr, count, proc)
|
||||||
/* generate a child */
|
/* generate a child */
|
||||||
if (*first) *first = FALSE ;
|
if (*first) *first = FALSE ;
|
||||||
else fprintf(file, ",\n") ;
|
else fprintf(file, ",\n") ;
|
||||||
fprintf(file, " ") ;
|
fprintf(file, " {") ;
|
||||||
if (p->next) fprintf(file, "TRUE, ") ;
|
if (p->next) fprintf(file, "TRUE, ") ;
|
||||||
else fprintf(file, "FALSE, ") ;
|
else fprintf(file, "FALSE, ") ;
|
||||||
fprintf(file, "%d", p->symbol) ;
|
fprintf(file, "%d", (int)p->symbol) ;
|
||||||
if (p->symbol) fprintf(file, ", %d", *count) ;
|
if (p->symbol) fprintf(file, ", %d}", *count) ;
|
||||||
else (*proc)(file, p->data) ;
|
else { (*proc)(file, p->data) ; fprintf(file, "}") ; }
|
||||||
|
|
||||||
/* count the children of the child*/
|
/* count the children of the child*/
|
||||||
if (p->symbol) countdown(p, count) ;
|
if (p->symbol) countdown(p, count) ;
|
||||||
|
@ -110,5 +110,5 @@ void printval(file, value)
|
||||||
FILE *file ;
|
FILE *file ;
|
||||||
void *value ;
|
void *value ;
|
||||||
{
|
{
|
||||||
fprintf(file, ", %d", (int) value) ;
|
fprintf(file, ", %ld", (long) value) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,14 +62,14 @@ void m_dumptrie(file, xtrie, extname, count, proc)
|
||||||
|
|
||||||
for (p = xtrie ; p ; p = p->next) {
|
for (p = xtrie ; p ; p = p->next) {
|
||||||
(*count)++ ;
|
(*count)++ ;
|
||||||
fprintf(file, ",\n %d, ", p-> symbol) ;
|
fprintf(file, ",\n {%d, ", (int)p-> symbol) ;
|
||||||
if (p->next) fprintf(file, "&%s[%d], ", extname, *count + 1) ;
|
if (p->next) fprintf(file, "&%s[%d], ", extname, *count + 1) ;
|
||||||
else fputs("NULL, ", file) ;
|
else fputs("NULL, ", file) ;
|
||||||
if (p->symbol) {
|
if (p->symbol) {
|
||||||
fprintf(file, "&%s[%d]", extname, firstson) ;
|
fprintf(file, "&%s[%d]}", extname, firstson) ;
|
||||||
countdown(p, &firstson) ;
|
countdown(p, &firstson) ;
|
||||||
}
|
}
|
||||||
else (*proc) (p->data) ;
|
else { (*proc) (p->data) ; fprintf(file, "}") ; }
|
||||||
}
|
}
|
||||||
|
|
||||||
for (p = xtrie ; p ; p = p->next)
|
for (p = xtrie ; p ; p = p->next)
|
||||||
|
|
|
@ -72,7 +72,7 @@ M_WCHAR *string1start;
|
||||||
|
|
||||||
string1start = string1;
|
string1start = string1;
|
||||||
|
|
||||||
while (*string1++ = *string2++);
|
while ((*string1++ = *string2++));
|
||||||
|
|
||||||
return string1start;
|
return string1start;
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ length = (length + sizeof(M_WCHAR) - 1) / sizeof(M_WCHAR);
|
||||||
mb_string = (char *) m_malloc(length, "multi-byte string");
|
mb_string = (char *) m_malloc(length, "multi-byte string");
|
||||||
|
|
||||||
length = 0;
|
length = 0;
|
||||||
while (wc = *wc_string++)
|
while ((wc = *wc_string++))
|
||||||
{
|
{
|
||||||
if ((retVal = wctomb(&mb_string[length], wc)) > 0)
|
if ((retVal = wctomb(&mb_string[length], wc)) > 0)
|
||||||
length += retVal;
|
length += retVal;
|
||||||
|
@ -226,7 +226,6 @@ char *mb_string;
|
||||||
{
|
{
|
||||||
M_WCHAR *wc_string, *wc_stringStart;
|
M_WCHAR *wc_string, *wc_stringStart;
|
||||||
int length, incr;
|
int length, incr;
|
||||||
char c;
|
|
||||||
|
|
||||||
if (!mb_string)
|
if (!mb_string)
|
||||||
mb_string = "";
|
mb_string = "";
|
||||||
|
@ -244,8 +243,9 @@ while (mb_string[length])
|
||||||
|
|
||||||
badOne[0] = mb_string[length];
|
badOne[0] = mb_string[length];
|
||||||
badOne[1] = 0;
|
badOne[1] = 0;
|
||||||
sprintf(buffer, "0x%x", mb_string[length]);
|
snprintf(buffer, 32, "0x%x", mb_string[length]);
|
||||||
m_err2("invalid multibyte character found: '%c' (%s)", badOne, buffer);
|
m_err2("invalid multibyte character found: '%c' (%s)",
|
||||||
|
(M_WCHAR *)badOne, (M_WCHAR *)buffer);
|
||||||
incr = 1;
|
incr = 1;
|
||||||
}
|
}
|
||||||
length += incr;
|
length += incr;
|
||||||
|
@ -263,7 +263,6 @@ void *m_ptr;
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
M_WCHAR wc;
|
M_WCHAR wc;
|
||||||
char badch[2];
|
|
||||||
char mbyte[32]; /* make this bigger than any possible multi-byte char */
|
char mbyte[32]; /* make this bigger than any possible multi-byte char */
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
|
@ -288,7 +287,8 @@ while (1)
|
||||||
return(EOF);
|
return(EOF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mbtowc(&wc,mbyte,length);
|
int ret = mbtowc(&wc,mbyte,length);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
return((int) wc);
|
return((int) wc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
#include "entdef.h"
|
#include "entdef.h"
|
||||||
|
|
||||||
/* Main procedure */
|
/* Main procedure */
|
||||||
void main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc ;
|
int argc ;
|
||||||
char **argv ;
|
char **argv ;
|
||||||
{
|
{
|
||||||
|
@ -67,8 +67,9 @@ while (TRUE)
|
||||||
if (scantrace)
|
if (scantrace)
|
||||||
printf(
|
printf(
|
||||||
"m_prevcon=%d, m_token=%d, curcon=%d, scanval = %c (%d), line=%d\n",
|
"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"
|
#include "case.c"
|
||||||
if (m_token == ENDFILE) exit(FALSE) ;
|
if (m_token == ENDFILE) exit(FALSE) ;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ LOGICAL *flag;
|
||||||
char *delim;
|
char *delim;
|
||||||
{
|
{
|
||||||
M_WCHAR wcbuff[129];
|
M_WCHAR wcbuff[129];
|
||||||
size_t length;
|
ssize_t length;
|
||||||
|
|
||||||
wcbuff[128] = 0;
|
wcbuff[128] = 0;
|
||||||
length = mbstowcs(wcbuff,delim,128);
|
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, "MARKUP System - BUILD %s\n", M_VERSION) ;
|
||||||
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
|
fprintf(stderr, "Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co.\n") ;
|
||||||
if (! standard)
|
if (! standard)
|
||||||
warning("Warning: optional enhancements of SGML enabled.") ;
|
warning("Info: optional enhancements of SGML enabled.") ;
|
||||||
|
|
||||||
mb_delims = mb_dlmptr;
|
mb_delims = mb_dlmptr;
|
||||||
wc_delims = m_dlmptr;
|
wc_delims = m_dlmptr;
|
||||||
|
@ -112,7 +112,7 @@ void ruleinit(M_NOPAR)
|
||||||
/* Rule end processing */
|
/* Rule end processing */
|
||||||
void rulend(M_NOPAR)
|
void rulend(M_NOPAR)
|
||||||
{
|
{
|
||||||
STATE *fsa ;
|
STATE *fsa = NULL ;
|
||||||
LOGICAL canbenull ;
|
LOGICAL canbenull ;
|
||||||
LHS *lhsp ;
|
LHS *lhsp ;
|
||||||
LHS *discard ;
|
LHS *discard ;
|
||||||
|
@ -153,7 +153,7 @@ void rulend(M_NOPAR)
|
||||||
void skiptoend(M_NOPAR)
|
void skiptoend(M_NOPAR)
|
||||||
{
|
{
|
||||||
int i ;
|
int i ;
|
||||||
static errlev = 0 ;
|
static int errlev = 0 ;
|
||||||
|
|
||||||
if (! errlev++) {
|
if (! errlev++) {
|
||||||
curcon = ERROR ;
|
curcon = ERROR ;
|
||||||
|
|
|
@ -42,7 +42,7 @@ ELTSTRUCT *ntrelt(p)
|
||||||
int length ;
|
int length ;
|
||||||
|
|
||||||
new = (ELTSTRUCT *) m_malloc(sizeof(ELTSTRUCT), "element structure") ;
|
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") ;
|
m_free((M_POINTER) new, "element structure") ;
|
||||||
return(old) ;
|
return(old) ;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ ELTSTRUCT *ntrelt(p)
|
||||||
w_strcpy(new->enptr, p) ;
|
w_strcpy(new->enptr, p) ;
|
||||||
new->model = M_NULLVAL ;
|
new->model = M_NULLVAL ;
|
||||||
new->content = M_NULLVAL ;
|
new->content = M_NULLVAL ;
|
||||||
new->inptr = new->exptr = NULL ;
|
new->inptr = new->exptr = 0 ;
|
||||||
new->parptr = NULL ;
|
new->parptr = NULL ;
|
||||||
new->parindex = M_NULLVAL ;
|
new->parindex = M_NULLVAL ;
|
||||||
new->paramcount = M_NULLVAL ;
|
new->paramcount = M_NULLVAL ;
|
||||||
|
|
|
@ -85,11 +85,11 @@ void checkand(andstart, andptr, start, root, errelt)
|
||||||
for (pand = parc->group ; pand ; pand = pand->next)
|
for (pand = parc->group ; pand ; pand = pand->next)
|
||||||
checkand(andstart, andptr, pand->start, root, errelt) ;
|
checkand(andstart, andptr, pand->start, root, errelt) ;
|
||||||
}
|
}
|
||||||
else if (c = checkdfsa(andptr->start,
|
else if ((c = checkdfsa(andptr->start,
|
||||||
parc->label,
|
parc->label,
|
||||||
parc->group,
|
parc->group,
|
||||||
parc->id,
|
parc->id,
|
||||||
errelt))
|
errelt)))
|
||||||
nondeterm(root, c, *errelt) ;
|
nondeterm(root, c, *errelt) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ int checkdfsa(from, label, and, id, errelt)
|
||||||
if (parc->group) {
|
if (parc->group) {
|
||||||
if (and == parc->group) return(ANDCONFLICT) ;
|
if (and == parc->group) return(ANDCONFLICT) ;
|
||||||
for (group = parc->group ; group ; group = group->next)
|
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) ;
|
return(c) ;
|
||||||
}
|
}
|
||||||
else if (! and && label == parc->label && parc->id != id) {
|
else if (! and && label == parc->label && parc->id != id) {
|
||||||
|
@ -138,14 +138,14 @@ int checkrepeat(from, and, errelt)
|
||||||
for (; and ; and = and->next)
|
for (; and ; and = and->next)
|
||||||
for (parc = and->start->first ; parc ; parc = parc->next) {
|
for (parc = and->start->first ; parc ; parc = parc->next) {
|
||||||
if (parc->group)
|
if (parc->group)
|
||||||
if (c = checkrepeat(from, parc->group, errelt)) return(c) ;
|
if ((c = checkrepeat(from, parc->group, errelt))) return(c) ;
|
||||||
else ;
|
else ;
|
||||||
else
|
else
|
||||||
if (c = checkdfsa(from,
|
if ((c = checkdfsa(from,
|
||||||
parc->label,
|
parc->label,
|
||||||
M_NULLVAL,
|
M_NULLVAL,
|
||||||
parc->id,
|
parc->id,
|
||||||
errelt))
|
errelt)))
|
||||||
return(c) ;
|
return(c) ;
|
||||||
else ;
|
else ;
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ void makeand(canbenull, root, optional)
|
||||||
TREE *child ;
|
TREE *child ;
|
||||||
STATELIST *start, *final ;
|
STATELIST *start, *final ;
|
||||||
LOGICAL groupbenull ;
|
LOGICAL groupbenull ;
|
||||||
ANDGROUP *andptr, *saveand, *otherand ;
|
ANDGROUP *andptr = NULL, *saveand = NULL, *otherand ;
|
||||||
STATELIST *index ;
|
STATELIST *index ;
|
||||||
ELTSTRUCT *errelt ;
|
ELTSTRUCT *errelt ;
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ void repeat(root)
|
||||||
for (a = top->starta ; a ; a = a->next) {
|
for (a = top->starta ; a ; a = a->next) {
|
||||||
for (final = top->allfinal ; final ; final = final->next) {
|
for (final = top->allfinal ; final ; final = final->next) {
|
||||||
if (a->group)
|
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);
|
wtemp = MakeWideCharString(root->occurrence == PLUS ? plus : rep);
|
||||||
warning1("Conflict in use of %s", wtemp);
|
warning1("Conflict in use of %s", wtemp);
|
||||||
m_free(wtemp, "wide character string");
|
m_free(wtemp, "wide character string");
|
||||||
|
@ -588,11 +588,11 @@ void repeat(root)
|
||||||
else
|
else
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
if (c = checkdfsa(final->value,
|
if ((c = checkdfsa(final->value,
|
||||||
a->label,
|
a->label,
|
||||||
a->group,
|
a->group,
|
||||||
a->id,
|
a->id,
|
||||||
&errelt))
|
&errelt)))
|
||||||
nondeterm (root, c, errelt) ;
|
nondeterm (root, c, errelt) ;
|
||||||
else
|
else
|
||||||
;
|
;
|
||||||
|
@ -600,14 +600,14 @@ void repeat(root)
|
||||||
for (final = top->finals ; final ; final = final->next) {
|
for (final = top->finals ; final ; final = final->next) {
|
||||||
if (samelabelarc(a, final->value)) continue ;
|
if (samelabelarc(a, final->value)) continue ;
|
||||||
if (a->group)
|
if (a->group)
|
||||||
if (c = checkrepeat(final->value, a->group, &errelt))
|
if ((c = checkrepeat(final->value, a->group, &errelt)))
|
||||||
nondeterm(root, c, errelt) ;
|
nondeterm(root, c, errelt) ;
|
||||||
if (a->label ||
|
if (a->label ||
|
||||||
a->group ||
|
a->group ||
|
||||||
! final->value->frompcdata) {
|
! 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->group, TRUE, a->id,
|
||||||
a->minim, &errelt))
|
a->minim, &errelt)))
|
||||||
nondeterm(root, c, errelt) ;
|
nondeterm(root, c, errelt) ;
|
||||||
if (permitspcd(a)) final->value->datacontent = TRUE ;
|
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
|
states of and-groups that terminate at the start state of the new
|
||||||
arc */
|
arc */
|
||||||
for (index = top->allfinal ; index ; index = index->next)
|
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) ;
|
nondeterm(root, c, errelt) ;
|
||||||
for (index = top->starts ; index ; index = index->next) {
|
for (index = top->starts ; index ; index = index->next) {
|
||||||
if (! group && ! value && index->value->frompcdata)
|
if (! group && ! value && index->value->frompcdata)
|
||||||
|
|
|
@ -31,6 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
#if defined(MSDOS)
|
#if defined(MSDOS)
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,7 +196,7 @@ void eltreeout(M_NOPAR)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = eltp->enptr ; *p ; p++)
|
for (p = eltp->enptr ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -211,14 +212,14 @@ void eltreeout(M_NOPAR)
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
if (! eltp->content)
|
if (! eltp->content)
|
||||||
warning1("No content model for element %s", eltp->enptr) ;
|
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,
|
enameindex, eltp->model ? eltp->model->count : 0,
|
||||||
typecon(eltp->content)) ;
|
typecon(eltp->content)) ;
|
||||||
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
|
fprintf(dtd, "%d, %d, ", eltp->inptr, eltp->exptr) ;
|
||||||
fprintf(dtd, "%d, %d, %d",
|
fprintf(dtd, "%d, %d, %d",
|
||||||
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
|
eltp->parindex, eltp->paramcount, eltp->srefptr) ;
|
||||||
enameindex += w_strlen(eltp->enptr) + 1 ;
|
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)) ;
|
boolean(eltp->stmin), boolean(eltp->etmin), boolean(eltp->useoradd)) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -259,7 +260,7 @@ void exout(M_NOPAR)
|
||||||
if (! first) fputs(",\n", dtd) ;
|
if (! first) fputs(",\n", dtd) ;
|
||||||
first = FALSE ;
|
first = FALSE ;
|
||||||
exindex++ ;
|
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) ;
|
fputs(ndif, dtd) ;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +295,7 @@ void fsa(M_NOPAR)
|
||||||
for (pstate = firststate ; pstate ; pstate = pstate->next) {
|
for (pstate = firststate ; pstate ; pstate = pstate->next) {
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd, " %s, %s, %d",
|
fprintf(dtd, " {%s, %s, %d}",
|
||||||
boolean(pstate->final), boolean(pstate->datacontent),
|
boolean(pstate->final), boolean(pstate->datacontent),
|
||||||
pstate->first ? ++arcount : 0) ;
|
pstate->first ? ++arcount : 0) ;
|
||||||
for (parc = pstate->first ; parc ; parc = parc->next) {
|
for (parc = pstate->first ; parc ; parc = parc->next) {
|
||||||
|
@ -319,7 +320,7 @@ void fsa(M_NOPAR)
|
||||||
for (pand = firstand ; pand ; pand = pand->nextptr) {
|
for (pand = firstand ; pand ; pand = pand->nextptr) {
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd, " %d, %d",
|
fprintf(dtd, " {%d, %d}",
|
||||||
pand->start->count,
|
pand->start->count,
|
||||||
pand->next ? pand->next->count : M_NULLVAL) ;
|
pand->next ? pand->next->count : M_NULLVAL) ;
|
||||||
}
|
}
|
||||||
|
@ -352,7 +353,7 @@ if (kwlen)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = ptypep->keyword ; *p ; p++)
|
for (p = ptypep->keyword ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -372,7 +373,7 @@ if (deflen)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
for (p = paramp->defstring ; *p ; p++)
|
for (p = paramp->defstring ; *p ; p++)
|
||||||
fprintf(dtd, " %d,\n", *p) ;
|
fprintf(dtd, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", dtd) ;
|
fputs(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -392,7 +393,7 @@ if (ptypelen)
|
||||||
{
|
{
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fprintf(dtd, ",\n") ;
|
else fprintf(dtd, ",\n") ;
|
||||||
fprintf(dtd, " %d, %d", kw, ptypep->next) ;
|
fprintf(dtd, " {%d, %d}", kw, ptypep->next) ;
|
||||||
kw += w_strlen(ptypep->keyword) + 1 ;
|
kw += w_strlen(ptypep->keyword) + 1 ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -412,21 +413,21 @@ if (parcount)
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
else fputs(",\n", dtd) ;
|
||||||
fprintf(dtd,
|
fprintf(dtd,
|
||||||
" %d, %s, %d, %s, ",
|
" {%d, %s, %d, %s, ",
|
||||||
pnameindex,
|
pnameindex,
|
||||||
partype(paramp->type),
|
partype(paramp->type),
|
||||||
paramp->kwlist,
|
paramp->kwlist,
|
||||||
deftype(paramp->deftype) );
|
deftype(paramp->deftype) );
|
||||||
pnameindex += w_strlen(paramp->paramname) + 1 ;
|
pnameindex += w_strlen(paramp->paramname) + 1 ;
|
||||||
if (paramp->defval)
|
if (paramp->defval)
|
||||||
fprintf(dtd, "&m_keyword[%d]", paramp->defval - 1) ;
|
fprintf(dtd, "&m_keyword[%d]}", paramp->defval - 1) ;
|
||||||
else if (paramp->defstring)
|
else if (paramp->defstring)
|
||||||
{
|
{
|
||||||
fprintf(dtd, "&m_defval[%d]", defindex) ;
|
fprintf(dtd, "&m_defval[%d]}", defindex) ;
|
||||||
defindex += w_strlen(paramp->defstring) + 1 ;
|
defindex += w_strlen(paramp->defstring) + 1 ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fputs("NULL", dtd) ;
|
fputs("NULL}", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +444,7 @@ if (pnamelen)
|
||||||
{
|
{
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
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(" 0", dtd) ;
|
||||||
}
|
}
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -534,10 +535,10 @@ void srefout(M_NOPAR)
|
||||||
count++ ;
|
count++ ;
|
||||||
if (first) first = FALSE ;
|
if (first) first = FALSE ;
|
||||||
else fputs(",\n", dtd) ;
|
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++)
|
for (j++ ; j < sreflen ; j++)
|
||||||
if (mapbysref[sreflen * i + j]) break ;
|
if (mapbysref[sreflen * i + j]) break ;
|
||||||
fprintf(dtd, "%d", j < sreflen ? count + 1 : 0) ;
|
fprintf(dtd, "%d}", j < sreflen ? count + 1 : 0) ;
|
||||||
}
|
}
|
||||||
else j++ ;
|
else j++ ;
|
||||||
fputs(ndif, dtd) ;
|
fputs(ndif, dtd) ;
|
||||||
|
@ -573,7 +574,8 @@ if (eltp->parptr)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
char mbyte[32]; /* larger than any multibyte character */
|
char mbyte[32]; /* larger than any multibyte character */
|
||||||
char *pc, c;
|
char *pc;
|
||||||
|
unsigned char c;
|
||||||
|
|
||||||
length = wctomb(mbyte, *p);
|
length = wctomb(mbyte, *p);
|
||||||
if (length < 0)
|
if (length < 0)
|
||||||
|
@ -645,7 +647,7 @@ void template(M_NOPAR)
|
||||||
}
|
}
|
||||||
|
|
||||||
mb_name = MakeMByteString(ent->name);
|
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");
|
m_free(mb_name, "wide character ent->name");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ ptypelen++ ;
|
||||||
/* Add a parameter to the current element */
|
/* Add a parameter to the current element */
|
||||||
void addpar(M_NOPAR)
|
void addpar(M_NOPAR)
|
||||||
{
|
{
|
||||||
PARAMETER *paramp, *last ;
|
PARAMETER *paramp, *last = NULL ;
|
||||||
int length ;
|
int length ;
|
||||||
|
|
||||||
parcount++ ;
|
parcount++ ;
|
||||||
|
@ -200,6 +200,7 @@ switch (newpar->type)
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
|
/* Normalize parameter default. Change tabs and RE's to spaces, capitalize
|
||||||
|
@ -212,7 +213,7 @@ M_WCHAR *string ;
|
||||||
#endif /* M_PROTO */
|
#endif /* M_PROTO */
|
||||||
{
|
{
|
||||||
M_WCHAR *p, *q ;
|
M_WCHAR *p, *q ;
|
||||||
int i ;
|
int i, ret ;
|
||||||
|
|
||||||
switch (newpar->type)
|
switch (newpar->type)
|
||||||
{
|
{
|
||||||
|
@ -238,7 +239,7 @@ switch (newpar->type)
|
||||||
for (p = string, i = 0 ; *p ; p++, i++)
|
for (p = string, i = 0 ; *p ; p++, i++)
|
||||||
if (m_whitespace(*p))
|
if (m_whitespace(*p))
|
||||||
{
|
{
|
||||||
mbtowc(p, " ", 1);
|
ret = mbtowc(p, " ", 1);
|
||||||
for (q = p + 1 ; m_whitespace(*q); q++) ;
|
for (q = p + 1 ; m_whitespace(*q); q++) ;
|
||||||
w_strcpy(p + 1, q) ;
|
w_strcpy(p + 1, q) ;
|
||||||
}
|
}
|
||||||
|
@ -262,10 +263,13 @@ switch (newpar->type)
|
||||||
mbyte[1] = 0;
|
mbyte[1] = 0;
|
||||||
}
|
}
|
||||||
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
|
if ((length == 1) && (*mbyte == '\n' || *mbyte == '\t'))
|
||||||
mbtowc(string, " ", 1);
|
{
|
||||||
|
ret = mbtowc(string, " ", 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called at end of parameter attribute list rule */
|
/* Called at end of parameter attribute list rule */
|
||||||
|
|
|
@ -330,7 +330,7 @@ LOGICAL litproc(
|
||||||
#endif
|
#endif
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
void main(
|
int main(
|
||||||
#if defined(M_PROTO)
|
#if defined(M_PROTO)
|
||||||
int argc, char **argv
|
int argc, char **argv
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -80,9 +80,10 @@ int c;
|
||||||
int n;
|
int n;
|
||||||
M_WCHAR wsp, wnl, wtb;
|
M_WCHAR wsp, wnl, wtb;
|
||||||
|
|
||||||
mbtowc(&wsp, " ", 1);
|
int
|
||||||
mbtowc(&wnl, "\n", 1);
|
ret = mbtowc(&wsp, " ", 1);
|
||||||
mbtowc(&wtb, "\t", 1);
|
ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
ret = mbtowc(&wtb, "\t", 1);
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -158,13 +159,14 @@ while (TRUE)
|
||||||
{
|
{
|
||||||
char mbyte[32]; /* bigger than the biggest multibyte char */
|
char mbyte[32]; /* bigger than the biggest multibyte char */
|
||||||
|
|
||||||
wctomb(mbyte, c);
|
ret = wctomb(mbyte, c);
|
||||||
|
|
||||||
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
|
fprintf(stderr, "\n'%s' (%d)", mbyte, c);
|
||||||
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
|
fprintf(m_errfile, "\n'%s' (%d)", mbyte, c);
|
||||||
m_error("Unexpected character");
|
m_error("Unexpected character");
|
||||||
}
|
}
|
||||||
} /* End while */
|
} /* End while */
|
||||||
|
(void) ret;
|
||||||
} /* End scan */
|
} /* End scan */
|
||||||
|
|
||||||
#include "scanutil.c"
|
#include "scanutil.c"
|
||||||
|
|
|
@ -40,7 +40,7 @@ void adddefent(mapname)
|
||||||
M_WCHAR *mapname;
|
M_WCHAR *mapname;
|
||||||
{
|
{
|
||||||
M_WCHAR *p;
|
M_WCHAR *p;
|
||||||
int n, length;
|
int n;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
if (!wc_prefix)
|
if (!wc_prefix)
|
||||||
|
@ -59,8 +59,9 @@ for (n = egensuf ; n ; n /= 10)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
c = ('0' + (n % 10));
|
c = ('0' + (n % 10));
|
||||||
mbtowc(p, &c, 1);
|
int ret = mbtowc(p, &c, 1);
|
||||||
*p++;
|
(void) ret;
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
*p = M_EOS;
|
*p = M_EOS;
|
||||||
egensuf++;
|
egensuf++;
|
||||||
|
@ -80,7 +81,7 @@ M_WCHAR *name;
|
||||||
M_ENTITY *new;
|
M_ENTITY *new;
|
||||||
|
|
||||||
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity");
|
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");
|
m_free((M_POINTER) new, "entity");
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
@ -113,7 +114,7 @@ MAP *new;
|
||||||
LOGICAL retval;
|
LOGICAL retval;
|
||||||
|
|
||||||
new = (MAP *) m_malloc(sizeof(MAP), "map");
|
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");
|
m_free(new, "map");
|
||||||
curmap = old->map;
|
curmap = old->map;
|
||||||
|
@ -153,7 +154,7 @@ int noseq = 0;
|
||||||
/* Define the delimiter */
|
/* Define the delimiter */
|
||||||
delim = (SREFSTRUCT *)
|
delim = (SREFSTRUCT *)
|
||||||
m_malloc(sizeof(SREFSTRUCT), "short reference delimiter");
|
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");
|
m_free(delim, "short reference delimiter");
|
||||||
delim = prevsr;
|
delim = prevsr;
|
||||||
|
|
|
@ -626,7 +626,7 @@ name
|
||||||
pcchain:pcchain {
|
pcchain:pcchain {
|
||||||
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
|
*nextchain = (CHAIN *) m_malloc(sizeof(CHAIN), "chain") ;
|
||||||
(*nextchain)->next = NULL ;
|
(*nextchain)->next = NULL ;
|
||||||
if ((*nextchain)->elt = m_packedlook(m_entree, name))
|
if (((*nextchain)->elt = m_packedlook(m_entree, name)))
|
||||||
(*nextchain)->elt++ ;
|
(*nextchain)->elt++ ;
|
||||||
else
|
else
|
||||||
m_err1("Undefined element: %s", name) ;
|
m_err1("Undefined element: %s", name) ;
|
||||||
|
@ -660,61 +660,61 @@ text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globdef:globdef {
|
globdef:globdef {
|
||||||
fprintf(globdef, "%c", textchar) ;
|
fprintf(globdef, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(globdef, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
globdec:globdec {
|
globdec:globdec {
|
||||||
fprintf(globdec, "%c", textchar) ;
|
fprintf(globdec, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(globdec, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
iniss:iniss,
|
iniss:iniss,
|
||||||
inss:inss {
|
inss:inss {
|
||||||
if (! stringstart) fprintf(string, ",\n") ;
|
if (! stringstart) fprintf(string, ",\n") ;
|
||||||
fprintf(string, " %d", textchar) ;
|
fprintf(string, " %d", (int)textchar) ;
|
||||||
stringstart = FALSE ;
|
stringstart = FALSE ;
|
||||||
stringcnt++ ;
|
stringcnt++ ;
|
||||||
}
|
}
|
||||||
inies:inies,
|
inies:inies,
|
||||||
ines:ines {
|
ines:ines {
|
||||||
if (! stringstart) fprintf(string, ",\n") ;
|
if (! stringstart) fprintf(string, ",\n") ;
|
||||||
fprintf(string, " %d", textchar) ;
|
fprintf(string, " %d", (int)textchar) ;
|
||||||
stringstart = FALSE ;
|
stringstart = FALSE ;
|
||||||
stringcnt++ ;
|
stringcnt++ ;
|
||||||
}
|
}
|
||||||
inisc:inisc,
|
inisc:inisc,
|
||||||
insc:insc {
|
insc:insc {
|
||||||
fprintf(sfile, "%c", textchar) ;
|
fprintf(sfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(sfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
iniec:iniec,
|
iniec:iniec,
|
||||||
inec:inec {
|
inec:inec {
|
||||||
fprintf(efile, "%c", textchar) ;
|
fprintf(efile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(efile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
initc:initc,
|
initc:initc,
|
||||||
intc:intc {
|
intc:intc {
|
||||||
fprintf(tfile, "%c", textchar) ;
|
fprintf(tfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(tfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inipc:inipc,
|
inipc:inipc,
|
||||||
inpc:inpc {
|
inpc:inpc {
|
||||||
fprintf(pfile, "%c", textchar) ;
|
fprintf(pfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(pfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inistc:inistc,
|
inistc:inistc,
|
||||||
instc:instc {
|
instc:instc {
|
||||||
fprintf(stfile, "%c", textchar) ;
|
fprintf(stfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(stfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
inentc:inentc {
|
inentc:inentc {
|
||||||
fprintf(entfile, "%c", textchar) ;
|
fprintf(entfile, "%c", (char)textchar) ;
|
||||||
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
|
/* if (textchar == '\n') fprintf(entfile, "#line %d \"%s\"\n",
|
||||||
m_line, iffile) ; */
|
m_line, iffile) ; */
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,13 +49,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
|
|
||||||
/* Main program */
|
/* Main program */
|
||||||
void main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc ;
|
int argc ;
|
||||||
char **argv ;
|
char **argv ;
|
||||||
{
|
{
|
||||||
int m_token ;
|
int m_token ;
|
||||||
|
|
||||||
if (argc > 2)
|
if (argc > 2) {
|
||||||
if (*argv[2] == '-') {
|
if (*argv[2] == '-') {
|
||||||
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
|
if (strchr(argv[2], 'a')) m_malftrace = TRUE ;
|
||||||
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,
|
fprintf(stderr,
|
||||||
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
|
"****Starting with MARKUP 2.0, ELTDEF no longer writes a statistics file"
|
||||||
) ;
|
) ;
|
||||||
|
}
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
fprintf(stderr, "**** Specify interface file ****\n") ;
|
fprintf(stderr, "**** Specify interface file ****\n") ;
|
||||||
exit(TRUE) ;
|
exit(TRUE) ;
|
||||||
|
@ -84,7 +85,7 @@ void main(argc, argv)
|
||||||
if (scantrace)
|
if (scantrace)
|
||||||
printf(
|
printf(
|
||||||
"Main: m_prevcon=%d,m_token=%d,curcon=%d,textchar='%c'(%d), line=%d\n",
|
"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"
|
#include "case.c"
|
||||||
if (m_token == ENDFILE) break ;
|
if (m_token == ENDFILE) break ;
|
||||||
if (! curcon) {
|
if (! curcon) {
|
||||||
|
@ -93,4 +94,5 @@ void main(argc, argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
done() ;
|
done() ;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ void cvalue(M_NOPAR)
|
||||||
PARVAL *new;
|
PARVAL *new;
|
||||||
|
|
||||||
new = (PARVAL *) m_malloc(sizeof(PARVAL), "parameter value");
|
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");
|
m_free(new, "parameter value");
|
||||||
else {
|
else {
|
||||||
new->line = 0;
|
new->line = 0;
|
||||||
|
@ -467,7 +467,7 @@ for ( ; p ; p = p->next)
|
||||||
iffile);
|
iffile);
|
||||||
fprintf(pvalh, "#define %s \"", mb_cname);
|
fprintf(pvalh, "#define %s \"", mb_cname);
|
||||||
m_free(mb_cname,"multi-byte string");
|
m_free(mb_cname,"multi-byte string");
|
||||||
if (q = ((PARVAL *) p->data)->value)
|
if ((q = ((PARVAL *) p->data)->value))
|
||||||
for ( ; *q ; q++)
|
for ( ; *q ; q++)
|
||||||
{
|
{
|
||||||
char mbq[32]; /* larger than largest possible mbyte char */
|
char mbq[32]; /* larger than largest possible mbyte char */
|
||||||
|
@ -498,7 +498,7 @@ for ( ; p ; p = p->next)
|
||||||
void skiptoend(M_NOPAR)
|
void skiptoend(M_NOPAR)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static errlev = 0;
|
static int errlev = 0;
|
||||||
CVARSTRUCT *cvarp, *dvarp;
|
CVARSTRUCT *cvarp, *dvarp;
|
||||||
|
|
||||||
for (cvarp = cvarlist ; cvarp ;) {
|
for (cvarp = cvarlist ; cvarp ;) {
|
||||||
|
@ -615,7 +615,7 @@ void startelement(M_NOPAR)
|
||||||
m_free(discard, "C variable");
|
m_free(discard, "C variable");
|
||||||
}
|
}
|
||||||
cvarlist = NULL;
|
cvarlist = NULL;
|
||||||
if (openelt = m_packedlook(m_entree, name)) {
|
if ((openelt = m_packedlook(m_entree, name))) {
|
||||||
if (processed[openelt - 1])
|
if (processed[openelt - 1])
|
||||||
warning1("Warning: Element %s already processed", name);
|
warning1("Warning: Element %s already processed", name);
|
||||||
processed[openelt - 1] = TRUE;
|
processed[openelt - 1] = TRUE;
|
||||||
|
@ -670,7 +670,7 @@ if (m_partype(cvarlist->param + m_element[openelt - 1].parptr, p))
|
||||||
{
|
{
|
||||||
M_WCHAR *w_buffer;
|
M_WCHAR *w_buffer;
|
||||||
|
|
||||||
sprintf(buffer, "%d", pval->line);
|
snprintf(buffer, 5, "%d", pval->line);
|
||||||
w_buffer = MakeWideCharString(buffer);
|
w_buffer = MakeWideCharString(buffer);
|
||||||
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
|
m_err5("Can't #define %s to %s. %s #define'd to %s on line %s",
|
||||||
pval->cname,
|
pval->cname,
|
||||||
|
|
|
@ -40,7 +40,7 @@ void addent(M_NOPAR)
|
||||||
M_ENTITY *new ;
|
M_ENTITY *new ;
|
||||||
|
|
||||||
new = (M_ENTITY *) m_malloc(sizeof(M_ENTITY), "entity") ;
|
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") ;
|
m_free(new, "entity") ;
|
||||||
if (! entity->wheredef) return ;
|
if (! entity->wheredef) return ;
|
||||||
if (entity->wheredef == M_DBUILD) {
|
if (entity->wheredef == M_DBUILD) {
|
||||||
|
|
|
@ -226,7 +226,7 @@ LOGICAL litproc(
|
||||||
#endif
|
#endif
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
void main(
|
int main(
|
||||||
#if defined(M_PROTO)
|
#if defined(M_PROTO)
|
||||||
int argc, char **argv
|
int argc, char **argv
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -53,7 +53,8 @@ M_WCHAR *p, wus;
|
||||||
int c, cttype;
|
int c, cttype;
|
||||||
LOGICAL cname;
|
LOGICAL cname;
|
||||||
|
|
||||||
mbtowc(&wus, "_", 1);
|
int ret = mbtowc(&wus, "_", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
|
cname = (LOGICAL) (curcon == INPARAM || curcon == INVALUE);
|
||||||
*(p = name) = (M_WCHAR) first;
|
*(p = name) = (M_WCHAR) first;
|
||||||
|
@ -92,7 +93,8 @@ int n;
|
||||||
static char unexp[] = "c";
|
static char unexp[] = "c";
|
||||||
M_WCHAR wus;
|
M_WCHAR wus;
|
||||||
|
|
||||||
mbtowc(&wus, "_", 1);
|
int ret = mbtowc(&wus, "_", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -118,3 +118,21 @@ void *m_malloc(
|
||||||
int size, char *msg
|
int size, char *msg
|
||||||
#endif
|
#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
|
||||||
|
) ;
|
||||||
|
|
|
@ -29,262 +29,262 @@ by HP Tag are marked "(invalid)". */
|
||||||
M_CHARTYPE m_ctarray[M_CHARSETLEN]
|
M_CHARTYPE m_ctarray[M_CHARSETLEN]
|
||||||
= {
|
= {
|
||||||
/* Char Name Type, Upper, Lower */
|
/* Char Name Type, Upper, Lower */
|
||||||
/* 0: ^@ NUL */ M_NONNAME, 0, 0,
|
/* 0: ^@ NUL */ {M_NONNAME, 0, 0},
|
||||||
/* 1: ^A SOH */ M_NONNAME, 1, 1,
|
/* 1: ^A SOH */ {M_NONNAME, 1, 1},
|
||||||
/* 2: ^B STX */ M_NONNAME, 2, 2,
|
/* 2: ^B STX */ {M_NONNAME, 2, 2},
|
||||||
/* 3: ^C ETX */ M_NONNAME, 3, 3,
|
/* 3: ^C ETX */ {M_NONNAME, 3, 3},
|
||||||
/* 4: ^D EOT */ M_NONNAME, 4, 4,
|
/* 4: ^D EOT */ {M_NONNAME, 4, 4},
|
||||||
/* 5: ^E ENQ */ M_NONNAME, 5, 5,
|
/* 5: ^E ENQ */ {M_NONNAME, 5, 5},
|
||||||
/* 6: ^F ACK */ M_NONNAME, 6, 6,
|
/* 6: ^F ACK */ {M_NONNAME, 6, 6},
|
||||||
/* 7: ^G BEL */ M_NONNAME, 7, 7,
|
/* 7: ^G BEL */ {M_NONNAME, 7, 7},
|
||||||
/* 8: ^H BS */ M_NONNAME, 8, 8,
|
/* 8: ^H BS */ {M_NONNAME, 8, 8},
|
||||||
/* 9: ^I HT */ M_NONNAME, 9, 9,
|
/* 9: ^I HT */ {M_NONNAME, 9, 9},
|
||||||
/* 10: ^J LF */ M_NONNAME, 10, 10,
|
/* 10: ^J LF */ {M_NONNAME, 10, 10},
|
||||||
/* 11: ^K VT */ M_NONNAME, 11, 11,
|
/* 11: ^K VT */ {M_NONNAME, 11, 11},
|
||||||
/* 12: ^L FF */ M_NONNAME, 12, 12,
|
/* 12: ^L FF */ {M_NONNAME, 12, 12},
|
||||||
/* 13: ^M CR */ M_NONNAME, 13, 13,
|
/* 13: ^M CR */ {M_NONNAME, 13, 13},
|
||||||
/* 14: ^N SO */ M_NONNAME, 14, 14,
|
/* 14: ^N SO */ {M_NONNAME, 14, 14},
|
||||||
/* 15: ^O SI */ M_NONNAME, 15, 15,
|
/* 15: ^O SI */ {M_NONNAME, 15, 15},
|
||||||
/* 16: ^P DLE */ M_NONNAME, 16, 16,
|
/* 16: ^P DLE */ {M_NONNAME, 16, 16},
|
||||||
/* 17: ^Q DC1 */ M_NONNAME, 17, 17,
|
/* 17: ^Q DC1 */ {M_NONNAME, 17, 17},
|
||||||
/* 18: ^R DC2 */ M_NONNAME, 18, 18,
|
/* 18: ^R DC2 */ {M_NONNAME, 18, 18},
|
||||||
/* 19: ^S DC3 */ M_NONNAME, 19, 19,
|
/* 19: ^S DC3 */ {M_NONNAME, 19, 19},
|
||||||
/* 20: ^T DC4 */ M_NONNAME, 20, 20,
|
/* 20: ^T DC4 */ {M_NONNAME, 20, 20},
|
||||||
/* 21: ^U NAK */ M_NONNAME, 21, 21,
|
/* 21: ^U NAK */ {M_NONNAME, 21, 21},
|
||||||
/* 22: ^V SYN */ M_NONNAME, 22, 22,
|
/* 22: ^V SYN */ {M_NONNAME, 22, 22},
|
||||||
/* 23: ^W ETB */ M_NONNAME, 23, 23,
|
/* 23: ^W ETB */ {M_NONNAME, 23, 23},
|
||||||
/* 24: ^X CAN */ M_NONNAME, 24, 24,
|
/* 24: ^X CAN */ {M_NONNAME, 24, 24},
|
||||||
/* 25: ^Y EM */ M_NONNAME, 25, 25,
|
/* 25: ^Y EM */ {M_NONNAME, 25, 25},
|
||||||
/* 26: ^Z SUB */ M_NONNAME, 26, 26,
|
/* 26: ^Z SUB */ {M_NONNAME, 26, 26},
|
||||||
/* 27: ^[ ESC */ M_NONNAME, 27, 27,
|
/* 27: ^[ ESC */ {M_NONNAME, 27, 27},
|
||||||
/* 28: ^\ FS */ M_NONNAME, 28, 28,
|
/* 28: ^\ FS */ {M_NONNAME, 28, 28},
|
||||||
/* 29: ^] GS */ M_NONNAME, 29, 29,
|
/* 29: ^] GS */ {M_NONNAME, 29, 29},
|
||||||
/* 30: ^^ RS */ M_NONNAME, 30, 30,
|
/* 30: ^^ RS */ {M_NONNAME, 30, 30},
|
||||||
/* 31: ^_ US */ M_NONNAME, 31, 31,
|
/* 31: ^_ US */ {M_NONNAME, 31, 31},
|
||||||
/* 32: SP */ M_NONNAME, 32, 32,
|
/* 32: SP */ {M_NONNAME, 32, 32},
|
||||||
/* 33: ! */ M_NONNAME, 33, 33,
|
/* 33: ! */ {M_NONNAME, 33, 33},
|
||||||
/* 34: " */ M_NONNAME, 34, 34,
|
/* 34: " */ {M_NONNAME, 34, 34},
|
||||||
/* 35: # */ M_NONNAME, 35, 35,
|
/* 35: # */ {M_NONNAME, 35, 35},
|
||||||
/* 36: $ */ M_NONNAME, 36, 36,
|
/* 36: $ */ {M_NONNAME, 36, 36},
|
||||||
/* 37: % */ M_NONNAME, 37, 37,
|
/* 37: % */ {M_NONNAME, 37, 37},
|
||||||
/* 38: & */ M_NONNAME, 38, 38,
|
/* 38: & */ {M_NONNAME, 38, 38},
|
||||||
/* 39: ' */ M_NONNAME, 39, 39,
|
/* 39: ' */ {M_NONNAME, 39, 39},
|
||||||
/* 40: ( */ M_NONNAME, 40, 40,
|
/* 40: ( */ {M_NONNAME, 40, 40},
|
||||||
/* 41: ) */ M_NONNAME, 41, 41,
|
/* 41: ) */ {M_NONNAME, 41, 41},
|
||||||
/* 42: * */ M_NONNAME, 42, 42,
|
/* 42: * */ {M_NONNAME, 42, 42},
|
||||||
/* 43: + */ M_NAMECHAR, 43, 43,
|
/* 43: + */ {M_NAMECHAR, 43, 43},
|
||||||
/* 44: , */ M_NONNAME, 44, 44,
|
/* 44: , */ {M_NONNAME, 44, 44},
|
||||||
/* 45: - */ M_NAMECHAR, 45, 45,
|
/* 45: - */ {M_NAMECHAR, 45, 45},
|
||||||
/* 46: . */ M_NAMECHAR, 46, 46,
|
/* 46: . */ {M_NAMECHAR, 46, 46},
|
||||||
/* 47: / */ M_NONNAME, 47, 47,
|
/* 47: / */ {M_NONNAME, 47, 47},
|
||||||
/* 48: 0 */ M_DIGIT, 48, 48,
|
/* 48: 0 */ {M_DIGIT, 48, 48},
|
||||||
/* 49: 1 */ M_DIGIT, 49, 49,
|
/* 49: 1 */ {M_DIGIT, 49, 49},
|
||||||
/* 50: 2 */ M_DIGIT, 50, 50,
|
/* 50: 2 */ {M_DIGIT, 50, 50},
|
||||||
/* 51: 3 */ M_DIGIT, 51, 51,
|
/* 51: 3 */ {M_DIGIT, 51, 51},
|
||||||
/* 52: 4 */ M_DIGIT, 52, 52,
|
/* 52: 4 */ {M_DIGIT, 52, 52},
|
||||||
/* 53: 5 */ M_DIGIT, 53, 53,
|
/* 53: 5 */ {M_DIGIT, 53, 53},
|
||||||
/* 54: 6 */ M_DIGIT, 54, 54,
|
/* 54: 6 */ {M_DIGIT, 54, 54},
|
||||||
/* 55: 7 */ M_DIGIT, 55, 55,
|
/* 55: 7 */ {M_DIGIT, 55, 55},
|
||||||
/* 56: 8 */ M_DIGIT, 56, 56,
|
/* 56: 8 */ {M_DIGIT, 56, 56},
|
||||||
/* 57: 9 */ M_DIGIT, 57, 57,
|
/* 57: 9 */ {M_DIGIT, 57, 57},
|
||||||
/* 58: : */ M_NONNAME, 58, 58,
|
/* 58: : */ {M_NONNAME, 58, 58},
|
||||||
/* 59: ; */ M_NONNAME, 59, 59,
|
/* 59: ; */ {M_NONNAME, 59, 59},
|
||||||
/* 60: < */ M_NONNAME, 60, 60,
|
/* 60: < */ {M_NONNAME, 60, 60},
|
||||||
/* 61: = */ M_NONNAME, 61, 61,
|
/* 61: = */ {M_NONNAME, 61, 61},
|
||||||
/* 62: > */ M_NONNAME, 62, 62,
|
/* 62: > */ {M_NONNAME, 62, 62},
|
||||||
/* 63: ? */ M_NONNAME, 63, 63,
|
/* 63: ? */ {M_NONNAME, 63, 63},
|
||||||
/* 64: @ */ M_NONNAME, 64, 64,
|
/* 64: @ */ {M_NONNAME, 64, 64},
|
||||||
/* 65: A */ M_NMSTART, 65, 97,
|
/* 65: A */ {M_NMSTART, 65, 97},
|
||||||
/* 66: B */ M_NMSTART, 66, 98,
|
/* 66: B */ {M_NMSTART, 66, 98},
|
||||||
/* 67: C */ M_NMSTART, 67, 99,
|
/* 67: C */ {M_NMSTART, 67, 99},
|
||||||
/* 68: D */ M_NMSTART, 68, 100,
|
/* 68: D */ {M_NMSTART, 68, 100},
|
||||||
/* 69: E */ M_NMSTART, 69, 101,
|
/* 69: E */ {M_NMSTART, 69, 101},
|
||||||
/* 70: F */ M_NMSTART, 70, 102,
|
/* 70: F */ {M_NMSTART, 70, 102},
|
||||||
/* 71: G */ M_NMSTART, 71, 103,
|
/* 71: G */ {M_NMSTART, 71, 103},
|
||||||
/* 72: H */ M_NMSTART, 72, 104,
|
/* 72: H */ {M_NMSTART, 72, 104},
|
||||||
/* 73: I */ M_NMSTART, 73, 105,
|
/* 73: I */ {M_NMSTART, 73, 105},
|
||||||
/* 74: J */ M_NMSTART, 74, 106,
|
/* 74: J */ {M_NMSTART, 74, 106},
|
||||||
/* 75: K */ M_NMSTART, 75, 107,
|
/* 75: K */ {M_NMSTART, 75, 107},
|
||||||
/* 76: L */ M_NMSTART, 76, 108,
|
/* 76: L */ {M_NMSTART, 76, 108},
|
||||||
/* 77: M */ M_NMSTART, 77, 109,
|
/* 77: M */ {M_NMSTART, 77, 109},
|
||||||
/* 78: N */ M_NMSTART, 78, 110,
|
/* 78: N */ {M_NMSTART, 78, 110},
|
||||||
/* 79: O */ M_NMSTART, 79, 111,
|
/* 79: O */ {M_NMSTART, 79, 111},
|
||||||
/* 80: P */ M_NMSTART, 80, 112,
|
/* 80: P */ {M_NMSTART, 80, 112},
|
||||||
/* 81: Q */ M_NMSTART, 81, 113,
|
/* 81: Q */ {M_NMSTART, 81, 113},
|
||||||
/* 82: R */ M_NMSTART, 82, 114,
|
/* 82: R */ {M_NMSTART, 82, 114},
|
||||||
/* 83: S */ M_NMSTART, 83, 115,
|
/* 83: S */ {M_NMSTART, 83, 115},
|
||||||
/* 84: T */ M_NMSTART, 84, 116,
|
/* 84: T */ {M_NMSTART, 84, 116},
|
||||||
/* 85: U */ M_NMSTART, 85, 117,
|
/* 85: U */ {M_NMSTART, 85, 117},
|
||||||
/* 86: V */ M_NMSTART, 86, 118,
|
/* 86: V */ {M_NMSTART, 86, 118},
|
||||||
/* 87: W */ M_NMSTART, 87, 119,
|
/* 87: W */ {M_NMSTART, 87, 119},
|
||||||
/* 88: X */ M_NMSTART, 88, 120,
|
/* 88: X */ {M_NMSTART, 88, 120},
|
||||||
/* 89: Y */ M_NMSTART, 89, 121,
|
/* 89: Y */ {M_NMSTART, 89, 121},
|
||||||
/* 90: Z */ M_NMSTART, 90, 122,
|
/* 90: Z */ {M_NMSTART, 90, 122},
|
||||||
/* 91: [ */ M_NONNAME, 91, 91,
|
/* 91: [ */ {M_NONNAME, 91, 91},
|
||||||
/* 92: \\ */ M_NONNAME, 92, 92,
|
/* 92: \\ */ {M_NONNAME, 92, 92},
|
||||||
/* 93: ] */ M_NONNAME, 93, 93,
|
/* 93: ] */ {M_NONNAME, 93, 93},
|
||||||
/* 94: ^ */ M_NONNAME, 94, 94,
|
/* 94: ^ */ {M_NONNAME, 94, 94},
|
||||||
/* 95: _ */ M_NONNAME, 95, 95,
|
/* 95: _ */ {M_NONNAME, 95, 95},
|
||||||
/* 96: ` */ M_NONNAME, 96, 96,
|
/* 96: ` */ {M_NONNAME, 96, 96},
|
||||||
/* 97: a */ M_NMSTART, 65, 97,
|
/* 97: a */ {M_NMSTART, 65, 97},
|
||||||
/* 98: b */ M_NMSTART, 66, 98,
|
/* 98: b */ {M_NMSTART, 66, 98},
|
||||||
/* 99: c */ M_NMSTART, 67, 99,
|
/* 99: c */ {M_NMSTART, 67, 99},
|
||||||
/* 100: d */ M_NMSTART, 68, 100,
|
/* 100: d */ {M_NMSTART, 68, 100},
|
||||||
/* 101: e */ M_NMSTART, 69, 101,
|
/* 101: e */ {M_NMSTART, 69, 101},
|
||||||
/* 102: f */ M_NMSTART, 70, 102,
|
/* 102: f */ {M_NMSTART, 70, 102},
|
||||||
/* 103: g */ M_NMSTART, 71, 103,
|
/* 103: g */ {M_NMSTART, 71, 103},
|
||||||
/* 104: h */ M_NMSTART, 72, 104,
|
/* 104: h */ {M_NMSTART, 72, 104},
|
||||||
/* 105: i */ M_NMSTART, 73, 105,
|
/* 105: i */ {M_NMSTART, 73, 105},
|
||||||
/* 106: j */ M_NMSTART, 74, 106,
|
/* 106: j */ {M_NMSTART, 74, 106},
|
||||||
/* 107: k */ M_NMSTART, 75, 107,
|
/* 107: k */ {M_NMSTART, 75, 107},
|
||||||
/* 108: l */ M_NMSTART, 76, 108,
|
/* 108: l */ {M_NMSTART, 76, 108},
|
||||||
/* 109: m */ M_NMSTART, 77, 109,
|
/* 109: m */ {M_NMSTART, 77, 109},
|
||||||
/* 110: n */ M_NMSTART, 78, 110,
|
/* 110: n */ {M_NMSTART, 78, 110},
|
||||||
/* 111: o */ M_NMSTART, 79, 111,
|
/* 111: o */ {M_NMSTART, 79, 111},
|
||||||
/* 112: p */ M_NMSTART, 80, 112,
|
/* 112: p */ {M_NMSTART, 80, 112},
|
||||||
/* 113: q */ M_NMSTART, 81, 113,
|
/* 113: q */ {M_NMSTART, 81, 113},
|
||||||
/* 114: r */ M_NMSTART, 82, 114,
|
/* 114: r */ {M_NMSTART, 82, 114},
|
||||||
/* 115: s */ M_NMSTART, 83, 115,
|
/* 115: s */ {M_NMSTART, 83, 115},
|
||||||
/* 116: t */ M_NMSTART, 84, 116,
|
/* 116: t */ {M_NMSTART, 84, 116},
|
||||||
/* 117: u */ M_NMSTART, 85, 117,
|
/* 117: u */ {M_NMSTART, 85, 117},
|
||||||
/* 118: v */ M_NMSTART, 86, 118,
|
/* 118: v */ {M_NMSTART, 86, 118},
|
||||||
/* 119: w */ M_NMSTART, 87, 119,
|
/* 119: w */ {M_NMSTART, 87, 119},
|
||||||
/* 120: x */ M_NMSTART, 88, 120,
|
/* 120: x */ {M_NMSTART, 88, 120},
|
||||||
/* 121: y */ M_NMSTART, 89, 121,
|
/* 121: y */ {M_NMSTART, 89, 121},
|
||||||
/* 122: z */ M_NMSTART, 90, 122,
|
/* 122: z */ {M_NMSTART, 90, 122},
|
||||||
/* 123: { */ M_NONNAME, 123, 123,
|
/* 123: { */ {M_NONNAME, 123, 123},
|
||||||
/* 124: | */ M_NONNAME, 124, 124,
|
/* 124: | */ {M_NONNAME, 124, 124},
|
||||||
/* 125: } */ M_NONNAME, 125, 125,
|
/* 125: } */ {M_NONNAME, 125, 125},
|
||||||
/* 126: ~ */ M_NONNAME, 126, 126,
|
/* 126: ~ */ {M_NONNAME, 126, 126},
|
||||||
/* 127: DEL */ M_NONNAME, 127, 127,
|
/* 127: DEL */ {M_NONNAME, 127, 127},
|
||||||
/* 128: undefined */ M_NONNAME, 128, 128,
|
/* 128: undefined */ {M_NONNAME, 128, 128},
|
||||||
/* 129: undefined */ M_NONNAME, 129, 129,
|
/* 129: undefined */ {M_NONNAME, 129, 129},
|
||||||
/* 130: undefined */ M_NONNAME, 130, 130,
|
/* 130: undefined */ {M_NONNAME, 130, 130},
|
||||||
/* 131: undefined */ M_NONNAME, 131, 131,
|
/* 131: undefined */ {M_NONNAME, 131, 131},
|
||||||
/* 132: undefined */ M_NONNAME, 132, 132,
|
/* 132: undefined */ {M_NONNAME, 132, 132},
|
||||||
/* 133: undefined */ M_NONNAME, 133, 133,
|
/* 133: undefined */ {M_NONNAME, 133, 133},
|
||||||
/* 134: undefined */ M_NONNAME, 134, 134,
|
/* 134: undefined */ {M_NONNAME, 134, 134},
|
||||||
/* 135: undefined */ M_NONNAME, 135, 135,
|
/* 135: undefined */ {M_NONNAME, 135, 135},
|
||||||
/* 136: undefined */ M_NONNAME, 136, 136,
|
/* 136: undefined */ {M_NONNAME, 136, 136},
|
||||||
/* 137: undefined */ M_NONNAME, 137, 137,
|
/* 137: undefined */ {M_NONNAME, 137, 137},
|
||||||
/* 138: undefined */ M_NONNAME, 138, 138,
|
/* 138: undefined */ {M_NONNAME, 138, 138},
|
||||||
/* 139: undefined */ M_NONNAME, 139, 139,
|
/* 139: undefined */ {M_NONNAME, 139, 139},
|
||||||
/* 140: undefined */ M_NONNAME, 140, 140,
|
/* 140: undefined */ {M_NONNAME, 140, 140},
|
||||||
/* 141: undefined */ M_NONNAME, 141, 141,
|
/* 141: undefined */ {M_NONNAME, 141, 141},
|
||||||
/* 142: undefined */ M_NONNAME, 142, 142,
|
/* 142: undefined */ {M_NONNAME, 142, 142},
|
||||||
/* 143: undefined */ M_NONNAME, 143, 143,
|
/* 143: undefined */ {M_NONNAME, 143, 143},
|
||||||
/* 144: undefined */ M_NONNAME, 144, 144,
|
/* 144: undefined */ {M_NONNAME, 144, 144},
|
||||||
/* 145: undefined */ M_NONNAME, 145, 145,
|
/* 145: undefined */ {M_NONNAME, 145, 145},
|
||||||
/* 146: undefined */ M_NONNAME, 146, 146,
|
/* 146: undefined */ {M_NONNAME, 146, 146},
|
||||||
/* 147: undefined */ M_NONNAME, 147, 147,
|
/* 147: undefined */ {M_NONNAME, 147, 147},
|
||||||
/* 148: undefined */ M_NONNAME, 148, 148,
|
/* 148: undefined */ {M_NONNAME, 148, 148},
|
||||||
/* 149: undefined */ M_NONNAME, 149, 149,
|
/* 149: undefined */ {M_NONNAME, 149, 149},
|
||||||
/* 150: undefined */ M_NONNAME, 150, 150,
|
/* 150: undefined */ {M_NONNAME, 150, 150},
|
||||||
/* 151: undefined */ M_NONNAME, 151, 151,
|
/* 151: undefined */ {M_NONNAME, 151, 151},
|
||||||
/* 152: undefined */ M_NONNAME, 152, 152,
|
/* 152: undefined */ {M_NONNAME, 152, 152},
|
||||||
/* 153: undefined */ M_NONNAME, 153, 153,
|
/* 153: undefined */ {M_NONNAME, 153, 153},
|
||||||
/* 154: undefined */ M_NONNAME, 154, 154,
|
/* 154: undefined */ {M_NONNAME, 154, 154},
|
||||||
/* 155: undefined */ M_NONNAME, 155, 155,
|
/* 155: undefined */ {M_NONNAME, 155, 155},
|
||||||
/* 156: undefined */ M_NONNAME, 156, 156,
|
/* 156: undefined */ {M_NONNAME, 156, 156},
|
||||||
/* 157: undefined */ M_NONNAME, 157, 157,
|
/* 157: undefined */ {M_NONNAME, 157, 157},
|
||||||
/* 158: undefined */ M_NONNAME, 158, 158,
|
/* 158: undefined */ {M_NONNAME, 158, 158},
|
||||||
/* 159: undefined */ M_NONNAME, 159, 159,
|
/* 159: undefined */ {M_NONNAME, 159, 159},
|
||||||
/* 160: undefined */ M_NONNAME, 160, 160,
|
/* 160: undefined */ {M_NONNAME, 160, 160},
|
||||||
/* 161: A grave */ M_NMSTART, 161, 200,
|
/* 161: A grave */ {M_NMSTART, 161, 200},
|
||||||
/* 162: A circumflex */ M_NMSTART, 162, 192,
|
/* 162: A circumflex */ {M_NMSTART, 162, 192},
|
||||||
/* 163: E grave */ M_NMSTART, 163, 201,
|
/* 163: E grave */ {M_NMSTART, 163, 201},
|
||||||
/* 164: E circumflex */ M_NMSTART, 164, 193,
|
/* 164: E circumflex */ {M_NMSTART, 164, 193},
|
||||||
/* 165: E dieresis */ M_NMSTART, 165, 205,
|
/* 165: E dieresis */ {M_NMSTART, 165, 205},
|
||||||
/* 166: I circumflex */ M_NMSTART, 166, 209,
|
/* 166: I circumflex */ {M_NMSTART, 166, 209},
|
||||||
/* 167: I dieresis */ M_NMSTART, 167, 221,
|
/* 167: I dieresis */ {M_NMSTART, 167, 221},
|
||||||
/* 168: acute accent */ M_NONNAME, 168, 168,
|
/* 168: acute accent */ {M_NONNAME, 168, 168},
|
||||||
/* 169: grave accent */ M_NONNAME, 169, 169,
|
/* 169: grave accent */ {M_NONNAME, 169, 169},
|
||||||
/* 170: circumflex */ M_NONNAME, 170, 170,
|
/* 170: circumflex */ {M_NONNAME, 170, 170},
|
||||||
/* 171: dieresis */ M_NONNAME, 171, 171,
|
/* 171: dieresis */ {M_NONNAME, 171, 171},
|
||||||
/* 172: tilde */ M_NONNAME, 172, 172,
|
/* 172: tilde */ {M_NONNAME, 172, 172},
|
||||||
/* 173: U grave */ M_NMSTART, 173, 203,
|
/* 173: U grave */ {M_NMSTART, 173, 203},
|
||||||
/* 174: U circumflex */ M_NMSTART, 174, 195,
|
/* 174: U circumflex */ {M_NMSTART, 174, 195},
|
||||||
/* 175: Italian Lira (invalid) */ M_NONNAME, 175, 175,
|
/* 175: Italian Lira (invalid) */ {M_NONNAME, 175, 175},
|
||||||
/* 176: overbar (invalid) */ M_NONNAME, 176, 176,
|
/* 176: overbar (invalid) */ {M_NONNAME, 176, 176},
|
||||||
/* 177: Y acute */ M_NMSTART, 177, 178,
|
/* 177: Y acute */ {M_NMSTART, 177, 178},
|
||||||
/* 178: y acute */ M_NMSTART, 177, 178,
|
/* 178: y acute */ {M_NMSTART, 177, 178},
|
||||||
/* 179: degree (invalid) */ M_NONNAME, 179, 179,
|
/* 179: degree (invalid) */ {M_NONNAME, 179, 179},
|
||||||
/* 180: C cedilla */ M_NMSTART, 180, 181,
|
/* 180: C cedilla */ {M_NMSTART, 180, 181},
|
||||||
/* 181: c cedilla */ M_NMSTART, 180, 181,
|
/* 181: c cedilla */ {M_NMSTART, 180, 181},
|
||||||
/* 182: N tilde */ M_NMSTART, 182, 183,
|
/* 182: N tilde */ {M_NMSTART, 182, 183},
|
||||||
/* 183: n tilde */ M_NMSTART, 182, 183,
|
/* 183: n tilde */ {M_NMSTART, 182, 183},
|
||||||
/* 184: inverted exclamation mark */ M_NONNAME, 184, 184,
|
/* 184: inverted exclamation mark */ {M_NONNAME, 184, 184},
|
||||||
/* 185: inverted question mark */ M_NONNAME, 185, 185,
|
/* 185: inverted question mark */ {M_NONNAME, 185, 185},
|
||||||
/* 186: currency sign (invalid) */ M_NONNAME, 186, 186,
|
/* 186: currency sign (invalid) */ {M_NONNAME, 186, 186},
|
||||||
/* 187: pound sterling (invalid) */ M_NONNAME, 187, 187,
|
/* 187: pound sterling (invalid) */ {M_NONNAME, 187, 187},
|
||||||
/* 188: Yen */ M_NONNAME, 188, 188,
|
/* 188: Yen */ {M_NONNAME, 188, 188},
|
||||||
/* 189: Section sign (invalid) */ M_NONNAME, 189, 189,
|
/* 189: Section sign (invalid) */ {M_NONNAME, 189, 189},
|
||||||
/* 190: florin (invalid) */ M_NONNAME, 190, 190,
|
/* 190: florin (invalid) */ {M_NONNAME, 190, 190},
|
||||||
/* 191: Cent sign (invalid) */ M_NONNAME, 191, 191,
|
/* 191: Cent sign (invalid) */ {M_NONNAME, 191, 191},
|
||||||
/* 192: a circumflex */ M_NMSTART, 162, 192,
|
/* 192: a circumflex */ {M_NMSTART, 162, 192},
|
||||||
/* 193: e circumflex */ M_NMSTART, 164, 193,
|
/* 193: e circumflex */ {M_NMSTART, 164, 193},
|
||||||
/* 194: o circumflex */ M_NMSTART, 223, 194,
|
/* 194: o circumflex */ {M_NMSTART, 223, 194},
|
||||||
/* 195: u circumflex */ M_NMSTART, 174, 195,
|
/* 195: u circumflex */ {M_NMSTART, 174, 195},
|
||||||
/* 196: a acute */ M_NMSTART, 224, 196,
|
/* 196: a acute */ {M_NMSTART, 224, 196},
|
||||||
/* 197: e acute */ M_NMSTART, 220, 197,
|
/* 197: e acute */ {M_NMSTART, 220, 197},
|
||||||
/* 198: o acute */ M_NMSTART, 231, 198,
|
/* 198: o acute */ {M_NMSTART, 231, 198},
|
||||||
/* 199: u acute */ M_NMSTART, 237, 199,
|
/* 199: u acute */ {M_NMSTART, 237, 199},
|
||||||
/* 200: a grave */ M_NMSTART, 161, 200,
|
/* 200: a grave */ {M_NMSTART, 161, 200},
|
||||||
/* 201: e grave */ M_NMSTART, 163, 201,
|
/* 201: e grave */ {M_NMSTART, 163, 201},
|
||||||
/* 202: o grave */ M_NMSTART, 232, 202,
|
/* 202: o grave */ {M_NMSTART, 232, 202},
|
||||||
/* 203: u grave */ M_NMSTART, 173, 203,
|
/* 203: u grave */ {M_NMSTART, 173, 203},
|
||||||
/* 204: a dieresis */ M_NMSTART, 216, 204,
|
/* 204: a dieresis */ {M_NMSTART, 216, 204},
|
||||||
/* 205: e dieresis */ M_NMSTART, 165, 205,
|
/* 205: e dieresis */ {M_NMSTART, 165, 205},
|
||||||
/* 206: o dieresis */ M_NMSTART, 218, 206,
|
/* 206: o dieresis */ {M_NMSTART, 218, 206},
|
||||||
/* 207: u dieresis */ M_NMSTART, 219, 207,
|
/* 207: u dieresis */ {M_NMSTART, 219, 207},
|
||||||
/* 208: A angstrom */ M_NMSTART, 208, 212,
|
/* 208: A angstrom */ {M_NMSTART, 208, 212},
|
||||||
/* 209: i circumflex */ M_NMSTART, 166, 209,
|
/* 209: i circumflex */ {M_NMSTART, 166, 209},
|
||||||
/* 210: O slash */ M_NMSTART, 210, 214,
|
/* 210: O slash */ {M_NMSTART, 210, 214},
|
||||||
/* 211: AE ligature */ M_NMSTART, 211, 215,
|
/* 211: AE ligature */ {M_NMSTART, 211, 215},
|
||||||
/* 212: a angstrom */ M_NMSTART, 208, 212,
|
/* 212: a angstrom */ {M_NMSTART, 208, 212},
|
||||||
/* 213: i acute */ M_NMSTART, 229, 213,
|
/* 213: i acute */ {M_NMSTART, 229, 213},
|
||||||
/* 214: o slash */ M_NMSTART, 210, 214,
|
/* 214: o slash */ {M_NMSTART, 210, 214},
|
||||||
/* 215: ae ligature */ M_NMSTART, 211, 215,
|
/* 215: ae ligature */ {M_NMSTART, 211, 215},
|
||||||
/* 216: A dieresis */ M_NMSTART, 216, 204,
|
/* 216: A dieresis */ {M_NMSTART, 216, 204},
|
||||||
/* 217: i grave */ M_NMSTART, 230, 217,
|
/* 217: i grave */ {M_NMSTART, 230, 217},
|
||||||
/* 218: O dieresis */ M_NMSTART, 218, 206,
|
/* 218: O dieresis */ {M_NMSTART, 218, 206},
|
||||||
/* 219: U dieresis */ M_NMSTART, 219, 207,
|
/* 219: U dieresis */ {M_NMSTART, 219, 207},
|
||||||
/* 220: E acute */ M_NMSTART, 220, 197,
|
/* 220: E acute */ {M_NMSTART, 220, 197},
|
||||||
/* 221: i dieresis */ M_NMSTART, 167, 221,
|
/* 221: i dieresis */ {M_NMSTART, 167, 221},
|
||||||
/* 222: SS ligature */ M_NMSTART, 222, 222,
|
/* 222: SS ligature */ {M_NMSTART, 222, 222},
|
||||||
/* 223: O circumflex */ M_NMSTART, 223, 194,
|
/* 223: O circumflex */ {M_NMSTART, 223, 194},
|
||||||
/* 224: A acute */ M_NMSTART, 224, 196,
|
/* 224: A acute */ {M_NMSTART, 224, 196},
|
||||||
/* 225: A tilde */ M_NMSTART, 225, 226,
|
/* 225: A tilde */ {M_NMSTART, 225, 226},
|
||||||
/* 226: a tilde */ M_NMSTART, 225, 226,
|
/* 226: a tilde */ {M_NMSTART, 225, 226},
|
||||||
/* 227: Eth (invalid) */ M_NMSTART, 227, 228,
|
/* 227: Eth (invalid) */ {M_NMSTART, 227, 228},
|
||||||
/* 228: eth (invalid) */ M_NMSTART, 227, 228,
|
/* 228: eth (invalid) */ {M_NMSTART, 227, 228},
|
||||||
/* 229: I acute */ M_NMSTART, 229, 213,
|
/* 229: I acute */ {M_NMSTART, 229, 213},
|
||||||
/* 230: I grave */ M_NMSTART, 230, 217,
|
/* 230: I grave */ {M_NMSTART, 230, 217},
|
||||||
/* 231: O acute */ M_NMSTART, 231, 198,
|
/* 231: O acute */ {M_NMSTART, 231, 198},
|
||||||
/* 232: O grave */ M_NMSTART, 232, 202,
|
/* 232: O grave */ {M_NMSTART, 232, 202},
|
||||||
/* 233: O tilde */ M_NMSTART, 233, 234,
|
/* 233: O tilde */ {M_NMSTART, 233, 234},
|
||||||
/* 234: o tilde */ M_NMSTART, 233, 234,
|
/* 234: o tilde */ {M_NMSTART, 233, 234},
|
||||||
/* 235: S caron */ M_NMSTART, 235, 236,
|
/* 235: S caron */ {M_NMSTART, 235, 236},
|
||||||
/* 236: s caron */ M_NMSTART, 235, 236,
|
/* 236: s caron */ {M_NMSTART, 235, 236},
|
||||||
/* 237: U acute */ M_NMSTART, 237, 199,
|
/* 237: U acute */ {M_NMSTART, 237, 199},
|
||||||
/* 238: Y dieresis */ M_NMSTART, 238, 239,
|
/* 238: Y dieresis */ {M_NMSTART, 238, 239},
|
||||||
/* 239: y dieresis */ M_NMSTART, 238, 239,
|
/* 239: y dieresis */ {M_NMSTART, 238, 239},
|
||||||
/* 240: Thorn (invalid) */ M_NMSTART, 240, 241,
|
/* 240: Thorn (invalid) */ {M_NMSTART, 240, 241},
|
||||||
/* 241: thorn (invalid) */ M_NMSTART, 240, 241,
|
/* 241: thorn (invalid) */ {M_NMSTART, 240, 241},
|
||||||
/* 242: undefined */ M_NONNAME, 242, 242,
|
/* 242: undefined */ {M_NONNAME, 242, 242},
|
||||||
/* 243: mu (invalid) */ M_NONNAME, 243, 243,
|
/* 243: mu (invalid) */ {M_NONNAME, 243, 243},
|
||||||
/* 244: paragraph sign (invalid) */ M_NONNAME, 244, 244,
|
/* 244: paragraph sign (invalid) */ {M_NONNAME, 244, 244},
|
||||||
/* 245: fraction 3/4 (invalid) */ M_NONNAME, 245, 245,
|
/* 245: fraction 3/4 (invalid) */ {M_NONNAME, 245, 245},
|
||||||
/* 246: long dash (invalid) */ M_NONNAME, 246, 246,
|
/* 246: long dash (invalid) */ {M_NONNAME, 246, 246},
|
||||||
/* 247: fraction 1/4 (invalid) */ M_NONNAME, 247, 247,
|
/* 247: fraction 1/4 (invalid) */ {M_NONNAME, 247, 247},
|
||||||
/* 248: fraction 1/2 (invalid) */ M_NONNAME, 248, 248,
|
/* 248: fraction 1/2 (invalid) */ {M_NONNAME, 248, 248},
|
||||||
/* 249: Female ordinal (invalid) */ M_NONNAME, 249, 249,
|
/* 249: Female ordinal (invalid) */ {M_NONNAME, 249, 249},
|
||||||
/* 250: Male ordinal (invalid) */ M_NONNAME, 250, 250,
|
/* 250: Male ordinal (invalid) */ {M_NONNAME, 250, 250},
|
||||||
/* 251: French double open quote(invalid) */ M_NONNAME, 251, 251,
|
/* 251: French double open quote(invalid) */ {M_NONNAME, 251, 251},
|
||||||
/* 252: Solid square (invalid) */ M_NONNAME, 252, 252,
|
/* 252: Solid square (invalid) */ {M_NONNAME, 252, 252},
|
||||||
/* 253: French double close quote(invalid) */ M_NONNAME, 253, 253,
|
/* 253: French double close quote(invalid) */ {M_NONNAME, 253, 253},
|
||||||
/* 254: Plus over minus sign(invalid)*/ M_NONNAME, 254, 254,
|
/* 254: Plus over minus sign(invalid)*/ {M_NONNAME, 254, 254},
|
||||||
/* 255: undefined */ M_NONNAME, 255, 255,
|
/* 255: undefined */ {M_NONNAME, 255, 255},
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ int m_lower(
|
||||||
#endif
|
#endif
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
void main(
|
int main(
|
||||||
#if defined(M_PROTO)
|
#if defined(M_PROTO)
|
||||||
int argc, char **argv
|
int argc, char **argv
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -169,7 +169,7 @@ delim.h.
|
||||||
#include "cont.h"
|
#include "cont.h"
|
||||||
|
|
||||||
/* Main procedure */
|
/* Main procedure */
|
||||||
void main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc ;
|
int argc ;
|
||||||
char **argv ;
|
char **argv ;
|
||||||
{
|
{
|
||||||
|
|
|
@ -127,11 +127,13 @@ M_WCHAR wlb = 0, wcm, wnl, wsl, wst;
|
||||||
|
|
||||||
if (!wlb)
|
if (!wlb)
|
||||||
{
|
{
|
||||||
mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
|
int
|
||||||
mbtowc(&wcm, ",", 1);
|
ret = mbtowc(&wlb, "{", 1); /* keep the "}" balanced */
|
||||||
mbtowc(&wnl, "\n", 1);
|
ret = mbtowc(&wcm, ",", 1);
|
||||||
mbtowc(&wsl, "/", 1);
|
ret = mbtowc(&wnl, "\n", 1);
|
||||||
mbtowc(&wst, "*", 1);
|
ret = mbtowc(&wsl, "/", 1);
|
||||||
|
ret = mbtowc(&wst, "*", 1);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
|
while (m_whitespace((M_WCHAR) (c = readchar(FALSE))));
|
||||||
|
@ -226,7 +228,8 @@ M_WCHAR wcl;
|
||||||
char unexp[32]; /* arbitraily large */
|
char unexp[32]; /* arbitraily large */
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
mbtowc(&wcl, ":", 1);
|
int ret = mbtowc(&wcl, ":", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
@ -252,9 +255,11 @@ char *mb_name;
|
||||||
|
|
||||||
if (!wsm)
|
if (!wsm)
|
||||||
{
|
{
|
||||||
mbtowc(&wsm, ";", 1);
|
int
|
||||||
mbtowc(&wcl, ":", 1);
|
ret = mbtowc(&wsm, ";", 1);
|
||||||
mbtowc(&wcm, ",", 1);
|
ret = mbtowc(&wcl, ":", 1);
|
||||||
|
ret = mbtowc(&wcm, ",", 1);
|
||||||
|
(void) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
|
@ -333,7 +338,7 @@ c = readchar(TRUE))
|
||||||
*p++ = (M_WCHAR) c;
|
*p++ = (M_WCHAR) c;
|
||||||
}
|
}
|
||||||
*p = M_EOS;
|
*p = M_EOS;
|
||||||
if (dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie))
|
if ((dstruct = (struct dstruct *) m_lookfortrie(dname, &delimtrie)))
|
||||||
{
|
{
|
||||||
withdelim = TRUE;
|
withdelim = TRUE;
|
||||||
curdelim = dstruct->count - 1;
|
curdelim = dstruct->count - 1;
|
||||||
|
@ -451,7 +456,8 @@ int i;
|
||||||
M_WCHAR wnl;
|
M_WCHAR wnl;
|
||||||
char *mb_dname, *mb_dstring;
|
char *mb_dname, *mb_dstring;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
loading = TRUE;
|
loading = TRUE;
|
||||||
while ((c = getc(ddat)) != EOF)
|
while ((c = getc(ddat)) != EOF)
|
||||||
|
@ -526,13 +532,13 @@ while ((c = getc(ddat)) != EOF)
|
||||||
fprintf(delim,
|
fprintf(delim,
|
||||||
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
|
"M_DELIMEXTERN char %s[%d] M_DELIMINIT(\"",
|
||||||
mb_dname,
|
mb_dname,
|
||||||
strlen(mb_dstring) + 1);
|
(int)strlen(mb_dstring) + 1);
|
||||||
|
|
||||||
for (p = dstring ; *p ; p++)
|
for (p = dstring ; *p ; p++)
|
||||||
{
|
{
|
||||||
char *pc;
|
char *pc;
|
||||||
char mb_p[32]; /* arbitrarily large */
|
char mb_p[32]; /* arbitrarily large */
|
||||||
int length, i;
|
int length;
|
||||||
|
|
||||||
length = wctomb(mb_p, *p);
|
length = wctomb(mb_p, *p);
|
||||||
mb_p[length] = 0;
|
mb_p[length] = 0;
|
||||||
|
@ -629,7 +635,7 @@ void prtctxt(column, value)
|
||||||
|
|
||||||
if (! first) fprintf(delim, ",\n");
|
if (! first) fprintf(delim, ",\n");
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
fprintf(delim, " %d, %d", column, value);
|
fprintf(delim, " {%d, %d}", column, value);
|
||||||
nonzero++;
|
nonzero++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +651,8 @@ int readchar(cap)
|
||||||
int c;
|
int c;
|
||||||
M_WCHAR wnl;
|
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 */
|
c = mb_getwc(cdat); /* use mb_getwc so we read multi-byte chars */
|
||||||
if (cap && c != EOF) c = m_upper(c);
|
if (cap && c != EOF) c = m_upper(c);
|
||||||
|
@ -667,7 +674,8 @@ int c;
|
||||||
{
|
{
|
||||||
M_WCHAR wnl;
|
M_WCHAR wnl;
|
||||||
|
|
||||||
mbtowc(&wnl, "\n", 1);
|
int ret = mbtowc(&wnl, "\n", 1);
|
||||||
|
(void) ret;
|
||||||
|
|
||||||
ungetc(c, cdat);
|
ungetc(c, cdat);
|
||||||
if (c == wnl) m_line--;
|
if (c == wnl) m_line--;
|
||||||
|
|
|
@ -72,8 +72,8 @@ void entout(fname)
|
||||||
int nameindex ;
|
int nameindex ;
|
||||||
LOGICAL start ;
|
LOGICAL start ;
|
||||||
|
|
||||||
strcpy(efilename, fname) ;
|
strncpy(efilename, fname, ENTFILENAME) ;
|
||||||
strcpy(&efilename[strlen(efilename)], ".h") ;
|
strncpy(&efilename[strlen(efilename)], ".h", 2) ;
|
||||||
m_openchk(&entfile, efilename, "w") ;
|
m_openchk(&entfile, efilename, "w") ;
|
||||||
|
|
||||||
fprintf(entfile, "#include \"entdef.h\"\n") ;
|
fprintf(entfile, "#include \"entdef.h\"\n") ;
|
||||||
|
@ -101,7 +101,7 @@ void entout(fname)
|
||||||
if (start) fputs(",\n", entfile) ;
|
if (start) fputs(",\n", entfile) ;
|
||||||
start = TRUE ;
|
start = TRUE ;
|
||||||
for (p = ent->content ; *p ; p++)
|
for (p = ent->content ; *p ; p++)
|
||||||
fprintf(entfile, " %d,\n", *p) ;
|
fprintf(entfile, " %d,\n", (int)*p) ;
|
||||||
fputs(" 0", entfile) ;
|
fputs(" 0", entfile) ;
|
||||||
}
|
}
|
||||||
fprintf(entfile, "}\n#endif\n") ;
|
fprintf(entfile, "}\n#endif\n") ;
|
||||||
|
@ -112,7 +112,7 @@ void entout(fname)
|
||||||
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
|
fputs("#if defined(M_ENTDEF)\n = {\n", entfile) ;
|
||||||
for (ent = firstent ; ent ; ent = ent->next) {
|
for (ent = firstent ; ent ; ent = ent->next) {
|
||||||
for (p = ent->name ; *p ; p++)
|
for (p = ent->name ; *p ; p++)
|
||||||
fprintf(entfile, " %d,\n", *p) ;
|
fprintf(entfile, " %d,\n", (int)*p) ;
|
||||||
if (ent != lastent) fputs(" 0,\n", entfile) ;
|
if (ent != lastent) fputs(" 0,\n", entfile) ;
|
||||||
else fputs(" 0\n", entfile) ;
|
else fputs(" 0\n", entfile) ;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ void entout(fname)
|
||||||
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
|
fprintf(entfile, "#if defined(M_ENTDEF)\n = {\n") ;
|
||||||
for (ent = firstent, conindex = 0, nameindex = 0 ;
|
for (ent = firstent, conindex = 0, nameindex = 0 ;
|
||||||
ent ; ent = ent->next) {
|
ent ; ent = ent->next) {
|
||||||
fprintf(entfile, " %s, %s, ",
|
fprintf(entfile, " {%s, %s, ",
|
||||||
typetype(ent->type),
|
typetype(ent->type),
|
||||||
typewhere(ent->wheredef)) ;
|
typewhere(ent->wheredef)) ;
|
||||||
if (ent->content) {
|
if (ent->content) {
|
||||||
|
@ -143,10 +143,10 @@ void entout(fname)
|
||||||
#if defined(BUILDEXTERN)
|
#if defined(BUILDEXTERN)
|
||||||
fprintf(entfile, ", %d", ent->index) ;
|
fprintf(entfile, ", %d", ent->index) ;
|
||||||
if (ent != lastent)
|
if (ent != lastent)
|
||||||
fprintf(entfile, ", &m_entities[%d], 0", ent->index) ;
|
fprintf(entfile, ", &m_entities[%d], 0}", ent->index) ;
|
||||||
else fputs(", NULL, 0", entfile) ;
|
else fputs(", NULL, 0}", entfile) ;
|
||||||
#else
|
#else
|
||||||
fprintf(entfile, ", %d", ent->codeindex) ;
|
fprintf(entfile, ", %d}", ent->codeindex) ;
|
||||||
#endif
|
#endif
|
||||||
if (ent != lastent) fprintf(entfile, ", \n") ;
|
if (ent != lastent) fprintf(entfile, ", \n") ;
|
||||||
else fprintf(entfile, "}\n#endif\n") ;
|
else fprintf(entfile, "}\n#endif\n") ;
|
||||||
|
@ -159,7 +159,7 @@ void entout(fname)
|
||||||
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
|
"M_ENTEXTERN M_TRIE m_enttrie[%d]\n", count) ;
|
||||||
if (m_enttrie->data) {
|
if (m_enttrie->data) {
|
||||||
count = 0 ;
|
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) ;
|
m_dumptrie(entfile, m_enttrie->data, "m_enttrie", &count, entptr) ;
|
||||||
fprintf(entfile, "}\n#endif\n") ;
|
fprintf(entfile, "}\n#endif\n") ;
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,7 @@ char *typewhere(n)
|
||||||
case M_DELTDEF: return(xdeltdef) ;
|
case M_DELTDEF: return(xdeltdef) ;
|
||||||
case FALSE: return("0") ;
|
case FALSE: return("0") ;
|
||||||
}
|
}
|
||||||
|
return("0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -306,8 +306,8 @@ void esuffix(M_NOPAR)
|
||||||
void msgline(text)
|
void msgline(text)
|
||||||
char *text ;
|
char *text ;
|
||||||
{
|
{
|
||||||
fprintf(stderr, text) ;
|
fprintf(stderr, "%s", text) ;
|
||||||
fprintf(m_errfile, text) ;
|
fprintf(m_errfile, "%s", text) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print something to both stderr and m_errfile */
|
/* Print something to both stderr and m_errfile */
|
||||||
|
|
|
@ -130,17 +130,19 @@ void copyfile(pfile1,pfile2)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
char *pcmd;
|
char *pcmd;
|
||||||
|
int slen;
|
||||||
|
|
||||||
/* malloc space for the system command: two filenames, plus a command,
|
/* malloc space for the system command: two filenames, plus a command,
|
||||||
spaces, and the terminating null */
|
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)
|
#if defined(MSDOS)
|
||||||
ret = sprintf(pcmd,"copy %s %s",pfile1,pfile2);
|
ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
|
||||||
#else
|
#else
|
||||||
ret = sprintf(pcmd,"cp %s %s",pfile1,pfile2);
|
ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
|
||||||
#endif
|
#endif
|
||||||
ret = system(pcmd);
|
ret = system(pcmd);
|
||||||
ret = sprintf(pcmd,"touch %s",pfile2);
|
ret = snprintf(pcmd, slen, "touch %s",pfile2);
|
||||||
ret = system(pcmd);
|
ret = system(pcmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue