FreeBSD 10 clang port
authorUlrich Wilkens <mail@uwilkens.de>
Sun, 27 Jul 2014 14:48:57 +0000 (16:48 +0200)
committerJon Trulson <jon@radscan.com>
Sun, 27 Jul 2014 18:32:35 +0000 (12:32 -0600)
99 files changed:
cde/Imakefile
cde/admin/IntegTools/post_install/Imakefile
cde/admin/IntegTools/post_install/freebsd/Imakefile
cde/config/cf/DtInfo.rules
cde/config/cf/FreeBSD.cf
cde/config/cf/Imake.rules
cde/config/cf/Imake.tmpl
cde/config/cf/Motif.tmpl
cde/config/cf/NetBSD.cf
cde/config/cf/bsdLib.tmpl
cde/config/cf/cde.tmpl
cde/config/imake/imakemdep.h
cde/config/makedepend/cppsetup.c
cde/config/makedepend/ifparser.c
cde/config/makedepend/main.c
cde/config/makedepend/parse.c
cde/databases/Imakefile
cde/include/EUSCompat.h
cde/lib/DtHelp/il/ilX.c
cde/lib/DtHelp/il/ilbigray.c
cde/lib/DtHelp/il/ilimage.c
cde/lib/DtHelp/il/ilinvert.c
cde/lib/DtHelp/il/ilmap.c
cde/lib/DtHelp/il/ilpalette.c
cde/lib/DtHelp/il/iltruegray.c
cde/lib/DtHelp/il/ilycbcr.c
cde/lib/DtPrint/PrintOptions.c
cde/lib/DtTerm/TermPrim/TermPrimBuffer.c
cde/lib/DtTerm/TermPrim/TermPrimParser.c
cde/lib/csa/Imakefile
cde/lib/tt/mini_isam/isdatconv.c
cde/lib/tt/mini_isam/isrepair.c
cde/programs/dsdm/proxy.c
cde/programs/dtcm/dtcm/todo.c
cde/programs/dtcm/dtcm/x_graphics.c
cde/programs/dticon/image.c
cde/programs/dticon/utils.c
cde/programs/dtinfo/DtMmdb/StyleSheet/Expression.C
cde/programs/dtinfo/DtMmdb/StyleSheet/defToken.C
cde/programs/dtinfo/DtMmdb/compression/ps.C
cde/programs/dtinfo/DtMmdb/compression/sgml.C
cde/programs/dtinfo/DtMmdb/compression/trie.C
cde/programs/dtinfo/DtMmdb/index/mphf_index.h
cde/programs/dtinfo/DtMmdb/schema/token.C
cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.hh
cde/programs/dtinfo/dtinfo/src/Agents/GraphicAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/GraphicAgentMotif.hh
cde/programs/dtinfo/dtinfo/src/Agents/LibraryAgentMotif.hh
cde/programs/dtinfo/dtinfo/src/Agents/MarkCanvas.hh
cde/programs/dtinfo/dtinfo/src/Agents/MarkIconMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/MarkIconMotif.hh
cde/programs/dtinfo/dtinfo/src/Agents/MarkListView.hh
cde/programs/dtinfo/dtinfo/src/Agents/NodeWindowAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/NodeWindowAgentMotif.hh
cde/programs/dtinfo/dtinfo/src/Agents/ScopeMenu.hh
cde/programs/dtinfo/dtinfo/src/Basic/HashTbl.C
cde/programs/dtinfo/dtinfo/src/Basic/HashTbl.hh
cde/programs/dtinfo/dtinfo/src/Managers/EnvMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/GlobalHistoryMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/LocalHistoryMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/MarkMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/MessageMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/MessageMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/TtIpcMgr.hh
cde/programs/dtinfo/dtinfo/src/Marks/Anchor.hh
cde/programs/dtinfo/dtinfo/src/Marks/Mark.hh
cde/programs/dtinfo/dtinfo/src/Marks/MarkBase.hh
cde/programs/dtinfo/dtinfo/src/OnlineRender/CanvasRenderer.C
cde/programs/dtinfo/dtinfo/src/OnlineRender/CanvasRenderer.hh
cde/programs/dtinfo/dtinfo/src/Query/QueryTerm.hh
cde/programs/dtinfo/dtinfo/src/Templates.C
cde/programs/dtinfo/dtinfo/src/Widgets/Tree.c
cde/programs/dtinfo/dtinfogen/infolib/etc/ContentType.C
cde/programs/dtinfo/dtinfogen/infolib/etc/RemoteId.C
cde/programs/dtinfo/dtinfogen/infolib/etc/ReplaceIdIdref.C
cde/programs/dtinfo/dtinfogen/infolib/etc/gr_type.C
cde/programs/dtinfo/dtinfogen/infolib/etc/lex.C
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c
cde/programs/dtksh/ksh93/src/lib/libast/string/tokscan.c
cde/programs/dtlogin/choose.c
cde/programs/dtlogin/chooser.c
cde/programs/dtlogin/dm.c
cde/programs/dtlogin/dtchooser.c
cde/programs/dtlogin/file.c
cde/programs/dtlogin/fontpath.c
cde/programs/dtlogin/genauth.c
cde/programs/dtlogin/protodpy.c
cde/programs/dtlogin/resource.c
cde/programs/dtlogin/session.c
cde/programs/dtlogin/socket.c
cde/programs/dtlogin/vgmain.c
cde/programs/dtpad/printSetup.c
cde/programs/dtstyle/ColorPalette.c
cde/programs/dtterm/DtTermMain.c
cde/programs/dtudcfonted/libfal/_fallcGeneric.c
cde/programs/localized/templates/types.tmpl
cde/programs/ttsnoop/Imakefile

index e637aff90123ce7a4a9b9d413eda08b498d46f78..c9194ddd3562211c1862497fbbc7d79968067e93 100644 (file)
@@ -55,11 +55,7 @@ Everything::
        @echo ""
        @date
        @echo ""
-       cd $(IMAKESRC) && if [ -f Makefile ]; then \
-           $(MAKE) $(MFLAGS) BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \
-       else \
-           $(MAKE) $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \
-       fi
+       MakeImakeDir()
        -$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak
        $(MAKE) $(MFLAGS) -f xmakefile.bak xmakefile
        $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles
@@ -82,11 +78,7 @@ Everything.dev::
        @echo ""
        @date
        @echo ""
-       cd $(IMAKESRC) && if [ -f Makefile ]; then \
-           $(MAKE) $(MFLAGS) BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \
-       else \
-           $(MAKE) $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \
-       fi
+       MakeImakeDir()
        -$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak
        $(MAKE) $(MFLAGS) -f xmakefile.bak xmakefile
        $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles
@@ -120,11 +112,7 @@ Everything.doc::
        @echo ""
        @date
        @echo ""
-       cd $(IMAKESRC) && if [ -f Makefile ]; then \
-           $(MAKE) $(MFLAGS) BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \
-       else \
-           $(MAKE) $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \
-       fi
+       MakeImakeDir()
        -$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak
        $(MAKE) $(MFLAGS) -f xmakefile.bak xmakefile
        $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles.doc
index e23ca60dbcfa1df23d3938963ca1e76092ed26fd..3155641375c98c228c8a10c8ecec4489a706cfc8 100644 (file)
@@ -59,65 +59,19 @@ MakeSubdirs($(SUBDIRS))
 
 all::
 
-configHelp:: $(DATABASE_DIR)/CDE-HELP-C.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-HELP-C.udb > CDE-HELP-C.lst
-       $(BUILD_UDB_TOOL) CDE-HELP-C ../../..
-
-configHelpPrg:: $(DATABASE_DIR)/CDE-HELP-PRG.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-HELP-PRG.udb > CDE-HELP-PRG.lst
-       $(BUILD_UDB_TOOL) CDE-HELP-PRG ../../..
-
-configDemos:: $(DATABASE_DIR)/CDE-DEMOS.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-DEMOS.udb > CDE-DEMOS.lst
-       $(BUILD_UDB_TOOL) CDE-DEMOS ../../..
-
-configFonts:: $(DATABASE_DIR)/CDE-FONTS.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-FONTS.udb > CDE-FONTS.lst
-       $(BUILD_UDB_TOOL) CDE-FONTS ../../..
-
-configHelpRun:: $(DATABASE_DIR)/CDE-HELP-RUN.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-HELP-RUN.udb > CDE-HELP-RUN.lst
-       $(BUILD_UDB_TOOL) CDE-HELP-RUN ../../..
-
-configIcons:: $(DATABASE_DIR)/CDE-ICONS.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-ICONS.udb > CDE-ICONS.lst
-       $(BUILD_UDB_TOOL) CDE-ICONS ../../..
-
-configInc:: $(DATABASE_DIR)/CDE-INC.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-INC.udb > CDE-INC.lst
-       $(BUILD_UDB_TOOL) CDE-INC ../../..
-
-configManDev:: $(DATABASE_DIR)/CDE-MAN-DEV.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-MAN-DEV.udb > CDE-MAN-DEV.lst
-       $(BUILD_UDB_TOOL) CDE-MAN-DEV ../../..
-
-configMan:: $(DATABASE_DIR)/CDE-MAN.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-MAN.udb > CDE-MAN.lst
-       $(BUILD_UDB_TOOL) CDE-MAN ../../..
-
-configMsgCat:: $(DATABASE_DIR)/CDE-MSG-C.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-MSG-C.udb > CDE-MSG-C.lst
-       $(BUILD_UDB_TOOL) CDE-MSG-C ../../..
-
-configPrg:: $(DATABASE_DIR)/CDE-PRG.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-PRG.udb > CDE-PRG.lst
-       $(BUILD_UDB_TOOL) CDE-PRG ../../..
-
-configShlibs:: $(DATABASE_DIR)/CDE-SHLIBS.udb
-       $(UDB_TOOL)  -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-SHLIBS.udb > CDE-SHLIBS.lst
-       $(BUILD_UDB_TOOL) CDE-SHLIBS ../../..
+DoUDB_SCRIPT3(configHelp,CDE-HELP-C,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configHelpPrg,CDE-HELP-PRG,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configDemos,CDE-DEMOS,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configFonts,CDE-FONTS,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configHelpRun,CDE-HELP-RUN,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configIcons,CDE-ICONS,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configInc,CDE-INC,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configManDev,CDE-MAN-DEV,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configMan,CDE-MAN,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configMsgCat,CDE-MSG-C,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configPrg,CDE-PRG,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+DoUDB_SCRIPT3(configShlibs,CDE-SHLIBS,$(UDB_TOOL),$(BUILD_UDB_TOOL))
+
 
 LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
@@ -125,7 +79,6 @@ LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
 
 CppSourceFile(configHelp,configHelp.src,$(LOCAL_CPP_DEFINES),)
 CppSourceFile(configHelpPrg,configHelpPrg.src,$(LOCAL_CPP_DEFINES),)
-
 CppSourceFile(configDemos,configDemos.src,$(LOCAL_CPP_DEFINES),)
 CppSourceFile(configFonts,configFonts.src,$(LOCAL_CPP_DEFINES),)
 CppSourceFile(configHelpRun,configHelpRun.src,$(LOCAL_CPP_DEFINES),)
index 7bf6c5501623811fe8b48028e77be9b668021134..d4e789347b1286b78d064c9dd4ba3bac26b9eba1 100644 (file)
@@ -28,27 +28,14 @@ PLATFORM = uxp
 UDBTOANY = $(KORNSHELL) $(TOOL_DIR)/udbToAny.ksh
 BUILD_UDB_LIST = $(SHELL) ../build_udb_list
 
-all::
-
-configMin:: $(DATABASE_DIR)/CDE-MIN.udb
-       $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-MIN.udb > CDE-MIN.lst
-       $(BUILD_UDB_LIST) CDE-MIN ../../../..
 
-configTT:: $(DATABASE_DIR)/CDE-TT.udb
-       $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-TT.udb > CDE-TT.lst
-       $(BUILD_UDB_LIST) CDE-TT ../../../..
+all::
 
-configRun:: $(DATABASE_DIR)/CDE-RUN.udb
-       $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-RUN.udb > CDE-RUN.lst
-       $(BUILD_UDB_LIST) CDE-RUN ../../../..
+DoUDB_SCRIPT4(configMin,CDE-MIN,$(UDBTOANY),$(BUILD_UDB_LIST))
+DoUDB_SCRIPT4(configTT,CDE-TT,$(UDBTOANY),$(BUILD_UDB_LIST))
+DoUDB_SCRIPT4(configRun,CDE-RUN,$(UDBTOANY),$(BUILD_UDB_LIST))
+DoUDB_SCRIPT4(configShlibs,CDE-SHLIBS,$(UDBTOANY),$(BUILD_UDB_LIST))
 
-configShlibs:: $(DATABASE_DIR)/CDE-SHLIBS.udb
-       $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \
-            $(DATABASE_DIR)/CDE-SHLIBS.udb > CDE-SHLIBS.lst
-       $(BUILD_UDB_LIST) CDE-SHLIBS ../../../..
 
 LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
index 227df689eea2b7f62798eef71d5a5c774c59fe62..e6a120e6f070341b8778082ba7e5ed87e54a94ab 100644 (file)
@@ -40,26 +40,26 @@ XCOMM $TOG: DtInfo.rules /main/21 1997/09/05 11:31:01 samborn $
 # define makelibT(libname)                                     @@\
        makelib(libname)                                        @@\
                                                                @@\
-libname/lib/**/libname/**/T.a: FRC                             @@\
+Concat3(libname/lib,libname,T.a): FRC                          @@\
        @(cd libname ;  \                                       @@\
-               echo "### Making lib libname Templates ###" ; \ @@\
-               $(MAKE) lib/**/libname/**/T.a ; \               @@\
+           echo STR(*** Making lib libname Templates ***) ; \  @@\
+           $(MAKE) Concat3(lib,libname,T.a) ; \                @@\
        )
 
 # define makelibsubsubdir(subdir,libname)                      @@\
                                                                @@\
-subdir/libname/lib/**/libname.a: FRC                           @@\
+Concat(subdir/libname/lib,libname.a): FRC                      @@\
        @(cd subdir ;   \                                       @@\
-               echo "### Making lib libname ###" ; \           @@\
-               $(MAKE) libname/lib/**/libname.a ; \            @@\
+           echo STR(*** Making lib libname ***) ; \            @@\
+           $(MAKE) Concat(libname/lib,libname.a) ; \           @@\
        )
 
 # define makelibTsubsubdir(subdir,libname)                     @@\
                                                                @@\
-subdir/libname/lib/**/libname/**/T.a: FRC                      @@\
+Concat3(subdir/libname/lib,libname,T.a): FRC                   @@\
        @(cd subdir ;   \                                       @@\
-               echo "### Making lib libname Templates ###" ; \ @@\
-               $(MAKE) libname/lib/**/libname/**/T.a ; \       @@\
+           echo STR(*** Making lib libname Templates ***) ; \  @@\
+           $(MAKE) Concat3(libname/lib,libname,T.a) ; \        @@\
        )
 #else /* not defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3 */
 # define makelibT(libname)                                     @@\
@@ -70,28 +70,28 @@ subdir/libname/lib/**/libname/**/T.a: FRC                   @@\
        makelibd(libname,)
 
 #define makelibd(libname, deps)                                        @@\
-libname/lib/**/libname.a: deps FRC                             @@\
+Concat(libname/lib,libname.a): deps FRC                                @@\
        @(cd libname; \                                         @@\
-               echo "### Making lib libname ###" ; \           @@\
-               $(MAKE) lib/**/libname.a ; \                    @@\
-               if [ -d "$(TEMPLATE_DB)" ]; then \              @@\
-                   $(MAKE) lib/**/libname/**/T.a ; \           @@\
-               fi \                                            @@\
+           echo STR(*** Making lib libname ***) ; \            @@\
+           $(MAKE) Concat(lib,libname.a) ; \                   @@\
+           if [ -d "$(TEMPLATE_DB)" ]; then \                  @@\
+               $(MAKE) Concat3(lib,libname,T.a) ; \            @@\
+           fi \                                                @@\
        )                                                       @@\
 libname/libname.d:     libname/Classlist.mk                    @@\
        @(cd libname; \                                         @@\
-               echo "### Making dfiles in libname ###" ; \     @@\
-               $(MAKE) libname.d ;\                            @@\
+           echo STR(*** Making dfiles in libname ***) ; \      @@\
+           $(MAKE) libname.d ;\                                @@\
        )                                                       @@\
 libname/libname.h:     libname/Classlist.mk                    @@\
        @(cd libname; \                                         @@\
-               echo "### Making dfiles in libname ###" ; \     @@\
-               $(MAKE) libname.h ;\                            @@\
+           echo STR(*** Making dfiles in libname ***) ; \      @@\
+           $(MAKE) libname.h ;\                                @@\
        )                                                       @@\
 libname/libname.msg:   libname/Classlist.mk                    @@\
        @(cd libname; \                                         @@\
-               echo "### Making msgs in libname ###" ; \       @@\
-               $(MAKE) libname.msg ;\                          @@\
+           echo STR(*** Making msgs in libname ***) ; \        @@\
+           $(MAKE) libname.msg ;\                              @@\
        )                                                       @@\
                                                                @@\
 FRC:                                                           @@\
@@ -149,7 +149,7 @@ AllTarget(Concat(lib,libname.a))                            @@\
                                                                @@\
 Concat(lib,libname.a): objlist                                 @@\
        $(RM) $@                                                @@\
-       @echo "### Making SimpleLibrary libname.a"              @@\
+       @echo STR(*** Making SimpleLibrary libname.a)           @@\
        $(LD) -r -o $@ objlist
 
 
@@ -157,11 +157,11 @@ Concat(lib,libname.a): objlist                                    @@\
 #define SimpleLibraryT(libname,objlist,libdir)                 @@\
 SimpleLibrary(libname,objlist,libdir)                          @@\
                                                                @@\
-AllTarget(Concat(lib,libname/**/T.a))                          @@\
+AllTarget(Concat3(lib,libname,T.a))                            @@\
                                                                @@\
-Concat(lib,libname/**/T.a):                                    @@\
+Concat3(lib,libname,T.a):                                      @@\
        $(RM) $@                                                @@\
-       @echo "### Making SimpleLibraryT libname Templates"     @@\
+       @echo STR(*** Making SimpleLibraryT libname Templates)  @@\
        find ./Templates.DB -name '*.o' -type f -print | xargs -n4 ar cq $@ @@\
                                                                @@\
 clean::                                                                @@\
@@ -170,11 +170,11 @@ clean::                                                           @@\
 #define SimpleLibraryT(libname,objlist,libdir)                 @@\
 SimpleLibrary(libname,objlist,libdir)                          @@\
                                                                @@\
-AllTarget(Concat(lib,libname/**/T.a))                          @@\
+AllTarget(Concat3(lib,libname,T.a))                            @@\
                                                                @@\
-Concat(lib,libname/**/T.a): TemplateObjs                       @@\
+Concat3(lib,libname,T.a): TemplateObjs                         @@\
        $(RM) $@                                                @@\
-       @echo "### Making SimpleLibraryT libname Templates"     @@\
+       @echo STR(*** Making SimpleLibraryT libname Templates)  @@\
        $(AR) $@ TemplateObjs                                   @@\
                                                                @@\
 clean::                                                                @@\
@@ -186,7 +186,7 @@ AllTarget(Concat(lib,libname.a))                            @@\
                                                                @@\
 Concat(lib,libname.a): objlist                                 @@\
        $(RM) $@                                                @@\
-       @echo "### Making RealLibrary libname.a"                @@\
+       @echo STR(*** Making RealLibrary libname.a)             @@\
        ar cq $@ objlist                                        @@\
        RanLibrary($@)
 
@@ -195,18 +195,18 @@ AllTarget(Concat(lib,libname.a))                          @@\
                                                                @@\
 Concat(lib,libname.a): objlist otherdeps                       @@\
        $(RM) $@                                                @@\
-       @echo "### Making NotSoSimpleLibrary libname.a"         @@\
+       @echo STR(*** Making NotSoSimpleLibrary libname.a)      @@\
        $(LD) -r -o $@ objlist
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 #define NotSoSimpleLibraryT(libname,objlist,libdir,otherdeps)  @@\
 NotSoSimpleLibrary(libname,objlist,libdir,otherdeps)           @@\
                                                                @@\
-AllTarget(Concat(lib,libname/**/T.a))                          @@\
+AllTarget(Concat3(lib,libname,T.a))                            @@\
                                                                @@\
-Concat(lib,libname/**/T.a):                                    @@\
+Concat3(lib,libname,T.a):                                      @@\
        $(RM) $@                                                @@\
-       @echo "### Making NotSoSimpleLibraryT libname Templates"@@\
+       @echo STR(*** Making NotSoSimpleLibraryT libname Templates)     @@\
        find ./Templates.DB -name '*.o' -type f -print | xargs -n4 ar cq $@ @@\
                                                                @@\
 clean::                                                                @@\
@@ -215,11 +215,11 @@ clean::                                                           @@\
 #define NotSoSimpleLibraryT(libname,objlist,libdir,otherdeps)  @@\
 NotSoSimpleLibrary(libname,objlist,libdir,otherdeps)           @@\
                                                                @@\
-AllTarget(Concat(lib,libname/**/T.a))                          @@\
+AllTarget(Concat3(lib,libname,T.a))                            @@\
                                                                @@\
-Concat(lib,libname/**/T.a):                                    @@\
+Concat3(lib,libname,T.a):                                      @@\
        $(RM) $@                                                @@\
-       @echo "### Making NotSoSimpleLibraryT libname Templates"@@\
+       @echo STR(*** Making NotSoSimpleLibraryT libname Templates)     @@\
        $(AR) $@ TemplateObjs                                   @@\
                                                                @@\
 clean::                                                                @@\
index 5a9f2ae6b4261b01584aedf011f9a667d5bbc0d0..2ef9ba0ea8ef9abc3e64c036bfb5be6a560a5f68 100644 (file)
@@ -15,20 +15,33 @@ XCOMM platform:  $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $
 #ifndef OSTeenyVersion
 #define OSTeenyVersion         DefaultOSTeenyVersion
 #endif
-XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+XCOMM operating system:  OSName (OSMajorVersion/**/./**/OSMinorVersion/**/./**/OSTeenyVersion)
 
 #define HasPutenv              YES
 #define HasBSD44Sockets                YES
 #define HasZlib                        YES
 
+#if OSMajorVersion >= 10 && defined(UseGcc)
+USE_GCC = UseGcc
+#endif
+
 #ifndef CppCmd
-#if OSMajorVersion >= 5
-#define CppCmd                 /usr/bin/cpp -traditional
-#define PreProcessCmd          /usr/bin/cpp -traditional
+#if OSMajorVersion >= 10 && defined(UseGcc)
+# define CppCmd                        /usr/local/bin/cpp$(USE_GCC)
 #else
-#define CppCmd                 /usr/libexec/cpp -traditional
-#define PreProcessCmd          /usr/libexec/cpp -traditional
+# define CppCmd                        /usr/bin/cpp
+#endif
 #endif
+#define PreProcessCmd          CppCmd
+
+#if OSMajorVersion >= 10
+#define CppArgs                        -Wno-invalid-pp-token
+#else
+#define CppArgs                        /**/
+#endif
+
+#ifndef StandardCppDefines
+#define StandardCppDefines     -traditional CppArgs
 #endif
 
 #undef  InstallCmd
@@ -71,19 +84,33 @@ XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
 #define MkdirHierCmd           mkdir -p
 
 #ifndef CcCmd
-#define CcCmd gcc
+#if OSMajorVersion >= 10
+# if defined(UseGcc)
+#  define CcCmd                        /usr/local/bin/gcc$(USE_GCC)
+#  define CplusplusCmd         /usr/local/bin/g++$(USE_GCC)
+# else
+#  define CcCmd                        cc
+#  define CplusplusCmd         c++
+# endif
+#else
+# define CcCmd                 gcc
+# define CplusplusCmd          g++
+#endif
+#endif
+
 #ifndef DefaultCCOptions
 #define DefaultCCOptions       -pipe
 #endif
-#endif
 
+#ifndef CplusplusLibC
 #define CplusplusLibC          -lstdc++
+#endif
 
 #if OSMajorVersion > 1
 #define ServerOSDefines                XFree86ServerOSDefines -DDDXTIME
 #define XawI18nDefines         -DUSE_XWCHAR_STRING
 #define HasMakefileSafeInclude YES
-#define IncludeMakefile(file)  @@# dependencies are in .depend
+#define IncludeMakefile(file)  HASH_SIGN dependencies are in .depend
 #define DependFileName         .depend
 #if OSMajorVersion < 3
 #if OSMinorVersion < 2
@@ -148,7 +175,7 @@ XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
 #endif
 
 #ifndef OptimizedCDebugFlags
-# ifdef i386Architecture
+# if defined(i386Architecture) || defined(AMD64Architecture)
 #  define OptimizedCDebugFlags DefaultGcc2i386Opt
 # else
 #  define OptimizedCDebugFlags -O2 -fno-strict-aliasing
@@ -156,11 +183,16 @@ XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
 #endif
 
 #ifdef HasGcc2
-CXXDEPENDINCLUDE != CppCmd -x c++ -Wp,-v < /dev/null \
-                   2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p'
+CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
+                   2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
 #define CplusplusDependIncludes        $(CXXDEPENDINCLUDE)
 #endif
 
+/* beginning with svn version 254273 iconv functions are moved to libc */
+#if (OSMajorVersion >= 10)
+ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
+#endif
+
 #define ServerExtraDefines     GccGasOption XFree86ServerDefines
 
 #define StandardDefines                -DCSRG_BASED
index 6fa1ecc830963e14a90d506375714e3cf0f7a248..7fd4303054c54966366a7eabbe703c15e40fd0b3 100644 (file)
@@ -162,6 +162,9 @@ XCOMM rules:  $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
  * CppSourceFile               (dst,src,defs,deplist)
  * MakeDirectories             (step,dirs)
  * AllTarget                   (depends)
+ * MakeImakeDir                        ()
+ * DoUDB_SCRIPT3               (target, file, script, build)
+ * DoUDB_SCRIPT4               (target, file, script, build)
  *
  *
  * The following are in specific <os>Lib.rules:
@@ -175,6 +178,16 @@ XCOMM rules:  $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
 
 #define NullParameter
 
+/* stringify macro */
+#ifndef STR
+# if defined(__llvm__)
+# define STR2(x)       #x
+# else
+# define STR2(x)       "x"
+# endif
+#define STR(x) STR2(x)
+#endif
+
 /* if [ -d ] or [ ! -d ] causes make to fail, define this as - */
 #ifndef DirFailPrefix
 #define DirFailPrefix
@@ -210,7 +223,7 @@ XCOMM special target for clearmake                                  @@\
  * Concat - concatenates two strings.
  */
 #ifndef Concat
-#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #define Concat(a,b)a##b
 #else
 #define Concat(a,b)a/**/b
@@ -221,7 +234,7 @@ XCOMM special target for clearmake                                  @@\
  * Concat3 - concatenates three strings.
  */
 #ifndef Concat3
-#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #define Concat3(a,b,c)a##b##c
 #else
 #define Concat3(a,b,c)a/**/b/**/c
@@ -232,7 +245,7 @@ XCOMM special target for clearmake                                  @@\
  * Concat4 - concatenates four strings.
  */
 #ifndef Concat4
-#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #define Concat4(a,b,c,d)a##b##c##d
 #else
 #define Concat4(a,b,c,d)a/**/b/**/c/**/d
@@ -262,7 +275,7 @@ XCOMM special target for clearmake                                  @@\
  *           exists to avoid problems with some preprocessors
  */
 #ifndef _XUseCat
-# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #  if defined(UseInstalled) || UseInstalledX11
 #   define _XUseCat(a,b,c) a##c
 #  else
@@ -2486,6 +2499,44 @@ step::                                                                   @@\
 all:: depends
 #endif /* AllTarget */
 
+
+/*
+ * MakeImakeDir - call make in imake directory.
+ */
+#ifndef MakeImakeDir
+#define MakeImakeDir() cd $(IMAKESRC) && \                             @@\
+       if [ -f Makefile ]; then \                                      @@\
+           $(MAKE) $(MFLAGS) BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \   @@\
+       else \                                                          @@\
+           $(MAKE) $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \                                                                   @@\
+       fi
+#endif /* MakeImakeDir */
+
+
+/*
+ * DoUDB_SCRIPT3 - macro for creation of udb scripts for installation
+ */
+#ifndef DoUDB_SCRIPT3
+#define DoUDB_SCRIPT3(target, file, script, build)                     @@\
+target:: $(DATABASE_DIR)/file.udb                                      @@\
+       script -toLst -ReleaseStream $(PLATFORM) \                      @@\
+           $(DATABASE_DIR)/file.udb > file.lst                         @@\
+       build file ../../..
+#endif
+
+
+/*
+ * DoUDB_SCRIPT4 - macro for creation of udb scripts for installation
+ */
+#ifndef DoUDB_SCRIPT4
+#define DoUDB_SCRIPT4(target, file, script, build)                     @@\
+target:: $(DATABASE_DIR)/file.udb                                      @@\
+       script -toLst -ReleaseStream $(PLATFORM) \                      @@\
+           $(DATABASE_DIR)/file.udb > file.lst                         @@\
+       build file ../../../..
+#endif
+
+
 #ifdef DefineOldLibraryRules
 #include <oldlib.rules>
 #endif
index bf0ca77dfc00d8b03f2ff338064a7503a1e7034b..71834124ed4bba3ad7adb8c04e7ac608f2f5ba61 100644 (file)
@@ -22,6 +22,8 @@ XCOMM
 #define        YES     1
 #define NO     0
 
+#define HASH_SIGN      #
+
 /* Ensure that "all" is the default target in the Makefile. */
 all::
 
index caa556d737d3fc69a083316e3b0396d1239a7155..94de516df0ddaa7269d4e5f009c14491c4487d30 100644 (file)
@@ -57,7 +57,7 @@ XCOMM $TOG: Motif.tmpl /main/6 1999/05/19 17:00:05 mgreess $
 #endif
 
 #ifndef _MUseCat
-# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #  if UseInstalledMotif
 #   define _MUseCat(a,b,c) a##c
 #  else
index 2642049c11fd6e93e6391f6d37fa7ade221c7048..1379dfa13023c3febc91e0fb56ab922dc5dc6d82 100644 (file)
@@ -305,6 +305,10 @@ CXXDEPENDINCLUDE != CppCmd -x c++ -Wp,-v < /dev/null \
 # define SharedDtSvcReqs $(LDPRELIBS) SharedXReqs $(CXXLIB) -Wl,-rpath,$(USRLIBDIRPATH)
 #endif
 
+#ifndef SharedDtHelpReqs
+# define SharedDtHelpReqs $(LDPRELIBS) $(ICONVSYSLIB) SharedXReqs -Wl,-rpath,$(USRLIBDIRPATH)
+#endif
+
 #ifndef SharedCsaReqs
 # define SharedCsaReqs -lXt $(LDPOSTLIBS) -Wl,-rpath,$(USRLIBDIRPATH)
 #endif
index 29ff0d659393dc9eebf656e79a9b9f876b68ea52..788208aec1d601592fef7953359c38402393f174 100644 (file)
@@ -30,6 +30,10 @@ XCOMM $XConsortium: bsdLib.tmpl /main/3 1996/09/28 16:09:25 rws $
 # define SharedDtSvcReqs $(LDPRELIBS) SharedXReqs $(CXXLIB)
 #endif
 
+#ifndef SharedDtHelpReqs
+# define SharedDtHelpReqs $(LDPRELIBS) $(ICONVSYSLIB) SharedXReqs
+#endif
+
 #ifndef SharedCsaReqs
 # define SharedCsaReqs -lXt $(LDPOSTLIBS)
 #endif
index 689f485369627acab89b847e9c974633392a61e3..197c49724f85093e2456f05cc9805eaeafd2ed7f 100644 (file)
@@ -12,7 +12,7 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $
 #endif
 
 #ifndef _CUseCat
-# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #  if UseInstalledCDE
 #   define _CUseCat(a,b,c) a##c
 #  else
index 3267e21ecc8239c51ac2983558627f1da27d9d51..44c5eb05b23cbbb5b1f62254834d1e7344ae9a1d 100644 (file)
@@ -227,7 +227,7 @@ in this Software without prior written authorization from The Open Group.
  *     all colons).  One way to tell if you need this is to see whether or not
  *     your Makefiles have no tabs in them and lots of @@ strings.
  */
-#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || (defined(AMOEBA) && defined(CROSS_COMPILE))
+#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || defined(__llvm__) || (defined(AMOEBA) && defined(CROSS_COMPILE))
 #define FIXUP_CPP_WHITESPACE
 #endif
 #ifdef WIN32
@@ -275,6 +275,9 @@ in this Software without prior written authorization from The Open Group.
        || (defined(__FreeBSD__) && defined(CPP_IN_LIBEXEC))
 #define DEFAULT_CPP "/usr/libexec/cpp"
 #endif
+#if defined(__FreeBSD__) && (__FreeBSD__ >= 10) && !defined(__llvm__)
+#undef DEFAULT_CPP
+#endif
 #if defined(__sgi) && defined(__ANSI_CPP__)
 #define USE_CC_E
 #endif
@@ -354,6 +357,11 @@ char *cpp_argv[ARGUMENTS] = {
 # ifdef __GNUC__
        "-traditional",
 # endif
+# ifdef __llvm__
+       "-fms-extensions",
+       "-Wno-invalid-token-paste",
+       "-Wno-invalid-pp-token",
+# endif
 #endif
 
 #ifdef M4330
@@ -643,12 +651,18 @@ char *cpp_argv[ARGUMENTS] = {
 # define DEFAULT_OS_MAJOR_REV  "v V%[0-9]"
 # define DEFAULT_OS_MINOR_REV  "v V%*dL%[0-9]"
 # define DEFAULT_OS_NAME       "srvm %[^\n]"
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__)
+/* uname -r returns "x.y[.z]-mumble", e.g. "9.0-RELEASE" or "11.0-CURRENT" */
+# define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV   "v %*s %*s %*s r%[0-9]"
+# define DEFAULT_OS_NAME        "srm %[^\n]"
+#elif defined(__NetBSD__)
 /* 386BSD, and BSD/OS too? */
 /* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */
 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
-# define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]" 
+# define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]"
 # define DEFAULT_OS_NAME        "srm %[^\n]"
 #elif defined(__OpenBSD__)
 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
@@ -747,9 +761,12 @@ struct symtab      predefs[] = {
 #ifdef mc68020
        {"mc68020", "1"},
 #endif
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(linux)
        {"__GNUC__", DEF_STRINGIFY(__GNUC__)},
 #endif
+#ifdef __GNUC_MINOR__
+       {"__GNUC_MINOR__", DEF_STRINGIFY(__GNUC_MINOR__)},
+#endif
 #if __STDC__
        {"__STDC__", "1"},
 #endif
index c6bf411ad071f7f43dbe5070defcda49791d142a..3b281641b1b17de76d82955c97d4cd951ba10645 100644 (file)
@@ -216,6 +216,7 @@ my_eval_variable (ip, var, len)
     const char *var;
     int len;
 {
+    long val;
     struct symtab **s;
 
     s = lookup_variable (ip, var, len);
@@ -223,12 +224,14 @@ my_eval_variable (ip, var, len)
        return 0;
     do {
        var = (*s)->s_value;
-       if (!isvarfirstletter(*var))
+       if (!isvarfirstletter(*var) || !strcmp((*s)->s_name, var))
            break;
        s = lookup_variable (ip, var, strlen(var));
     } while (s);
 
-    return strtol(var, NULL, 0);
+    var = ParseIfExpression(ip, var, &val);
+    if (var && *var) debug(4, ("extraneous: '%s'\n", var));
+    return val;
 }
 
 
index 44f54f48682c833a7dca338e887adc0b4a856284..9bec2d5aaf7828e8485b0bb34980de019a9b761a 100644 (file)
@@ -81,6 +81,7 @@
 
 #include "ifparser.h"
 #include <ctype.h>
+#include <limits.h>
 
 /****************************************************************************
                   Internal Macros and Utilities for Parser
@@ -116,19 +117,48 @@ parse_number (g, cp, valp)
     const char *cp;
     long *valp;
 {
+    long base = 10;
     SKIPSPACE (cp);
 
     if (!isdigit(*cp))
        return CALLFUNC(g, handle_error) (g, cp, "number");
 
-    *valp = strtol(cp, &cp, 0);
-    /* skip trailing qualifiers */
+    *valp = 0;
+
+    if (*cp == '0') {
+       cp++;
+       if ((*cp == 'x') || (*cp == 'X')) {
+           base = 16;
+           cp++;
+       } else {
+           base = 8;
+       }
+    }
+
+    /* Ignore overflows and assume ASCII, what source is usually written in */
+    while (1) {
+       int increment = -1;
+       if (base == 8) {
+           if ((*cp >= '0') && (*cp <= '7'))
+               increment = *cp++ - '0';
+       } else if (base == 16) {
+           if ((*cp >= '0') && (*cp <= '9'))
+               increment = *cp++ - '0';
+           else if ((*cp >= 'A') &&  (*cp <= 'F'))
+               increment = *cp++ - ('A' - 10);
+           else if ((*cp >= 'a') && (*cp <= 'f'))
+               increment = *cp++ - ('a' - 10);
+       } else {        /* Decimal */
+           if ((*cp >= '0') && (*cp <= '9'))
+               increment = *cp++ - '0';
+       }
+       if (increment < 0)
+           break;
+       *valp = (*valp * base) + increment;
+    }
+
+    /* Skip trailing qualifiers */
     while (*cp == 'U' || *cp == 'u' || *cp == 'L' || *cp == 'l') cp++;
-#if 0
-    *valp = atoi (cp);
-    /* EMPTY */
-    for (cp++; isdigit(*cp); cp++) ;
-#endif
     return cp;
 }
 
@@ -272,7 +302,10 @@ parse_product (g, cp, valp)
 
       case '/':
        DO (cp = parse_product (g, cp + 1, &rightval));
-       *valp = (*valp / rightval);
+       if (rightval)
+           *valp = (*valp / rightval);
+       else
+           *valp = LONG_MAX;
        break;
 
       case '%':
index ae67ecbdeae393991192bb21117dc4be1b56bc42..a28f2a544018902ee4dd354cdbd19720b8ea97dc 100644 (file)
@@ -255,6 +255,17 @@ main(argc, argv)
                                argc--;
                        }
                        break;
+               case 'i':
+                       if (strncmp(argv[0]+2, "system", 6) == 0) {
+                               if (incp >= includedirs + MAXDIRS)
+                                   fatalerr("Too many -I flags.\n");
+                               *incp++ = argv[0]+8;
+                               if (**(incp-1) == '\0') {
+                                       *(incp-1) = *(++argv);
+                                       argc--;
+                               }
+                       }
+                       break;
                case 'Y':
                        defincdir = argv[0]+2;
                        break;
index 07153bee5419bcd127820adb539b790ea097c99b..942d17227206b9b247c8f0708573d51af78b2010 100644 (file)
@@ -110,7 +110,7 @@ int deftype (line, filep, file_red, file, parse_it)
        int     parse_it;
 {
        register char   *p;
-       char    *directive, savechar;
+       char    *directive, savechar, *q;
        register int    ret;
 
        /*
@@ -167,6 +167,11 @@ int deftype (line, filep, file_red, file, parse_it)
         */
        while (*p == ' ' || *p == '\t')
                p++;
+       q = p + strlen(p);
+       do {
+               q--;
+       } while (*q == ' ' || *q == '\t');
+       q[1] = '\0';
        switch (ret) {
        case IF:
                /*
@@ -227,7 +232,7 @@ int deftype (line, filep, file_red, file, parse_it)
                /*
                 * copy the definition back to the beginning of the line.
                 */
-               strcpy (line, p);
+               memmove (line, p, strlen(p) + 1);
                break;
        case ELSE:
        case ENDIF:
index d7403a0975db5e243b958e188f309a1c8d61ed89..bb3f8e2927aea2d8545c937425be5bc5b79b5901 100644 (file)
@@ -41,8 +41,9 @@ UDB_RELEASE_OPT = -ReleaseStream netbsd
  * Insure that symbols used in the .udb files are undefined for
  * pre-processing by cpp.
  */
-#ifdef RsArchitecture
-/* AIX cpp rejects "hp-ux" as an invalid sub-option. */
+#if defined(LinuxArchitecture) || defined(BSDArchitecture) || \
+    defined(RsArchitecture)
+/* cpp of some systems reject "hp-ux" as an invalid sub-option. */
 UDB_CPP_UNDEF_LIST = -UhpV4 -Uhpux         -Uaix -Usun -Uusl -Udec -Uuxp -Uunix
 #else
 UDB_CPP_UNDEF_LIST = -UhpV4 -Uhpux -Uhp-ux -Uaix -Usun -Uusl -Udec -Uuxp -Uunix -Ulinux -Uopenbsd -Ufreebsd -Unetbsd
@@ -56,10 +57,12 @@ clean::                                                                     @@\
 Concat3(CDE-,Locale,.udb):: ResDB                                      @@\
        @echo Building readablename Resources database file.            @@\
        @rm -f $@                                                       @@\
-       @echo sed -e 's/%_LANG_%/Lang/g' -e 's/%_ALT_LANG_%/AltLang/g' \@@\
-               -e 's/%_FILENAME_%/runfs/g' ResDB                       @@\
-       @sed -e 's/%_LANG_%/Lang/g' -e 's/%_ALT_LANG_%/AltLang/g' \     @@\
-               -e 's/%_FILENAME_%/runfs/g' ResDB > $@                  @@\
+       @echo $(SED) -e STR(s/%_LANG_%/Lang/g) \                        @@\
+                    -e STR(s/%_ALT_LANG_%/AltLang/g) \                 @@\
+                    -e STR(s/%_FILENAME_%/runfs/g) ResDB               @@\
+       @$(SED) -e STR(s/%_LANG_%/Lang/g) \                             @@\
+               -e STR(s/%_ALT_LANG_%/AltLang/g) \                      @@\
+               -e STR(s/%_FILENAME_%/runfs/g) ResDB > $@               @@\
                                                                        @@\
 clean::                                                                        @@\
        $(RM) Concat3(CDE-HELP-,Locale,.udb)                            @@\
@@ -67,10 +70,12 @@ clean::                                                                     @@\
 CDE-HELP-Locale.udb:: HelpDB                                           @@\
        @echo Building readablename Help database file.                 @@\
        @rm -f $@                                                       @@\
-       @echo sed -e 's/%_LANG_%/HelpLang/' -e 's/%_ALT_LANG_%/AltLang/g' \     @@\
-               -e 's/%_FILENAME_%/helpfs/g' HelpDB                     @@\
-       @sed -e 's/%_LANG_%/HelpLang/' -e 's/%_ALT_LANG_%/AltLang/g' \  @@\
-               -e 's/%_FILENAME_%/helpfs/g' HelpDB > $@                @@\
+       @echo $(SED) -e STR(s/%_LANG_%/HelpLang/) \                     @@\
+                    -e STR(s/%_ALT_LANG_%/AltLang/g) \                 @@\
+                    -e STR(s/%_FILENAME_%/helpfs/g) HelpDB             @@\
+       @$(SED) -e STR(s/%_LANG_%/HelpLang/) \                          @@\
+               -e STR(s/%_ALT_LANG_%/AltLang/g) \                      @@\
+               -e STR(s/%_FILENAME_%/helpfs/g) HelpDB > $@             @@\
                                                                        @@\
 clean::                                                                        @@\
        $(RM) Concat3(CDE-MSG-,Locale,.udb)                             @@\
@@ -78,10 +83,12 @@ clean::                                                                     @@\
 CDE-MSG-Locale.udb:: MsgDB                                             @@\
        @echo Building readablename Message catalog database file.      @@\
        @rm -f $@                                                       @@\
-       @echo sed -e 's/%_LANG_%/Lang/' -e 's/%_ALT_LANG_%/AltLang/g' \ @@\
-               -e 's/%_FILENAME_%/msgfs/g' MsgDB                       @@\
-       @sed -e 's/%_LANG_%/Lang/' -e 's/%_ALT_LANG_%/AltLang/g' \      @@\
-               -e 's/%_FILENAME_%/msgfs/g' MsgDB > $@                  @@\
+       @echo $(SED) -e STR(s/%_LANG_%/Lang/) \                         @@\
+                    -e STR(s/%_ALT_LANG_%/AltLang/g) \                 @@\
+                    -e STR(s/%_FILENAME_%/msgfs/g) MsgDB               @@\
+       @$(SED) -e STR(s/%_LANG_%/Lang/) \                              @@\
+               -e STR(s/%_ALT_LANG_%/AltLang/g) \                      @@\
+               -e STR(s/%_FILENAME_%/msgfs/g) MsgDB > $@               @@\
                                                                        @@\
 clean::                                                                        @@\
        $(RM) Concat3(CDE-INFOLIB-,Locale,.udb)                         @@\
@@ -89,10 +96,12 @@ clean::                                                                     @@\
 CDE-INFOLIB-Locale.udb:: InfoDB                                                @@\
        @echo Building readablename Infolib catalog database file.      @@\
        @rm -f $@                                                       @@\
-       @echo sed -e 's/%_LANG_%/Lang/' -e 's/%_ALT_LANG_%/AltLang/g' \ @@\
-               -e 's/%_FILENAME_%/msgfs/g' InfoDB                      @@\
-       @sed -e 's/%_LANG_%/Lang/' -e 's/%_ALT_LANG_%/AltLang/g' \      @@\
-               -e 's/%_FILENAME_%/msgfs/g' InfoDB > $@
+       @echo $(SED) -e STR(s/%_LANG_%/Lang/) \                         @@\
+                    -e STR(s/%_ALT_LANG_%/AltLang/g) \                 @@\
+                    -e STR(s/%_FILENAME_%/msgfs/g) InfoDB              @@\
+       @$(SED) -e STR(s/%_LANG_%/Lang/) \                              @@\
+               -e STR(s/%_ALT_LANG_%/AltLang/g) \                      @@\
+               -e STR(s/%_FILENAME_%/msgfs/g) InfoDB > $@
 
 .SUFFIXES: .db .udb
 
index 3d85398aac43f4a832d123c11461cb25c6553439..130f0a194824e7e208b44c57f525af45d9719aa5 100644 (file)
@@ -114,11 +114,13 @@ typedef enum {B_FALSE, B_TRUE} boolean_t;
 typedef enum {B_FALSE, B_TRUE} boolean_t;
 #define MAXNAMELEN             256
 
+#if !defined(__FreeBSD__)
 #define iconv_t                        int
 #define iconv_open(a, b)       ((iconv_t) -1)
 #define iconv(a, b, c, d, e)   ((size_t) 0)
 #define iconv_close(a)         (0)
-#endif /* linux */
+#endif
+#endif
 
 
 /*
index 315cf6828cb5e569dc77eef82d841d99f74d33fe..a3859b41a7481011f07e138fb6d475d2a26c596d 100644 (file)
@@ -914,12 +914,12 @@ int scaledX, scaledY ;
 
     nSrcLines = *pNLines;
     if (nSrcLines <= 0)
-        return;                                     /* no lines, EXIT */
+        return 0;                                     /* no lines, EXIT */
     pPriv = (ilXPrivPtr)pData->pPrivate;
     pSrcImage = pData->pSrcImage;
     width = pSrcImage->width;
     if (width <= 0)
-        return;                                     /* no width, EXIT */
+        return 0;                                     /* no width, EXIT */
     srcRowBytes = pSrcImage->plane[0].nBytesPerRow;
     pSrcLine = (ilPtr)(pSrcImage->plane[0].pPixels + 
                       pData->srcLine * srcRowBytes);
index ae0bbcd564d60239e3220a49c6799491c02d7fe9..4a06c45511552cc15e00627fb31b3b47cdca6af7 100644 (file)
@@ -242,7 +242,7 @@ register int                shift, bitNumber;
 
     nLines = *pNLines;
     if (nLines <= 0)
-        return;                                 /* no lines, EXIT */
+        return 0;                               /* no lines, EXIT */
     if (pPriv->srcBufferHeight)
          bottomLine = pPriv->srcBufferHeight - 1;
     else bottomLine = pData->srcLine + nLines - 1;
index 357b106c1a1974687158415acaefffada9263a7a..42dda23ae79435ac174846fad9c439ce6e3c0860 100644 (file)
@@ -619,11 +619,11 @@ register ilImagePtr     pImage;
     pImage = (ilImagePtr)image;
     if (mustBeZero != 0) {
         pImage->o.p.context->error = IL_ERROR_PAR_NOT_ZERO;
-        return;                                                 /* EXIT */
+        return 0;                                                 /* EXIT */
         }
     if (pImage->o.p.objectType != IL_INTERNAL_IMAGE) {
         pImage->o.p.context->error = IL_ERROR_OBJECT_TYPE;
-        return;                                                 /* EXIT */
+        return 0;                                                 /* EXIT */
         }
 
     pImage->o.p.context->error = IL_OK;
index 0a1c092c582354583834a10a11af6af087158b7b..f36bd85606b9c0233dc7778b2f1276488bd8474a 100644 (file)
@@ -106,10 +106,10 @@ register long               nLines, nPixels;
     dstnbytes = pPriv->dstRowBytes;
     pdstline = pPriv->pDstPixels + dstLine * dstnbytes;
 
-    if (pPriv->nPixels < 0)  return;
+    if (pPriv->nPixels < 0)  return 0;
 
     nLines = *pNLines;
-    if (nLines <= 0) return;
+    if (nLines <= 0) return 0;
 
     while ( nLines--  > 0 ) {
           psrc = psrcline;
index fc0301aa2b01f9128fb00354522f8bb7e32704b4..c62c445b25199624a4811ef0bcd5c813ed479156 100644 (file)
@@ -86,11 +86,11 @@ register ilPtr              pSrc, pDst, pTranslate;
     pPriv = (ilMapPrivPtr)pData->pPrivate;
     nRowsM1 = pPriv->width;
     if (nRowsM1 <= 0)
-        return;
+        return 0;
     nRowsM1--;
     nLinesM1 = *pNLines;
     if (nLinesM1 <= 0)
-        return;
+        return 0;
     nLinesM1--;
 
     srcRowBytes = pPriv->srcRowBytes;
@@ -135,11 +135,11 @@ register ilPtr              pSrc, pDst, pTranslate;
     pPriv = (ilMapPrivPtr)pData->pPrivate;
     nRowsM1 = pPriv->width;
     if (nRowsM1 <= 0)
-        return;
+        return 0;
     nRowsM1--;
     nLinesM1 = *pNLines;
     if (nLinesM1 <= 0)
-        return;
+        return 0;
     nLinesM1--;
 
     srcRowBytes = pPriv->srcRowBytes;
index 083e883d79eefa53b950d05980a5300ce225fbf6..46982c48feacebe9dc2aa173b138f0658a4c7862 100644 (file)
@@ -159,10 +159,10 @@ register long               nLinesM1, nPixelsM1Temp;
 
     nPixelsM1 = pPriv->nPixelsM1;
     if (nPixelsM1 < 0)
-        return;
+        return 0;
     nLinesM1 = *pNLines;
     if (nLinesM1 <= 0)
-        return;
+        return 0;
     nLinesM1--;
 
         /*  For each src byte: get a long from the cvt'd palette table, then take
index b0004cd1dcb16d1a298d8ee6f27ca9fcbd075806..1cefa12816d3f46fc458089f777bcb53550bc4e6 100644 (file)
@@ -141,10 +141,10 @@ register INT32                i;
     dstnbytes = pPriv->dstRowBytes;
     pdstline = pPriv->pDstPixels + dstLine * dstnbytes;
 
-    if (pPriv->nPixels < 0)  return;
+    if (pPriv->nPixels < 0)  return 0;
 
     nLines = *pNLines;
-    if (nLines <= 0) return;
+    if (nLines <= 0) return 0;
 
     while ( nLines--  > 0 ) {
 
index f940918c67a58ca4a44e21fb0a4016181e10cc21..b627bbac0cd5b1e4d058dbd258a2edd172882672 100644 (file)
@@ -327,11 +327,11 @@ ilImagePlaneInfo           *pPlane;
         /*  Set nPixels/LinesM1 to # pixels / lines - 1; exit if either 0. */
     nPixelsM1Init = pData->pSrcImage->width;
     if (nPixelsM1Init <= 0)
-        return;
+        return 0;
     nPixelsM1Init--;
     nLinesM1 = *pNLines;
     if (nLinesM1 <= 0)
-        return;
+        return 0;
     nLinesM1--;
 
         /*  Point pY/Cb/CrLine to 1st line in src planes; pDstLine to 1st line in dst.
@@ -420,11 +420,11 @@ ilImagePlaneInfo           *pPlane;
         /*  Set nPixels/LinesM1 to # pixels / lines - 1; exit if either 0. */
     nPixelsM1Init = pData->pSrcImage->width;
     if (nPixelsM1Init <= 0)
-        return;
+        return 0;
     nPixelsM1Init--;
     nLinesM1 = *pNLines;
     if (nLinesM1 <= 0)
-        return;
+        return 0;
     nLinesM1--;
 
         /*  Point pY/Cb/CrLine to 1st line in src planes; pDstLine to 1st line in dst.
@@ -1161,11 +1161,11 @@ register long               R, G, B, pixel;
     pPriv = (ilRGBToYCbCrPrivPtr)pData->pPrivate;
     nPixelsM1Init = pData->pSrcImage->width;
     if (nPixelsM1Init <= 0)
-        return;
+        return 0;
     nPixelsM1Init--;
     nLinesM1 = *pNLines;
     if (nLinesM1 <= 0)
-        return;
+        return 0;
     nLinesM1--;
 
         /*  Point pSrcLine to first line of src RGB (pixel-order) data; point 
index 948527f0927433f998bcdb7f81a47ea6ed1c0af4..4a96a336aa3fa96ffb3e64575415d88bf5f0e589 100644 (file)
@@ -460,7 +460,7 @@ _DtPrintGetHdrFtrData(
 
     if (! option) return (void*) NULL;
     XtVaGetValues(option, XmNuserData, &info, NULL);
-    if (info == NULL) return;
+    if (info == NULL) return 0;
 
     index = _DtPrintGetHdrFtrIndex(option);
     return info->specs[index].data;
@@ -484,7 +484,7 @@ _DtPrintGetHdrFtrString(
 
     if (! option) return (void*) NULL;
     XtVaGetValues(option, XmNuserData, &info, NULL);
-    if (info == NULL) return;
+    if (info == NULL) return 0;
 
     index = _DtPrintGetHdrFtrIndex(option);
     return info->specs[index].string;
index 3dda79436e4f0872b6aa44453ed3085ae5aa9e86..4f992f8068d48d0e19850b744fb0c9e7ca3da223 100644 (file)
@@ -1025,7 +1025,7 @@ _DtTermPrimBufferInsert
        _DtTermPrimBufferInsertWc(tb, row, col, (wchar_t *)newChars,
                                  numChars, insertFlag,
                                  returnChars, returnCount);
-       return;
+       return 0;
     }
 
     if (WIDTH(line) < col)
index 5f4738dce5d03df7fbbd411c0137d642fa69a2de..c1f0b433f9993a0e5e25cd38e1db0869cd55663e 100644 (file)
@@ -121,7 +121,7 @@ _DtTermPrimParse
 
            if (*parseChar == debugChar) {
                ParseTrap();
-               return;
+               return 0;
            }
        }
     }
index d64baee2598ee5195434dcb08e8f5efadfa4234b..1fb1e58ddd55fe326693acf8e1818cb6e82d702b 100644 (file)
@@ -105,12 +105,14 @@ rtable3_clnt.c rtable3_xdr.c: rtable3.h namechange1.sed namechange2.sed
 rtable2_clnt.c rtable2_xdr.c: rtable3.h namechange1.sed namechange2.sed
 agent_xdr.c agent.c: agent.h
 
+#define RPCGEN rpcgen -h agent.x | $(EXTRASED) \                       @@\
+         $(SED) -f namechange1.sed | \                                 @@\
+         $(SED) -f namechange2.sed >> agent.h
+
 agent.h:
        $(RM) $@
        cat agent.wrapbegin > agent.h
-       rpcgen -h agent.x | $(EXTRASED) \
-         sed -f namechange1.sed | \
-         sed -f namechange2.sed >> agent.h
+       RPCGEN
        cat agent.wrapend >> agent.h
 
 .SUFFIXES: .x
index 32ba1696eafaf31863b6259804f5a59321f2ca61..eacbb6a667c068b1b8e0ea6a212d498cd775f8e9 100644 (file)
@@ -140,7 +140,7 @@ ldchar(src, len, dst)
     register char      *p;
 
     if (len <= 0)
-       return;
+       return 0;
 
     /* Load the entire string. */
     memcpy((void *) dst, (const void *) src, len);
@@ -165,7 +165,7 @@ stchar(src, dst, len)
     register char      c;
 
     if (len <= 0)
-       return;
+       return 0;
 
     /* Copy up to NULL character. */
     do {
@@ -190,7 +190,7 @@ ldchar2(src, len, dst)
     register char       *p;
  
     if (len <= 0)
-        return;
+        return 0;
  
     /* Load the entire string. */
     memcpy((void *) dst, (const void *) src, len);
@@ -206,7 +206,7 @@ stchar2(src, dst, len)
     register char       c;
  
     if (len <= 0)
-        return;
+        return 0;
  
     /* Copy up to a NULL character. */
     do {
index 0d535e76a8025a80d4df72b773b8da18e603a095..124a5052ef18fe500d3e66436c41116c8626a13e 100644 (file)
@@ -411,7 +411,7 @@ printkey(n, pkdesc, print)
 
     if (pkdesc->k_nparts == 0) {
        print("%3d: --- NO PRIMARY KEY ---\n", n);
-       return;
+       return 0;
     }
 
     if (n == 1)
index ac20864be96588d66cd840863f11c904ecc30207..3d3c1730737daba2323a5b1bab3352512ab0144f 100644 (file)
@@ -517,7 +517,7 @@ AdvertiseMotifDropSite(dpy, win)
        XFree(data);
     }
     if (motif_receiver)
-       return;
+       return 0;
 
 #ifdef DEBUG
     printf("AdvertiseMotifDropSite\n");
index f30386bb1a5b2d46b265dd96dd950d219ac8a28a..924957130b1298f84dbe2a3cfb86d838c0446dca 100644 (file)
@@ -2483,7 +2483,7 @@ todo_insert(Dtcm_appointment *appt, CSA_entry_handle *new_a, Calendar *c) {
                 * occurred.
                 */
                _DtTurnOffHourGlass(t->frame);
-               return;
+               return 0;
        case 4:
        default:
                /*
@@ -2501,7 +2501,7 @@ todo_insert(Dtcm_appointment *appt, CSA_entry_handle *new_a, Calendar *c) {
 
        if (stat != CSA_SUCCESS) {
                _DtTurnOffHourGlass(t->frame);
-               return;
+               return 0;
        }
        csa_free((CSA_buffer) new_a);
 
index ad85028664de7b8b406f21551e2205d10dca3000..9458b6f3f4abcb35c05b076cb407bcfa2fa15eb5 100644 (file)
@@ -1677,7 +1677,7 @@ cm_count_appts(CMGraphicsInfo *gInfo, CSA_entry_handle *list, int a_total,
     if (stat != CSA_SUCCESS)
     {
       free_appt_struct(&appt);
-      return;
+      return 0;
     }
     skip_appt = B_FALSE;
 
index 860f64e74eb2f7b21bdca9d1105a34723466d4e1..4a0134395846ac3a81ffde23c54e24a7ec9019fb 100644 (file)
@@ -486,7 +486,7 @@ Flood_Fill(
   struct seg stack[MAX], *sp = stack;
 
   old_pixel = XGetPixel(color_image, x, y);    /* read pv at seed point */
-  if (old_pixel==new_pixel || x<0 || x>width || y<0 || y>height) return;
+  if (old_pixel==new_pixel || x<0 || x>width || y<0 || y>height) return 0;
   PUSH(y, x, x, 1);                    /* needed in some cases */
   PUSH(y+1, x, x, -1);         /* seed segment (popped 1st) */
 
index dc4e2fa0c4dbe89f646530288d32ded6ff1f0c6b..30345291977e751dc65556d1837c7198cfecd67c 100644 (file)
@@ -1755,7 +1755,7 @@ Select_New_Pen(
       XmToggleButtonSetState(StaticWid[new_pen], True, False);
     else
       XmToggleButtonSetState(DynamicWid[new_pen], True, False);
-    return;
+    return 0;
    }
 
 /*** un-set the previous choice ***/
index 0668ec000a0240300d3ca896d04e0e2437a8b6cf..cd1d8999acfce7fd5d5c8e6a08eb7cefe60837c5 100644 (file)
@@ -293,6 +293,9 @@ ConstantNode::evaluate() const
 
 extern unsigned g_validation_mode;
 
+#if defined(__FreeBSD__) && (__FreeBSD__ >= 10) && !defined(__llvm__)
+__attribute__((optimize(0)))
+#endif
 FeatureValue *
 SgmlAttributeNode::evaluate() const
 {
index 15dae7df25d0604cf86d3c6e8e3b1438b368250f..686e1707b5857a236b73323c726dab15d88abd92 100644 (file)
@@ -495,11 +495,13 @@ void defParser_init_buffer defParser_PROTO(( defParser_BUFFER_STATE b, FILE *fil
 
 #define defParser_new_buffer defParser_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int defParserinput defParser_PROTO(( void ));
 #else
 static int input defParser_PROTO(( void ));
 #endif
+#endif
 
 defParser_DECL
     {
@@ -1104,6 +1106,7 @@ register defParser_CHAR *defParser_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int defParserinput()
 #else
@@ -1170,6 +1173,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef defParser_USE_PROTOS
index 1e384f5d2fe0582f5b41ed9acd65f73e2e3dd3bc..598f36628f182ee38486b6e32968c8ec8cfb4cd7 100644 (file)
@@ -427,11 +427,13 @@ void ps_init_buffer ps_PROTO(( ps_BUFFER_STATE b, FILE *file ));
 
 #define ps_new_buffer ps_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int psinput ps_PROTO(( void ));
 #else
 static int input ps_PROTO(( void ));
 #endif
+#endif
 
 ps_DECL
     {
@@ -856,6 +858,7 @@ register ps_CHAR *ps_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int psinput()
 #else
@@ -922,6 +925,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef ps_USE_PROTOS
index e503afad0d2a7e419eafa5b39c8d22eeb9dbffa2..f1069923086df43f0a5c5b63580a1c484c2347a0 100644 (file)
@@ -433,11 +433,13 @@ void sgml_init_buffer sgml_PROTO(( sgml_BUFFER_STATE b, FILE *file ));
 
 #define sgml_new_buffer sgml_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int sgmlinput sgml_PROTO(( void ));
 #else
 static int input sgml_PROTO(( void ));
 #endif
+#endif
 
 sgml_DECL
     {
@@ -867,6 +869,7 @@ register sgml_CHAR *sgml_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int sgmlinput()
 #else
@@ -933,6 +936,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef sgml_USE_PROTOS
index c92abfee41db16e1e2b4c2a1e9c755d55a501b09..d40449b1b6e1f301cfecbf899c47cd447796ebbb 100644 (file)
@@ -163,7 +163,6 @@ void trie::extend_alphabet()
         new_alphabet[k + estimated_sz] = 0;
      }
 
-     new_alphabet = new_alphabet;
      estimated_sz *= 2;
   }
 }
index b8301c8079c0390c8689521537ff59230f9b42cd..042b7a36c4de58ab69e3de8ddb0707c82874e506 100644 (file)
@@ -112,7 +112,6 @@ protected:
 
 private:
    fast_mphf_handler *v_mphf;     // hash func
-   inv_lists_handler *v_invlists; // list of inv_list
 
    char* f_key_file_name; 
 };
index 0117c0ee8d75f54d9c1450991eb948c0c0c8566f..18cde82c05b10807232c3e5e2447d938d1bf1e54 100644 (file)
@@ -512,10 +512,12 @@ void  schema_init_buffer  schema_PROTO((  schema_BUFFER_STATE b, FILE *file ));
 
 #define  schema_new_buffer  schema_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int  schemainput  schema_PROTO(( void ));
 #else
 static int input  schema_PROTO(( void ));
+#endif
 #endif
 
  schema_DECL
@@ -1116,6 +1118,7 @@ register  schema_CHAR * schema_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int  schemainput()
 #else
@@ -1182,6 +1185,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef  schema_USE_PROTOS
index d445361b68b5407d8a47d9ec61bda14edcf02510..08e93b2ac08d369fe657eef7913c8382d6bbb371 100644 (file)
@@ -27,7 +27,7 @@ class WXmTextField;
 class WXmText;
 #include <WWL/WXmPushButtonGadget.h>
 class Mark;
-class MarkMoved;
+struct MarkMoved;
 
 class BookmarkEdit : public Dialog, public UAS_Receiver<MarkMoved>
 {
index d504568e7c98d2a9b7ee054035760e90f8f7e24b..b995f1d2c5fd318f7ff09ad9fda4dd0a4fc6aeb3 100644 (file)
@@ -435,21 +435,16 @@ GraphicAgent::create_ui()
   PixmapGraphic &pgraphic = *(f_graphic->pixmap_graphic());
 
   Graphic *graphic = f_graphic ;
+  UAS_String buffer = CATGETS(Set_GraphicAgent, 8, "Dtinfo: ");
   UAS_String titleStr(graphic->title());
   const char *title = titleStr ;
 
   if (title == NULL || *title == '\0') // empty string 
     title = (char *)CATGETS(Set_GraphicAgent, 2, "Detached Graphic");
+  buffer = buffer + title;
 
-  {
-
-    UAS_String buffer = CATGETS(Set_GraphicAgent, 8, "Dtinfo: ");
-    buffer = buffer + title;
-
-    f_shell.Title((char*)buffer);
-    f_shell.IconName((char*)buffer);
-
-  }
+  f_shell.Title((char*)buffer);
+  f_shell.IconName((char*)buffer);
 
   args.Reset();
   panner.CanvasWidth (pgraphic.width(), args);
index e4cd65e41d5629d204416d3cd30fad3e5f52cdc0..e76dfdc137c2199c027d38fc4930b962810f734d 100644 (file)
@@ -95,7 +95,6 @@ private:
   UAS_Pointer<UAS_Common>      f_node_ptr ;
   UAS_Pointer<Graphic> f_graphic ;
   WXawPanner           *f_panner;
-  WXmLabel            *f_label;
   WPixmap             *f_pixmap_widget ;
   unsigned int         f_panner_state ;
   unsigned int          f_current_scale;
index 78ecb89139ee2bc5ce0360fa2f7a5ab46eb7bd03..1ba846d056d31ea4a4200bb1fd1c5975e6c242ee 100644 (file)
@@ -38,7 +38,7 @@ class IcccmAgent;
 
 struct OutlineListSelectionData;
 
-class TrackingEntry;
+struct TrackingEntry;
 
 class LibraryAgent : public Agent,
                     public UAS_Receiver<UAS_DocumentRetrievedMsg>
index 9e7a144ea13af8ca132eb2dc2f4482fc5bfd71ca..42268763f5c178c40c390a4517bdb769035e9be7 100644 (file)
@@ -29,8 +29,8 @@
 class Agent;
 class Mark;
 class MarkIcon;
-class MarkSelectionChanged;
-class MarkChanged;
+struct MarkSelectionChanged;
+struct MarkChanged;
 
 class MarkCanvas : public Destructable, 
                   public UAS_Receiver<MarkChanged> 
index 357668e5bd508b9ab015043004ebce9521b28df6..f8849fc7dfd5fc9290eecab6a2b390d55b15bd24 100644 (file)
@@ -93,8 +93,7 @@ MarkIcon::MarkIcon (Widget parent,
                    Widget chooser_parent,
                    MarkCanvas *mark, 
                    int ypos, int scrollbar_offset)
-: f_icon_char (0),
-  f_selected (FALSE),
+: f_selected (FALSE),
   f_y_position (ypos),
   f_chooser_parent (chooser_parent)
 {
index d5e59dc1f54563d7d54c6b4a464a3a3e4e11d689..994edcc1b6a9d26225b3ea0a161b88fb129f118c 100644 (file)
@@ -88,7 +88,6 @@ private:
   // MarkTml objects are stored in reverse order in the list
   // to allow quick access to the last element. 
   xList<MarkCanvas *> f_mark_list;
-  char             f_icon_char;
   bool             f_selected;
   unsigned int     f_offset;
   unsigned int    f_y_position ;
index 63605a39ee1aba50c0541d38fc60d5f1d0dd83b4..c64fa28537a2d82d5b652dea413115b8fa6f5821 100644 (file)
@@ -32,8 +32,8 @@
 #include <WWL/WXmPushButton.h>
 #include <WWL/WXmList.h>
 
-class MarkCreated;
-class MarkDeleted;
+struct MarkCreated;
+struct MarkDeleted;
 
 class MarkListView : public WWL,
                     public UAS_Receiver<MarkCreated>,
index fe5f7868f92ed80e167c6c350d459645a9a6cf0c..1bb1371b8e54014e020c15512d20884ed0b0b141 100644 (file)
@@ -630,9 +630,11 @@ g_view_mark()
 }
 
 
+#if 0
 static unsigned
 find_segment_offset (_DtCvSegment *start, const _DtCvSegment *target,
                     unsigned &offset);
+#endif
 
 static void
 arm_callback (void *client_data)
@@ -4451,6 +4453,7 @@ NodeWindowAgent::SetTopic(_DtCvTopicPtr topic)
 // stack of the parents
 
 
+#if 0
 static _DtCvSegment *
 contains(_DtCvSegment *root, _DtCvSegment *segment)
 {
@@ -4527,6 +4530,7 @@ next_string_segment(_DtCvSegment *root, _DtCvSegment *start)
 
   return 0;
 }
+#endif
 
 
 
@@ -4650,6 +4654,7 @@ NodeWindowAgent::create_canvas_mark(_DtCvHandle  canvas,
   return mark_canvas ;
 }
 
+#if 0
 static unsigned
 find_segment_offset (_DtCvSegment *start, const _DtCvSegment *target,
                     unsigned &offset)
@@ -4701,6 +4706,7 @@ find_segment_offset (_DtCvSegment *start, const _DtCvSegment *target,
   
   return found ;
 }
+#endif
 
 void
 NodeWindowAgent::link_to (const char *locator)
index 512a742334d70cb440d2d52cddfabef4b4eb05ab..28e52937a9d03e58ba60bde48109f0a0a0bfacbc 100644 (file)
@@ -51,15 +51,15 @@ class WXmCascadeButton;
 class WXmForm;
 class HitList;
 class Ancestor;
-class SelectionChanged;
+struct SelectionChanged;
 class BookTab;
 class PixmapGraphic;
-class MarkSelectionChanged;
+struct MarkSelectionChanged;
 class ScopeMenu;
 class Graphic;
 class Mark;
-class MarkCreated;
-class MarkDeleted;
+struct MarkCreated;
+struct MarkDeleted;
 class MarkCanvas ;
 class MarkIcon ;
 // class DetachGraphic;
index 6f27c87a9729888818d19a702ca799ccd2d3544b..d2e3ce88294d003f47596220fc44562a7294841f 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <WWL/WXmMenu.h>
 class WXmArrowButton;
-class UpdateMenu;
+struct UpdateMenu;
 
 
 // A ScopeMenu is not a real menu, it's only an object responsible to update
index c50609444a675446ddacc50fc3b40b7583819940..f48bac8ac4093735893d369723fb5d2f52c4cd69 100644 (file)
@@ -55,8 +55,8 @@ public: // functions
   HashBucket()
     // NOTE: remove 3rd param after testing
     : List (10, 10, List::GROW_ADD) { };
-  FolioObject *find (const FolioObject &);
-  void remove (const FolioObject &);
+  int find (FolioObject &);
+  void remove (FolioObject &);
 };
 
 
@@ -64,18 +64,18 @@ public: // functions
 // bucket find
 // /////////////////////////////////////////////////////////////////
 
-FolioObject *
-HashBucket::find (const FolioObject &element)
+int
+HashBucket::find (FolioObject &element)
 {
   register int i;
 
   for (i = 0; i < f_length; i++)
     {
       if (((Hashable *)f_list_element[i])->equals ((Hashable &) element))
-       return ((Hashable *) f_list_element[i]);
+       return (i);
     }
 
-  return (NULL);
+  return (-1);
 }
 
 
@@ -84,7 +84,7 @@ HashBucket::find (const FolioObject &element)
 // /////////////////////////////////////////////////////////////////
 
 void
-HashBucket::remove (const FolioObject &element)
+HashBucket::remove (FolioObject &element)
 {
   register int i;
 
@@ -140,7 +140,7 @@ HashTbl::add (Hashable &element)
     f_hash_bucket[where] = new HashBucket();
 
   /* -------- See if it exists. -------- */
-  if (f_hash_bucket[where]->find (element) == NULL)
+  if (f_hash_bucket[where]->find (element) == -1)
     /* -------- Finally, add it. -------- */
     f_hash_bucket[where]->append (element);
 }
@@ -150,15 +150,15 @@ HashTbl::add (Hashable &element)
 // find - find an entry in the hash table
 // /////////////////////////////////////////////////////////////////
 
-Hashable *
-HashTbl::find (const Hashable &element) const
+int
+HashTbl::find (Hashable &element) const
 {
   u_int where = element.hash_code (0, f_num_buckets - 1);
 
   if (f_hash_bucket[where] != NULL)
-    return ((Hashable *) f_hash_bucket[where]->find (element));
+    return (f_hash_bucket[where]->find (element));
   else
-    return (NULL);
+    return (-1);
 }
 
 
@@ -167,7 +167,7 @@ HashTbl::find (const Hashable &element) const
 // /////////////////////////////////////////////////////////////////
 
 void
-HashTbl::remove (const Hashable &element)
+HashTbl::remove (Hashable &element)
 {
   u_int where = element.hash_code (0, f_num_buckets - 1);
   if (f_hash_bucket[where] != NULL)
index e8397e852a13a60d48c8a2b445834f266e9ef4dc..6ccd67b0dceb1c3ecb51c247474fdee3ff64ea22 100644 (file)
@@ -31,9 +31,9 @@ public: // functions
   void add (Hashable &);
   void add (Hashable *h)
     { add (*h); }
-  void remove (const Hashable &);
+  void remove (Hashable &);
   void remove_all (bool delete_elements = FALSE);
-  Hashable *find (const Hashable &) const;
+  int find (Hashable &) const;
 
 protected: // variables
   HashBucket **f_hash_bucket;
index ffa585c4f1da26020526f35601188a52db1d2f30..58338698e4531a95931b304f365568ca553e2e73 100644 (file)
@@ -99,7 +99,6 @@ private:   // data
   char                 *f_lang;
   char                 *f_home;
   char                 *f_user_path;
-  char                 *f_lang_normalized;
 
     // option flags and data
   UAS_String            f_infolibsStr;
index 5d04af160384ad0af916ea7f4377b1555a1b38e3..fa831fe8e53ecab67a41c5830e09e9f28563705e 100644 (file)
@@ -27,8 +27,8 @@
 
 #include "UAS.hh"
 
-class HistoryDelete;
-class HistoryAdd;
+struct HistoryDelete;
+struct HistoryAdd;
 class NodeHistoryAgent;
 
 class GlobalHistoryMgr : public Long_Lived,
index bd96d9855e1ebbb1234a6c313602ecb6cfcbfcb6..b396893c1afe6629bc02928644e2d99417f88849 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "UAS.hh"
 
-class Anchor;
+struct Anchor;
 
 class LocalHistoryEntry
 {
index 24791fec0f8f5942c1a83868f87891c8155cfe2a..39fd127892aee5ea94f7e28db6a4ba4225f2f187 100644 (file)
@@ -30,7 +30,7 @@
 
 class Mark;
 class MarkBase;
-class Anchor;
+struct Anchor;
 class MarkListView;
 
 class MarkMgr : public Long_Lived
index 3c6a9f9826f46c9d3322425d28d0b5b6bd9f16ed..dcc42d5e3ad609b5d7453194e9cde1b96671657e 100644 (file)
@@ -156,8 +156,7 @@ MessageMgr::MessageMgr() :
  f_nodeview_process(0),
  f_popped_up(False),
  f_pressed_ok(False),
- f_exit_flag(False),
- f_dialog_active(False)
+ f_exit_flag(False)
 
 {
     MessageAgent::request ((UAS_Receiver<CancelOperation> *) this);
index e1bab10d105b706a0221942e61c4d948feccd85f..67e9bf3641b6629bf8dcf7706640ac4a62798512 100644 (file)
@@ -83,7 +83,6 @@ private: // variables
   bool                 f_popped_up;
   bool                 f_pressed_ok;
   bool                 f_exit_flag;
-  bool                 f_dialog_active;
 
 private:
   LONG_LIVED_HH(MessageMgr,message_mgr);
index 35a206c20e837b2e271abcc2dde790f56da5ab7a..1c3ac58b56a7078b28872a0ddde8cf9ec9a886a9 100644 (file)
@@ -128,7 +128,7 @@ static PrintNode node_printer;
 // /////////////////////////////////////////////////////////////////
 
 PrintMgr::PrintMgr()
-    : f_print_panel(NULL), f_npa(NULL), f_font_scale(0)
+    : f_npa(NULL), f_font_scale(0)
 {
     RCS_DEBUG("PrintMgr::PrintMgr called.");
     set_font_scale(pref_mgr().get_int(PrefMgr::FontScale));
index e4c981df58e0bd7649954301f67d0ef737b71dde..24d07176d6f26fd8acaf8285ea45e7016c8a8142 100644 (file)
@@ -71,7 +71,6 @@ public:
     void set_font_scale(int);  
 
 private:
-    PrintPanelAgent * f_print_panel;
     NodePrintAgent * f_npa;      
     UAS_Pointer<UAS_Common> f_last_printed;    
     int        f_font_scale ; // for old style.sheet    
index be507fb6045040ac7f374b4bb6a6ef965ddcfe49..3bc61b455299ba51ef5d420b2851bd3a407dffd6 100644 (file)
@@ -79,7 +79,6 @@ class TtIpcMgr : public Long_Lived
  private: // data
 
     char       *procid ;               // tt id for process
-    Tt_pattern  *sess_patterns ;       // tt patterns array for process
     Tt_status   tt_state ;
 } ;
 
index 5d8f0306982e2d5a684cf1f8da3abec3f3d0a5d9..bd367cad936c336296598c0def4f1c12d7360f3d 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 
-class Anchor
+struct Anchor
 {
 public:
   Anchor (const char *location, const char *format, bool keep = FALSE)
index c33f142d42838445915ce92223073b6ffc754d9a..751af53fe52f2617dcf31c3082f3c8dcf591109f 100644 (file)
  # include "UAS.hh"
 
 
-class Anchor;
-class MarkChanged;
-class MarkDeleted;
-class MarkMoved;
-class EditMark;
-class ViewMark;
+struct Anchor;
+struct MarkChanged;
+struct MarkDeleted;
+struct MarkMoved;
+struct EditMark;
+struct ViewMark;
 
 class Mark
 {
index e1aedc9be42e4b1775b6dd338898920d34842f70..cdb0cb34a73e82a77dd33bdb14da39618ea5bd0c 100644 (file)
@@ -23,7 +23,7 @@
 
 template <class T> class xList;
 class Mark;
-class Anchor;
+struct Anchor;
 
 class MarkBase
 {
index 22bef9cd80a84c9445c7e35156b5c6ffcf4c6d6c..4583f2778e5830b8195e4f5291ec9c43544a04e7 100644 (file)
@@ -1835,7 +1835,6 @@ PartialElementFeatures::~PartialElementFeatures()
 ElementFeatures::ElementFeatures(CanvasRenderer* renderer)
 : PartialElementFeatures(renderer),
   f_row (NULL),
-  f_graphic (0),
   f_border (_DtCvBORDER_NONE),
   f_border_width(-1), // invalid border width
   f_table (NULL),
index b8bdaca9daa41f0598938dae3c20396afe9b769a..9e9118bfc9de969ef0a96716fcfb4ce5b2f1bbd3 100644 (file)
@@ -449,7 +449,6 @@ public:
 
 private:
   RowDefn*     f_row ;
-  unsigned     f_graphic;
 
   _DtCvFrmtOption      f_border;
   int                  f_border_width;
index acfa21b018d38597899919140e6ed3bc6486f6c0..2fa566aebbe2616d5d36518682c47e54702cdc55 100644 (file)
@@ -95,7 +95,6 @@ private:
   u_char  f_connective;
   char   *f_weight;
   char   *f_proximity;
-  char   *f_scope;
   bool f_term_string_fixed;
   u_char f_type;
   // may need some way to verify the scope... 
index 376645c2b99a6cee7d90ef5b758f7bbc8ab62c61..926b6a28e893bde46b1b6394c22e76edf5a0fe61 100644 (file)
@@ -53,7 +53,7 @@ class LinkAction;
 class BookTab;
 class MarkTml;
 class MarkIcon;
-class MarkCreated;
+struct MarkCreated;
 class MarkSelectionChanged;
 #ifndef _IBMR2
 class DisplayDocument;
index f448c474176b5403c5c2829c149e661ec7e34c40..2d62389474630b527893a7b027f1f7d9cd8a8a52 100644 (file)
@@ -962,9 +962,7 @@ static void set_tree_size (tw, insetvalues, width, height)
     return;
 }
 
-static void layout_tree (tw, insetvalues)
-    TreeWidget tw;
-    Boolean insetvalues;
+static void layout_tree (TreeWidget tw, Boolean insetvalues)
 {
     int i;
     Dimension *dp;
index fb5d9170f7ba127967b2242ede058d0b91aab6dd..f9ed1a7132475106caf7655d3112b61f54b2b654 100644 (file)
@@ -1758,11 +1758,13 @@ void ol_data_init_buffer ol_data_PROTO(( ol_data_BUFFER_STATE b, FILE *file ));
 
 #define ol_data_new_buffer ol_data_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int ol_datainput ol_data_PROTO(( void ));
 #else
 static int input ol_data_PROTO(( void ));
 #endif
+#endif
 
 ol_data_DECL
     {
@@ -2248,6 +2250,7 @@ register ol_data_CHAR *ol_data_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int ol_datainput()
 #else
@@ -2314,6 +2317,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef ol_data_USE_PROTOS
index 0d2565ee3be9c00cf0f3d805429c1bee77879664..16bfba5fa0693438639b31a1c3abc085b5cf4a0c 100644 (file)
@@ -2233,11 +2233,13 @@ void remote_init_buffer remote_PROTO(( remote_BUFFER_STATE b, FILE *file ));
 
 #define remote_new_buffer remote_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int remoteinput remote_PROTO(( void ));
 #else
 static int input remote_PROTO(( void ));
 #endif
+#endif
 
 remote_DECL
     {
@@ -2733,6 +2735,7 @@ register remote_CHAR *remote_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int remoteinput()
 #else
@@ -2799,6 +2802,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef remote_USE_PROTOS
index f628587d9c6ec937be78a16085c09d2b50b2a6e3..78c82b74a52518fa6c078a6d11b9810088e5cb43 100644 (file)
@@ -3038,11 +3038,13 @@ void nodedata_init_buffer nodedata_PROTO(( nodedata_BUFFER_STATE b, FILE *file )
 
 #define nodedata_new_buffer nodedata_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int nodedatainput nodedata_PROTO(( void ));
 #else
 static int input nodedata_PROTO(( void ));
 #endif
+#endif
 
 nodedata_DECL
     {
@@ -3564,6 +3566,7 @@ register nodedata_CHAR *nodedata_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int nodedatainput()
 #else
@@ -3630,6 +3633,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef nodedata_USE_PROTOS
index 31ab30daf9b999d850da688dabd95c9436c113a7..b22a2f1883be980b908999f4d455017dcb58044b 100644 (file)
@@ -1873,11 +1873,13 @@ void graphics_task_init_buffer graphics_task_PROTO(( graphics_task_BUFFER_STATE
 
 #define graphics_task_new_buffer graphics_task_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int graphics_taskinput graphics_task_PROTO(( void ));
 #else
 static int input graphics_task_PROTO(( void ));
 #endif
+#endif
 
 graphics_task_DECL
     {
@@ -2349,6 +2351,7 @@ register graphics_task_CHAR *graphics_task_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int graphics_taskinput()
 #else
@@ -2415,6 +2418,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef graphics_task_USE_PROTOS
index 4f0393902c81cb5bd3104f34c21c952220c95d8f..3c5d6260bc8f47e74923341da8a1d555754255c5 100644 (file)
@@ -1750,11 +1750,13 @@ void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
 
 #define yy_new_buffer yy_create_buffer
 
+#if 0
 #ifdef __cplusplus
 static int yyinput YY_PROTO(( void ));
 #else
 static int input YY_PROTO(( void ));
 #endif
+#endif
 
 YY_DECL
     {
@@ -2322,6 +2324,7 @@ register YY_CHAR *yy_bp;
 #endif
 
 
+#if 0
 #ifdef __cplusplus
 static int yyinput()
 #else
@@ -2388,6 +2391,7 @@ static int input()
 
     return ( c );
     }
+#endif
 
 
 #ifdef YY_USE_PROTOS
index a31c87ac05004d84b79607e62e098ecc4c06ed5f..c49059d542877a2490d4de60c63320a3b6942eab 100644 (file)
@@ -89,6 +89,8 @@
 #else
 #define __VA_START__(p,a)      va_start(p)
 #endif
+#define va_listval(p)          (*(p))
+#define va_listarg             va_list*
 #endif
 static const char id_hash[] = "\n@(#)hash (AT&T Bell Laboratories) 05/09/95\0\n";
 
@@ -112,7 +114,7 @@ hashalloc __PARAM__((Hash_table_t* ref, ...), (va_alist)) __OTORP__(va_dcl)
        register Hash_table_t*  ret = 0;
        register int            internal;
        int                     n;
-       va_list                 ap, vl;
+       va_list                 ap;
        va_list                 va[4];
        va_list*                vp = va;
        HASHregion              region = 0;
@@ -223,8 +225,7 @@ hashalloc __PARAM__((Hash_table_t* ref, ...), (va_alist)) __OTORP__(va_dcl)
                                __va_copy( *vp, ap );
                                vp++;
                        }
-                       vl = va_arg(ap, va_list);
-                       __va_copy(ap, vl);
+                       __va_copy(ap, va_listval(va_arg(ap, va_listarg)));
 #endif
                        break;
                case 0:
index 3316b904e44942664c0458cebc4069659415ff44..dcd5c261dc635f4435a58b3f75402e325fb28a6c 100644 (file)
@@ -89,6 +89,8 @@
 #else
 #define __VA_START__(p,a)      va_start(p)
 #endif
+#define va_listval(p)          (*(p))
+#define va_listarg             va_list*
 #endif
 #include <ast.h>
 
@@ -213,7 +215,6 @@ tokscan __PARAM__((register char* s, char** nxt, const char* fmt, ...), (va_alis
        char**          p_string;
        char*           prv_f = 0;
        va_list         prv_ap;
-       va_list*        pap;
 
        __VA_START__(ap, fmt); __OTORP__(s = va_arg(ap, char* );nxt = va_arg(ap, char** );fmt = va_arg(ap, const char* );)
        if (!*s || *s == '\n')
@@ -258,8 +259,7 @@ tokscan __PARAM__((register char* s, char** nxt, const char* fmt, ...), (va_alis
                        prv_f = f;
                        f = va_arg(ap, char*);
                        __va_copy( prv_ap, ap );
-                       pap = va_arg(ap, va_list*);
-                       __va_copy( ap, pap );
+                       __va_copy(ap, va_listval(va_arg(ap, va_listarg)));
                        continue;
                case 'c':
                        p_char = va_arg(ap, char*);
index 00efa8106184271917a3c695d6ac98585ea9ebd9..c0853af787ab6d0f01cd2ad7ea7e5656ea4fa5ea 100644 (file)
@@ -389,7 +389,7 @@ ProcessChooserSocket (
     if (client_fd == -1)
     {
        LogError ((unsigned char *)"Cannot accept chooser connection\n");
-       return;
+       return 0;
     }
     Debug ("Accepted %d\n", client_fd);
     
index afac4f8b9db7b1f31245f09e21960d173fd717a6..1a1380aa544d78b8143ce7ef23823657f7db8132 100644 (file)
@@ -470,7 +470,7 @@ RemoveHostname (host)
        prev = &hosts->next;
     }
     if (!hosts)
-       return;
+       return 0;
     *prev = host->next;
     DisposeHostname (host);
     NameTableSize--;
@@ -563,12 +563,12 @@ RegisterHostaddr (addr, len, type)
 
     host = (HostAddr *) malloc (sizeof (HostAddr));
     if (!host)
-       return;
+       return 0;
     host->addr = (struct sockaddr *) malloc (len);
     if (!host->addr)
     {
        free ((char *) host);
-       return;
+       return 0;
     }
     memmove( (char *) host->addr, (char *) addr, len);
     host->addrlen = len;
@@ -602,7 +602,7 @@ RegisterHostname (name)
        ifc.ifc_len = sizeof (buf);
        ifc.ifc_buf = buf;
        if (ioctl (socketFD, (int) SIOCGIFCONF, (char *) &ifc) < 0)
-           return;
+           return 0;
        for (ifr = ifc.ifc_req
 #if defined (__bsdi__) || defined(__NetBSD__)
             ; (char *)ifr < ifc.ifc_buf + ifc.ifc_len;
@@ -665,9 +665,9 @@ RegisterHostname (name)
        {
            hostent = gethostbyname (name);
            if (!hostent)
-               return;
+               return 0;
            if (hostent->h_addrtype != AF_INET || hostent->h_length != 4)
-               return;
+               return 0;
            in_addr.sin_family = hostent->h_addrtype;
            memmove( &in_addr.sin_addr, hostent->h_addr, 4);
        }
@@ -689,10 +689,10 @@ RegisterAuthenticationName (name, namelen)
     ARRAY8Ptr  authName;
     if (!XdmcpReallocARRAYofARRAY8 (&AuthenticationNames,
                                    AuthenticationNames.length + 1))
-       return;
+       return 0;
     authName = &AuthenticationNames.data[AuthenticationNames.length-1];
     if (!XdmcpAllocARRAY8 (authName, namelen))
-       return;
+       return 0;
     memmove( authName->data, name, namelen);
 }
 
index f898d3bc47485dea8ac90febd7e2b155f8276f86..e497197631aab5f5391c3c8ef32fa439e693fce8 100644 (file)
@@ -350,7 +350,7 @@ ScanServers( void )
            LogError(
                ReadCatalog(MC_LOG_SET,MC_LOG_NO_SRVACC,MC_DEF_LOG_NO_SRVACC),
                servers);
-           return;
+           return 0;
        }
        if (ServersModTime == 0)
        {
@@ -861,7 +861,7 @@ StartDisplay(
      */
     if (d->displayType.origin == FromFile && dt_shutdown ) {
        RemoveDisplay(d);
-       return;
+       return 0;
     }
     
     {
@@ -949,7 +949,7 @@ StartDisplay(
                LogError ((unsigned char *)"All DT utmp IDs already in use. Removing display %s\n",
                        d->name);
                RemoveDisplay(d);
-               return;
+               return 0;
            }
        }
 #endif
@@ -1024,7 +1024,7 @@ StartDisplay(
 
            if (!StartGetty(d))
                RemoveDisplay (d);
-           return;
+           return 0;
        }
     }
     else
@@ -1442,12 +1442,12 @@ SetTitle( char *name, char *ptr )
      *  remove domain qualifiers and screens from name...
      */
 
-    if ( (p = malloc(strlen(name) + 1)) == NULL) return;
+    if ( (p = malloc(strlen(name) + 1)) == NULL) return 0;
     strcpy(p, name);
 
     if ( (s = strchr(p,':')) == NULL ) {
        free(p);
-       return;
+       return 0;
     }
     
     if ( (t = strchr(s,'.')) != NULL )
index a6bc58a4a84d3be34a5d3fc85d474af52fee5d3c..3bb9088b433aa966015484acb76bb25ea4f2169e 100644 (file)
@@ -1030,7 +1030,7 @@ MakeOptionsMenu( void )
 static int 
 ErrorHandler( Display *dpy, XErrorEvent *event )
 {
-    return;
+    return 0;
 }
 
 
index 16d843f45c7a82053684fb3ea781ed50ac4eb743..357918cca2c67e4a81ab8eafbeb2fc28c18904f1 100644 (file)
@@ -197,12 +197,12 @@ ParseDisplay( char *source,
 
     args = splitIntoWords (source);
     if (!args)
-       return;
+       return 0;
     if (!args[0])
     {
        LogError(ReadCatalog(MC_LOG_SET,MC_LOG_MISS_NAME,MC_DEF_LOG_MISS_NAME));
        freeArgs (args);
-       return;
+       return 0;
     }
     name = args[0];
     if (!args[1])
@@ -210,7 +210,7 @@ ParseDisplay( char *source,
        LogError(ReadCatalog(MC_LOG_SET,MC_LOG_MISS_TYPE,MC_DEF_LOG_MISS_TYPE),
                args[0]);
        freeArgs (args);
-       return;
+       return 0;
     }
 
     /*
index 87e490a356fcf44be59ec98db87e93ba95133215..265c6826d651389ed4c1c245d6886739ab447781 100644 (file)
@@ -103,12 +103,12 @@ ApplyFontPathMods( struct display *d, Display *dpy )
 
     if (d->displayType.location == Foreign) {
         Debug("  Foreign display\n");
-        return;
+        return 0;
     }
 
     if (!(fontPath=XGetFontPath(dpy, &numPaths))) {
         Debug("  Can't get font path\n");
-        return;
+        return 0;
     }
 
     /*
index ae2ed2196404f70d441bd83c366ce62aaeae5bac..5180cecbf1a500cb981a8cbfe36a49ff7b0f3af3 100644 (file)
@@ -120,6 +120,9 @@ extern int errno;
 #  ifdef macII
 #   define USE_CRYPT
 #  endif
+#  ifdef __FreeBSD__
+#   define USE_CRYPT
+#  endif
 #  ifdef sun
 #   define USE_CRYPT
 #   if (OSMAJORVERSION >= 4)
@@ -453,7 +456,7 @@ InitCryptoKey( void )
     char    *key_file = "/dev/mem";
 #endif    
     if (cryptoInited)
-       return;
+       return 0;
 
     /*
      *  If the sumFile fails to produce a result
index 42a59016a18c7fa4d6be5d9649d40fef527c3e25..0aa6877bc8774212d511ec73953180b707385a69 100644 (file)
@@ -152,7 +152,7 @@ DisposeProtoDisplay( struct protoDisplay *pdpy )
        prev = p;
     }
     if (!p)
-       return;
+       return 0;
     if (prev)
        prev->next = pdpy->next;
     else
index 2c4e62ffa023e88f3e81b0094fd20095d4731078..e9ac49727ff6711649cb25bea65ce79c6cfa71cf 100644 (file)
@@ -435,7 +435,7 @@ GetResource( char *name, char *class, int valueType, char **valuep,
      
      if (valueType == DM_STRING && *valuep) {
        if (string != NULL && strlen (*valuep) == len && !strncmp (*valuep, string, len))
-           return;
+           return 0;
        else {
            free (*valuep);
            *(valuep) = NULL;
@@ -450,7 +450,7 @@ GetResource( char *name, char *class, int valueType, char **valuep,
            if (!new_string) {
                LogOutOfMem(
                  ReadCatalog(MC_LOG_SET,MC_LOG_GET_RSC,MC_DEF_LOG_GET_RSC));
-               return;
+               return 0;
            }
            strncpy (new_string, string, len);
            new_string[len] = '\0';
index b36d2774f49766348d6f7a7aca84ba8dd14c4367..1a9e0f36e772f19f79bb3e48be9a224b01a19fff 100644 (file)
@@ -1746,7 +1746,7 @@ AbortClient( int pid )
                        MC_LOG_SET,MC_LOG_NO_KILLCL,MC_DEF_LOG_NO_KILLCL));
            case EINVAL:
            case ESRCH:
-               return;
+               return 0;
            }
        }
        if (!setjmp (tenaciousClient)) {
@@ -1834,11 +1834,11 @@ execute(char **argv, char **environ )
         */
        f = fopen (argv[0], "r");
        if (!f)
-           return;
+           return 0;
        if (fgets (program, sizeof (program) - 1, f) == NULL)
        {
            fclose (f);
-           return;
+           return 0;
        }
        fclose (f);
        e = program + strlen (program) - 1;
index a0e6dddb109a00297ed630c94274daf92a9f61bd..b0f03d59731a4d4b97c24500d1fe8a59f4d1bcad 100644 (file)
@@ -111,13 +111,13 @@ CreateWellKnownSockets ()
     char               *name, *localHostname();
 
     if (request_port == 0)
-           return;
+           return 0;
     Debug ("creating socket %d\n", request_port);
     xdmcpFd = socket (AF_INET, SOCK_DGRAM, 0);
     if (xdmcpFd == -1) {
        LogError (ReadCatalog(MC_LOG_SET,MC_LOG_FAIL_SOCK,MC_DEF_LOG_FAIL_SOCK),
                  request_port);
-       return;
+       return 0;
     }
     name = localHostname ();
     registerHostname (name, strlen (name));
@@ -136,7 +136,7 @@ CreateWellKnownSockets ()
                  request_port, errno);
        close (xdmcpFd);
        xdmcpFd = -1;
-       return;
+       return 0;
     }
     WellKnownSocketsMax = xdmcpFd;
     FD_SET (xdmcpFd, &WellKnownSocketsMask);
@@ -146,7 +146,7 @@ CreateWellKnownSockets ()
     if (chooserFd == -1)
     {
        LogError ((unsigned char *)"chooser socket creation failed, errno %d\n", errno);
-       return;
+       return 0;
     }
     listen (chooserFd, 5);
     if (chooserFd > WellKnownSocketsMax)
index 06bf0eeede705c48d0e4b991c019f7f862173bca..2bb599041f32dbc1f29f8a074f559981099c9b29 100644 (file)
@@ -2106,7 +2106,7 @@ MyBackspace( Widget w, XEvent *event, char **params, Cardinal *num_params )
 static int 
 ErrorHandler( Display *dpy, XErrorEvent *event )
 {
-    return;
+    return 0;
 }
 
 
index 33e537e776c91287d24ee897e36b424102546e26..48277032d70ee1ff1cae1ff5842cb258e86a3127 100644 (file)
@@ -696,7 +696,7 @@ _psUiSpecsAreValid(PrintSetup *pSetup)
     if (pSetup == NULL ||
        pSetup->dtprintSetup == NULL ||
        pSetup->widgets == NULL)
-      return;
+      return 0;
     pOption = &pSetup->options;
 
     frame = pSetup->widgets->marginFrame;
index f602b9b53403e12381b264806e05cb6925700952..b73ad7c7b0ab3d6c95818bedb5256e0ea1ac7656 100644 (file)
@@ -77,7 +77,7 @@ AllocatePaletteCells(
     XColor      colors[XmCO_MAX_NUM_COLORS * 5];
 
     if(style.count > 9)
-       return;
+       return 0;
 
     XmeGetPixelData (style.screenNum, &colorUse, pixels,
                                    &(pCurrentPalette->active),
index 910ae96ed9dea1ba5f147aa50b4c0a8c58a21d09..d385f198a0e026445cab974fdacf98f58c957b9c 100644 (file)
@@ -535,8 +535,8 @@ static XtEventHandler TestProbeHandler(
     Arg   al[5];
     
     *ctd = True;
-    if (cm->send_event == False) return;
-    if (cm->message_type != xa_DTTERM_REMOTE_PROBE_REQUEST) return;
+    if (cm->send_event == False) return 0;
+    if (cm->message_type != xa_DTTERM_REMOTE_PROBE_REQUEST) return 0;
     
     reply = (unsigned char*) malloc(sizeof(unsigned char) * 1024);
 
index 17d9ed8b193a3a0726c26bf61f658bbfb39149a9..75b74b8bad6d162b20d10ab0ee402a98d3d21e11 100644 (file)
@@ -472,7 +472,7 @@ XLCdGenericPart *gen;
                 }
                 if (charsetd == NULL &&
                     (charsetd = srch_charset_define(cset_name,&new)) == NULL)
-                    return ;
+                    return 0;
             }
         } else {
             if(i == 0){
@@ -484,7 +484,7 @@ XLCdGenericPart *gen;
         if(new){
             tmp = (char *)Xmalloc(strlen(cset_name)+1);
             if(tmp == NULL){
-                return ;
+                return 0;
             }
             strcpy(tmp,cset_name);
             charsetd->name = tmp;
@@ -528,7 +528,7 @@ XLCdGenericPart *gen;
 */
             tmp = (char *)Xmalloc(strlen(value[0])+1);
             if(tmp == NULL){
-                return;
+                return 0;
             }
             charsetd->ct_sequence = tmp;
             string_to_encoding(value[0],tmp);
@@ -597,7 +597,7 @@ XLCdGenericPart *gen;
             char *tmp;
             if (conversion == NULL &&
                 (conversion = faladd_conversion(gen)) == NULL) {
-                return ;
+                return 0;
             }
             dbg_printValue(name,value,num);
         } else {
@@ -617,7 +617,7 @@ XLCdGenericPart *gen;
             dbg_printValue(name,value,num);
             tmp = (char *)Xmalloc(strlen(value[0])+1);
             if(tmp == NULL){
-                return;
+                return 0;
             }
             strcpy(tmp,value[0]);
             conversion->source_encoding = tmp;
@@ -625,7 +625,7 @@ XLCdGenericPart *gen;
             if(new){
                 tmp = (char *)Xmalloc(strlen(conversion->source_encoding)+1);
                 if(tmp == NULL){
-                    return ;
+                    return 0;
                 }
                 strcpy(tmp,conversion->source_encoding);
                 conversion->source->name = tmp;
@@ -639,7 +639,7 @@ XLCdGenericPart *gen;
             dbg_printValue(name,value,num);
             tmp = (char *)Xmalloc(strlen(value[0])+1);
             if(tmp == NULL){
-                return;
+                return 0;
             }
             strcpy(tmp,value[0]);
             conversion->destination_encoding = tmp;
@@ -648,7 +648,7 @@ XLCdGenericPart *gen;
                 tmp = (char *)Xmalloc(
                     strlen(conversion->destination_encoding)+1);
                 if(tmp == NULL){
-                    return ;
+                    return 0;
                 }
                 strcpy(tmp,conversion->destination_encoding);
                 conversion->dest->name = tmp;
@@ -729,7 +729,7 @@ int num;
     if(new){
         tmp = (char *)Xmalloc(strlen(cset_name)+1);
         if(tmp == NULL){
-            return ;
+            return 0;
         }
         strcpy(tmp,cset_name);
         ret->charset->name = tmp;
index 957a62b318aa323fe9c7a9aefd47035cd010044e..8db1bbbb607e9b6eef63c8e234c7f914d1783572 100644 (file)
@@ -146,13 +146,19 @@ DtstyleDescRule(hp.dt,hp.dt)
 DtstyleDescRule(ibm.dt,ibm.dt)
 #endif
 
+#define NLS_CLEAN \                                                    @@\
+       for i in *.nls; do \                                            @@\
+               [ -z $$i ] && continue; \                               @@\
+               [ -h $$i ] && $(RM) $$i; \                              @@\
+       done; true;
+
+#define OBJS_CLEAN \                                                   @@\
+       for i in $(OBJS); do \                                          @@\
+               $(RM) $$i.tmsg; \                                       @@\
+       done; true;
+
 clean::
        $(RM) $(OBJS) $(OBJS2)
-       for i in *.nls; do \
-               [ -z $$i ] && continue; \
-               [ -h $$i ] && $(RM) $$i; \
-       done; true; 
-       for i in $(OBJS); do \
-               $(RM) $$i.tmsg; \
-       done; true; 
+       NLS_CLEAN
+       OBJS_CLEAN
 
index 9d239141a77bf3561cceeb02407510bfa25113ff..16fe4b479890b78594d5a23064388007449cff53 100644 (file)
@@ -147,39 +147,45 @@ $(m.GEN_UI_C) Plus() $(m.GEN_UI_H) Plus() $(m.GEN_STUBS_C++): ttsnoop.bip $(m.SR
 # define CodeGenTarget(m) CodeGenAppendableTarget(m)
 #endif
 
+#define SED_MoreButton $(SED) \                                                @@\
+       -e 's/\(MoreButton;\)/\1Boolean _DtCanHelp( const char * );/' \ @@\
+       -e 's/\(XtManageChild(Quick_help\)/XtSetSensitive(MoreButton,_DtCanHelp(help_data->help_text));\1/' \   @@\
+       -e 's/\(buffer, vol, loc;\)/\1Boolean _DtHelped( Widget );/' \  @@\
+       -e 's/\(if( (cp=strrchr\)/if (_DtHelped( help_dialog)) return;\1/' \ @@\
+       dtb_utils.c > dtb_utils.c.patched
+
+#define SED_DtbTt $(SED) \                                             @@\
+       -e 's/^DtbTt/extern String snooperArgv[];DtbTt/' \              @@\
+       -e 's/XmNheight, 257,//' \                                      @@\
+       -e 's/XmNwidth, 580,//' \                                       @@\
+       -e 's/XmNcolumns, 80,//' \                                      @@\
+       -e 's/XmNrows, 24/DtNsubprocessArgv, snooperArgv/' \            @@\
+       ttsnoop_ui.c > ttsnoop_ui.c.patched
+
+#define SED_DtbApi $(SED) \                                            @@\
+       -e 's/^DtbApi/extern String apiTracerArgv[];DtbApi/' \          @@\
+       -e 's/XmNrows, 24/XmNrows, 24, DtNsubprocessArgv, apiTracerArgv/' \ @@\
+       apiTracer_ui.c > apiTracer_ui.c.patched
 
 ttsnoop.C ttsnoop.h dtb_utils.c dtb_utils.h: ttsnoop.bip ttsnoop.C.src
        $(CP) ttsnoop.C.src ttsnoop.c
-       -if [ ! -w ttsnoop.c ]; then \
-               chmod +w ttsnoop.c; fi
+       -if [ ! -w ttsnoop.c ]; then chmod +w ttsnoop.c; fi
        $(DTCODEGEN) -changed -merge -p ttsnoop.bip -main
        $(RM) ttsnoop.C
        $(MV) ttsnoop.c ttsnoop.C
        chmod -w ttsnoop.C
        cat externC.h dtb_utils.h closeBrace.h > dtb_utils.h.patched
        $(MV) dtb_utils.h.patched dtb_utils.h
-       sed \
-       -e 's/\(MoreButton;\)/\1Boolean _DtCanHelp( const char * );/' \
-       -e 's/\(XtManageChild(Quick_help\)/XtSetSensitive(MoreButton,_DtCanHelp(help_data->help_text));\1/' \
-       -e 's/\(buffer, vol, loc;\)/\1Boolean _DtHelped( Widget );/' \
-       -e 's/\(if( (cp=strrchr\)/if (_DtHelped( help_dialog)) return;\1/' \
-       dtb_utils.c > dtb_utils.c.patched
+       SED_MoreButton
        $(MV) dtb_utils.c.patched dtb_utils.c
 ttsnoop.o: ttsnoop.C ttsnoop.bip $(TARGETS.h) $(TARGETS.h.merged)
 
 CodeGenAppendableTarget(ttsnoop)
-       sed -e 's/^DtbTt/extern String snooperArgv[];DtbTt/' \
-       -e 's/XmNheight, 257,//' \
-       -e 's/XmNwidth, 580,//' \
-       -e 's/XmNcolumns, 80,//' \
-       -e 's/XmNrows, 24/DtNsubprocessArgv, snooperArgv/' \
-       ttsnoop_ui.c > ttsnoop_ui.c.patched
+       SED_DtbTt
        $(MV) ttsnoop_ui.c.patched ttsnoop_ui.c
 
 CodeGenAppendableTarget(apiTracer)
-       sed -e 's/^DtbApi/extern String apiTracerArgv[];DtbApi/' \
-       -e 's/XmNrows, 24/XmNrows, 24, DtNsubprocessArgv, apiTracerArgv/' \
-       apiTracer_ui.c > apiTracer_ui.c.patched
+       SED_DtbApi
        $(MV) apiTracer_ui.c.patched apiTracer_ui.c
 
 CodeGenTarget(ttChooser)