mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code
This commit is contained in:
commit
0ecef859cf
541 changed files with 4013 additions and 877 deletions
|
@ -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)
|
||||
|
|
39
cde/README
Normal file
39
cde/README
Normal file
|
@ -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.
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
@ -142,7 +142,7 @@ ConvertRoutine()
|
|||
;;
|
||||
esac
|
||||
|
||||
cat > /tmp/awk$$ <<EOF
|
||||
cat > $TMPFILE <<EOF
|
||||
#
|
||||
# The function name "PRTREC" is used by the parsing routines
|
||||
# to do the output. By providing a custom output function you
|
||||
|
@ -166,8 +166,8 @@ EOF
|
|||
# Create a single awk file for use with the "-f" parameter.
|
||||
# IBM's awk only allows one "-f"
|
||||
#
|
||||
cat "$UDB_PARSE_LIB" >> /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 ]
|
||||
|
|
|
@ -19,6 +19,9 @@ PLATFORM = hp-ux
|
|||
PLATFORM = linux
|
||||
SUBDIRS = linux
|
||||
#endif
|
||||
#ifdef OpenBSDArchitecture
|
||||
PLATFORM = openbsd
|
||||
#endif
|
||||
#ifdef RsArchitecture
|
||||
PLATFORM = aix
|
||||
SUBDIRS = ibm
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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]}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <OpenBSD.cf>
|
||||
# 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 <NetBSD.cf>
|
||||
# define MacroFile NetBSD.cf
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
1032
cde/config/cf/OpenBSD.cf
Normal file
1032
cde/config/cf/OpenBSD.cf
Normal file
File diff suppressed because it is too large
Load diff
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -42,3 +42,6 @@ XMULIB = -lXmu $(XLIB)
|
|||
# define SharedCsaReqs -lXt
|
||||
#endif
|
||||
|
||||
#ifndef SharedDtHelpReqs
|
||||
# define SharedDtHelpReqs -ljpeg
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -256,6 +256,7 @@ extern int errno;
|
|||
* are there any X_NOT_STDC_ENV machines left in the world?
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#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;
|
||||
|
|
|
@ -188,6 +188,17 @@ in this Software without prior written authorization from The Open Group.
|
|||
#define imake_ccflags "-DNOSTDHDRS"
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/param.h>
|
||||
#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 */
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
/* include files */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -85,7 +85,6 @@ static char rcs_id[]="$XConsortium: Graphics.c /main/23 1996/12/06 11:12:54 cde-
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
|
|
@ -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 <Library.tmpl>
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
|
|
|
@ -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 <stdio.h>
|
||||
# include <malloc.h>
|
||||
/*# include <stdlib.h> */
|
||||
# include <stdlib.h>
|
||||
# include <math.h>
|
||||
# include <limits.h> /* Get definition of */
|
||||
# include <float.h> /* FLX_MAX */
|
||||
|
|
|
@ -46,7 +46,11 @@
|
|||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#if defined(CSRG_BASED)
|
||||
#define MAXINT INT_MAX
|
||||
#else
|
||||
#include <values.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Xm/XmAll.h>
|
||||
|
@ -60,6 +64,7 @@
|
|||
#include <Dt/PsubUtilI.h>
|
||||
#include <Dt/PrintI.h>
|
||||
|
||||
|
||||
/*
|
||||
* ------------------------------------------------------------------------
|
||||
* Constant Definitions
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
* Revision 1.4 1995/08/31 21:54:23 miker
|
||||
* Rename austext_exit() to DtSearchExit().
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include "Search.h"
|
||||
|
||||
void (*austext_exit_first) (int) = NULL;
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
* Initial revision
|
||||
*/
|
||||
#include "SearchE.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
/************************************************/
|
||||
/* */
|
||||
|
|
|
@ -60,6 +60,8 @@
|
|||
|
||||
#define PROGNAME "DBCHANGE"
|
||||
|
||||
void oe_uninitialize (void);
|
||||
|
||||
/************************************************/
|
||||
/* */
|
||||
/* file_has_changed */
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#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;
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "SearchE.h"
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define XOS_USE_NO_LOCKING
|
||||
#define X_INCLUDE_TIME_H
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
#include <signal.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#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 */
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
*/
|
||||
#include "SearchE.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#define MS_misc 1
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
*/
|
||||
#include "SearchE.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#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() */
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
*/
|
||||
#include "SearchP.h"
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define X_INCLUDE_STRING_H
|
||||
#define XOS_USE_NO_LOCKING
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
* Name changes for DtSearch.
|
||||
*/
|
||||
#include "SearchP.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#define X_INCLUDE_STRING_H
|
||||
#define XOS_USE_NO_LOCKING
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
* Freeze DtSearch 0.1, AusText 2.1.8
|
||||
*/
|
||||
#include "SearchP.h"
|
||||
#include <stdlib.h>
|
||||
#define PROGNAME "MSGS"
|
||||
|
||||
/****************************************/
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
*/
|
||||
|
||||
#include "SearchP.h"
|
||||
#include <stdlib.h>
|
||||
#define X_INCLUDE_STRING_H
|
||||
#define XOS_USE_NO_LOCKING
|
||||
#include <X11/Xos_r.h>
|
||||
|
|
|
@ -102,6 +102,7 @@
|
|||
*/
|
||||
|
||||
#include "SearchE.h"
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#define X_INCLUDE_STRING_H
|
||||
#define XOS_USE_NO_LOCKING
|
||||
|
@ -110,6 +111,8 @@
|
|||
#include <unistd.h> /* for POSIX getcwd() */
|
||||
#include <sys/stat.h>
|
||||
|
||||
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 */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
*/
|
||||
#include "SearchE.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -68,12 +68,10 @@
|
|||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "vista.h"
|
||||
#include "dbtype.h"
|
||||
|
||||
|
||||
char *malloc(P1(unsigned));
|
||||
char *calloc(P1(unsigned) Pi(unsigned));
|
||||
#define memlock(p) (p)
|
||||
#define memunlock(p) 1
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
/* Get current member type
|
||||
*/
|
||||
int
|
||||
d_cmtype(set, cmtype TASK_PARM DBN_PARM)
|
||||
int set;
|
||||
int FAR *cmtype;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
/* Get current owner type
|
||||
*/
|
||||
int
|
||||
d_cotype(set, cotype TASK_PARM DBN_PARM)
|
||||
int set;
|
||||
int FAR *cotype;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Get current record type
|
||||
*/
|
||||
int
|
||||
d_crtype(crtype TASK_PARM DBN_PARM)
|
||||
int FAR *crtype;
|
||||
TASK_DECL
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Set Database Dictionary Path
|
||||
*/
|
||||
int
|
||||
d_dbdpath(path TASK_PARM)
|
||||
CONST char FAR *path;
|
||||
TASK_DECL
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Set Database Files Path
|
||||
*/
|
||||
int
|
||||
d_dbfpath(path TASK_PARM)
|
||||
CONST char FAR *path;
|
||||
TASK_DECL
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -627,6 +627,10 @@ typedef struct page_entry {
|
|||
} PAGE_ENTRY;
|
||||
#define buff Buff.ptr
|
||||
|
||||
#include <string.h>
|
||||
#ifndef _STRING_H
|
||||
#define _STRING_H
|
||||
#endif
|
||||
#include "proto.h"
|
||||
#ifdef MULTI_TASK
|
||||
#ifdef NO_DT_COVER
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
/* Set Database User Identifier
|
||||
*/
|
||||
int
|
||||
d_dbuserid(id TASK_PARM)
|
||||
CONST char FAR *id;
|
||||
TASK_DECL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
/* Disconnect from all sets (owner and member) and delete record
|
||||
*/
|
||||
int
|
||||
d_disdel(TASK_DBN_ONLY)
|
||||
TASK_DECL
|
||||
DBN_DECL
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Find owner of current record
|
||||
*/
|
||||
int
|
||||
d_findco(nset TASK_PARM DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Find first member of set
|
||||
*/
|
||||
int
|
||||
d_findfm(nset TASK_PARM DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Find last member of set
|
||||
*/
|
||||
int
|
||||
d_findlm(nset TASK_PARM DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Find next member of set
|
||||
*/
|
||||
int
|
||||
d_findnm(nset TASK_PARM DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
/* Find previous member of set
|
||||
*/
|
||||
int
|
||||
d_findpm(nset TASK_PARM DBN_PARM)
|
||||
int nset;
|
||||
TASK_DECL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -94,6 +94,7 @@ static int initcurr(P0);
|
|||
|
||||
/* Initialize database tables
|
||||
*/
|
||||
int
|
||||
inittab()
|
||||
{
|
||||
register int dbt_lc; /* loop control */
|
||||
|
|
|
@ -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
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue