@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
@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
@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
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) \
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),)
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) \
# 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) @@\
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: @@\
@@\
Concat(lib,libname.a): objlist @@\
$(RM) $@ @@\
- @echo "### Making SimpleLibrary libname.a" @@\
+ @echo STR(*** Making SimpleLibrary libname.a) @@\
$(LD) -r -o $@ 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:: @@\
#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:: @@\
@@\
Concat(lib,libname.a): objlist @@\
$(RM) $@ @@\
- @echo "### Making RealLibrary libname.a" @@\
+ @echo STR(*** Making RealLibrary libname.a) @@\
ar cq $@ objlist @@\
RanLibrary($@)
@@\
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:: @@\
#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:: @@\
#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
#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
#endif
#ifndef OptimizedCDebugFlags
-# ifdef i386Architecture
+# if defined(i386Architecture) || defined(AMD64Architecture)
# define OptimizedCDebugFlags DefaultGcc2i386Opt
# else
# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
#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
* 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:
#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
* 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
* 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
* 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
* 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
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
#define YES 1
#define NO 0
+#define HASH_SIGN #
+
/* Ensure that "all" is the default target in the Makefile. */
all::
#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
# 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
# define SharedDtSvcReqs $(LDPRELIBS) SharedXReqs $(CXXLIB)
#endif
+#ifndef SharedDtHelpReqs
+# define SharedDtHelpReqs $(LDPRELIBS) $(ICONVSYSLIB) SharedXReqs
+#endif
+
#ifndef SharedCsaReqs
# define SharedCsaReqs -lXt $(LDPOSTLIBS)
#endif
#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
* 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
|| (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
# ifdef __GNUC__
"-traditional",
# endif
+# ifdef __llvm__
+ "-fms-extensions",
+ "-Wno-invalid-token-paste",
+ "-Wno-invalid-pp-token",
+# endif
#endif
#ifdef M4330
# 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]"
#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
const char *var;
int len;
{
+ long val;
struct symtab **s;
s = lookup_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;
}
#include "ifparser.h"
#include <ctype.h>
+#include <limits.h>
/****************************************************************************
Internal Macros and Utilities for Parser
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;
}
case '/':
DO (cp = parse_product (g, cp + 1, &rightval));
- *valp = (*valp / rightval);
+ if (rightval)
+ *valp = (*valp / rightval);
+ else
+ *valp = LONG_MAX;
break;
case '%':
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;
int parse_it;
{
register char *p;
- char *directive, savechar;
+ char *directive, savechar, *q;
register int ret;
/*
*/
while (*p == ' ' || *p == '\t')
p++;
+ q = p + strlen(p);
+ do {
+ q--;
+ } while (*q == ' ' || *q == '\t');
+ q[1] = '\0';
switch (ret) {
case IF:
/*
/*
* copy the definition back to the beginning of the line.
*/
- strcpy (line, p);
+ memmove (line, p, strlen(p) + 1);
break;
case ELSE:
case ENDIF:
* 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
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) @@\
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) @@\
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) @@\
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
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
/*
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);
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;
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;
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;
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;
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;
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
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 ) {
/* 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.
/* 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.
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
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;
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;
_DtTermPrimBufferInsertWc(tb, row, col, (wchar_t *)newChars,
numChars, insertFlag,
returnChars, returnCount);
- return;
+ return 0;
}
if (WIDTH(line) < col)
if (*parseChar == debugChar) {
ParseTrap();
- return;
+ return 0;
}
}
}
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
register char *p;
if (len <= 0)
- return;
+ return 0;
/* Load the entire string. */
memcpy((void *) dst, (const void *) src, len);
register char c;
if (len <= 0)
- return;
+ return 0;
/* Copy up to NULL character. */
do {
register char *p;
if (len <= 0)
- return;
+ return 0;
/* Load the entire string. */
memcpy((void *) dst, (const void *) src, len);
register char c;
if (len <= 0)
- return;
+ return 0;
/* Copy up to a NULL character. */
do {
if (pkdesc->k_nparts == 0) {
print("%3d: --- NO PRIMARY KEY ---\n", n);
- return;
+ return 0;
}
if (n == 1)
XFree(data);
}
if (motif_receiver)
- return;
+ return 0;
#ifdef DEBUG
printf("AdvertiseMotifDropSite\n");
* occurred.
*/
_DtTurnOffHourGlass(t->frame);
- return;
+ return 0;
case 4:
default:
/*
if (stat != CSA_SUCCESS) {
_DtTurnOffHourGlass(t->frame);
- return;
+ return 0;
}
csa_free((CSA_buffer) new_a);
if (stat != CSA_SUCCESS)
{
free_appt_struct(&appt);
- return;
+ return 0;
}
skip_appt = B_FALSE;
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) */
XmToggleButtonSetState(StaticWid[new_pen], True, False);
else
XmToggleButtonSetState(DynamicWid[new_pen], True, False);
- return;
+ return 0;
}
/*** un-set the previous choice ***/
extern unsigned g_validation_mode;
+#if defined(__FreeBSD__) && (__FreeBSD__ >= 10) && !defined(__llvm__)
+__attribute__((optimize(0)))
+#endif
FeatureValue *
SgmlAttributeNode::evaluate() const
{
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int defParserinput()
#else
return ( c );
}
+#endif
#ifdef defParser_USE_PROTOS
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int psinput()
#else
return ( c );
}
+#endif
#ifdef ps_USE_PROTOS
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int sgmlinput()
#else
return ( c );
}
+#endif
#ifdef sgml_USE_PROTOS
new_alphabet[k + estimated_sz] = 0;
}
- new_alphabet = new_alphabet;
estimated_sz *= 2;
}
}
private:
fast_mphf_handler *v_mphf; // hash func
- inv_lists_handler *v_invlists; // list of inv_list
char* f_key_file_name;
};
#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
#endif
+#if 0
#ifdef __cplusplus
static int schemainput()
#else
return ( c );
}
+#endif
#ifdef schema_USE_PROTOS
class WXmText;
#include <WWL/WXmPushButtonGadget.h>
class Mark;
-class MarkMoved;
+struct MarkMoved;
class BookmarkEdit : public Dialog, public UAS_Receiver<MarkMoved>
{
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);
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;
struct OutlineListSelectionData;
-class TrackingEntry;
+struct TrackingEntry;
class LibraryAgent : public Agent,
public UAS_Receiver<UAS_DocumentRetrievedMsg>
class Agent;
class Mark;
class MarkIcon;
-class MarkSelectionChanged;
-class MarkChanged;
+struct MarkSelectionChanged;
+struct MarkChanged;
class MarkCanvas : public Destructable,
public UAS_Receiver<MarkChanged>
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)
{
// 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 ;
#include <WWL/WXmPushButton.h>
#include <WWL/WXmList.h>
-class MarkCreated;
-class MarkDeleted;
+struct MarkCreated;
+struct MarkDeleted;
class MarkListView : public WWL,
public UAS_Receiver<MarkCreated>,
}
+#if 0
static unsigned
find_segment_offset (_DtCvSegment *start, const _DtCvSegment *target,
unsigned &offset);
+#endif
static void
arm_callback (void *client_data)
// stack of the parents
+#if 0
static _DtCvSegment *
contains(_DtCvSegment *root, _DtCvSegment *segment)
{
return 0;
}
+#endif
return mark_canvas ;
}
+#if 0
static unsigned
find_segment_offset (_DtCvSegment *start, const _DtCvSegment *target,
unsigned &offset)
return found ;
}
+#endif
void
NodeWindowAgent::link_to (const char *locator)
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;
#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
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 &);
};
// 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);
}
// /////////////////////////////////////////////////////////////////
void
-HashBucket::remove (const FolioObject &element)
+HashBucket::remove (FolioObject &element)
{
register int i;
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);
}
// 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);
}
// /////////////////////////////////////////////////////////////////
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)
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;
char *f_lang;
char *f_home;
char *f_user_path;
- char *f_lang_normalized;
// option flags and data
UAS_String f_infolibsStr;
#include "UAS.hh"
-class HistoryDelete;
-class HistoryAdd;
+struct HistoryDelete;
+struct HistoryAdd;
class NodeHistoryAgent;
class GlobalHistoryMgr : public Long_Lived,
#include "UAS.hh"
-class Anchor;
+struct Anchor;
class LocalHistoryEntry
{
class Mark;
class MarkBase;
-class Anchor;
+struct Anchor;
class MarkListView;
class MarkMgr : public Long_Lived
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);
bool f_popped_up;
bool f_pressed_ok;
bool f_exit_flag;
- bool f_dialog_active;
private:
LONG_LIVED_HH(MessageMgr,message_mgr);
// /////////////////////////////////////////////////////////////////
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));
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
private: // data
char *procid ; // tt id for process
- Tt_pattern *sess_patterns ; // tt patterns array for process
Tt_status tt_state ;
} ;
*/
-class Anchor
+struct Anchor
{
public:
Anchor (const char *location, const char *format, bool keep = FALSE)
# 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
{
template <class T> class xList;
class Mark;
-class Anchor;
+struct Anchor;
class MarkBase
{
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),
private:
RowDefn* f_row ;
- unsigned f_graphic;
_DtCvFrmtOption f_border;
int f_border_width;
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...
class BookTab;
class MarkTml;
class MarkIcon;
-class MarkCreated;
+struct MarkCreated;
class MarkSelectionChanged;
#ifndef _IBMR2
class DisplayDocument;
return;
}
-static void layout_tree (tw, insetvalues)
- TreeWidget tw;
- Boolean insetvalues;
+static void layout_tree (TreeWidget tw, Boolean insetvalues)
{
int i;
Dimension *dp;
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int ol_datainput()
#else
return ( c );
}
+#endif
#ifdef ol_data_USE_PROTOS
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int remoteinput()
#else
return ( c );
}
+#endif
#ifdef remote_USE_PROTOS
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int nodedatainput()
#else
return ( c );
}
+#endif
#ifdef nodedata_USE_PROTOS
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int graphics_taskinput()
#else
return ( c );
}
+#endif
#ifdef graphics_task_USE_PROTOS
#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
{
#endif
+#if 0
#ifdef __cplusplus
static int yyinput()
#else
return ( c );
}
+#endif
#ifdef YY_USE_PROTOS
#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";
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;
__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:
#else
#define __VA_START__(p,a) va_start(p)
#endif
+#define va_listval(p) (*(p))
+#define va_listarg va_list*
#endif
#include <ast.h>
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')
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*);
if (client_fd == -1)
{
LogError ((unsigned char *)"Cannot accept chooser connection\n");
- return;
+ return 0;
}
Debug ("Accepted %d\n", client_fd);
prev = &hosts->next;
}
if (!hosts)
- return;
+ return 0;
*prev = host->next;
DisposeHostname (host);
NameTableSize--;
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;
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;
{
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);
}
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);
}
LogError(
ReadCatalog(MC_LOG_SET,MC_LOG_NO_SRVACC,MC_DEF_LOG_NO_SRVACC),
servers);
- return;
+ return 0;
}
if (ServersModTime == 0)
{
*/
if (d->displayType.origin == FromFile && dt_shutdown ) {
RemoveDisplay(d);
- return;
+ return 0;
}
{
LogError ((unsigned char *)"All DT utmp IDs already in use. Removing display %s\n",
d->name);
RemoveDisplay(d);
- return;
+ return 0;
}
}
#endif
if (!StartGetty(d))
RemoveDisplay (d);
- return;
+ return 0;
}
}
else
* 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 )
static int
ErrorHandler( Display *dpy, XErrorEvent *event )
{
- return;
+ return 0;
}
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])
LogError(ReadCatalog(MC_LOG_SET,MC_LOG_MISS_TYPE,MC_DEF_LOG_MISS_TYPE),
args[0]);
freeArgs (args);
- return;
+ return 0;
}
/*
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;
}
/*
# ifdef macII
# define USE_CRYPT
# endif
+# ifdef __FreeBSD__
+# define USE_CRYPT
+# endif
# ifdef sun
# define USE_CRYPT
# if (OSMAJORVERSION >= 4)
char *key_file = "/dev/mem";
#endif
if (cryptoInited)
- return;
+ return 0;
/*
* If the sumFile fails to produce a result
prev = p;
}
if (!p)
- return;
+ return 0;
if (prev)
prev->next = pdpy->next;
else
if (valueType == DM_STRING && *valuep) {
if (string != NULL && strlen (*valuep) == len && !strncmp (*valuep, string, len))
- return;
+ return 0;
else {
free (*valuep);
*(valuep) = NULL;
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';
MC_LOG_SET,MC_LOG_NO_KILLCL,MC_DEF_LOG_NO_KILLCL));
case EINVAL:
case ESRCH:
- return;
+ return 0;
}
}
if (!setjmp (tenaciousClient)) {
*/
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;
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));
request_port, errno);
close (xdmcpFd);
xdmcpFd = -1;
- return;
+ return 0;
}
WellKnownSocketsMax = xdmcpFd;
FD_SET (xdmcpFd, &WellKnownSocketsMask);
if (chooserFd == -1)
{
LogError ((unsigned char *)"chooser socket creation failed, errno %d\n", errno);
- return;
+ return 0;
}
listen (chooserFd, 5);
if (chooserFd > WellKnownSocketsMax)
static int
ErrorHandler( Display *dpy, XErrorEvent *event )
{
- return;
+ return 0;
}
if (pSetup == NULL ||
pSetup->dtprintSetup == NULL ||
pSetup->widgets == NULL)
- return;
+ return 0;
pOption = &pSetup->options;
frame = pSetup->widgets->marginFrame;
XColor colors[XmCO_MAX_NUM_COLORS * 5];
if(style.count > 9)
- return;
+ return 0;
XmeGetPixelData (style.screenNum, &colorUse, pixels,
&(pCurrentPalette->active),
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);
}
if (charsetd == NULL &&
(charsetd = srch_charset_define(cset_name,&new)) == NULL)
- return ;
+ return 0;
}
} else {
if(i == 0){
if(new){
tmp = (char *)Xmalloc(strlen(cset_name)+1);
if(tmp == NULL){
- return ;
+ return 0;
}
strcpy(tmp,cset_name);
charsetd->name = tmp;
*/
tmp = (char *)Xmalloc(strlen(value[0])+1);
if(tmp == NULL){
- return;
+ return 0;
}
charsetd->ct_sequence = tmp;
string_to_encoding(value[0],tmp);
char *tmp;
if (conversion == NULL &&
(conversion = faladd_conversion(gen)) == NULL) {
- return ;
+ return 0;
}
dbg_printValue(name,value,num);
} else {
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;
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;
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;
tmp = (char *)Xmalloc(
strlen(conversion->destination_encoding)+1);
if(tmp == NULL){
- return ;
+ return 0;
}
strcpy(tmp,conversion->destination_encoding);
conversion->dest->name = tmp;
if(new){
tmp = (char *)Xmalloc(strlen(cset_name)+1);
if(tmp == NULL){
- return ;
+ return 0;
}
strcpy(tmp,cset_name);
ret->charset->name = tmp;
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
# 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)