diff --git a/cde/Imakefile b/cde/Imakefile index 59f16e456..3cc25499a 100644 --- a/cde/Imakefile +++ b/cde/Imakefile @@ -139,7 +139,6 @@ Everything.doc:: NamedTargetSubdirs(install.doc,$(DOCSUBDIRS),"installing",DESTDIR=$(DESTDIR),install) NamedTargetSubdirs(install.man.doc,$(DOCSUBDIRS),"installing man pages",DESTDIR=$(DESTDIR),install.man) -InstallLinkKitSubdirs($(DOCSUBDIRS)) NamedCleanSubdirs(clean.doc,$(DOCSUBDIRS)) NamedTagSubdirs(tags.doc,$(DOCSUBDIRS)) MakeMakeSubdirs($(DOCSUBDIRS),Makefiles.doc) diff --git a/cde/README b/cde/README new file mode 100644 index 000000000..f5e72db6e --- /dev/null +++ b/cde/README @@ -0,0 +1,39 @@ +************************************* + +The Common Desktop Environment is released under the terms of the LGPL V.2 +license. You may reuse and redistribute this code under the terms of this +license. See the COPYING file for details. +************************************* + +Purpose of this release: + +This release under a new license is numbered 2.2.0. It is almost identical to +the 2.1.30 release The Open Group made available to customers in 1999 but with +additional improvements to allow it to build under Linux. It's not called +2.1.30 to avoid confusion with versions of 2.1.30 not built from the open source +code. + +************************************ +Downloading this release: + +CDE may be downloaded downloaded in source form from the Common Desktop +Environment website: + +http://sourceforge.net/projects/cdesktopenv/ + +Or via git: + +git clone git://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code + +************************************ + +Installing this release: + +Complete installation instructions can be found on the CDE wiki: + +http://sourceforge.net/p/cdesktopenv/wiki/Home/ + +Bug reports and patches encouraged. + + + diff --git a/cde/admin/IntegTools/dbTools/installCDE.src b/cde/admin/IntegTools/dbTools/installCDE.src index 6e13dd0f7..9c9027879 100755 --- a/cde/admin/IntegTools/dbTools/installCDE.src +++ b/cde/admin/IntegTools/dbTools/installCDE.src @@ -207,6 +207,9 @@ CleanDaemons() then stopsrc -s inetd >>$LOGFILE 2>&1 fi + elif [ "$PLATFORM" = openbsd ] + then + true else ps -ef | grep $i | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] @@ -234,6 +237,9 @@ RestartInetd() elif [ "$PLATFORM" = "dec" ] then /usr/sbin/inetd + elif [ "$PLATFORM" = "openbsd" ] + then + true else #ifdef hpV4 /usr/sbin/inetd @@ -537,6 +543,10 @@ XCOMM then PLATFORM="linux" PLATFORM_SCRIPT_DIR="" + elif [ $BUILDSYSTEM = "OpenBSD" ]; + then + PLATFORM="openbsd" + PLATFORM_SCRIPT_DIR="" else # Build system = HP PLATFORM=hp-ux PLATFORM_SCRIPT_DIR=hp @@ -566,9 +576,6 @@ XCOMM unset TMPDIR - PATH=/bin:/usr/bin:/etc:/usr/bin/X11: - export PATH - CLEANING="no" CLEANING_ETC="no" TARBALL="no" @@ -872,9 +879,9 @@ XCOMM fi fi - INSTALL_LOCATION=CDE_INSTALLATION_TOP - CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP - LOGFILES_LOCATION=CDE_LOGFILES_TOP + [ -z "$INSTALL_LOCATION" ] && INSTALL_LOCATION=CDE_INSTALLATION_TOP + [ -z "$CONFIGURE_LOCATION" ] && CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP + [ -z "$LOGFILES_LOCATION" ] && LOGFILES_LOCATION=CDE_LOGFILES_TOP if [ -L $INSTALL_LOCATION -a "$CONFIGURE_ONLY" != "yes" ] then diff --git a/cde/admin/IntegTools/dbTools/udbToAny.ksh b/cde/admin/IntegTools/dbTools/udbToAny.ksh index 4c26e8bf1..655b627f6 100755 --- a/cde/admin/IntegTools/dbTools/udbToAny.ksh +++ b/cde/admin/IntegTools/dbTools/udbToAny.ksh @@ -142,7 +142,7 @@ ConvertRoutine() ;; esac - cat > /tmp/awk$$ < $TMPFILE <> /tmp/awk$$ - [ -z "$CUSTOM_PRINT" ] || cat "$CUSTOM_PRINT_LIB" >> /tmp/awk$$ + cat "$UDB_PARSE_LIB" >> $TMPFILE + [ -z "$CUSTOM_PRINT" ] || cat "$CUSTOM_PRINT_LIB" >> $TMPFILE $AWK -v mailTo="$Administrator" \ -v action="$DoAction" \ @@ -176,7 +176,7 @@ EOF -v UseDefaultBlocks="$UseDefaultBlocks" \ -v DeBugFile="$DEBUGFILE" \ -v DeBug="$DEBUGLEVEL" \ - -f /tmp/awk$$ $* + -f $TMPFILE $* # @@ -185,7 +185,7 @@ EOF # -f "$UDB_PARSE_LIB" \ # - rm /tmp/awk$$ + rm $TMPFILE } # @@ -246,6 +246,7 @@ typeset UDB_PARSE_LIB="$DBTOOLSRC/udbParseLib.awk" typeset CUSTOM_PRINT_LIB="" typeset DEBUGFILE="/dev/tty" typeset DEBUGLEVEL=0 +typeset TMPFILE=`mktemp /tmp/awkXXXXXXXXXXXXXXXXXXXXX` if [ $# -gt 2 ]; then while [ $# -gt 0 ] diff --git a/cde/admin/IntegTools/post_install/Imakefile b/cde/admin/IntegTools/post_install/Imakefile index 04669e038..f8e3d8dc8 100644 --- a/cde/admin/IntegTools/post_install/Imakefile +++ b/cde/admin/IntegTools/post_install/Imakefile @@ -19,6 +19,9 @@ PLATFORM = hp-ux PLATFORM = linux SUBDIRS = linux #endif +#ifdef OpenBSDArchitecture +PLATFORM = openbsd +#endif #ifdef RsArchitecture PLATFORM = aix SUBDIRS = ibm diff --git a/cde/admin/IntegTools/post_install/linux/configRun.src b/cde/admin/IntegTools/post_install/linux/configRun.src index ba75bb336..1736b8f23 100755 --- a/cde/admin/IntegTools/post_install/linux/configRun.src +++ b/cde/admin/IntegTools/post_install/linux/configRun.src @@ -214,6 +214,19 @@ XCOMM exists the link is correct /usr/dt/link EOF } + +PrintUsage() +{ + echo "Usage:" $0 "[OPERATION]" + echo "" + echo "Operations:" + echo " -e configure" + echo " -d deconfigure" + echo " -v verify" + echo " -s size" + echo " -h help" +} + #include "../option.func" XCOMM ########################################################################## @@ -239,6 +252,12 @@ DEFAULT_PRINTER="DtPrint" HandleOption $* + if [ "$OPERATION" = "usage" ] + then + PrintUsage + exit 0 + fi + if [ "$OPERATION" = "configure" ] then @@ -324,8 +343,11 @@ DEFAULT_PRINTER="DtPrint" then awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh else - /usr/sbin/inetd -s + [ -x /usr/sbin/inetd ] && /usr/sbin/inetd -s 2>/dev/null fi fi + HASH dtmail requires setgid + chmod 2555 $DT_TOP/bin/dtmail + return $retval diff --git a/cde/admin/IntegTools/post_install/option.func b/cde/admin/IntegTools/post_install/option.func index 27b8cc723..d6ce94e4b 100644 --- a/cde/admin/IntegTools/post_install/option.func +++ b/cde/admin/IntegTools/post_install/option.func @@ -3,7 +3,7 @@ HandleOption() while [ $# -ne 0 ]; do case $1 in -e) OPERATION="configure" - shift; + shift; ;; -d) OPERATION="deconfigure" shift; @@ -14,6 +14,12 @@ HandleOption() -s) OPERATION="size" shift; ;; + -h | --help | --usage) OPERATION="usage" + shift; + ;; + *) OPERATION="usage" + shift; + ;; esac done } diff --git a/cde/admin/IntegTools/post_install/verify.func b/cde/admin/IntegTools/post_install/verify.func index db7079c84..886d472e4 100644 --- a/cde/admin/IntegTools/post_install/verify.func +++ b/cde/admin/IntegTools/post_install/verify.func @@ -5,9 +5,9 @@ then if [ -f ${tokens[0]} ] then - echo "exists \c" + printf "exists " else - echo "MISSING or REMOVED \c" + printf "MISSING or REMOVED " echo "${tokens[0]}" continue fi @@ -15,9 +15,9 @@ then if [ -L ${tokens[0]} ] then - echo "exists \c" + printf "exists " else - echo "MISSING or REMOVED \c" + printf "MISSING or REMOVED " echo "${tokens[0]}" continue fi @@ -32,36 +32,36 @@ if [ "$tmpperms" = "$realperms" ] then - echo "correct \c" + printf "correct " else - echo " WRONG \c" + printf " WRONG " fi owner=`ls -l ${tokens[0]} | awk '{print $3}'` if [ "$owner" = "${tokens[4]}" ] then - echo "correct \c" + printf "correct " else - echo " WRONG \c" + printf " WRONG " fi group=`ls -l ${tokens[0]} | awk '{print $4}'` if [ "$group" = "${tokens[5]}" ] then - echo "correct \c" + printf "correct " else - echo " WRONG \c" + printf " WRONG " fi elif [ "${tokens[3]}" = "sym_link" ] then linkto=`ls -l ${tokens[0]} | awk '{print $11}'` if [ "${tokens[2]}" = "$linkto" ] then - echo " the link is correct \c" + printf " the link is correct " else - echo " the link is WRONG \c" + printf " the link is WRONG " fi fi echo "${tokens[0]}" diff --git a/cde/config/cf/FreeBSD.cf b/cde/config/cf/FreeBSD.cf index d91827cd4..dc37202d0 100644 --- a/cde/config/cf/FreeBSD.cf +++ b/cde/config/cf/FreeBSD.cf @@ -4,7 +4,7 @@ XCOMM platform: $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $ #define OSName DefaultOSName #endif #ifndef OSVendor -#define OSVendor Walnut Creek CD-ROM +#define OSVendor FreeBSD Foundation #endif #ifndef OSMajorVersion #define OSMajorVersion DefaultOSMajorVersion @@ -21,8 +21,13 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe #define HasBSD44Sockets YES #define HasZlib YES +#if OSMajorVersion >= 5 +#define CppCmd /usr/bin/cpp -traditional +#define PreProcessCmd /usr/bin/cpp -traditional +#else #define CppCmd /usr/libexec/cpp -traditional #define PreProcessCmd /usr/libexec/cpp -traditional +#endif #undef InstallCmd #define InstallCmd /usr/bin/install @@ -52,12 +57,15 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe #define DefaultCCOptions -pipe #endif +#define CplusplusLibC -lstdc++ + #if OSMajorVersion > 1 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME #define XawI18nDefines -DUSE_XWCHAR_STRING #define HasMakefileSafeInclude YES #define IncludeMakefile(file) @@# dependencies are in .depend #define DependFileName .depend +#if OSMajorVersion < 3 #if OSMinorVersion < 2 #ifndef ExtraLibraries #define ExtraLibraries -lgnumalloc @@ -66,6 +74,7 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe #if OSTeenyVersion == 2 #define HasSetUserContext YES #endif +#endif #ifndef ExtraLoadFlags /* * This doesn't work the way it does on every other system. On FreeBSD it's diff --git a/cde/config/cf/Imake.cf b/cde/config/cf/Imake.cf index 3c57d2193..923dfae22 100644 --- a/cde/config/cf/Imake.cf +++ b/cde/config/cf/Imake.cf @@ -51,6 +51,122 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $ # undef i386 #endif /* bsdi */ +#ifdef __OpenBSD__ +# undef __OpenBSD__ +# undef __NetBSD__ +# define OpenBSDArchitecture +# define KOpenBSDArchitecture +# define MacroIncludeFile +# define MacroFile OpenBSD.cf +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# if defined(__sparc__) || defined(sparc) +# if !defined(__arch64__) +# define SparcArchitecture +# else +# define Sparc64Architecture +# endif +# undef sparc +# undef sparc64 +# endif +# if defined(__mips__) || defined(mips) +# define MipsArchitecture +# ifdef __LP64__ +# define Mips64Architecture +# endif +# ifdef arc +# define ArcArchitecture +# undef arc +# endif +# ifdef sgi +# define SGIArchitecture +# undef sgi +# endif +# ifdef pmax +# define PmaxArchitecture +# undef pmax +# endif +# undef mips +# undef __mips__ +# endif +# if defined(__alpha__) || defined(alpha) +# define AlphaArchitecture +# undef __alpha__ +# undef alpha +# endif +# if defined(__amd64__) || defined(__x86_64__) +# define AMD64Architecture +# undef __amd64__ +# undef __x86_64__ +# undef amd64 +# endif +# if defined(__arm__) +# define Arm32Architecture +# undef __arm__ +# if defined(zaurus) +# undef zaurus +# define ZaurusArchitecture +# endif +# endif +# if defined(__mc68020__) || defined(mc68020) +# define Mc68020Architecture +# if defined(amiga) +# define AmigaArchitecture +# undef amiga +# endif +# if defined(hp300) +# define Hp300Architecture +# undef hp300 +# endif +# if defined(mac68k) +# define Mac68kArchitecture +# undef mac68k +# endif +# if defined(mvme68k) +# define Mvme68kArchitecture +# undef mvme68k +# endif +# if defined(sun3) +# define Sun3Architecture +# undef sun3 +# endif +# undef mc68000 +# endif +# if defined(__m88k__) || defined(m88k) +# define Mc88000Architecture +# undef m88k +# endif +# ifdef __powerpc__ +# define PpcArchitecture +# undef __powerpc__ +# undef __macppc__ +# undef macppc +# endif +# ifdef __sh__ +# undef __sh__ +# define SuperHArchitecture +# endif +# ifdef __vax__ +# undef vax +# undef __vax__ +# define VaxArchitecture +# endif +# ifdef __hppa__ +# ifndef HPArchitecture +# define HPArchitecture +# endif +# undef __hppa__ +# endif /* __hppa__ */ +#endif /* OpenBSD */ + +/* Systems based on kernel of OpenBSD */ +#if defined(__OpenBSD_kernel__) +#define KOpenBSDArchitecture +#endif + #ifdef __NetBSD__ # define MacroIncludeFile # define MacroFile NetBSD.cf diff --git a/cde/config/cf/Imake.tmpl b/cde/config/cf/Imake.tmpl index 3338283f8..080f4e96c 100644 --- a/cde/config/cf/Imake.tmpl +++ b/cde/config/cf/Imake.tmpl @@ -241,11 +241,7 @@ XCOMM the platform-specific parameters - edit site.def to change #define HasFortran NO #endif #ifndef HasCplusplus -#if HasGcc2ForCplusplus #define HasCplusplus YES -#else -#define HasCplusplus NO -#endif #endif #ifndef HasNdbm #define HasNdbm NO diff --git a/cde/config/cf/Motif.tmpl b/cde/config/cf/Motif.tmpl index 6873de638..abde63c60 100644 --- a/cde/config/cf/Motif.tmpl +++ b/cde/config/cf/Motif.tmpl @@ -442,12 +442,17 @@ TOP_MOTIF_INCLUDES = -I$(MINCLUDESRC) /* MTOOLKITSRC should be removed */ MTOOLKITSRC = $(TOOLKITSRC) #if ImportMotif || UseInstalledMotif - MINCLUDESRC = $(MTOP)/include MDOCSRC = $(MTOP)/doc MLOCSRC = $(MTOP)/localized #else - MINCLUDESRC = $(MTOP)/exports/include MLOCSRC = $(MTOP)/exports/localized +#endif +#if defined(TopMotifInclude) + MINCLUDESRC = TopMotifInclude +#elif ImportMotif || UseInstalledMotif + MINCLUDESRC = $(MTOP)/include +#else + MINCLUDESRC = $(MTOP)/exports/include #endif MLIBSRC = $(MTOP)/lib MCLIENTSRC = $(MTOP)/clients diff --git a/cde/config/cf/OpenBSD.cf b/cde/config/cf/OpenBSD.cf new file mode 100644 index 000000000..f0ba631eb --- /dev/null +++ b/cde/config/cf/OpenBSD.cf @@ -0,0 +1,1032 @@ +XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.100 2004/01/08 22:51:41 herrb Exp $ +XCOMM $XdotOrg: xc/config/cf/OpenBSD.cf,v 1.11 2005/06/15 20:03:51 idr Exp $ +XCOMM + +#ifndef OSName +#define OSName DefaultOSName OSBinaryType +#endif +#ifndef OSMajorVersion +#define OSMajorVersion DefaultOSMajorVersion +#endif +#ifndef OSMinorVersion +#define OSMinorVersion DefaultOSMinorVersion +#endif +#ifndef OSTeenyVersion +#define OSTeenyVersion DefaultOSTeenyVersion +#endif + +#ifndef OSVendor +#define OSVendor /**/ +#endif +XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) + +#ifdef Ports + +#define BinDir /usr/local/bin +#define LibDir /usr/local/lib/X11 +#define UsrLibDir /usr/local/lib +#define ManDirectoryRoot /usr/local/man +#define FontDir /usr/local/lib/X11/fonts +#define FontEncDir /usr/local/lib/X11/fonts/encodings +#define LdPreLib -L/usr/X11R6/lib -L/usr/local/lib +#define XpmLibDir /usr/X11R6/lib +#define XpmIncDir /usr/X11R6/include +#define ConfigDir /usr/X11R6/lib/X11/config +#define IncRoot /usr/local/include +#define TopXInclude -I/usr/X11R6/include +#define ImakeCmd imake -DPorts +#define DocDir /usr/local/share/doc +#define BuildHtmlManPages NO + +#endif + +/* + * C library features + */ +#define HasPoll YES +#define HasNdbm YES +#define HasPutenv YES +#define HasSnprintf YES +#if OSMajorVersion == 2 && OSMinorVersion >= 4 || OSMajorVersion >= 3 +# define HasStrlcat YES +#endif +#define HasBSD44Sockets YES +#define Malloc0ReturnsNull NO +#define SetTtyGroup YES +#define DBMLibrary /**/ +#define HasLibCrypt NO +#define HasShm YES +#define HasWChar32 YES +#define HasMkstemp YES +#define HasSetProcTitle YES +#define HasZlib YES +#ifndef HasLibpng +# define HasLibpng NO +#endif +#ifndef HasKrbIV +# if OSMajorVersion == 2 || OSMajorVersion == 3 && OSMinorVersion < 3 +# define HasKrbIV YES +# if OSMajorVersion == 2 && OSMinorVersion <= 8 +# define KrbIVLibraries -lkrb -lkafs -ldes +# endif +# else + /* Kerberos IV was removed after OpenBSD 3.3 */ +# define HasKrbIV NO +# endif +#endif +#define HasUsableFileMmap YES +#define HasShadowPasswd NO +#define IPv6SocketsAlsoIPv4 NO + +#define HasArc4Random YES + +#define HasNCurses YES +#define NCursesLibName -lcurses +#if defined(TermcapLibrary) +#undef TermcapLibrary +#endif +#define TermcapLibrary -lcurses + +#define HasVarRun YES +#define HasVarDb YES +#define VarLibDir VarDbDirectory + +#define InstallXloadSetGID NO + +#ifndef HasIssetugid +# if (OSMajorVersion >= 2) +# define HasIssetugid YES +# endif +#endif + +#ifndef HasMktemp +# if (OSMajorVersion > 2) || (OSMajorVersion == 2 && OSMinorVersion >= 1) +# define HasMktemp YES +# else +# define HasMktemp NO +# endif +#endif + +/* OpenBSD >= 2.7 has getifaddrs() */ +#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 7) +#define HasGetIfAddrs YES +#endif + +/* OpenBSD >= 2.8 has setusercontext() */ +#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 7) +#define HasSetUserContext YES +#endif + +/* OpenBSD after 2.9 has BSD authentication */ +#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 9) +# define HasBSDAuth YES +#endif + +/* OpenBSD 3.0 and later has getpeereid() */ +#if OSMajorVersion >= 3 +# define HasGetpeereid YES +#endif + +/* OpenBSD 3.0 has APM with kqueue interface */ +#if OSMajorVersion >= 3 +# define HasApmKqueue YES +#endif + +/* OpenBSD 3.0 has libusb, next versions have libusbhid */ +#if OSMajorVersion >= 3 +# define HasLibUsb YES +# ifndef HasLibUsbHid +# if OSMajorVersion == 3 && OSMinorVersion > 0 || OSMajorVersion > 3 +# define HasLibUsbHid YES +# define UsbHidLib -lusbhid +# else +# define HasLibUsbHid NO +# define UsbHidLib -lusb +# endif +# endif +#endif + +/* + * Compiler Features + */ +#define GccUsesGas YES +#define UseGas YES +#define GnuCpp YES + +#define UseGnuMalloc NO + +#define NeedConstPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedNestedPrototypes YES +#define NeedVarargsPrototypes YES +#define NeedWidePrototypes NO + +#define MkdirHierCmd mkdir -p + +#ifndef CppCmd +#define CppCmd /usr/libexec/cpp -traditional +#endif +#define StandardCppOptions -traditional +#define StandardCppDefines /**/ +#define PreProcessCmd CppCmd +#define PreIncDir DefaultGccIncludeDir + +#ifndef CcCmd +#define CcCmd cc +#endif +#ifndef AsCmd +#define AsCmd cc -c -x assembler +#endif +#ifndef DefaultCCOptions +#if defined(UseInstalled) + /* conform to OpenBSD's habits */ +# define DefaultCCOptions $(COPTS) +#else +# ifdef PpcArchitecture +# define DefaultCCOptions -pipe -fsigned-char GccWarningOptions +# else +# define DefaultCCOptions -pipe GccWarningOptions +# endif +#endif +#endif + +#define GccGasOption -DGCCUSESGAS +#define AsmDefines -DUSE_GAS + +/* UseElfFormat defaults to YES if __ELF__ set */ +#ifndef UseElfFormat +# ifdef __ELF__ +# undef __ELF__ /* other imake files shouldn't care */ +# define UseElfFormat YES +# else +# define UseElfFormat NO +# endif +#endif + +/* + * Increment shared libraries major numbers if using Gcc Stack Protector + * (This introduces an ABI change) + */ +#ifndef OverrideShlibRevs +# define OverrideShlibRevs ProPoliceSupport +#endif + +#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC + + +#define AdmDir /var/log + +#define HasFlex YES + +/* OpenBSD doesn't have gperf in the base install */ +#define DontRebuildGperfOutput YES + +/* + * Make & install Features + */ + +#define HasBsdMake YES + +#define BuildCyrillicFonts YES +#define GzipFontCompression YES +#define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR) +#define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR) + +#define InstUidFlags -m 4755 + +#ifdef InstallCmd +# undef InstallCmd +# define InstallCmd /usr/bin/install +#endif + +#ifndef ExtraFilesToClean +# define ExtraFilesToClean *.core +#endif + +/* + * Documentation formatting + */ +#ifdef Ports +# define NroffCmd /usr/local/bin/nroff -Tascii -c +# define TroffCmd /usr/local/bin/nroff -Tps +# define HTMLroffCmd /usr/local/bin/nroff -Thtml +# define NeqnCmd /usr/local/bin/neqn -Tascii +# define EqnCmd /usr/local/bin/eqn -Tps +# define TblCmd /usr/local/bin/tbl +#else +# define NroffCmd mandoc +# define TroffCmd mandoc -Tps +# define HTMLroffCmd mandoc -Thtml +# define NeqnCmd cat +# define EqnCmd cat +# define TblCmd cat +#endif + +#define HasGroff YES + +#ifndef HasCookieMaker +# define HasCookieMaker YES +# define MkCookieCmd \ + 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"' +#endif + + +/* + * Man pages need to be formatted when installed, so override the default + * imake rules. + */ +#define ManSuffix 1 +#define FileManSuffix 5 + +#ifdef Ports + +#define ManSourcePath $(MANPATH)/cat + +#define InstallManPageLongBase(file,destdir,dest) @@\ +all:: file.0 @@\ + @@\ +file.0:: file.$(MANNEWSUFFIX) @@\ + @if [ -f file.$(MANNEWSUFFIX) ]; \ @@\ + then \ @@\ + cat file.$(MANNEWSUFFIX) | $(NEQN) | $(TBL) | \ @@\ + $(NROFF) $(MANMACROS) | $(COL) > file.0; \ @@\ + fi @@\ + @@\ +install.man:: @@\ + MakeDir($(DESTDIR)destdir) @@\ + -@if [ -f file.0 ]; \ @@\ + then \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/dest.0; \@@\ + fi @@\ + @@\ +clean:: @@\ + RemoveFile(file.0) + +#define InstallManPageLong(file,destdir,dest) @@\ +BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\ + @@\ +CppManTarget(file, $(EXTRAMANDEFS)) @@\ + @@\ +InstallManPageLongBase(file,destdir,dest) + +#define InstallGenManPageLong(file,destdir,dest,suffix) @@\ +BuildInstallHtmlManPage(file,dest,suffix) @@\ + @@\ +CppManTarget(file, $(EXTRAMANDEFS)) @@\ + @@\ +InstallManPageLongBase(file,destdir,dest) + +#define InstallMultipleMan(list,dest) @@\ +install.man:: @@\ + MakeDir($(DESTDIR)dest) @@\ + case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in list; do \ @@\ + (MNAME=`echo $$i | cut -f1 -d.`; \ @@\ + set -x; \ @@\ + cat $$i | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\ + | $(COL) > $${MNAME}.0; \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) $${MNAME}.0 \ @@\ + $(DESTDIR)dest/$${MNAME}.0; \ @@\ + $(RM) $${MNAME}.0); \ @@\ + done + +#define InstallMultipleManSuffix(list,dest,suff) @@\ +install.man:: @@\ + MakeDir($(DESTDIR)dest) @@\ + case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in list; do \ @@\ + (set -x; \ @@\ + cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\ + | $(COL) > $$i.0; \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) $$i.0 \ @@\ + $(DESTDIR)dest/$$i.0; \ @@\ + $(RM) $$i.0 ); \ @@\ + done + +#define InstallManPageAliasesBase(file,destdir,aliases) @@\ +install.man:: @@\ + @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in aliases; do \ @@\ + (set -x; \ @@\ + $(RM) $(DESTDIR)destdir/$$i.0;\ @@\ + (cd $(DESTDIR)/destdir; $(LN) file.0 $$i.0);\ @@\ + ); \ @@\ + done + +#else /* Ports */ + +#define InstallManPageAliasesBase(file,destdir,aliases) @@\ +install.man:: @@\ + @SUFFIX=${MANSUFFIX}; \ @@\ + for i in aliases; do \ @@\ + (set -x; \ @@\ + $(RM) $(DESTDIR)destdir/$$i.*; \ @@\ + (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\ + $$i.$${SUFFIX})); \ @@\ + done + +#endif /* Ports */ + +#define InstallManPageAliases(file,destdir,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\ + @@\ +InstallManPageAliasesBase(file,destdir,aliases) + +#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,suffix) @@\ + @@\ +InstallManPageAliasesBase(file,destdir,aliases) + + +/* + * InstallFontAliases - generate rules to install font aliases + * databases without comments for X11R5 servers + */ +#ifndef InstallFontAliasesNoComment +#define InstallFontAliasesNoComment(dest) @@\ +install:: fonts.alias @@\ + $(RM) _fonts.alias @@\ + sed -e '/^!/d' -e '/^$$/d' < fonts.alias > _fonts.alias @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTALLDATFLAGS) _fonts.alias \ @@\ + $(DESTDIR)dest/fonts.alias @@\ + $(RM) _fonts.alias +#endif /* InstallFontAliasesNoComment */ + +/* + * OpenBSD specific Imake Config files + */ +#ifndef LocalConfigFiles +#define LocalConfigFiles \ + OpenBSDLib.rules OpenBSDLib.tmpl +#endif + +/* + * Architecture specific sections - put all architecture dependent + * options and setting here into the correct section + */ + + +/* + * Definitions for the alpha architecture + */ +#ifdef AlphaArchitecture + +# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3 +# define HasWeakSymbols YES +# endif + +/* XXX Xvfb currently causes a linker error: */ +/* XXX crtbegin.c(.fini+0x10): relocation truncated to fit: BRADDR text */ +# ifdef XVirtualFramebufferServer +# undef XVirtualFramebufferServer +# endif +# define XVirtualFramebufferServer NO +# ifdef XnestServer +# undef XnestServer +# endif +# define XnestServer NO + +# if (OSMajorVersion < 3) +# define HasSharedLibraries NO +# endif + +# ifndef XorgServer +# if OSMajorVersion == 3 && OSMinorVersion >= 2 || OSMajorVersion > 3 +# define XorgServer YES +# else +# define XorgServer NO +# endif +# endif + +/* Definitions for building the XFree86 server */ +# if XorgServer +# ifndef HasNetBSDApertureDriver +# define HasNetBSDApertureDriver YES +# endif +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT +# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines +# define ServerExtraSysLibs -lalpha +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86OSCardDrivers wsfb +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT +# endif +# define UseMatroxHal NO /* Matrox HAL is i386 only */ + +# endif /* XorgServer */ + +# include + +#endif /* AlphaArchitecture */ + +/* + * Definitions for the AMD64 architecture + */ +#ifdef AMD64Architecture + +# define HasWeakSymbols YES + +# define XorgServer YES + +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif + +# ifndef HasNetBSDApertureDriver +# define HasNetBSDApertureDriver YES +# endif + +# define HasAgpGart YES + +# define ServerExtraSysLibs -lamd64 +# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines + +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT +# endif + +# ifndef HasMMXSupport +# define HasMMXSupport YES +# endif + +# ifndef HasX86Support +# define HasX86Support YES +# endif +/* # include */ + +#endif /* AMD64Architecture */ + +/* + * Definitions for the i386 architecture + */ +#ifdef i386Architecture + +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif + +/* Direct rendering (OpenBSD 3.3 and up). */ +# if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 2) +# ifndef BuildXF86DRI +# define BuildXF86DRI NO +# endif +# endif + +# define HasWeakSymbols YES + +/* To use the NetBSD Aperture driver */ +# ifndef HasNetBSDApertureDriver +# define HasNetBSDApertureDriver YES +# endif + +/* 2.7 and later have support for setting MTRRs */ +# ifndef HasMTRRSupport +# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 6) +# define HasMTRRSupport YES +# else +# define HasMTRRSupport NO +# endif +# endif + +/* + * agpgart support (OpenBSD 3.2 and up) + */ +# if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 1) +# ifndef HasAgpGart +# define HasAgpGart YES +# endif +# endif + + +# ifndef DefaultGcc2i386Opt +# if (OSMajorVersion == 2 && OSMinorVersion >= 3) || OSMajorVersion > 2 + /* The GCC strength-reduce bug is fixed for OpenBSD 2.3 and later */ +# define DefaultGcc2i386Opt -O2 GccAliasingArgs +# endif +# endif +# define OptimizedCDebugFlags DefaultGcc2i386Opt +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraSysLibs -li386 +# define LdPostLib /**/ +# define ServerExtraDefines GccGasOption XFree86ServerDefines +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT +# endif + +# define JoystickSupport NO + +/* A hack to work around an optimization problem with gcc 2.95.2 */ +# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 6) +# define GccOptBug295 +# endif + +/* No MMX support in OpenBSD/a.out gas */ +# ifndef HasMMXSupport +# define HasMMXSupport UseElfFormat +# endif + +/* for DRI */ +# ifndef HasX86Support +# define HasX86Support UseElfFormat +# endif + +# include + +#endif /* i386Architecture */ + + +/* + * Definitions for the m68k architecture (currently amiga, hp300, + * mac68k, mvme68k, sun3) + */ +#ifdef Mc68020Architecture + +/* + * Function CSE makes gas -k not recognize external function calls as lazily + * resolvable symbols, thus sometimes making ld.so report undefined symbol + * errors on symbols found in shared library members that would never be + * called. Ask niklas@openbsd.org for details. + */ + +# define PositionIndependentCFlags -fpic -fno-function-cse +# define BuildGlxExt NO +# define BuildGLXLibrary YES + +#endif /* Mc68020Architecture */ + + +/* + * Definitions for the amiga architecture + */ +#ifdef AmigaArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +# define ServerExtraDefines -DXFree86Server + +# include + +#endif /* AmigaArchitecture */ + + +/* + * Definitions for the hp300 architecture + */ +#ifdef Hp300Architecture + +# ifndef BuildServer +# define BuildServer NO +# endif +/* For the X11R5 server */ +# define CompressAllFonts NO +# define InstallFontAliases InstallFontAliasesNoComment +# define UseRgbTxt NO +# define UseRgb YES + +# define ServerExtraDefines -DXFree86Server + +#include + +#endif /* Hp300Architecture */ + + +/* + * Definitions for the mac68k architecture + */ +#ifdef Mac68kArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +# define ServerExtraDefines -DXFree86Server + +# include + +#endif /* mac68kArchitecture */ + + +/* + * Definitions for the mvme68k architecture + */ +#ifdef Mvme68kArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +# define ServerExtraDefines -DXFree86Server + +# include + +#endif /* Mvme68kArchitecture */ + + +/* + * Definitions for the sun3 architecture + */ +#ifdef Sun3Architecture + +# include + +# define ServerOSDefines -DDDXOSINIT +# define BootstrapCFlags -Dsun3 +# define UnalignedReferencesAllowed YES /* changes _XtCopyArgs() */ +# define ServerExtraDefines GccGasOption -Dmc68000 -Dmc68020 \ + -DXFree86Server -DINCLUDE_CG2_HEADER + +# ifndef Xsun24Server +# define Xsun24Server NO +# endif +# ifndef XsunServer +# define XsunServer YES +# endif +# ifndef XsunMonoServer +# define XsunMonoServer NO +# endif + +#define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT + +#endif /* Sun3Architecture */ + + +/* + * Definitions for the mips architecture (currently sgi) + */ +#ifdef MipsArchitecture + +# define HasWeakSymbols YES + +# define XorgServer YES + +# if XorgServer +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86CardDrivers wsfb +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# endif + +# include + +#endif /* MipsArchitecture */ + + +/* + * Definitions for the PowerPC architecture + */ +#ifdef PpcArchitecture + +# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# endif + +# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3 +# define HasWeakSymbols YES +# endif +# ifndef GccWarningOptions +# if defined(XFree86Devel) && XFree86Devel +# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \ + -Wmissing-prototypes -Wmissing-declarations \ + -Wnested-externs +# else +# define GccWarningOptions -Wall -Wpointer-arith +# endif +# endif + +# ifndef XorgServer +# define XorgServer YES +# endif + +/* Definitions for building the X server */ +# if XorgServer +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT +# define ServerExtraDefines GccGasOption XFree86ServerDefines +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86OSCardDrivers wsfb +# ifndef XF86CardDrivers +# define XF86CardDrivers ati mga glint s3virge sis savage\ + trident chips tdfx \ + DevelDrivers vga \ + XF86OSCardDrivers XF86ExtraCardDrivers +# endif +# ifndef DevelDrivers +# define DevelDrivers nv +# endif + +# endif /* XorgServer */ + +# include + +#endif /* PpcArchitecture */ + +/* + * Definitions for the sparc architecture + */ +#ifdef SparcArchitecture + +# define BuildXF86MiscExt NO +# define BuildMITMiscExt NO + +# if OSMajorVersion > 3 || OSMajorVersion == 3 && OSMinorVersion >= 2 +# define HasWeakSymbols YES +#endif + +# if OSMajorVersion == 2 || OSMajorVersion == 3 && OSMinorVersion < 2 +# define ServerOSDefines -DDDXOSINIT +# define ServerExtraDefines -DAVOID_GLYPHBLT -DPIXPRIV -DXFree86Server \ + DebugDefines -DINCLUDE_CG2_HEADER \ + -DX_BYTE_ORDER=$(X_BYTE_ORDER) +# define XOrgServer NO +# else +# define XorgServer YES +# endif + +# if !XorgServer + +# ifndef Xsun24Server +# define Xsun24Server YES +# endif +# ifndef XsunServer +# define XsunServer YES +# endif +# ifndef XsunMonoServer +# define XsunMonoServer YES +# endif +# ifndef InstallXserverSetUID +# define InstallXserverSetUID NO +# endif + +# else /* XF86Server */ + +# ifndef Xsun24Server +# define Xsun24Server NO +# endif +# ifndef XsunServer +# define XsunServer NO +# endif +# ifndef XsunMonoServer +# define XsunMonoServer NO +# endif +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif + +# define XF86CardDrivers wsfb +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# define BuildXInputExt YES +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT +# define ServerExtraDefines GccGasOption XFree86ServerDefines + +# endif + +# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT + +# define BuildXF86VidModeExt NO +# define BuildXF86DGA NO +# ifndef BuildXInputExt +# define BuildXInputExt NO +# endif +# include + +#endif /* SparcArchitecture */ + +/* + * Definitions for the sparc64 architecture + */ + +#ifdef Sparc64Architecture + +# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3 +# define HasWeakSymbols YES +# endif + +# ifndef XorgServer +# define XorgServer YES +# endif + +# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT +# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT + +# if XorgServer +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86OSCardDrivers wsfb +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# endif + +# include + +#endif /* Sparc64Architecture */ + +/* + * Definitions for the vax architecture + */ +#ifdef VaxArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +/* For the X11R5 server */ +# define CompressAllFonts NO +# define InstallFontAliases InstallFontAliasesNoComment +# define UseRgbTxt NO +# define UseRgb YES + +# define ServerExtraDefines -DXFree86Server +# define UnalignedReferencesAllowed YES +# define HasSharedLibraries NO +# define HasDlopen NO + +# define BuildGlxExt NO +# define BuildGLXLibrary NO + +# include + +#endif /* VaxArchitecture */ + +/* End or architecture specific section */ + +/* + * Generic settings for all architectures + * which can be overridden by architecture specific sections above + */ + +#ifndef StandardDefines +# define StandardDefines -DCSRG_BASED +#endif + +#if !defined(OptimizedCDebugFlags) +# define OptimizedCDebugFlags -O2 +#endif + +#ifndef ServerOSDefines +# define ServerOSDefines /**/ +#endif + +#ifndef ServerExtraDefines +# define ServerExtraDefines GccGasOption +#endif + +#ifndef HasWeakSymbols +# define HasWeakSymbols NO +#endif + +/* + * Multi-thread safe libs + */ +/* #if HasWeakSymbols == YES && (OSMajorVersion == 2 && OSMinorVersion >= 6 || OSMajorVersion >= 3) +# define HasPosixThreads YES +# define ThreadedX YES +# define NeedUIThrStubs YES +# define ThreadsCompileFlag -pthread +# define ThreadsLibraries -pthread +# define SystemMTDefines -D_REENTRANT +#else */ +# define ThreadedX NO +/* #endif */ + + +/* Set this to YES when getpwuid_r is added to libc_r */ +#define HasThreadSafeAPI NO + +#ifndef ExtraLibraries +# define ExtraLibraries /**/ +#endif + +#ifndef DoLoadableServer +#define DoLoadableServer NO +#endif + +#ifndef XVirtualFramebufferServer +# undef BuildServer +# define BuildServer YES +# define XVirtualFramebufferServer YES +#endif + +#ifndef XnestServer +# undef BuildServer +# define BuildServer YES +# define XnestServer YES +#endif + +#ifndef BuildScreenSaverLibrary +# define BuildScreenSaverLibrary YES +#endif + +#ifndef CompressAllFonts +# define CompressAllFonts YES +#endif + +#ifndef SharedLibXdmGreet +# define SharedLibXdmGreet NO +#endif + +#define HasFreetype2 NO +#define HasExpat NO +#define BuildXterm BuildClients + +/* + * XFree86 uses its own (more portable) database routines to speed up + * the RGB database lookups + * However, if you want to use ndbm anyway, you can set that to NO in + * host.def + */ +#ifndef UseRgbTxt +# define UseRgbTxt YES +#endif + +#ifndef OSBinaryType +# if UseElfFormat +# define OSBinaryType [ELF] +# else +# define OSBinaryType /**/ +# endif +#endif + +#ifndef HasDlopen +# define HasDlopen YES +#endif + +#ifndef DlLibrary +# if UseElfFormat +# if (OSMajorVersion < 3 || OSMajorVersion == 3 && OSMinorVersion == 0) +# define DlLibrary -ldl +# else +# define DlLibrary -Wl,--export-dynamic +# endif +# else +# define DlLibrary /**/ +# endif +#endif + +#if !defined(GccWarningOptions) +# define GccWarningOptions -Wall -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch +#endif + +#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB) +#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB) + +#define CplusplusLibC -lstdc++ + +#define ArchitectureDefines -DOPENBSD_ARCHITECTURE + +#define BuildLibPathVar LD_LIBRARY_PATH + +#ifndef RandomMotifMessageCatalogRule +#define RandomMotifMessageCatalogRule(target) +#endif + +/* This must come last */ +#include diff --git a/cde/config/cf/bsdLib.rules b/cde/config/cf/bsdLib.rules index 8c052221d..0d18ecac2 100644 --- a/cde/config/cf/bsdLib.rules +++ b/cde/config/cf/bsdLib.rules @@ -33,8 +33,8 @@ XCOMM $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $ #define InstallSharedLibrary(libname,rev,dest) @@\ install:: Concat(lib,libname.so.rev) @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest -@@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so) #endif /* InstallSharedLibrary */ @@ -52,10 +52,13 @@ Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ + $(RM) Concat(lib,libname.so) @@\ + $(LN) $@ Concat(lib,libname.so) @@\ LinkBuildLibrary($@) @@\ + LinkBuildLibrary(Concat(lib,libname.so)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) #endif /* SharedLibraryTarget */ diff --git a/cde/config/cf/bsdLib.tmpl b/cde/config/cf/bsdLib.tmpl index 1c1d610bb..29ff0d659 100644 --- a/cde/config/cf/bsdLib.tmpl +++ b/cde/config/cf/bsdLib.tmpl @@ -13,3 +13,23 @@ XCOMM $XConsortium: bsdLib.tmpl /main/3 1996/09/28 16:09:25 rws $ #ifndef SharedXmuReqs #define SharedXmuReqs $(LDPRELIBS) $(XTOOLONLYLIB) $(XONLYLIB) #endif + +#ifndef SharedXReqs +# define SharedXReqs $(XTOOLLIB) $(XLIB) $(LDPOSTLIBS) +#endif + +#ifndef SharedXmReqs +# define SharedXmReqs $(LDPRELIBS) SharedXReqs -lc +#endif + +#ifndef SharedTtReqs +# define SharedTtReqs $(LDPRELIBS) SharedXReqs $(CXXLIB) +#endif + +#ifndef SharedDtSvcReqs +# define SharedDtSvcReqs $(LDPRELIBS) SharedXReqs $(CXXLIB) +#endif + +#ifndef SharedCsaReqs +# define SharedCsaReqs -lXt $(LDPOSTLIBS) +#endif diff --git a/cde/config/cf/cde.tmpl b/cde/config/cf/cde.tmpl index 5dfa301bd..a627226e4 100644 --- a/cde/config/cf/cde.tmpl +++ b/cde/config/cf/cde.tmpl @@ -35,7 +35,9 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $ # endif #endif +#ifndef CDESharedRev #define CDESharedRev 2.1 +#endif #ifndef SharedLibPam # define SharedLibPam HasSharedLibraries diff --git a/cde/config/cf/linux.cf b/cde/config/cf/linux.cf index b0899bd71..07edc5693 100644 --- a/cde/config/cf/linux.cf +++ b/cde/config/cf/linux.cf @@ -85,8 +85,8 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) #define NeedWidePrototypes NO #define SetTtyGroup YES -#define CcCmd gcc -pipe -#define CplusplusCmd g++ -pipe -fpermissive +#define CcCmd gcc -g -pipe +#define CplusplusCmd g++ -g -pipe -fpermissive #define AsCmd as #define LdCmd ld diff --git a/cde/config/cf/lnxLib.tmpl b/cde/config/cf/lnxLib.tmpl index e44d87d80..1e4a24162 100644 --- a/cde/config/cf/lnxLib.tmpl +++ b/cde/config/cf/lnxLib.tmpl @@ -42,3 +42,6 @@ XMULIB = -lXmu $(XLIB) # define SharedCsaReqs -lXt #endif +#ifndef SharedDtHelpReqs +# define SharedDtHelpReqs -ljpeg +#endif diff --git a/cde/config/cf/site.def b/cde/config/cf/site.def index 2cdc401c4..9404bd935 100644 --- a/cde/config/cf/site.def +++ b/cde/config/cf/site.def @@ -66,13 +66,17 @@ XCOMM site: $TOG: site.def /main/23 1998/03/19 18:43:26 mgreess $ #ifdef AfterVendorCF +#ifndef X11ProjectRoot # if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) # define X11ProjectRoot /usr # else # define X11ProjectRoot /X11 # endif +#endif +#ifndef ProjectRoot # define ProjectRoot /usr/dt +#endif #ifdef SunArchitecture # define DtLocalesToBuild de_DE.ISO8859-1 es_ES.ISO8859-1 fr_FR.ISO8859-1 it_IT.ISO8859-1 diff --git a/cde/config/imake/imake.c b/cde/config/imake/imake.c index 235d791fc..77df8007c 100644 --- a/cde/config/imake/imake.c +++ b/cde/config/imake/imake.c @@ -256,6 +256,7 @@ extern int errno; * are there any X_NOT_STDC_ENV machines left in the world? */ #include +#include #include "imakemdep.h" /* @@ -275,14 +276,14 @@ extern int sys_nerr; #define FALSE 0 #ifdef FIXUP_CPP_WHITESPACE -int InRule = FALSE; +static int InRule = FALSE; # ifdef INLINE_SYNTAX -int InInline = 0; +static int InInline = 0; # endif #endif #ifdef MAGIC_MAKE_VARS -int xvariable = 0; -int xvariables[10]; +static int xvariable = 0; +static int xvariables[10]; #endif /* @@ -291,7 +292,8 @@ int xvariables[10]; * space instead of being deleted. Blech. */ #ifdef FIXUP_CPP_WHITESPACE -void KludgeOutputLine(), KludgeResetRule(); +static void KludgeOutputLine(char **pline); +static void KludgeResetRule(void); #else # define KludgeOutputLine(arg) # define KludgeResetRule() @@ -313,11 +315,11 @@ typedef unsigned char boolean; # endif #endif -char *cpp = NULL; +static char *cpp = NULL; -char *tmpMakefile = "/tmp/Imf.XXXXXX"; -char *tmpImakefile = "/tmp/IIf.XXXXXX"; -char *make_argv[ ARGUMENTS ] = { +static char *tmpMakefile = "/tmp/Imf.XXXXXX"; +static char *tmpImakefile = "/tmp/IIf.XXXXXX"; +static char *make_argv[ ARGUMENTS ] = { #ifdef WIN32 "nmake" #else @@ -325,42 +327,69 @@ char *make_argv[ ARGUMENTS ] = { #endif }; -int make_argindex; -int cpp_argindex; -char *Imakefile = NULL; -char *Makefile = "Makefile"; -char *Template = "Imake.tmpl"; -char *ImakefileC = "Imakefile.c"; -boolean haveImakefileC = FALSE; -char *cleanedImakefile = NULL; -char *program; -char *FindImakefile(); -char *ReadLine(); -char *CleanCppInput(); -char *Strdup(); -char *Emalloc(); -void LogFatalI(), LogFatal(), LogMsg(); +static int make_argindex; +static int cpp_argindex; +static char *Imakefile = NULL; +static char *Makefile = "Makefile"; +static char *Template = "Imake.tmpl"; +static char *ImakefileC = "Imakefile.c"; +static boolean haveImakefileC = FALSE; +static char *cleanedImakefile = NULL; +static char *program; +static boolean verbose = FALSE; +static boolean show = TRUE; -void showit(); -void wrapup(); -void init(); -void AddMakeArg(); -void AddCppArg(); -void SetOpts(); -void CheckImakefileC(); -void cppit(); -void makeit(); -void CleanCppOutput(); -boolean isempty(); -void writetmpfile(); +static char *FindImakefile(char *); +static char *ReadLine(FILE *, const char *); +static char *CleanCppInput(char *); +static char *Strdup(const char *); +static char *Emalloc(int); +static void LogFatal(const char *, ...); +static void LogMsg(const char *, ...); +static void Log(const char *, va_list); -boolean verbose = FALSE; -boolean show = TRUE; +static void showit(FILE *); +static void wrapup(void); +static +#ifdef SIGNALRETURNSINT +int +#else +void +#endif +catch(int); +static void init(void); +static void AddMakeArg(char *); +static void AddCppArg(char *); +static void SetOpts(int, char **); +static void showargs(char **); +static void CheckImakefileC(const char *); +static boolean optional_include(FILE *, const char *, const char *); +static void doit(FILE *, const char *, char **); +#if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \ + defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV)) +static void parse_utsname(struct utsname *, const char *, char *, const char *); +#endif +#if (defined(DEFAULT_OS_MAJOR_REV) || defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV)) +static const char *trim_version(const char *); +#endif +#ifdef linux +static void get_distrib(FILE *); +static void get_libc_version(FILE *); +static void get_ld_version(FILE *); +#endif +#if defined(sun) && defined(__SVR4) +static void get_sun_compiler_versions(FILE *); +#endif +static void get_gcc_incdir(FILE *); +static boolean define_os_defaults(FILE *); +static void cppit(const char *i, const char *, const char *, FILE *, const char *); +static void makeit(void); +static void CleanCppOutput(FILE *, const char *); +static boolean isempty(char *); +static void writetmpfile(FILE *, const char *, int, const char *); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { FILE *tmpfd; char makeMacro[ BUFSIZ ]; @@ -376,7 +405,7 @@ main(argc, argv) tmpMakefile = Makefile; else { tmpMakefile = Strdup(tmpMakefile); - (void) mktemp(tmpMakefile); + mkstemp(tmpMakefile); } AddMakeArg("-f"); AddMakeArg( tmpMakefile ); @@ -397,12 +426,11 @@ main(argc, argv) } else makeit(); wrapup(); - exit(0); + return 0; } -void -showit(fd) - FILE *fd; +static void +showit(FILE *fd) { char buf[ BUFSIZ ]; int red; @@ -414,8 +442,8 @@ showit(fd) LogFatal("Cannot read %s.", tmpMakefile); } -void -wrapup() +static void +wrapup(void) { if (tmpMakefile != Makefile) unlink(tmpMakefile); @@ -425,25 +453,25 @@ wrapup() unlink(ImakefileC); } +static #ifdef SIGNALRETURNSINT int #else void #endif -catch(sig) - int sig; +catch(int sig) { errno = 0; - LogFatalI("Signal %d.", sig); + LogFatal("Signal %d.", sig); } /* * Initialize some variables. */ -void -init() +static void +init(void) { - register char *p; + char *p; make_argindex=0; while (make_argv[ make_argindex ] != NULL) @@ -457,10 +485,9 @@ init() * the default. Or if cpp is not the default. Or if the make * found by the PATH variable is not the default. */ - if (p = getenv("IMAKEINCLUDE")) { + if ((p = getenv("IMAKEINCLUDE"))) { if (*p != '-' || *(p+1) != 'I') - LogFatal("Environment var IMAKEINCLUDE %s", - "must begin with -I"); + LogFatal("Environment var IMAKEINCLUDE %s must begin with -I"); AddCppArg(p); for (; *p; p++) if (*p == ' ') { @@ -468,41 +495,37 @@ init() AddCppArg(p); } } - if (p = getenv("IMAKECPP")) + if ((p = getenv("IMAKECPP"))) cpp = p; - if (p = getenv("IMAKEMAKE")) + if ((p = getenv("IMAKEMAKE"))) make_argv[0] = p; if (signal(SIGINT, SIG_IGN) != SIG_IGN) signal(SIGINT, catch); } -void -AddMakeArg(arg) - char *arg; +static void +AddMakeArg(char *arg) { errno = 0; if (make_argindex >= ARGUMENTS-1) - LogFatal("Out of internal storage.", ""); + LogFatal("Out of internal storage."); make_argv[ make_argindex++ ] = arg; make_argv[ make_argindex ] = NULL; } -void -AddCppArg(arg) - char *arg; +static void +AddCppArg(char *arg) { errno = 0; if (cpp_argindex >= ARGUMENTS-1) - LogFatal("Out of internal storage.", ""); + LogFatal("Out of internal storage."); cpp_argv[ cpp_argindex++ ] = arg; cpp_argv[ cpp_argindex ] = NULL; } -void -SetOpts(argc, argv) - int argc; - char **argv; +static void +SetOpts(int argc, char **argv) { errno = 0; /* @@ -523,7 +546,7 @@ SetOpts(argc, argv) else { argc--, argv++; if (! argc) - LogFatal("No description arg after -f flag", ""); + LogFatal("No description arg after -f flag"); Imakefile = argv[0]; } } else if (argv[0][1] == 's') { @@ -533,7 +556,7 @@ SetOpts(argc, argv) else { argc--, argv++; if (!argc) - LogFatal("No description arg after -s flag", ""); + LogFatal("No description arg after -s flag"); Makefile = ((argv[0][0] == '-') && !argv[0][1]) ? NULL : argv[0]; } @@ -547,7 +570,7 @@ SetOpts(argc, argv) else { argc--, argv++; if (! argc) - LogFatal("No description arg after -T flag", ""); + LogFatal("No description arg after -T flag"); Template = argv[0]; } } else if (argv[0][1] == 'C') { @@ -556,7 +579,7 @@ SetOpts(argc, argv) else { argc--, argv++; if (! argc) - LogFatal("No imakeCfile arg after -C flag", ""); + LogFatal("No imakeCfile arg after -C flag"); ImakefileC = argv[0]; } } else if (argv[0][1] == 'v') { @@ -580,9 +603,8 @@ SetOpts(argc, argv) AddCppArg(ImakefileC); } -char * -FindImakefile(Imakefile) - char *Imakefile; +static char * +FindImakefile(char *Imakefile) { if (Imakefile) { if (access(Imakefile, R_OK) < 0) @@ -590,7 +612,7 @@ FindImakefile(Imakefile) } else { if (access("Imakefile", R_OK) < 0) if (access("imakefile", R_OK) < 0) - LogFatal("No description file.", ""); + LogFatal("No description file."); else Imakefile = "imakefile"; else @@ -599,49 +621,54 @@ FindImakefile(Imakefile) return(Imakefile); } -void -LogFatalI(s, i) - char *s; - int i; +static void +LogFatal(const char *s, ...) { - /*NOSTRICT*/ - LogFatal(s, (char *)i); + static boolean entered = FALSE; + va_list args; + + if (entered) + return; + + entered = TRUE; + + va_start(args, s); + Log(s, args); + va_end(args); + + fprintf(stderr, "Stop.\n"); + + wrapup(); + + exit(1); } -void -LogFatal(x0,x1) - char *x0, *x1; +static void +LogMsg(const char *s, ...) { - static boolean entered = FALSE; + va_list args; - if (entered) - return; - entered = TRUE; - - LogMsg(x0, x1); - fprintf(stderr, " Stop.\n"); - wrapup(); - exit(1); + va_start(args, s); + Log(s, args); + va_end(args); } -void -LogMsg(x0,x1) - char *x0, *x1; +static void +Log(const char *s, va_list args) { - int error_number = errno; + int error_number = errno; - if (error_number) { - fprintf(stderr, "%s: ", program); - fprintf(stderr, "%s\n", strerror(error_number)); - } - fprintf(stderr, "%s: ", program); - fprintf(stderr, x0, x1); - fprintf(stderr, "\n"); + if (error_number) { + fprintf(stderr, "%s: ", program); + fprintf(stderr, "%s\n", strerror(error_number)); + } + fprintf(stderr, "%s: ", program); + vfprintf(stderr, s, args); + fprintf(stderr, "\n"); } -void -showargs(argv) - char **argv; +static void +showargs(char **argv) { for (; *argv; argv++) fprintf(stderr, "%s ", *argv); @@ -650,9 +677,8 @@ showargs(argv) #define ImakefileCHeader "/* imake - temporary file */" -void -CheckImakefileC(masterc) - char *masterc; +static void +CheckImakefileC(const char *masterc) { char mkcbuf[1024]; FILE *inFile; @@ -678,11 +704,8 @@ CheckImakefileC(masterc) #define ImakeTmplSym "IMAKE_TEMPLATE" #define OverrideWarning "Warning: local file \"%s\" overrides global macros." -boolean -optional_include(inFile, defsym, fname) - FILE *inFile; - char *defsym; - char *fname; +static boolean +optional_include(FILE *inFile, const char *defsym, const char *fname) { errno = 0; if (access(fname, R_OK) == 0) { @@ -693,11 +716,8 @@ optional_include(inFile, defsym, fname) return FALSE; } -void -doit(outfd, cmd, argv) - FILE *outfd; - char *cmd; - char **argv; +static void +doit(FILE *outfd, const char *cmd, char **argv) { int pid; waitType status; @@ -712,18 +732,18 @@ doit(outfd, cmd, argv) if (status < 0) LogFatal("Cannot spawn %s.", cmd); if (status > 0) - LogFatalI("Exit code %d.", status); + LogFatal("Exit code %d.", status); #else pid = fork(); if (pid < 0) - LogFatal("Cannot fork.", ""); + LogFatal("Cannot fork."); if (pid) { /* parent... simply wait */ while (wait(&status) > 0) { errno = 0; if (WIFSIGNALED(status)) - LogFatalI("Signal %d.", waitSig(status)); + LogFatal("Signal %d.", waitSig(status)); if (WIFEXITED(status) && waitCode(status)) - LogFatalI("Exit code %d.", waitCode(status)); + LogFatal("Exit code %d.", waitCode(status)); } } else { /* child... dup and exec cmd */ @@ -738,12 +758,11 @@ doit(outfd, cmd, argv) } #ifndef WIN32 + +#if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \ + defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV)) static void -parse_utsname(name, fmt, result, msg) - struct utsname *name; - char *fmt; - char *result; - char *msg; +parse_utsname(struct utsname *name, const char *fmt, char *result, const char *msg) { char buf[SYS_NMLN * 5 + 1]; char *ptr = buf; @@ -800,21 +819,22 @@ parse_utsname(name, fmt, result, msg) /* Just in case... */ if (strlen(buf) >= sizeof(buf)) - LogFatal("Buffer overflow parsing uname.", ""); + LogFatal("Buffer overflow parsing uname."); /* Parse the buffer. The sscanf() return value is rarely correct. */ *result = '\0'; (void) sscanf(buf, fmt + arg + 1, result); } +#endif /* Trim leading 0's and periods from version names. The 0's cause the number to be interpreted as octal numbers. Some version strings have the potential for different numbers of .'s in them. */ -static char * -trim_version(p) - char *p; +#if (defined(DEFAULT_OS_MAJOR_REV) || defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV)) +static const char * +trim_version(const char *p) { if (p != 0 && *p != '\0') @@ -826,9 +846,11 @@ trim_version(p) } #endif +#endif + #ifdef linux -static void get_distrib(inFile) - FILE* inFile; +static void +get_distrib(FILE *inFile) { struct stat sb; @@ -928,8 +950,8 @@ static const char *libc_c= "}\n" ; -static void get_libc_version(inFile) - FILE* inFile; +static void +get_libc_version(FILE *inFile) { static char* libcso = "/usr/lib/libc.so"; struct stat sb; @@ -991,8 +1013,8 @@ static void get_libc_version(inFile) } } -static void get_ld_version(inFile) - FILE* inFile; +static void +get_ld_version(FILE *inFile) { FILE* ldprog = popen ("ld -v", "r"); char c; @@ -1016,8 +1038,8 @@ static void get_ld_version(inFile) #endif #if defined(sun) && defined(__SVR4) -static void get_sun_compiler_versions (inFile) - FILE* inFile; +static void +get_sun_compiler_versions(FILE *inFile) { char buf[PATH_MAX]; char cmd[PATH_MAX]; @@ -1069,8 +1091,8 @@ static void get_sun_compiler_versions (inFile) } #endif -static void get_gcc_incdir(inFile) - FILE* inFile; +static void +get_gcc_incdir(FILE *inFile) { static char* gcc_path[] = { #ifdef linux @@ -1105,19 +1127,18 @@ static void get_gcc_incdir(inFile) fprintf (inFile, "#define DefaultGccIncludeDir %s\n", buf); } -boolean -define_os_defaults(inFile) - FILE *inFile; +static boolean +define_os_defaults(FILE *inFile) { #ifndef WIN32 #if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \ - defined(DEFAULT_OS_MINOR_REV) || defined(DEFAUL_OS_TEENY_REV)) + defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV)) struct utsname name; char buf[SYS_NMLN * 5 + 1]; /* Obtain the system information. */ if (uname(&name) < 0) - LogFatal("Cannot invoke uname", ""); + LogFatal("Cannot invoke uname"); # ifdef DEFAULT_OS_NAME parse_utsname(&name, DEFAULT_OS_NAME, buf, @@ -1175,13 +1196,8 @@ define_os_defaults(inFile) return FALSE; } -void -cppit(imakefile, template, masterc, outfd, outfname) - char *imakefile; - char *template; - char *masterc; - FILE *outfd; - char *outfname; +static void +cppit(const char *imakefile, const char *template, const char *masterc, FILE *outfd, const char *outfname) { FILE *inFile; @@ -1208,15 +1224,14 @@ cppit(imakefile, template, masterc, outfd, outfname) CleanCppOutput(outfd, outfname); } -void -makeit() +static void +makeit(void) { doit(NULL, make_argv[0], make_argv); } -char * -CleanCppInput(imakefile) - char *imakefile; +static char * +CleanCppInput(char *imakefile) { FILE *outFile = NULL; FILE *inFile; @@ -1271,7 +1286,7 @@ CleanCppInput(imakefile) strcmp(ptoken, "undef")) { if (outFile == NULL) { tmpImakefile = Strdup(tmpImakefile); - (void) mktemp(tmpImakefile); + mkstemp(tmpImakefile); outFile = fopen(tmpImakefile, "w"); if (outFile == NULL) LogFatal("Cannot open %s for write.", @@ -1298,15 +1313,13 @@ CleanCppInput(imakefile) return(imakefile); } -void -CleanCppOutput(tmpfd, tmpfname) - FILE *tmpfd; - char *tmpfname; +static void +CleanCppOutput(FILE *tmpfd, const char *tmpfname) { char *input; int blankline = 0; - while(input = ReadLine(tmpfd, tmpfname)) { + while ((input = ReadLine(tmpfd, tmpfname))) { if (isempty(input)) { if (blankline++) continue; @@ -1334,11 +1347,10 @@ CleanCppOutput(tmpfd, tmpfname) * space from the end of the line. Cpp magic cookies are also thrown away. * "XCOMM" token is transformed to "#". */ -boolean -isempty(line) - register char *line; +static boolean +isempty(char *line) { - register char *pend; + char *pend; /* * Check for lines of the form @@ -1408,14 +1420,12 @@ isempty(line) } /*ARGSUSED*/ -char * -ReadLine(tmpfd, tmpfname) - FILE *tmpfd; - char *tmpfname; +static char * +ReadLine(FILE *tmpfd, const char *tmpfname) { static boolean initialized = FALSE; static char *buf, *pline, *end; - register char *p1, *p2; + char *p1, *p2; if (! initialized) { #ifdef WIN32 @@ -1444,7 +1454,7 @@ ReadLine(tmpfd, tmpfname) tmpfd = freopen(tmpfname, "w+", fp); #endif if (! tmpfd) - LogFatal("cannot reopen %s\n", tmpfname); + LogFatal("cannot reopen %s.", tmpfname); #else /* !SYSV */ ftruncate(fileno(tmpfd), (off_t) 0); #endif /* !SYSV */ @@ -1481,32 +1491,26 @@ ReadLine(tmpfd, tmpfname) return(p2); } -void -writetmpfile(fd, buf, cnt, fname) - FILE *fd; - int cnt; - char *buf; - char *fname; +static void +writetmpfile(FILE *fd, const char *buf, int cnt, const char *fname) { if (fwrite(buf, sizeof(char), cnt, fd) == -1) LogFatal("Cannot write to %s.", fname); } -char * -Emalloc(size) - int size; +static char * +Emalloc(int size) { char *p; if ((p = malloc(size)) == NULL) - LogFatalI("Cannot allocate %d bytes", size); + LogFatal("Cannot allocate %d bytes.", size); return(p); } #ifdef FIXUP_CPP_WHITESPACE -void -KludgeOutputLine(pline) - char **pline; +static void +KludgeOutputLine(char **pline) { char *p = *pline; char quotechar = '\0'; @@ -1588,18 +1592,17 @@ breakfor: } } -void -KludgeResetRule() +static void +KludgeResetRule(void) { InRule = FALSE; } #endif /* FIXUP_CPP_WHITESPACE */ -char * -Strdup(cp) - register char *cp; +static char * +Strdup(const char *cp) { - register char *new = Emalloc(strlen(cp) + 1); + char *new = Emalloc(strlen(cp) + 1); strcpy(new, cp); return new; diff --git a/cde/config/imake/imakemdep.h b/cde/config/imake/imakemdep.h index 2ec32e27b..56f3a0bf2 100644 --- a/cde/config/imake/imakemdep.h +++ b/cde/config/imake/imakemdep.h @@ -188,6 +188,17 @@ in this Software without prior written authorization from The Open Group. #define imake_ccflags "-DNOSTDHDRS" #endif +#ifdef __FreeBSD__ +#include +#if defined(__FreeBSD_version) +#if __FreeBSD_version < 500000 +#define imake_ccflags "-DCPP_IN_LIBEXEC" +#endif +#else +#define imake_ccflags "-DCPP_IN_LIBEXEC" +#endif +#endif + /* this is for OS/2 under EMX. This won't work with DOS */ #if defined(__EMX__) #define imake_ccflags "-DBSD43" @@ -247,7 +258,7 @@ in this Software without prior written authorization from The Open Group. #if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__)) #define DEFAULT_CPP "/usr/ccs/lib/cpp" #endif -#ifdef __bsdi__ +#if defined(__bsdi__) || (defined(__FreeBSD__) && !defined(CPP_IN_LIBEXEC)) #define DEFAULT_CPP "/usr/bin/cpp" #endif #ifdef __uxp__ @@ -259,7 +270,8 @@ in this Software without prior written authorization from The Open Group. #ifdef _CRAY #define DEFAULT_CPP "/lib/pcpp" #endif -#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) \ + || (defined(__FreeBSD__) && defined(CPP_IN_LIBEXEC)) #define DEFAULT_CPP "/usr/libexec/cpp" #endif #if defined(__sgi) && defined(__ANSI_CPP__) @@ -637,6 +649,10 @@ char *cpp_argv[ARGUMENTS] = { # define DEFAULT_OS_MINOR_REV "r %*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]" +# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" +# define DEFAULT_OS_NAME "srm %[^\n]" #endif #else /* else MAKEDEPEND */ diff --git a/cde/config/makedepend/def.h b/cde/config/makedepend/def.h index 85ef815ac..167822264 100644 --- a/cde/config/makedepend/def.h +++ b/cde/config/makedepend/def.h @@ -150,7 +150,7 @@ char *realloc(); char *copy(); char *base_name(); -char *getline(); +char *our_getline(); struct symtab **slookup(); struct symtab **isdefined(); struct symtab **fdefined(); diff --git a/cde/config/makedepend/main.c b/cde/config/makedepend/main.c index 631eded95..ae67ecbde 100644 --- a/cde/config/makedepend/main.c +++ b/cde/config/makedepend/main.c @@ -499,7 +499,7 @@ match(str, list) * Get the next line. We only return lines beginning with '#' since that * is all this program is ever interested in. */ -char *getline(filep) +char *our_getline(filep) register struct filepointer *filep; { register char *p, /* walking pointer */ diff --git a/cde/config/makedepend/parse.c b/cde/config/makedepend/parse.c index bad3fcf80..07153bee5 100644 --- a/cde/config/makedepend/parse.c +++ b/cde/config/makedepend/parse.c @@ -56,7 +56,7 @@ gobble(filep, file, file_red) register char *line; register int type; - while (line = getline(filep)) { + while (line = our_getline(filep)) { switch(type = deftype(line, filep, file_red, file, FALSE)) { case IF: case IFFALSE: @@ -544,7 +544,7 @@ find_includes(filep, file, file_red, recursion, failOK) register int type; boolean recfailOK; - while (line = getline(filep)) { + while (line = our_getline(filep)) { switch(type = deftype(line, filep, file_red, file, TRUE)) { case IF: doif: diff --git a/cde/databases/CDE-FONTS.udb b/cde/databases/CDE-FONTS.udb index c61f1da8e..1cd029b0d 100644 --- a/cde/databases/CDE-FONTS.udb +++ b/cde/databases/CDE-FONTS.udb @@ -1067,3 +1067,27 @@ programs/fontaliases/postscript/ja/prolog.ps #{ dec # install_target = /usr/dt/config/psfonts/zh_TW/prolog.ps #} + + +# +# for OpenBSD +# +programs/fontaliases/linux/C/fonts.alias +{ openbsd + install_target = /usr/local/dt/config/xfonts/C/fonts.alias +} +# +programs/fontaliases/linux/C/fonts.dir +{ openbsd + install_target = /usr/local/dt/config/xfonts/C/fonts.dir +} +# +programs/fontaliases/linux/ja_JP/fonts.alias +{ openbsd + install_target = /usr/local/dt/config/xfonts/ja_JP/fonts.alias +} +# +programs/fontaliases/linux/ja_JP/fonts.dir +{ openbsd + install_target = /usr/local/dt/config/xfonts/ja_JP/fonts.dir +} diff --git a/cde/databases/CDE-SHLIBS.src b/cde/databases/CDE-SHLIBS.src index e3e07ed5a..a9db7f8f6 100644 --- a/cde/databases/CDE-SHLIBS.src +++ b/cde/databases/CDE-SHLIBS.src @@ -1223,3 +1223,75 @@ XCOMM install_target = /usr/shlib/libDtMmdb.so type = sym_link } + + +XCOMM +XCOMM +XCOMM >>----------------------------- +XCOMM openbsd libraries +XCOMM <<----------------------------- +XCOMM + +XCOMM +lib/DtHelp/libDtHelp.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtHelp.so.0.0 + mode = 0755 +} +XCOMM +lib/DtPrint/libDtPrint.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtPrint.so.0.0 + mode = 0755 +} +XCOMM +lib/DtMrm/libDtMrm.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtMrm.so.0.0 + mode = 0755 +} +XCOMM +lib/DtSvc/libDtSvc.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtSvc.so.0.0 + mode = 0755 +} +XCOMM +lib/DtWidget/libDtWidget.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtWidget.so.0.0 + mode = 0755 +} +XCOMM +lib/DtTerm/libDtTerm.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtTerm.so.0.0 + mode = 0755 +} +XCOMM +lib/tt/lib/libtt.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libtt.so.0.0 + mode = 0755 +} +XCOMM +lib/csa/libcsa.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libcsa.so.0.0 + mode = 0755 +} +XCOMM +lib/DtSearch/libDtSearch.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtSearch.so.0.0 + mode = 0755 +} +#if 0 /* JET - not for openbsd (yet) */ +XCOMM +lib/DtMmdb/libDtMmdb.so.0.0 +{ openbsd + install_target = /usr/local/dt/lib/libDtMmdb.so.0.0 + mode = 0755 +} +XCOMM +#endif diff --git a/cde/databases/Imakefile b/cde/databases/Imakefile index 79f539f7a..2db62e42e 100644 --- a/cde/databases/Imakefile +++ b/cde/databases/Imakefile @@ -27,6 +27,9 @@ UDB_RELEASE_OPT = -ReleaseStream uxp #ifdef LinuxArchitecture UDB_RELEASE_OPT = -ReleaseStream linux #endif +#ifdef OpenBSDArchitecture +UDB_RELEASE_OPT = -ReleaseStream openbsd +#endif /* * Insure that symbols used in the .udb files are undefined for diff --git a/cde/doc/C/Imakefile b/cde/doc/C/Imakefile index ff8e50c7e..4595a26a3 100644 --- a/cde/doc/C/Imakefile +++ b/cde/doc/C/Imakefile @@ -3,7 +3,7 @@ XCOMM $XConsortium: Imakefile /main/10 1996/07/23 22:00:00 rws $ #define PassCDebugFlags /* due to split-VOB setup, force help to come last in make Makefiles */ -#if defined(LinuxArchitecture) +#if defined(LinuxArchitecture) || defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) XCOMM we cannot build guides on linux yet SUBDIRS = man help BSUBDIRS = help man diff --git a/cde/doc/ja_JP.dt-eucJP/Imakefile b/cde/doc/ja_JP.dt-eucJP/Imakefile index 742811e2e..c775b2cfa 100644 --- a/cde/doc/ja_JP.dt-eucJP/Imakefile +++ b/cde/doc/ja_JP.dt-eucJP/Imakefile @@ -3,7 +3,7 @@ XCOMM $TOG: Imakefile /main/5 1997/03/05 11:10:37 damon $ #define PassCDebugFlags /* due to split-VOB setup, force help to come last in make Makefiles */ -#if defined(LinuxArchitecture) +#if defined(LinuxArchitecture) || defined(OpenBSDArchitecture) XCOMM we cannot build guides on linux yet SUBDIRS = help BSUBDIRS = help diff --git a/cde/BUGREPORT b/cde/historical/BUGREPORT similarity index 100% rename from cde/BUGREPORT rename to cde/historical/BUGREPORT diff --git a/cde/CLOSEDBUGS b/cde/historical/CLOSEDBUGS similarity index 100% rename from cde/CLOSEDBUGS rename to cde/historical/CLOSEDBUGS diff --git a/cde/OPENBUGS b/cde/historical/OPENBUGS similarity index 100% rename from cde/OPENBUGS rename to cde/historical/OPENBUGS diff --git a/cde/README-2.1.10 b/cde/historical/README-2.1.10 similarity index 100% rename from cde/README-2.1.10 rename to cde/historical/README-2.1.10 diff --git a/cde/README-2.1.20 b/cde/historical/README-2.1.20 similarity index 100% rename from cde/README-2.1.20 rename to cde/historical/README-2.1.20 diff --git a/cde/README-2.1.30 b/cde/historical/README-2.1.30 similarity index 100% rename from cde/README-2.1.30 rename to cde/historical/README-2.1.30 diff --git a/cde/README-2.1.30.snapshot b/cde/historical/README-2.1.30.snapshot similarity index 100% rename from cde/README-2.1.30.snapshot rename to cde/historical/README-2.1.30.snapshot diff --git a/cde/ReleaseNotes.ps b/cde/historical/ReleaseNotes.ps similarity index 100% rename from cde/ReleaseNotes.ps rename to cde/historical/ReleaseNotes.ps diff --git a/cde/ReleaseNotes.sgm b/cde/historical/ReleaseNotes.sgm similarity index 100% rename from cde/ReleaseNotes.sgm rename to cde/historical/ReleaseNotes.sgm diff --git a/cde/copyright.old b/cde/historical/copyright.old similarity index 100% rename from cde/copyright.old rename to cde/historical/copyright.old diff --git a/cde/include/EUSCompat.h b/cde/include/EUSCompat.h index 31c43b00e..3d85398aa 100644 --- a/cde/include/EUSCompat.h +++ b/cde/include/EUSCompat.h @@ -110,7 +110,7 @@ typedef enum {B_FALSE, B_TRUE} boolean_t; #endif /* HPUX */ -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) typedef enum {B_FALSE, B_TRUE} boolean_t; #define MAXNAMELEN 256 diff --git a/cde/lib/DtHelp/GifUtils.c b/cde/lib/DtHelp/GifUtils.c index 4badc9a00..f0a78c44b 100644 --- a/cde/lib/DtHelp/GifUtils.c +++ b/cde/lib/DtHelp/GifUtils.c @@ -67,7 +67,7 @@ /* include files */ #include #include -#include +#include #include #include #include diff --git a/cde/lib/DtHelp/Graphics.c b/cde/lib/DtHelp/Graphics.c index 7f54109d5..7631c7669 100644 --- a/cde/lib/DtHelp/Graphics.c +++ b/cde/lib/DtHelp/Graphics.c @@ -85,7 +85,6 @@ static char rcs_id[]="$XConsortium: Graphics.c /main/23 1996/12/06 11:12:54 cde- #include #include #include -#include #include #include #include diff --git a/cde/lib/DtHelp/Imakefile b/cde/lib/DtHelp/Imakefile index 89fe15c5c..3c2bcfe0a 100644 --- a/cde/lib/DtHelp/Imakefile +++ b/cde/lib/DtHelp/Imakefile @@ -13,8 +13,14 @@ XCOMM $XConsortium: Imakefile /main/25 1996/11/22 11:17:34 drk $ #define IHaveSubdirs #define PassCDebugFlags /**/ +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) +SUBDIRS = il +DONES = il/DONE +#else SUBDIRS = il jpeg DONES = il/DONE jpeg/DONE +#endif + EXTRALIBRARYDEPS = $(DONES) MakeSubdirs($(SUBDIRS)) @@ -28,6 +34,9 @@ BIT_ORDER_DEFINES = -DLSB_BIT_ORDER #endif INCLUDES = -I. -I./il -I./jpeg +#if defined(OpenBSDArchitecture) +INCLUDES += -I$(INCROOT) +#endif DEFINES = -DDTLIB -DXK_MISCELLANY $(LOCAL_DEFINES) \ -DCDE_INSTALLATION_TOP='"$(CDE_INSTALLATION_TOP)"' \ -DCDE_CONFIGURATION_TOP='"$(CDE_CONFIGURATION_TOP)"' \ @@ -146,7 +155,11 @@ JPEG_OBJS = \ jpeg/jdinput.o jpeg/jerror.o jpeg/jutils.o SRCS = $(SRCS1) $(SRCS2) $(CVSRCS) $(LCXSRCS) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) +OBJS = $(OBJS1) $(OBJS2) $(CVOBJS) $(LCXOBJS) $(IL_OBJS) +#else OBJS = $(OBJS1) $(OBJS2) $(CVOBJS) $(LCXOBJS) $(IL_OBJS) $(JPEG_OBJS) +#endif #include diff --git a/cde/lib/DtHelp/JpegUtils.c b/cde/lib/DtHelp/JpegUtils.c index 9fd96c3d7..59ef9daef 100644 --- a/cde/lib/DtHelp/JpegUtils.c +++ b/cde/lib/DtHelp/JpegUtils.c @@ -42,7 +42,7 @@ */ #include -#include +#include #include #include #include diff --git a/cde/lib/DtHelp/il/ilhplrotation.c b/cde/lib/DtHelp/il/ilhplrotation.c index 05d5e87fb..c05024c8e 100644 --- a/cde/lib/DtHelp/il/ilhplrotation.c +++ b/cde/lib/DtHelp/il/ilhplrotation.c @@ -41,8 +41,7 @@ static char version[] = "$XConsortium: ilhplrotation.c /main/3 1995/10/23 15:48: static char vdate[] = "$XConsortium: ilhplrotation.c /main/3 1995/10/23 15:48:35 rswiston $"; # include -# include -/*# include */ +# include # include # include /* Get definition of */ # include /* FLX_MAX */ diff --git a/cde/lib/DtPrint/PrintSetupB.c b/cde/lib/DtPrint/PrintSetupB.c index 0c1eb86a5..97cf56187 100644 --- a/cde/lib/DtPrint/PrintSetupB.c +++ b/cde/lib/DtPrint/PrintSetupB.c @@ -46,7 +46,11 @@ #endif #include +#if defined(CSRG_BASED) +#define MAXINT INT_MAX +#else #include +#endif #include #include @@ -60,6 +64,7 @@ #include
#include
+ /* * ------------------------------------------------------------------------ * Constant Definitions diff --git a/cde/lib/DtSearch/ausexit.c b/cde/lib/DtSearch/ausexit.c index c3e3850f9..00295965a 100644 --- a/cde/lib/DtSearch/ausexit.c +++ b/cde/lib/DtSearch/ausexit.c @@ -94,6 +94,7 @@ * Revision 1.4 1995/08/31 21:54:23 miker * Rename austext_exit() to DtSearchExit(). */ +#include #include "Search.h" void (*austext_exit_first) (int) = NULL; diff --git a/cde/lib/DtSearch/boolpars.c b/cde/lib/DtSearch/boolpars.c index 49d2caeb6..d2c7f5836 100644 --- a/cde/lib/DtSearch/boolpars.c +++ b/cde/lib/DtSearch/boolpars.c @@ -83,6 +83,7 @@ * Initial revision */ #include "SearchE.h" +#include #include #include "boolpars.h" #include "boolyac.h" @@ -223,7 +224,7 @@ static TRUTHTAB *creatett (int stemno, int pmsz, unsigned char *permutes) /* Destructor of passed truth table. * Unlinks it from ttlist and frees it. */ -static void *freett (TRUTHTAB *argtt) +static void freett (TRUTHTAB *argtt) { TRUTHTAB *tt; TRUTHTAB **lastlink = &ttlist; @@ -809,7 +810,7 @@ GET_ANOTHER_TOKEN: } /* Load stem into stems arrays and return it's truth table. */ - if (yylval.truthtab = get_stem_truthtab (stembufp, yytext)) { + if ((yylval.truthtab = get_stem_truthtab (stembufp, yytext))) { retn_token = WORD_TOKEN; last_token_was_boolop = FALSE; } diff --git a/cde/lib/DtSearch/boolsrch.c b/cde/lib/DtSearch/boolsrch.c index 10e2423c2..c642ba835 100644 --- a/cde/lib/DtSearch/boolsrch.c +++ b/cde/lib/DtSearch/boolsrch.c @@ -169,6 +169,8 @@ static long tot_addr_count; /* may be > reccount bcs deletes */ static int vistano; static float *wtvec = NULL; +extern void find_keyword (char *cur_word, int vista_num); +extern void read_wordstr (struct or_hwordrec * glob_word, int vista_num); /************************************************/ /* */ diff --git a/cde/lib/DtSearch/dbchange.c b/cde/lib/DtSearch/dbchange.c index d5441de46..c8594bdfc 100644 --- a/cde/lib/DtSearch/dbchange.c +++ b/cde/lib/DtSearch/dbchange.c @@ -60,6 +60,8 @@ #define PROGNAME "DBCHANGE" +void oe_uninitialize (void); + /************************************************/ /* */ /* file_has_changed */ diff --git a/cde/lib/DtSearch/dtoe.c b/cde/lib/DtSearch/dtoe.c index 498d72531..f251fad02 100644 --- a/cde/lib/DtSearch/dtoe.c +++ b/cde/lib/DtSearch/dtoe.c @@ -91,6 +91,7 @@ #include #include #include +#include #define PROGNAME "DTOE" #define MAX_LASTQRY 64 @@ -104,6 +105,9 @@ typedef struct { char *str; } NUMSTR; +int boolean_parse (void); +void boolean_search (void); +void ve_delete (void); /*------------------ OPERA ENGINE GLOBALS -------------------- * Default values set by init_globals() in oeinit.c @@ -120,7 +124,7 @@ char *global_memory_ptr = NULL; /* shared mem, dynam int shm_id = 0; /* shared mem, dynam defrag */ int OE_bmhtab_strlen[DtSrMAX_STEMCOUNT] = { 0 }; -size_t OE_bmhtables[DtSrMAX_STEMCOUNT][MAX_BMHTAB] = { 0 }; +size_t OE_bmhtables[DtSrMAX_STEMCOUNT][MAX_BMHTAB] = { { 0 } }; int OE_dbn = 0; /* dynamic */ int OE_enable_markdel = 0; int OE_enable_usernotes = 0; diff --git a/cde/lib/DtSearch/dtoeinit.c b/cde/lib/DtSearch/dtoeinit.c index 25921e15f..477ef3863 100644 --- a/cde/lib/DtSearch/dtoeinit.c +++ b/cde/lib/DtSearch/dtoeinit.c @@ -66,6 +66,7 @@ #include "SearchE.h" #include #include +#include #define XOS_USE_NO_LOCKING #define X_INCLUDE_TIME_H diff --git a/cde/lib/DtSearch/dtsrapi.c b/cde/lib/DtSearch/dtsrapi.c index 27eded994..b62b87166 100644 --- a/cde/lib/DtSearch/dtsrapi.c +++ b/cde/lib/DtSearch/dtsrapi.c @@ -110,6 +110,7 @@ #include #include #include +#include #include #define PROGNAME "DTSRAPI" @@ -120,7 +121,7 @@ /*------------------- PRIVATE GLOBALS ---------------------*/ /* Usrblk should not be visible to user interface code, * but must be visible to real engine... */ -USRBLK usrblk = { 0 }; +USRBLK usrblk = { { 0 } }; static int save_search_type = '$'; static char *sprintbuf = NULL; @@ -313,7 +314,7 @@ int DtSearchInit ( aa_argv0 = argv0; if (err_file) aa_stderr = err_file; -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) else aa_stderr = stderr; #endif @@ -321,7 +322,7 @@ int DtSearchInit ( sprintbuf = austext_malloc (SPRINTBUFSZ, PROGNAME "135", NULL); /* Open msgs and help text catalogs. */ - if (switches & DtSrInNOLOCALE == 0) { + if (switches & (DtSrInNOLOCALE == 0)) { setlocale (LC_ALL, ""); dtsearch_catd = catopen (FNAME_DTSRCAT, 0); } @@ -337,7 +338,9 @@ int DtSearchInit ( signal (SIGQUIT, signal_abort); /* quit, ctrl-d */ signal (SIGKILL, signal_abort); /* (kill -9, cannot be trapped) */ signal (SIGTERM, signal_abort); /* kill [-15], sfwr terminate */ +#ifdef SIGPWR signal (SIGPWR, signal_abort); /* power failure imminent */ +#endif #ifdef _AIX signal (SIGXCPU, signal_abort); /* cpu time limit exceeded */ signal (SIGDANGER, signal_abort); /* imminent paging space crash */ diff --git a/cde/lib/DtSearch/dtsrutil.c b/cde/lib/DtSearch/dtsrutil.c index 7ccc67fde..33569c8cd 100644 --- a/cde/lib/DtSearch/dtsrutil.c +++ b/cde/lib/DtSearch/dtsrutil.c @@ -66,6 +66,7 @@ */ #include "SearchE.h" #include +#include #include #define MS_misc 1 diff --git a/cde/lib/DtSearch/dtsrve.c b/cde/lib/DtSearch/dtsrve.c index 0f985368e..d0c7d9f6b 100644 --- a/cde/lib/DtSearch/dtsrve.c +++ b/cde/lib/DtSearch/dtsrve.c @@ -75,6 +75,7 @@ */ #include "SearchE.h" #include +#include #include #include #include "vista.h" @@ -93,6 +94,8 @@ extern time_t hctree_id; /**** hardcoded only temporarily ******/ static int max_abstrbufsz = 0; static int max_ormisc_size; +char *strupr(char *); + /************************************************/ /* */ /* dummy_workproc */ @@ -669,7 +672,7 @@ static void store_next_misc ( * terminate the abstract string in case there are no more misc recs. * (but should not occur). */ - if (store_state = STORE_ABSTR) + if ((store_state = STORE_ABSTR)) *targ = 0; return; } /* store_next_misc() */ diff --git a/cde/lib/DtSearch/hencode.c b/cde/lib/DtSearch/hencode.c index 06d95c29d..c8cdd95ad 100644 --- a/cde/lib/DtSearch/hencode.c +++ b/cde/lib/DtSearch/hencode.c @@ -57,6 +57,7 @@ */ #include "SearchP.h" #include +#include #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING diff --git a/cde/lib/DtSearch/iscompat.c b/cde/lib/DtSearch/iscompat.c index 405bcb11c..1b717cc9f 100644 --- a/cde/lib/DtSearch/iscompat.c +++ b/cde/lib/DtSearch/iscompat.c @@ -51,6 +51,7 @@ * Name changes for DtSearch. */ #include "SearchP.h" +#include #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING diff --git a/cde/lib/DtSearch/jpn.c b/cde/lib/DtSearch/jpn.c index 188fe175c..6cb5d5a04 100644 --- a/cde/lib/DtSearch/jpn.c +++ b/cde/lib/DtSearch/jpn.c @@ -232,6 +232,7 @@ static UCHAR *save_parg_string = NULL; static UCHAR *substrbuf = NULL; static long substr_offset; +char *ensure_end_slash (char *pathstr); /************************************************/ /* */ @@ -311,7 +312,7 @@ static int read_jchar (void) jstate = JS_KANJI; else jstate = jstates_set1 [(jchar[0] & 0x7F) - 32]; - if (jchar[1] = readchar (NULL)) + if ((jchar[1] = readchar (NULL))) readcount++; else jstate = JS_ETX; @@ -362,7 +363,7 @@ static int read_jchar (void) if (jchar[0] == SS2_CHAR) { jcharlen = 2; jstate = JS_HALFKATA; - if (jchar[1] = readchar (NULL)) + if ((jchar[1] = readchar (NULL))) readcount++; else jstate = JS_ETX; @@ -908,7 +909,7 @@ FILL_ANOTHER_SUBSTRING: * one by one, ie parse and return word tokens from string, * including possible kanji compounds if switched on. */ - if (token = parse_substring()) + if ((token = parse_substring())) return (char *) token; /* When current substring is empty, go back and fill another one. diff --git a/cde/lib/DtSearch/lang.c b/cde/lib/DtSearch/lang.c index 7f254305f..0756fa891 100644 --- a/cde/lib/DtSearch/lang.c +++ b/cde/lib/DtSearch/lang.c @@ -156,6 +156,8 @@ typedef struct prule_t { char is_last_rule; /* '$' terminate or '>' continue algorithm */ } PRULE; +char *ensure_end_slash (char *pathstr); +void unload_jpn_language (DBLK *dblk); /************************************************/ /* */ @@ -389,7 +391,7 @@ char *teskey_parser (PARG *parg) READ_ANOTHER_WORD: outp = outbuf; tpstate = BETW_WORDS; - while (*outp = cofunction (cofunction_arg)) { + while ((*outp = cofunction (cofunction_arg))) { readcount++; cofunction_arg = NULL; @@ -421,7 +423,7 @@ READ_ANOTHER_WORD: * Otherwise discard just like non_concord. */ outp++; - if (*outp = cofunction(NULL)) + if ((*outp = cofunction(NULL))) readcount++; if ((charmap[*outp] & CONCORDABLE) != 0) { *outp = charmap[*outp] & 0x00ff; @@ -476,7 +478,7 @@ READ_ANOTHER_WORD: } /* Must be opt_concord... */ outp++; - if (*outp = cofunction(NULL)) + if ((*outp = cofunction(NULL))) readcount++; if ((charmap[*outp] & CONCORDABLE) != 0) { if (outp < endmaxword) { diff --git a/cde/lib/DtSearch/msgs.c b/cde/lib/DtSearch/msgs.c index 1f404435d..e9ebb322d 100644 --- a/cde/lib/DtSearch/msgs.c +++ b/cde/lib/DtSearch/msgs.c @@ -50,6 +50,7 @@ * Freeze DtSearch 0.1, AusText 2.1.8 */ #include "SearchP.h" +#include #define PROGNAME "MSGS" /****************************************/ diff --git a/cde/lib/DtSearch/objdate.c b/cde/lib/DtSearch/objdate.c index bd2e52c4d..34e485e58 100644 --- a/cde/lib/DtSearch/objdate.c +++ b/cde/lib/DtSearch/objdate.c @@ -67,6 +67,7 @@ */ #include "SearchP.h" +#include #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING #include diff --git a/cde/lib/DtSearch/ocf.c b/cde/lib/DtSearch/ocf.c index bd2ad1081..3ed7a2810 100644 --- a/cde/lib/DtSearch/ocf.c +++ b/cde/lib/DtSearch/ocf.c @@ -102,6 +102,7 @@ */ #include "SearchE.h" +#include #include #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING @@ -110,6 +111,8 @@ #include /* for POSIX getcwd() */ #include +char *strupr (char *s); + /*****#define DEBUG_DUMP******/ /********#define DEBUG_OEF**********/ @@ -145,13 +148,13 @@ char *OE_inittab_dir = NULL; ********/ OEFTAB oef_table[] = { - "AUDIT", &OEF_audit, FALSE, - "DISCARD", &OEF_discard, FALSE, - "NEWS", &OEF_news, FALSE, - "NOTESNOT", &OEF_notesnot, FALSE, - "NOTESSEM", &OEF_notessem, FALSE, - "README", &OEF_readme, FALSE, - NULL, NULL, FALSE /* end of list */ + { "AUDIT", &OEF_audit, FALSE, }, + { "DISCARD", &OEF_discard, FALSE, }, + { "NEWS", &OEF_news, FALSE, }, + { "NOTESNOT", &OEF_notesnot, FALSE, }, + { "NOTESSEM", &OEF_notessem, FALSE, }, + { "README", &OEF_readme, FALSE, }, + { NULL, NULL, FALSE }, /* end of list */ }; diff --git a/cde/lib/DtSearch/opendblk.c b/cde/lib/DtSearch/opendblk.c index f393639a2..1d95aa83c 100644 --- a/cde/lib/DtSearch/opendblk.c +++ b/cde/lib/DtSearch/opendblk.c @@ -99,6 +99,7 @@ */ #include "SearchE.h" #include +#include #include #include #include diff --git a/cde/lib/DtSearch/raima/alloc.c b/cde/lib/DtSearch/raima/alloc.c index b856d9698..0f67a99f8 100644 --- a/cde/lib/DtSearch/raima/alloc.c +++ b/cde/lib/DtSearch/raima/alloc.c @@ -68,12 +68,10 @@ */ #include +#include #include "vista.h" #include "dbtype.h" - -char *malloc(P1(unsigned)); -char *calloc(P1(unsigned) Pi(unsigned)); #define memlock(p) (p) #define memunlock(p) 1 diff --git a/cde/lib/DtSearch/raima/cmtype.c b/cde/lib/DtSearch/raima/cmtype.c index 90004a35f..5a9f25f9b 100644 --- a/cde/lib/DtSearch/raima/cmtype.c +++ b/cde/lib/DtSearch/raima/cmtype.c @@ -51,6 +51,7 @@ /* Get current member type */ +int d_cmtype(set, cmtype TASK_PARM DBN_PARM) int set; int FAR *cmtype; diff --git a/cde/lib/DtSearch/raima/connect.c b/cde/lib/DtSearch/raima/connect.c index 4166023a4..1af1f63d9 100644 --- a/cde/lib/DtSearch/raima/connect.c +++ b/cde/lib/DtSearch/raima/connect.c @@ -73,6 +73,7 @@ typedef struct { /* Connect the current record as member of set */ +int d_connect(set TASK_PARM DBN_PARM) int set; /* Set constant */ TASK_DECL @@ -357,8 +358,8 @@ char FAR *mem2; /* member record 2 */ /* compare the two fields */ /* computation is pointer to next sort field in member record */ fld_ptr = &field_table[srt1_ptr->se_fld]; - if (cmp = fldcmp(fld_ptr, mem1 + fld_ptr->fd_ptr, - mem2 + field_table[srt2_ptr->se_fld].fd_ptr)) + if ((cmp = fldcmp(fld_ptr, mem1 + fld_ptr->fd_ptr, + mem2 + field_table[srt2_ptr->se_fld].fd_ptr))) return (cmp); /* return at first unequal fields */ } /* fields match */ diff --git a/cde/lib/DtSearch/raima/cotype.c b/cde/lib/DtSearch/raima/cotype.c index a5c2be5b5..99150a2f2 100644 --- a/cde/lib/DtSearch/raima/cotype.c +++ b/cde/lib/DtSearch/raima/cotype.c @@ -50,6 +50,7 @@ /* Get current owner type */ +int d_cotype(set, cotype TASK_PARM DBN_PARM) int set; int FAR *cotype; diff --git a/cde/lib/DtSearch/raima/crget.c b/cde/lib/DtSearch/raima/crget.c index d1100195b..f1a5f0f2c 100644 --- a/cde/lib/DtSearch/raima/crget.c +++ b/cde/lib/DtSearch/raima/crget.c @@ -49,6 +49,7 @@ /* Get current record */ +int d_crget(dba TASK_PARM DBN_PARM) DB_ADDR FAR *dba; /* db address of record to become current */ TASK_DECL @@ -58,7 +59,7 @@ DBN_DECL if ( ! dbopen ) RETURN( dberr(S_DBOPEN) ); - if ( *dba = curr_rec ) + if (( *dba = curr_rec )) db_status = S_OKAY; else db_status = S_NOCR; diff --git a/cde/lib/DtSearch/raima/crread.c b/cde/lib/DtSearch/raima/crread.c index dbd54e043..7785ef842 100644 --- a/cde/lib/DtSearch/raima/crread.c +++ b/cde/lib/DtSearch/raima/crread.c @@ -50,6 +50,7 @@ /* Read data from field of current record */ +int d_crread(field, data TASK_PARM DBN_PARM) long field; /* Field constant */ char FAR *data; /* Data area to contain field contents */ diff --git a/cde/lib/DtSearch/raima/crset.c b/cde/lib/DtSearch/raima/crset.c index c75018788..2155f50f3 100644 --- a/cde/lib/DtSearch/raima/crset.c +++ b/cde/lib/DtSearch/raima/crset.c @@ -49,6 +49,7 @@ /* Set current record */ +int d_crset(dba TASK_PARM DBN_PARM) DB_ADDR FAR *dba; /* db address of record to become current */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/crtype.c b/cde/lib/DtSearch/raima/crtype.c index 77c4f2fe0..175909d38 100644 --- a/cde/lib/DtSearch/raima/crtype.c +++ b/cde/lib/DtSearch/raima/crtype.c @@ -49,6 +49,7 @@ /* Get current record type */ +int d_crtype(crtype TASK_PARM DBN_PARM) int FAR *crtype; TASK_DECL diff --git a/cde/lib/DtSearch/raima/crwrite.c b/cde/lib/DtSearch/raima/crwrite.c index 9cf838cd2..f7b408fce 100644 --- a/cde/lib/DtSearch/raima/crwrite.c +++ b/cde/lib/DtSearch/raima/crwrite.c @@ -50,6 +50,7 @@ /* Write data to a field in the current record */ +int d_crwrite(field, data TASK_PARM DBN_PARM) long field; /* field constant */ char FAR *data; /* data area to contain field contents */ diff --git a/cde/lib/DtSearch/raima/csmget.c b/cde/lib/DtSearch/raima/csmget.c index a7c24bd49..ed03ab2e6 100644 --- a/cde/lib/DtSearch/raima/csmget.c +++ b/cde/lib/DtSearch/raima/csmget.c @@ -49,6 +49,7 @@ /* Get current set member */ +int d_csmget(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ DB_ADDR FAR *dba; /* db address of record to become current */ diff --git a/cde/lib/DtSearch/raima/csmread.c b/cde/lib/DtSearch/raima/csmread.c index 35693abb3..b52456c1e 100644 --- a/cde/lib/DtSearch/raima/csmread.c +++ b/cde/lib/DtSearch/raima/csmread.c @@ -50,6 +50,7 @@ /* Read data from field of current set member */ +int d_csmread(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ diff --git a/cde/lib/DtSearch/raima/csmset.c b/cde/lib/DtSearch/raima/csmset.c index 4ad741e98..f69d1eea3 100644 --- a/cde/lib/DtSearch/raima/csmset.c +++ b/cde/lib/DtSearch/raima/csmset.c @@ -49,6 +49,7 @@ /* Set current set member */ +int d_csmset(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ DB_ADDR FAR *dba; /* db address of record to become current */ diff --git a/cde/lib/DtSearch/raima/csmwrite.c b/cde/lib/DtSearch/raima/csmwrite.c index 135a4b3b6..3e9cd23f2 100644 --- a/cde/lib/DtSearch/raima/csmwrite.c +++ b/cde/lib/DtSearch/raima/csmwrite.c @@ -50,6 +50,7 @@ /* Write data to a field in the current set member */ +int d_csmwrite(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ diff --git a/cde/lib/DtSearch/raima/csoget.c b/cde/lib/DtSearch/raima/csoget.c index e10edffde..a5783739e 100644 --- a/cde/lib/DtSearch/raima/csoget.c +++ b/cde/lib/DtSearch/raima/csoget.c @@ -50,6 +50,7 @@ /* Get current set owner */ +int d_csoget(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ DB_ADDR FAR *dba; /* db address of record to become current */ diff --git a/cde/lib/DtSearch/raima/csoread.c b/cde/lib/DtSearch/raima/csoread.c index 4568449fd..36a3aa1a1 100644 --- a/cde/lib/DtSearch/raima/csoread.c +++ b/cde/lib/DtSearch/raima/csoread.c @@ -50,6 +50,7 @@ /* Read data from field of current set owner */ +int d_csoread(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ diff --git a/cde/lib/DtSearch/raima/csoset.c b/cde/lib/DtSearch/raima/csoset.c index 20abc494f..9255f87be 100644 --- a/cde/lib/DtSearch/raima/csoset.c +++ b/cde/lib/DtSearch/raima/csoset.c @@ -50,6 +50,7 @@ /* Set current set owner */ +int d_csoset(set, dba TASK_PARM DBN_PARM) int set; /* Set table entry */ DB_ADDR FAR *dba; /* db address of record to become current */ diff --git a/cde/lib/DtSearch/raima/csowrite.c b/cde/lib/DtSearch/raima/csowrite.c index fd6fd82c1..5124a9777 100644 --- a/cde/lib/DtSearch/raima/csowrite.c +++ b/cde/lib/DtSearch/raima/csowrite.c @@ -50,6 +50,7 @@ /* Write data to a field in the current set owner */ +int d_csowrite(set, field, data TASK_PARM DBN_PARM) int set; /* Set constant */ long field; /* Field constant */ diff --git a/cde/lib/DtSearch/raima/dbacode.c b/cde/lib/DtSearch/raima/dbacode.c index b6df959a5..43f3f5472 100644 --- a/cde/lib/DtSearch/raima/dbacode.c +++ b/cde/lib/DtSearch/raima/dbacode.c @@ -43,6 +43,7 @@ /* Decode file and slot number from a database address */ +int d_decode_dba(dba, file, slot) DB_ADDR dba; /* database address */ int FAR *file; /* returned file number */ @@ -57,6 +58,7 @@ long FAR *slot; /* returned slot number */ /* Encode database address from file and slot number */ +int d_encode_dba(file, slot, dba) int file; /* returned file number */ long slot; /* returned slot number */ diff --git a/cde/lib/DtSearch/raima/dbdpath.c b/cde/lib/DtSearch/raima/dbdpath.c index 692e338e4..d8ac56fea 100644 --- a/cde/lib/DtSearch/raima/dbdpath.c +++ b/cde/lib/DtSearch/raima/dbdpath.c @@ -49,6 +49,7 @@ /* Set Database Dictionary Path */ +int d_dbdpath(path TASK_PARM) CONST char FAR *path; TASK_DECL diff --git a/cde/lib/DtSearch/raima/dbfpath.c b/cde/lib/DtSearch/raima/dbfpath.c index 8548b81c7..ce682e573 100644 --- a/cde/lib/DtSearch/raima/dbfpath.c +++ b/cde/lib/DtSearch/raima/dbfpath.c @@ -49,6 +49,7 @@ /* Set Database Files Path */ +int d_dbfpath(path TASK_PARM) CONST char FAR *path; TASK_DECL diff --git a/cde/lib/DtSearch/raima/dblfcns.c b/cde/lib/DtSearch/raima/dblfcns.c index 069d34afa..71d0787ff 100644 --- a/cde/lib/DtSearch/raima/dblfcns.c +++ b/cde/lib/DtSearch/raima/dblfcns.c @@ -275,6 +275,7 @@ TASK_DECL /* Open db_VISTA database */ +int d_open(dbnames, opentype TASK_PARM) CONST char FAR *dbnames; CONST char FAR *opentype; @@ -441,6 +442,7 @@ TASK FAR *tsk; /* Initialize multiple database table entries */ +int initdbt(dbnames ) CONST char FAR *dbnames; { @@ -901,6 +903,7 @@ static int bld_lock_tables() /****************************************/ /* Close database */ +int d_close(TASK_ONLY) TASK_DECL { diff --git a/cde/lib/DtSearch/raima/dbtype.h b/cde/lib/DtSearch/raima/dbtype.h index 58ae079d7..24e5d9c4f 100644 --- a/cde/lib/DtSearch/raima/dbtype.h +++ b/cde/lib/DtSearch/raima/dbtype.h @@ -627,6 +627,10 @@ typedef struct page_entry { } PAGE_ENTRY; #define buff Buff.ptr +#include +#ifndef _STRING_H +#define _STRING_H +#endif #include "proto.h" #ifdef MULTI_TASK #ifdef NO_DT_COVER diff --git a/cde/lib/DtSearch/raima/dbuserid.c b/cde/lib/DtSearch/raima/dbuserid.c index 13f1fc848..c1a6b5739 100644 --- a/cde/lib/DtSearch/raima/dbuserid.c +++ b/cde/lib/DtSearch/raima/dbuserid.c @@ -51,6 +51,7 @@ /* Set Database User Identifier */ +int d_dbuserid(id TASK_PARM) CONST char FAR *id; TASK_DECL diff --git a/cde/lib/DtSearch/raima/delete.c b/cde/lib/DtSearch/raima/delete.c index f9988f037..c7e0b97a9 100644 --- a/cde/lib/DtSearch/raima/delete.c +++ b/cde/lib/DtSearch/raima/delete.c @@ -52,6 +52,7 @@ static DB_ADDR zap_dba = NULL_DBA; /* Delete the current record, with error checking */ +int d_delete(TASK_DBN_ONLY) TASK_DECL DBN_DECL diff --git a/cde/lib/DtSearch/raima/destroy.c b/cde/lib/DtSearch/raima/destroy.c index 00cb9d0c4..c04e7d2de 100644 --- a/cde/lib/DtSearch/raima/destroy.c +++ b/cde/lib/DtSearch/raima/destroy.c @@ -54,6 +54,7 @@ /* Warning: this function will destroy the entire contents of the database */ +int d_destroy(dbname TASK_PARM) CONST char FAR *dbname; TASK_DECL diff --git a/cde/lib/DtSearch/raima/dio.c b/cde/lib/DtSearch/raima/dio.c index e3cdd7b15..aa3258c93 100644 --- a/cde/lib/DtSearch/raima/dio.c +++ b/cde/lib/DtSearch/raima/dio.c @@ -228,6 +228,7 @@ static int dio_in(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *) /* Set the maximum number of open db_VISTA files */ +int d_setfiles(num) int num; { @@ -242,6 +243,7 @@ int num; /* Set number of virtual memory pages */ +int d_setpages(dbpgs, ixpgs) int dbpgs; /* # of db cache pages */ int ixpgs; /* # of index cache pages - ignored in single-user version */ @@ -266,6 +268,7 @@ int ixpgs; /* # of index cache pages - ignored in single-user version */ /****************************************/ /* Open a database file */ +int dio_open( fno ) FILE_NO fno; { @@ -313,6 +316,7 @@ FILE_NO fno; /****************************************/ /* Close a database file */ +int dio_close( fno ) FILE_NO fno; { @@ -335,6 +339,7 @@ FILE_NO fno; /****************************************/ /* Initialize database I/O */ +int dio_init() { CHAR_P Tempbuff; @@ -549,6 +554,7 @@ void dio_free() /****************************************/ /* Clear pages for a single file. */ +int dio_clrfile(fno ) register FILE_NO fno; { @@ -564,6 +570,7 @@ register FILE_NO fno; /****************************************/ /* Clear all pages for *all* files from I/O buffer */ +int dio_clear() { return( clear_cache(0, size_ft) ); @@ -787,6 +794,7 @@ FILE_NO file_no; /****************************************/ /* Database I/O page get */ +int dio_get( page_no, page_ptr, hold ) F_ADDR page_no; char FAR * FAR *page_ptr; @@ -829,6 +837,7 @@ int hold; /****************************************/ /* Set modified flag for a page */ +int dio_touch( page_no ) F_ADDR page_no; { @@ -879,6 +888,7 @@ F_ADDR page_no; * Merely returns ptr into rec in a page * unless a page swap is necessary. */ +int dio_read( dba, recptr, hold ) DB_ADDR dba; char FAR * FAR *recptr; @@ -935,6 +945,7 @@ int hold; * Sets page's 'touched' flags, timestamps, etc. * If recptr not NULL, copies rec to page cache. */ +int dio_write( dba, recptr, release ) DB_ADDR dba; CONST char FAR *recptr; @@ -994,6 +1005,7 @@ int release; /* Release database page hold */ +int dio_release( dba ) DB_ADDR dba; { @@ -1130,6 +1142,7 @@ INT rid; /****************************************/ /* Search a cache for page */ +int dio_findpg(file, page, pg_table, xpg_ptr, xlu_ptr ) FILE_NO file; /* file number = 0..size_ft-1 */ F_ADDR page; /* database page number */ @@ -1435,6 +1448,7 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/ * slot is byte swapped before the io by calling the * page swap function. */ +int #ifndef NO_TRANS dio_out(pg_ptr, lu_ptr, db_cache) #else @@ -1722,6 +1736,7 @@ static int dio_pzflush() /****************************************/ /* Read a file's page zero */ +int dio_pzread(fno) FILE_NO fno; /* file number */ { @@ -1764,6 +1779,7 @@ FILE_NO fno; /* file number */ * ie from delete chain if possible. * Returns memory address of the free slot into 'loc'. */ +int dio_pzalloc(fno, loc ) FILE_NO fno; /* file number */ F_ADDR *loc; /* pointer to allocated location */ @@ -1831,6 +1847,7 @@ F_ADDR *loc; /* pointer to allocated location */ /****************************************/ /* Delete record slot or key node from page zero */ +int dio_pzdel(fno, loc ) FILE_NO fno; /* file number */ F_ADDR loc; /* location to be freed */ diff --git a/cde/lib/DtSearch/raima/discon.c b/cde/lib/DtSearch/raima/discon.c index c954dc3c0..20321cc75 100644 --- a/cde/lib/DtSearch/raima/discon.c +++ b/cde/lib/DtSearch/raima/discon.c @@ -67,6 +67,7 @@ typedef struct { /* Disconnect the current member of set */ +int d_discon(nset TASK_PARM DBN_PARM) int nset; /* set number */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/disdel.c b/cde/lib/DtSearch/raima/disdel.c index 696aa09b1..125a7ba39 100644 --- a/cde/lib/DtSearch/raima/disdel.c +++ b/cde/lib/DtSearch/raima/disdel.c @@ -50,6 +50,7 @@ /* Disconnect from all sets (owner and member) and delete record */ +int d_disdel(TASK_DBN_ONLY) TASK_DECL DBN_DECL diff --git a/cde/lib/DtSearch/raima/fillnew.c b/cde/lib/DtSearch/raima/fillnew.c index 5a8c954d1..8f96bd2c0 100644 --- a/cde/lib/DtSearch/raima/fillnew.c +++ b/cde/lib/DtSearch/raima/fillnew.c @@ -54,6 +54,7 @@ /* Create and fill a new record */ +int d_fillnew( nrec, recval TASK_PARM DBN_PARM ) int nrec; /* record number */ CONST char FAR *recval; /* record value */ diff --git a/cde/lib/DtSearch/raima/findco.c b/cde/lib/DtSearch/raima/findco.c index c052998d5..0615ef2ae 100644 --- a/cde/lib/DtSearch/raima/findco.c +++ b/cde/lib/DtSearch/raima/findco.c @@ -49,6 +49,7 @@ /* Find owner of current record */ +int d_findco(nset TASK_PARM DBN_PARM) int nset; TASK_DECL diff --git a/cde/lib/DtSearch/raima/findfm.c b/cde/lib/DtSearch/raima/findfm.c index 0ab3d8b2a..08ee64770 100644 --- a/cde/lib/DtSearch/raima/findfm.c +++ b/cde/lib/DtSearch/raima/findfm.c @@ -49,6 +49,7 @@ /* Find first member of set */ +int d_findfm(nset TASK_PARM DBN_PARM) int nset; TASK_DECL diff --git a/cde/lib/DtSearch/raima/findlm.c b/cde/lib/DtSearch/raima/findlm.c index b560e1850..016638684 100644 --- a/cde/lib/DtSearch/raima/findlm.c +++ b/cde/lib/DtSearch/raima/findlm.c @@ -49,6 +49,7 @@ /* Find last member of set */ +int d_findlm(nset TASK_PARM DBN_PARM) int nset; TASK_DECL diff --git a/cde/lib/DtSearch/raima/findnm.c b/cde/lib/DtSearch/raima/findnm.c index 3130b589f..fb59e2789 100644 --- a/cde/lib/DtSearch/raima/findnm.c +++ b/cde/lib/DtSearch/raima/findnm.c @@ -49,6 +49,7 @@ /* Find next member of set */ +int d_findnm(nset TASK_PARM DBN_PARM) int nset; TASK_DECL diff --git a/cde/lib/DtSearch/raima/findpm.c b/cde/lib/DtSearch/raima/findpm.c index cce24e29e..f50c6f6b9 100644 --- a/cde/lib/DtSearch/raima/findpm.c +++ b/cde/lib/DtSearch/raima/findpm.c @@ -49,6 +49,7 @@ /* Find previous member of set */ +int d_findpm(nset TASK_PARM DBN_PARM) int nset; TASK_DECL diff --git a/cde/lib/DtSearch/raima/initial.c b/cde/lib/DtSearch/raima/initial.c index d960d43ac..beba4985e 100644 --- a/cde/lib/DtSearch/raima/initial.c +++ b/cde/lib/DtSearch/raima/initial.c @@ -87,6 +87,7 @@ extern int max_open_files; /* see dio.c */ /* Database initialization function */ +int d_initialize(TASK_DBN_ONLY) TASK_DECL DBN_DECL @@ -111,6 +112,7 @@ DBN_DECL /* Initialize database file */ +int d_initfile(fno TASK_PARM DBN_PARM) FILE_NO fno; /* file table entry of file to be initialized */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/inittab.c b/cde/lib/DtSearch/raima/inittab.c index 4bdf6a468..484013b02 100644 --- a/cde/lib/DtSearch/raima/inittab.c +++ b/cde/lib/DtSearch/raima/inittab.c @@ -94,6 +94,7 @@ static int initcurr(P0); /* Initialize database tables */ +int inittab() { register int dbt_lc; /* loop control */ diff --git a/cde/lib/DtSearch/raima/ismember.c b/cde/lib/DtSearch/raima/ismember.c index 8eb09291e..f1fdfa531 100644 --- a/cde/lib/DtSearch/raima/ismember.c +++ b/cde/lib/DtSearch/raima/ismember.c @@ -50,6 +50,7 @@ /* Check to see if current record is a connected member of SET */ +int d_ismember(set TASK_PARM DBN_PARM) int set; /* set table entry */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/isowner.c b/cde/lib/DtSearch/raima/isowner.c index 751e504c2..0a55cc03d 100644 --- a/cde/lib/DtSearch/raima/isowner.c +++ b/cde/lib/DtSearch/raima/isowner.c @@ -50,6 +50,7 @@ /* Check to see if current record is a owner of non-empty SET */ +int d_isowner(set TASK_PARM DBN_PARM) int set; /* set table entry */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/keydel.c b/cde/lib/DtSearch/raima/keydel.c index 21c829cb2..7360dc936 100644 --- a/cde/lib/DtSearch/raima/keydel.c +++ b/cde/lib/DtSearch/raima/keydel.c @@ -53,6 +53,7 @@ /* Delete optional key value */ +int d_keydel(field TASK_PARM DBN_PARM) long field; /* key field constant */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/keyexist.c b/cde/lib/DtSearch/raima/keyexist.c index 657b93610..659046ee7 100644 --- a/cde/lib/DtSearch/raima/keyexist.c +++ b/cde/lib/DtSearch/raima/keyexist.c @@ -45,6 +45,7 @@ /* Check for optional key existence */ +int d_keyexist(field TASK_PARM DBN_PARM) long field; /* key field constant */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/keyfcns.c b/cde/lib/DtSearch/raima/keyfcns.c index fd510b333..7912e4617 100644 --- a/cde/lib/DtSearch/raima/keyfcns.c +++ b/cde/lib/DtSearch/raima/keyfcns.c @@ -149,6 +149,7 @@ static int unique; /* Open B-tree key field index processing */ +int key_open() { register int fd_lc; /* loop control */ @@ -234,6 +235,7 @@ void key_close() /* Initialize key function operation */ +int key_init(field ) int field; /* field number to be processed */ { @@ -267,6 +269,7 @@ int field; /* field number to be processed */ /* Reset key_info last status to reposition keys on file "fno" */ +int key_reset(fno ) FILE_NO fno; { @@ -285,6 +288,7 @@ FILE_NO fno; /* Locate proper key position on B-tree */ +int key_locpos(key_val, dba) CONST char FAR *key_val; /* key search value */ DB_ADDR FAR *dba; /* database address of located key */ @@ -454,6 +458,7 @@ DB_ADDR FAR *dba; /* database address included in comparison if not null */ /* Scan thru key field */ +int key_scan(fcn, dba ) int fcn; /* next or prev */ DB_ADDR *dba; /* db address of scanned record */ @@ -571,6 +576,7 @@ DB_ADDR *dba; /* Find key boundary */ +int key_boundary(fcn, dba ) int fcn; /* KEYFRST or KEYLAST */ DB_ADDR *dba; /* to get dba of first or last key */ @@ -660,6 +666,7 @@ DB_ADDR *dba; /* to get dba of first or last key */ /* Insert key field into B-tree */ +int key_insert(fld, key_val, dba ) int fld; /* key field number */ CONST char FAR *key_val; /* key value */ @@ -850,6 +857,7 @@ NODE FAR *node; /* Delete key from B-tree */ +int key_delete(fld, key_val, dba ) int fld; char CONST FAR *key_val; @@ -1140,6 +1148,7 @@ int n; /* Read value of last key scanned */ +int d_keyread(key_val TASK_PARM) char FAR *key_val; TASK_DECL @@ -1214,6 +1223,7 @@ TASK_DECL /* Build compound key value from record */ +int key_bldcom(fld, rec, key, cflag ) int fld; /* compound key field number */ char FAR *rec; /* ptr to record data */ diff --git a/cde/lib/DtSearch/raima/keyfind.c b/cde/lib/DtSearch/raima/keyfind.c index 77db53c71..36ae77ce9 100644 --- a/cde/lib/DtSearch/raima/keyfind.c +++ b/cde/lib/DtSearch/raima/keyfind.c @@ -56,6 +56,7 @@ static void chk_desc_key(P1(int) Pi(FIELD_ENTRY FAR *) /* Find record thru key field */ +int d_keyfind(field, fldval TASK_PARM DBN_PARM) long field; /* field constant */ CONST char FAR *fldval; /* value of the data field */ diff --git a/cde/lib/DtSearch/raima/keyfrst.c b/cde/lib/DtSearch/raima/keyfrst.c index b32c6caf3..d853cffaa 100644 --- a/cde/lib/DtSearch/raima/keyfrst.c +++ b/cde/lib/DtSearch/raima/keyfrst.c @@ -50,6 +50,7 @@ /* Find first key */ +int d_keyfrst(field TASK_PARM DBN_PARM) long field; /* field constant */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/keylast.c b/cde/lib/DtSearch/raima/keylast.c index a013f937a..c8df60c35 100644 --- a/cde/lib/DtSearch/raima/keylast.c +++ b/cde/lib/DtSearch/raima/keylast.c @@ -50,6 +50,7 @@ /* Find last key */ +int d_keylast(field TASK_PARM DBN_PARM) long field; /* field constant */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/keynext.c b/cde/lib/DtSearch/raima/keynext.c index 216f33871..d83fa7bcc 100644 --- a/cde/lib/DtSearch/raima/keynext.c +++ b/cde/lib/DtSearch/raima/keynext.c @@ -51,6 +51,7 @@ /* Find next record thru key field */ +int d_keynext(field TASK_PARM DBN_PARM) long field; /* field constant */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/keyprev.c b/cde/lib/DtSearch/raima/keyprev.c index 9b5e20753..9ea0b4172 100644 --- a/cde/lib/DtSearch/raima/keyprev.c +++ b/cde/lib/DtSearch/raima/keyprev.c @@ -51,6 +51,7 @@ /* Find previous record thru key field */ +int d_keyprev(field TASK_PARM DBN_PARM) long field; /* field constant */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/keystore.c b/cde/lib/DtSearch/raima/keystore.c index 8434fc0eb..ea6770a6d 100644 --- a/cde/lib/DtSearch/raima/keystore.c +++ b/cde/lib/DtSearch/raima/keystore.c @@ -52,6 +52,7 @@ /* Store optional key value */ +int d_keystore(field TASK_PARM DBN_PARM) long field; /* key field constant */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/libfcns.c b/cde/lib/DtSearch/raima/libfcns.c index 1bf5677de..db6b866e7 100644 --- a/cde/lib/DtSearch/raima/libfcns.c +++ b/cde/lib/DtSearch/raima/libfcns.c @@ -71,6 +71,7 @@ static int ctblcmp(P1(CONST unsigned char FAR*) #ifndef ONE_DB /* Check for valid db number and set curr_db, curr_db_table and curr_rn_table */ +int dbn_check(dbn) int dbn; { @@ -93,6 +94,7 @@ int dbn; /* Check for valid (external) set number and return (internal) set number and set_table pointer. */ +int nset_check(nset, set, set_ptr ) register int nset; int *set; @@ -110,6 +112,7 @@ SET_ENTRY FAR * FAR *set_ptr; /* Check for valid (external) field number and return (internal) record and field numbers and pointers. */ +int nfld_check(nfld, rec, fld, rec_ptr, fld_ptr ) long nfld; int *rec; @@ -134,6 +137,7 @@ FIELD_ENTRY FAR * FAR *fld_ptr; /* Check for valid (external) record number and return (internal) record number and pointer. */ +int nrec_check(nrec, rec, rec_ptr) int nrec; int *rec; @@ -301,7 +305,7 @@ CONST char FAR *f2; /* pointer to field 2 */ (sfld_ptr < fld_max) && (sfld_ptr->fd_flags & STRUCTFLD); ++sfld_ptr) { sub_len = cur_len + sfld_ptr->fd_ptr - fld_ptr->fd_ptr; - if (k = fldcmp(sfld_ptr, f1 + sub_len, f2 + sub_len)) + if ((k = fldcmp(sfld_ptr, f1 + sub_len, f2 + sub_len))) return ( k ); } } @@ -312,7 +316,7 @@ CONST char FAR *f2; /* pointer to field 2 */ (--kt_lc >= 0) && (&field_table[key_ptr->kt_key] == fld_ptr); ++key_ptr) { i = key_ptr->kt_ptr; - if ( k = fldcmp(&field_table[key_ptr->kt_field], f1 + i, f2 + i) ) + if (( k = fldcmp(&field_table[key_ptr->kt_field], f1 + i, f2 + i) )) return ( k ); } return ( 0 ); @@ -365,6 +369,7 @@ CONST DB_ADDR FAR *d1, FAR *d2; /* check for empty DB_ADDR */ +int null_dba( db_addr ) CONST char FAR *db_addr; { @@ -377,6 +382,7 @@ CONST char FAR *db_addr; /* check for valid DB_ADDR */ +int check_dba( dba ) DB_ADDR dba; { @@ -419,14 +425,14 @@ int n; /* Max. String length */ f2 = db_global.country_tbl.ptr[*t].sort_as1; else f2 = *t; - if (x = f1 - f2) return(x); + if ((x = f1 - f2)) return(x); /* Check sort_as2-values if sort_as1-values are equal */ /*----------------------------------------------------*/ x1 = db_global.country_tbl.ptr[*s].sort_as2; x2 = db_global.country_tbl.ptr[*t].sort_as2; if ( x1 && x2 ) { /* We have an entry for char. of both strings */ - if ( x = x1 - x2 ) return(x); + if (( x = x1 - x2 )) return(x); } else { if ( x1 || x2 ) { /* Only sort_as2 value for one string */ @@ -435,21 +441,21 @@ int n; /* Max. String length */ if ( db_global.country_tbl.ptr[*t].sort_as1 ) f2 = db_global.country_tbl.ptr[*t].sort_as1; else f2 = *t; - if ( x = x1 - f2 ) return(x); + if (( x = x1 - f2 )) return(x); } if ( x2 ) { *s++; /* Compare with next character in string 1 */ if ( db_global.country_tbl.ptr[*s].sort_as1 ) f1 = db_global.country_tbl.ptr[*s].sort_as1; else f1 = *s; - if ( x = f1 - x2 ) return(x); + if (( x = f1 - x2 )) return(x); } } /* if both are equal compare sub_sort values */ /*-------------------------------------------*/ - if (x = db_global.country_tbl.ptr[*s].sub_sort - - db_global.country_tbl.ptr[*t].sub_sort) + if ((x = db_global.country_tbl.ptr[*s].sub_sort - + db_global.country_tbl.ptr[*t].sub_sort)) return(x); } *s++; diff --git a/cde/lib/DtSearch/raima/makenew.c b/cde/lib/DtSearch/raima/makenew.c index bb7e4866c..ccbac7c3b 100644 --- a/cde/lib/DtSearch/raima/makenew.c +++ b/cde/lib/DtSearch/raima/makenew.c @@ -53,6 +53,7 @@ /* Set the value of a key field */ +int d_setkey( field, fldvalue TASK_PARM DBN_PARM ) long field; CONST char FAR *fldvalue; @@ -134,6 +135,7 @@ int sk_free() /* Create a new empty record */ +int d_makenew( nrec TASK_PARM DBN_PARM ) int nrec; TASK_DECL diff --git a/cde/lib/DtSearch/raima/members.c b/cde/lib/DtSearch/raima/members.c index cc0fc7070..cbdf3cd9f 100644 --- a/cde/lib/DtSearch/raima/members.c +++ b/cde/lib/DtSearch/raima/members.c @@ -50,6 +50,7 @@ /* Get number of members of the current set owner */ +int d_members(set, tot TASK_PARM DBN_PARM) int set; /* Set table entry */ LONG FAR *tot; /* total members of set */ diff --git a/cde/lib/DtSearch/raima/opens.c b/cde/lib/DtSearch/raima/opens.c index a22f28792..35b6f1198 100644 --- a/cde/lib/DtSearch/raima/opens.c +++ b/cde/lib/DtSearch/raima/opens.c @@ -49,6 +49,7 @@ #include #include +#include #include "vista.h" #ifdef MSC #include diff --git a/cde/lib/DtSearch/raima/options.c b/cde/lib/DtSearch/raima/options.c index 909e16bd9..f0d15f6f9 100644 --- a/cde/lib/DtSearch/raima/options.c +++ b/cde/lib/DtSearch/raima/options.c @@ -43,6 +43,7 @@ /* Turn on db_VISTA runtime options */ +int d_on_opt(optflag TASK_PARM) int optflag; TASK_DECL @@ -75,6 +76,7 @@ TASK_DECL /* Turn off db_VISTA runtime options */ +int d_off_opt(optflag TASK_PARM) int optflag; TASK_DECL diff --git a/cde/lib/DtSearch/raima/recfcns.c b/cde/lib/DtSearch/raima/recfcns.c index 523d1e965..79a4dac7e 100644 --- a/cde/lib/DtSearch/raima/recfcns.c +++ b/cde/lib/DtSearch/raima/recfcns.c @@ -70,6 +70,7 @@ static int struct_key_chk = 1; /* Check a field for permission to change it */ +int r_chkfld(field, fld_ptr, rec, data ) INT field; /* field_table entry number */ FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */ @@ -138,6 +139,7 @@ CONST char FAR *data; /* pointer to data area containing field contents */ /* Delete the current record */ +int r_delrec( rt, db_addr ) INT rt; DB_ADDR db_addr; @@ -197,6 +199,7 @@ DB_ADDR db_addr; /* Get data field from record */ +int r_gfld(fld_ptr, rec, data ) FIELD_ENTRY FAR *fld_ptr; char FAR *rec; /* pointer to record */ @@ -250,6 +253,7 @@ char FAR *data; /* pointer to data area to contain field contents */ /* Get member pointer from record */ +int r_gmem(set, rec, mem_addr ) int set; /* set table entry number */ char FAR *rec; /* pointer to record */ @@ -281,6 +285,7 @@ char FAR *mem_addr; /* pointer to member pointer */ /* Get set pointer from record */ +int r_gset(set, rec, setptr ) int set; /* set table entry number */ char FAR *rec; /* pointer to record */ @@ -308,6 +313,7 @@ char FAR *setptr; /* pointer to set pointer */ /* Put data field into record */ +int r_pfld(field, fld_ptr, rec, data, db_addr ) INT field; /* field_table entry number */ FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */ @@ -431,6 +437,7 @@ DB_ADDR FAR *db_addr; /* Put member pointer into record */ +int r_pmem(set, rec, mem_addr ) int set; /* set table entry number */ char FAR *rec; /* pointer to record */ @@ -462,6 +469,7 @@ char FAR *mem_addr; /* pointer to member pointer */ /* Put set pointer into record */ +int r_pset(set, rec, setptr ) int set; /* set table entry number */ char FAR *rec; /* pointer to record */ @@ -491,6 +499,7 @@ char FAR *setptr; /* pointer to set pointer */ /* Set the current set member from record */ +int r_smem( db_addr, set ) DB_ADDR FAR *db_addr; INT set; @@ -528,6 +537,7 @@ INT set; } /* Set the optional key field "stored" bit */ +int r_setopt( fld_ptr, rec ) FIELD_ENTRY FAR *fld_ptr; /* field table entry of optional key */ char FAR *rec; /* Pointer to record */ @@ -555,6 +565,7 @@ char FAR *rec; /* Pointer to record */ } /* Clear the optional key field "stored" bit */ +int r_clropt( fld_ptr, rec ) FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */ char FAR *rec; /* Pointer to record */ @@ -582,6 +593,7 @@ char FAR *rec; /* Pointer to record */ } /* Test the optional key field "stored" bit */ +int r_tstopt( fld_ptr, rec ) FIELD_ENTRY FAR *fld_ptr; /* Field table entry of optional key */ char FAR *rec; /* Pointer to record */ diff --git a/cde/lib/DtSearch/raima/recfrst.c b/cde/lib/DtSearch/raima/recfrst.c index c7466ff28..bd52965c8 100644 --- a/cde/lib/DtSearch/raima/recfrst.c +++ b/cde/lib/DtSearch/raima/recfrst.c @@ -48,6 +48,7 @@ /* Find first record of type */ +int d_recfrst( rec TASK_PARM DBN_PARM ) int rec; /* record type/table entry */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/recnext.c b/cde/lib/DtSearch/raima/recnext.c index c16fde31a..39b344690 100644 --- a/cde/lib/DtSearch/raima/recnext.c +++ b/cde/lib/DtSearch/raima/recnext.c @@ -49,6 +49,7 @@ /* Find next record of type */ +int d_recnext(TASK_DBN_ONLY) TASK_DECL DBN_DECL diff --git a/cde/lib/DtSearch/raima/recread.c b/cde/lib/DtSearch/raima/recread.c index 5975f41bf..18c9e1f5d 100644 --- a/cde/lib/DtSearch/raima/recread.c +++ b/cde/lib/DtSearch/raima/recread.c @@ -51,6 +51,7 @@ /* Read contents of current record */ +int d_recread(rec TASK_PARM DBN_PARM) char FAR *rec; /* ptr to record area */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/recwrite.c b/cde/lib/DtSearch/raima/recwrite.c index 7b3c518ca..6c5de2c01 100644 --- a/cde/lib/DtSearch/raima/recwrite.c +++ b/cde/lib/DtSearch/raima/recwrite.c @@ -51,6 +51,7 @@ /* Write contents to current record */ +int d_recwrite(rec TASK_PARM DBN_PARM) CONST char FAR *rec; /* ptr to record area */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/renfile.c b/cde/lib/DtSearch/raima/renfile.c index a735c82e1..2dbf56e00 100644 --- a/cde/lib/DtSearch/raima/renfile.c +++ b/cde/lib/DtSearch/raima/renfile.c @@ -46,6 +46,7 @@ /* Rename database file */ +int d_renfile(dbn, fno, fnm TASK_PARM) CONST char FAR *dbn; /* database containing file to be renamed */ FILE_NO fno; /* file id number for file to be renamed */ @@ -86,6 +87,7 @@ TASK_DECL /* Process renamed file table */ +int renfiles() { register int dbt_lc; /* loop control */ diff --git a/cde/lib/DtSearch/raima/rwcurr.c b/cde/lib/DtSearch/raima/rwcurr.c index fad53b586..c14d7ef64 100644 --- a/cde/lib/DtSearch/raima/rwcurr.c +++ b/cde/lib/DtSearch/raima/rwcurr.c @@ -57,6 +57,7 @@ static DB_ADDR_P Cb = POINTER_INIT(); /* Read currency table */ +int d_rdcurr(currbuff, currsize TASK_PARM) DB_ADDR **currbuff; int FAR *currsize; @@ -106,6 +107,7 @@ TASK_DECL /* Write currency table */ +int d_wrcurr(currbuff TASK_PARM) DB_ADDR *currbuff; TASK_DECL diff --git a/cde/lib/DtSearch/raima/setdb.c b/cde/lib/DtSearch/raima/setdb.c index 3aae5bc63..818c58c57 100644 --- a/cde/lib/DtSearch/raima/setdb.c +++ b/cde/lib/DtSearch/raima/setdb.c @@ -52,6 +52,7 @@ #ifndef ONE_DB /* Set current database */ +int d_setdb(dbn TASK_PARM) int dbn; /* database number */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/setmm.c b/cde/lib/DtSearch/raima/setmm.c index 45ee51898..3265b0134 100644 --- a/cde/lib/DtSearch/raima/setmm.c +++ b/cde/lib/DtSearch/raima/setmm.c @@ -49,6 +49,7 @@ /* Set current member to current member */ +int d_setmm(sett, sets TASK_PARM DBN_PARM) int sett; /* set table entry number of target member */ int sets; /* set table entry number of source member */ diff --git a/cde/lib/DtSearch/raima/setmo.c b/cde/lib/DtSearch/raima/setmo.c index c0ad2ba56..869c6b804 100644 --- a/cde/lib/DtSearch/raima/setmo.c +++ b/cde/lib/DtSearch/raima/setmo.c @@ -49,6 +49,7 @@ /* Set current member to current owner */ +int d_setmo(setm, seto TASK_PARM DBN_PARM) int setm; /* set table entry number of member */ int seto; /* set table entry number of owner */ diff --git a/cde/lib/DtSearch/raima/setmr.c b/cde/lib/DtSearch/raima/setmr.c index a6853de3a..9364e984a 100644 --- a/cde/lib/DtSearch/raima/setmr.c +++ b/cde/lib/DtSearch/raima/setmr.c @@ -49,6 +49,7 @@ /* Set current member to current record */ +int d_setmr(set TASK_PARM DBN_PARM) int set; /* set table entry number */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/setom.c b/cde/lib/DtSearch/raima/setom.c index d8052061f..4542c3a7c 100644 --- a/cde/lib/DtSearch/raima/setom.c +++ b/cde/lib/DtSearch/raima/setom.c @@ -50,6 +50,7 @@ /* Set current owner to current member */ +int d_setom(nseto, nsetm TASK_PARM DBN_PARM) int nseto; /* set table entry number of owner */ int nsetm; /* set table entry number of member */ diff --git a/cde/lib/DtSearch/raima/setoo.c b/cde/lib/DtSearch/raima/setoo.c index af508f922..ea3128af4 100644 --- a/cde/lib/DtSearch/raima/setoo.c +++ b/cde/lib/DtSearch/raima/setoo.c @@ -50,6 +50,7 @@ /* Set current owner to current owner */ +int d_setoo(nsett, nsets TASK_PARM DBN_PARM) int nsett; /* set table entry number of target owner */ int nsets; /* set table entry number of source owner */ diff --git a/cde/lib/DtSearch/raima/setor.c b/cde/lib/DtSearch/raima/setor.c index 47635bde4..106ca4854 100644 --- a/cde/lib/DtSearch/raima/setor.c +++ b/cde/lib/DtSearch/raima/setor.c @@ -49,6 +49,7 @@ /* Set current owner to current record */ +int d_setor(nset TASK_PARM DBN_PARM) int nset; /* set number */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/setrm.c b/cde/lib/DtSearch/raima/setrm.c index c47bf6c0e..6d823261f 100644 --- a/cde/lib/DtSearch/raima/setrm.c +++ b/cde/lib/DtSearch/raima/setrm.c @@ -49,6 +49,7 @@ /* Set current record to current member */ +int d_setrm(set TASK_PARM DBN_PARM) int set; /* set table entry number */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/setro.c b/cde/lib/DtSearch/raima/setro.c index c898523f6..6c689c6f0 100644 --- a/cde/lib/DtSearch/raima/setro.c +++ b/cde/lib/DtSearch/raima/setro.c @@ -49,6 +49,7 @@ /* Set current record to current owner */ +int d_setro(set TASK_PARM DBN_PARM) int set; /* set table entry number */ TASK_DECL diff --git a/cde/lib/DtSearch/raima/vista.h b/cde/lib/DtSearch/raima/vista.h index 5e79dfe57..ee29579e5 100644 --- a/cde/lib/DtSearch/raima/vista.h +++ b/cde/lib/DtSearch/raima/vista.h @@ -395,4 +395,5 @@ typedef struct { #ifdef MULTI_TASK #include "task.h" #endif + /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC vista.h */ diff --git a/cde/lib/DtSearch/readchar.c b/cde/lib/DtSearch/readchar.c index 14e4c7d2c..438444a28 100644 --- a/cde/lib/DtSearch/readchar.c +++ b/cde/lib/DtSearch/readchar.c @@ -59,6 +59,7 @@ * Initial revision */ #include "SearchP.h" +#include #include #define PROGNAME "READCHAR" diff --git a/cde/lib/DtSearch/userint.c b/cde/lib/DtSearch/userint.c index 2036ef7bd..1bd4b3bf0 100644 --- a/cde/lib/DtSearch/userint.c +++ b/cde/lib/DtSearch/userint.c @@ -105,7 +105,9 @@ void init_user_interrupt (void) signal (SIGKILL, flag_shutdown); /* kill -9, cannot be trapped */ signal (SIGALRM, flag_shutdown); /* called alarm() polling timer */ signal (SIGTERM, flag_shutdown); /* kill [-15], sfwr terminate */ +#ifdef SIGPWR signal (SIGPWR, flag_shutdown); /* power failure imminent */ +#endif signal (SIGUSR1, flag_shutdown); /* kill -30, "pings" OE */ #ifdef _AIX signal (SIGXCPU, flag_shutdown); /* cpu time limit exceeded */ diff --git a/cde/lib/DtSearch/vedelete.c b/cde/lib/DtSearch/vedelete.c index d32168f1d..c77b2817e 100644 --- a/cde/lib/DtSearch/vedelete.c +++ b/cde/lib/DtSearch/vedelete.c @@ -63,6 +63,7 @@ */ #include "SearchE.h" #include +#include #include "vista.h" #define PROGNAME "VEDELETE" diff --git a/cde/lib/DtSearch/vestatis.c b/cde/lib/DtSearch/vestatis.c index a1c23f928..bf4372318 100644 --- a/cde/lib/DtSearch/vestatis.c +++ b/cde/lib/DtSearch/vestatis.c @@ -96,6 +96,7 @@ #define MEMORY_SIZE 64000 /* 65536 is 64 KBytes of memory */ #define REC_TYPES 256 #define NORM_VALUE 30 +#undef INFINITY /* XXX does GCC's __builtin_inff() work here? */ #define INFINITY 9999.0 #define SORT_MESG 10000 #define CHAR_BITS 8 diff --git a/cde/lib/DtSvc/DtCodelibs/buf.C b/cde/lib/DtSvc/DtCodelibs/buf.C index 13abb899b..e13e20209 100644 --- a/cde/lib/DtSvc/DtCodelibs/buf.C +++ b/cde/lib/DtSvc/DtCodelibs/buf.C @@ -118,7 +118,8 @@ _SHXbuf::reset(boolean g, boolean comp) char ** _SHXbuf::vector() { - for (int i = 0; i < vec.size(); i++) + int i; + for (i = 0; i < vec.size(); i++) vec[i] = &buf[long(vec[i])]; vec[i] = NULL; diff --git a/cde/lib/DtSvc/DtCodelibs/filegen.C b/cde/lib/DtSvc/DtCodelibs/filegen.C index e29f1c3cd..ad8c8de4b 100644 --- a/cde/lib/DtSvc/DtCodelibs/filegen.C +++ b/cde/lib/DtSvc/DtCodelibs/filegen.C @@ -272,10 +272,11 @@ _SHXbuf::filegen() // Find the longest match if we are doing completion: if (completion) { + long i; // compare all entries to a copy of the first entry strcpy(filebuf, &bufptr[long(vec[0])]); - for (long i = 1; i < vec.size(); i++) + for (i = 1; i < vec.size(); i++) { register char *ref = filebuf; register char *ptr = &bufptr[long(vec[i])]; diff --git a/cde/lib/DtSvc/DtEncap/spc-termio.c b/cde/lib/DtSvc/DtEncap/spc-termio.c index 033453a35..89b7b4e5f 100644 --- a/cde/lib/DtSvc/DtEncap/spc-termio.c +++ b/cde/lib/DtSvc/DtEncap/spc-termio.c @@ -36,7 +36,7 @@ #include #include -#if !defined(linux) +#if !defined(linux) && !defined(CSRG_BASED) #include #endif #include @@ -145,6 +145,7 @@ static struct modes_s Output_modes[] = { "OCRNL", OCRNL, "ONOCR", ONOCR, "ONLRET", ONLRET, +#if !defined(CSRG_BASED) "OFILL", OFILL, "OFDEL", OFDEL, "NLDLY", NLDLY, @@ -169,6 +170,7 @@ static struct modes_s Output_modes[] = { "FFDLY", FFDLY, "FF0", FF0, "FF1", FF1, +#endif END_OF_LIST, 0 }; diff --git a/cde/lib/DtSvc/DtUtil1/CmdMain.c b/cde/lib/DtSvc/DtUtil1/CmdMain.c index 00e64ec1b..d57a2f4ee 100644 --- a/cde/lib/DtSvc/DtUtil1/CmdMain.c +++ b/cde/lib/DtSvc/DtUtil1/CmdMain.c @@ -43,7 +43,7 @@ #ifdef __apollo #include "/sys5/usr/include/sys/termio.h" #else -#include +#include #endif #include #include @@ -989,7 +989,7 @@ _DtCmdCommandInvokerExecute ( if (commandPid == 0) { -#if defined(__hp_osf) || defined(__osf__) +#if defined(__hp_osf) || defined(__osf__) || defined(CSRG_BASED) setsid() ; #else (void) setpgrp (); diff --git a/cde/lib/DtSvc/DtUtil1/DbLoad.c b/cde/lib/DtSvc/DtUtil1/DbLoad.c index 7f0e242be..b0b753d15 100644 --- a/cde/lib/DtSvc/DtUtil1/DbLoad.c +++ b/cde/lib/DtSvc/DtUtil1/DbLoad.c @@ -104,6 +104,8 @@ extern void _DtDtsSeqReset(void); extern int _DtDtsNextDCSeq(void); extern int _DtDtsNextDASeq(void); +char **_DtsDbListDb(void); + int use_in_memory_db = False; static void diff --git a/cde/lib/DtSvc/DtUtil1/DbReader.c b/cde/lib/DtSvc/DtUtil1/DbReader.c index 5916da644..e6ac28ee4 100644 --- a/cde/lib/DtSvc/DtUtil1/DbReader.c +++ b/cde/lib/DtSvc/DtUtil1/DbReader.c @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include diff --git a/cde/lib/DtSvc/DtUtil1/Dts.c b/cde/lib/DtSvc/DtUtil1/Dts.c index 4c61d8a97..4b5956c80 100644 --- a/cde/lib/DtSvc/DtUtil1/Dts.c +++ b/cde/lib/DtSvc/DtUtil1/Dts.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -59,6 +58,10 @@ * On HP MAXINT is defined in both and */ #undef MAXINT +#elif defined(CSRG_BASED) +#define MAXINT INT_MAX +#else +#include #endif #include #include diff --git a/cde/lib/DtSvc/DtUtil1/MMDb.c b/cde/lib/DtSvc/DtUtil1/MMDb.c index c5b70b6d3..50ffc5913 100644 --- a/cde/lib/DtSvc/DtUtil1/MMDb.c +++ b/cde/lib/DtSvc/DtUtil1/MMDb.c @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/cde/lib/DtSvc/DtUtil1/intarray.c b/cde/lib/DtSvc/DtUtil1/intarray.c index 044c62524..f4e31c10b 100644 --- a/cde/lib/DtSvc/DtUtil1/intarray.c +++ b/cde/lib/DtSvc/DtUtil1/intarray.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include "DtHash.h" #include "DtShmDb.h" diff --git a/cde/lib/DtSvc/DtUtil1/inttab.c b/cde/lib/DtSvc/DtUtil1/inttab.c index 53a7ac596..98e43668b 100644 --- a/cde/lib/DtSvc/DtUtil1/inttab.c +++ b/cde/lib/DtSvc/DtUtil1/inttab.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "DtHash.h" #include "DtShmDb.h" diff --git a/cde/lib/DtSvc/DtUtil2/XlationSvc.c b/cde/lib/DtSvc/DtUtil2/XlationSvc.c index 4d7dc3dd4..cbb6982d1 100644 --- a/cde/lib/DtSvc/DtUtil2/XlationSvc.c +++ b/cde/lib/DtSvc/DtUtil2/XlationSvc.c @@ -2197,7 +2197,7 @@ int _DtXlateGetXlateEnv( /* then look up version number of execution host */ if (ret_AppExecEnvVersion) { -#if defined(sun) || defined(_AIX) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(sun) || defined(_AIX) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) char version[SYS_NMLN+SYS_NMLN+2]; #else char version[UTSLEN+UTSLEN+2]; @@ -2250,7 +2250,7 @@ int _DtXlateGetXlateEnv( #error OSMAJORVERSION and/or OSMINORVERSION not defined #endif -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) sprintf(buf,"%s%s%s", STR(OSMAJORVERSION), nl_langinfo('.'), STR(OSMINORVERSION)); #else diff --git a/cde/lib/DtSvc/include/bms/sbstdinc.h b/cde/lib/DtSvc/include/bms/sbstdinc.h index 05711f1b5..ed5ae36bf 100644 --- a/cde/lib/DtSvc/include/bms/sbstdinc.h +++ b/cde/lib/DtSvc/include/bms/sbstdinc.h @@ -59,7 +59,7 @@ /************************************************************************/ /* Domain/OS BSD has bzero(), bcmp(), and bcopy() defined. */ -#if !defined(apollo) || !defined(__bsd) +#if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED) #if defined(__STDC__) #if !defined(linux) && !defined(__osf__) && !defined(_XFUNCS_H_) diff --git a/cde/lib/DtSvc/include/codelibs/dynarray.h b/cde/lib/DtSvc/include/codelibs/dynarray.h index 8c2e88c0b..51f03cd26 100644 --- a/cde/lib/DtSvc/include/codelibs/dynarray.h +++ b/cde/lib/DtSvc/include/codelibs/dynarray.h @@ -36,10 +36,10 @@ #ifndef __DYNARRAY_H_ #define __DYNARRAY_H_ -#if !defined(linux) +#if !defined(linux) && !defined(CSRG_BASED) #include #endif -#if defined(USL) || defined(__uxp__) || defined(__osf__) || defined(sun) || defined(linux) +#if defined(USL) || defined(__uxp__) || defined(__osf__) || defined(sun) || defined(linux) || defined(CSRG_BASED) #define _DELETE_ARRAY(sz) delete[] #else #define _DELETE_ARRAY(sz) delete[(sz)] diff --git a/cde/lib/DtSvc/include/codelibs/privbuf.h b/cde/lib/DtSvc/include/codelibs/privbuf.h index e3a538bbf..23f78407e 100644 --- a/cde/lib/DtSvc/include/codelibs/privbuf.h +++ b/cde/lib/DtSvc/include/codelibs/privbuf.h @@ -48,7 +48,7 @@ typedef void (*privbuf_func)(void *v); #include #include -#if defined(__osf__) || defined(sun) || defined(linux) +#if defined(__osf__) || defined(sun) || defined(linux) || defined(CSRG_BASED) // The DEC C++ compiler rejects valid inline declarations, claiming // they have both internal and external linkage. #else diff --git a/cde/lib/DtSvc/include/codelibs/stringx.h b/cde/lib/DtSvc/include/codelibs/stringx.h index 6ccc6cea7..346f38455 100644 --- a/cde/lib/DtSvc/include/codelibs/stringx.h +++ b/cde/lib/DtSvc/include/codelibs/stringx.h @@ -75,7 +75,7 @@ extern "C" #ifdef __cplusplus char *strtokx(char *&ptr, const char *sep); -# if !defined(__osf__) && !defined(linux) +# if !defined(__osf__) && !defined(linux) && !defined(CSRG_BASED) char **strsep(const char *str, const char *sep, boolean whsp = TRUE, int *num = NULL); # if !defined(__osf__) @@ -85,7 +85,7 @@ extern "C" #else /* __STDC__ */ char *strtokx(char **ptr, const char *sep); -# if !defined(linux) +# if !defined(linux) && !defined(CSRG_BASED) char **strsep(const char *str, const char *sep, boolean whsp, int *num); #endif @@ -125,7 +125,7 @@ extern size_t nl_strlen(); /* __OBSOLETE */ #if defined(__cplusplus) } -#if defined(apollo) || defined(__aix) || defined(USL) || defined(__uxp__) || defined(__osf__) +#if defined(apollo) || defined(__aix) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #else #include @@ -137,7 +137,7 @@ inline void strfree(const char *s) { if (s != NULL) free((char *)s); } #else inline void strfree(const char *s) -#if defined(__hpux) || defined(__osf__) +#if defined(__hpux) || defined(__osf__) || defined(CSRG_BASED) { if (s != NULL) free((void *)s); } #else { if (s != NULL) free((const void *)s); } diff --git a/cde/lib/DtTerm/Imakefile b/cde/lib/DtTerm/Imakefile index 8d502d7f7..f4d86a669 100644 --- a/cde/lib/DtTerm/Imakefile +++ b/cde/lib/DtTerm/Imakefile @@ -25,6 +25,11 @@ INCLUDES = -I. -I./TermPrim -I./Term -I./TermView REQUIREDLIBS = SharedDtTermReqs #endif +/* for openpty */ +#if defined(OpenBSDArchitecture) +REQUIREDLIBS += -lutil +#endif + TERMPRIM_OBJS = \ TermPrim/TermPrim.o \ TermPrim/TermPrimAction.o \ diff --git a/cde/lib/DtTerm/Term/TermParse.c b/cde/lib/DtTerm/Term/TermParse.c index 2d41043c6..554c6a246 100644 --- a/cde/lib/DtTerm/Term/TermParse.c +++ b/cde/lib/DtTerm/Term/TermParse.c @@ -57,7 +57,11 @@ static char rcs_id[] = "$TOG: TermParse.c /main/3 1999/10/15 12:25:13 mgreess $" */ #undef MAXINT #endif -#include +#if defined(CSRG_BASED) +#define MAXSHORT SHRT_MAX +#else +#include +#endif #if defined(USL) || defined(__uxp__) #include diff --git a/cde/lib/DtTerm/TermPrim/Imakefile b/cde/lib/DtTerm/TermPrim/Imakefile index 4fceb3ca9..286bcd8ee 100644 --- a/cde/lib/DtTerm/TermPrim/Imakefile +++ b/cde/lib/DtTerm/TermPrim/Imakefile @@ -109,6 +109,10 @@ LinkFile(TermPrimGetPty.c,TermPrimGetPty-svr4.c) LinkFile(TermPrimGetPty.c,TermPrimGetPty-svr4.c) #endif +#ifdef OpenBSDArchitecture +LinkFile(TermPrimGetPty.c,TermPrimGetPty-bsd.c) +#endif + SubdirLibraryRule($(OBJS)) DependTarget() diff --git a/cde/lib/DtTerm/TermPrim/TermHeader.h b/cde/lib/DtTerm/TermPrim/TermHeader.h index fcee6e3c8..d955c4dcd 100644 --- a/cde/lib/DtTerm/TermPrim/TermHeader.h +++ b/cde/lib/DtTerm/TermPrim/TermHeader.h @@ -44,7 +44,7 @@ #include #include -#if defined(linux) || defined(UXPArchitecture) || (defined(USL) && (OSMAJORVERSION > 1)) +#if defined(linux) || defined(UXPArchitecture) || (defined(USL) && (OSMAJORVERSION > 1)) || defined(CSRG_BASED) #define _NFILE FOPEN_MAX #endif diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c index ee7fe6011..8507cdf3b 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c @@ -37,6 +37,9 @@ static char rcs_id[] = "$XConsortium: TermPrimGetPty-bsd.c /main/4 1996/11/21 19 #include "TermHeader.h" #include #include +#if defined(OPENBSD_ARCHITECTURE) +#include +#endif #include #include #include @@ -166,7 +169,7 @@ static struct _pty_dirs { {PTY_null, PTY_null, PTY_null, PTY_null, PTY_null, False}, }; -#ifdef ALPHA_ARCHITECTURE +#if defined(ALPHA_ARCHITECTURE) || defined(OPENBSD_ARCHITECTURE) /* Use openpty() to open Master/Slave pseudo-terminal pair */ /* Current version of openpty() uses non-STREAM device. BSD name space */ #define TTYNAMELEN 25 @@ -254,7 +257,11 @@ GetPty(char **ptySlave, char **ptyMaster) * name for the tty that everyone else will * use... */ +#if defined(XTHREADS) if (c1 = _XTtyname(ttyFd, tty_buf)) { +#else + if (c1 = _XTtyname(ttyFd)) { +#endif ttyDev = realloc(ttyDev, strlen(c1) + 1); (void) strcpy(ttyDev, c1); } diff --git a/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h b/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h index 47061d717..e5a7b7767 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h +++ b/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h @@ -96,6 +96,12 @@ # define USE_TCSENDBREAK /* use tiocbreak() */ #endif /* LINUX_ARCHITECTURE */ +#ifdef OPENBSD_ARCHITECTURE +# define HAS_SETEUID /* seteuid available */ +# define HAS_SETREUID /* setreuid available */ +# define USE_TCSENDBREAK /* use tiocbreak() */ +#endif /* OPENBSD_ARCHITECTURE */ + #ifdef SUN_ARCHITECTURE # define XOR_CAPS_LOCK /* xor caps lock and shift */ # define USE_SRIOCSREDIR /* use SRIOCSREDIR ioctl for -C */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimParser.c b/cde/lib/DtTerm/TermPrim/TermPrimParser.c index 98c606b85..f3a6ab7ea 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimParser.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimParser.c @@ -47,7 +47,11 @@ static char rcs_id[] = "$TOG: TermPrimParser.c /main/2 1999/10/15 12:23:41 mgree */ #undef MAXINT #endif -#include +#if defined(CSRG_BASED) +#define MAXINT INT_MAX +#else +#include +#endif #ifdef BBA #pragma BBA_IGNORE diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c b/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c index 18e84a682..49fc8c9de 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c @@ -109,6 +109,17 @@ static char rcs_id[] = "$TOG: TermPrimSetPty.c /main/2 1998/04/03 17:11:24 mgree #define XTTYMODE_weras 14 #define XTTYMODE_lnext 15 #define NXTTYMODES 16 + +#if defined(CSRG_BASED) +#define TAB3 0x00000000 +#define NLDLY 0x00000000 +#define CRDLY 0x00000000 +#define TABDLY 0x00000000 +#define BSDLY 0x00000000 +#define VTDLY 0x00000000 +#define FFDLY 0x00000000 +#define CBAUD 0x00000000 +#endif typedef struct _ttyMode { char *name; diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c index 5619780d8..4328bd25a 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c @@ -332,6 +332,7 @@ _DtTermPrimUtmpGetUtLine(int pty, char *ptyName) static char * UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine) { +#if !defined(CSRG_BASED) /* XXX */ DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w; struct termData *tpd = tw->term.tpd; struct utmp ut; @@ -489,6 +490,9 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine) /* failure... */ (void) endutent(); return((char *) 0); +#else /* __OpenBSD__ */ + return(utmpLine); +#endif } /* this is a public wrapper around the previous function that runs the @@ -511,6 +515,7 @@ _DtTermPrimUtmpEntryCreate(Widget w, pid_t pid, char *utmpLine) static void UtmpEntryDestroy(Widget w, char *utmpLine) { +#if !defined(CSRG_BASED) struct utmp ut; struct utmp *utPtr; time_t now; @@ -537,6 +542,7 @@ UtmpEntryDestroy(Widget w, char *utmpLine) (void) endutent(); (void) DeleteUtmpInfo(utmpLine); +#endif /* !__OpenBSD__ */ } /* this is a public wrapper around the previous function that runs the diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c b/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c index b1d706c74..207381add 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c @@ -38,7 +38,7 @@ static char rcs_id[] = "$TOG: TermPrimSubproc.c /main/11 1998/04/20 12:45:57 mgr #include "TermHeader.h" #include -#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_ARCHITECTURE) || defined(LINUX_ARCHITECTURE) +#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) /* For TIOCSTTY definitions */ #include #endif /* ALPHA_ARCHITECTURE */ @@ -461,7 +461,7 @@ _DtTermPrimSubprocExec(Widget w, /* child... */ _DtTermProcessUnlock(); -#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_ARCHITECTURE) || defined(LINUX_ARCHITECTURE) +#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) /* establish a new session for child */ setsid(); #else @@ -482,7 +482,7 @@ _DtTermPrimSubprocExec(Widget w, (void) _exit(1); } -#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_ARCHITECTURE) || defined(LINUX_ARCHITECTURE) +#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) /* BSD needs to do this to acquire pty as controlling terminal */ if (ioctl(pty, TIOCSCTTY, (char *)NULL) < 0) { (void) close(pty); diff --git a/cde/lib/DtTerm/TermPrim/TermPrimUtil.c b/cde/lib/DtTerm/TermPrim/TermPrimUtil.c index 608171db4..1d9a638da 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimUtil.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimUtil.c @@ -462,7 +462,7 @@ _DtTermPrimStartLog(Widget w) ** reset signals */ (void) signal(SIGHUP, SIG_DFL); - (void) signal(SIGCLD, SIG_DFL); + (void) signal(SIGCHLD, SIG_DFL); #ifdef BBA _bA_dump(); #endif /* BBA */ diff --git a/cde/lib/DtWidget/Editor.c b/cde/lib/DtWidget/Editor.c index c851ce20c..431dbb5b7 100644 --- a/cde/lib/DtWidget/Editor.c +++ b/cde/lib/DtWidget/Editor.c @@ -67,6 +67,8 @@ #elif defined(linux) # include # define NO_putwc +#elif defined(CSRG_BASED) +# include #endif /* linux */ #include diff --git a/cde/lib/DtWidget/Imakefile b/cde/lib/DtWidget/Imakefile index 67e2a4179..9c1a80f41 100644 --- a/cde/lib/DtWidget/Imakefile +++ b/cde/lib/DtWidget/Imakefile @@ -15,6 +15,8 @@ XCOMM $XConsortium: Imakefile /main/8 1996/04/21 19:11:16 drk $ DEFINES = DtWidgetDefines #if defined(LinuxArchitecture) INCLUDES = -I. -I/usr/include/freetype2 +#elif defined(OpenBSDArchitecture) +INCLUDES = -I. -I$(XPROJECTROOT)/include/freetype2 #else INCLUDES = -I. #endif diff --git a/cde/lib/csa/Imakefile b/cde/lib/csa/Imakefile index fe1b7851c..fccccdc8a 100644 --- a/cde/lib/csa/Imakefile +++ b/cde/lib/csa/Imakefile @@ -15,7 +15,7 @@ INCLUDES = -I. OSMAJORVERSION = OSMajorVersion OSMINORVERSION = OSMinorVersion -DEFINES = -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N -DSVR4 \ +DEFINES = -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N \ -DREL="$(OSMAJORVERSION)$(OSMINORVERSION)" \ -DRELMAJOR="$(OSMAJORVERSION)" -DRELMINOR="$(OSMINORVERSION)" diff --git a/cde/lib/csa/agent.wrapbegin b/cde/lib/csa/agent.wrapbegin index b1cdb339f..b11af6a21 100644 --- a/cde/lib/csa/agent.wrapbegin +++ b/cde/lib/csa/agent.wrapbegin @@ -5,7 +5,7 @@ #include #endif /* HPUX */ -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) # if defined __STDC__ # define REDEFINE_STDC # undef __STDC__ diff --git a/cde/lib/csa/convert2-4.c b/cde/lib/csa/convert2-4.c index ad7dfc26c..9d321521c 100644 --- a/cde/lib/csa/convert2-4.c +++ b/cde/lib/csa/convert2-4.c @@ -29,7 +29,6 @@ */ #include -#include #include #include #include "rtable2.h" diff --git a/cde/lib/csa/convert3-4.c b/cde/lib/csa/convert3-4.c index 44e45e750..7bc5c80a8 100644 --- a/cde/lib/csa/convert3-4.c +++ b/cde/lib/csa/convert3-4.c @@ -29,7 +29,6 @@ */ #include -#include #include #include #include "rtable3.h" diff --git a/cde/lib/csa/convert4-2.c b/cde/lib/csa/convert4-2.c index 40a6e9733..782db834c 100644 --- a/cde/lib/csa/convert4-2.c +++ b/cde/lib/csa/convert4-2.c @@ -29,7 +29,6 @@ */ #include -#include #include #include #include "rtable2.h" diff --git a/cde/lib/csa/convert4-3.c b/cde/lib/csa/convert4-3.c index 5009b5b60..881fb0822 100644 --- a/cde/lib/csa/convert4-3.c +++ b/cde/lib/csa/convert4-3.c @@ -29,7 +29,6 @@ */ #include -#include #include #include #include "rtable3.h" diff --git a/cde/lib/csa/convert4-5.c b/cde/lib/csa/convert4-5.c index 27a08bf81..dfca086db 100644 --- a/cde/lib/csa/convert4-5.c +++ b/cde/lib/csa/convert4-5.c @@ -144,12 +144,12 @@ _DtCm_appt4_to_attrs( ptr2 = (ptr1 ? strchr(ptr1, '.') : NULL); if (ptr1) { - sprintf(buf, "%d:%s%s%s", a4->appt_id.key, calname, + snprintf(buf, sizeof buf, "%d:%s%s%s", a4->appt_id.key, calname, (ptr2 == NULL ? "." : ""), (ptr2 == NULL ? _DtCmGetLocalDomain(ptr1+1) : "")); } else { - sprintf(buf, "%d:%s@%s", a4->appt_id.key, calname, + snprintf(buf, sizeof buf, "%d:%s@%s", a4->appt_id.key, calname, _DtCmGetHostAtDomain()); } opq.size = strlen(buf); @@ -450,43 +450,44 @@ _RepeatInfoToRule(Appt_4 *a4, cms_attribute_value **attrval) switch (a4->period.period) { case daily_4: - sprintf(buf, "D1 #%d ", duration); + snprintf(buf, sizeof buf, "D1 #%d ", duration); break; case weekly_4: - sprintf(buf, "W1 #%d ", duration); + snprintf(buf, sizeof buf, "W1 #%d ", duration); break; case biweekly_4: - sprintf(buf, "W2 #%d ", duration); + snprintf(buf, sizeof buf, "W2 #%d ", duration); break; case monthly_4: - sprintf(buf, "MD1 #%d ", duration); + snprintf(buf, sizeof buf, "MD1 #%d ", duration); break; case yearly_4: - sprintf(buf, "YM1 #%d ", duration); + snprintf(buf, sizeof buf, "YM1 #%d ", duration); break; case nthWeekday_4: - sprintf(buf, "MP1 #%d ", duration); + snprintf(buf, sizeof buf, "MP1 #%d ", duration); break; case everyNthDay_4: - sprintf(buf, "D%d #%d ", a4->period.nth, duration); + snprintf(buf, sizeof buf, "D%d #%d ", a4->period.nth, duration); break; case everyNthWeek_4: - sprintf(buf, "W%d #%d ", a4->period.nth, duration); + snprintf(buf, sizeof buf, "W%d #%d ", a4->period.nth, duration); break; case everyNthMonth_4: - sprintf(buf, "MD%d #%d ", a4->period.nth, duration); + snprintf(buf, sizeof buf, "MD%d #%d ", a4->period.nth, duration); break; case monThruFri_4: - sprintf(buf, "W1 MO TU WE TH FR #%d ", duration); + snprintf(buf, sizeof buf, "W1 MO TU WE TH FR #%d ", duration); break; case monWedFri_4: - sprintf(buf, "W1 MO WE FR #%d ", duration); + snprintf(buf, sizeof buf, "W1 MO WE FR #%d ", duration); break; case tueThur_4: - sprintf(buf, "W1 TU TH #%d ", duration); + snprintf(buf, sizeof buf, "W1 TU TH #%d ", duration); break; case daysOfWeek_4: - sprintf(buf, "W1 #%d ", duration); + snprintf(buf, sizeof buf, "W1 #%d ", duration); + /* XXX strcat is unsafe here */ if (a4->period.nth & 0x1) strcat(buf, "SU "); if (a4->period.nth & 0x2) strcat(buf, "MO "); if (a4->period.nth & 0x4) strcat(buf, "TU "); diff --git a/cde/lib/csa/iso8601.c b/cde/lib/csa/iso8601.c index 5893f33ff..ef7a55cce 100644 --- a/cde/lib/csa/iso8601.c +++ b/cde/lib/csa/iso8601.c @@ -44,7 +44,7 @@ set_timezone(char *tzname) if (tzname==NULL) system("unset TZ\n"); else { - sprintf(tzenv, "TZ=%s", tzname); + snprintf(tzenv, sizeof tzenv, "TZ=%s", tzname); (void) putenv(tzenv); tzset(); } diff --git a/cde/lib/csa/laccess.c b/cde/lib/csa/laccess.c index 2aea1a611..631f38d96 100644 --- a/cde/lib/csa/laccess.c +++ b/cde/lib/csa/laccess.c @@ -124,7 +124,7 @@ _DtCmIsSameUser(char *user1, char *user2) /* assume user2=user@host[.domain] */ if (str1 == NULL) { str1 = strchr(user1, '@'); - sprintf(buf, "%s.%s", ++str1, domain); + snprintf(buf, sizeof buf, "%s.%s", ++str1, domain); str1 = buf; } else { str1 = strchr(user1, '@'); diff --git a/cde/lib/csa/lutil.c b/cde/lib/csa/lutil.c index 78a9edc8f..1191c8617 100644 --- a/cde/lib/csa/lutil.c +++ b/cde/lib/csa/lutil.c @@ -29,6 +29,7 @@ * (c) Copyright 1993, 1994 Sun Microsystems, Inc. */ +#include #include #include #include @@ -115,7 +116,7 @@ _DtCmGetLocalDomain(char *hostname) ptr = domain; if (hostname == NULL) hostname = _DtCmGetLocalHost(); while (1) { - sprintf(buf, "%s.%s", hostname, ptr); + snprintf(buf, sizeof buf, "%s.%s", hostname, ptr); if ((cl = clnt_create(buf, 100068, 5, "udp")) == NULL) { ptr = strchr(ptr, '.'); if (ptr) @@ -145,9 +146,10 @@ _DtCmGetHostAtDomain() host = _DtCmGetLocalHost(); if (strchr(host, '.') == NULL) - sprintf(hostname, "%s.%s", host, + snprintf(hostname, BUFSIZ, "%s.%s", host, _DtCmGetLocalDomain(host)); else + /* XXX strcpy unsafe here */ strcpy(hostname, host); } diff --git a/cde/lib/csa/rpccalls.c b/cde/lib/csa/rpccalls.c index a23d067b1..30ac82e81 100644 --- a/cde/lib/csa/rpccalls.c +++ b/cde/lib/csa/rpccalls.c @@ -1451,7 +1451,7 @@ _GetV4UserAccess(Calendar *cal, cms_access_entry *alist) return (CSA_SUCCESS); } - sprintf(buf, "%s@%s", user, localhost); + snprintf(buf, sizeof buf, "%s@%s", user, localhost); for (; alist != NULL; alist = alist->next) { if (strcasecmp(alist->user, "world") == 0) worldaccess = alist->rights; diff --git a/cde/lib/pam/libpam/pam_framework.c b/cde/lib/pam/libpam/pam_framework.c index 16737c464..8824a67d2 100644 --- a/cde/lib/pam/libpam/pam_framework.c +++ b/cde/lib/pam/libpam/pam_framework.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include diff --git a/cde/lib/pam/libpam/pam_framework_utils.c b/cde/lib/pam/libpam/pam_framework_utils.c index 7e69c7685..4e3ff770b 100644 --- a/cde/lib/pam/libpam/pam_framework_utils.c +++ b/cde/lib/pam/libpam/pam_framework_utils.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cde/lib/tt/bin/dbck/options.C b/cde/lib/tt/bin/dbck/options.C index 6108e9c9f..930d6adc3 100644 --- a/cde/lib/tt/bin/dbck/options.C +++ b/cde/lib/tt/bin/dbck/options.C @@ -37,7 +37,7 @@ #include #include #include "util/copyright.h" -#if defined(linux) || defined(sgi) +#if defined(linux) || defined(sgi) || defined(__FreeBSD__) #include #endif #include "dbck.h" diff --git a/cde/lib/tt/bin/shell/mover.C b/cde/lib/tt/bin/shell/mover.C index 264f50a41..6a412c0b7 100644 --- a/cde/lib/tt/bin/shell/mover.C +++ b/cde/lib/tt/bin/shell/mover.C @@ -35,7 +35,7 @@ #include "tt_options.h" #include #include -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #else #if !defined(USL) && !defined(__uxp__) diff --git a/cde/lib/tt/bin/shell/remover.C b/cde/lib/tt/bin/shell/remover.C index 3d3002d5c..f96b32ce4 100644 --- a/cde/lib/tt/bin/shell/remover.C +++ b/cde/lib/tt/bin/shell/remover.C @@ -35,7 +35,7 @@ #include "tt_options.h" #include #include -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #else #if !defined(USL) && !defined(__uxp__) diff --git a/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C b/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C index 7a532eef1..dcacf1450 100644 --- a/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C +++ b/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C @@ -82,7 +82,6 @@ typedef union # define TT_STRING 290 # define TT_NUMBER 291 -#include #include #if defined (__hpux) @@ -91,7 +90,11 @@ typedef union */ #undef MAXINT #endif +#if defined(CSRG_BASED) +#define MAXINT INT_MAX +#else #include +#endif #ifdef __cplusplus diff --git a/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C b/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C index 21378d39b..3737fa1bb 100644 --- a/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C +++ b/cde/lib/tt/bin/tt_type_comp/mp_type_comp.C @@ -42,7 +42,7 @@ #if defined(linux) #include #endif -#if defined(sgi) +#if defined(sgi) || defined(__FreeBSD__) #include #endif #if defined(USL) || defined(__uxp__) diff --git a/cde/lib/tt/bin/ttauth/ttauth.h b/cde/lib/tt/bin/ttauth/ttauth.h index 5e1b27f5f..32ccf1a28 100644 --- a/cde/lib/tt/bin/ttauth/ttauth.h +++ b/cde/lib/tt/bin/ttauth/ttauth.h @@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group. */ #include +#include #include #include @@ -57,7 +58,7 @@ typedef int Bool; extern char *ProgramName; -#if !defined(linux) +#if !defined(linux) && !defined(CSRG_BASED) extern char *malloc(), *realloc(); #endif int process_command(), auth_initialize(), auth_finalize(); diff --git a/cde/lib/tt/bin/ttdbserverd/db_server_functions.C b/cde/lib/tt/bin/ttdbserverd/db_server_functions.C index e81863f2c..2264eb6e9 100644 --- a/cde/lib/tt/bin/ttdbserverd/db_server_functions.C +++ b/cde/lib/tt/bin/ttdbserverd/db_server_functions.C @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -2773,7 +2774,7 @@ _tt_run_garbage_collect(int in_parallel) } } else { #endif /* OPT_AUTO_GARBAGE_COLLECT*/ - exit((int)_tt_garbage_collect(NULL)); + exit((intptr_t)_tt_garbage_collect(NULL)); #if defined(OPT_AUTO_GARBAG_COLLECT) } #endif /* OPT_AUTO_GARBAGE_COLLECT*/ diff --git a/cde/lib/tt/bin/ttdbserverd/db_server_globals.h b/cde/lib/tt/bin/ttdbserverd/db_server_globals.h index ae3181ca0..4ea174daa 100644 --- a/cde/lib/tt/bin/ttdbserverd/db_server_globals.h +++ b/cde/lib/tt/bin/ttdbserverd/db_server_globals.h @@ -45,7 +45,7 @@ extern uid_t _tt_uid; extern gid_t _tt_gid; -extern gid_t _tt_gidlist [NGROUPS_MAX]; +extern gid_t _tt_gidlist [NGROUPS]; extern int _tt_gidlen; extern int _tt_auth_level; diff --git a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C index dd6355b66..c2560821b 100644 --- a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C +++ b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C @@ -63,7 +63,7 @@ #include #include -#if defined(sgi) +#if defined(sgi) || defined(__FreeBSD__) #include #endif @@ -217,7 +217,7 @@ main(int argc, char** argv, char **envp) #if defined(DEC) || defined(sun) || defined(HPUX) int asize = sizeof(struct sockaddr); #else -# if defined(linux) +# if defined(linux) || defined(CSRG_BASED) socklen_t asize; # else size_t asize = sizeof(struct sockaddr); @@ -484,7 +484,7 @@ main(int argc, char** argv, char **envp) if (!_tt_debug_mode) { if (0!=fork()) exit(0); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else setpgrp(); diff --git a/cde/lib/tt/bin/ttdbserverd/dm_server.C b/cde/lib/tt/bin/ttdbserverd/dm_server.C index bd0992724..0b4eb9c80 100644 --- a/cde/lib/tt/bin/ttdbserverd/dm_server.C +++ b/cde/lib/tt/bin/ttdbserverd/dm_server.C @@ -1079,7 +1079,8 @@ _tt_isopen_1(_Tt_isopen_args *args, SVCXPRT * /* transp */) int l = db_path.len(); int tl = strlen("TT_DB"); - for (int j = 0; j #include -#if defined(sgi) +#if defined(sgi) || defined(__FreeBSD__) #include #endif diff --git a/cde/lib/tt/bin/tttar/tttar.C b/cde/lib/tt/bin/tttar/tttar.C index c26432ff4..cf0875c8b 100644 --- a/cde/lib/tt/bin/tttar/tttar.C +++ b/cde/lib/tt/bin/tttar/tttar.C @@ -37,7 +37,7 @@ #include #include #include -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #else #if !defined(USL) && !defined(__uxp__) diff --git a/cde/lib/tt/bin/tttar/tttar_api.C b/cde/lib/tt/bin/tttar/tttar_api.C index 7622dcbb8..29c002af2 100644 --- a/cde/lib/tt/bin/tttar/tttar_api.C +++ b/cde/lib/tt/bin/tttar/tttar_api.C @@ -33,7 +33,7 @@ */ #include -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #else #ifndef USL @@ -230,7 +230,7 @@ pathlist_lstt_dearchive( (char *)our_process_name, (int)obj_kind ); return FALSE; } - if (verbosity && ( (last_path != this_path) + if (verbosity && ( (last_path != (const char *)this_path) || (obj_kind == ARCHIVE_END))) { if (last_path_valid) { diff --git a/cde/lib/tt/bin/tttar/tttar_spec.C b/cde/lib/tt/bin/tttar/tttar_spec.C index 4c4df4ab8..659bf6ffa 100644 --- a/cde/lib/tt/bin/tttar/tttar_spec.C +++ b/cde/lib/tt/bin/tttar/tttar_spec.C @@ -32,7 +32,7 @@ * */ -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #else #if defined (USL) || defined(__uxp__) diff --git a/cde/lib/tt/demo/CoEd/libCoEd/CoEdFile.C b/cde/lib/tt/demo/CoEd/libCoEd/CoEdFile.C index c0936d361..bce054153 100644 --- a/cde/lib/tt/demo/CoEd/libCoEd/CoEdFile.C +++ b/cde/lib/tt/demo/CoEd/libCoEd/CoEdFile.C @@ -54,7 +54,6 @@ #include #include -#include #include #include #include diff --git a/cde/lib/tt/demo/CoEd/libCoEd/CoEdSiteID.C b/cde/lib/tt/demo/CoEd/libCoEd/CoEdSiteID.C index 4b47d7903..b661a805c 100644 --- a/cde/lib/tt/demo/CoEd/libCoEd/CoEdSiteID.C +++ b/cde/lib/tt/demo/CoEd/libCoEd/CoEdSiteID.C @@ -53,7 +53,7 @@ */ #include -#include +#include #include "CoEdSiteID.h" CoEdSiteID:: diff --git a/cde/lib/tt/demo/CoEd/libCoEd/CoEdTextChange.C b/cde/lib/tt/demo/CoEd/libCoEd/CoEdTextChange.C index d90cb5d4b..11d7667ba 100644 --- a/cde/lib/tt/demo/CoEd/libCoEd/CoEdTextChange.C +++ b/cde/lib/tt/demo/CoEd/libCoEd/CoEdTextChange.C @@ -55,7 +55,6 @@ #include #include #include -#include #include #include "CoEdTextVersion.h" #include "CoEdTextChange.h" diff --git a/cde/lib/tt/demo/CoEd/libCoEd/SiteChange.C b/cde/lib/tt/demo/CoEd/libCoEd/SiteChange.C index c8315585e..1af780ace 100644 --- a/cde/lib/tt/demo/CoEd/libCoEd/SiteChange.C +++ b/cde/lib/tt/demo/CoEd/libCoEd/SiteChange.C @@ -52,7 +52,7 @@ * connection with the use or performance of this software. */ -#include +#include #include #include #include diff --git a/cde/lib/tt/lib/api/c/api_api.C b/cde/lib/tt/lib/api/c/api_api.C index 902567768..91ef6d454 100644 --- a/cde/lib/tt/lib/api/c/api_api.C +++ b/cde/lib/tt/lib/api/c/api_api.C @@ -742,8 +742,12 @@ _tt_errno_status( case EPIPE: return TT_DESKTOP_EPIPE; case ENOMSG: return TT_DESKTOP_ENOMSG; case EDEADLK: return TT_DESKTOP_EDEADLK; +#ifdef ENODATA case ENODATA: return TT_DESKTOP_ENODATA; +#endif +#ifdef EPROTO case EPROTO: return TT_DESKTOP_EPROTO; +#endif #if !defined(OPT_BUG_AIX) // on AIX, ENOTEMPTY is the same code as EEXIST, and the switch // statement fails to compile with duplicate case labels.. diff --git a/cde/lib/tt/lib/api/c/api_storage.h b/cde/lib/tt/lib/api/c/api_storage.h index dbc03d211..88e222d20 100644 --- a/cde/lib/tt/lib/api/c/api_storage.h +++ b/cde/lib/tt/lib/api/c/api_storage.h @@ -37,7 +37,6 @@ #define _API_STORAGE_H #include -#include #include "util/tt_object.h" #include "util/tt_list.h" diff --git a/cde/lib/tt/lib/api/c/api_xdr.C b/cde/lib/tt/lib/api/c/api_xdr.C index 3d0be8228..244ed9f5a 100644 --- a/cde/lib/tt/lib/api/c/api_xdr.C +++ b/cde/lib/tt/lib/api/c/api_xdr.C @@ -35,13 +35,10 @@ */ #include "tt_options.h" -#if defined(OPT_BUG_SUNOS_4) && defined(__GNUG__) -# include -#endif +#include #include #include "api/c/api_xdr.h" #include -#include bool_t _tt_xdr_cstring_list(XDR *xdrs, char ***ar) diff --git a/cde/lib/tt/lib/api/dnd/ttdnd.c b/cde/lib/tt/lib/api/dnd/ttdnd.c index 378cba9df..256acb4f1 100644 --- a/cde/lib/tt/lib/api/dnd/ttdnd.c +++ b/cde/lib/tt/lib/api/dnd/ttdnd.c @@ -33,7 +33,7 @@ */ #include #include -#include +#include #include "api/c/tt_c.h" #include "ttdnd.h" diff --git a/cde/lib/tt/lib/db/tt_client_isam.h b/cde/lib/tt/lib/db/tt_client_isam.h index b5d4e8a4d..20ff4e109 100644 --- a/cde/lib/tt/lib/db/tt_client_isam.h +++ b/cde/lib/tt/lib/db/tt_client_isam.h @@ -57,8 +57,7 @@ extern long ldlong(); extern float ldfloat(); extern double lddbl(); extern short ldshort(); -extern ldchar(), stchar(), stlong(), stint(), stdbl(), stfloat(); -extern stbin(), ldbin(); +extern int ldchar(), stchar(), stlong(), stint(), stdbl(), stfloat(); extern int iserrno; /* isam error number code */ extern long isrecnum; /* record number of last call */ diff --git a/cde/lib/tt/lib/db/tt_db_property.C b/cde/lib/tt/lib/db/tt_db_property.C index fb3cecac4..9a08a4687 100644 --- a/cde/lib/tt/lib/db/tt_db_property.C +++ b/cde/lib/tt/lib/db/tt_db_property.C @@ -59,7 +59,7 @@ is_empty() const // check the list for all NULL content member tt_strings _Tt_string_list_cursor values_cursor(values); - while (values_cursor.next()) if (*values_cursor != (char*)NULL) return FALSE; + while (values_cursor.next()) if (*values_cursor != (const char*)NULL) return FALSE; return TRUE; } diff --git a/cde/lib/tt/lib/db/tt_db_property.h b/cde/lib/tt/lib/db/tt_db_property.h index 76062e13f..80e145f64 100644 --- a/cde/lib/tt/lib/db/tt_db_property.h +++ b/cde/lib/tt/lib/db/tt_db_property.h @@ -57,7 +57,7 @@ public: int i = 0; _Tt_string_list_cursor values_cursor(values); while (values_cursor.next()) { - if (*values_cursor != (char*)NULL) + if (*values_cursor != (const char*)NULL) fprintf(file, "Property Value #%d: %s\n", i, (char *)*values_cursor); else fprintf(file, "Property Value #%d: NULL\n", i); i++; diff --git a/cde/lib/tt/lib/mp/mp_c_session.C b/cde/lib/tt/lib/mp/mp_c_session.C index aefff74d2..78a375325 100644 --- a/cde/lib/tt/lib/mp/mp_c_session.C +++ b/cde/lib/tt/lib/mp/mp_c_session.C @@ -284,13 +284,13 @@ startup_ttsession(_Tt_string &start_ttcmd) istat = signal(SIGINT, SIG_IGN); qstat = signal(SIGQUIT, SIG_IGN); - cstat = signal(SIGCLD, SIG_DFL); + cstat = signal(SIGCHLD, SIG_DFL); w = waitpid(pid, &status, 0); (void) signal(SIGINT, istat); (void) signal(SIGQUIT, qstat); - (void) signal(SIGCLD, cstat); + (void) signal(SIGCHLD, cstat); return((w == -1)? w: status); diff --git a/cde/lib/tt/lib/mp/mp_desktop.C b/cde/lib/tt/lib/mp/mp_desktop.C index a550624a7..cf5a075a2 100644 --- a/cde/lib/tt/lib/mp/mp_desktop.C +++ b/cde/lib/tt/lib/mp/mp_desktop.C @@ -47,7 +47,7 @@ #include #include #include -#if defined(__STDC__) && !defined(linux) +#if defined(__STDC__) && !defined(linux) && !defined(CSRG_BASED) extern "C" { extern int ioctl (int, int, ...) ; }; #endif #include "util/tt_global_env.h" @@ -58,7 +58,7 @@ extern "C" { extern int ioctl (int, int, ...) ; }; #include "mp/mp_desktop.h" #include "mp/mp_mp.h" #include -#include +#include #include "util/tt_gettext.h" static int parse_Xdisplay_string(_Tt_string display, diff --git a/cde/lib/tt/lib/mp/mp_message.C b/cde/lib/tt/lib/mp/mp_message.C index 34e5b4a0d..06afb2453 100644 --- a/cde/lib/tt/lib/mp/mp_message.C +++ b/cde/lib/tt/lib/mp/mp_message.C @@ -47,7 +47,7 @@ #include #include #include - +#include // // Base constructor for a message. ::xdr() relies on this @@ -118,7 +118,7 @@ base_constructor() _Tt_message:: _Tt_message() -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) : _pattern_id(), _object(), _file(), _op(), _otype(), _sender_ptype(), _handler_ptype(), _api_id(), _status_string() @@ -302,33 +302,44 @@ xdr(XDR *xdrs) // Even though in Solaris 2.x uid_t and gid_t are typedef'd as // u_long, the compiler complains if they are not explicitly // coerced. + + /* + * Obviously there is no xdr_u_uid_t, so we have to hack around this. + * At least by using sizeof checks, we aren't manually specifying + * the size of uid_t depending on the platform (which broke terribly + * when we tried to port to 64-bit linux at first). + * + * A side-effect of testing this way is that we have to spell out the pointer + * casts, since one of them is actually wrong for any given platform (but + * is also a dead code branch) + */ if (_ptr_guards&_TT_MSK_UID) { if (xdrs->x_op == XDR_DECODE) { _uid = 0; } -#ifdef __osf__ - if (! xdr_u_int(xdrs, &_uid)) { - return(0); + if (sizeof (int) == sizeof(uid_t)) { + if (! xdr_u_int(xdrs,(u_int *) &_uid)) return 0; + } else if (sizeof (long) == sizeof(uid_t)) { + if (! xdr_u_long(xdrs,(u_long *) &_gid)) return 0; + } else { + _tt_syslog( 0, LOG_ERR, "_Tt_message::xdr(XDR*): uid_t size is not equal to int or long; TOOLTALK RPC WILL NOT WORK!" ); } -#else - if (! xdr_u_long(xdrs,(u_long *) &_uid)) { - return(0); - } -#endif } if (_ptr_guards&_TT_MSK_GID) { if (xdrs->x_op == XDR_DECODE) { _gid = 0; } -#ifdef __osf__ - if (! xdr_u_int(xdrs, &_gid)) { - return(0); + if (sizeof (int) == sizeof(gid_t)) { + if (! xdr_u_int(xdrs,(u_int *) &_gid)) { + return(0); + } + } else if (sizeof (long) == sizeof(gid_t)) { + if (! xdr_u_long(xdrs,(u_long *) &_gid)) { + return(0); + } + } else { + _tt_syslog( 0, LOG_ERR, "_Tt_message::xdr(XDR*): gid_t size is not equal to int or long; TOOLTALK RPC WILL NOT WORK!" ); } -#else - if (! xdr_u_long(xdrs,(u_long *) &_gid)) { - return(0); - } -#endif } if (_ptr_guards&_TT_MSK_SESSION) { diff --git a/cde/lib/tt/lib/mp/mp_mp.C b/cde/lib/tt/lib/mp/mp_mp.C index 92b9ba8e9..9c07114a9 100644 --- a/cde/lib/tt/lib/mp/mp_mp.C +++ b/cde/lib/tt/lib/mp/mp_mp.C @@ -46,7 +46,7 @@ #include "api/c/api_error.h" #include #include -#include +#include #include "tt_options.h" #if defined(_AIX) diff --git a/cde/lib/tt/lib/mp/mp_session.h b/cde/lib/tt/lib/mp/mp_session.h index 78ce3ef91..bb3ce49de 100644 --- a/cde/lib/tt/lib/mp/mp_session.h +++ b/cde/lib/tt/lib/mp/mp_session.h @@ -168,7 +168,7 @@ class _Tt_session : public _Tt_object { friend class _Tt_s_mp; friend class _Tt_s_session; - friend _Tt_mp::find_session_by_fd(int, _Tt_session_ptr &); + friend int _Tt_mp::find_session_by_fd(int, _Tt_session_ptr &); }; _Tt_string _tt_session_address(_Tt_object_ptr &o); diff --git a/cde/lib/tt/lib/mp/mp_stream_socket.C b/cde/lib/tt/lib/mp/mp_stream_socket.C index f604f68e7..fb2ba5af3 100644 --- a/cde/lib/tt/lib/mp/mp_stream_socket.C +++ b/cde/lib/tt/lib/mp/mp_stream_socket.C @@ -172,8 +172,12 @@ init(int init_as_source) t_strerror( t_errno ) ); return 0; } +#else +#if defined(linux) || defined(CSRG_BASED) + socklen_t len; #else int len; +#endif int optval; _sock = socket(AF_INET, SOCK_STREAM, 0); if (_sock < 0) { @@ -439,7 +443,11 @@ accept() { if (_msgsock == -1) { #ifndef OPT_TLI +#if defined(linux) || defined(CSRG_BASED) + socklen_t addrlen = sizeof(sockaddr_in); +#else int addrlen = sizeof(sockaddr_in); +#endif sockaddr_in saddr; #if defined(_AIX) && (OSMAJORVERSION==4) && (OSMINORVERSION==2) diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h index 52b9d1ece..fef3512d0 100644 --- a/cde/lib/tt/lib/tt_options.h +++ b/cde/lib/tt/lib/tt_options.h @@ -560,6 +560,70 @@ # define OPT_BUG_RPCINTR # undef OPT_XTHREADS +#elif defined(__OpenBSD__) + +# undef OPT_UNIX_SOCKET_RPC +# undef OPT_TLI +# undef OPT_DLOPEN_X11 +# undef OPT_DLOPEN_CE +# undef OPT_ADDMSG_DIRECT +# undef OPT_SECURE_RPC +# undef OPT_CLASSING_ENGINE +# undef OPT_PATCH +# define OPT_POSIX_SIGNAL +# undef OPT_BSD_WAIT +# undef OPT_DGETTEXT +# define OPT_CATGETS +# undef OPT_GETDTABLESIZE +# undef OPT_SYSINFO +# define OPT_CPP_PATH "/usr/libexec/cpp" +# define OPT_CPP_OPTIONS "" +# define OPT_STRERROR +# undef OPT_SVR4_GETMNTENT +# undef OPT_LOCKF_MNTENT +# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS +# undef OPT_OLD_RPC +# define OPT_DEFINE_SIG_PF +# define OPT_TAR_HAS_EXCLUDE_OPTION +# define OPT_HAS_REALPATH +# define OPT_AUTOMOUNT_PATH_FIX +# define OPT_BUG_RPCINTR +# undef OPT_XTHREADS + +#elif defined(__FreeBSD__) +# undef OPT_UNIX_SOCKET_RPC +# undef OPT_TLI +# undef OPT_DLOPEN_X11 +# undef OPT_DLOPEN_CE +# undef OPT_ADDMSG_DIRECT +# undef OPT_SECURE_RPC +# undef OPT_CLASSING_ENGINE +# undef OPT_PATCH +# define OPT_POSIX_SIGNAL +# undef OPT_BSD_WAIT +# undef OPT_DGETTEXT +# define OPT_CATGETS +# undef OPT_GETDTABLESIZE +# undef OPT_SYSINFO +# if defined(OSMAJORVERSION) && (OSMAJORVERSION >= 5) +# define OPT_CPP_PATH "/usr/bin/cpp" +# else +# define OPT_CPP_PATH "/usr/libexec/cpp" +# endif +# define OPT_CPP_OPTIONS "" +# define OPT_STRERROR +# undef OPT_SVR4_GETMNTENT +# undef OPT_LOCKF_MNTENT +# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS +# undef OPT_OLD_RPC +# define OPT_DEFINE_SIG_PF +# define OPT_TAR_HAS_EXCLUDE_OPTION +# define OPT_HAS_REALPATH +# define OPT_AUTOMOUNT_PATH_FIX +# define OPT_BUG_RPCINTR +# undef OPT_XTHREADS +# define OPT_CONST_CORRECT + #else /* Unknown configuration, complain */ }}}} You must edit lib/tt_options.h and add a section defining the options for your configuration. diff --git a/cde/lib/tt/lib/tttk/ttdesktop.C b/cde/lib/tt/lib/tttk/ttdesktop.C index 61130d269..3650d4ccb 100644 --- a/cde/lib/tt/lib/tttk/ttdesktop.C +++ b/cde/lib/tt/lib/tttk/ttdesktop.C @@ -679,7 +679,7 @@ _ttdt_GSet_Geometry( { Tt_message msg = _ttDesktopMessageCreate( commission, theClass, handler, op, _ttdt_Geometry_in_cb, - callback, clientdata ); + (void *)callback, clientdata ); Tt_status status = tt_ptr_error( msg ); if (status != TT_OK) { return msg; @@ -814,7 +814,7 @@ ttdt_Set_Geometry_pat( { return _ttdt_pat( TTDT_SET_GEOMETRY, _ttdt_Geometry_out_cb, category, commission, - callback, clientdata, register_it ); + (void *)callback, clientdata, register_it ); } Tt_pattern @@ -828,7 +828,7 @@ ttdt_Get_Geometry_pat( { return _ttdt_pat( TTDT_GET_GEOMETRY, _ttdt_Geometry_out_cb, category, commission, - callback, clientdata, register_it ); + (void *)callback, clientdata, register_it ); } static int @@ -953,7 +953,7 @@ _ttdt_GSet_Iconified( { Tt_message msg = _ttDesktopMessageCreate( commission, theClass, handler, op, _ttdt_Iconified_in_cb, - callback, clientdata ); + (void *)callback, clientdata ); Tt_status status = tt_ptr_error( msg ); if (status != TT_OK) { return msg; @@ -1048,7 +1048,7 @@ ttdt_Set_Iconified_pat( return _ttdt_pat( TTDT_SET_ICONIFIED, _ttdt_Iconified_out_cb, category, commission, - callback, clientdata, register_it ); + (void *)callback, clientdata, register_it ); } Tt_pattern @@ -1062,7 +1062,7 @@ ttdt_Get_Iconified_pat( { return _ttdt_pat( TTDT_GET_ICONIFIED, _ttdt_Iconified_out_cb, category, commission, - callback, clientdata, register_it ); + (void *)callback, clientdata, register_it ); } // @@ -1226,7 +1226,7 @@ _ttdt_GSet_XInfo( { Tt_message msg = _ttDesktopMessageCreate( commission, theClass, handler, op, _ttdt_XInfo_in_cb, - callback, clientdata ); + (void *)callback, clientdata ); Tt_status status = tt_ptr_error( msg ); if (status != TT_OK) { return msg; @@ -1345,7 +1345,7 @@ ttdt_Set_XInfo_pat( { return _ttdt_pat( TTDT_SET_XINFO, _ttdt_XInfo_out_cb, category, commission, - callback, clientdata, register_it ); + (void *)callback, clientdata, register_it ); } Tt_pattern @@ -1359,7 +1359,7 @@ ttdt_Get_XInfo_pat( { return _ttdt_pat( TTDT_GET_XINFO, _ttdt_XInfo_out_cb, category, commission, - callback, clientdata, register_it ); + (void *)callback, clientdata, register_it ); } // @@ -1501,7 +1501,7 @@ ttdt_Get_Locale( } Tt_message msg = _ttDtPMessageCreate( commission, TT_REQUEST, TT_SESSION, handler, - TTDT_GET_LOCALE, _ttDtGetLocaleCB, clientCB, + TTDT_GET_LOCALE, _ttDtGetLocaleCB, (void *)clientCB, clientData ); Tt_status status = tt_ptr_error( msg ); if (status != TT_OK) { @@ -1614,7 +1614,7 @@ ttdt_Get_Situation( Tt_message msg = _ttDtPMessageCreate( commission, TT_REQUEST, TT_SESSION, _handler, TTDT_GET_SITUATION, _ttDtGetSituationCB, - clientCB, clientData ); + (void *)clientCB, clientData ); Tt_status status = tt_ptr_error( msg ); if (status != TT_OK) { return msg; @@ -1661,7 +1661,7 @@ _ttdt_posix_cb( struct utsname names; char buf[ SYS_NMLN ]; case TTDT_SET_LOCALE: - return _ttDtGetLocaleCB( msg, pat, _ttDtApplyLocale, 0 ); + return _ttDtGetLocaleCB( msg, pat, (void *)_ttDtApplyLocale, 0 ); case TTDT_GET_LOCALE: for (i = 0; i < numArgs/2; i++) { categoryName = _tttk_message_arg_val( msg, 2 * i, 0 ); diff --git a/cde/lib/tt/lib/tttk/ttdtfile.C b/cde/lib/tt/lib/tttk/ttdtfile.C index ea1b5fb33..4d5f29914 100644 --- a/cde/lib/tt/lib/tttk/ttdtfile.C +++ b/cde/lib/tt/lib/tttk/ttdtfile.C @@ -115,7 +115,7 @@ _ttDtFileJoinPat( Tt_pattern pat = _ttDtPatternCreate( TT_OBSERVE, theScope, theScope != TT_FILE, pathname, TTDT_DELETED, _ttDtFileCB, - cb, clientData, 0 ); + (void *)cb, clientData, 0 ); Tt_status status = tt_ptr_error( pat ); if (status != TT_OK) { return pat; @@ -254,7 +254,7 @@ ttdt_file_request( ) { Tt_message msg = _ttDtPMessageCreate( context, TT_REQUEST, theScope, 0, - op, _ttDtFileCB, cb, clientData); + op, _ttDtFileCB, (void *)cb, clientData); Tt_status status = tt_ptr_error( msg ); if (status != TT_OK) { return msg; @@ -298,7 +298,7 @@ _ttDtFileEventPat( Tt_pattern pat = _ttDtPatternCreate( TT_HANDLE, theScope, theScope != TT_FILE, pathname, TTDT_SAVE, _ttDtFileCB, - cb, clientData, 0 ); + (void *)cb, clientData, 0 ); Tt_status status = tt_ptr_error( pat ); if (status != TT_OK) { return pat; diff --git a/cde/lib/tt/lib/tttk/ttdtprocid.C b/cde/lib/tt/lib/tttk/ttdtprocid.C index a9644bb0f..c47945e61 100644 --- a/cde/lib/tt/lib/tttk/ttdtprocid.C +++ b/cde/lib/tt/lib/tttk/ttdtprocid.C @@ -102,7 +102,7 @@ pats_create( pats[++i] = ttdt_Set_XInfo_pat( TT_HANDLE, contract, _ttdt_do_Set_XInfo, shell, 1 ); pats[++i] = _ttdt_pat(TTDT_RAISE, _ttdt_contract_cb, TT_HANDLE, - contract, _ttdt_do_RaiseLower, shell, 0 ); + contract, (void *)_ttdt_do_RaiseLower, shell, 0 ); tt_pattern_op_add( pats[i], _ttDtOp( TTDT_LOWER ) ); tt_pattern_session_add( pats[i], sess ); tt_pattern_register( pats[i] ); @@ -126,7 +126,7 @@ pats_create( pats[++i] = ttdt_Set_XInfo_pat( TT_HANDLE, contract, (Ttdt_XInfo_in_cb)cb, clientData, 1 ); pats[++i] = _ttdt_pat(TTDT_RAISE, _ttdt_contract_cb, TT_HANDLE, - contract, cb, clientData, 0 ); + contract, (void *)cb, clientData, 0 ); tt_pattern_op_add( pats[i], _ttDtOp( TTDT_LOWER ) ); tt_pattern_session_add( pats[i], sess ); tt_pattern_register( pats[i] ); @@ -145,17 +145,17 @@ pats_create( } } pats[++i] = _ttdt_pat( TTDT_QUIT, _ttdt_contract_cb, TT_HANDLE, - contract, cb, _clientData, 1 ); + contract, (void *)cb, _clientData, 1 ); pats[++i] = _ttdt_pat( TTDT_PAUSE, _ttdt_contract_cb, TT_HANDLE, - contract, cb, (cb ? clientData : shell), 0 ); + contract, (void *)cb, (cb ? clientData : shell), 0 ); tt_pattern_op_add( pats[i], _ttDtOp( TTDT_RESUME )); tt_pattern_session_add( pats[i], sess ); tt_pattern_register( pats[i] ); pats[++i] = _ttdt_pat( TTDT_GET_STATUS, _ttdt_contract_cb, TT_HANDLE, - contract, cb, clientData, 1 ); + contract, (void *)cb, clientData, 1 ); if (contract == 0) { pats[++i]= _ttdt_pat( TTDT_DO_COMMAND, _ttdt_contract_cb, - TT_HANDLE, contract, cb, clientData, 1 ); + TT_HANDLE, contract, (void *)cb, clientData, 1 ); pats[++i]= _ttdt_pat( TTDT_SET_LOCALE, _ttdt_posix_cb, TT_HANDLE, contract, 0, 0, 0 ); tt_pattern_op_add( pats[i], _ttDtOp( TTDT_GET_LOCALE )); diff --git a/cde/lib/tt/lib/tttk/ttmedia.C b/cde/lib/tt/lib/tttk/ttmedia.C index 6792f6774..094c7820e 100644 --- a/cde/lib/tt/lib/tttk/ttmedia.C +++ b/cde/lib/tt/lib/tttk/ttmedia.C @@ -381,7 +381,7 @@ ttmedia_Deposit_pat( { Tt_pattern pat = _ttDtPatternCreate( category, TT_SESSION, register_it, 0, TTME_DEPOSIT, - _ttMediaLoadMsgCB, clientcb, + _ttMediaLoadMsgCB, (void *)clientcb, clientdata, 0 ); Tt_status status = tt_ptr_error( pat ); if (status != TT_OK) { @@ -418,7 +418,7 @@ ttmedia_load( ) { Tt_message msg = _ttDtPMessageCreate( context, TT_REQUEST, TT_SESSION, - 0, op, _ttMediaLoadMsgCB, cb, clientData ); + 0, op, _ttMediaLoadMsgCB, (void *)cb, clientData ); Tt_status status = tt_ptr_error( msg ); if (status != TT_OK) { return msg; diff --git a/cde/lib/tt/lib/tttk/tttk.C b/cde/lib/tt/lib/tttk/tttk.C index 734adbdbb..1f0c2b8fe 100644 --- a/cde/lib/tt/lib/tttk/tttk.C +++ b/cde/lib/tt/lib/tttk/tttk.C @@ -365,7 +365,7 @@ ttdt_subcontract_manage( (Ttdt_XInfo_out_cb)cb, clientData, 1 ); } pats[2] = _ttdt_pat( TTDT_STATUS, _ttdt_contract_cb, TT_OBSERVE, - subcontract, cb, clientData, 1 ); + subcontract, (void *)cb, clientData, 1 ); pats[ numPats - 1 ] = 0; for (int i = 0; i < numPats; i++) { Tt_status status = tt_ptr_error( pats[ i ] ); diff --git a/cde/lib/tt/lib/tttk/tttkmessage.C b/cde/lib/tt/lib/tttk/tttkmessage.C index c20606c58..efe87e0d0 100644 --- a/cde/lib/tt/lib/tttk/tttkmessage.C +++ b/cde/lib/tt/lib/tttk/tttkmessage.C @@ -169,7 +169,7 @@ _ttDtPMessageCreate( return msg; } _TttkItem2Free fuse( msg ); - status = tt_message_user_set( msg, _TttkCBKey, cb ); + status = tt_message_user_set( msg, _TttkCBKey, (void *)cb ); if (status != TT_OK) { return (Tt_message)tt_error_pointer( status ); } diff --git a/cde/lib/tt/lib/tttk/tttkpattern.C b/cde/lib/tt/lib/tttk/tttkpattern.C index 8d88bf1d0..d59accdd5 100644 --- a/cde/lib/tt/lib/tttk/tttkpattern.C +++ b/cde/lib/tt/lib/tttk/tttkpattern.C @@ -161,7 +161,7 @@ _ttDtPatternCreate( if (status != TT_OK) { return (Tt_pattern)tt_error_pointer( status ); } - status = tt_pattern_user_set( pat, _TttkCBKey, cb ); + status = tt_pattern_user_set( pat, _TttkCBKey, (void *)cb ); if (status != TT_OK) { return (Tt_pattern)tt_error_pointer( status ); } diff --git a/cde/lib/tt/lib/util/frozen.tt_trace_gram.c b/cde/lib/tt/lib/util/frozen.tt_trace_gram.c index 73ffe26f9..a0887f88b 100644 --- a/cde/lib/tt/lib/util/frozen.tt_trace_gram.c +++ b/cde/lib/tt/lib/util/frozen.tt_trace_gram.c @@ -101,7 +101,7 @@ typedef union # define _TT_TRACE_LINETERM 280 # define _TT_TRACE_PARSE_EOF 281 -#include +#include #include #include diff --git a/cde/lib/tt/lib/util/tt_entry_pt.C b/cde/lib/tt/lib/util/tt_entry_pt.C index 9f70aa4a0..c084ad7cb 100644 --- a/cde/lib/tt/lib/util/tt_entry_pt.C +++ b/cde/lib/tt/lib/util/tt_entry_pt.C @@ -451,6 +451,8 @@ _Tt_string _tt_entrypt_to_string(_Tt_entry_pt fun) return "tt_feature_required"; #if defined(__osf__) || defined(linux) case TT_API_CALL_LAST: return (char *) NULL; +#elif defined(OPT_CONST_CORRECT) + case TT_API_CALL_LAST: return (const char *) NULL; #else case TT_API_CALL_LAST: return NULL; #endif diff --git a/cde/lib/tt/lib/util/tt_file_system.C b/cde/lib/tt/lib/util/tt_file_system.C index ef96dc3f9..074d2a5bb 100644 --- a/cde/lib/tt/lib/util/tt_file_system.C +++ b/cde/lib/tt/lib/util/tt_file_system.C @@ -82,13 +82,16 @@ # define ttFsName(e) vmt2dataptr(e,VMT_OBJECT) # define ttMountPt(e) vmt2dataptr(e,VMT_STUB) # define ttCloseMntTbl(f) free(tmpbuf) -#elif defined(__osf__) +#elif defined(__osf__) || defined(CSRG_BASED) # include # include +# ifdef __osf__ extern "C" int getfsstat(struct statfs *, long, int); +# endif # define MNTTYPE_NFS "nfs" # define ttOpenMntTbl(path,mode) ((FILE *) 1) # define TtMntEntry struct statfs * +# ifdef __osf__ # define ttFsType(e) \ (((e)->f_type == MOUNT_UFS) ? "ufs" \ : (((e)->f_type == MOUNT_NFS3) ? "nfs" \ @@ -96,6 +99,9 @@ : (((e)->f_type == MOUNT_CDFS) ? "cdfs" \ : (((e)->f_type == MOUNT_PROCFS) ? "procfs" \ : "unknown"))))) +# elif defined(CSRG_BASED) +# define ttFsType(e) (e->f_fstypename) +# endif # define ttFsName(e) ((char *)((e)->f_mntfromname)) # define ttMountPt(e) ((char *)((e)->f_mntonname)) # define ttCloseMntTbl(f) free(buf) @@ -460,7 +466,7 @@ updateFileSystemEntries () for (entry = (TtMntEntry)tmpbuf; rc > 0; --rc, entry = (TtMntEntry)((char *) entry + entry->vmt_length)) -#elif defined(__osf__) +#elif defined(__osf__) || defined(CSRG_BASED) int numfs,i; struct statfs *buf; long bufsize; @@ -496,7 +502,7 @@ updateFileSystemEntries () #else while (entry = getmntent(mount_table)) #endif -#ifndef __osf__ +#if !defined(__osf__) && !defined(CSRG_BASED) { #endif fse = createFileSystemEntry( entry ); diff --git a/cde/lib/tt/lib/util/tt_host.C b/cde/lib/tt/lib/util/tt_host.C index 4c3aed359..5590c8fb7 100644 --- a/cde/lib/tt/lib/util/tt_host.C +++ b/cde/lib/tt/lib/util/tt_host.C @@ -48,7 +48,7 @@ extern "C" in_addr_t inet_addr(const char *); #ifdef __osf__ #include #else -#if !defined(USL) && !defined(__uxp__) && !defined(linux) +#if !defined(USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED) #include #endif #endif /* __osf */ diff --git a/cde/lib/tt/lib/util/tt_host_equiv.C b/cde/lib/tt/lib/util/tt_host_equiv.C index fba3bdcb8..dec527bc0 100644 --- a/cde/lib/tt/lib/util/tt_host_equiv.C +++ b/cde/lib/tt/lib/util/tt_host_equiv.C @@ -36,12 +36,12 @@ #define X_INCLUDE_NETDB_H #define XOS_USE_XT_LOCKING -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #define index #define rindex #endif #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #undef index #undef rindex #endif diff --git a/cde/lib/tt/lib/util/tt_iostream.C b/cde/lib/tt/lib/util/tt_iostream.C index 1a9e3db7b..be69315ba 100644 --- a/cde/lib/tt/lib/util/tt_iostream.C +++ b/cde/lib/tt/lib/util/tt_iostream.C @@ -225,7 +225,7 @@ _Tt_ostream::operator <<( return *this; } -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) /* This operator is being added to take care of uid_t and gid_t * for osf */ const _Tt_ostream & diff --git a/cde/lib/tt/lib/util/tt_iostream.h b/cde/lib/tt/lib/util/tt_iostream.h index 326f37d5b..a81444545 100644 --- a/cde/lib/tt/lib/util/tt_iostream.h +++ b/cde/lib/tt/lib/util/tt_iostream.h @@ -86,7 +86,7 @@ class _Tt_ostream : public virtual _Tt_allocated { const _Tt_ostream &operator <<( int n ) const; -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) const _Tt_ostream &operator <<( unsigned int n ) const; diff --git a/cde/lib/tt/lib/util/tt_log.C b/cde/lib/tt/lib/util/tt_log.C index 340efe161..48955ad2e 100644 --- a/cde/lib/tt/lib/util/tt_log.C +++ b/cde/lib/tt/lib/util/tt_log.C @@ -37,7 +37,7 @@ #ifdef __osf__ #include #else -#if !defined (USL) && !defined(__uxp__) && !defined(linux) +#if !defined (USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED) #include #endif #endif /* __osf__ */ diff --git a/cde/lib/tt/lib/util/tt_new.C b/cde/lib/tt/lib/util/tt_new.C index c1fd0080d..bf7f60017 100644 --- a/cde/lib/tt/lib/util/tt_new.C +++ b/cde/lib/tt/lib/util/tt_new.C @@ -37,7 +37,6 @@ #include #include -#include #include #include #include "util/tt_new.h" diff --git a/cde/lib/tt/lib/util/tt_path.C b/cde/lib/tt/lib/util/tt_path.C index 8dd9f2bbd..e51fd2dab 100644 --- a/cde/lib/tt/lib/util/tt_path.C +++ b/cde/lib/tt/lib/util/tt_path.C @@ -49,12 +49,12 @@ /* Included after "util/tt_string.h" to avoid index/strchr conflicts. */ #define X_INCLUDE_DIRENT_H #define XOS_USE_NO_LOCKING -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #define index #define rindex #endif #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #undef index #undef rindex #endif diff --git a/cde/lib/tt/lib/util/tt_string.C b/cde/lib/tt/lib/util/tt_string.C index 4b198bccc..02855d358 100644 --- a/cde/lib/tt/lib/util/tt_string.C +++ b/cde/lib/tt/lib/util/tt_string.C @@ -54,7 +54,7 @@ #endif #include #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #endif #include "util/tt_string.h" @@ -1065,6 +1065,7 @@ _tt_xdr_decode(xdrproc_t xdr_fn, void *data, _Tt_string opaque_string) /* * XDR encode or decode a _Tt_string */ +int tt_xdr_string(XDR *xdrs, _Tt_string *s) { return(s->xdr(xdrs)); diff --git a/cde/lib/tt/lib/util/tt_string_map.C b/cde/lib/tt/lib/util/tt_string_map.C index 0c219c778..8d4c3c1b8 100644 --- a/cde/lib/tt/lib/util/tt_string_map.C +++ b/cde/lib/tt/lib/util/tt_string_map.C @@ -45,12 +45,12 @@ /* Included after "util/tt_string.h" to avoid index/strchr conflicts. */ #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #define index #define rindex #endif #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #undef index #undef rindex #endif diff --git a/cde/lib/tt/lib/util/tt_string_match.C b/cde/lib/tt/lib/util/tt_string_match.C index ff53f686a..296708bb1 100644 --- a/cde/lib/tt/lib/util/tt_string_match.C +++ b/cde/lib/tt/lib/util/tt_string_match.C @@ -48,7 +48,11 @@ */ #undef MAXINT #endif +#if defined(CSRG_BASED) +#define MAXINT INT_MAX +#else #include +#endif static int _tt_csh_match(const char *, const char *); static int _tt_csh_match_star(const char *, const char *); diff --git a/cde/lib/tt/lib/util/tt_trace.C b/cde/lib/tt/lib/util/tt_trace.C index 6a3d1eb1e..2fb9c0424 100644 --- a/cde/lib/tt/lib/util/tt_trace.C +++ b/cde/lib/tt/lib/util/tt_trace.C @@ -384,57 +384,64 @@ _Tt_trace::entry( while (num_args--) { c = *preview++; switch (c) { + /* For the "type" to va_arg, we must pass int! + * If we try to use the real type (e.g. Tt_address, etc.) + * gcc will complain loudly and cause the program to abort here. + * This is because the size of enums can be less than that of int, + * and in va_args anything smaller than an int is "promoted" + * into an int. + */ case ADDRESS : { Tt_address s; - s = va_arg(ap, Tt_address); + s = (Tt_address) va_arg(ap, int); **_pstream << _tt_enumname(s); } break; case STATE: { Tt_state s; - s = va_arg(ap, Tt_state); + s = (Tt_state) va_arg(ap, int); **_pstream << _tt_enumname(s); } break; case DISPOSITION: { Tt_disposition s; - s = va_arg(ap, Tt_disposition); + s = (Tt_disposition) va_arg(ap, int); **_pstream << _tt_enumname(s); } break; case CLASS: { Tt_class s; - s = va_arg(ap, Tt_class); + s = (Tt_class) va_arg(ap, int); **_pstream << _tt_enumname(s); } break; case MODE: { Tt_mode s; - s = va_arg(ap, Tt_mode); + s = (Tt_mode) va_arg(ap, int); **_pstream << _tt_enumname(s); } break; case CATEGORY: { Tt_category s; - s = va_arg(ap, Tt_category); + s = (Tt_category) va_arg(ap, int); **_pstream << _tt_enumname(s); } break; case SCOPE: { Tt_scope s; - s = va_arg(ap, Tt_scope); + s = (Tt_scope) va_arg(ap, int); **_pstream << _tt_enumname(s); } break; case FEATURE: { Tt_feature f; - f = va_arg(ap, Tt_feature); + f = (Tt_feature) va_arg(ap, int); **_pstream << _tt_enumname(f); } break; case AUDIT_STATUS: { Tt_status status; - status = va_arg(ap, Tt_status); + status = (Tt_status) va_arg(ap, int); **_pstream << status; } break; diff --git a/cde/lib/tt/lib/util/tt_tracefile_parse.C b/cde/lib/tt/lib/util/tt_tracefile_parse.C index bfbf7b9be..a5069aed5 100644 --- a/cde/lib/tt/lib/util/tt_tracefile_parse.C +++ b/cde/lib/tt/lib/util/tt_tracefile_parse.C @@ -41,7 +41,8 @@ #include "util/tt_trace_parser.h" #include "util/tt_entry_pt_names.h" -#if defined (_AIX) || defined(hpux) || defined(__osf__) || defined(linux) +#if defined (_AIX) || defined(hpux) || defined(__osf__) || defined(linux) || \ + defined(CSRG_BASED) #include #endif diff --git a/cde/lib/tt/lib/util/tt_xdr_utils.C b/cde/lib/tt/lib/util/tt_xdr_utils.C index 2a8432a00..833c1193f 100644 --- a/cde/lib/tt/lib/util/tt_xdr_utils.C +++ b/cde/lib/tt/lib/util/tt_xdr_utils.C @@ -40,11 +40,19 @@ #include #include "tt_options.h" +#if defined(CSRG_BASED) +#define XDR __rpc_xdr +#endif + typedef bool_t (*local_xdrproc_t)(XDR *, caddr_t *); #ifndef OPT_XDR_LONG_TYPE +#if defined(OPT_CONST_CORRECT) +# define OPT_XDR_LONG_TYPE const long +#else # define OPT_XDR_LONG_TYPE long #endif +#endif static bool_t tt_x_putlong(XDR *xp, OPT_XDR_LONG_TYPE *) { @@ -58,7 +66,15 @@ static bool_t * The third agrument is also wrong. Both SUN and DEC system header files * expect int instead of u_int. */ +#if defined(CSRG_BASED) +#if defined(OPT_CONST_CORRECT) +tt_x_putbytes(XDR *xp, const char *, unsigned int len) +#else +tt_x_putbytes(XDR *xp, caddr_t, unsigned int len) +#endif +#else tt_x_putbytes(XDR *xp, caddr_t, int len) +#endif { xp->x_handy += RNDUP (len); return TRUE; @@ -66,10 +82,16 @@ tt_x_putbytes(XDR *xp, caddr_t, int len) #if defined(ultrix) || defined(__osf__) static int* +#elif defined(CSRG_BASED) +static int32_t* #else static long * #endif +#if defined(CSRG_BASED) +tt_x_inline(XDR *xp, unsigned int len) +#else tt_x_inline(XDR *xp, int len) +#endif { /* Be paranoid -- some code really expects inline to * always succeed, so we keep a small buffer around @@ -83,6 +105,8 @@ tt_x_inline(XDR *xp, int len) xp->x_handy += RNDUP (len); #if defined(ultrix) || defined(__osf__) return (int *) xp->x_private; +#elif defined(CSRG_BASED) + return (int32_t *) xp->x_private; #else return (long *) xp->x_private; #endif diff --git a/cde/lib/tt/mini_isam/isalloc.c b/cde/lib/tt/mini_isam/isalloc.c index 2b0bf9ec5..a4d8f2686 100644 --- a/cde/lib/tt/mini_isam/isalloc.c +++ b/cde/lib/tt/mini_isam/isalloc.c @@ -41,7 +41,7 @@ static char sccsid[] = "@(#)isalloc.c 1.3 89/07/17 Copyr 1988 Sun Micro"; */ #include "isam_impl.h" -#include +#include /* strdup is not defined in Ultrix' string.h, so it is implemented in a separate * file named strdup.ultrix.c diff --git a/cde/lib/tt/mini_isam/isam.h b/cde/lib/tt/mini_isam/isam.h index d9afe8f75..c5ce62906 100644 --- a/cde/lib/tt/mini_isam/isam.h +++ b/cde/lib/tt/mini_isam/isam.h @@ -57,8 +57,7 @@ extern long ldlong(); extern float ldfloat(); extern double lddbl(); extern short ldshort(); -extern ldchar(), stchar(), stlong(), stint(), stdbl(), stfloat(); -extern stbin(), ldbin(); +extern int ldchar(), stchar(), stlong(), stint(), stdbl(), stfloat(); extern int iserrno; /* isam error number code */ extern long isrecnum; /* record number of last call */ diff --git a/cde/lib/tt/mini_isam/isam_impl.h b/cde/lib/tt/mini_isam/isam_impl.h index 92aea24fd..f708b3c22 100644 --- a/cde/lib/tt/mini_isam/isam_impl.h +++ b/cde/lib/tt/mini_isam/isam_impl.h @@ -371,7 +371,7 @@ typedef struct maphdr { /* * Macro to get pointer to structure if pointer to some element is known */ -#define GETBASE(p,s,e) ((struct s *) ((char *)(p) - (int)&((struct s *)0)->e)) +#define GETBASE(p,s,e) ((struct s *) ((char *)(p) - (char *)&((struct s *)0)->e)) /* In memory sorting object */ typedef struct issort { @@ -474,7 +474,7 @@ extern int _isfcb_cntlpg_w(); #define VL_RECNOTAIL ((long ) -2L) -extern long lseek(); +/* extern long lseek(); */ extern char *_ismalloc(), *_isrealloc(), *_isallocstring(); extern void _isfree(), _isfreestring(); diff --git a/cde/lib/tt/mini_isam/iscntl.c b/cde/lib/tt/mini_isam/iscntl.c index 80a9e23ea..1e28ddf9e 100644 --- a/cde/lib/tt/mini_isam/iscntl.c +++ b/cde/lib/tt/mini_isam/iscntl.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17"; * Generic control function */ -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include @@ -79,7 +79,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17"; typedef int (* intfunc)(); -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) int iscntl(int isfd, int func, ...) #else @@ -94,7 +94,7 @@ iscntl(isfd, func, va_alist) va_list pvar; int ret; -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) va_start(pvar, func); #else va_start(pvar); diff --git a/cde/lib/tt/mini_isam/isdatconv.c b/cde/lib/tt/mini_isam/isdatconv.c index 1f7e3de48..32ba1696e 100644 --- a/cde/lib/tt/mini_isam/isdatconv.c +++ b/cde/lib/tt/mini_isam/isdatconv.c @@ -194,7 +194,7 @@ ldchar2(src, len, dst) /* Load the entire string. */ memcpy((void *) dst, (const void *) src, len); - *(dst + len) = NULL; + *(dst + len) = '\0'; } int diff --git a/cde/lib/tt/mini_isam/isdiskbufs2.c b/cde/lib/tt/mini_isam/isdiskbufs2.c index 99277a4bc..ee9de43f8 100644 --- a/cde/lib/tt/mini_isam/isdiskbufs2.c +++ b/cde/lib/tt/mini_isam/isdiskbufs2.c @@ -51,7 +51,7 @@ extern struct dlink *_isdln_next(), *_isdln_first(); #define ISHASHHDRS 256 /* Must be a power of two */ #define ISHASHMASK (ISHASHHDRS-1) -#define __hashblkno(fcb,blkno) (((int)(fcb)+(blkno)) & ISHASHMASK) +#define __hashblkno(fcb,blkno) (((size_t)(fcb)+(blkno)) & ISHASHMASK) #define base ((char *)0) diff --git a/cde/lib/tt/mini_isam/isstart.c b/cde/lib/tt/mini_isam/isstart.c index 1204ba453..84f0fad8b 100644 --- a/cde/lib/tt/mini_isam/isstart.c +++ b/cde/lib/tt/mini_isam/isstart.c @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)isstart.c 1.9 89/07/17 Copyr 1988 Sun Micro"; #include "isam_impl.h" #include +#include static int _amstart(); @@ -591,7 +592,7 @@ _amstart(isfhandle, record, reclen, readmode, /* Clean-up work. */ if (newcrp != NULL) - free((char *)newcrp); + free(newcrp); _isdisk_commit(); /* This will only check * that we unfixed all fixed diff --git a/cde/lib/tt/slib/mp_otype.C b/cde/lib/tt/slib/mp_otype.C index cde56abf4..48a78e0e6 100644 --- a/cde/lib/tt/slib/mp_otype.C +++ b/cde/lib/tt/slib/mp_otype.C @@ -31,7 +31,7 @@ * Copyright (c) 1990 by Sun Microsystems, Inc. */ #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_ptype.C b/cde/lib/tt/slib/mp_ptype.C index 687873366..76ce3a869 100644 --- a/cde/lib/tt/slib/mp_ptype.C +++ b/cde/lib/tt/slib/mp_ptype.C @@ -26,7 +26,7 @@ //%% (c) Copyright 1993, 1994 Novell, Inc. //%% $TOG: mp_ptype.C /main/4 1998/03/20 14:27:56 mgreess $ #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_rpc_implement.C b/cde/lib/tt/slib/mp_rpc_implement.C index 22c22387e..68e9819e5 100644 --- a/cde/lib/tt/slib/mp_rpc_implement.C +++ b/cde/lib/tt/slib/mp_rpc_implement.C @@ -49,7 +49,7 @@ #include #include #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_rpc_server.C b/cde/lib/tt/slib/mp_rpc_server.C index 0b038cbe4..1ed95468c 100644 --- a/cde/lib/tt/slib/mp_rpc_server.C +++ b/cde/lib/tt/slib/mp_rpc_server.C @@ -355,7 +355,11 @@ gettransient(int proto, int vers, int *sockp) #ifndef OPT_TLI int found; int s; +#if defined(linux) || defined(CSRG_BASED) + socklen_t len; +#else int len; +#endif int socktype; sockaddr_in addr; sockaddr_in tport; diff --git a/cde/lib/tt/slib/mp_signature.C b/cde/lib/tt/slib/mp_signature.C index 259317b31..62323573a 100644 --- a/cde/lib/tt/slib/mp_signature.C +++ b/cde/lib/tt/slib/mp_signature.C @@ -35,7 +35,7 @@ * a procedure. */ #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/lib/tt/slib/mp_typedb.C b/cde/lib/tt/slib/mp_typedb.C index 5ff381e17..ca1406510 100644 --- a/cde/lib/tt/slib/mp_typedb.C +++ b/cde/lib/tt/slib/mp_typedb.C @@ -39,7 +39,7 @@ // databases. // #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) /*# include */ #else # include diff --git a/cde/programs/Imakefile b/cde/programs/Imakefile index 5375d5367..ca66a8bc6 100644 --- a/cde/programs/Imakefile +++ b/cde/programs/Imakefile @@ -5,11 +5,14 @@ XCOMM $XConsortium: Imakefile /main/17 1996/10/06 17:13:20 rws $ #if UseNSGMLS NSGMLSDIR = nsgmls #endif -EXTRADIRS = util types localized tttypes $(NSGMLSDIR) +EXTRADIRS = types localized tttypes $(NSGMLSDIR) +#if !defined(OpenBSDArchitecture) +EXTRADIRS += util +#endif XCOMM some of these cannot be built on linux yet. XCOMM dtksh dtinfo -#if defined(LinuxArchitecture) +#if defined(LinuxArchitecture) || defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) DTKSHDIR = DTINFODIR = #else @@ -18,7 +21,7 @@ DTINFODIR = dtinfo #endif -SUBDIRS = dthelp dtmail dsdm dtpad dtfile dtwm dtlogin \ +SUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \ dtsession dthello dtstyle dtexec dtdbcache dticon dtterm \ dtcalc dtaction dtspcd \ dtscreen $(DTKSHDIR) dtcm dtsearchpath \ @@ -27,7 +30,7 @@ SUBDIRS = dthelp dtmail dsdm dtpad dtfile dtwm dtlogin \ dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \ dtpdmd $(DTINFODIR) $(EXTRADIRS) -LINTSUBDIRS = dthelp dtmail dsdm dtpad dtfile dtlogin dtwm \ +LINTSUBDIRS = dthelp dsdm dtmail dtpad dtfile dtlogin dtwm \ dtsession dthello dtstyle dtexec dtdbcache dticon dtterm \ dtcalc dtaction dtcreate \ dtscreen $(DTKSHDIR) dtcm dtsearchpath \ @@ -35,7 +38,6 @@ LINTSUBDIRS = dthelp dtmail dsdm dtpad dtfile dtlogin dtwm \ dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \ dtpdmd $(DTINFODIR) $(EXTRADIRS) - MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) LintSubdirs($(LINTSUBDIRS)) diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c index 13f2d24f1..866ec8db7 100644 --- a/cde/programs/dtaction/Main.c +++ b/cde/programs/dtaction/Main.c @@ -295,7 +295,7 @@ main( XtSetLanguageProc(NULL, NULL, NULL); _DtEnvControl(DT_ENV_SET); - (void) signal(SIGCLD, (void (*)())SIG_IGN); + (void) signal(SIGCHLD, (void (*)())SIG_IGN); /* Initialize the toolkit and open the display */ XtToolkitInitialize() ; @@ -407,7 +407,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) /* fix process gid */ #if defined(SVR4) || defined(_AIX) setgid(rgid); -#elif defined(__osf__) || defined(linux) +#elif defined(__osf__) || defined(linux) || defined(CSRG_BASED) setregid(rgid, rgid); #elif defined(__hpux) setresgid(rgid, rgid, rgid); @@ -418,7 +418,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) /* fix process uid */ #if defined (SVR4) || defined (_AIX) setuid(ruid); -#elif defined(__osf__) || defined(linux) +#elif defined(__osf__) || defined(linux) || defined(CSRG_BASED) setreuid(ruid, ruid); #elif defined(__hpux) setresuid(ruid, ruid, ruid); @@ -898,7 +898,7 @@ GetUserPrompt( void ) XmString cancelLabel; XmString okLabel; - snprintf(prompt, BUFSIZ, (GETMESSAGE(1,5, "Enter password for user %s:")), + snprintf(prompt, sizeof prompt, (GETMESSAGE(1,5, "Enter password for user %s:")), appArgs.user); xmString = XmStringCreateLocalized(prompt); xmString2 =XmStringCreateLocalized(GETMESSAGE(1,6, "Action Invoker - Password")); diff --git a/cde/programs/dtappbuilder/src/ab/abobjP.h b/cde/programs/dtappbuilder/src/ab/abobjP.h index 21c5536fc..7740c98e5 100644 --- a/cde/programs/dtappbuilder/src/ab/abobjP.h +++ b/cde/programs/dtappbuilder/src/ab/abobjP.h @@ -47,7 +47,9 @@ #define _ABOBJ_P_H_ +#if !defined(CSRG_BASED) #include +#endif #include #include diff --git a/cde/programs/dtappbuilder/src/ab/abobj_set.c b/cde/programs/dtappbuilder/src/ab/abobj_set.c index 92488f146..0c748b092 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_set.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_set.c @@ -49,7 +49,9 @@ *********************************************************************** */ #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include
diff --git a/cde/programs/dtappbuilder/src/ab/prop.c b/cde/programs/dtappbuilder/src/ab/prop.c index 682f2f83a..9aec493c3 100644 --- a/cde/programs/dtappbuilder/src/ab/prop.c +++ b/cde/programs/dtappbuilder/src/ab/prop.c @@ -86,6 +86,10 @@ #include "dtbuilder.h" #include "revolv_ui.h" +#if defined(CSRG_BASED) +#define MAXINT INT_MAX +#endif + char *LabelForString = NULL; char *LabelForGraphic = NULL; char *NoneItem = NULL; diff --git a/cde/programs/dtappbuilder/src/ab/prop.h b/cde/programs/dtappbuilder/src/ab/prop.h index a7e5c166e..8ff07c975 100644 --- a/cde/programs/dtappbuilder/src/ab/prop.h +++ b/cde/programs/dtappbuilder/src/ab/prop.h @@ -47,7 +47,9 @@ #define _PROPS_H_ #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include diff --git a/cde/programs/dtappbuilder/src/ab/propP.h b/cde/programs/dtappbuilder/src/ab/propP.h index 33052c799..798bcdc43 100644 --- a/cde/programs/dtappbuilder/src/ab/propP.h +++ b/cde/programs/dtappbuilder/src/ab/propP.h @@ -48,7 +48,9 @@ #define _PROPP_H_ #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include diff --git a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c index 06007c22f..6440a7642 100644 --- a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c +++ b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c @@ -279,7 +279,7 @@ printf_setval(GenCodeInfo genCodeInfo, ABObj obj, ...) { int return_value = 0; File codeFile = genCodeInfo->code_file; -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) /* OSF/1 define va_list in as structure of char ** and int * Sun define va_list as void * */ va_list paramList = { NULL, 0 }; diff --git a/cde/programs/dtappbuilder/src/abmf/write_c.c b/cde/programs/dtappbuilder/src/abmf/write_c.c index 7eb647ce6..93d561937 100644 --- a/cde/programs/dtappbuilder/src/abmf/write_c.c +++ b/cde/programs/dtappbuilder/src/abmf/write_c.c @@ -350,7 +350,7 @@ write_func_def_params( va_list va_params ) { -#if defined(__ppc) || defined(linux) +#if defined(__ppc) || defined(linux) || defined(CSRG_BASED) #define va_start_params() __va_copy(params, va_params) #else #define va_start_params() (params = va_params) diff --git a/cde/programs/dtappbuilder/src/libABobj/obj.c b/cde/programs/dtappbuilder/src/libABobj/obj.c index 204b05c2d..8b873161a 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj.c @@ -47,7 +47,9 @@ #include #include #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include diff --git a/cde/programs/dtappbuilder/src/libAButil/abio.c b/cde/programs/dtappbuilder/src/libAButil/abio.c index 0d4564574..a1486f6eb 100644 --- a/cde/programs/dtappbuilder/src/libAButil/abio.c +++ b/cde/programs/dtappbuilder/src/libAButil/abio.c @@ -69,7 +69,6 @@ #include #include #include -#include #include #include #include diff --git a/cde/programs/dtappbuilder/src/libAButil/istr.h b/cde/programs/dtappbuilder/src/libAButil/istr.h index fead77a60..358281484 100644 --- a/cde/programs/dtappbuilder/src/libAButil/istr.h +++ b/cde/programs/dtappbuilder/src/libAButil/istr.h @@ -272,7 +272,7 @@ extern ISTR_PRIVT_STRN *istrP_int_array1809065681PrivD; #define istr_string_safe(s) ((s) == NULL? Istr_null_string:istr_string(s)) #define istrP_get_string_fast3718930164PrivF(istring) \ - (istrP_int_array1809065681PrivD[((int)istring)].str) + ((istring)==NULL ? Istr_null_string : (istrP_int_array1809065681PrivD[((long)istring)].str)) /* istr_string - if debugging is turned on, checks ISTRINGS for validity */ #ifdef DEBUG diff --git a/cde/programs/dtcalc/calctool.c b/cde/programs/dtcalc/calctool.c index b0d2ce9a8..063f09c4b 100644 --- a/cde/programs/dtcalc/calctool.c +++ b/cde/programs/dtcalc/calctool.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/cde/programs/dtcalc/motif.c b/cde/programs/dtcalc/motif.c index 2a663e4d7..e3db030d7 100644 --- a/cde/programs/dtcalc/motif.c +++ b/cde/programs/dtcalc/motif.c @@ -80,6 +80,7 @@ #include #include #include +#include /* Copied from BaseClassI.h */ extern XmWidgetExtData _XmGetWidgetExtData( Widget widget, @@ -266,6 +267,12 @@ extern Vars v ; /* Calctool variables and options. */ char translations_return[] = "Return:ManagerGadgetSelect()"; static Boolean NoDisplay=False; +extern XtPointer _XmStringUngenerate ( + XmString string, + XmStringTag tag, + XmTextType tag_type, + XmTextType output_type); + int main(argc, argv) int argc ; diff --git a/cde/programs/dtcm/dtcm/Imakefile b/cde/programs/dtcm/dtcm/Imakefile index 4e36ab44a..aff082600 100644 --- a/cde/programs/dtcm/dtcm/Imakefile +++ b/cde/programs/dtcm/dtcm/Imakefile @@ -12,11 +12,11 @@ LOCAL_LIBRARIES = ../libDtCmP/libDtCmP.a $(CSALIB) DtClientLibs OSMAJORVERSION = OSMajorVersion OSMINORVERSION = OSMinorVersion - DEFINES = -DSVR4 -DREL="$(OSMAJORVERSION)$(OSMINORVERSION)" \ + DEFINES = -DREL="$(OSMAJORVERSION)$(OSMINORVERSION)" \ -DRELMAJOR="$(OSMAJORVERSION)" -DRELMINOR="$(OSMINORVERSION)" \ $(ICONV_INBUF_DEFINE) -#if defined(RsArchitecture) || defined(USLArchitecture) || defined(UXPArchitecture) || defined(LinuxArchitecture) +#if defined(RsArchitecture) || defined(USLArchitecture) || defined(UXPArchitecture) || defined(LinuxArchitecture) || defined(OpenBSDArchitecture) TTY_LIBRARIES = $(LOCAL_LIBRARIES) #elif defined(AlphaArchitecture) TTY_LIBRARIES = $(DTCMPLIB) $(CSALIB) $(DTSVCLIB) $(XTOOLLIB) $(XLIB) @@ -32,6 +32,10 @@ EXTRA_LIBRARIES = -lrpcsvc -lPW -ldiag EXTRA_LIBRARIES = -lrpcsvc -lV3 #endif +#if defined(OpenBSDArchitecture) +EXTRA_LIBRARIES = -lcompat +#endif + #ifdef SunArchitecture XCOMM Uncomment to build using Federated Naming Services. To activate XCOMM you must set the UseFNS resource to True before runnin dtcm. diff --git a/cde/programs/dtcm/dtcm/graphics.c b/cde/programs/dtcm/dtcm/graphics.c index cc692ef0a..c8b4103e4 100644 --- a/cde/programs/dtcm/dtcm/graphics.c +++ b/cde/programs/dtcm/dtcm/graphics.c @@ -54,7 +54,9 @@ static char sccsid[] = "@(#)graphics.c 1.23 94/11/29 Copyr 1994 Sun Microsystem #include #include #include +#if !defined(CSRG_BASED) #include +#endif #include /* MAXPATHLEN defined here */ #ifdef SVR4 #include /* SYS_NMLN */ diff --git a/cde/programs/dtcm/dtcm/props.c b/cde/programs/dtcm/dtcm/props.c index 01cc908ac..4f84a7dec 100644 --- a/cde/programs/dtcm/dtcm/props.c +++ b/cde/programs/dtcm/dtcm/props.c @@ -29,7 +29,6 @@ */ #include -#include #include #include #include diff --git a/cde/programs/dtcm/dtcm/props_pu.c b/cde/programs/dtcm/dtcm/props_pu.c index 5e84f3641..747ca9c7d 100644 --- a/cde/programs/dtcm/dtcm/props_pu.c +++ b/cde/programs/dtcm/dtcm/props_pu.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/cde/programs/dtcm/libDtCmP/Imakefile b/cde/programs/dtcm/libDtCmP/Imakefile index a1cfd4da4..72b7fbd65 100644 --- a/cde/programs/dtcm/libDtCmP/Imakefile +++ b/cde/programs/dtcm/libDtCmP/Imakefile @@ -12,7 +12,7 @@ INCLUDES = -I. -I$(CSASRC) OSMAJORVERSION = OSMajorVersion OSMINORVERSION = OSMinorVersion -DEFINES = -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N -DSVR4 \ +DEFINES = -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N \ -DREL="$(OSMAJORVERSION)$(OSMINORVERSION)" \ -DRELMAJOR="$(OSMAJORVERSION)" -DRELMINOR="$(OSMINORVERSION)" diff --git a/cde/programs/dtcm/libDtCmP/dtfns.c b/cde/programs/dtcm/libDtCmP/dtfns.c index 3b853542a..74eb79212 100644 --- a/cde/programs/dtcm/libDtCmP/dtfns.c +++ b/cde/programs/dtcm/libDtCmP/dtfns.c @@ -72,7 +72,7 @@ static char sccsid[] = "@(#)dtfns.c 1.3 94/11/07 Copyr 1993 Sun Microsystems, I #include #include #include -#include +#include #include #include #include diff --git a/cde/programs/dtcm/libDtCmP/getdate.y b/cde/programs/dtcm/libDtCmP/getdate.y index 35a1aa32c..e32382202 100644 --- a/cde/programs/dtcm/libDtCmP/getdate.y +++ b/cde/programs/dtcm/libDtCmP/getdate.y @@ -65,7 +65,9 @@ static char sccsid[] = "@(#)getdate.y 1.10 94/11/07 Copyr 1993 Sun Microsystems #define STANDARD 2 #define MAYBE 3 +#ifdef SVR4 extern long timezone; +#endif %} diff --git a/cde/programs/dtcm/libDtCmP/timeops.c b/cde/programs/dtcm/libDtCmP/timeops.c index f0cdbbd7d..dcb722bae 100644 --- a/cde/programs/dtcm/libDtCmP/timeops.c +++ b/cde/programs/dtcm/libDtCmP/timeops.c @@ -1008,6 +1008,7 @@ init_time() _Xltimeparams localtime_buf; _Xgtimeparams gmtime_buf; +#ifdef SVR4 /* Fix for QAR 31607 */ tzset(); if (getenv("TZ") == NULL){ @@ -1017,6 +1018,7 @@ init_time() putenv(tzptr); tzset(); } +#endif t = now(); tm = *_XLocaltime(&t, localtime_buf); diff --git a/cde/programs/dtcm/server/Imakefile b/cde/programs/dtcm/server/Imakefile index f3158cea4..9c8f536ce 100644 --- a/cde/programs/dtcm/server/Imakefile +++ b/cde/programs/dtcm/server/Imakefile @@ -30,7 +30,7 @@ LOCAL_LIBRARIES = $(CSALIB) $(DTWIDGETLIB) $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) $(X OSMAJORVERSION = OSMajorVersion OSMINORVERSION = OSMinorVersion - DEFINES = -DREL="$(OSMAJORVERSION)$(OSMINORVERSION)" -DSVR4 \ + DEFINES = -DREL="$(OSMAJORVERSION)$(OSMINORVERSION)" \ -DRELMAJOR="$(OSMAJORVERSION)" \ -DRELMINOR="$(OSMINORVERSION)" diff --git a/cde/programs/dtcm/server/delete.c b/cde/programs/dtcm/server/delete.c index 879d7eaf8..46479d908 100644 --- a/cde/programs/dtcm/server/delete.c +++ b/cde/programs/dtcm/server/delete.c @@ -38,7 +38,9 @@ #include #include #include +#if !defined(CSRG_BASED) #include +#endif #ifdef SunOS #include #endif diff --git a/cde/programs/dtcm/server/insert.c b/cde/programs/dtcm/server/insert.c index 7c0852f4c..35591083b 100644 --- a/cde/programs/dtcm/server/insert.c +++ b/cde/programs/dtcm/server/insert.c @@ -38,7 +38,9 @@ #include #include #include +#if !defined(CSRG_BASED) #include +#endif #ifdef SunOS #include #endif diff --git a/cde/programs/dtcm/server/lookup.c b/cde/programs/dtcm/server/lookup.c index 5a5ac6a1f..883aba64f 100644 --- a/cde/programs/dtcm/server/lookup.c +++ b/cde/programs/dtcm/server/lookup.c @@ -38,7 +38,9 @@ #include #include #include +#if !defined(CSRG_BASED) #include +#endif #ifdef SunOS #include #endif diff --git a/cde/programs/dtcm/server/rtable4.c b/cde/programs/dtcm/server/rtable4.c index fb6aab00d..061b63dc9 100644 --- a/cde/programs/dtcm/server/rtable4.c +++ b/cde/programs/dtcm/server/rtable4.c @@ -45,7 +45,11 @@ #include #include #include +#if defined(CSRG_BASED) +#define MAXINT INT_MAX +#else #include +#endif #include #include #ifdef SUNOS @@ -1406,12 +1410,21 @@ extern long * _DtCm_rtable_gmtoff_4_svc(void *args, struct svc_req *svcrq) { static long gmtoff; +#if !defined(CSRG_BASED) extern long timezone; +#else + struct tm *t; +#endif if (debug) fprintf(stderr, "_DtCm_rtable_gmtoff_4_svc called\n"); +#if defined(CSRG_BASED) + t = localtime(time(NULL)); + gmtoff = t->tm_gmtoff; +#else gmtoff = timezone; +#endif return(&gmtoff); } diff --git a/cde/programs/dtcm/server/svcmain.c b/cde/programs/dtcm/server/svcmain.c index 62230ad5b..d329f6846 100644 --- a/cde/programs/dtcm/server/svcmain.c +++ b/cde/programs/dtcm/server/svcmain.c @@ -702,7 +702,8 @@ main(int argc, char **argv) if (udp_transp == (SVCXPRT *)-1) { udp_transp = svcudp_create(standalone ? RPC_ANYSOCK : 0 -#if defined(_AIX) || defined(hpV4) || defined(__osf__) || defined(linux) +#if defined(_AIX) || defined(hpV4) || defined(__osf__) || defined(linux) || \ + defined(CSRG_BASED) ); #else ,0,0); diff --git a/cde/programs/dtcm/server/update.c b/cde/programs/dtcm/server/update.c index 5861b9286..ed20fca2a 100644 --- a/cde/programs/dtcm/server/update.c +++ b/cde/programs/dtcm/server/update.c @@ -38,7 +38,9 @@ #include #include #include +#if !defined(CSRG_BASED) #include +#endif #ifdef SunOS #include #endif diff --git a/cde/programs/dtcm/server/v4ops.c b/cde/programs/dtcm/server/v4ops.c index af97c4b29..d4eceba9e 100644 --- a/cde/programs/dtcm/server/v4ops.c +++ b/cde/programs/dtcm/server/v4ops.c @@ -36,7 +36,12 @@ #include #include #include +#if defined(CSRG_BASED) +#include +#define MAXINT INT_MAX +#else #include +#endif #ifdef SunOS #include #endif diff --git a/cde/programs/dtcreate/AddFiletype.c b/cde/programs/dtcreate/AddFiletype.c index 8d70b2a2b..7df5bb2eb 100644 --- a/cde/programs/dtcreate/AddFiletype.c +++ b/cde/programs/dtcreate/AddFiletype.c @@ -261,6 +261,7 @@ static Widget _Uxbuild_AddFiletype(void) char *pre, *suf, *title; XmString emptyString; + size_t len; #define TIGHTNESS 20 #define ICON_MIN_HEIGHT 83 @@ -276,8 +277,9 @@ static Widget _Uxbuild_AddFiletype(void) pre = GETMESSAGE(3, 10, "Create Action"); suf = GETMESSAGE(7, 10, "Add Datatype"); - title = XtMalloc(strlen(pre) + strlen(suf) + 2); - sprintf(title, "%s - %s", pre, suf); + len = strlen(pre) + strlen(suf) + 4; + title = XtMalloc(len); + snprintf(title,len - 1, "%s - %s", pre, suf); _UxParent = XtVaCreatePopupShell( "AddFiletype_shell", xmDialogShellWidgetClass, _UxParent, diff --git a/cde/programs/dtcreate/CreateActionAppShell.c b/cde/programs/dtcreate/CreateActionAppShell.c index 5396a8c77..8558ba5e5 100644 --- a/cde/programs/dtcreate/CreateActionAppShell.c +++ b/cde/programs/dtcreate/CreateActionAppShell.c @@ -345,6 +345,7 @@ static void activateCB_CA_FiletypesDelete( Widget UxWidget, int cnt; Boolean bFound; char *msgPtr1, *msgPtr2, *fmtPtr, *errPtr; + size_t len; /**************************************************************************/ /* Determine the filetypes to delete and delete them. */ @@ -411,9 +412,9 @@ static void activateCB_CA_FiletypesDelete( Widget UxWidget, msgPtr2 = XtNewString(GETMESSAGE(5, 125, "Please select the Datatype you would like to Delete.")); fmtPtr = "%s\n%s"; - errPtr = XtMalloc((strlen(msgPtr1) + strlen(msgPtr2) + - strlen(fmtPtr) + 1) * sizeof(char)); - sprintf(errPtr, fmtPtr, msgPtr1, msgPtr2); + len = (strlen(msgPtr1) + strlen(msgPtr2) + strlen(fmtPtr) + 2); + errPtr = XtMalloc(len); + snprintf(errPtr,len - 1, fmtPtr, msgPtr1, msgPtr2); XtFree(msgPtr2); XtFree(msgPtr1); display_error_message(CreateActionAppShell, errPtr); diff --git a/cde/programs/dtcreate/ca_aux.c b/cde/programs/dtcreate/ca_aux.c index afd105a26..74f08e15c 100644 --- a/cde/programs/dtcreate/ca_aux.c +++ b/cde/programs/dtcreate/ca_aux.c @@ -849,6 +849,7 @@ void activateCB_add_filetype (Widget wid, XtPointer client_data, char *ptr; char tmpbuf[50]; char *pre, *suf, *title; + size_t len; if (!CreateActionAppShellCheckFields()) { @@ -893,8 +894,9 @@ void activateCB_add_filetype (Widget wid, XtPointer client_data, pre = GETMESSAGE(3, 10, "Create Action"); suf = GETMESSAGE(7, 10, "Add Datatype"); - title = XtMalloc(strlen(pre) + strlen(suf) + 2); - sprintf(title, "%s - %s", pre, suf); + len = strlen(pre) + strlen(suf) + 4; + title = XtMalloc(len); + snprintf(title,len - 1,"%s - %s", pre, suf); XtVaSetValues (AddFiletype, RES_CONVERT (XmNdialogTitle, title ), @@ -924,11 +926,13 @@ void activateCB_edit_filetype (Widget wid, XtPointer client_data, int selecteditem; char *msgPtr1, *msgPtr2, *fmtPtr, *errPtr; char *pre, *suf, *title; + size_t len; pre = GETMESSAGE(3, 10, "Create Action"); suf = GETMESSAGE(7, 11, "Edit Datatype"); - title = XtMalloc(strlen(pre) + strlen(suf) + 2); - sprintf(title, "%s - %s", pre, suf); + len = strlen(pre) + strlen(suf) + 4; + title = XtMalloc(len); + snprintf(title,len - 1, "%s - %s", pre, suf); /**************************************************************************/ /* Determine the selected list item. */ @@ -959,9 +963,10 @@ void activateCB_edit_filetype (Widget wid, XtPointer client_data, msgPtr2 = XtNewString(GETMESSAGE(5, 130, "Please select the Datatype you would like to Edit.")); fmtPtr = "%s\n%s"; - errPtr = XtMalloc((strlen(msgPtr1) + strlen(msgPtr2) + - strlen(fmtPtr) + 1) * sizeof(char)); - sprintf(errPtr, fmtPtr, msgPtr1, msgPtr2); + len = (strlen(msgPtr1) + strlen(msgPtr2) + + strlen(fmtPtr) + 3); + errPtr = XtMalloc(len); + snprintf(errPtr,len - 1, fmtPtr, msgPtr1, msgPtr2); XtFree(msgPtr2); XtFree(msgPtr1); display_error_message(CreateActionAppShell, errPtr); diff --git a/cde/programs/dtcreate/main.c b/cde/programs/dtcreate/main.c index 168cd8857..6fd972c22 100644 --- a/cde/programs/dtcreate/main.c +++ b/cde/programs/dtcreate/main.c @@ -548,6 +548,9 @@ DieFromToolTalkError(Widget parent, char *errfmt, Tt_status status) if (! tt_is_err(status)) return; statmsg = tt_status_message(status); + /* Solaris dtcreate ignores this so we should too */ + if(status == TT_ERR_PTYPE) + return; errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2); sprintf(errmsg, errfmt, statmsg); diff --git a/cde/programs/dtcreate/parser.c b/cde/programs/dtcreate/parser.c index 7886e0867..a62476af8 100644 --- a/cde/programs/dtcreate/parser.c +++ b/cde/programs/dtcreate/parser.c @@ -851,7 +851,7 @@ int done=FALSE, argfound=FALSE,promptfound=FALSE; covers the complete string between %'s */ - if(argbuf) free(argbuf); + if(argbuf) { free(argbuf); argbuf = NULL; } if(s2) { argbuf = (char *)calloc(1,(s2-s1)+2); @@ -877,7 +877,7 @@ int done=FALSE, argfound=FALSE,promptfound=FALSE; else if (s1 && *s1) { strcat(exec_args[0],s1); - if(argbuf) free(argbuf); + if(argbuf) { free(argbuf); argbuf = NULL; } done = TRUE; continue; } @@ -934,7 +934,7 @@ int done=FALSE, argfound=FALSE,promptfound=FALSE; argfound = FALSE; s1=s2; } - if(argbuf) free(argbuf); + if(argbuf) { free(argbuf); argbuf = NULL; } return exec_args; } diff --git a/cde/programs/dtdocbook/instant/util.c b/cde/programs/dtdocbook/instant/util.c index 19ab9bdda..eb3d26472 100644 --- a/cde/programs/dtdocbook/instant/util.c +++ b/cde/programs/dtdocbook/instant/util.c @@ -78,7 +78,9 @@ static char *RCSid = #include #include #include +#if !defined(CSRG_BASED) #include +#endif #include "general.h" diff --git a/cde/programs/dtdocbook/tcl/Imakefile b/cde/programs/dtdocbook/tcl/Imakefile index d5b2f6c3a..4805d1757 100644 --- a/cde/programs/dtdocbook/tcl/Imakefile +++ b/cde/programs/dtdocbook/tcl/Imakefile @@ -14,6 +14,9 @@ XCOMM Directory from which applications will reference the library of Tcl XCOMM scripts (note: you can set the TCL_LIBRARY environment variable at XCOMM run-time to override this value): TCL_LIBRARY = $(prefix)/lib/tcl$(VERSION) +#ifdef OpenBSDArchitecture +TCL_LIBRARY = TclLibrary +#endif #ifdef SunArchitecture EXTRA_DEFINES = -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \ @@ -31,10 +34,17 @@ EXTRA_DEFINES = -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \ -DTCL_GOT_TIMEZONE -DTIME_WITH_SYS_TIME # else +# ifdef OpenBSDArchitecture +EXTRA_DEFINES = -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \ + -DNO_UNION_WAIT -DHAVE_UNISTD_H \ + -DTCL_GOT_TIMEZONE + +# else EXTRA_DEFINES = -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \ -DNO_UNION_WAIT -DHAVE_UNISTD_H -DNEED_MATHERR \ -DTCL_GOT_TIMEZONE +# endif # endif # endif #endif diff --git a/cde/programs/dtexec/Main.c b/cde/programs/dtexec/Main.c index a062203e8..3c359f009 100644 --- a/cde/programs/dtexec/Main.c +++ b/cde/programs/dtexec/Main.c @@ -538,7 +538,7 @@ InitializeSignalHandling( void ) sigemptyset(&svec.sa_mask); svec.sa_flags = 0; svec.sa_handler = SigCld; - (void) sigaction(SIGCLD, &svec, (struct sigaction *) NULL); + (void) sigaction(SIGCHLD, &svec, (struct sigaction *) NULL); /* * "Urgent Signal" handlers @@ -667,7 +667,7 @@ ExecuteCommand ( svec.sa_handler = SIG_DFL; /* Normal */ - (void) sigaction(SIGCLD, &svec, (struct sigaction *) NULL); + (void) sigaction(SIGCHLD, &svec, (struct sigaction *) NULL); /* Urgent */ (void) sigaction(SIGTERM, &svec, (struct sigaction *) NULL); diff --git a/cde/programs/dtfile/Desktop.c b/cde/programs/dtfile/Desktop.c index 2619769f6..a090af200 100644 --- a/cde/programs/dtfile/Desktop.c +++ b/cde/programs/dtfile/Desktop.c @@ -105,6 +105,7 @@ #include #include #include +#include #include #include diff --git a/cde/programs/dtfile/FileManip.c b/cde/programs/dtfile/FileManip.c index dd785d793..91f631c48 100644 --- a/cde/programs/dtfile/FileManip.c +++ b/cde/programs/dtfile/FileManip.c @@ -64,7 +64,7 @@ # define ROOTINO UFSROOTINO # endif /* sco */ #else -# if defined(linux) +# if defined(linux) || defined(CSRG_BASED) # define ROOTINO 2 # endif # include @@ -994,7 +994,8 @@ FileManip( if (lstat (to, &s2) >= 0) /* exists */ { if ((stat (to, &s3) >= 0) && -#if defined(__hp_osf) || (__ultrix) || defined(__osf__) || defined(linux) +#if defined(__hp_osf) || (__ultrix) || defined(__osf__) || defined(linux) || \ + defined(CSRG_BASED) (((s3.st_mode & S_IFMT) == S_IFDIR) /* if is a directory */ || ((s3.st_mode & S_IFMT) == S_IFSOCK)) ) /* or a net special */ #else diff --git a/cde/programs/dtfile/Filter.c b/cde/programs/dtfile/Filter.c index 7ff814582..5ee2137e5 100644 --- a/cde/programs/dtfile/Filter.c +++ b/cde/programs/dtfile/Filter.c @@ -106,6 +106,7 @@ #include "Filter.h" #include "Help.h" +char **DtDtsDataTypeNames(void); static char * FILE_FILTER = "FileFilter"; diff --git a/cde/programs/dtfile/Find.c b/cde/programs/dtfile/Find.c index 61a6b341c..094d2854c 100644 --- a/cde/programs/dtfile/Find.c +++ b/cde/programs/dtfile/Find.c @@ -1811,7 +1811,7 @@ ExecuteFind( if (access_priv == -1 && geteuid() != root_user) { #else -# if defined(__hp_osf) || defined(__ultrix) || defined(__osf__) || defined(linux) +# if defined(__hp_osf) || defined(__ultrix) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) setreuid(geteuid(),-1); if (access ((char *) path, R_OK) == -1) { @@ -1908,10 +1908,10 @@ ExecuteFind( #ifdef __osf__ oldSig = signal(SIGCHLD, sigchld_handler); #else - oldSig = signal(SIGCLD, SIG_DFL); + oldSig = signal(SIGCHLD, SIG_DFL); #endif /* __osf__ */ find_rec->popenId = findpopen(command, "r",&(find_rec->childpid)); - signal (SIGCLD, oldSig); + signal (SIGCHLD, oldSig); if (find_rec->popenId == NULL) { diff --git a/cde/programs/dtfile/HelpCB.c b/cde/programs/dtfile/HelpCB.c index 0dd9e2e67..6e2f63409 100644 --- a/cde/programs/dtfile/HelpCB.c +++ b/cde/programs/dtfile/HelpCB.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include diff --git a/cde/programs/dtfile/Imakefile b/cde/programs/dtfile/Imakefile index 4f66b8958..10a2ce72f 100644 --- a/cde/programs/dtfile/Imakefile +++ b/cde/programs/dtfile/Imakefile @@ -31,6 +31,10 @@ EXTRA_CCOPTIONS = -xF EXTRA_INCLUDES = -I/usr/include/freetype2 #endif +#if defined(OpenBSDArchitecture) +EXTRA_INCLUDES = -I$(XPROJECTROOT)/include/freetype2 +#endif + SRCS = ChangeDir.c ChangeDirP.c Command.c Common.c \ Desktop.c Directory.c Encaps.c File.c \ FileDialog.c FileManip.c FileMgr.c FileOp.c \ diff --git a/cde/programs/dtfile/Main.c b/cde/programs/dtfile/Main.c index cba552721..95c9722fe 100644 --- a/cde/programs/dtfile/Main.c +++ b/cde/programs/dtfile/Main.c @@ -121,7 +121,7 @@ #include #include -#include +#include #include #ifndef sun /* don't need the nl_types.h file */ @@ -1020,7 +1020,7 @@ main( /* error handling follows, none for now */ ; #else - (void) signal (SIGCLD, SIG_IGN); + (void) signal (SIGCHLD, SIG_IGN); #endif /* __osf__ */ XtSetLanguageProc( NULL, NULL, NULL ); diff --git a/cde/programs/dtfile/MkDir.c b/cde/programs/dtfile/MkDir.c index 972050e83..434c756a7 100644 --- a/cde/programs/dtfile/MkDir.c +++ b/cde/programs/dtfile/MkDir.c @@ -107,13 +107,13 @@ RunFileCommand( /* prepare to catch the command termination */ - oldSig = signal (SIGCLD, SIG_DFL); + oldSig = signal (SIGCHLD, SIG_DFL); /* fork a process to run command */ if ((child = fork ()) < 0) /* fork failed */ { - (void) signal (SIGCLD, oldSig); + (void) signal (SIGCHLD, oldSig); return (-1); } @@ -126,7 +126,7 @@ RunFileCommand( wait_return = wait (&exit_value); } while (wait_return != child); - (void) signal (SIGCLD, oldSig); /* child stopped or terminated */ + (void) signal (SIGCHLD, oldSig); /* child stopped or terminated */ return (exit_value); /* if exit_value == 0 then success */ } diff --git a/cde/programs/dtfile/SharedMsgs.c b/cde/programs/dtfile/SharedMsgs.c index 975d891f2..2813bcbb4 100644 --- a/cde/programs/dtfile/SharedMsgs.c +++ b/cde/programs/dtfile/SharedMsgs.c @@ -51,7 +51,6 @@ #include #include #include -#include #include #ifndef sun /* don't need the nl_types.h file */ #include diff --git a/cde/programs/dtfile/SharedProcs.c b/cde/programs/dtfile/SharedProcs.c index 5da029456..333efe087 100644 --- a/cde/programs/dtfile/SharedProcs.c +++ b/cde/programs/dtfile/SharedProcs.c @@ -130,6 +130,8 @@ extern XmWidgetExtData _XmGetWidgetExtData( #include "Main.h" #include "SharedProcs.h" +extern char *pathcollapse(); + /* Defines */ #define RW_ALL S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH diff --git a/cde/programs/dtfile/SharedProcs.h b/cde/programs/dtfile/SharedProcs.h index ec2eae8da..fe5f6243a 100644 --- a/cde/programs/dtfile/SharedProcs.h +++ b/cde/programs/dtfile/SharedProcs.h @@ -50,6 +50,9 @@ /******** Public Function Declarations ********/ +extern String _DtStripSpaces( + String string) ; + extern char * _DtPName( register char *name) ; extern char * _DtFollowLink( diff --git a/cde/programs/dtfile/Trash.c b/cde/programs/dtfile/Trash.c index a3b85e2b3..2f7fa3d36 100644 --- a/cde/programs/dtfile/Trash.c +++ b/cde/programs/dtfile/Trash.c @@ -101,7 +101,12 @@ #include #include #include +#if defined(CSRG_BASED) +#include +#include +#else #include +#endif #include #include @@ -4106,17 +4111,29 @@ CheckDeletePermission( char *parentdir, char *destinationPath) { +#if defined(CSRG_BASED) + struct statfs statbuf; +#else struct stat statbuf; +#endif char fname[1024]; +#if defined(CSRG_BASED) + if (statfs(parentdir,&statbuf) < 0) /* does not exist */ +#else if (lstat(parentdir,&statbuf) < 0) /* does not exist */ +#endif return -1; /* check if we are root */ if (getuid() == 0) { /* if NFS, need to check if server trusts root */ +#if defined(CSRG_BASED) + if (!strcmp(statbuf.f_fstypename, "nfs")) /* Root user and nfs */ +#else if (FileSysType(statbuf.st_dev) < 0) /* Root user and nfs */ +#endif { char *tmpfile; tmpfile = tempnam(parentdir,"quang"); @@ -4195,6 +4212,7 @@ CheckDeletePermissionRecur( return 0; } +#if !defined(CSRG_BASED) static int FileSysType( int dev) @@ -4204,6 +4222,7 @@ FileSysType( return -2; return u1.f_tinode; } +#endif static int RestoreObject( diff --git a/cde/programs/dtfile/dtcopy/sharedFuncs.c b/cde/programs/dtfile/dtcopy/sharedFuncs.c index 334c98cc5..fa25453f1 100644 --- a/cde/programs/dtfile/dtcopy/sharedFuncs.c +++ b/cde/programs/dtfile/dtcopy/sharedFuncs.c @@ -69,7 +69,7 @@ # define ROOTINO UFSROOTINO #endif -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) # include # define ROOTINO 2 #endif @@ -80,9 +80,12 @@ #include #include #include +#include #include #include +#if !defined(CSRG_BASED) #include +#endif #include @@ -373,6 +376,7 @@ ImageInitialize( Display *display ) return ; } /* end ImageInitialize */ +#if !defined(CSRG_BASED) static int CopyFileSysType( int dev) @@ -382,6 +386,7 @@ CopyFileSysType( return -2; return u1.f_tinode; } +#endif static int CopyCheckDeletePermissionRecur( @@ -446,17 +451,29 @@ CopyCheckDeletePermission( char *parentdir, char *destinationPath) { +#if defined(CSRG_BASED) + struct statfs statbuf; +#else struct stat statbuf; +#endif char fname[1024]; +#if defined(CSRG_BASED) + if (statfs(parentdir,&statbuf) < 0) /* does not exist */ +#else if (lstat(parentdir,&statbuf) < 0) /* does not exist */ +#endif return -1; /* check if we are root */ if (getuid() == 0) { /* if NFS, need to check if server trusts root */ +#if defined(CSRG_BASED) + if (!strcmp(statbuf.f_fstypename, "nfs")) /* Root user and nfs */ +#else if (CopyFileSysType(statbuf.st_dev) < 0) /* Root user and nfs */ +#endif { char *tmpfile; tmpfile = tempnam(parentdir,"quang"); diff --git a/cde/programs/dthelp/dthelpview/Main.c b/cde/programs/dthelp/dthelpview/Main.c index d61c12a42..c82e2adf4 100644 --- a/cde/programs/dthelp/dthelpview/Main.c +++ b/cde/programs/dthelp/dthelpview/Main.c @@ -181,7 +181,7 @@ static void GlobalInit() pCacheListHead = NULL; pCacheListTale = NULL; - totalCacheNodes = NULL; + totalCacheNodes = 0; helpClass = XtNewString("Dthelpview"); diff --git a/cde/programs/dthelp/dthelpview/Util.c b/cde/programs/dthelp/dthelpview/Util.c index 9a89f94c9..d7e28135a 100644 --- a/cde/programs/dthelp/dthelpview/Util.c +++ b/cde/programs/dthelp/dthelpview/Util.c @@ -43,6 +43,7 @@ /* System Include Files */ #include +#include #include #include diff --git a/cde/programs/dthelp/parser.ccdf/helpcomp/helpcomp.c b/cde/programs/dthelp/parser.ccdf/helpcomp/helpcomp.c index 1d3340433..980f88524 100644 --- a/cde/programs/dthelp/parser.ccdf/helpcomp/helpcomp.c +++ b/cde/programs/dthelp/parser.ccdf/helpcomp/helpcomp.c @@ -27,7 +27,7 @@ static char *version = "$XConsortium: helpcomp.c /main/3 1995/11/08 11:10:34 rsw #include #include #include -#include +#include #include #include diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/build.c b/cde/programs/dthelp/parser.ccdf/htag/build/build.c index a90d8afc4..5b763728b 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/build.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/build.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Build.c contains the main procedure for program BUILD */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/build.h b/cde/programs/dthelp/parser.ccdf/htag/build/build.h index 63ed6081b..30bb54e85 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/build.h +++ b/cde/programs/dthelp/parser.ccdf/htag/build/build.h @@ -64,7 +64,7 @@ typedef struct andgroup ANDGROUP ; next, a pointer to the next item in the list; and level, which indicates the level of nested subexpressions within the regular expression when the state was added to the FSA. */ -BUILDEXTERN struct statelist { +struct statelist { STATE *value ; STATELIST *next ; int level ; @@ -157,7 +157,7 @@ BUILDEXTERN LOGICAL errexit BUILDINIT(FALSE) ; a final state, a pointer to a list of transitions from the state, and a flag that indicates whether parsed character data is possible from the state */ -BUILDEXTERN struct state { +struct state { LOGICAL final ; LOGICAL datacontent ; LOGICAL frompcdata ; @@ -184,7 +184,7 @@ BUILDEXTERN STATE *startstate ; label corresponding to one model token and those with the same label corresponding to more than one model token). */ -BUILDEXTERN struct arc { +struct arc { ELTSTRUCT *label ; LOGICAL optional ; LOGICAL minim ; @@ -198,7 +198,7 @@ BUILDEXTERN struct arc { content submodels in an andgroup. Each list element contains a pointer to the start state of the FSA and a pointer to the next element in the list */ -BUILDEXTERN struct andgroup{ +struct andgroup{ STATE *start ; ANDGROUP *nextptr ; ANDGROUP *next ; diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/buildutl.c b/cde/programs/dthelp/parser.ccdf/htag/build/buildutl.c index 6fbf36f11..c2e88dda7 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/buildutl.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/buildutl.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Buildult.c contains the main supporting utilities for program BUILD */ -#include +#include #include "context.h" #include "build.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/eltree.c b/cde/programs/dthelp/parser.ccdf/htag/build/eltree.c index e55be9204..9f6038d3b 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/eltree.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/eltree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Eltree.c contains procedures that manipulate element names */ #include -#include +#include #include "build.h" /* Enters an element name into the element name tree */ diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/fsa.c b/cde/programs/dthelp/parser.ccdf/htag/build/fsa.c index 8da3c8089..00c99e6de 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/fsa.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/fsa.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Fsa.c contains the procedures used by program BUILD to convert a tree representation of a content model to an FSA */ -#include +#include #include "build.h" #include "context.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/out.c b/cde/programs/dthelp/parser.ccdf/htag/build/out.c index 2695fffd0..63eb0dbc9 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/out.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/out.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Out.c contains the procedures used by program BUILD to output results */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/param.c b/cde/programs/dthelp/parser.ccdf/htag/build/param.c index 3329a1539..f78f4e008 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/param.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/param.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Param.c contains procedures related to parameters for program BUILD */ -#include +#include #include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/sref.c b/cde/programs/dthelp/parser.ccdf/htag/build/sref.c index b6bc6b197..22d45e439 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/sref.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/sref.c @@ -26,7 +26,7 @@ /* Sref.c contains procedures related to short reference map declarations */ #include -#include +#include #include "build.h" #include "sref.h" #include "entdef.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/build/tree.c b/cde/programs/dthelp/parser.ccdf/htag/build/tree.c index 4372f95f5..903c06e8b 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/build/tree.c +++ b/cde/programs/dthelp/parser.ccdf/htag/build/tree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Tree.c has procedures used by BUILD to construct the tree representation of a content model */ -#include +#include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltdef.c b/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltdef.c index 0c75441b0..12daa2a46 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltdef.c +++ b/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltdef.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltutil.c b/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltutil.c index 2aa3189ba..504bc37dc 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltutil.c +++ b/cde/programs/dthelp/parser.ccdf/htag/eltdef/eltutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/eltdef/entity.c b/cde/programs/dthelp/parser.ccdf/htag/eltdef/entity.c index 9b82f905e..b6e232fde 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/eltdef/entity.c +++ b/cde/programs/dthelp/parser.ccdf/htag/eltdef/entity.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h b/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h index 1714dc162..a44756b1b 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h +++ b/cde/programs/dthelp/parser.ccdf/htag/helptag/global.h @@ -33,17 +33,16 @@ #define INIT(a) #endif -#include +#include #include #if defined(MSDOS) #include -#include #include #include #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) #include #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/actutil.c b/cde/programs/dthelp/parser.ccdf/htag/parser/actutil.c index 07db2f916..054c641ce 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/actutil.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/actutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. in the interface definition.*/ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/delfree.c b/cde/programs/dthelp/parser.ccdf/htag/parser/delfree.c index 9073b91c8..3e6b21c63 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/delfree.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/delfree.c @@ -26,7 +26,7 @@ /* Versions of m_free and m_malloc for debugging. */ /**/ -#include +#include #include #include "basic.h" #include "trie.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/entity.c b/cde/programs/dthelp/parser.ccdf/htag/parser/entity.c index 8d36779ee..3e73f9c6b 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/entity.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/entity.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Entity.c contains procedures pertaining to entities */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/error.c b/cde/programs/dthelp/parser.ccdf/htag/parser/error.c index 3b9e67179..9fc9b535e 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/error.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/error.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Util.c contains general utilities for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/param.c b/cde/programs/dthelp/parser.ccdf/htag/parser/param.c index 11a0a56f8..8a838dfb7 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/param.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/param.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/parser.c b/cde/programs/dthelp/parser.ccdf/htag/parser/parser.c index d47e5b16c..0d499ea03 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/parser.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/parser.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/parutil.c b/cde/programs/dthelp/parser.ccdf/htag/parser/parutil.c index 9356b540b..de08887d3 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/parutil.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/parutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/scan.c b/cde/programs/dthelp/parser.ccdf/htag/parser/scan.c index ec78c241d..c7d9a42ea 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/scan.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/scan.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Scan.c is the scanner for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser.ccdf/htag/parser/struct.c b/cde/programs/dthelp/parser.ccdf/htag/parser/struct.c index 6f53b0919..5c246e4ec 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/parser/struct.c +++ b/cde/programs/dthelp/parser.ccdf/htag/parser/struct.c @@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/util/context.c b/cde/programs/dthelp/parser.ccdf/htag/util/context.c index 05583ab4c..7423afde5 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/util/context.c +++ b/cde/programs/dthelp/parser.ccdf/htag/util/context.c @@ -156,7 +156,7 @@ delim.h. */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/util/conutil.c b/cde/programs/dthelp/parser.ccdf/htag/util/conutil.c index c87b8a54d..1119dbadc 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/util/conutil.c +++ b/cde/programs/dthelp/parser.ccdf/htag/util/conutil.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Conutil has utility procedures for program CONTEXT. */ #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser.ccdf/htag/util/fclndir.c b/cde/programs/dthelp/parser.ccdf/htag/util/fclndir.c index 020333f01..a5caae496 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/util/fclndir.c +++ b/cde/programs/dthelp/parser.ccdf/htag/util/fclndir.c @@ -35,7 +35,7 @@ with an error code of 0 if the files are the same, 1 if they differ, and */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c b/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c index 6a81b8e39..820128288 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c +++ b/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c @@ -26,7 +26,7 @@ /* Interfaces to free and malloc with optional debugging traces */ /**/ -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/canon1/build/build.c b/cde/programs/dthelp/parser/canon1/build/build.c index 72581b40a..b3b1cdf50 100644 --- a/cde/programs/dthelp/parser/canon1/build/build.c +++ b/cde/programs/dthelp/parser/canon1/build/build.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Build.c contains the main procedure for program BUILD */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/build/build.h b/cde/programs/dthelp/parser/canon1/build/build.h index 8c189ae3e..1f5489d98 100644 --- a/cde/programs/dthelp/parser/canon1/build/build.h +++ b/cde/programs/dthelp/parser/canon1/build/build.h @@ -64,7 +64,7 @@ typedef struct andgroup ANDGROUP ; next, a pointer to the next item in the list; and level, which indicates the level of nested subexpressions within the regular expression when the state was added to the FSA. */ -BUILDEXTERN struct statelist { +struct statelist { STATE *value ; STATELIST *next ; int level ; @@ -157,7 +157,7 @@ BUILDEXTERN LOGICAL errexit BUILDINIT(FALSE) ; a final state, a pointer to a list of transitions from the state, and a flag that indicates whether parsed character data is possible from the state */ -BUILDEXTERN struct state { +struct state { LOGICAL final ; LOGICAL datacontent ; LOGICAL frompcdata ; @@ -184,7 +184,7 @@ BUILDEXTERN STATE *startstate ; label corresponding to one model token and those with the same label corresponding to more than one model token). */ -BUILDEXTERN struct arc { +struct arc { ELTSTRUCT *label ; LOGICAL optional ; LOGICAL minim ; @@ -198,7 +198,7 @@ BUILDEXTERN struct arc { content submodels in an andgroup. Each list element contains a pointer to the start state of the FSA and a pointer to the next element in the list */ -BUILDEXTERN struct andgroup{ +struct andgroup{ STATE *start ; ANDGROUP *nextptr ; ANDGROUP *next ; diff --git a/cde/programs/dthelp/parser/canon1/build/buildutl.c b/cde/programs/dthelp/parser/canon1/build/buildutl.c index 6e38bea17..5be8b7866 100644 --- a/cde/programs/dthelp/parser/canon1/build/buildutl.c +++ b/cde/programs/dthelp/parser/canon1/build/buildutl.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Buildult.c contains the main supporting utilities for program BUILD */ -#include +#include #include "context.h" #include "build.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser/canon1/build/eltree.c b/cde/programs/dthelp/parser/canon1/build/eltree.c index 0938a44ef..c060204dc 100644 --- a/cde/programs/dthelp/parser/canon1/build/eltree.c +++ b/cde/programs/dthelp/parser/canon1/build/eltree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Eltree.c contains procedures that manipulate element names */ #include -#include +#include #include "build.h" /* Enters an element name into the element name tree */ diff --git a/cde/programs/dthelp/parser/canon1/build/fsa.c b/cde/programs/dthelp/parser/canon1/build/fsa.c index bec424074..f687c132e 100644 --- a/cde/programs/dthelp/parser/canon1/build/fsa.c +++ b/cde/programs/dthelp/parser/canon1/build/fsa.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Fsa.c contains the procedures used by program BUILD to convert a tree representation of a content model to an FSA */ -#include +#include #include "build.h" #include "context.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser/canon1/build/out.c b/cde/programs/dthelp/parser/canon1/build/out.c index 8290bce8a..97414f331 100644 --- a/cde/programs/dthelp/parser/canon1/build/out.c +++ b/cde/programs/dthelp/parser/canon1/build/out.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Out.c contains the procedures used by program BUILD to output results */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/build/param.c b/cde/programs/dthelp/parser/canon1/build/param.c index cca95c600..72dcd7eef 100644 --- a/cde/programs/dthelp/parser/canon1/build/param.c +++ b/cde/programs/dthelp/parser/canon1/build/param.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Param.c contains procedures related to parameters for program BUILD */ -#include +#include #include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser/canon1/build/sref.c b/cde/programs/dthelp/parser/canon1/build/sref.c index ceb8d1598..caca76dde 100644 --- a/cde/programs/dthelp/parser/canon1/build/sref.c +++ b/cde/programs/dthelp/parser/canon1/build/sref.c @@ -26,7 +26,7 @@ /* Sref.c contains procedures related to short reference map declarations */ #include -#include +#include #include "build.h" #include "sref.h" #include "entdef.h" diff --git a/cde/programs/dthelp/parser/canon1/build/tree.c b/cde/programs/dthelp/parser/canon1/build/tree.c index 3ec5dadf1..8c9e00162 100644 --- a/cde/programs/dthelp/parser/canon1/build/tree.c +++ b/cde/programs/dthelp/parser/canon1/build/tree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Tree.c has procedures used by BUILD to construct the tree representation of a content model */ -#include +#include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c b/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c index 89eaba53d..94e79122e 100644 --- a/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c +++ b/cde/programs/dthelp/parser/canon1/eltdef/eltdef.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c b/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c index 88d4a6a3c..5b5a4d9d3 100644 --- a/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c +++ b/cde/programs/dthelp/parser/canon1/eltdef/eltutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/eltdef/entity.c b/cde/programs/dthelp/parser/canon1/eltdef/entity.c index bfe785c8d..4aa5cd1f1 100644 --- a/cde/programs/dthelp/parser/canon1/eltdef/entity.c +++ b/cde/programs/dthelp/parser/canon1/eltdef/entity.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser/canon1/helptag/global.h b/cde/programs/dthelp/parser/canon1/helptag/global.h index 7b619d119..fa71c5f80 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/global.h +++ b/cde/programs/dthelp/parser/canon1/helptag/global.h @@ -33,18 +33,17 @@ #define INIT(a) #endif -#include +#include #include #include #if defined(MSDOS) #include -#include #include #include #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #include #include @@ -179,7 +178,7 @@ EXTERN char dirsep #if defined(MSDOS) INIT('\\') #else -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) INIT('/') #else ****define directory separator here**** @@ -187,7 +186,7 @@ INIT('/') #endif ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)|| defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)|| defined(__osf__) || defined(linux) || defined(CSRG_BASED) #define CSEP '/' #define SSEP "/" #else diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.c b/cde/programs/dthelp/parser/canon1/helptag/help.c index 830bf2ec6..216259538 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.c +++ b/cde/programs/dthelp/parser/canon1/helptag/help.c @@ -356,7 +356,7 @@ char *qualname; char *unqualname; #endif { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) FILE *f; #endif @@ -381,7 +381,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -495,7 +495,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/canon1/parser/actutil.c b/cde/programs/dthelp/parser/canon1/parser/actutil.c index b937ec4b1..f632f82f1 100644 --- a/cde/programs/dthelp/parser/canon1/parser/actutil.c +++ b/cde/programs/dthelp/parser/canon1/parser/actutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. in the interface definition.*/ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/parser/delfree.c b/cde/programs/dthelp/parser/canon1/parser/delfree.c index 2dcf609d3..34aca5f19 100644 --- a/cde/programs/dthelp/parser/canon1/parser/delfree.c +++ b/cde/programs/dthelp/parser/canon1/parser/delfree.c @@ -26,7 +26,7 @@ /* Versions of m_free and m_malloc for debugging. */ /**/ -#include +#include #include #include "basic.h" #include "trie.h" diff --git a/cde/programs/dthelp/parser/canon1/parser/entity.c b/cde/programs/dthelp/parser/canon1/parser/entity.c index 087fa9bbe..cbe876aed 100644 --- a/cde/programs/dthelp/parser/canon1/parser/entity.c +++ b/cde/programs/dthelp/parser/canon1/parser/entity.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Entity.c contains procedures pertaining to entities */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/canon1/parser/error.c b/cde/programs/dthelp/parser/canon1/parser/error.c index 9f7c0f9ef..80374aac5 100644 --- a/cde/programs/dthelp/parser/canon1/parser/error.c +++ b/cde/programs/dthelp/parser/canon1/parser/error.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Util.c contains general utilities for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/canon1/parser/param.c b/cde/programs/dthelp/parser/canon1/parser/param.c index 573af6027..28488aa33 100644 --- a/cde/programs/dthelp/parser/canon1/parser/param.c +++ b/cde/programs/dthelp/parser/canon1/parser/param.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/parser/parser.c b/cde/programs/dthelp/parser/canon1/parser/parser.c index 743385d8d..8cecb2cee 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parser.c +++ b/cde/programs/dthelp/parser/canon1/parser/parser.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser/canon1/parser/parutil.c b/cde/programs/dthelp/parser/canon1/parser/parutil.c index 3d4ddd05e..b2a609bf0 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parutil.c +++ b/cde/programs/dthelp/parser/canon1/parser/parutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/canon1/parser/scan.c b/cde/programs/dthelp/parser/canon1/parser/scan.c index 51c9a8f14..24e5c9ddc 100644 --- a/cde/programs/dthelp/parser/canon1/parser/scan.c +++ b/cde/programs/dthelp/parser/canon1/parser/scan.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Scan.c is the scanner for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/canon1/parser/struct.c b/cde/programs/dthelp/parser/canon1/parser/struct.c index 20761d920..c16a9c005 100644 --- a/cde/programs/dthelp/parser/canon1/parser/struct.c +++ b/cde/programs/dthelp/parser/canon1/parser/struct.c @@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/util/context.c b/cde/programs/dthelp/parser/canon1/util/context.c index 4fa39796e..ea8dd6f38 100644 --- a/cde/programs/dthelp/parser/canon1/util/context.c +++ b/cde/programs/dthelp/parser/canon1/util/context.c @@ -156,7 +156,7 @@ delim.h. */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/util/conutil.c b/cde/programs/dthelp/parser/canon1/util/conutil.c index e0d71c326..947cab5fb 100644 --- a/cde/programs/dthelp/parser/canon1/util/conutil.c +++ b/cde/programs/dthelp/parser/canon1/util/conutil.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Conutil has utility procedures for program CONTEXT. */ #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/canon1/util/fclndir.c b/cde/programs/dthelp/parser/canon1/util/fclndir.c index 66a216285..ea7b99b4b 100644 --- a/cde/programs/dthelp/parser/canon1/util/fclndir.c +++ b/cde/programs/dthelp/parser/canon1/util/fclndir.c @@ -35,7 +35,7 @@ with an error code of 0 if the files are the same, 1 if they differ, and */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/canon1/util/malloc.c b/cde/programs/dthelp/parser/canon1/util/malloc.c index 6b02080ac..c633fa0bb 100644 --- a/cde/programs/dthelp/parser/canon1/util/malloc.c +++ b/cde/programs/dthelp/parser/canon1/util/malloc.c @@ -26,7 +26,7 @@ /* Interfaces to free and malloc with optional debugging traces */ /**/ -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/canon1/util/wchar.c b/cde/programs/dthelp/parser/canon1/util/wchar.c index 570aaa874..d49e825f8 100644 --- a/cde/programs/dthelp/parser/canon1/util/wchar.c +++ b/cde/programs/dthelp/parser/canon1/util/wchar.c @@ -26,6 +26,8 @@ */ #include "basic.h" +#include "trie.h" +#include "cont.h" /* compare two wide character strings */ diff --git a/cde/programs/dthelp/parser/pass1/build/build.c b/cde/programs/dthelp/parser/pass1/build/build.c index b42a8f9d1..5c2239b25 100644 --- a/cde/programs/dthelp/parser/pass1/build/build.c +++ b/cde/programs/dthelp/parser/pass1/build/build.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Build.c contains the main procedure for program BUILD */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/build/build.h b/cde/programs/dthelp/parser/pass1/build/build.h index 8a0a31d4c..d47abc510 100644 --- a/cde/programs/dthelp/parser/pass1/build/build.h +++ b/cde/programs/dthelp/parser/pass1/build/build.h @@ -64,7 +64,7 @@ typedef struct andgroup ANDGROUP ; next, a pointer to the next item in the list; and level, which indicates the level of nested subexpressions within the regular expression when the state was added to the FSA. */ -BUILDEXTERN struct statelist { +struct statelist { STATE *value ; STATELIST *next ; int level ; @@ -157,7 +157,7 @@ BUILDEXTERN LOGICAL errexit BUILDINIT(FALSE) ; a final state, a pointer to a list of transitions from the state, and a flag that indicates whether parsed character data is possible from the state */ -BUILDEXTERN struct state { +struct state { LOGICAL final ; LOGICAL datacontent ; LOGICAL frompcdata ; @@ -184,7 +184,7 @@ BUILDEXTERN STATE *startstate ; label corresponding to one model token and those with the same label corresponding to more than one model token). */ -BUILDEXTERN struct arc { +struct arc { ELTSTRUCT *label ; LOGICAL optional ; LOGICAL minim ; @@ -198,7 +198,7 @@ BUILDEXTERN struct arc { content submodels in an andgroup. Each list element contains a pointer to the start state of the FSA and a pointer to the next element in the list */ -BUILDEXTERN struct andgroup{ +struct andgroup{ STATE *start ; ANDGROUP *nextptr ; ANDGROUP *next ; diff --git a/cde/programs/dthelp/parser/pass1/build/buildutl.c b/cde/programs/dthelp/parser/pass1/build/buildutl.c index e330a434a..cd071e2e9 100644 --- a/cde/programs/dthelp/parser/pass1/build/buildutl.c +++ b/cde/programs/dthelp/parser/pass1/build/buildutl.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Buildult.c contains the main supporting utilities for program BUILD */ -#include +#include #include "context.h" #include "build.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser/pass1/build/eltree.c b/cde/programs/dthelp/parser/pass1/build/eltree.c index 039f1ff16..b5c9dba22 100644 --- a/cde/programs/dthelp/parser/pass1/build/eltree.c +++ b/cde/programs/dthelp/parser/pass1/build/eltree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Eltree.c contains procedures that manipulate element names */ #include -#include +#include #include "build.h" /* Enters an element name into the element name tree */ diff --git a/cde/programs/dthelp/parser/pass1/build/fsa.c b/cde/programs/dthelp/parser/pass1/build/fsa.c index e8e45eb3a..0e9b519e8 100644 --- a/cde/programs/dthelp/parser/pass1/build/fsa.c +++ b/cde/programs/dthelp/parser/pass1/build/fsa.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Fsa.c contains the procedures used by program BUILD to convert a tree representation of a content model to an FSA */ -#include +#include #include "build.h" #include "context.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser/pass1/build/out.c b/cde/programs/dthelp/parser/pass1/build/out.c index 84c1ba00d..7b4b3ebcd 100644 --- a/cde/programs/dthelp/parser/pass1/build/out.c +++ b/cde/programs/dthelp/parser/pass1/build/out.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Out.c contains the procedures used by program BUILD to output results */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/build/param.c b/cde/programs/dthelp/parser/pass1/build/param.c index 1867dcae0..f7250f3e3 100644 --- a/cde/programs/dthelp/parser/pass1/build/param.c +++ b/cde/programs/dthelp/parser/pass1/build/param.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Param.c contains procedures related to parameters for program BUILD */ -#include +#include #include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser/pass1/build/sref.c b/cde/programs/dthelp/parser/pass1/build/sref.c index 9a37fed82..1e7a67797 100644 --- a/cde/programs/dthelp/parser/pass1/build/sref.c +++ b/cde/programs/dthelp/parser/pass1/build/sref.c @@ -26,7 +26,7 @@ /* Sref.c contains procedures related to short reference map declarations */ #include -#include +#include #include "build.h" #include "sref.h" #include "entdef.h" diff --git a/cde/programs/dthelp/parser/pass1/build/tree.c b/cde/programs/dthelp/parser/pass1/build/tree.c index ecda8c95f..42db89b89 100644 --- a/cde/programs/dthelp/parser/pass1/build/tree.c +++ b/cde/programs/dthelp/parser/pass1/build/tree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Tree.c has procedures used by BUILD to construct the tree representation of a content model */ -#include +#include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c b/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c index 0ede426a8..a4358423e 100644 --- a/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c +++ b/cde/programs/dthelp/parser/pass1/eltdef/eltdef.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c b/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c index e178935c4..4dfd87f80 100644 --- a/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c +++ b/cde/programs/dthelp/parser/pass1/eltdef/eltutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/eltdef/entity.c b/cde/programs/dthelp/parser/pass1/eltdef/entity.c index 0fc7c5b4d..4d43047dc 100644 --- a/cde/programs/dthelp/parser/pass1/eltdef/entity.c +++ b/cde/programs/dthelp/parser/pass1/eltdef/entity.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser/pass1/helptag/global.h b/cde/programs/dthelp/parser/pass1/helptag/global.h index c2b8c8325..79947b3e8 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/global.h +++ b/cde/programs/dthelp/parser/pass1/helptag/global.h @@ -33,12 +33,11 @@ #define INIT(a) #endif -#include +#include #include #include #if defined(MSDOS) #include -#include #include #include #endif diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.c b/cde/programs/dthelp/parser/pass1/helptag/help.c index 7e291cc2d..115e54868 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.c +++ b/cde/programs/dthelp/parser/pass1/helptag/help.c @@ -355,7 +355,7 @@ char *qualname; char *unqualname; #endif { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) FILE *f; #endif char fn[FNAMELEN]; @@ -379,7 +379,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -493,7 +493,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/pass1/parser/actutil.c b/cde/programs/dthelp/parser/pass1/parser/actutil.c index 042b54c5d..4e04cd9c4 100644 --- a/cde/programs/dthelp/parser/pass1/parser/actutil.c +++ b/cde/programs/dthelp/parser/pass1/parser/actutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. in the interface definition.*/ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/parser/delfree.c b/cde/programs/dthelp/parser/pass1/parser/delfree.c index 08c419d53..75927304d 100644 --- a/cde/programs/dthelp/parser/pass1/parser/delfree.c +++ b/cde/programs/dthelp/parser/pass1/parser/delfree.c @@ -26,7 +26,7 @@ /* Versions of m_free and m_malloc for debugging. */ /**/ -#include +#include #include #include "basic.h" #include "trie.h" diff --git a/cde/programs/dthelp/parser/pass1/parser/entity.c b/cde/programs/dthelp/parser/pass1/parser/entity.c index ac38cc4be..49810952f 100644 --- a/cde/programs/dthelp/parser/pass1/parser/entity.c +++ b/cde/programs/dthelp/parser/pass1/parser/entity.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Entity.c contains procedures pertaining to entities */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass1/parser/error.c b/cde/programs/dthelp/parser/pass1/parser/error.c index 97b977da0..4eba76b5d 100644 --- a/cde/programs/dthelp/parser/pass1/parser/error.c +++ b/cde/programs/dthelp/parser/pass1/parser/error.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Util.c contains general utilities for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass1/parser/param.c b/cde/programs/dthelp/parser/pass1/parser/param.c index 629c32236..7e9367d23 100644 --- a/cde/programs/dthelp/parser/pass1/parser/param.c +++ b/cde/programs/dthelp/parser/pass1/parser/param.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/parser/parser.c b/cde/programs/dthelp/parser/pass1/parser/parser.c index f7ac25a9d..d5e801dc8 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parser.c +++ b/cde/programs/dthelp/parser/pass1/parser/parser.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser/pass1/parser/parutil.c b/cde/programs/dthelp/parser/pass1/parser/parutil.c index 32587c320..8a725a8f7 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parutil.c +++ b/cde/programs/dthelp/parser/pass1/parser/parutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass1/parser/scan.c b/cde/programs/dthelp/parser/pass1/parser/scan.c index 934118bec..971193d9f 100644 --- a/cde/programs/dthelp/parser/pass1/parser/scan.c +++ b/cde/programs/dthelp/parser/pass1/parser/scan.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Scan.c is the scanner for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass1/parser/struct.c b/cde/programs/dthelp/parser/pass1/parser/struct.c index 497b2a211..5ceeda6e5 100644 --- a/cde/programs/dthelp/parser/pass1/parser/struct.c +++ b/cde/programs/dthelp/parser/pass1/parser/struct.c @@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/util/context.c b/cde/programs/dthelp/parser/pass1/util/context.c index fe35848d5..03ea57240 100644 --- a/cde/programs/dthelp/parser/pass1/util/context.c +++ b/cde/programs/dthelp/parser/pass1/util/context.c @@ -156,7 +156,7 @@ delim.h. */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/util/conutil.c b/cde/programs/dthelp/parser/pass1/util/conutil.c index 52e854025..154a0dcb2 100644 --- a/cde/programs/dthelp/parser/pass1/util/conutil.c +++ b/cde/programs/dthelp/parser/pass1/util/conutil.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Conutil has utility procedures for program CONTEXT. */ #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass1/util/fclndir.c b/cde/programs/dthelp/parser/pass1/util/fclndir.c index d5733814c..2aa2b9a9a 100644 --- a/cde/programs/dthelp/parser/pass1/util/fclndir.c +++ b/cde/programs/dthelp/parser/pass1/util/fclndir.c @@ -35,7 +35,7 @@ with an error code of 0 if the files are the same, 1 if they differ, and */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass1/util/malloc.c b/cde/programs/dthelp/parser/pass1/util/malloc.c index 8e90eb65d..c8690b8fd 100644 --- a/cde/programs/dthelp/parser/pass1/util/malloc.c +++ b/cde/programs/dthelp/parser/pass1/util/malloc.c @@ -26,7 +26,7 @@ /* Interfaces to free and malloc with optional debugging traces */ /**/ -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass1/util/wchar.c b/cde/programs/dthelp/parser/pass1/util/wchar.c index 44d388a4a..0d8b46ce7 100644 --- a/cde/programs/dthelp/parser/pass1/util/wchar.c +++ b/cde/programs/dthelp/parser/pass1/util/wchar.c @@ -26,6 +26,8 @@ */ #include "basic.h" +#include "trie.h" +#include "cont.h" /* compare two wide character strings */ diff --git a/cde/programs/dthelp/parser/pass2/build/build.c b/cde/programs/dthelp/parser/pass2/build/build.c index ea67e8748..5b3d30cc1 100644 --- a/cde/programs/dthelp/parser/pass2/build/build.c +++ b/cde/programs/dthelp/parser/pass2/build/build.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Build.c contains the main procedure for program BUILD */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/build/build.h b/cde/programs/dthelp/parser/pass2/build/build.h index e0c8bae07..dad1724dc 100644 --- a/cde/programs/dthelp/parser/pass2/build/build.h +++ b/cde/programs/dthelp/parser/pass2/build/build.h @@ -64,7 +64,7 @@ typedef struct andgroup ANDGROUP ; next, a pointer to the next item in the list; and level, which indicates the level of nested subexpressions within the regular expression when the state was added to the FSA. */ -BUILDEXTERN struct statelist { +struct statelist { STATE *value ; STATELIST *next ; int level ; @@ -157,7 +157,7 @@ BUILDEXTERN LOGICAL errexit BUILDINIT(FALSE) ; a final state, a pointer to a list of transitions from the state, and a flag that indicates whether parsed character data is possible from the state */ -BUILDEXTERN struct state { +struct state { LOGICAL final ; LOGICAL datacontent ; LOGICAL frompcdata ; @@ -184,7 +184,7 @@ BUILDEXTERN STATE *startstate ; label corresponding to one model token and those with the same label corresponding to more than one model token). */ -BUILDEXTERN struct arc { +struct arc { ELTSTRUCT *label ; LOGICAL optional ; LOGICAL minim ; @@ -198,7 +198,7 @@ BUILDEXTERN struct arc { content submodels in an andgroup. Each list element contains a pointer to the start state of the FSA and a pointer to the next element in the list */ -BUILDEXTERN struct andgroup{ +struct andgroup{ STATE *start ; ANDGROUP *nextptr ; ANDGROUP *next ; diff --git a/cde/programs/dthelp/parser/pass2/build/buildutl.c b/cde/programs/dthelp/parser/pass2/build/buildutl.c index dac19e7e2..a2f89913d 100644 --- a/cde/programs/dthelp/parser/pass2/build/buildutl.c +++ b/cde/programs/dthelp/parser/pass2/build/buildutl.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Buildult.c contains the main supporting utilities for program BUILD */ -#include +#include #include "context.h" #include "build.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser/pass2/build/eltree.c b/cde/programs/dthelp/parser/pass2/build/eltree.c index 245c37347..4ad7f2870 100644 --- a/cde/programs/dthelp/parser/pass2/build/eltree.c +++ b/cde/programs/dthelp/parser/pass2/build/eltree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Eltree.c contains procedures that manipulate element names */ #include -#include +#include #include "build.h" /* Enters an element name into the element name tree */ diff --git a/cde/programs/dthelp/parser/pass2/build/fsa.c b/cde/programs/dthelp/parser/pass2/build/fsa.c index 63ec0e746..b87b8a260 100644 --- a/cde/programs/dthelp/parser/pass2/build/fsa.c +++ b/cde/programs/dthelp/parser/pass2/build/fsa.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Fsa.c contains the procedures used by program BUILD to convert a tree representation of a content model to an FSA */ -#include +#include #include "build.h" #include "context.h" #include "delim.h" diff --git a/cde/programs/dthelp/parser/pass2/build/out.c b/cde/programs/dthelp/parser/pass2/build/out.c index 1137d9900..673277d75 100644 --- a/cde/programs/dthelp/parser/pass2/build/out.c +++ b/cde/programs/dthelp/parser/pass2/build/out.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Out.c contains the procedures used by program BUILD to output results */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/build/param.c b/cde/programs/dthelp/parser/pass2/build/param.c index d9d4dbbf6..1bcbd9de4 100644 --- a/cde/programs/dthelp/parser/pass2/build/param.c +++ b/cde/programs/dthelp/parser/pass2/build/param.c @@ -29,7 +29,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Param.c contains procedures related to parameters for program BUILD */ -#include +#include #include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser/pass2/build/sref.c b/cde/programs/dthelp/parser/pass2/build/sref.c index 8c7e67a01..76ca9e32f 100644 --- a/cde/programs/dthelp/parser/pass2/build/sref.c +++ b/cde/programs/dthelp/parser/pass2/build/sref.c @@ -26,7 +26,7 @@ /* Sref.c contains procedures related to short reference map declarations */ #include -#include +#include #include "build.h" #include "sref.h" #include "entdef.h" diff --git a/cde/programs/dthelp/parser/pass2/build/tree.c b/cde/programs/dthelp/parser/pass2/build/tree.c index f14816a54..1d4e381fb 100644 --- a/cde/programs/dthelp/parser/pass2/build/tree.c +++ b/cde/programs/dthelp/parser/pass2/build/tree.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Tree.c has procedures used by BUILD to construct the tree representation of a content model */ -#include +#include #include "build.h" #include "context.h" diff --git a/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c b/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c index cfe42abdb..5fdb8c262 100644 --- a/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c +++ b/cde/programs/dthelp/parser/pass2/eltdef/eltdef.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c b/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c index 7c693bf57..fc052f8dc 100644 --- a/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c +++ b/cde/programs/dthelp/parser/pass2/eltdef/eltutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/eltdef/entity.c b/cde/programs/dthelp/parser/pass2/eltdef/entity.c index a37855e05..f1bee6e2a 100644 --- a/cde/programs/dthelp/parser/pass2/eltdef/entity.c +++ b/cde/programs/dthelp/parser/pass2/eltdef/entity.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser/pass2/htag2/global.h b/cde/programs/dthelp/parser/pass2/htag2/global.h index e14bcdef9..3dd0417fe 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/global.h +++ b/cde/programs/dthelp/parser/pass2/htag2/global.h @@ -33,18 +33,17 @@ #define INIT(a) #endif -#include +#include #include #include #if defined(MSDOS) #include -#include #include #include #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) #include #include #include diff --git a/cde/programs/dthelp/parser/pass2/parser/actutil.c b/cde/programs/dthelp/parser/pass2/parser/actutil.c index ed1f42b48..a9adcfc32 100644 --- a/cde/programs/dthelp/parser/pass2/parser/actutil.c +++ b/cde/programs/dthelp/parser/pass2/parser/actutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. in the interface definition.*/ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/parser/delfree.c b/cde/programs/dthelp/parser/pass2/parser/delfree.c index 6c07544b7..4bb49c8ef 100644 --- a/cde/programs/dthelp/parser/pass2/parser/delfree.c +++ b/cde/programs/dthelp/parser/pass2/parser/delfree.c @@ -26,7 +26,7 @@ /* Versions of m_free and m_malloc for debugging. */ /**/ -#include +#include #include #include "basic.h" #include "trie.h" diff --git a/cde/programs/dthelp/parser/pass2/parser/entity.c b/cde/programs/dthelp/parser/pass2/parser/entity.c index 3497a94bd..79544ea9f 100644 --- a/cde/programs/dthelp/parser/pass2/parser/entity.c +++ b/cde/programs/dthelp/parser/pass2/parser/entity.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Entity.c contains procedures pertaining to entities */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass2/parser/error.c b/cde/programs/dthelp/parser/pass2/parser/error.c index fb213125a..e689f745e 100644 --- a/cde/programs/dthelp/parser/pass2/parser/error.c +++ b/cde/programs/dthelp/parser/pass2/parser/error.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Util.c contains general utilities for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass2/parser/param.c b/cde/programs/dthelp/parser/pass2/parser/param.c index b97845655..b312070ff 100644 --- a/cde/programs/dthelp/parser/pass2/parser/param.c +++ b/cde/programs/dthelp/parser/pass2/parser/param.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/parser/parser.c b/cde/programs/dthelp/parser/pass2/parser/parser.c index 4cdccbb80..914954d0c 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parser.c +++ b/cde/programs/dthelp/parser/pass2/parser/parser.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include "basic.h" #include "trie.h" #include "dtdext.h" diff --git a/cde/programs/dthelp/parser/pass2/parser/parutil.c b/cde/programs/dthelp/parser/pass2/parser/parutil.c index 65276f423..f2339ce69 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parutil.c +++ b/cde/programs/dthelp/parser/pass2/parser/parutil.c @@ -31,7 +31,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass2/parser/scan.c b/cde/programs/dthelp/parser/pass2/parser/scan.c index f2cf30de1..95743f553 100644 --- a/cde/programs/dthelp/parser/pass2/parser/scan.c +++ b/cde/programs/dthelp/parser/pass2/parser/scan.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Scan.c is the scanner for program PARSER */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass2/parser/struct.c b/cde/programs/dthelp/parser/pass2/parser/struct.c index aff0f12a5..0c940bd76 100644 --- a/cde/programs/dthelp/parser/pass2/parser/struct.c +++ b/cde/programs/dthelp/parser/pass2/parser/struct.c @@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated. #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/util/context.c b/cde/programs/dthelp/parser/pass2/util/context.c index 9417aefc1..a59f93bed 100644 --- a/cde/programs/dthelp/parser/pass2/util/context.c +++ b/cde/programs/dthelp/parser/pass2/util/context.c @@ -156,7 +156,7 @@ delim.h. */ #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/util/conutil.c b/cde/programs/dthelp/parser/pass2/util/conutil.c index 9ebc96af7..842eadb00 100644 --- a/cde/programs/dthelp/parser/pass2/util/conutil.c +++ b/cde/programs/dthelp/parser/pass2/util/conutil.c @@ -30,7 +30,7 @@ This product and information is proprietary of Tandem Computers Incorporated. /* Conutil has utility procedures for program CONTEXT. */ #include #include -#include +#include #if defined(MSDOS) #include #endif diff --git a/cde/programs/dthelp/parser/pass2/util/fclndir.c b/cde/programs/dthelp/parser/pass2/util/fclndir.c index 28d4759ba..fd715f563 100644 --- a/cde/programs/dthelp/parser/pass2/util/fclndir.c +++ b/cde/programs/dthelp/parser/pass2/util/fclndir.c @@ -35,7 +35,7 @@ with an error code of 0 if the files are the same, 1 if they differ, and */ #include -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass2/util/malloc.c b/cde/programs/dthelp/parser/pass2/util/malloc.c index ce47d8e73..a7be15503 100644 --- a/cde/programs/dthelp/parser/pass2/util/malloc.c +++ b/cde/programs/dthelp/parser/pass2/util/malloc.c @@ -26,7 +26,7 @@ /* Interfaces to free and malloc with optional debugging traces */ /**/ -#include +#include #include #if defined(MSDOS) #include diff --git a/cde/programs/dthelp/parser/pass2/util/wchar.c b/cde/programs/dthelp/parser/pass2/util/wchar.c index c2bab001c..780bbf40e 100644 --- a/cde/programs/dthelp/parser/pass2/util/wchar.c +++ b/cde/programs/dthelp/parser/pass2/util/wchar.c @@ -26,6 +26,8 @@ */ #include "basic.h" +#include "trie.h" +#include "cont.h" /* compare two wide character strings */ diff --git a/cde/programs/dtimsstart/main.c b/cde/programs/dtimsstart/main.c index 735f8bb48..ef445113f 100644 --- a/cde/programs/dtimsstart/main.c +++ b/cde/programs/dtimsstart/main.c @@ -136,7 +136,7 @@ main (argc, argv) case MODE_START: #ifndef DEBUG2 -# ifdef __osf__ +# if defined(__osf__) || defined(CSRG_BASED) setsid(); # else setpgrp(); diff --git a/cde/programs/dtimsstart/start.c b/cde/programs/dtimsstart/start.c index be6a0b7f5..68800512f 100644 --- a/cde/programs/dtimsstart/start.c +++ b/cde/programs/dtimsstart/start.c @@ -28,7 +28,7 @@ #include #include -#if (defined(USL) || defined(__uxp__) | defined(linux)) && !defined(_NFILE) +#if (defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED)) && !defined(_NFILE) #define _NFILE FOPEN_MAX #endif @@ -233,7 +233,7 @@ void set_sig_chld(enable) int enable; { DPR(("set_sig_chld(%s)\n", enable ? "Enabled" : "Disabled")); - signal(SIGCLD, enable ? on_sig_chld : SIG_IGN); + signal(SIGCHLD, enable ? on_sig_chld : SIG_IGN); } int im_mod_available(renv) @@ -620,7 +620,7 @@ static int invoke_ims(sel) for (i = 0; i < _NFILE; i++) (void) close(i); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else setpgrp(); @@ -668,7 +668,7 @@ static void on_sig_chld(sig) if (pid == -1) return; - signal(SIGCLD, on_sig_chld); + signal(SIGCHLD, on_sig_chld); if (WIFEXITED(wait_status)) { cause = ErrImsAborted; diff --git a/cde/programs/dtinfo/DtMmdb/dti_excs/Exceptions.hh b/cde/programs/dtinfo/DtMmdb/dti_excs/Exceptions.hh index 8ff310af0..754b3427e 100644 --- a/cde/programs/dtinfo/DtMmdb/dti_excs/Exceptions.hh +++ b/cde/programs/dtinfo/DtMmdb/dti_excs/Exceptions.hh @@ -10,7 +10,6 @@ extern "C" { #include #include #include -#include } #ifdef EXC_DEBUG diff --git a/cde/programs/dtinfo/dtinfo/src/Basic/ParseTree.C b/cde/programs/dtinfo/dtinfo/src/Basic/ParseTree.C index ae54b534c..656d5fe22 100644 --- a/cde/programs/dtinfo/dtinfo/src/Basic/ParseTree.C +++ b/cde/programs/dtinfo/dtinfo/src/Basic/ParseTree.C @@ -46,7 +46,7 @@ #include "../Prelude.h" #include -#include +#include #ifdef SUN_CPP #define InitBase(T) \ diff --git a/cde/programs/dtinfo/dtinfo/src/cgm/cgm.h b/cde/programs/dtinfo/dtinfo/src/cgm/cgm.h index fd01d2565..03ea10b50 100644 --- a/cde/programs/dtinfo/dtinfo/src/cgm/cgm.h +++ b/cde/programs/dtinfo/dtinfo/src/cgm/cgm.h @@ -24,7 +24,7 @@ /* This is the module containing common definitions for all modules of */ /* the CGM Pixmap generator */ #include /* standard I/O package */ -#include +#include #include /* XLib stuff */ #include /* Xt toolkit */ #include "GraphicsP.h" diff --git a/cde/programs/dtinfo/dtinfo/src/external-api/comm.c b/cde/programs/dtinfo/dtinfo/src/external-api/comm.c index c9bd69b7e..5223de315 100644 --- a/cde/programs/dtinfo/dtinfo/src/external-api/comm.c +++ b/cde/programs/dtinfo/dtinfo/src/external-api/comm.c @@ -46,7 +46,6 @@ #include #include -#include #include #include #include diff --git a/cde/programs/dtinfo/tools/config/Imake.cf b/cde/programs/dtinfo/tools/config/Imake.cf index b1c2ac65c..42c021d4b 100644 --- a/cde/programs/dtinfo/tools/config/Imake.cf +++ b/cde/programs/dtinfo/tools/config/Imake.cf @@ -51,6 +51,122 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $ # undef i386 #endif /* bsdi */ +#ifdef __OpenBSD__ +# undef __OpenBSD__ +# undef __NetBSD__ +# define OpenBSDArchitecture +# define KOpenBSDArchitecture +# define MacroIncludeFile +# define MacroFile OpenBSD.cf +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# if defined(__sparc__) || defined(sparc) +# if !defined(__arch64__) +# define SparcArchitecture +# else +# define Sparc64Architecture +# endif +# undef sparc +# undef sparc64 +# endif +# if defined(__mips__) || defined(mips) +# define MipsArchitecture +# ifdef __LP64__ +# define Mips64Architecture +# endif +# ifdef arc +# define ArcArchitecture +# undef arc +# endif +# ifdef sgi +# define SGIArchitecture +# undef sgi +# endif +# ifdef pmax +# define PmaxArchitecture +# undef pmax +# endif +# undef mips +# undef __mips__ +# endif +# if defined(__alpha__) || defined(alpha) +# define AlphaArchitecture +# undef __alpha__ +# undef alpha +# endif +# if defined(__amd64__) || defined(__x86_64__) +# define AMD64Architecture +# undef __amd64__ +# undef __x86_64__ +# undef amd64 +# endif +# if defined(__arm__) +# define Arm32Architecture +# undef __arm__ +# if defined(zaurus) +# undef zaurus +# define ZaurusArchitecture +# endif +# endif +# if defined(__mc68020__) || defined(mc68020) +# define Mc68020Architecture +# if defined(amiga) +# define AmigaArchitecture +# undef amiga +# endif +# if defined(hp300) +# define Hp300Architecture +# undef hp300 +# endif +# if defined(mac68k) +# define Mac68kArchitecture +# undef mac68k +# endif +# if defined(mvme68k) +# define Mvme68kArchitecture +# undef mvme68k +# endif +# if defined(sun3) +# define Sun3Architecture +# undef sun3 +# endif +# undef mc68000 +# endif +# if defined(__m88k__) || defined(m88k) +# define Mc88000Architecture +# undef m88k +# endif +# ifdef __powerpc__ +# define PpcArchitecture +# undef __powerpc__ +# undef __macppc__ +# undef macppc +# endif +# ifdef __sh__ +# undef __sh__ +# define SuperHArchitecture +# endif +# ifdef __vax__ +# undef vax +# undef __vax__ +# define VaxArchitecture +# endif +# ifdef __hppa__ +# ifndef HPArchitecture +# define HPArchitecture +# endif +# undef __hppa__ +# endif /* __hppa__ */ +#endif /* OpenBSD */ + +/* Systems based on kernel of OpenBSD */ +#if defined(__OpenBSD_kernel__) +#define KOpenBSDArchitecture +#endif + #ifdef __NetBSD__ # define MacroIncludeFile # define MacroFile NetBSD.cf diff --git a/cde/programs/dtinfo/tools/config/OpenBSD.cf b/cde/programs/dtinfo/tools/config/OpenBSD.cf new file mode 100644 index 000000000..f29789699 --- /dev/null +++ b/cde/programs/dtinfo/tools/config/OpenBSD.cf @@ -0,0 +1,1032 @@ +XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.100 2004/01/08 22:51:41 herrb Exp $ +XCOMM $XdotOrg: xc/config/cf/OpenBSD.cf,v 1.11 2005/06/15 20:03:51 idr Exp $ +XCOMM + +#ifndef OSName +#define OSName DefaultOSName OSBinaryType +#endif +#ifndef OSMajorVersion +#define OSMajorVersion DefaultOSMajorVersion +#endif +#ifndef OSMinorVersion +#define OSMinorVersion DefaultOSMinorVersion +#endif +#ifndef OSTeenyVersion +#define OSTeenyVersion DefaultOSTeenyVersion +#endif + +#ifndef OSVendor +#define OSVendor /**/ +#endif +XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) + +#ifdef Ports + +#define BinDir /usr/local/bin +#define LibDir /usr/local/lib/X11 +#define UsrLibDir /usr/local/lib +#define ManDirectoryRoot /usr/local/man +#define FontDir /usr/local/lib/X11/fonts +#define FontEncDir /usr/local/lib/X11/fonts/encodings +#define LdPreLib -L/usr/X11R6/lib -L/usr/local/lib +#define XpmLibDir /usr/X11R6/lib +#define XpmIncDir /usr/X11R6/include +#define ConfigDir /usr/X11R6/lib/X11/config +#define IncRoot /usr/local/include +#define TopXInclude -I/usr/X11R6/include +#define ImakeCmd imake -DPorts +#define DocDir /usr/local/share/doc +#define BuildHtmlManPages NO + +#endif + +/* + * C library features + */ +#define HasPoll YES +#define HasNdbm YES +#define HasPutenv YES +#define HasSnprintf YES +#if OSMajorVersion == 2 && OSMinorVersion >= 4 || OSMajorVersion >= 3 +# define HasStrlcat YES +#endif +#define HasBSD44Sockets YES +#define Malloc0ReturnsNull NO +#define SetTtyGroup YES +#define DBMLibrary /**/ +#define HasLibCrypt NO +#define HasShm YES +#define HasWChar32 YES +#define HasMkstemp YES +#define HasSetProcTitle YES +#define HasZlib YES +#ifndef HasLibpng +# define HasLibpng NO +#endif +#ifndef HasKrbIV +# if OSMajorVersion == 2 || OSMajorVersion == 3 && OSMinorVersion < 3 +# define HasKrbIV YES +# if OSMajorVersion == 2 && OSMinorVersion <= 8 +# define KrbIVLibraries -lkrb -lkafs -ldes +# endif +# else + /* Kerberos IV was removed after OpenBSD 3.3 */ +# define HasKrbIV NO +# endif +#endif +#define HasUsableFileMmap YES +#define HasShadowPasswd NO +#define IPv6SocketsAlsoIPv4 NO + +#define HasArc4Random YES + +#define HasNCurses YES +#define NCursesLibName -lcurses +#if defined(TermcapLibrary) +#undef TermcapLibrary +#endif +#define TermcapLibrary -lcurses + +#define HasVarRun YES +#define HasVarDb YES +#define VarLibDir VarDbDirectory + +#define InstallXloadSetGID NO + +#ifndef HasIssetugid +# if (OSMajorVersion >= 2) +# define HasIssetugid YES +# endif +#endif + +#ifndef HasMktemp +# if (OSMajorVersion > 2) || (OSMajorVersion == 2 && OSMinorVersion >= 1) +# define HasMktemp YES +# else +# define HasMktemp NO +# endif +#endif + +/* OpenBSD >= 2.7 has getifaddrs() */ +#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 7) +#define HasGetIfAddrs YES +#endif + +/* OpenBSD >= 2.8 has setusercontext() */ +#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 7) +#define HasSetUserContext YES +#endif + +/* OpenBSD after 2.9 has BSD authentication */ +#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 9) +# define HasBSDAuth YES +#endif + +/* OpenBSD 3.0 and later has getpeereid() */ +#if OSMajorVersion >= 3 +# define HasGetpeereid YES +#endif + +/* OpenBSD 3.0 has APM with kqueue interface */ +#if OSMajorVersion >= 3 +# define HasApmKqueue YES +#endif + +/* OpenBSD 3.0 has libusb, next versions have libusbhid */ +#if OSMajorVersion >= 3 +# define HasLibUsb YES +# ifndef HasLibUsbHid +# if OSMajorVersion == 3 && OSMinorVersion > 0 || OSMajorVersion > 3 +# define HasLibUsbHid YES +# define UsbHidLib -lusbhid +# else +# define HasLibUsbHid NO +# define UsbHidLib -lusb +# endif +# endif +#endif + +/* + * Compiler Features + */ +#define GccUsesGas YES +#define UseGas YES +#define GnuCpp YES + +#define UseGnuMalloc NO + +#define NeedConstPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedNestedPrototypes YES +#define NeedVarargsPrototypes YES +#define NeedWidePrototypes NO + +#define MkdirHierCmd mkdir -p + +#ifndef CppCmd +#define CppCmd /usr/libexec/cpp +#endif +#define StandardCppOptions -traditional +#define StandardCppDefines /**/ +#define PreProcessCmd CppCmd +#define PreIncDir DefaultGccIncludeDir + +#ifndef CcCmd +#define CcCmd cc +#endif +#ifndef AsCmd +#define AsCmd cc -c -x assembler +#endif +#ifndef DefaultCCOptions +#if defined(UseInstalled) + /* conform to OpenBSD's habits */ +# define DefaultCCOptions $(COPTS) +#else +# ifdef PpcArchitecture +# define DefaultCCOptions -pipe -fsigned-char GccWarningOptions +# else +# define DefaultCCOptions -pipe GccWarningOptions +# endif +#endif +#endif + +#define GccGasOption -DGCCUSESGAS +#define AsmDefines -DUSE_GAS + +/* UseElfFormat defaults to YES if __ELF__ set */ +#ifndef UseElfFormat +# ifdef __ELF__ +# undef __ELF__ /* other imake files shouldn't care */ +# define UseElfFormat YES +# else +# define UseElfFormat NO +# endif +#endif + +/* + * Increment shared libraries major numbers if using Gcc Stack Protector + * (This introduces an ABI change) + */ +#ifndef OverrideShlibRevs +# define OverrideShlibRevs ProPoliceSupport +#endif + +#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC + + +#define AdmDir /var/log + +#define HasFlex YES + +/* OpenBSD doesn't have gperf in the base install */ +#define DontRebuildGperfOutput YES + +/* + * Make & install Features + */ + +#define HasBsdMake YES + +#define BuildCyrillicFonts YES +#define GzipFontCompression YES +#define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR) +#define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR) + +#define InstUidFlags -m 4755 + +#ifdef InstallCmd +# undef InstallCmd +# define InstallCmd /usr/bin/install +#endif + +#ifndef ExtraFilesToClean +# define ExtraFilesToClean *.core +#endif + +/* + * Documentation formatting + */ +#ifdef Ports +# define NroffCmd /usr/local/bin/nroff -Tascii -c +# define TroffCmd /usr/local/bin/nroff -Tps +# define HTMLroffCmd /usr/local/bin/nroff -Thtml +# define NeqnCmd /usr/local/bin/neqn -Tascii +# define EqnCmd /usr/local/bin/eqn -Tps +# define TblCmd /usr/local/bin/tbl +#else +# define NroffCmd mandoc +# define TroffCmd mandoc -Tps +# define HTMLroffCmd mandoc -Thtml +# define NeqnCmd cat +# define EqnCmd cat +# define TblCmd cat +#endif + +#define HasGroff YES + +#ifndef HasCookieMaker +# define HasCookieMaker YES +# define MkCookieCmd \ + 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"' +#endif + + +/* + * Man pages need to be formatted when installed, so override the default + * imake rules. + */ +#define ManSuffix 1 +#define FileManSuffix 5 + +#ifdef Ports + +#define ManSourcePath $(MANPATH)/cat + +#define InstallManPageLongBase(file,destdir,dest) @@\ +all:: file.0 @@\ + @@\ +file.0:: file.$(MANNEWSUFFIX) @@\ + @if [ -f file.$(MANNEWSUFFIX) ]; \ @@\ + then \ @@\ + cat file.$(MANNEWSUFFIX) | $(NEQN) | $(TBL) | \ @@\ + $(NROFF) $(MANMACROS) | $(COL) > file.0; \ @@\ + fi @@\ + @@\ +install.man:: @@\ + MakeDir($(DESTDIR)destdir) @@\ + -@if [ -f file.0 ]; \ @@\ + then \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/dest.0; \@@\ + fi @@\ + @@\ +clean:: @@\ + RemoveFile(file.0) + +#define InstallManPageLong(file,destdir,dest) @@\ +BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\ + @@\ +CppManTarget(file, $(EXTRAMANDEFS)) @@\ + @@\ +InstallManPageLongBase(file,destdir,dest) + +#define InstallGenManPageLong(file,destdir,dest,suffix) @@\ +BuildInstallHtmlManPage(file,dest,suffix) @@\ + @@\ +CppManTarget(file, $(EXTRAMANDEFS)) @@\ + @@\ +InstallManPageLongBase(file,destdir,dest) + +#define InstallMultipleMan(list,dest) @@\ +install.man:: @@\ + MakeDir($(DESTDIR)dest) @@\ + case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in list; do \ @@\ + (MNAME=`echo $$i | cut -f1 -d.`; \ @@\ + set -x; \ @@\ + cat $$i | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\ + | $(COL) > $${MNAME}.0; \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) $${MNAME}.0 \ @@\ + $(DESTDIR)dest/$${MNAME}.0; \ @@\ + $(RM) $${MNAME}.0); \ @@\ + done + +#define InstallMultipleManSuffix(list,dest,suff) @@\ +install.man:: @@\ + MakeDir($(DESTDIR)dest) @@\ + case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in list; do \ @@\ + (set -x; \ @@\ + cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\ + | $(COL) > $$i.0; \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) $$i.0 \ @@\ + $(DESTDIR)dest/$$i.0; \ @@\ + $(RM) $$i.0 ); \ @@\ + done + +#define InstallManPageAliasesBase(file,destdir,aliases) @@\ +install.man:: @@\ + @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in aliases; do \ @@\ + (set -x; \ @@\ + $(RM) $(DESTDIR)destdir/$$i.0;\ @@\ + (cd $(DESTDIR)/destdir; $(LN) file.0 $$i.0);\ @@\ + ); \ @@\ + done + +#else /* Ports */ + +#define InstallManPageAliasesBase(file,destdir,aliases) @@\ +install.man:: @@\ + @SUFFIX=${MANSUFFIX}; \ @@\ + for i in aliases; do \ @@\ + (set -x; \ @@\ + $(RM) $(DESTDIR)destdir/$$i.*; \ @@\ + (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\ + $$i.$${SUFFIX})); \ @@\ + done + +#endif /* Ports */ + +#define InstallManPageAliases(file,destdir,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\ + @@\ +InstallManPageAliasesBase(file,destdir,aliases) + +#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\ +InstallHtmlManPageAliases(file,aliases,suffix) @@\ + @@\ +InstallManPageAliasesBase(file,destdir,aliases) + + +/* + * InstallFontAliases - generate rules to install font aliases + * databases without comments for X11R5 servers + */ +#ifndef InstallFontAliasesNoComment +#define InstallFontAliasesNoComment(dest) @@\ +install:: fonts.alias @@\ + $(RM) _fonts.alias @@\ + sed -e '/^!/d' -e '/^$$/d' < fonts.alias > _fonts.alias @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTALLDATFLAGS) _fonts.alias \ @@\ + $(DESTDIR)dest/fonts.alias @@\ + $(RM) _fonts.alias +#endif /* InstallFontAliasesNoComment */ + +/* + * OpenBSD specific Imake Config files + */ +#ifndef LocalConfigFiles +#define LocalConfigFiles \ + OpenBSDLib.rules OpenBSDLib.tmpl +#endif + +/* + * Architecture specific sections - put all architecture dependent + * options and setting here into the correct section + */ + + +/* + * Definitions for the alpha architecture + */ +#ifdef AlphaArchitecture + +# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3 +# define HasWeakSymbols YES +# endif + +/* XXX Xvfb currently causes a linker error: */ +/* XXX crtbegin.c(.fini+0x10): relocation truncated to fit: BRADDR text */ +# ifdef XVirtualFramebufferServer +# undef XVirtualFramebufferServer +# endif +# define XVirtualFramebufferServer NO +# ifdef XnestServer +# undef XnestServer +# endif +# define XnestServer NO + +# if (OSMajorVersion < 3) +# define HasSharedLibraries NO +# endif + +# ifndef XorgServer +# if OSMajorVersion == 3 && OSMinorVersion >= 2 || OSMajorVersion > 3 +# define XorgServer YES +# else +# define XorgServer NO +# endif +# endif + +/* Definitions for building the XFree86 server */ +# if XorgServer +# ifndef HasNetBSDApertureDriver +# define HasNetBSDApertureDriver YES +# endif +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT +# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines +# define ServerExtraSysLibs -lalpha +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86OSCardDrivers wsfb +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT +# endif +# define UseMatroxHal NO /* Matrox HAL is i386 only */ + +# endif /* XorgServer */ + +# include + +#endif /* AlphaArchitecture */ + +/* + * Definitions for the AMD64 architecture + */ +#ifdef AMD64Architecture + +# define HasWeakSymbols YES + +# define XorgServer YES + +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif + +# ifndef HasNetBSDApertureDriver +# define HasNetBSDApertureDriver YES +# endif + +# define HasAgpGart YES + +# define ServerExtraSysLibs -lamd64 +# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines + +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT +# endif + +# ifndef HasMMXSupport +# define HasMMXSupport YES +# endif + +# ifndef HasX86Support +# define HasX86Support YES +# endif +/* # include */ + +#endif /* AMD64Architecture */ + +/* + * Definitions for the i386 architecture + */ +#ifdef i386Architecture + +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif + +/* Direct rendering (OpenBSD 3.3 and up). */ +# if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 2) +# ifndef BuildXF86DRI +# define BuildXF86DRI NO +# endif +# endif + +# define HasWeakSymbols YES + +/* To use the NetBSD Aperture driver */ +# ifndef HasNetBSDApertureDriver +# define HasNetBSDApertureDriver YES +# endif + +/* 2.7 and later have support for setting MTRRs */ +# ifndef HasMTRRSupport +# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 6) +# define HasMTRRSupport YES +# else +# define HasMTRRSupport NO +# endif +# endif + +/* + * agpgart support (OpenBSD 3.2 and up) + */ +# if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 1) +# ifndef HasAgpGart +# define HasAgpGart YES +# endif +# endif + + +# ifndef DefaultGcc2i386Opt +# if (OSMajorVersion == 2 && OSMinorVersion >= 3) || OSMajorVersion > 2 + /* The GCC strength-reduce bug is fixed for OpenBSD 2.3 and later */ +# define DefaultGcc2i386Opt -O2 GccAliasingArgs +# endif +# endif +# define OptimizedCDebugFlags DefaultGcc2i386Opt +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerExtraSysLibs -li386 +# define LdPostLib /**/ +# define ServerExtraDefines GccGasOption XFree86ServerDefines +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT +# endif + +# define JoystickSupport NO + +/* A hack to work around an optimization problem with gcc 2.95.2 */ +# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 6) +# define GccOptBug295 +# endif + +/* No MMX support in OpenBSD/a.out gas */ +# ifndef HasMMXSupport +# define HasMMXSupport UseElfFormat +# endif + +/* for DRI */ +# ifndef HasX86Support +# define HasX86Support UseElfFormat +# endif + +# include + +#endif /* i386Architecture */ + + +/* + * Definitions for the m68k architecture (currently amiga, hp300, + * mac68k, mvme68k, sun3) + */ +#ifdef Mc68020Architecture + +/* + * Function CSE makes gas -k not recognize external function calls as lazily + * resolvable symbols, thus sometimes making ld.so report undefined symbol + * errors on symbols found in shared library members that would never be + * called. Ask niklas@openbsd.org for details. + */ + +# define PositionIndependentCFlags -fpic -fno-function-cse +# define BuildGlxExt NO +# define BuildGLXLibrary YES + +#endif /* Mc68020Architecture */ + + +/* + * Definitions for the amiga architecture + */ +#ifdef AmigaArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +# define ServerExtraDefines -DXFree86Server + +# include + +#endif /* AmigaArchitecture */ + + +/* + * Definitions for the hp300 architecture + */ +#ifdef Hp300Architecture + +# ifndef BuildServer +# define BuildServer NO +# endif +/* For the X11R5 server */ +# define CompressAllFonts NO +# define InstallFontAliases InstallFontAliasesNoComment +# define UseRgbTxt NO +# define UseRgb YES + +# define ServerExtraDefines -DXFree86Server + +#include + +#endif /* Hp300Architecture */ + + +/* + * Definitions for the mac68k architecture + */ +#ifdef Mac68kArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +# define ServerExtraDefines -DXFree86Server + +# include + +#endif /* mac68kArchitecture */ + + +/* + * Definitions for the mvme68k architecture + */ +#ifdef Mvme68kArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +# define ServerExtraDefines -DXFree86Server + +# include + +#endif /* Mvme68kArchitecture */ + + +/* + * Definitions for the sun3 architecture + */ +#ifdef Sun3Architecture + +# include + +# define ServerOSDefines -DDDXOSINIT +# define BootstrapCFlags -Dsun3 +# define UnalignedReferencesAllowed YES /* changes _XtCopyArgs() */ +# define ServerExtraDefines GccGasOption -Dmc68000 -Dmc68020 \ + -DXFree86Server -DINCLUDE_CG2_HEADER + +# ifndef Xsun24Server +# define Xsun24Server NO +# endif +# ifndef XsunServer +# define XsunServer YES +# endif +# ifndef XsunMonoServer +# define XsunMonoServer NO +# endif + +#define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT + +#endif /* Sun3Architecture */ + + +/* + * Definitions for the mips architecture (currently sgi) + */ +#ifdef MipsArchitecture + +# define HasWeakSymbols YES + +# define XorgServer YES + +# if XorgServer +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86CardDrivers wsfb +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# endif + +# include + +#endif /* MipsArchitecture */ + + +/* + * Definitions for the PowerPC architecture + */ +#ifdef PpcArchitecture + +# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# endif + +# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3 +# define HasWeakSymbols YES +# endif +# ifndef GccWarningOptions +# if defined(XFree86Devel) && XFree86Devel +# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \ + -Wmissing-prototypes -Wmissing-declarations \ + -Wnested-externs +# else +# define GccWarningOptions -Wall -Wpointer-arith +# endif +# endif + +# ifndef XorgServer +# define XorgServer YES +# endif + +/* Definitions for building the X server */ +# if XorgServer +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT +# define ServerExtraDefines GccGasOption XFree86ServerDefines +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86OSCardDrivers wsfb +# ifndef XF86CardDrivers +# define XF86CardDrivers ati mga glint s3virge sis savage\ + trident chips tdfx \ + DevelDrivers vga \ + XF86OSCardDrivers XF86ExtraCardDrivers +# endif +# ifndef DevelDrivers +# define DevelDrivers nv +# endif + +# endif /* XorgServer */ + +# include + +#endif /* PpcArchitecture */ + +/* + * Definitions for the sparc architecture + */ +#ifdef SparcArchitecture + +# define BuildXF86MiscExt NO +# define BuildMITMiscExt NO + +# if OSMajorVersion > 3 || OSMajorVersion == 3 && OSMinorVersion >= 2 +# define HasWeakSymbols YES +#endif + +# if OSMajorVersion == 2 || OSMajorVersion == 3 && OSMinorVersion < 2 +# define ServerOSDefines -DDDXOSINIT +# define ServerExtraDefines -DAVOID_GLYPHBLT -DPIXPRIV -DXFree86Server \ + DebugDefines -DINCLUDE_CG2_HEADER \ + -DX_BYTE_ORDER=$(X_BYTE_ORDER) +# define XOrgServer NO +# else +# define XorgServer YES +# endif + +# if !XorgServer + +# ifndef Xsun24Server +# define Xsun24Server YES +# endif +# ifndef XsunServer +# define XsunServer YES +# endif +# ifndef XsunMonoServer +# define XsunMonoServer YES +# endif +# ifndef InstallXserverSetUID +# define InstallXserverSetUID NO +# endif + +# else /* XF86Server */ + +# ifndef Xsun24Server +# define Xsun24Server NO +# endif +# ifndef XsunServer +# define XsunServer NO +# endif +# ifndef XsunMonoServer +# define XsunMonoServer NO +# endif +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif + +# define XF86CardDrivers wsfb +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# define BuildXInputExt YES +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT +# define ServerExtraDefines GccGasOption XFree86ServerDefines + +# endif + +# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT + +# define BuildXF86VidModeExt NO +# define BuildXF86DGA NO +# ifndef BuildXInputExt +# define BuildXInputExt NO +# endif +# include + +#endif /* SparcArchitecture */ + +/* + * Definitions for the sparc64 architecture + */ + +#ifdef Sparc64Architecture + +# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3 +# define HasWeakSymbols YES +# endif + +# ifndef XorgServer +# define XorgServer YES +# endif + +# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT +# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT + +# if XorgServer +# ifndef DoLoadableServer +# define DoLoadableServer YES +# endif +# define XF86OSCardDrivers wsfb +# define XFree86ConsoleDefines -DWSCONS_SUPPORT +# endif + +# include + +#endif /* Sparc64Architecture */ + +/* + * Definitions for the vax architecture + */ +#ifdef VaxArchitecture + +# ifndef BuildServer +# define BuildServer NO +# endif + +/* For the X11R5 server */ +# define CompressAllFonts NO +# define InstallFontAliases InstallFontAliasesNoComment +# define UseRgbTxt NO +# define UseRgb YES + +# define ServerExtraDefines -DXFree86Server +# define UnalignedReferencesAllowed YES +# define HasSharedLibraries NO +# define HasDlopen NO + +# define BuildGlxExt NO +# define BuildGLXLibrary NO + +# include + +#endif /* VaxArchitecture */ + +/* End or architecture specific section */ + +/* + * Generic settings for all architectures + * which can be overridden by architecture specific sections above + */ + +#ifndef StandardDefines +# define StandardDefines -DCSRG_BASED +#endif + +#if !defined(OptimizedCDebugFlags) +# define OptimizedCDebugFlags -O2 +#endif + +#ifndef ServerOSDefines +# define ServerOSDefines /**/ +#endif + +#ifndef ServerExtraDefines +# define ServerExtraDefines GccGasOption +#endif + +#ifndef HasWeakSymbols +# define HasWeakSymbols NO +#endif + +/* + * Multi-thread safe libs + */ +/* #if HasWeakSymbols == YES && (OSMajorVersion == 2 && OSMinorVersion >= 6 || OSMajorVersion >= 3) +# define HasPosixThreads YES +# define ThreadedX YES +# define NeedUIThrStubs YES +# define ThreadsCompileFlag -pthread +# define ThreadsLibraries -pthread +# define SystemMTDefines -D_REENTRANT +#else */ +# define ThreadedX NO +/* #endif */ + + +/* Set this to YES when getpwuid_r is added to libc_r */ +#define HasThreadSafeAPI NO + +#ifndef ExtraLibraries +# define ExtraLibraries /**/ +#endif + +#ifndef DoLoadableServer +#define DoLoadableServer NO +#endif + +#ifndef XVirtualFramebufferServer +# undef BuildServer +# define BuildServer YES +# define XVirtualFramebufferServer YES +#endif + +#ifndef XnestServer +# undef BuildServer +# define BuildServer YES +# define XnestServer YES +#endif + +#ifndef BuildScreenSaverLibrary +# define BuildScreenSaverLibrary YES +#endif + +#ifndef CompressAllFonts +# define CompressAllFonts YES +#endif + +#ifndef SharedLibXdmGreet +# define SharedLibXdmGreet NO +#endif + +#define HasFreetype2 NO +#define HasExpat NO +#define BuildXterm BuildClients + +/* + * XFree86 uses its own (more portable) database routines to speed up + * the RGB database lookups + * However, if you want to use ndbm anyway, you can set that to NO in + * host.def + */ +#ifndef UseRgbTxt +# define UseRgbTxt YES +#endif + +#ifndef OSBinaryType +# if UseElfFormat +# define OSBinaryType [ELF] +# else +# define OSBinaryType /**/ +# endif +#endif + +#ifndef HasDlopen +# define HasDlopen YES +#endif + +#ifndef DlLibrary +# if UseElfFormat +# if (OSMajorVersion < 3 || OSMajorVersion == 3 && OSMinorVersion == 0) +# define DlLibrary -ldl +# else +# define DlLibrary -Wl,--export-dynamic +# endif +# else +# define DlLibrary /**/ +# endif +#endif + +#if !defined(GccWarningOptions) +# define GccWarningOptions -Wall -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch +#endif + +#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB) +#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB) + +#define CplusplusLibC -lstdc++ + +#define ArchitectureDefines -DOPENBSD_ARCHITECTURE + +#define BuildLibPathVar LD_LIBRARY_PATH + +#ifndef RandomMotifMessageCatalogRule +#define RandomMotifMessageCatalogRule(target) +#endif + +/* This must come last */ +#include diff --git a/cde/programs/dtinfo/tools/config/cde.tmpl b/cde/programs/dtinfo/tools/config/cde.tmpl index 5dfa301bd..a627226e4 100644 --- a/cde/programs/dtinfo/tools/config/cde.tmpl +++ b/cde/programs/dtinfo/tools/config/cde.tmpl @@ -35,7 +35,9 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $ # endif #endif +#ifndef CDESharedRev #define CDESharedRev 2.1 +#endif #ifndef SharedLibPam # define SharedLibPam HasSharedLibraries diff --git a/cde/programs/dtinfo/tools/config/site.def b/cde/programs/dtinfo/tools/config/site.def index 75ef9d1cf..51a44d636 100644 --- a/cde/programs/dtinfo/tools/config/site.def +++ b/cde/programs/dtinfo/tools/config/site.def @@ -81,8 +81,12 @@ XCOMM site: $TOG: site.def /main/26 1997/09/05 11:31:50 samborn $ # endif # endif +#ifndef X11ProjectRoot # define X11ProjectRoot /X11 +#endif +#ifndef ProjectRoot # define ProjectRoot /usr/dt +#endif #endif /* AfterVendorCF */ diff --git a/cde/programs/dtinfo/tools/misc/msgsets.C b/cde/programs/dtinfo/tools/misc/msgsets.C index 48f0d248d..6b59abf27 100644 --- a/cde/programs/dtinfo/tools/misc/msgsets.C +++ b/cde/programs/dtinfo/tools/misc/msgsets.C @@ -42,7 +42,7 @@ #ifdef __cplusplus #include -#if !defined(__DECCXX) && !defined(USL) +#if !defined(__DECCXX) && !defined(USL) && !defined(CSRG_BASED) #include #else #include @@ -195,11 +195,12 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; /* All Rights Reserved */ #include -#include +#include +#include #define BUFFER_INCR_UNIT 64 -ostrstream **sets; +std::ostrstream **sets; int sets_cnt = 0; /* number of sets slots occupied */ int sets_max = 0; /* total number of sets slots */ @@ -509,14 +510,14 @@ case 1: sets_max += BUFFER_INCR_UNIT; if (sets_cnt == 0) { - sets = (ostrstream **) - malloc(sizeof(ostrstream *) * sets_max); + sets = (std::ostrstream **) + malloc(sizeof(std::ostrstream *) * sets_max); set_nums = (int *) malloc(sizeof(int) * sets_max); } else { - sets = (ostrstream **) - realloc(sets, sizeof(ostrstream *) * sets_max); + sets = (std::ostrstream **) + realloc(sets, sizeof(std::ostrstream *) * sets_max); set_nums = (int *) realloc(set_nums, sizeof(int) * sets_max); } @@ -528,7 +529,7 @@ case 1: } if (cur_set >= 0) *sets[cur_set] << '\0'; - sets[cur_set = sets_cnt++] = new ostrstream; + sets[cur_set = sets_cnt++] = new std::ostrstream; *sets[cur_set] << (char*)yytext; @@ -556,7 +557,7 @@ case 3: case 4: { if (cur_set < 0) { // maybe not a message id - cout << (char*)yytext; + std::cout << (char*)yytext; } else { // must be a message id *sets[cur_set] << (char*)yytext; @@ -581,7 +582,7 @@ case 7: case 8: { if (cur_set < 0) - cout << *(char*)yytext; + std::cout << *(char*)yytext; else *sets[cur_set] << *(char*)yytext; } @@ -1151,7 +1152,7 @@ main() for (i = 0; i < sets_cnt; i++) { const char* record = sets[sorted[i]]->str(); - cout << record << '\n' << flush; + std::cout << record << '\n' << std::flush; } free(sorted); diff --git a/cde/programs/dtinfo/tools/misc/treeres b/cde/programs/dtinfo/tools/misc/treeres index 653774358..d077302ef 100755 --- a/cde/programs/dtinfo/tools/misc/treeres +++ b/cde/programs/dtinfo/tools/misc/treeres @@ -1,5 +1,5 @@ # feed this into perl -eval '(exit $?0)' && eval 'exec /usr/local/bin/perl $0 ${1+"$@"}' & eval 'exec /usr/local/bin/perl $0 $argv' +eval '(exit $?0)' && eval 'exec /usr/bin/perl $0 ${1+"$@"}' & eval 'exec /usr/bin/perl $0 $argv' if 0; # treeres - resource file preprocessor diff --git a/cde/programs/dtksh/dtksh.c b/cde/programs/dtksh/dtksh.c index 454a6d747..fdda16e4f 100644 --- a/cde/programs/dtksh/dtksh.c +++ b/cde/programs/dtksh/dtksh.c @@ -34,7 +34,6 @@ #include #include #include -#include #define CONSTCHAR (const char *) #define TRUE 1 diff --git a/cde/programs/dtksh/xmcmds.c b/cde/programs/dtksh/xmcmds.c index 1f989db27..1a8282863 100644 --- a/cde/programs/dtksh/xmcmds.c +++ b/cde/programs/dtksh/xmcmds.c @@ -31,7 +31,7 @@ #include "shell.h" #include -#include +#include #include #include #include diff --git a/cde/programs/dtlogin/Imakefile b/cde/programs/dtlogin/Imakefile index 2a013b702..47936d91e 100644 --- a/cde/programs/dtlogin/Imakefile +++ b/cde/programs/dtlogin/Imakefile @@ -129,6 +129,10 @@ DEPXDMCPLIB = INCLUDES = -I/usr/include/freetype2 #endif +#ifdef OpenBSDArchitecture +INCLUDES = -I$(XPROJECTROOT)/include/freetype2 +#endif + /************************************************************************** * * Source and object modules diff --git a/cde/programs/dtlogin/account.c b/cde/programs/dtlogin/account.c index d5047a388..e14389d43 100644 --- a/cde/programs/dtlogin/account.c +++ b/cde/programs/dtlogin/account.c @@ -138,6 +138,7 @@ Account( struct display *d, char *user, char *line, pid_t pid, #endif /* NeedWidePrototypes */ waitType exitcode ) { +#if !defined(CSRG_BASED) /* we cannot do this on BSD ... */ struct utmp utmp; /* local struct for new entry */ struct utmp *u; /* pointer to entry in utmp file */ int fd; @@ -348,6 +349,7 @@ Account( struct display *d, char *user, char *line, pid_t pid, #endif #endif /* !sun */ +#endif /* !CSRG_BASED */ } @@ -369,6 +371,7 @@ UtmpIdOpen( char *utmpId ) struct utmp *u; /* pointer to entry in utmp file */ int status = 1; /* return code */ +#if !defined(CSRG_BASED) while ( (u = getutent()) != NULL ) { if ( (strncmp(u->ut_id, utmpId, 4) == 0 ) && @@ -380,6 +383,7 @@ UtmpIdOpen( char *utmpId ) } endutent(); +#endif return (status); } diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c index 717b0435e..136d0bda8 100644 --- a/cde/programs/dtlogin/dm.c +++ b/cde/programs/dtlogin/dm.c @@ -515,7 +515,7 @@ StopAll( int arg ) int ChildReady = 0; -#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__uxp__) || defined (__osf__) || defined(linux) +#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__uxp__) || defined (__osf__) || defined(linux) || defined(CSRG_BASED) static SIGVAL ChildNotify( int arg ) { @@ -599,7 +599,9 @@ ProcessChildDeath( int pid, waitType status ) * do process accounting... */ +#if !defined(CSRG_BASED) Account(d, NULL, NULL, pid, DEAD_PROCESS, status); +#endif /* @@ -732,7 +734,9 @@ ProcessChildDeath( int pid, waitType status ) * do process accounting... */ +#if !defined(CSRG_BASED) Account(d, NULL, NULL, pid, DEAD_PROCESS, status); +#endif switch (d->status) { @@ -1030,6 +1034,7 @@ StartDisplay( * are already in use... */ +#if !defined(CSRG_BASED) if (d->utmpId == NULL) { int i; char *p, *q; @@ -1061,6 +1066,7 @@ StartDisplay( } #endif } +#endif } if (NULL == d->authFile) @@ -1150,7 +1156,9 @@ StartDisplay( } } #endif +#if !defined(CSRG_BASED) Account(d, "LOGIN", line, getpid(), LOGIN_PROCESS, status); +#endif } if (!WaitForServer (d)) @@ -1244,7 +1252,9 @@ StopDisplay( struct display *d ) else if ((d->displayType.location == Local) || !dt_shutdown ) { /* don't remove the console */ +#if !defined(CSRG_BASED) Account(d, NULL, NULL, 0, DEAD_PROCESS, status); +#endif RemoveDisplay (d); } } @@ -1546,7 +1556,9 @@ StartGetty( struct display *d ) /* * do process accounting... */ +#if !defined(CSRG_BASED) Account(d, "LOGIN", NULL, getpid(), LOGIN_PROCESS, status); +#endif #ifdef _AIX @@ -1723,6 +1735,7 @@ GettyRunning( struct display *d ) Debug("Checking for a getty on line %s.\n", utmp.ut_line); +#if !defined(CSRG_BASED) setutent(); rvalue = FALSE; @@ -1760,6 +1773,7 @@ GettyRunning( struct display *d ) } endutent(); +#endif /* !CSRG_BASED */ return rvalue; } diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c index 92fa5d850..a1fbaa6a5 100644 --- a/cde/programs/dtlogin/session.c +++ b/cde/programs/dtlogin/session.c @@ -1290,7 +1290,7 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp ) } #endif -#ifndef sun +#if !defined(sun) && !defined(CSRG_BASED) Account(d, user, NULL, getpid(), USER_PROCESS, status); #endif diff --git a/cde/programs/dtlogin/util.c b/cde/programs/dtlogin/util.c index c93d29bf0..accb0ff69 100644 --- a/cde/programs/dtlogin/util.c +++ b/cde/programs/dtlogin/util.c @@ -679,7 +679,8 @@ static int MatchesFileSuffix(char *filename, char *suffix) { int retval = 0; -#if defined(_AIX) || defined(SVR4) || defined (__osf__) || defined(linux) +#if defined(_AIX) || defined(SVR4) || defined (__osf__) || defined(linux) || \ + defined(CSRG_BASED) char *pch; /* diff --git a/cde/programs/dtmail/MotifApp/InterruptibleCmd.C b/cde/programs/dtmail/MotifApp/InterruptibleCmd.C index 49a3f6347..3fe82cfb9 100644 --- a/cde/programs/dtmail/MotifApp/InterruptibleCmd.C +++ b/cde/programs/dtmail/MotifApp/InterruptibleCmd.C @@ -69,7 +69,7 @@ #include #include -#if !defined(linux) +#if !defined(linux) && !defined(CSRG_BASED) extern forceUpdate( Widget ); #endif diff --git a/cde/programs/dtmail/MotifApp/MainWindow.C b/cde/programs/dtmail/MotifApp/MainWindow.C index 80061edeb..1065b338c 100644 --- a/cde/programs/dtmail/MotifApp/MainWindow.C +++ b/cde/programs/dtmail/MotifApp/MainWindow.C @@ -150,7 +150,7 @@ MainWindow::initialize( ) /* install callback */ // XtAddCallback(_main, XmNhelpCallback, HelpCB, helpId); XtAddCallback(_main, XmNhelpCallback, - HelpCB, "_HOMETOPIC"); + HelpCB, (void *)"_HOMETOPIC"); // Called derived class to create the work area diff --git a/cde/programs/dtmail/MotifApp/MenuBar.C b/cde/programs/dtmail/MotifApp/MenuBar.C index e305cf422..5d41b8c8f 100644 --- a/cde/programs/dtmail/MotifApp/MenuBar.C +++ b/cde/programs/dtmail/MotifApp/MenuBar.C @@ -191,22 +191,22 @@ MenuBar::createPulldown ( helpId = XtName(*cascade); if (helpId == "Mailbox") { XtAddCallback(*cascade, XmNhelpCallback, - HelpCB, DTMAILCONTAINERMENUID); + HelpCB, (void *)DTMAILCONTAINERMENUID); } else if (helpId == "Edit") { XtAddCallback(*cascade, XmNhelpCallback, - HelpCB, DTMAILEDITMENUID); + HelpCB, (void *)DTMAILEDITMENUID); } else if (helpId == "Message") { XtAddCallback(*cascade, XmNhelpCallback, - HelpCB, DTMAILMESSAGEMENUID); + HelpCB, (void *)DTMAILMESSAGEMENUID); } else if (helpId == "Attachments") { XtAddCallback(*cascade, XmNhelpCallback, - HelpCB, DTMAILATTACHMENUID); + HelpCB, (void *)DTMAILATTACHMENUID); } else if (helpId == "View") { XtAddCallback(*cascade, XmNhelpCallback, - HelpCB, DTMAILVIEWMENUID); + HelpCB, (void *)DTMAILVIEWMENUID); } else if (helpId == "Compose") { XtAddCallback(*cascade, XmNhelpCallback, - HelpCB, DTMAILCOMPOSEMENUID); + HelpCB, (void *)DTMAILCOMPOSEMENUID); } } } else @@ -323,22 +323,22 @@ MenuBar::createPulldown ( helpId = XtName(cascade); if (helpId == "Mailbox") { XtAddCallback(cascade, XmNhelpCallback, - HelpCB, DTMAILCONTAINERMENUID); + HelpCB, (void *)DTMAILCONTAINERMENUID); } else if (helpId == "Edit") { XtAddCallback(cascade, XmNhelpCallback, - HelpCB, DTMAILEDITMENUID); + HelpCB, (void *)DTMAILEDITMENUID); } else if (helpId == "Message") { XtAddCallback(cascade, XmNhelpCallback, - HelpCB, DTMAILMESSAGEMENUID); + HelpCB, (void *)DTMAILMESSAGEMENUID); } else if (helpId == "Attachments") { XtAddCallback(cascade, XmNhelpCallback, - HelpCB, DTMAILATTACHMENUID); + HelpCB, (void *)DTMAILATTACHMENUID); } else if (helpId == "View") { XtAddCallback(cascade, XmNhelpCallback, - HelpCB, DTMAILVIEWMENUID); + HelpCB, (void *)DTMAILVIEWMENUID); } else if (helpId == "Compose") { XtAddCallback(cascade, XmNhelpCallback, - HelpCB, DTMAILCOMPOSEMENUID); + HelpCB, (void *)DTMAILCOMPOSEMENUID); } } else pulldown = _w; diff --git a/cde/programs/dtmail/MotifApp/SelectFileCmd.C b/cde/programs/dtmail/MotifApp/SelectFileCmd.C index 60a2cbe7f..b346e2a8d 100644 --- a/cde/programs/dtmail/MotifApp/SelectFileCmd.C +++ b/cde/programs/dtmail/MotifApp/SelectFileCmd.C @@ -88,7 +88,7 @@ extern XtPointer _XmStringUngenerate ( } -extern forceUpdate( Widget ); +extern int forceUpdate( Widget ); SelectFileCmd::SelectFileCmd (const char * name, const char * label, diff --git a/cde/programs/dtmail/dtmail/ComposeCmds.C b/cde/programs/dtmail/dtmail/ComposeCmds.C index bdb36ffa5..d3117b359 100644 --- a/cde/programs/dtmail/dtmail/ComposeCmds.C +++ b/cde/programs/dtmail/dtmail/ComposeCmds.C @@ -289,8 +289,9 @@ char * ComposeFamily::valueToAddrString(DtMailValueSeq & value) { int max_len = 0; + int count; - for (int count = 0; count < value.length(); count++) { + for (count = 0; count < value.length(); count++) { max_len += strlen(*(value[count])); } diff --git a/cde/programs/dtmail/dtmail/DmxPrintOptions.C b/cde/programs/dtmail/dtmail/DmxPrintOptions.C index 471ca5ce7..15011af20 100644 --- a/cde/programs/dtmail/dtmail/DmxPrintOptions.C +++ b/cde/programs/dtmail/dtmail/DmxPrintOptions.C @@ -210,6 +210,7 @@ DmxPrintOptions::DmxPrintOptions ( char **strings; void **data; XmString xms; + int i, j, nhdrftrs; _iom_array = new DtVirtArray(10); _propui_array = new DtVirtArray(10); @@ -240,7 +241,7 @@ DmxPrintOptions::DmxPrintOptions ( nitems = DMX_ARRAY_SIZE(hdrftr_values);; strings = (char **) XtMalloc( nitems * sizeof(char*) ); data = (void **) XtMalloc( nitems * sizeof(void*) ); - for (int i=0; idtprint_setup, XmNhelpCallback, HelpCB, - DTMAILPRINTSETUPDIALOG); + (void *)DTMAILPRINTSETUPDIALOG); XtAddCallback( widgets->dtprint_setup, diff --git a/cde/programs/dtmail/dtmail/FindDialog.C b/cde/programs/dtmail/dtmail/FindDialog.C index de5e9644d..4696c4214 100644 --- a/cde/programs/dtmail/dtmail/FindDialog.C +++ b/cde/programs/dtmail/dtmail/FindDialog.C @@ -728,6 +728,7 @@ FindDialog::compareMessage(DtMailMessageHandle handle) return(found); } +#if !defined(CSRG_BASED) // // See if string 'toFind' is anyware in string 'str'. // A case-insensitive version of strstr(). @@ -762,6 +763,7 @@ strcasestr(const char *str, const char *toFind) } return(result); } +#endif Boolean FindDialog::compareHeader(DtMailEnv & error, diff --git a/cde/programs/dtmail/dtmail/MsgHndArray.hh b/cde/programs/dtmail/dtmail/MsgHndArray.hh index a486dd625..726ac99ea 100644 --- a/cde/programs/dtmail/dtmail/MsgHndArray.hh +++ b/cde/programs/dtmail/dtmail/MsgHndArray.hh @@ -26,7 +26,6 @@ #if defined(USL) && (OSMAJORVERSION == 2) extern "C" { #endif -#include #if defined(USL) && (OSMAJORVERSION == 2) }; #endif diff --git a/cde/programs/dtmail/dtmail/MsgScrollingList.C b/cde/programs/dtmail/dtmail/MsgScrollingList.C index d5e5f2306..22d041c46 100644 --- a/cde/programs/dtmail/dtmail/MsgScrollingList.C +++ b/cde/programs/dtmail/dtmail/MsgScrollingList.C @@ -65,7 +65,7 @@ #include // Include for moving X location of titles -extern force( Widget ); +extern int force( Widget ); MsgScrollingList::MsgScrollingList( RoamMenuWindow *menuwindow, diff --git a/cde/programs/dtmail/dtmail/RoamApp.C b/cde/programs/dtmail/dtmail/RoamApp.C index ab36d16fa..e7213e230 100644 --- a/cde/programs/dtmail/dtmail/RoamApp.C +++ b/cde/programs/dtmail/dtmail/RoamApp.C @@ -70,7 +70,7 @@ #include #include -#if defined(USL) || defined(__uxp__) || defined(linux) +#if defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) #define wcswcs wcsstr #include // iswspace is defined in this header on USL */ #endif @@ -2015,7 +2015,7 @@ char *formatPropPair(char * key, void * data) int m_size; if (data == NULL) - data = ""; + data = (void *)""; // figure out whitespace for formatting // assume 13 for normal sized alias name diff --git a/cde/programs/dtmail/dtmail/RoamCmds.C b/cde/programs/dtmail/dtmail/RoamCmds.C index 7fb83edb5..46d130f9a 100644 --- a/cde/programs/dtmail/dtmail/RoamCmds.C +++ b/cde/programs/dtmail/dtmail/RoamCmds.C @@ -143,7 +143,7 @@ extern XtPointer _XmStringUngenerate ( #include -extern forceUpdate( Widget ); +extern int forceUpdate( Widget ); RoamCmd::RoamCmd (char *name, char *label, int active, RoamMenuWindow *window) @@ -1548,7 +1548,7 @@ MoveCopyCmd::doit() _copy_button, XmNhelpCallback, HelpCB, - "dtmailViewmainWindowWork-AreapanedWform2RowColumnMoveCopy"); + (void *)"dtmailViewmainWindowWork-AreapanedWform2RowColumnMoveCopy"); XtAddCallback( _copy_button, XmNactivateCallback, diff --git a/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C b/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C index c290d000b..81177c182 100644 --- a/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C +++ b/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C @@ -48,7 +48,7 @@ #include #include #include -extern forceUpdate( Widget ); +extern int forceUpdate( Widget ); RoamInterruptibleCmd::RoamInterruptibleCmd ( char *name, diff --git a/cde/programs/dtmail/dtmail/RoamMenuWindow.C b/cde/programs/dtmail/dtmail/RoamMenuWindow.C index b28f702aa..5636d1c5b 100644 --- a/cde/programs/dtmail/dtmail/RoamMenuWindow.C +++ b/cde/programs/dtmail/dtmail/RoamMenuWindow.C @@ -124,7 +124,7 @@ #include "SortCmd.hh" -extern force( Widget ); +extern int force( Widget ); static const char * NormalIcon = "DtMail"; static const char * EmptyIcon = "DtMnone"; @@ -725,7 +725,7 @@ RoamMenuWindow::createWorkArea(Widget parent) printHelpId("form1", form1); /* add help callback */ // XtAddCallback(form1, XmNhelpCallback, HelpCB, helpId); - XtAddCallback(form1, XmNhelpCallback, HelpCB, DTMAILWINDOWID); + XtAddCallback(form1, XmNhelpCallback, HelpCB, (void *)DTMAILWINDOWID); panedW = XtCreateManagedWidget("panedW", xmPanedWindowWidgetClass, form1, NULL, 0); @@ -757,7 +757,7 @@ RoamMenuWindow::createWorkArea(Widget parent) /* add help callback */ // XtAddCallback(_rowOfLabels, XmNhelpCallback, HelpCB, helpId); XtAddCallback( - _rowOfLabels, XmNhelpCallback, HelpCB, DTMAILWINDOWROWOFLABELSID); + _rowOfLabels, XmNhelpCallback, HelpCB, (void *)DTMAILWINDOWROWOFLABELSID); XtVaSetValues(_rowOfLabels, XmNrightAttachment,XmATTACH_FORM, @@ -792,7 +792,7 @@ RoamMenuWindow::createWorkArea(Widget parent) XtAddCallback( _list->get_scrolling_list(), XmNhelpCallback, - HelpCB, DTMAILMSGLISTID); + HelpCB, (void *)DTMAILMSGLISTID); XtVaSetValues(_list->get_scrolling_list(), XmNuserData, this, NULL); _rowOfButtons = @@ -2863,7 +2863,7 @@ RoamMenuWindow::addToRowOfButtons() TRUE, this ); ci = new ButtonInterface (_rowOfButtons, _delete_button); w = ci->baseWidget(); - XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILDELBTNID); + XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILDELBTNID); XtVaSetValues(w, XmNleftAttachment, XmATTACH_FORM, XmNtopAttachment, XmATTACH_FORM, @@ -2880,7 +2880,7 @@ RoamMenuWindow::addToRowOfButtons() TRUE, this ); ci = new ButtonInterface (_rowOfButtons, _next_button); w = ci->baseWidget(); - XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILNEXTBTNID); + XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILNEXTBTNID); XtVaSetValues(w, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, prev_widget, @@ -2899,7 +2899,7 @@ RoamMenuWindow::addToRowOfButtons() TRUE, this ); ci = new ButtonInterface (_rowOfButtons, _previous_button); w = ci->baseWidget(); - XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILPREVBTNID); + XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILPREVBTNID); XtVaSetValues(w, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, prev_widget, @@ -2920,7 +2920,7 @@ RoamMenuWindow::addToRowOfButtons() FALSE ); ci = new ButtonInterface (_rowOfButtons, _replySender_button); w = ci->baseWidget(); - XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILREPLYBTNID); + XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILREPLYBTNID); XtVaSetValues(w, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, prev_widget, @@ -2938,7 +2938,7 @@ RoamMenuWindow::addToRowOfButtons() TRUE, TRUE, this); ci = new ButtonInterface (_rowOfButtons, _print_button); w = ci->baseWidget(); - XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILPRINTBTNID); + XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILPRINTBTNID); XtVaSetValues(w, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, prev_widget, @@ -3292,7 +3292,7 @@ RoamMenuWindow::createContainerList() void RoamMenuWindow::createOpenContainerList(CmdList * open_container) { - int ncontainers; + int ncontainers, i; char *container_name; ContainerMenuCmd *container_cmd; @@ -3327,7 +3327,7 @@ RoamMenuWindow::createOpenContainerList(CmdList * open_container) _open_container_containerlist = new DtVirtArray(ncontainers); - for (int i=0; icontainerName(); if (NULL != container_name) @@ -3490,7 +3490,7 @@ RoamMenuWindow::construct_file_menu() void RoamMenuWindow::createCopyList(CmdList * copy_to) { - int ncontainers; + int ncontainers, i; char *container_name; ContainerMenuCmd *container_cmd; @@ -3550,7 +3550,7 @@ RoamMenuWindow::createCopyList(CmdList * copy_to) _copyto_containerlist = new DtVirtArray (ncontainers); - for (int i=0; icontainerName(); if (NULL != container_name) @@ -3930,7 +3930,7 @@ RoamMenuWindow::construct_compose_menu() void RoamMenuWindow::construct_move_menu() { - int ncontainers; + int ncontainers, i; char *container_name; ContainerMenuCmd *container_cmd; @@ -3967,7 +3967,7 @@ RoamMenuWindow::construct_move_menu() delete _move_containerlist; _move_containerlist = new DtVirtArray (ncontainers); - for (int i=0; icontainerName(); if (NULL != container_name) diff --git a/cde/programs/dtmail/dtmail/SendMsgDialog.C b/cde/programs/dtmail/dtmail/SendMsgDialog.C index aa7055440..3eac634c5 100644 --- a/cde/programs/dtmail/dtmail/SendMsgDialog.C +++ b/cde/programs/dtmail/dtmail/SendMsgDialog.C @@ -1374,7 +1374,7 @@ SendMsgDialog::createWorkArea ( Widget parent ) printHelpId("form", _main_form); /* add help callback */ - XtAddCallback(_main_form, XmNhelpCallback, HelpCB, DTMAILCOMPOSEWINDOW); + XtAddCallback(_main_form, XmNhelpCallback, HelpCB, (void *)DTMAILCOMPOSEWINDOW); XtVaSetValues(_main_form, XmNallowResize, True, NULL); diff --git a/cde/programs/dtmail/dtmail/Sort.C b/cde/programs/dtmail/dtmail/Sort.C index 76713dd33..2f676c00e 100644 --- a/cde/programs/dtmail/dtmail/Sort.C +++ b/cde/programs/dtmail/dtmail/Sort.C @@ -398,6 +398,7 @@ Sort::sortMessages(MsgScrollingList *displayList, #define Record(i) (base + (width * (i))) #define Link(i) (*((int *) (Record(i) + offset))) +int Sort::_msort (char * base, int nel, int width, diff --git a/cde/programs/dtmail/include/DtMail/Buffer.hh b/cde/programs/dtmail/include/DtMail/Buffer.hh index 3db90f703..0d6c68cdb 100644 --- a/cde/programs/dtmail/include/DtMail/Buffer.hh +++ b/cde/programs/dtmail/include/DtMail/Buffer.hh @@ -103,7 +103,7 @@ class BufferMemory : public Buffer { virtual int getSize(void); // get total size of the buffer private: -#if !defined(linux) +#if !defined(linux) && !defined(CSRG_BASED) class Chunk; #endif diff --git a/cde/programs/dtmail/include/DtMail/DtMail.h b/cde/programs/dtmail/include/DtMail/DtMail.h index d07902c15..c02df6b11 100644 --- a/cde/programs/dtmail/include/DtMail/DtMail.h +++ b/cde/programs/dtmail/include/DtMail/DtMail.h @@ -284,7 +284,7 @@ extern "C" { extern const char ** DtMailTransportEnumerate(DtMailSession, DtMailEnv *); - extern DtMailTransportSubmit(DtMailTransport, + extern int DtMailTransportSubmit(DtMailTransport, DtMailEnv *, DtMailMessage); diff --git a/cde/programs/dtmail/include/DtMail/Threads.hh b/cde/programs/dtmail/include/DtMail/Threads.hh index 9c609b0a5..20e6b9b76 100644 --- a/cde/programs/dtmail/include/DtMail/Threads.hh +++ b/cde/programs/dtmail/include/DtMail/Threads.hh @@ -120,7 +120,7 @@ class Condition : public DtCPlusPlusAllocator { int state(void); int operator=(int); - operator += (int); + int operator += (int); operator int(void); void wait(void); diff --git a/cde/programs/dtmail/libDtMail/Common/Buffer.C b/cde/programs/dtmail/libDtMail/Common/Buffer.C index d5f5dd605..13fec632f 100644 --- a/cde/programs/dtmail/libDtMail/Common/Buffer.C +++ b/cde/programs/dtmail/libDtMail/Common/Buffer.C @@ -50,7 +50,6 @@ #if defined(USL) && (OSMAJORVERSION == 2) extern "C" { #endif -#include #if defined(USL) && (OSMAJORVERSION == 2) }; #endif diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C index dc0e8bc5a..9a372d7d2 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C @@ -156,6 +156,8 @@ struct cmd cmdtab[] = { #define SYSTEM_MAILRC "/usr/share/lib/mailx.rc" #elif defined(__uxp__) #define SYSTEM_MAILRC "/etc/mail/mailx.rc" +#elif defined(CSRG_BASED) +#define SYSTEM_MAILRC "/etc/mail.rc" #endif // constructor @@ -1072,6 +1074,7 @@ int DtMail::MailRc::execute(char linebuf[]) * include the newline at the end. */ +int DtMail::MailRc::readline(FILE *ibuf, char *linebuf) { register char *cp; diff --git a/cde/programs/dtmail/libDtMail/Common/HashTable.C b/cde/programs/dtmail/libDtMail/Common/HashTable.C index c56c04254..4374f7de9 100644 --- a/cde/programs/dtmail/libDtMail/Common/HashTable.C +++ b/cde/programs/dtmail/libDtMail/Common/HashTable.C @@ -78,13 +78,14 @@ void * HashTableImpl::lookup(ObjectKey & key) { short hash_key = key.hashValue(); + HashEntry *chain; int slot = hash_key % _table_size; // Search the slot looking for the value. Return NULL if there // are no objects matching this key. // - for (HashEntry * chain = &_hash_table[slot]; chain; chain = chain->next) { + for (chain = &_hash_table[slot]; chain; chain = chain->next) { if (chain->key && key == *(chain->key)) { break; } @@ -102,6 +103,7 @@ HashTableImpl::set(ObjectKey & key, void * value) { short hash_key = key.hashValue(); int slot = hash_key % _table_size; + HashEntry *chain; // See if we have already filled the slot. // @@ -116,7 +118,7 @@ HashTableImpl::set(ObjectKey & key, void * value) // We either have a collision or a duplicate. In the case of duplicates // we simply replace the value. // - for (HashEntry * chain = &_hash_table[slot]; chain->next; chain = chain->next) { + for (chain = &_hash_table[slot]; chain->next; chain = chain->next) { // If this item is already stored then update the value. // if (key == *(chain->key)) { @@ -139,6 +141,7 @@ HashTableImpl::remove(ObjectKey & key) short hash_val = key.hashValue(); int slot = hash_val % _table_size; void * removed_val = NULL; + HashEntry *chain; // See if we even have this object. // @@ -151,7 +154,7 @@ HashTableImpl::remove(ObjectKey & key) // Try to find it in the chain. // HashEntry * last = NULL; - for (HashEntry * chain = &_hash_table[slot]; chain; chain = chain->next) { + for (chain = &_hash_table[slot]; chain; chain = chain->next) { if (key == *(chain->key)) { break; } diff --git a/cde/programs/dtmail/libDtMail/Common/IO.C b/cde/programs/dtmail/libDtMail/Common/IO.C index 0046ac683..7310d1f8b 100644 --- a/cde/programs/dtmail/libDtMail/Common/IO.C +++ b/cde/programs/dtmail/libDtMail/Common/IO.C @@ -819,7 +819,7 @@ GetPasswordEntry(passwd & result) memcpy(&passwordEntry, tresult, sizeof(struct passwd)); passwordEntry.pw_name = strdup(passwordEntry.pw_name); passwordEntry.pw_passwd = strdup(passwordEntry.pw_passwd); -#if !defined(_AIX) && !defined(linux) +#if !defined(_AIX) && !defined(linux) && !defined(CSRG_BASED) #ifndef __osf__ passwordEntry.pw_age = strdup(passwordEntry.pw_age); #endif diff --git a/cde/programs/dtmail/libDtMail/Common/NotDynamic.C b/cde/programs/dtmail/libDtMail/Common/NotDynamic.C index 2fd770844..792d5560c 100644 --- a/cde/programs/dtmail/libDtMail/Common/NotDynamic.C +++ b/cde/programs/dtmail/libDtMail/Common/NotDynamic.C @@ -66,8 +66,8 @@ extern "C" void * RFCMetaFactory(const char * op); extern "C" void * V3MetaFactory(const char * op); static const SymTable symbol_table[] = { -{ "RFCMetaFactory", RFCMetaFactory }, -{ "V3MetaFactory", V3MetaFactory }, +{ "RFCMetaFactory", (void *)RFCMetaFactory }, +{ "V3MetaFactory", (void *)V3MetaFactory }, { NULL, NULL } }; diff --git a/cde/programs/dtmail/libDtMail/Common/Session.C b/cde/programs/dtmail/libDtMail/Common/Session.C index 12da10157..d81434c5a 100644 --- a/cde/programs/dtmail/libDtMail/Common/Session.C +++ b/cde/programs/dtmail/libDtMail/Common/Session.C @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include @@ -90,7 +89,6 @@ #if defined(USL) && (OSMAJORVERSION == 2) extern "C" { #endif -#include #if defined(USL) && (OSMAJORVERSION == 2) }; #endif diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C b/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C index 8a8edd23e..afd927f11 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C @@ -169,7 +169,8 @@ RFCFormat::writeHeaders(DtMailEnv & error, hnd && !error.isSet(); value.clear(), hnd = env->getNextHeader(error, hnd, &name, value)) { - for (const char ** hdr = suppress_headers; *hdr; hdr++) { + const char **hdr; + for (hdr = suppress_headers; *hdr; hdr++) { if (strcasecmp(name, *hdr) == 0) break; } @@ -185,7 +186,8 @@ RFCFormat::writeHeaders(DtMailEnv & error, for (int val = 0; val < value.length(); val++) { // // If the value is null or empty do not emit this field - for (const char *valPtr = *(value[val]); + const char *valPtr; + for (valPtr = *(value[val]); *valPtr && (isspace((unsigned char)*valPtr)); valPtr++) {} diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C index 687fe3640..b0be2f29f 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C @@ -63,7 +63,7 @@ #include #include #include -#if !defined(__aix) && !defined(__hpux) && !defined(linux) +#if !defined(__aix) && !defined(__hpux) && !defined(linux) && !defined(CSRG_BASED) #include #endif #include @@ -112,7 +112,7 @@ extern "C" ssize_t pread(int, void *, size_t, off_t); #define LCL_SIG_HANDLER_SIGNATURE #elif defined(__hpux) #define LCL_SIG_HANDLER_SIGNATURE __harg -#elif defined(__aix) || defined(__alpha) || defined(linux) +#elif defined(__aix) || defined(__alpha) || defined(linux) || defined(CSRG_BASED) #define LCL_SIG_HANDLER_SIGNATURE int #elif defined(__uxp__) #define LCL_SIG_HANDLER_SIGNATURE @@ -674,7 +674,7 @@ RFCMailBox::append(DtMailEnv &error, char *buf, int len) path, errno, error.errnoMessage(errno)); break; -#if defined(__osf__) +#if defined(__osf__) || defined(CSRG_BASED) case ENOTDIR: #else case ENOLINK: @@ -3011,7 +3011,7 @@ RFCMailBox::createTemporaryMailboxFile(DtMailEnv & error, char *tmp_name) error.setError(DTME_CannotCreateTemporaryMailboxFile_NoSuchFile); break; -#if defined(__osf__) +#if defined(__osf__) || defined(CSRG_BASED) case ENOTDIR: #else case ENOLINK: @@ -3336,7 +3336,7 @@ RFCMailBox::writeMailBox(DtMailEnv &error, DtMailBoolean hide_access) DTME_CannotWriteToTemporaryMailboxFile_ProcessLimitsExceeded); break; -#if defined(__osf__) +#if defined(__osf__) || defined(CSRG_BASED) case ENOTDIR: #else case ENOLINK: @@ -3696,7 +3696,7 @@ RFCMailBox::generateUniqueLockId(void) char theId[128]; char hwserialbuf[64]; -#if !defined(__aix) && !defined(__hpux) && !defined(__osf__) && !defined(linux) +#if !defined(__aix) && !defined(__hpux) && !defined(__osf__) && !defined(linux) && !defined(CSRG_BASED) if (sysinfo(SI_HW_SERIAL, (char *)hwserialbuf, sizeof(hwserialbuf)-1) == -1) #endif strcpy(hwserialbuf, "dtmail"); @@ -3832,7 +3832,7 @@ RFCMailBox::linkLockFile(DtMailEnv & error, char *tempLockFileName) error.setError(DTME_CannotCreateMailboxLockFile_NoSuchFile); break; -#if defined(__osf__) +#if defined(__osf__) || defined(CSRG_BASED) case ENOTDIR: #else case ENOLINK: @@ -4200,7 +4200,7 @@ RFCMailBox::dotDtmailLock(DtMailEnv & error) case ENOENT: error.setError(DTME_CannotCreateMailboxLockFile_NoSuchFile); break; -#if defined(__osf__) +#if defined(__osf__) || defined(CSRG_BASED) case ENOTDIR: #else case ENOLINK: @@ -4814,27 +4814,27 @@ extern "C" void * RFCMetaFactory(const char * op) { if (strcmp(op, QueryImplEntryOp) == 0) { - return(RFCQueryImpl); + return((void *)RFCQueryImpl); } if (strcmp(op, QueryOpenEntryOp) == 0) { - return(RFCQueryOpen); + return((void *)RFCQueryOpen); } if (strcmp(op, MailBoxConstructEntryOp) == 0) { - return(RFCMailBoxConstruct); + return((void *)RFCMailBoxConstruct); } if (strcmp(op, QueryMessageEntryOp) == 0) { - return(RFCMessageQuery); + return((void *)RFCMessageQuery); } if (strcmp(op, MessageConstructEntryOp) == 0) { - return(RFCMessageConstruct); + return((void *)RFCMessageConstruct); } if (strcmp(op, TransportConstructEntryOp) == 0) { - return(RFCMIMETransportConstruct); + return((void *)RFCMIMETransportConstruct); } return(NULL); @@ -4873,27 +4873,27 @@ extern "C" void * V3MetaFactory(const char * op) { if (strcmp(op, QueryImplEntryOp) == 0) { - return(RFCQueryImpl); + return((void *)RFCQueryImpl); } if (strcmp(op, QueryOpenEntryOp) == 0) { - return(RFCQueryOpen); + return((void *)RFCQueryOpen); } if (strcmp(op, MailBoxConstructEntryOp) == 0) { - return(V3MailBoxConstruct); + return((void *)V3MailBoxConstruct); } if (strcmp(op, QueryMessageEntryOp) == 0) { - return(RFCMessageQuery); + return((void *)RFCMessageQuery); } if (strcmp(op, MessageConstructEntryOp) == 0) { - return(RFCMessageConstruct); + return((void *)RFCMessageConstruct); } if (strcmp(op, TransportConstructEntryOp) == 0) { - return(RFCV3TransportConstruct); + return((void *)RFCV3TransportConstruct); } return(NULL); diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C b/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C index 2d41ee3bb..00965d786 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C @@ -51,6 +51,7 @@ #include #endif #include +#include #include #include "RFCImpl.hh" @@ -490,7 +491,9 @@ RFCValue::toDate(void) new_time.tm_isdst = -1; date.dtm_date = SafeMktime(&new_time); - date.dtm_tz_offset_secs = (int) timezone; +#ifdef SVR4 + date.dtm_tz_offset_secs = timezone; +#endif } else { // In this format, we should have a day of the month. @@ -536,15 +539,19 @@ RFCValue::toDate(void) time_t offset = parseTZ(token_begin[this_token], token_end[this_token]); - time_t orig_zone = (time_t) timezone; +#ifdef SVR4 + time_t orig_zone = timezone; timezone = offset; +#endif // Tell "mktime" to figure "dst" on or not. new_time.tm_isdst = -1; date.dtm_date = SafeMktime(&new_time); date.dtm_tz_offset_secs = offset; +#ifdef SVR4 timezone = orig_zone; +#endif } return(date); diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C index c51636b97..eab791cbe 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C @@ -973,7 +973,7 @@ RFCTransport::signalRegister(void) initialized = 1; #if defined(hpux) || defined(_aix) || defined(__osf__) || defined(linux) || \ - (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) + (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) || defined(CSRG_BASED) // SunOS 5.5 and above defined prototype for signal handler act.sa_handler = (void (*)(int))&RFCTransport::childHandler; #else diff --git a/cde/programs/dtmail/libDtMail/RFC/V3BodyPart.C b/cde/programs/dtmail/libDtMail/RFC/V3BodyPart.C index 007d7261c..0d4fa1ba3 100644 --- a/cde/programs/dtmail/libDtMail/RFC/V3BodyPart.C +++ b/cde/programs/dtmail/libDtMail/RFC/V3BodyPart.C @@ -328,9 +328,11 @@ V3BodyPart::checksum(DtMailEnv & error) static int countTypes(char ** types) { + int count; + if (NULL == types) return 0; - for (int count = 0; *types; types++, count++) { + for (count = 0; *types; types++, count++) { continue; } diff --git a/cde/programs/dtpad/main.c b/cde/programs/dtpad/main.c index 930cb69ea..0691e8911 100644 --- a/cde/programs/dtpad/main.c +++ b/cde/programs/dtpad/main.c @@ -985,7 +985,7 @@ InitEditSessionAndFirstPad( sigfillset(&act.sa_mask); act.sa_flags = 0; act.sa_handler = SigcldHndlr; - sigaction(SIGCLD, &act, (struct sigaction *)NULL); + sigaction(SIGCHLD, &act, (struct sigaction *)NULL); } } @@ -1591,7 +1591,7 @@ void SigcldHndlr (int dummy) /* * Is this really necessary? */ - sigaction(SIGCLD, &act, (struct sigaction *)NULL); + sigaction(SIGCHLD, &act, (struct sigaction *)NULL); } diff --git a/cde/programs/dtpdmd/dtpdmd.c b/cde/programs/dtpdmd/dtpdmd.c index 5489893c1..6ea9795d7 100644 --- a/cde/programs/dtpdmd/dtpdmd.c +++ b/cde/programs/dtpdmd/dtpdmd.c @@ -383,7 +383,7 @@ main( argc, argv ) sigemptyset(&svec.sa_mask); svec.sa_flags = 0; svec.sa_handler = handle_SIGCLD; - (void) sigaction(SIGCLD, &svec, (struct sigaction *) NULL); + (void) sigaction(SIGCHLD, &svec, (struct sigaction *) NULL); /* * After this point, we need to trap all X and XIO errors. diff --git a/cde/programs/dtpdmd/manager.c b/cde/programs/dtpdmd/manager.c index 55af0458b..1893f5d13 100644 --- a/cde/programs/dtpdmd/manager.c +++ b/cde/programs/dtpdmd/manager.c @@ -425,7 +425,7 @@ void mgr_launch_pdm( XpPdmServiceRec *rec ) sigemptyset(&svec.sa_mask); svec.sa_flags = 0; svec.sa_handler = SIG_DFL; - (void) sigaction(SIGCLD, &svec, (struct sigaction *) NULL); + (void) sigaction(SIGCHLD, &svec, (struct sigaction *) NULL); for (i=3; i < FOPEN_MAX; i++) { if ((i != rec->message_pipe[1]) && diff --git a/cde/programs/dtpdmd/records.c b/cde/programs/dtpdmd/records.c index ddc80ea57..380a5b0f0 100644 --- a/cde/programs/dtpdmd/records.c +++ b/cde/programs/dtpdmd/records.c @@ -55,7 +55,7 @@ static void block_SIGCLD( void ) int rtn; sigemptyset( &newset ); - sigaddset( &newset, SIGCLD ); + sigaddset( &newset, SIGCHLD ); rtn = sigprocmask( SIG_BLOCK, &newset, (sigset_t *) NULL ); } @@ -65,7 +65,7 @@ static void unblock_SIGCLD( void ) int rtn; sigemptyset( &newset ); - sigaddset( &newset, SIGCLD ); + sigaddset( &newset, SIGCHLD ); rtn = sigprocmask( SIG_UNBLOCK, &newset, (sigset_t *) NULL ); } diff --git a/cde/programs/dtprintinfo/UI/DtApp.C b/cde/programs/dtprintinfo/UI/DtApp.C index 94bc42387..a93fbdad6 100644 --- a/cde/programs/dtprintinfo/UI/DtApp.C +++ b/cde/programs/dtprintinfo/UI/DtApp.C @@ -324,16 +324,16 @@ void DtApp::SaveYourSelf() save_state = true; - char *value = window->setPrefD->ShowOnlyMyJobs() ? "1" : "0"; + char *value = window->setPrefD->ShowOnlyMyJobs() ? (char *)"1" : (char *)"0"; Save("ShowOnlyMine", value); - value = window->setPrefD->ShowStatusLine() ? "1" : "0"; + value = window->setPrefD->ShowStatusLine() ? (char *)"1" : (char *)"0"; Save("ShowMessageLine", value); - value = window->setPrefD->ShowDetailsLabel() ? "1" : "0"; + value = window->setPrefD->ShowDetailsLabel() ? (char *)"1" : (char *)"0"; Save("ShowDetailsLabel", value); - value = window->setPrefD->ShowStatusFlags() ? "1" : "0"; + value = window->setPrefD->ShowStatusFlags() ? (char *)"1" : (char *)"0"; Save("ShowProblemFlag", value); char interval[9]; @@ -357,10 +357,10 @@ void DtApp::SaveYourSelf() queues = (DtPrinterIcon **) window->container->Children(); for (i = 0; i < window->container->NumChildren(); i++) { - value = queues[i]->Visible() ? "1" : "0"; + value = queues[i]->Visible() ? (char *)"1" : (char *)"0"; sprintf(attribute, "%s.Visible", queues[i]->QueueObj()->Name()); Save(attribute, value); - value = queues[i]->Open() ? "1" : "0"; + value = queues[i]->Open() ? (char *)"1" : (char *)"0"; sprintf(attribute, "%s.Open", queues[i]->QueueObj()->Name()); Save(attribute, value); } diff --git a/cde/programs/dtprintinfo/UI/DtPrinterIcon.C b/cde/programs/dtprintinfo/UI/DtPrinterIcon.C index a0e593d70..b2a978574 100644 --- a/cde/programs/dtprintinfo/UI/DtPrinterIcon.C +++ b/cde/programs/dtprintinfo/UI/DtPrinterIcon.C @@ -174,7 +174,7 @@ char *DtPrinterIcon::Description() sprintf(buf, "%s_Print", queue->Name()); char *desc = DtActionDescription(buf); - return (desc ? desc : ""); + return (desc ? desc : (char *)""); } void DtPrinterIcon::PrintQueueUp(boolean _flag) diff --git a/cde/programs/dtprintinfo/UI/DtPrinterIcon.h b/cde/programs/dtprintinfo/UI/DtPrinterIcon.h index 82780c34b..e5d5b4c08 100644 --- a/cde/programs/dtprintinfo/UI/DtPrinterIcon.h +++ b/cde/programs/dtprintinfo/UI/DtPrinterIcon.h @@ -59,7 +59,7 @@ class DtPrinterContainer : public Container : Container(category, parent, name, SCROLLED_HORIZONTAL_ROW_COLUMN) { } ~DtPrinterContainer() { delete dnd; } - boolean DtPrinterContainer::SetVisiblity(boolean flag) + boolean SetVisiblity(boolean flag) { Container::SetVisiblity(flag); dnd->UpdateActivity(flag); diff --git a/cde/programs/dtprintinfo/libUI/BaseUI.h b/cde/programs/dtprintinfo/libUI/BaseUI.h index f02c903b5..0a83a9f8e 100644 --- a/cde/programs/dtprintinfo/libUI/BaseUI.h +++ b/cde/programs/dtprintinfo/libUI/BaseUI.h @@ -40,7 +40,7 @@ #define boolean boolean_t #define true B_TRUE #define false B_FALSE -#elif defined(linux) +#elif defined(linux) || defined(CSRG_BASED) #define false 0 #define true 0 #define boolean int diff --git a/cde/programs/dtprintinfo/objects/BaseObj.h b/cde/programs/dtprintinfo/objects/BaseObj.h index 1b7a6e3e5..7925eec86 100644 --- a/cde/programs/dtprintinfo/objects/BaseObj.h +++ b/cde/programs/dtprintinfo/objects/BaseObj.h @@ -41,7 +41,7 @@ #define boolean boolean_t #define true B_TRUE #define false B_FALSE -#elif defined(linux) +#elif defined(linux) || defined(CSRG_BASED) #define false 0 #define true 0 #define boolean int diff --git a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C index 71c756b91..7a32fdf18 100644 --- a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C +++ b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C @@ -774,7 +774,7 @@ void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs) } #endif // HP LOCAL PARSER -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) // // DEC/OSF1 PARSER - Output from "lpstat -o // @@ -870,7 +870,7 @@ void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs) #if defined(__osf__) sprintf(buf, "lpstat -o%s", printer); #endif -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) sprintf(buf, "lpq -P%s", printer); #endif diff --git a/cde/programs/dtprintinfo/sym2num b/cde/programs/dtprintinfo/sym2num index 8799eb372..ba22f7e80 100755 --- a/cde/programs/dtprintinfo/sym2num +++ b/cde/programs/dtprintinfo/sym2num @@ -58,6 +58,9 @@ awk '/^\$set/ { SET_NAME=$2; SET_COUNT++; MES_COUNT=0; if [[ -f /usr/ccs/lib/cpp ]] #IBM & SUN then cpp_path=/usr/ccs/lib +elif [[ -f /usr/libexec/cpp ]] #BSD +then + cpp_path=/usr/libexec elif [[ -f /lib/cpp ]] #HP then cpp_path=/lib diff --git a/cde/programs/dtprintinfo/util/Invoke.C b/cde/programs/dtprintinfo/util/Invoke.C index 590adb7c2..838009fec 100644 --- a/cde/programs/dtprintinfo/util/Invoke.C +++ b/cde/programs/dtprintinfo/util/Invoke.C @@ -38,7 +38,9 @@ #include #include #include +#if !defined(CSRG_BASED) #include +#endif #ifdef _AIX #include /* need to get bzero defined */ #endif /* _AIX */ diff --git a/cde/programs/dtscreen/dtscreen.c b/cde/programs/dtscreen/dtscreen.c index 5f8c4a199..6c2278650 100644 --- a/cde/programs/dtscreen/dtscreen.c +++ b/cde/programs/dtscreen/dtscreen.c @@ -109,6 +109,7 @@ nl_catd scmc_catd; /* Cat descriptor for scmc conversion */ #include +#include #include #include diff --git a/cde/programs/dtscreen/flame.c b/cde/programs/dtscreen/flame.c index 4de3d2512..9ba56a50b 100644 --- a/cde/programs/dtscreen/flame.c +++ b/cde/programs/dtscreen/flame.c @@ -44,6 +44,7 @@ #include "dtscreen.h" #include +#include #define MAXTOTAL 10000 #define MAXBATCH 10 diff --git a/cde/programs/dtscreen/hopalong.c b/cde/programs/dtscreen/hopalong.c index 539fb79c4..8fd3cc1e0 100644 --- a/cde/programs/dtscreen/hopalong.c +++ b/cde/programs/dtscreen/hopalong.c @@ -52,6 +52,7 @@ #include "dtscreen.h" #include +#include typedef struct { int centerx; diff --git a/cde/programs/dtscreen/image.c b/cde/programs/dtscreen/image.c index da6ff0327..d35625ba8 100644 --- a/cde/programs/dtscreen/image.c +++ b/cde/programs/dtscreen/image.c @@ -42,6 +42,7 @@ #include "dtscreen.h" #include "xlogo.bit" +#include static XImage logo = { 0, 0, /* width, height */ diff --git a/cde/programs/dtscreen/life.c b/cde/programs/dtscreen/life.c index a2d6d1157..7d5eef58e 100644 --- a/cde/programs/dtscreen/life.c +++ b/cde/programs/dtscreen/life.c @@ -47,6 +47,7 @@ #include "dtscreen.h" #include "lifeicon.bit" +#include static XImage logo = { 0, 0, /* width, height */ diff --git a/cde/programs/dtscreen/pyro.c b/cde/programs/dtscreen/pyro.c index e08c2b222..0501f55fe 100644 --- a/cde/programs/dtscreen/pyro.c +++ b/cde/programs/dtscreen/pyro.c @@ -50,6 +50,8 @@ #include "dtscreen.h" #include +#include + #define TWOPI 6.2831853 /* Define this >1 to get small rectangles instead of points */ diff --git a/cde/programs/dtscreen/qix.c b/cde/programs/dtscreen/qix.c index 9aa454594..e497bdc9e 100644 --- a/cde/programs/dtscreen/qix.c +++ b/cde/programs/dtscreen/qix.c @@ -49,6 +49,7 @@ */ #include "dtscreen.h" +#include typedef struct { int x; diff --git a/cde/programs/dtscreen/rotor.c b/cde/programs/dtscreen/rotor.c index f6b3694f4..ead68a8e7 100644 --- a/cde/programs/dtscreen/rotor.c +++ b/cde/programs/dtscreen/rotor.c @@ -47,6 +47,7 @@ #include #include +#include #include "dtscreen.h" #define SAVE 100 /* this is a good constant to tweak */ diff --git a/cde/programs/dtscreen/swarm.c b/cde/programs/dtscreen/swarm.c index c3a6bc3dc..f72d42ac7 100644 --- a/cde/programs/dtscreen/swarm.c +++ b/cde/programs/dtscreen/swarm.c @@ -38,6 +38,7 @@ * 31-Aug-90: Adapted from xswarm by Jeff Butterworth. (butterwo@ncsc.org) */ +#include #include "dtscreen.h" #define TIMES 4 /* number of time positions recorded */ diff --git a/cde/programs/dtscreen/usleep.c b/cde/programs/dtscreen/usleep.c index 08490812d..ca89c5286 100644 --- a/cde/programs/dtscreen/usleep.c +++ b/cde/programs/dtscreen/usleep.c @@ -41,7 +41,7 @@ #include "dtscreen.h" -#if !defined(_AIX) && !defined(hpV4) && !defined(linux) +#if !defined(_AIX) && !defined(hpV4) && !defined(linux) && !defined(CSRG_BASED) int usleep(unsigned long usec) { diff --git a/cde/programs/dtscreen/worm.c b/cde/programs/dtscreen/worm.c index 10d4cad47..a806facc0 100644 --- a/cde/programs/dtscreen/worm.c +++ b/cde/programs/dtscreen/worm.c @@ -53,7 +53,8 @@ */ #include "dtscreen.h" -#include +#include +#include #define MAXCOLORS 64 #define MAXWORMS 64 @@ -87,12 +88,14 @@ typedef struct { int size[MAXCOLORS]; } wormstruct; +#if !defined(CSRG_BASED) int round(x) float x; { return ((int) floor((double) x)); } +#endif void diff --git a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C index 731fe91c8..1e7fdf111 100644 --- a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C +++ b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C @@ -53,7 +53,7 @@ #endif #include -#if defined(sun) || defined(_AIX) || defined(__osf__) || defined(USL) || defined(__uxp__) || (linux) +#if defined(sun) || defined(_AIX) || defined(__osf__) || defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) #define UID_NO_CHANGE ((uid_t) -1) #define GID_NO_CHANGE ((gid_t) -1) #endif @@ -80,6 +80,8 @@ UnixEnvironment::UnixEnvironment() manpath = "/usr/share/%L/man:/usr/share/man:/usr/local/man"; #elif defined(linux) manpath = "/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man"; +#elif defined(__OpenBSD__) + manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man"; #endif else manpath = temp; diff --git a/cde/programs/dtsearchpath/libCliSrv/cstring.C b/cde/programs/dtsearchpath/libCliSrv/cstring.C index be3067fcc..dc735e23e 100644 --- a/cde/programs/dtsearchpath/libCliSrv/cstring.C +++ b/cde/programs/dtsearchpath/libCliSrv/cstring.C @@ -510,12 +510,14 @@ CTokenizedString::~CTokenizedString() CString CTokenizedString::next() { char * q = 0; +char * p; +int i; if (cursor) { if (strlen(delimiter) == 1) q = strchr(cursor,delimiter[0]); else { - for (int i = 0; i < strlen(cursor); i++) + for (i = 0; i < strlen(cursor); i++) if (strchr(delimiter,cursor[i])) { q = &cursor[i]; break; @@ -533,7 +535,7 @@ char * q = 0; // eliminate trailing white space if (skipWhiteSpace) { - for (char *p = q; isspace(*(p-1)); p--); + for (p = q; isspace(*(p-1)); p--); *p = 0; } CString result(cursor); diff --git a/cde/programs/dtsession/SmConMgmt.c b/cde/programs/dtsession/SmConMgmt.c index aa0f678f2..23ed57cc3 100644 --- a/cde/programs/dtsession/SmConMgmt.c +++ b/cde/programs/dtsession/SmConMgmt.c @@ -163,7 +163,7 @@ GetMemoryUtilization(void) #if !defined(linux) static int init = 0; static kmem; -#if !defined(SVR4) && !defined(sco) && !defined(hpV4) && !defined(_POWER) && !defined (__osf__) +#if !defined(SVR4) && !defined(sco) && !defined(hpV4) && !defined(_POWER) && !defined (__osf__) && !defined(CSRG_BASED) extern void nlist(); #endif int i; diff --git a/cde/programs/dtsession/SmGlobals.c b/cde/programs/dtsession/SmGlobals.c index 36c351197..4bda658ee 100644 --- a/cde/programs/dtsession/SmGlobals.c +++ b/cde/programs/dtsession/SmGlobals.c @@ -1352,7 +1352,7 @@ RemoveFiles( _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else (void) setpgrp(); @@ -1457,7 +1457,7 @@ MoveDirectory( _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else (void) setpgrp(); diff --git a/cde/programs/dtsession/SmRestore.c b/cde/programs/dtsession/SmRestore.c index aa314cf88..7fb200c30 100644 --- a/cde/programs/dtsession/SmRestore.c +++ b/cde/programs/dtsession/SmRestore.c @@ -473,11 +473,11 @@ SystemCmd (char *pchCmd) { void (*signalHandler) (); - signalHandler = (void (*)())signal (SIGCLD, SIG_DFL); + signalHandler = (void (*)())signal (SIGCHLD, SIG_DFL); system (pchCmd); - signal (SIGCLD, signalHandler); + signal (SIGCHLD, signalHandler); } /* END OF FUNTION SystemCmd */ @@ -896,7 +896,7 @@ RestoreResources( Boolean errorHandlerInstalled, ... ) setegid(smGD.runningGID); #endif #endif -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else (void) setpgrp(); @@ -3607,7 +3607,7 @@ StartLocalClient ( _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else (void)setpgrp(); @@ -3843,7 +3843,7 @@ ForkWM( void ) #endif _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else (void)setpgrp(); @@ -3928,7 +3928,7 @@ KillParent( void ) /* * Disassociate from parent */ -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else setpgrp(); diff --git a/cde/programs/dtspcd/Imakefile b/cde/programs/dtspcd/Imakefile index 0f417a722..645abedfc 100644 --- a/cde/programs/dtspcd/Imakefile +++ b/cde/programs/dtspcd/Imakefile @@ -24,7 +24,7 @@ LOCAL_LIBRARIES = $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) \ SYS_LIBRARIES = -lm -lgen #endif -#if defined(LinuxArchitecture) +#if defined(LinuxArchitecture) || defined(OpenBSDArchitecture) LOCAL_LIBRARIES = $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) \ $(XMLIB) $(XTOOLLIB) $(XLIB) SYS_LIBRARIES = -lm diff --git a/cde/programs/dtsr/dtsrclean.c b/cde/programs/dtsr/dtsrclean.c index e7ff7da95..fdd5d9d3d 100644 --- a/cde/programs/dtsr/dtsrclean.c +++ b/cde/programs/dtsr/dtsrclean.c @@ -1016,7 +1016,9 @@ int main (int argc, char *argv[]) signal (SIGKILL, signal_shutdown); /* this cannot be trapped */ signal (SIGALRM, signal_shutdown); signal (SIGTERM, signal_shutdown); +#ifdef SIGPWR signal (SIGPWR, signal_shutdown); +#endif #ifdef _AIX signal (SIGXCPU, signal_shutdown); signal (SIGDANGER, signal_shutdown); diff --git a/cde/programs/dtsr/tomita.c b/cde/programs/dtsr/tomita.c index d2db3027e..9e17c5004 100644 --- a/cde/programs/dtsr/tomita.c +++ b/cde/programs/dtsr/tomita.c @@ -701,7 +701,9 @@ static void deleter (char *infname) signal (SIGQUIT, kill_delete); signal (SIGTRAP, kill_delete); signal (SIGTERM, kill_delete); +#ifdef SIGPWR signal (SIGPWR, kill_delete); +#endif #ifdef _AIX signal (SIGXCPU, kill_delete); /* cpu time limit exceeded */ signal (SIGDANGER, kill_delete); /* imminent paging space diff --git a/cde/programs/dtterm/util/logger.c b/cde/programs/dtterm/util/logger.c index e7b43eeea..dc5c8cca1 100644 --- a/cde/programs/dtterm/util/logger.c +++ b/cde/programs/dtterm/util/logger.c @@ -72,7 +72,7 @@ main(int argc, char **argv) } /* init data... */ -#if defined(USL) || defined(__uxp__) || defined(linux) +#if defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) (void) memset((void *) &myaddr_in, (int) '\0', sizeof(myaddr_in)); #else (void) memset(myaddr_in, '\0', sizeof(myaddr_in)); @@ -146,7 +146,7 @@ logStartStop(char *progName, int logfd, int start) /* remove the trailing '\n'... */ tstring[strlen(tstring) - 1] = '\0'; - (void) sprintf(buffer, "%s: %s %s\n", + (void) snprintf(buffer, sizeof buffer, "%s: %s %s\n", (savedProgName && *savedProgName) ? savedProgName : "logger", start ? "starting" : "terminating", tstring); diff --git a/cde/programs/dtwm/Callback.c b/cde/programs/dtwm/Callback.c index f7259af0b..3ea47a4b6 100644 --- a/cde/programs/dtwm/Callback.c +++ b/cde/programs/dtwm/Callback.c @@ -58,6 +58,7 @@ #include #include #include +#include #include #include diff --git a/cde/programs/dtwm/DataBaseLoad.h b/cde/programs/dtwm/DataBaseLoad.h index 698a7c409..346cbfca8 100644 --- a/cde/programs/dtwm/DataBaseLoad.h +++ b/cde/programs/dtwm/DataBaseLoad.h @@ -484,6 +484,7 @@ struct _AnimationItem extern Boolean FrontPanelReadDatabases (void); extern void InitParse(char *, ElementValue **); extern void InitializeControlFields( ElementValue *element_values, char *); +extern void InitializeSubpanelFields (ElementValue * element_values); extern void _WriteControlElementValues(ElementValue *); extern void WriteControlComponentFile(ControlData *); extern void WriteSubpanelComponentFile(SubpanelData *); diff --git a/cde/programs/dtwm/Print.c b/cde/programs/dtwm/Print.c index 32155cc65..79cbc501f 100644 --- a/cde/programs/dtwm/Print.c +++ b/cde/programs/dtwm/Print.c @@ -42,6 +42,7 @@ #include
/* required for DtDbPathId type */ #include
#include
+#include
#include "DataBaseLoad.h" #include "Parse.h" diff --git a/cde/programs/dtwm/WmBackdrop.c b/cde/programs/dtwm/WmBackdrop.c index 0ee6501b0..f2783a5e9 100644 --- a/cde/programs/dtwm/WmBackdrop.c +++ b/cde/programs/dtwm/WmBackdrop.c @@ -45,6 +45,8 @@ static char rcsid[] = "" #define DTWM_NEED_BACKBITS #include "WmIBitmap.h" #include "WmBackdrop.h" +#include "WmError.h" +#include "WmProperty.h" #include #include #include @@ -54,6 +56,7 @@ static char rcsid[] = "" #include
#include
#include +#include #include #include #include diff --git a/cde/programs/dtwm/WmEvent.c b/cde/programs/dtwm/WmEvent.c index 40a8ab8b0..f643503b2 100644 --- a/cde/programs/dtwm/WmEvent.c +++ b/cde/programs/dtwm/WmEvent.c @@ -48,8 +48,10 @@ static char rcsid[] = "$XConsortium: WmEvent.c /main/7 1996/11/20 15:27:47 rswis * include extern functions */ #include "WmEvent.h" +#include "WmError.h" #ifdef WSM #include "WmBackdrop.h" +#include "WmWrkspace.h" #endif /* WSM */ #include "WmCDInfo.h" #include "WmCDecor.h" diff --git a/cde/programs/dtwm/WmFP.c b/cde/programs/dtwm/WmFP.c index 2df767918..48a810819 100644 --- a/cde/programs/dtwm/WmFP.c +++ b/cde/programs/dtwm/WmFP.c @@ -67,6 +67,7 @@ #include "UI.h" #include "WmPanelP.h" +#include "WmManage.h" #include #include diff --git a/cde/programs/dtwm/WmFeedback.c b/cde/programs/dtwm/WmFeedback.c index 1aeac4be8..6413b4f7d 100644 --- a/cde/programs/dtwm/WmFeedback.c +++ b/cde/programs/dtwm/WmFeedback.c @@ -43,7 +43,7 @@ static char rcsid[] = "$XConsortium: WmFeedback.c /main/6 1996/10/23 17:20:55 rs #define MWM_NEED_TIME16 #include "WmBitmap.h" - +#include "WmError.h" #include #include #include diff --git a/cde/programs/dtwm/WmFunction.c b/cde/programs/dtwm/WmFunction.c index c8e9b5b33..22a9d56cc 100644 --- a/cde/programs/dtwm/WmFunction.c +++ b/cde/programs/dtwm/WmFunction.c @@ -108,7 +108,7 @@ static unsigned int GetEventInverseMask(XEvent *event); #ifdef WSM -#if (defined(USL) || defined(__uxp__) || defined(linux)) && !defined(_NFILE) +#if (defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED)) && !defined(_NFILE) #define _NFILE FOPEN_MAX #endif #define CLOSE_FILES_ON_EXEC() \ diff --git a/cde/programs/dtwm/WmHelp.c b/cde/programs/dtwm/WmHelp.c index 8e80b06fa..f37d2ec65 100644 --- a/cde/programs/dtwm/WmHelp.c +++ b/cde/programs/dtwm/WmHelp.c @@ -44,7 +44,10 @@ static char rcsid[] = "" #include "WmGlobal.h" #include "WmError.h" +#include "WmFunction.h" #include "WmHelp.h" +#include "WmCDecor.h" +#include "WmResParse.h" #ifdef PANELIST #include "WmPanelP.h" #endif /* PANELIST */ diff --git a/cde/programs/dtwm/WmICCC.h b/cde/programs/dtwm/WmICCC.h index 2e02c7b53..a55ac3606 100644 --- a/cde/programs/dtwm/WmICCC.h +++ b/cde/programs/dtwm/WmICCC.h @@ -31,6 +31,8 @@ /* * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ +#ifndef _Dt_WmICCC_h_ +#define _Dt_WmICCC_h_ /* * Included Files: */ @@ -143,3 +145,4 @@ typedef struct _PropWMState /* PropWMState state field value: */ #define WithdrawnSTATE 0 +#endif /* _Dt_WmICCC_h_ */ diff --git a/cde/programs/dtwm/WmIPC.c b/cde/programs/dtwm/WmIPC.c index 0a7a8f106..331f43bc3 100644 --- a/cde/programs/dtwm/WmIPC.c +++ b/cde/programs/dtwm/WmIPC.c @@ -38,7 +38,9 @@ static char rcsid[] = "" * Included Files: */ #include "WmGlobal.h" +#include "WmProtocol.h" #include +#include
#include
#include
#include
@@ -51,6 +53,8 @@ static char rcsid[] = "" #include "WmFunction.h" #include "WmWrkspace.h" #include "WmIPC.h" +#include "WmXSMP.h" +#include "WmPanelP.h" #include "DataBaseLoad.h" diff --git a/cde/programs/dtwm/WmIconBox.h b/cde/programs/dtwm/WmIconBox.h index 37d22a613..0f83b1a7a 100644 --- a/cde/programs/dtwm/WmIconBox.h +++ b/cde/programs/dtwm/WmIconBox.h @@ -43,6 +43,7 @@ extern void CheckIconBoxResize (ClientData *pCD, unsigned int changedValues, extern Boolean CheckIconBoxSize (IconBoxData *pIBD); extern void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD); extern void DeleteIconInfo (IconBoxData *pIBD, ClientData *pCD); +extern void DestroyIconBox (WmWorkspaceData *pWS); extern Boolean ExpandVirtualSpace (IconBoxData *pIBD, int newWidth, int newHeight); extern Boolean ExtendIconList (IconBoxData *pIBD, int incr); @@ -60,6 +61,13 @@ extern void IconScrollVisibleCallback (Widget w, caddr_t client_data, #endif extern void IconActivateCallback (Widget w, caddr_t client_data, XmAnyCallbackStruct *call_data); +#ifdef PANELIST +extern void IconBoxPopUp (WmWorkspaceData *pWS, Boolean up); +extern Boolean IconBoxShowing (WmWorkspaceData *pWS); +#else /* PANELIST */ +extern void IconBoxPopUp (WmWorkspaceData *pWS, ControlWindowStruct *pCW, Boolean up); +extern Boolean IconBoxShowing (WmWorkspaceData *pWS, ControlWindowStruct *pCW); +#endif /* PANELIST */ extern Boolean IconVisible (ClientData *pCD); extern IconInfo *InsertIconInfo (IconBoxData *pIBD, ClientData *pCD, Widget theWidget); diff --git a/cde/programs/dtwm/WmImage.c b/cde/programs/dtwm/WmImage.c index bd9707980..29f722145 100644 --- a/cde/programs/dtwm/WmImage.c +++ b/cde/programs/dtwm/WmImage.c @@ -255,7 +255,7 @@ Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName) } else { - mask = _DtGetMask (XtScreen(PSD_FOR_CLIENT(pCD)->screenTopLevelW1), + mask = XmeGetMask (XtScreen(PSD_FOR_CLIENT(pCD)->screenTopLevelW1), (sIconFileName == NULL) ? iconName : sIconFileName); if (mask == XmUNSPECIFIED_PIXMAP) { diff --git a/cde/programs/dtwm/WmInitWs.c b/cde/programs/dtwm/WmInitWs.c index 2f77f9a50..d040cce14 100644 --- a/cde/programs/dtwm/WmInitWs.c +++ b/cde/programs/dtwm/WmInitWs.c @@ -59,6 +59,7 @@ static char rcsid[] = "$TOG: WmInitWs.c /main/18 1999/09/20 15:18:22 mgreess $" #include #include #include +#include #include #include #include @@ -78,6 +79,7 @@ typedef struct #ifdef WSM #include
#include
+#include
#include
#include
#include
@@ -2677,6 +2679,8 @@ VirtKeys4DIN( if( !prop_existed ) { bindingsString = NULL ; + /* FIXME: this is an unexported openmotif procedure */ + extern void _XmVirtKeysLoadFallbackBindings(Display *dsp, String *binding); _XmVirtKeysLoadFallbackBindings( dsp, &bindingsString) ; XtFree( bindingsString) ; diff --git a/cde/programs/dtwm/WmOL.c b/cde/programs/dtwm/WmOL.c index 5708a2a92..f40fe7701 100644 --- a/cde/programs/dtwm/WmOL.c +++ b/cde/programs/dtwm/WmOL.c @@ -37,6 +37,8 @@ static char rcsid[] = "$XConsortium: WmOL.c /main/4 1995/11/01 11:45:08 rswiston */ #include "WmGlobal.h" #include "WmOL.h" +#include "WmProperty.h" +#include #define ValidPropertyList(pcd) ((pcd)->paInitialProperties != NULL) diff --git a/cde/programs/dtwm/WmOL.h b/cde/programs/dtwm/WmOL.h index 8936c1161..e3af6e2dc 100644 --- a/cde/programs/dtwm/WmOL.h +++ b/cde/programs/dtwm/WmOL.h @@ -122,6 +122,9 @@ extern Boolean HasOpenLookHints( ClientData *pCD ); extern OLWinAttr * GetOLWinAttr( ClientData *pCD ); extern Boolean GetOLDecorFlags(ClientData *pCD, Atom property, unsigned long *pDecor); +extern void InitOLCompat(void); +extern void ProcessOLDecoration(ClientData *pCD); + /* diff --git a/cde/programs/dtwm/WmParse.c b/cde/programs/dtwm/WmParse.c index 6b76c2beb..21ec75184 100644 --- a/cde/programs/dtwm/WmParse.c +++ b/cde/programs/dtwm/WmParse.c @@ -66,6 +66,7 @@ static char rcsid[] = "$XConsortium: WmParse.c /main/5 1996/10/30 11:36:06 drk $ #ifdef MULTIBYTE #include #endif /* MULTIBYTE */ +#include /* * Internal routines diff --git a/cde/programs/dtwm/WmPresence.c b/cde/programs/dtwm/WmPresence.c index ece105b62..c1b2f8411 100644 --- a/cde/programs/dtwm/WmPresence.c +++ b/cde/programs/dtwm/WmPresence.c @@ -38,6 +38,7 @@ static char rcsid[] = "$XConsortium: WmPresence.c /main/7 1996/10/23 17:24:56 rs #include "WmGlobal.h" #include "WmResNames.h" #include "WmHelp.h" +#include "WmError.h" #include #include @@ -47,6 +48,7 @@ static char rcsid[] = "$XConsortium: WmPresence.c /main/7 1996/10/23 17:24:56 rs #include #include #include +#include #include #include #include diff --git a/cde/programs/dtwm/WmProperty.h b/cde/programs/dtwm/WmProperty.h index 256900569..b86af3285 100644 --- a/cde/programs/dtwm/WmProperty.h +++ b/cde/programs/dtwm/WmProperty.h @@ -30,6 +30,7 @@ /* $XConsortium: WmProperty.h /main/4 1995/11/01 11:48:54 rswiston $ */ /* * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */ +#include "WmICCC.h" extern SizeHints * GetNormalHints (ClientData *pCD); extern void ProcessWmProtocols (ClientData *pCD); @@ -38,6 +39,9 @@ extern void SetMwmInfo (Window propWindow, long flags, Window wmWindow); #ifdef WSM void SetMwmSaveSessionInfo (Window wmWindow); #endif /* WSM */ +extern void GetDtWmRequest (WmScreenData *pSD, char **pszReq, Boolean *pmore); +extern void GetDtSessionHints (WmScreenData *pSD, int sNum); + extern PropWMState * GetWMState (Window window); extern void SetWMState (Window window, int state, Window icon); extern PropMwmHints * GetMwmHints (ClientData *pCD); diff --git a/cde/programs/dtwm/WmResParse.c b/cde/programs/dtwm/WmResParse.c index 0331c369a..717f6fcfc 100644 --- a/cde/programs/dtwm/WmResParse.c +++ b/cde/programs/dtwm/WmResParse.c @@ -7315,6 +7315,9 @@ void ProcessMotifBindings (void) XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0), XInternAtom (DISPLAY, "_MOTIF_DEFAULT_BINDINGS", False)); + /* FIXME: unexported openmotif procedures */ + extern Boolean _XmVirtKeysLoadFileBindings(Display *dsp, String *binding); + extern void _XmVirtKeysLoadFallbackBindings(Display *dsp, String *binding); if (_XmVirtKeysLoadFileBindings (fileName, &bindings) == True) { XChangeProperty (DISPLAY, RootWindow(DISPLAY, 0), XInternAtom (DISPLAY, "_MOTIF_BINDINGS", False), @@ -7504,11 +7507,11 @@ SystemCmd (char *pchCmd) sa.sa_flags = 0; sa.sa_handler = SIG_DFL; - (void) sigaction (SIGCLD, &sa, &osa); + (void) sigaction (SIGCHLD, &sa, &osa); system (pchCmd); - (void) sigaction (SIGCLD, &osa, (struct sigaction *) 0); + (void) sigaction (SIGCHLD, &osa, (struct sigaction *) 0); } diff --git a/cde/programs/dtwm/WmResParse.h b/cde/programs/dtwm/WmResParse.h index 60e266f7a..406030810 100644 --- a/cde/programs/dtwm/WmResParse.h +++ b/cde/programs/dtwm/WmResParse.h @@ -48,9 +48,9 @@ extern Boolean FindDtSessionMatch(int commandArgc, WmScreenData *pSD, char **pWorkSpaceList, char *clientMachine); -extern void WmDtGetHelprgs(char *args, - unsigned char** volume, - unsigned char** topic, +extern void WmDtGetHelpArgs(char *args, + unsigned char* volume, + unsigned char* topic, int *argsCount); extern void GetActionIndex (int tableSize, int *actionIndex); extern void GetFunctionTableValues (int *execIndex, int *nopIndex, diff --git a/cde/programs/dtwm/WmResource.h b/cde/programs/dtwm/WmResource.h index 2bd4d952e..227183070 100644 --- a/cde/programs/dtwm/WmResource.h +++ b/cde/programs/dtwm/WmResource.h @@ -46,6 +46,7 @@ extern void SetStdGlobalResourceValues (void); extern void ProcessScreenListResource (void); extern void ProcessAppearanceResources (WmScreenData *pSD); extern void ProcessGlobalScreenResources (void); +extern void ProcessPresenceResources (WmScreenData *pSD); extern void ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName); #ifdef WSM extern void ProcessWorkspaceList (WmScreenData *pSD); diff --git a/cde/programs/dtwm/WmWinState.c b/cde/programs/dtwm/WmWinState.c index 94040a5fc..9e63a4b2d 100644 --- a/cde/programs/dtwm/WmWinState.c +++ b/cde/programs/dtwm/WmWinState.c @@ -42,6 +42,7 @@ static char rcsid[] = "$XConsortium: WmWinState.c /main/6 1996/06/20 09:39:39 rs #include "WmGlobal.h" #include "WmICCC.h" #include "WmProtocol.h" +#include "WmIPC.h" /* diff --git a/cde/programs/dtwm/WmWrkspace.c b/cde/programs/dtwm/WmWrkspace.c index 8ded58f0c..ae3d0f2b3 100644 --- a/cde/programs/dtwm/WmWrkspace.c +++ b/cde/programs/dtwm/WmWrkspace.c @@ -42,9 +42,11 @@ static char rcsid[] = "$XConsortium: WmWrkspace.c /main/7 1996/10/23 17:26:33 rs #include "WmHelp.h" #include "WmResNames.h" #include "WmIPlace.h" +#include "WmInitWs.h" #include #include "WmICCC.h" #include +#include #include
#include
#include diff --git a/cde/programs/dtwm/WmWrkspace.h b/cde/programs/dtwm/WmWrkspace.h index 9df7edf94..15328a202 100644 --- a/cde/programs/dtwm/WmWrkspace.h +++ b/cde/programs/dtwm/WmWrkspace.h @@ -39,6 +39,7 @@ static char rcsid[] = "" extern void ChangeToWorkspace( WmWorkspaceData *pNewWS) ; +extern void ChangeWorkspaceTitle( WmWorkspaceData *pWS, char * pchTitle); extern Boolean DuplicateWorkspaceName ( WmScreenData *pSD, unsigned char *name, diff --git a/cde/programs/localized/templates/French.tmpl b/cde/programs/localized/templates/French.tmpl index 7e029390f..0bc6c9686 100644 --- a/cde/programs/localized/templates/French.tmpl +++ b/cde/programs/localized/templates/French.tmpl @@ -31,6 +31,6 @@ LANG=fr LANG=fr #endif -#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) LANG=fr_FR.ISO8859-1 #endif diff --git a/cde/programs/localized/templates/German.tmpl b/cde/programs/localized/templates/German.tmpl index 890b333a0..53be70f2c 100644 --- a/cde/programs/localized/templates/German.tmpl +++ b/cde/programs/localized/templates/German.tmpl @@ -31,6 +31,6 @@ LANG=de LANG=de #endif -#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) LANG=de_DE.ISO8859-1 #endif diff --git a/cde/programs/localized/templates/Italian.tmpl b/cde/programs/localized/templates/Italian.tmpl index ccc368beb..4e8f24333 100644 --- a/cde/programs/localized/templates/Italian.tmpl +++ b/cde/programs/localized/templates/Italian.tmpl @@ -31,6 +31,6 @@ LANG=it LANG=it #endif -#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) LANG=it_IT.ISO8859-1 #endif diff --git a/cde/programs/localized/templates/Spanish.tmpl b/cde/programs/localized/templates/Spanish.tmpl index 532d01eaf..69d1fb3b1 100644 --- a/cde/programs/localized/templates/Spanish.tmpl +++ b/cde/programs/localized/templates/Spanish.tmpl @@ -31,6 +31,6 @@ LANG=es LANG=es #endif -#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) LANG=es_ES.ISO8859-1 #endif diff --git a/cde/programs/localized/templates/app-defaults.tmpl b/cde/programs/localized/templates/app-defaults.tmpl index c835823e0..9198b0204 100644 --- a/cde/programs/localized/templates/app-defaults.tmpl +++ b/cde/programs/localized/templates/app-defaults.tmpl @@ -8,7 +8,7 @@ SHELL=/bin/ksh .NO_PARALLEL: #endif -#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd DTINFO= #else @@ -56,7 +56,7 @@ LinkFile(Dtcm.nls,$(CDESRC)/dtcm/dtcm/Dtcm.ad) LinkFile(Dtterm.nls,$(CDESRC)/dtterm/Dtterm.ad) LinkFile(Dtmail.nls,$(CDESRC)/dtmail/dtmail/Dtmail) LinkFile(Dtbuilder.nls,$(CDESRC)/dtappbuilder/src/ab/Dtbuilder.ad) -#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) +#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) && !defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd LinkFile(Dtinfo.nls,$(CDESRC)/dtinfo/dtinfo/src/Dtinfo) #endif @@ -80,7 +80,7 @@ DtstyleDescRule(Dtcm,Dtcm) DtstyleDescRule(Dtterm,Dtterm) DtstyleDescRule(Dtmail,Dtmail) DtstyleDescRule(Dtbuilder,Dtbuilder) -#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) +#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) && !defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd DtstyleDescRule(Dtinfo,Dtinfo) #endif diff --git a/cde/programs/localized/templates/msg.C.tmpl b/cde/programs/localized/templates/msg.C.tmpl index aa1a88ddd..eeb4fc94b 100644 --- a/cde/programs/localized/templates/msg.C.tmpl +++ b/cde/programs/localized/templates/msg.C.tmpl @@ -8,7 +8,7 @@ SHELL=/bin/ksh .NO_PARALLEL: #endif -#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd DTINFOCATS= #else @@ -93,7 +93,7 @@ LinkFile(dthelpgen.msg,$(CDESRC)/dthelp/dthelpgen/dthelpgen.msg) LinkFile(dthelpprint.msg,$(CDESRC)/dthelp/dthelpprint/dthelpprint.msg) LinkFile(dticon.msg,$(CDESRC)/dticon/dticon.msg) LinkFile(dtimsstart.msg,$(CDESRC)/dtimsstart/dtimsstart.msg) -#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) +#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) && !defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd LinkFile(dtinfo.msg,$(CDESRC)/dtinfo/dtinfo/src/dtinfo.msg.updated) LinkFile(dtinfo_start.msg,$(CDESRC)/dtinfo/clients/dtinfo_start/dtinfo_start.msg) diff --git a/cde/programs/localized/templates/types.tmpl b/cde/programs/localized/templates/types.tmpl index f20d20978..4deea4a3c 100644 --- a/cde/programs/localized/templates/types.tmpl +++ b/cde/programs/localized/templates/types.tmpl @@ -4,7 +4,7 @@ XCOMM $TOG: types.tmpl /main/9 1998/08/05 18:05:45 mgreess $ SHELL=/bin/ksh #endif -#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) +#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd DTINFODT= #else @@ -63,7 +63,7 @@ LinkFile(datatypes.dt.nls,$(CDESRC)/types/datatypes.dt) LinkFile(dtappman.dt.nls,$(CDESRC)/types/dtappman.dt) LinkFile(dtfile.dt.nls,$(CDESRC)/types/dtfile.dt) LinkFile(dtims.dt.nls,$(CDESRC)/types/dtims.dt) -#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) +#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) && !defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd LinkFile(dtinfo.dt.nls,$(CDESRC)/types/dtinfo.dt) #endif @@ -99,7 +99,7 @@ LinkFile(datatypes.dt.tmsg,_common.dt.tmsg) LinkFile(dtappman.dt.tmsg,_common.dt.tmsg) LinkFile(dtfile.dt.tmsg,_common.dt.tmsg) LinkFile(dtims.dt.tmsg,_common.dt.tmsg) -#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) +#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) && !defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd LinkFile(dtinfo.dt.tmsg,_common.dt.tmsg) #endif @@ -134,7 +134,7 @@ DtstyleDescRule(datatypes.dt,datatypes.dt) DtstyleDescRule(dtappman.dt,dtappman.dt) DtstyleDescRule(dtfile.dt,dtfile.dt) DtstyleDescRule(dtims.dt,dtims.dt) -#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) +#if !defined(LinuxArchitecture) && !defined(FreeBSDArchitecture) && !defined(OpenBSDArchitecture) XCOMM no dtinfo for linux/fbsd DtstyleDescRule(dtinfo.dt,dtinfo.dt) #endif diff --git a/cde/programs/nsgmls/CmdLineApp.C b/cde/programs/nsgmls/CmdLineApp.C index b2f74684f..4ba7cbcbc 100644 --- a/cde/programs/nsgmls/CmdLineApp.C +++ b/cde/programs/nsgmls/CmdLineApp.C @@ -58,7 +58,7 @@ #include "ConsoleOutput.h" -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #include using namespace std; @@ -292,7 +292,7 @@ Boolean CmdLineApp::openFilebufWrite(filebuf &file, return 0; return file.attach(fd) != 0; #else -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) return file.open(filename, ios::out|ios::trunc) != 0; #else return file.open(filename, ios::out|ios::trunc|IOS_BINARY) != 0; diff --git a/cde/programs/nsgmls/CmdLineApp.h b/cde/programs/nsgmls/CmdLineApp.h index 98f57736d..45d505f13 100644 --- a/cde/programs/nsgmls/CmdLineApp.h +++ b/cde/programs/nsgmls/CmdLineApp.h @@ -43,7 +43,7 @@ #include #endif -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include using namespace std; #else diff --git a/cde/programs/nsgmls/CodingSystem.C b/cde/programs/nsgmls/CodingSystem.C index ad7935a76..6f9e52074 100644 --- a/cde/programs/nsgmls/CodingSystem.C +++ b/cde/programs/nsgmls/CodingSystem.C @@ -33,7 +33,7 @@ #ifdef SP_SHORT_HEADERS #include #else -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include @@ -82,7 +82,7 @@ String OutputCodingSystem::convertOut(const StringC &str) const encoder->output(copy.data(), copy.size(), &stream); delete encoder; char *s = stream.str(); -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) String result(s, stream.pcount()); #else String result(s, stream.out_waiting()); diff --git a/cde/programs/nsgmls/CodingSystem.h b/cde/programs/nsgmls/CodingSystem.h index e073ae5cf..62adbd0cc 100644 --- a/cde/programs/nsgmls/CodingSystem.h +++ b/cde/programs/nsgmls/CodingSystem.h @@ -41,7 +41,7 @@ #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include using namespace std; #else diff --git a/cde/programs/nsgmls/Imakefile b/cde/programs/nsgmls/Imakefile index 1255a3dd6..a4f422771 100644 --- a/cde/programs/nsgmls/Imakefile +++ b/cde/programs/nsgmls/Imakefile @@ -77,7 +77,7 @@ STLIBCENV = M4 = /bin/m4 #endif -#if defined(LinuxArchitecture) +#if defined(LinuxArchitecture) || defined(OpenBSDArchitecture) /* * put cpp directives here rather than in CXXDEFINES because diff --git a/cde/programs/nsgmls/OutputCharStream.C b/cde/programs/nsgmls/OutputCharStream.C index fd1f75846..1739437a3 100644 --- a/cde/programs/nsgmls/OutputCharStream.C +++ b/cde/programs/nsgmls/OutputCharStream.C @@ -28,7 +28,7 @@ #include "OutputCharStream.h" #include "CodingSystem.h" #include "macros.h" -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include @@ -148,7 +148,7 @@ void IosOutputCharStream::flush() encoder_->output(buf_, ptr_ - buf_, byteStream_); ptr_ = buf_; } -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) byteStream_->pubsync(); #else byteStream_->sync(); diff --git a/cde/programs/nsgmls/OutputCharStream.h b/cde/programs/nsgmls/OutputCharStream.h index 15088bb48..7551bfd7c 100644 --- a/cde/programs/nsgmls/OutputCharStream.h +++ b/cde/programs/nsgmls/OutputCharStream.h @@ -33,7 +33,7 @@ #include "Owner.h" #include "CodingSystem.h" -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include using namespace std; #else diff --git a/cde/programs/nsgmls/config.h b/cde/programs/nsgmls/config.h index 7859a9c42..2f7bcc907 100644 --- a/cde/programs/nsgmls/config.h +++ b/cde/programs/nsgmls/config.h @@ -32,7 +32,7 @@ #ifdef __GNUG__ // It's not missing, but it pulls in libg++ -#if !defined(linux) +#if !defined(linux) && !defined(CSRG_BASED) #define SP_NEW_H_MISSING // set_new_handler() has to be declared extern "C" #define SP_SET_NEW_HANDLER_EXTERN_C diff --git a/cde/programs/nsgmls/entmgr_inst.m4 b/cde/programs/nsgmls/entmgr_inst.m4 index 79a9784d7..20002a844 100644 --- a/cde/programs/nsgmls/entmgr_inst.m4 +++ b/cde/programs/nsgmls/entmgr_inst.m4 @@ -61,7 +61,6 @@ __instantiate(`RangeMapIter') __instantiate(`RangeMap') __instantiate(Vector) __instantiate(Vector) -__instantiate(Vector >) __instantiate(Owner) __instantiate(ISet) __instantiate(Vector >) @@ -71,16 +70,11 @@ __instantiate(ISetIter) __instantiate(Vector >) __instantiate(SubstTable) __instantiate(SharedXcharMap) -__instantiate(SharedXcharMap) __instantiate(SharedXcharMap) -__instantiate(String) __instantiate(String) __instantiate(XcharMap) -__instantiate(XcharMap) __instantiate(XcharMap) __instantiate(Vector) -__instantiate(Vector) -__instantiate(SubstTable) #ifdef SP_NAMESPACE } diff --git a/cde/programs/nsgmls/nsgmls.C b/cde/programs/nsgmls/nsgmls.C index c1ec86085..f9490f21e 100644 --- a/cde/programs/nsgmls/nsgmls.C +++ b/cde/programs/nsgmls/nsgmls.C @@ -38,7 +38,7 @@ #include "sptchar.h" #include "macros.h" -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #include #else @@ -84,7 +84,7 @@ public: const AppChar *filename, const StringC &filenameStr, const OutputCodingSystem *, -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) ::Messenger *messenger); #else Messenger *messenger); @@ -94,7 +94,7 @@ public: void truncateOutput(); void allLinkTypesActivated(); private: -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) ::Messenger *messenger_; #else Messenger *messenger_; @@ -248,7 +248,7 @@ XRastEventHandler::XRastEventHandler(SgmlParser *parser, const AppChar *filename, const StringC &filenameStr, const OutputCodingSystem *codingSystem, -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) ::Messenger *messenger) #else ::Messenger *messenger) diff --git a/cde/programs/nsgmls/xnew.h b/cde/programs/nsgmls/xnew.h index caffae69d..96596397f 100644 --- a/cde/programs/nsgmls/xnew.h +++ b/cde/programs/nsgmls/xnew.h @@ -39,7 +39,7 @@ void set_new_handler(VFP); #else /* not SP_NEW_H_MISSING */ -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include diff --git a/cde/programs/ttsnoop/DtTt.C b/cde/programs/ttsnoop/DtTt.C index 26315dd0c..0f55c754b 100644 --- a/cde/programs/ttsnoop/DtTt.C +++ b/cde/programs/ttsnoop/DtTt.C @@ -34,7 +34,7 @@ #include #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include @@ -468,7 +468,7 @@ DtTtSetLabel( ) { Tt_status status = tt_ptr_error( val ); - ostrstream errStream; + std::ostrstream errStream; errStream << func << " = " << val << " (" << status << ")" << ends; char *label = errStream.str(); DtTtSetLabel( labelWidget, label ); @@ -483,7 +483,7 @@ DtTtSetLabel( Tt_status status ) { - ostrstream errStream; + std::ostrstream errStream; errStream << func << " = " << status << ends; char *label = errStream.str(); DtTtSetLabel( labelWidget, label ); @@ -498,7 +498,7 @@ DtTtSetLabel( int returnVal ) { - ostrstream errStream; + std::ostrstream errStream; errStream << func << " = " << returnVal << ends; char *label = errStream.str(); DtTtSetLabel( labelWidget, label ); @@ -519,7 +519,7 @@ _DtTtChoices( return 0; } for (int i = 0; i < count; i++) { - ostrstream itemStream; + std::ostrstream itemStream; itemStream << (void *)pPats[ i ]; char *name = (char *) tt_pattern_user( *pPats[ i ], _DtTtPatsNameKey ); @@ -566,7 +566,7 @@ _DtTtChoices( } *itemCount = dtTtMessagesCount; for (i = 0; i < dtTtMessagesCount; i++) { - ostrstream itemStream; + std::ostrstream itemStream; itemStream << (void *)dtTtMessages[ i ]; char *op = tt_message_op( dtTtMessages[ i ] ); if (! tt_is_err( tt_ptr_error( op ))) { @@ -592,7 +592,7 @@ _DtTtChoices( } *itemCount = dtTtPatternsCount; for (i = 0; i < dtTtPatternsCount; i++) { - ostrstream itemStream; + std::ostrstream itemStream; itemStream << (void *)dtTtPatterns[ i ] << ends; items[ i ] = XmStringCreateLocalized( itemStream.str() ); @@ -636,11 +636,11 @@ _DtOpen( ) { char *file = tempnam( 0, AIX_CONST_STRING tempnamTemplate ); - ostrstream cmdStream; + std::ostrstream cmdStream; cmdStream << cmd << " > " << file << ends; int sysStat = system( cmdStream.str() ); if (! WIFEXITED( sysStat )) { - ostrstream func; + std::ostrstream func; func << "system( \"" << cmdStream.str() << "\" )" << ends; DtTtSetLabel( label, func.str(), sysStat ); delete cmdStream.str(); @@ -662,12 +662,12 @@ _DtOpen( const char * file ) { - ostrstream labelStream; + std::ostrstream labelStream; labelStream << "dtaction Open " << file << ends; DtTtSetLabel( label, labelStream.str() ); delete labelStream.str(); - ostrstream cmd; + std::ostrstream cmd; cmd << "( unset TT_TRACE_SCRIPT; if dtaction Open " << file << "; then :; else textedit " << file << "; fi; sleep 600; rm -f " << file << " ) &" << ends; @@ -699,12 +699,12 @@ _DtMan( const char * topic ) { - ostrstream labelStream; + std::ostrstream labelStream; labelStream << "dtaction Dtmanpageview " << topic << ends; DtTtSetLabel( label, labelStream.str() ); delete labelStream.str(); - ostrstream cmd; + std::ostrstream cmd; cmd << "unset TT_TRACE_SCRIPT; if dtaction Dtmanpageview " << topic << "; then :; else cmdtool -c man " << topic << "; fi &" << ends; system( cmd.str() ); diff --git a/cde/programs/ttsnoop/callbackChooser_stubs.C.src b/cde/programs/ttsnoop/callbackChooser_stubs.C.src index a67436b8c..490c217b7 100644 --- a/cde/programs/ttsnoop/callbackChooser_stubs.C.src +++ b/cde/programs/ttsnoop/callbackChooser_stubs.C.src @@ -40,7 +40,7 @@ *** Add include files, types, macros, externs, and user functions here. ***/ -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #include #else @@ -50,7 +50,7 @@ #include "DtTt.h" -extern ofstream snoopStream; +extern std::ofstream snoopStream; typedef enum { DoJustPrint, diff --git a/cde/programs/ttsnoop/fileChooser_stubs.C.src b/cde/programs/ttsnoop/fileChooser_stubs.C.src index bb8c46148..051caa8c0 100644 --- a/cde/programs/ttsnoop/fileChooser_stubs.C.src +++ b/cde/programs/ttsnoop/fileChooser_stubs.C.src @@ -39,7 +39,7 @@ #include #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #include #else @@ -61,7 +61,7 @@ extern XtPointer _XmStringUngenerate (XmString string, XmTextType output_type); } -extern ofstream snoopStream; +extern std::ofstream snoopStream; extern int globalTimeout; typedef struct _FileChooserInfo { @@ -217,7 +217,7 @@ fileOkayed( XtVaGetValues( instance->fchooser, XmNuserData, &xtPtr, 0 ); FileChooserInfo *info = (FileChooserInfo *)xtPtr; Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label; - ostrstream script; + std::ostrstream script; switch (info->choice) { Tt_pattern *pats; Tt_message msg; @@ -305,7 +305,7 @@ fileOkayed( break; } if (WEXITSTATUS( ival ) != 0) { - ostrstream diagnosis; + std::ostrstream diagnosis; diagnosis << "tt_type_comp -p: syntax error in " << path << ends; DtTtSetLabel( label, diagnosis.str() ); diff --git a/cde/programs/ttsnoop/messageProps_stubs.C.src b/cde/programs/ttsnoop/messageProps_stubs.C.src index 9a1395808..bcc152c4c 100644 --- a/cde/programs/ttsnoop/messageProps_stubs.C.src +++ b/cde/programs/ttsnoop/messageProps_stubs.C.src @@ -40,7 +40,7 @@ *** Add include files, types, macros, externs, and user functions here. ***/ -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include @@ -620,7 +620,7 @@ DtTtMessageWidgetCreate( } } - ostrstream labelStream; + std::ostrstream labelStream; labelStream << "Tt_message " << (void *)msg; XtVaSetValues( instance->messageProps, XmNtitle, labelStream.str(), @@ -1408,7 +1408,7 @@ msgGenAction( /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ - ostrstream action; // XXX when to delete .str()? + std::ostrstream action; // XXX when to delete .str()? DtbMessagePropsMessagePropsInfo instance = (DtbMessagePropsMessagePropsInfo)clientData; Tt_message msg = messageProps2Msg( instance ); @@ -1475,7 +1475,7 @@ msgGenC( /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ - ostrstream code; // XXX when to delete .str()? + std::ostrstream code; // XXX when to delete .str()? DtbMessagePropsMessagePropsInfo instance = (DtbMessagePropsMessagePropsInfo)clientData; Tt_message msg = messageProps2Msg( instance ); @@ -1878,7 +1878,7 @@ genObserver( /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/ /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ - ostrstream ptype; // XXX when to delete .str()? + std::ostrstream ptype; // XXX when to delete .str()? DtbMessagePropsMessagePropsInfo instance = (DtbMessagePropsMessagePropsInfo)clientData; Tt_message msg = messageProps2Msg( instance ); diff --git a/cde/programs/ttsnoop/patternProps_stubs.C.src b/cde/programs/ttsnoop/patternProps_stubs.C.src index f7a7ce5f5..4ca4f9c0b 100644 --- a/cde/programs/ttsnoop/patternProps_stubs.C.src +++ b/cde/programs/ttsnoop/patternProps_stubs.C.src @@ -40,7 +40,7 @@ *** Add include files, types, macros, externs, and user functions here. ***/ -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include @@ -371,7 +371,7 @@ DtTtPatternWidgetCreate( } } - ostrstream labelStream; + std::ostrstream labelStream; labelStream << "Tt_pattern " << (void *)pat << ends; XtVaSetValues( instance->patternProps, XmNtitle, labelStream.str(), diff --git a/cde/programs/ttsnoop/sessionChooser_stubs.C.src b/cde/programs/ttsnoop/sessionChooser_stubs.C.src index 8a748854f..cc9562971 100644 --- a/cde/programs/ttsnoop/sessionChooser_stubs.C.src +++ b/cde/programs/ttsnoop/sessionChooser_stubs.C.src @@ -42,7 +42,7 @@ #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #include #else @@ -52,7 +52,7 @@ #include "DtTt.h" -extern ofstream snoopStream; +extern std::ofstream snoopStream; void _DtSessionChooserSet( diff --git a/cde/programs/ttsnoop/ttChooser_stubs.C.src b/cde/programs/ttsnoop/ttChooser_stubs.C.src index 4c7711d8f..2592b3a6c 100644 --- a/cde/programs/ttsnoop/ttChooser_stubs.C.src +++ b/cde/programs/ttsnoop/ttChooser_stubs.C.src @@ -42,7 +42,7 @@ #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #else #include @@ -213,7 +213,7 @@ _DtTtChooserSet( XmTextFieldSetString( instance->chooserText, 0 ); XtVaSetValues( instance->chooser, XmNtitle, title, 0 ); - ostrstream valuesStream; + std::ostrstream valuesStream; valuesStream << itemCount << " " << valuesLabel; if (itemCount != 1) valuesStream << "s"; valuesStream << ends; @@ -314,7 +314,7 @@ choiceSelected( break; } void *entity = DtTtNth( type, info->item_position - 1 ); - ostrstream entityName; + std::ostrstream entityName; if (isString) { entityName << (char *)entity << ends; } else { diff --git a/cde/programs/ttsnoop/ttsnoop.C.src b/cde/programs/ttsnoop/ttsnoop.C.src index e63e20684..d457bbe88 100644 --- a/cde/programs/ttsnoop/ttsnoop.C.src +++ b/cde/programs/ttsnoop/ttsnoop.C.src @@ -63,7 +63,7 @@ #include #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #include #include @@ -112,8 +112,8 @@ unsigned int snoopedArgsCount = 0; char * optTraceScript = 0; String apiTracerArgv[ 10 ]; String snooperArgv[ 10 ]; -ostrstream tttraceCmd; -ofstream snoopStream; +std::ostrstream tttraceCmd; +std::ofstream snoopStream; // Xt squats on -tf ?! XXX const char Usage[] = @@ -196,7 +196,7 @@ signalHandler( } } -#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__osf__) || defined(linux) +#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #if !defined(SIG_PF) typedef void (*sig_pf_t)(int); #define SIG_PF sig_pf_t @@ -208,7 +208,7 @@ _tt_sigset( int sig, SIG_PF handler ) { -#if defined(hpux) || defined(linux) +#if defined(hpux) || defined(linux) || defined(CSRG_BASED) struct sigaction act; act.sa_handler = handler; sigemptyset(&act.sa_mask); @@ -670,7 +670,7 @@ main(int argc, char **argv) } Tt_status status; snoopStream.open( snoopFile, ios::app ); - ostrstream envStr; + std::ostrstream envStr; envStr << "TT_TRACE_SCRIPT=> "; envStr << traceFile << ends; traceScript = envStr.str(); diff --git a/cde/programs/ttsnoop/ttsnoop_stubs.C.src b/cde/programs/ttsnoop/ttsnoop_stubs.C.src index 3abc2eb02..3d0938944 100644 --- a/cde/programs/ttsnoop/ttsnoop_stubs.C.src +++ b/cde/programs/ttsnoop/ttsnoop_stubs.C.src @@ -37,7 +37,7 @@ #include -#if defined(linux) +#if defined(linux) || defined(CSRG_BASED) #include #include #else @@ -50,7 +50,7 @@ extern "C" { const char *_tt_lib_version; }; -extern ofstream snoopStream; +extern std::ofstream snoopStream; extern unsigned int globalSaveLines; extern char * traceScript; extern const char * globalVersionString; @@ -93,7 +93,7 @@ fork_tttrace( /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData; - ostrstream tttraceCmd; + std::ostrstream tttraceCmd; tttraceCmd << "unset TT_TRACE_SCRIPT; dtterm -sb -sl "; tttraceCmd << globalSaveLines; tttraceCmd << " -title tttrace -geometry 120x24 -e tttrace &"; @@ -659,7 +659,7 @@ libcPause( /*** DTB_USER_CODE_START vvv Add C code below vvv ***/ DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData; - ostrstream advice; + std::ostrstream advice; advice << "pause(); /* kill -CONT " << getpid() << " */"; DtTtSetLabel( instance->ttsnoopWin_label, advice.str() ); delete advice.str(); @@ -667,7 +667,7 @@ libcPause( // // run "(if dterror.ds blah blah; then kill -CONT pid; fi)&" // - ostrstream script; + std::ostrstream script; script << "(if dterror.ds "; // arg 1: text script << "\"kill -CONT " << getpid() << "\" "; @@ -1343,7 +1343,7 @@ toggleSnooping( if (! tt_is_err( status )) { snoopPatIsRegistered = ! snoopPatIsRegistered; } - ostrstream stream; + std::ostrstream stream; stream << func << (void *)snoopPat << ")" << ends; DtTtSetLabel( instance->ttsnoopWin_label, stream.str(), status ); delete stream.str();