Well thats it for dthelp, the final boss seems to be dtinfo, seems extremely
complicated from the glance I took at it...
Thank you for your time,
-Chase
From e63a070a4a101c816d3d7a442f0b5ad2c81591da Mon Sep 17 00:00:00 2001
From: Chase <nicetry...@protonmail.ch>
Date: Mon, 15 Feb 2021 21:31:52 -0600
Subject: [PATCH] dthelp/parser/pass2: make it build
---
cde/.gitignore | 41 ++++++++++++++
cde/configure.ac | 6 ++
cde/programs/dthelp/parser/Makefile.am | 4 +-
.../dthelp/parser/pass2/build/Makefile.am | 56 +++++++++++++++++++
.../dthelp/parser/pass2/eltdef/Makefile.am | 52 +++++++++++++++++
.../dthelp/parser/pass2/htag2/Makefile.am | 42 ++++++++++++++
.../dthelp/parser/pass2/parser/Makefile.am | 50 +++++++++++++++++
.../dthelp/parser/pass2/util/Makefile.am | 21 +++++++
8 files changed, 269 insertions(+), 3 deletions(-)
create mode 100644 cde/programs/dthelp/parser/pass2/build/Makefile.am
create mode 100644 cde/programs/dthelp/parser/pass2/eltdef/Makefile.am
create mode 100644 cde/programs/dthelp/parser/pass2/htag2/Makefile.am
create mode 100644 cde/programs/dthelp/parser/pass2/parser/Makefile.am
create mode 100644 cde/programs/dthelp/parser/pass2/util/Makefile.am
diff --git a/cde/.gitignore b/cde/.gitignore
index 4972fbb7b..5c9269386 100644
--- a/cde/.gitignore
+++ b/cde/.gitignore
@@ -598,6 +598,47 @@ programs/dthelp/parser/pass1/parser/dthelp_htag1
programs/dthelp/parser/pass1/parser/error
programs/dthelp/parser/pass1/util/context
programs/dthelp/parser/pass1/util/fclndir
+programs/dthelp/parser/pass2/build/arc.h
+programs/dthelp/parser/pass2/build/build
+programs/dthelp/parser/pass2/build/case.c
+programs/dthelp/parser/pass2/build/context.h
+programs/dthelp/parser/pass2/build/delim.dat
+programs/dthelp/parser/pass2/build/delim.h
+programs/dthelp/parser/pass2/build/dtd.h
+programs/dthelp/parser/pass2/build/entity.h
+programs/dthelp/parser/pass2/build/error
+programs/dthelp/parser/pass2/build/template
+programs/dthelp/parser/pass2/eltdef/case.c
+programs/dthelp/parser/pass2/eltdef/context.h
+programs/dthelp/parser/pass2/eltdef/delim.dat
+programs/dthelp/parser/pass2/eltdef/delim.h
+programs/dthelp/parser/pass2/eltdef/efile.c
+programs/dthelp/parser/pass2/eltdef/eltdef
+programs/dthelp/parser/pass2/eltdef/entfile.c
+programs/dthelp/parser/pass2/eltdef/entity2.h
+programs/dthelp/parser/pass2/eltdef/error
+programs/dthelp/parser/pass2/eltdef/estring.h
+programs/dthelp/parser/pass2/eltdef/globdec.h
+programs/dthelp/parser/pass2/eltdef/globdef.h
+programs/dthelp/parser/pass2/eltdef/if.h
+programs/dthelp/parser/pass2/eltdef/pfile.c
+programs/dthelp/parser/pass2/eltdef/pval.h
+programs/dthelp/parser/pass2/eltdef/sfile.c
+programs/dthelp/parser/pass2/eltdef/signon.h
+programs/dthelp/parser/pass2/eltdef/signonx.h
+programs/dthelp/parser/pass2/eltdef/stfile.c
+programs/dthelp/parser/pass2/eltdef/tfile.c
+programs/dthelp/parser/pass2/htag2/LocaleXlate.c
+programs/dthelp/parser/pass2/htag2/XlationSvc.c
+programs/dthelp/parser/pass2/parser/dthelp_htag2
+programs/dthelp/parser/pass2/parser/case.c
+programs/dthelp/parser/pass2/parser/context.h
+programs/dthelp/parser/pass2/parser/delim.dat
+programs/dthelp/parser/pass2/parser/delim.h
+programs/dthelp/parser/pass2/parser/error
+programs/dthelp/parser/pass2/parser/parser
+programs/dthelp/parser/pass2/util/context
+programs/dthelp/parser/pass2/util/fclndir
programs/dthelp/parser/helptag/dthelptag
# programs/dtinfo
diff --git a/cde/configure.ac b/cde/configure.ac
index 969faa1ff..45fb04a98 100644
--- a/cde/configure.ac
+++ b/cde/configure.ac
@@ -526,6 +526,12 @@ programs/dthelp/parser/canon1/build/Makefile
programs/dthelp/parser/canon1/eltdef/Makefile
programs/dthelp/parser/canon1/helptag/Makefile
programs/dthelp/parser/canon1/parser/Makefile
+programs/dthelp/parser/pass2/Makefile
+programs/dthelp/parser/pass2/util/Makefile
+programs/dthelp/parser/pass2/build/Makefile
+programs/dthelp/parser/pass2/eltdef/Makefile
+programs/dthelp/parser/pass2/htag2/Makefile
+programs/dthelp/parser/pass2/parser/Makefile
programs/dthelp/parser/helptag/Makefile
programs/nsgmls/Makefile
diff --git a/cde/programs/dthelp/parser/Makefile.am b/cde/programs/dthelp/parser/Makefile.am
index af5381c79..4e0157e31 100644
--- a/cde/programs/dthelp/parser/Makefile.am
+++ b/cde/programs/dthelp/parser/Makefile.am
@@ -1,5 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = pass1 canon1 helptag
-
-#NOTYET pass2
+SUBDIRS = pass1 canon1 pass2 helptag
diff --git a/cde/programs/dthelp/parser/pass2/build/Makefile.am b/cde/programs/dthelp/parser/pass2/build/Makefile.am
new file mode 100644
index 000000000..582bb0f43
--- /dev/null
+++ b/cde/programs/dthelp/parser/pass2/build/Makefile.am
@@ -0,0 +1,56 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_PROGRAMS = build
+
+HTAG2 = ..
+HTAG2SRC = $(HTAG2)/htag2
+SDLPARSERSRC = $(HTAG2)/parser
+SDLELTDEFSRC = $(HTAG2)/eltdef
+SDLDTDFILE = $(HTAG2SRC)/sdl.dtd
+SDLUTILSRC = $(HTAG2)/util
+SDLBUILDSRC = $(HTAG2)/build
+SDLUTILLIB = $(HTAG2)/util/libutil.a
+SDLIFFILE = $(HTAG2SRC)/help.if
+
+build_CFLAGS = -I$(SDLUTILSRC)
+
+build_LDADD = ../util/libutil.a
+
+build_SOURCES = build.c buildutl.c eltree.c except.c fsa.c out.c param.c \
+ scan.c sref.c tree.c
+
+CHPRODS = context.h delim.h
+CCPRODS = case.c
+
+BHPRODS = dtd.h entity.h arc.h
+BCPRODS =
+
+CTRASH = error delim.dat
+BTRASH = error template
+
+CPRODS = $(CHPRODS) $(CCPRODS)
+BPRODS = $(BHPRODS) $(BCPRODS)
+TRASH = error delim.dat template
+
+BUILT_SOURCES = $(CPRODS) $(BPRODS)
+CLEANFILES = $(BUILT_SOURCES) $(TRASH) BDONE CDONE
+
+# We want the commands that actually create BPRODS and CPRODS to only
+# run once during a make so we gate them using these CDONE and BDONE
+# targets. This allows us to enable parallel building too.
+$(BPRODS): BDONE
+
+$(CPRODS): CDONE
+
+# build the BRPODS
+BDONE: ./build $(SDLDTDFILE)
+ $(RM) $(BPRODS) $(BTRASH) && ./build < $(SDLDTDFILE) && touch BDONE
+
+
+# build the CRPODS
+CDONE: $(SDLUTILSRC)/context $(HTAG2SRC)/delim.bld context.dat
+ $(RM) $(CPRODS) $(CTRASH)
+ $(CP) $(HTAG2SRC)/delim.bld delim.dat # appl.-specific delim.dat
+ $(SDLUTILSRC)/context sparse
+ touch CDONE
+
diff --git a/cde/programs/dthelp/parser/pass2/eltdef/Makefile.am b/cde/programs/dthelp/parser/pass2/eltdef/Makefile.am
new file mode 100644
index 000000000..666f7dd5d
--- /dev/null
+++ b/cde/programs/dthelp/parser/pass2/eltdef/Makefile.am
@@ -0,0 +1,52 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_PROGRAMS = eltdef
+
+HTAG2 = ..
+HTAG2SRC = $(HTAG2)/htag2
+SDLPARSERSRC = $(HTAG2)/parser
+SDLELTDEFSRC = $(HTAG2)/eltdef
+SDLDTDFILE = $(HTAG2SRC)/sdl.dtd
+SDLUTILSRC = $(HTAG2)/util
+SDLBUILDSRC = $(HTAG2)/build
+SDLUTILLIB = $(HTAG2)/util/libutil.a
+SDLIFFILE = $(HTAG2SRC)/sdl.if
+
+eltdef_LDADD = $(SDLUTILLIB)
+
+eltdef_CFLAGS = -I$(SDLUTILSRC) -I$(SDLBUILDSRC)
+
+eltdef_SOURCES = eltdef.c eltutil.c entity.c scan.c
+
+CCPRODS = case.c
+ECPRODS = efile.c entfile.c pfile.c sfile.c stfile.c tfile.c
+
+CHPRODS = context.h delim.h
+EHPRODS = entity2.h globdec.h globdef.h if.h pval.h signon.h signonx.h
+
+CPRODS = $(CCPRODS) $(CHPRODS)
+EPRODS = $(ECPRODS) $(EHPRODS)
+
+CTRASH = delim.dat error
+ETRASH = estring.h error
+TRASH = delim.dat estring.h error
+
+BUILT_SOURCES = $(CPRODS) $(EPRODS)
+CLEANFILES = $(BUILT_SOURCES) $(TRASH) CDONE EDONE
+
+$(CPRODS): CDONE
+
+$(EPRODS): EDONE
+
+
+EDONE: eltdef $(SDLIFFILE)
+ $(RM) $(EPRODS) $(ETRASH)
+ ./eltdef $(SDLIFFILE)
+ touch EDONE
+
+CDONE: $(SDLUTILSRC)/context $(HTAG2SRC)/delim.elt context.dat
+ $(RM) $(CPRODS) $(CTRASH)
+ $(CP) $(HTAG2SRC)/delim.elt delim.dat # appl.-specific delim.dat
+ $(SDLUTILSRC)/context
+ touch CDONE
+
diff --git a/cde/programs/dthelp/parser/pass2/htag2/Makefile.am b/cde/programs/dthelp/parser/pass2/htag2/Makefile.am
new file mode 100644
index 000000000..c39779128
--- /dev/null
+++ b/cde/programs/dthelp/parser/pass2/htag2/Makefile.am
@@ -0,0 +1,42 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+# Due to the wierd interdepencencies between helptag and parser,
+# disable parallel builds here. This is some really horrible code and
+# design - not surprising since it dates to 1989.
+.NOTPARALLEL:
+
+HTAG2 = ..
+HTAG2SRC = $(HTAG2)/htag2
+SDLPARSERSRC = $(HTAG2)/parser
+SDLELTDEFSRC = $(HTAG2)/eltdef
+SDLDTDFILE = $(HTAG2SRC)/sdl.dtd
+SDLUTILSRC = $(HTAG2)/util
+SDLBUILDSRC = $(HTAG2)/build
+SDLUTILLIB = $(HTAG2)/util/libutil.a
+SDLIFFILE = $(HTAG2SRC)/help.if
+
+XLATESRCS = XlationSvc.c LocaleXlate.c
+
+XLATESRCDIR = ${top_srcdir}/lib/DtSvc/DtUtil2
+
+$(XLATESRCS): XDONE
+
+XDONE: $(XLATESRCDIR)/XlationSvc.c $(XLATESRCDIR)/LocaleXlate.c
+ $(RM) $(XLATESRCS)
+ $(CP) $(XLATESRCDIR)/XlationSvc.c XlationSvc.c
+ $(CP) $(XLATESRCDIR)/LocaleXlate.c LocaleXlate.c
+ cd ../parser; $(MAKE) CDONE
+ touch XDONE
+
+BUILT_SOURCES = $(XLATESRCS)
+CLEANFILES = $(BUILT_SOURCES) XDONE
+
+AM_CPPFLAGS = -I$(SDLPARSERSRC) -I$(SDLUTILSRC) \
+ -I$(SDLELTDEFSRC) -I$(XLATESRCDIR) $(DT_INCDIR)
+
+# needed by parser/
+noinst_LIBRARIES = libhelptag.a
+libhelptag_a_SOURCES = custom.c sdl.c option.c \
+ out.c $(XLATESRCS) \
+ global.c ../parser/delim.h
+
diff --git a/cde/programs/dthelp/parser/pass2/parser/Makefile.am b/cde/programs/dthelp/parser/pass2/parser/Makefile.am
new file mode 100644
index 000000000..81cd08b8a
--- /dev/null
+++ b/cde/programs/dthelp/parser/pass2/parser/Makefile.am
@@ -0,0 +1,50 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+bin_PROGRAMS = dthelp_htag2
+
+# Due to the wierd interdepencencies between helptag and parser,
+# disable parallel builds here. This is some really horrible code and
+# design - not surprising since it dates to 1989.
+.NOTPARALLEL:
+
+HTAG2 = ..
+HTAG2SRC = $(HTAG2)/htag2
+SDLPARSERSRC = $(HTAG2)/parser
+SDLELTDEFSRC = $(HTAG2)/eltdef
+SDLDTDFILE = $(HTAG2SRC)/sdl.dtd
+SDLUTILSRC = $(HTAG2)/util
+SDLBUILDSRC = $(HTAG2)/build
+SDLUTILLIB = $(HTAG2)/util/libutil.a
+SDLIFFILE = $(HTAG2SRC)/help.if
+
+AM_CPPFLAGS = -I. -I$(SDLUTILSRC) -I$(HTAG2SRC) -I$(SDLBUILDSRC) \
+ -I$(SDLELTDEFSRC)
+
+dthelp_htag2_SOURCES = parser.c actutil.c \
+ closent.c code.c cyclent.c dcurelt.c \
+ end.c entity.c \
+ error.c getsign.c \
+ input.c level.c lookent.c \
+ minim.c optstrg.c param.c parent.c \
+ parutil.c pi.c \
+ scan.c setpar.c start.c string.c struct.c \
+ text.c
+
+APPLOBJECTS = ../htag2/libhelptag.a
+
+dthelp_htag2_LDADD = $(APPLOBJECTS) $(SDLUTILLIB) $(DTCLIENTLIBS) $(XTOOLLIB)
+
+CPRODS = case.c context.h delim.h
+CTRASH = error delim.dat
+
+BUILT_SOURCES = $(CPRODS)
+CLEANFILES = $(BUILT_SOURCES) $(CTRASH) CDONE
+
+$(CPRODS): CDONE
+
+CDONE: $(SDLUTILSRC)/context $(HTAG2SRC)/delim.par context.dat
+ $(RM) $(CPRODS) $(CTRASH)
+ $(CP) $(HTAG2SRC)/delim.par delim.dat # appl.-specific delim.dat
+ $(SDLUTILSRC)/context
+ touch CDONE
+
diff --git a/cde/programs/dthelp/parser/pass2/util/Makefile.am b/cde/programs/dthelp/parser/pass2/util/Makefile.am
new file mode 100644
index 000000000..4826cd82e
--- /dev/null
+++ b/cde/programs/dthelp/parser/pass2/util/Makefile.am
@@ -0,0 +1,21 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+noinst_LIBRARIES = libutil.a
+
+noinst_PROGRAMS = context fclndir
+
+context_SOURCES = context.c
+
+fclndir_SOURCES = context.c
+
+libutil_a_SOURCES = allwhite.c inctest.c letter.c triedump.c \
+ triepdmp.c trieplk.c trierset.c upcmp8.c upstrcmp.c wchar.c \
+ conutil.c error.c exit.c itoa.c lower.c malloc.c openchk.c \
+ trie.c triecnt.c upper.c whitesp.c basic.h common.h \
+ dtddef.h entdef.h sparse.h trie.h chartype.h cont.h dtdext.h \
+ entext.h sref.h version.h
+
+# FIXME I think emptyfil.c and fclndir.c can be deleted?
+
+context_LDADD = libutil.a
+fclndir_LDADD = libutil.a
--
2.17.1
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel