1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Merge branch 'master' into cde-next

This commit is contained in:
Jon Trulson 2018-09-22 15:50:13 -06:00
commit 2dadc23e0e
1132 changed files with 55246 additions and 88230 deletions

View file

@ -1,5 +1,5 @@
# $TOG: Makefile /main/15 1999/10/12 09:33:30 mgreess $
RELEASE = Release 2.3.0
RELEASE = Release 2.3.0a
PRODUCT = CDE
SHELL = /bin/sh
RM = rm -f
@ -7,7 +7,6 @@
MAKE = make
NMAKE = nmake
WORLDOPTS =
WIN32WORLDOPTS = -i
TOP = .
CURRENT_DIR = .
CONFIGSRC = $(TOP)/config
@ -146,7 +145,7 @@ $(IMAKESRC)/Makefile.proto:
imake.bootstrap:
cd $(IMAKESRC) && $(MAKE) -f Makefile.proto bootstrapdepend
cd $(IMAKESRC) && $(MAKE) $(FLAGS) bootstrap
cd $(IMAKESRC) && $(MAKE) -f Makefile.proto all
cd $(IMAKESRC) && $(MAKE) -f Makefile.proto all
-@if [ -f xmakefile ]; then set -x; \
$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak; \
else exit 0; fi
@ -161,30 +160,6 @@ Makefile::
xmakefile: Imakefile
$(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
World.Win32:
@echo :
@echo Building $(RELEASE) of $(PRODUCT).
@echo :
@echo :
cd $(IMAKESRC)
$(NMAKE) -f Makefile.ini clean.Win32
$(NMAKE) -f Makefile.ini imake.exe
cd ..\..
-if exist xmakefile.bak del xmakefile.bak
-if exist xmakefile ren xmakefile xmakefile.bak
$(IMAKE:/=\) -s xmakefile -I$(IRULESRC) $(IMAKE_DEFINES) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
$(NMAKE_CMD) $(MFLAGS) VerifyOS
$(NMAKE_CMD) $(MFLAGS) Makefiles
$(NMAKE_CMD) $(MFLAGS) clean
$(NMAKE_CMD) $(MFLAGS) includes
$(NMAKE_CMD) $(MFLAGS) depend
$(NMAKE_CMD) $(MFLAGS) $(WIN32WORLDOPTS)
@echo :
@echo :
@echo Full build of $(RELEASE) of $(PRODUCT) complete.
@echo :
# don't allow any default rules in this Makefile
.SUFFIXES:

View file

@ -50,8 +50,6 @@ unset FIGNORE
LOGFILE="installCDE.$$.log"
REVISION="$(echo "$Revision: /main/20 $" | awk '{print $2}')"
Log()
{
/bin/echo "$1" | tee -a $LOGFILE
@ -66,19 +64,19 @@ MakeTarball()
Log "Creating tarball..."
DIRNAME=build.$DATE
mkdir -p $TARBALL_LOCATION/$DIRNAME
cd /
echo $DATE >$LOGFILES_LOCATION/.build.$DATE
chown bin $LOGFILES_LOCATION/.build.$DATE
mkdir -p "$TARBALL_LOCATION/$DIRNAME"
cd / || exit 1
echo "$DATE" >"$LOGFILES_LOCATION/.build.$DATE"
chown bin "$LOGFILES_LOCATION/.build.$DATE"
if [ "$COMPRESS_TARBALL" = "yes" ]; then
tar -cf - $INSTALL_LOCATION/STAR \
2>$TARBALL_LOCATION/$DIRNAME/extract.err |
compress -c >$TARBALL_LOCATION/$DIRNAME/dttar.Z
tar -cf - "$INSTALL_LOCATION/STAR" \
2>"$TARBALL_LOCATION/$DIRNAME/extract.err" |
compress -c >"$TARBALL_LOCATION/$DIRNAME/dttar.Z"
else
tar -cf $TARBALL_LOCATION/$DIRNAME/dt.tar \
$INSTALL_LOCATION/STAR \
2>$TARBALL_LOCATION/$DIRNAME/extract.err 2>&1
tar -cf "$TARBALL_LOCATION/$DIRNAME/dt.tar" \
"$INSTALL_LOCATION/STAR" \
2>"$TARBALL_LOCATION/$DIRNAME/extract.err" 2>&1
fi
if [ "$ACTUAL_INSTALLATION_LOC" = "" ]; then
@ -86,31 +84,30 @@ MakeTarball()
else
actualInstallDir=$ACTUAL_INSTALLATION_LOC
fi
let size=$(du -s $actualInstallDir | awk '{print $1}')*512
let size=$(du -s "$actualInstallDir" | awk '{print $1}')*512
HASH load installation fileset *after* tarball generated
LoadFileSet "" "CDE-INSTALL"
HASH create config dir
destPost=$TARBALL_LOCATION/$DIRNAME/config
mkdir $destPost
mkdir "$destPost"
HASH copy config and platform config scripts
src=$INSTALL_LOCATION/install/$PLATFORM_SCRIPT_DIR
cp $src/config/STAR.cfg $destPost
cp "$src/config/STAR.cfg" "$destPost"
HASH copy this script and install.dt platform overrides
cp $src/install.dto $TARBALL_LOCATION/$DIRNAME/install.dto
cp $src/install.cde $TARBALL_LOCATION/$DIRNAME/install.cde
chmod 755 $TARBALL_LOCATION/$DIRNAME/install.cde
cp "$src/install.dto" "$TARBALL_LOCATION/$DIRNAME/install.dto"
cp "$src/install.cde" "$TARBALL_LOCATION/$DIRNAME/install.cde"
chmod 755 "$TARBALL_LOCATION/$DIRNAME/install.cde"
cd /
cd / || exit 1
Log "done."
cat >$TARBALL_LOCATION/$DIRNAME/dt.pkg <<FIN
cat >"$TARBALL_LOCATION/$DIRNAME/dt.pkg" <<FIN
PLATFORM: $PLATFORM
VERSION: $REVISION
TS: $DATE
COMPRESSED: $COMPRESS_TARBALL
SIZE: $size
@ -118,7 +115,7 @@ CL: $ORIGINAL_COMMAND_LINE
FILESETS: $DATABASE_FILES
FIN
cat >$TARBALL_LOCATION/$DIRNAME/build.status <<FIN
cat >"$TARBALL_LOCATION/$DIRNAME/build.status" <<FIN
The UNIX Desktop
BUILD: $DATE
@ -128,7 +125,7 @@ MAJOR PROBLEMS: <not yet tested>
FIN
chmod g+w $TARBALL_LOCATION/$DIRNAME/build.status
chmod g+w "$TARBALL_LOCATION/$DIRNAME/build.status"
}
DoFilesetScript()
@ -142,22 +139,22 @@ DoFilesetScript()
ScriptName=$2 # use long config file name (configFoo)
fi
if [ $CDECONFIGDIR = "CONFIG" ]; then
if [ "$CDECONFIGDIR" = "CONFIG" ]; then
typeset -u ScriptName
fi
test_string=${DATABASE_FILES#*$FilesetName}
if (( ${#DATABASE_FILES} > ${#test_string} ))
then
if [ -x $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName ]
if [ -x "$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName" ]
then
Log "Executing $PLATFORM specific $FilesetName customize script"
KORNSHELL $POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName -e 2>&1 | \
KORNSHELL "$POST_INSTALL_DIR/$PLATFORM_SCRIPT_DIR/$ScriptName" -e 2>&1 | \
tee -a $LOGFILE
elif [ -x $POST_INSTALL_DIR/$ScriptName ]
elif [ -x "$POST_INSTALL_DIR/$ScriptName" ]
then
Log "Executing $FilesetName customize script"
KORNSHELL $POST_INSTALL_DIR/$ScriptName -e 2>&1 | tee -a $LOGFILE
KORNSHELL "$POST_INSTALL_DIR/$ScriptName" -e 2>&1 | tee -a $LOGFILE
fi
fi
}
@ -176,16 +173,16 @@ CreatePackingList()
{
Log " "
Log "Creating packing list."
touch $INSTALL_LOCATION/Packing_list
for i in `echo $DATABASE_FILES`
touch "$INSTALL_LOCATION/Packing_list"
for i in $DATABASE_FILES
do
Log " for $i"
KORNSHELL $TOOL_DIR/udbToAny.ksh -toDB -ReleaseStream $PLATFORM $DATABASE_DIR/${i}.udb > /tmp/${i}.db
if [ -r /tmp/${i}.db ]
KORNSHELL "$TOOL_DIR/udbToAny.ksh" -toDB -ReleaseStream "$PLATFORM" "$DATABASE_DIR/${i}.udb" > "/tmp/${i}.db"
if [ -r "/tmp/${i}.db" ]
then
for file in `fgrep install_target /tmp/${i}.db | cut -sf 2 -d \: `
grep -F install_target "/tmp/${i}.db" | cut -sf 2 -d '\: ' < file | while IFS= read -r line
do
echo "$file" >>$INSTALL_LOCATION/Packing_list
echo "$line" >>"$INSTALL_LOCATION/Packing_list"
done
fi
done
@ -198,23 +195,23 @@ CleanDaemons()
for i in inetd rpc.ttdbserver rpc.cmsd
do
if [ "$PLATFORM" = "aix" -a $i = "inetd" ]
if [ "$PLATFORM" = "aix" ] && [ $i = "inetd" ]
then
lssrc -s inetd >/dev/null 2>&1
if [ $? = "0" ]
if ! lssrc -s inetd >/dev/null 2>&1
then
stopsrc -s inetd >>$LOGFILE 2>&1
fi
elif [ "$PLATFORM" = "openbsd" -o "$PLATFORM" = "freebsd" -o "$PLATFORM" = "netbsd" -o "$PLATFORM" = "linux" ]
elif [ "$PLATFORM" = "openbsd" ] || [ "$PLATFORM" = "freebsd" ] || \
[ "$PLATFORM" = "netbsd" ] || [ "$PLATFORM" = "linux" ]
then
ps axo pid,comm | grep $i > /tmp/tmppsout
pgrep pid,comm > /tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill " $1}' /tmp/tmppsout | /bin/sh -f
sleep 2
fi
else
ps -ef | grep $i | grep -v grep >/tmp/tmppsout
pgrep -v pgrep >/tmp/tmppsout
if [ -s /tmp/tmppsout ]
then
awk '{print "kill " $2}' /tmp/tmppsout | /bin/sh -f
@ -229,8 +226,8 @@ RestartInetd()
{
HASH now restart inetd
OLDPWD=`pwd`
cd /
OLDPWD=$(pwd)
cd / || exit 1
if [ "$PLATFORM" = "sun" ]
then
/usr/sbin/svcadm refresh svc:/network/inetd:default
@ -238,7 +235,7 @@ RestartInetd()
elif [ "$PLATFORM" = "aix" ]
then
startsrc -s inetd >>$LOGFILE 2>&1
elif [ "$PLATFORM" = "openbsd" -o "$PLATFORM" = "netbsd" ]
elif [ "$PLATFORM" = "openbsd" ] || [ "$PLATFORM" = "netbsd" ]
then
/etc/rc.d/inetd start >/dev/null
elif [ "$PLATFORM" = "freebsd" ]
@ -254,7 +251,7 @@ RestartInetd()
/etc/inetd
#endif
fi
cd $OLDPWD
cd "$OLDPWD" || exit 1
}
CheckForActualLocations()
@ -275,21 +272,21 @@ XCOMM
if [ "$CLEANING" = "yes" ]
then
Log "Removing $INSTALL_LOCATION contents... "
if [ -d $INSTALL_LOCATION ]
if [ -d "$INSTALL_LOCATION" ]
then
rm -rf $INSTALL_LOCATION/STAR
rm -rf "${INSTALL_LOCATION:?}/"STAR
if [ "$LeaveLinks" = "yes" ]
then
if [ ! -L $INSTALL_LOCATION ]
if [ ! -L "$INSTALL_LOCATION" ]
then
rm -rf $INSTALL_LOCATION
rm -rf "$INSTALL_LOCATION"
fi
else
if [ -L $INSTALL_LOCATION ]
if [ -L "$INSTALL_LOCATION" ]
then
rm -f $INSTALL_LOCATION
rm -f "$INSTALL_LOCATION"
else
rm -rf $INSTALL_LOCATION
rm -rf "$INSTALL_LOCATION"
fi
fi
fi
@ -304,22 +301,22 @@ XCOMM
HASH first create the actual directory - if not there
HASH
if [ ! -d $ACTUAL_INSTALLATION_LOC ]
if [ ! -d "$ACTUAL_INSTALLATION_LOC" ]
then
mkdir -p $ACTUAL_INSTALLATION_LOC
if [ ! -d $ACTUAL_INSTALLATION_LOC ]
mkdir -p "$ACTUAL_INSTALLATION_LOC"
if [ ! -d "$ACTUAL_INSTALLATION_LOC" ]
then
Log "cannot create $ACTUAL_INSTALLATION_LOC directory"
exit 1
fi
fi
ln -s $ACTUAL_INSTALLATION_LOC $INSTALL_LOCATION
ln -s "$ACTUAL_INSTALLATION_LOC" "$INSTALL_LOCATION"
else
if [ ! -d $INSTALL_LOCATION -a ! -L $INSTALL_LOCATION ];
if [ ! -d "$INSTALL_LOCATION" ] && [ ! -L "$INSTALL_LOCATION" ];
then
mkdir -p $INSTALL_LOCATION
mkdir -p "$INSTALL_LOCATION"
fi
fi
fi
@ -334,21 +331,21 @@ XCOMM
if [ "$CLEANING_ETC" = "yes" ]
then
Log "Removing $CONFIGURE_LOCATION contents... "
if [ -d $CONFIGURE_LOCATION ]
if [ -d "$CONFIGURE_LOCATION" ]
then
rm -rf $CONFIGURE_LOCATION/STAR
rm -rf "${CONFIGURE_LOCATION:?}/"STAR
if [ "$LeaveLinks" = "yes" ]
then
if [ ! -L $CONFIGURE_LOCATION ]
if [ ! -L "$CONFIGURE_LOCATION" ]
then
rm -rf $CONFIGURE_LOCATION
rm -rf "$CONFIGURE_LOCATION"
fi
else
if [ -L $CONFIGURE_LOCATION ]
if [ -L "$CONFIGURE_LOCATION" ]
then
rm -f $CONFIGURE_LOCATION
rm -f "$CONFIGURE_LOCATION"
else
rm -rf $CONFIGURE_LOCATION
rm -rf "$CONFIGURE_LOCATION"
fi
fi
fi
@ -356,43 +353,43 @@ XCOMM
if [ "$ACTUAL_CONFIGURATION_LOC" != "" ]
then
if [ ! -d $ACTUAL_CONFIGURATION_LOC ]
if [ ! -d "$ACTUAL_CONFIGURATION_LOC" ]
then
mkdir -p $ACTUAL_CONFIGURATION_LOC
if [ ! -d $ACTUAL_CONFIGURATION_LOC ]
mkdir -p "$ACTUAL_CONFIGURATION_LOC"
if [ ! -d "$ACTUAL_CONFIGURATION_LOC" ]
then
Log "cannot create $ACTUAL_CONFIGURATION_LOC directory"
exit 1
fi
fi
ln -s $ACTUAL_CONFIGURATION_LOC $CONFIGURE_LOCATION
ln -s "$ACTUAL_CONFIGURATION_LOC" "$CONFIGURE_LOCATION"
else
if [ ! -d $CONFIGURE_LOCATION -a ! -L $CONFIGURE_LOCATION ];
if [ ! -d "$CONFIGURE_LOCATION" ] && [ ! -L "$CONFIGURE_LOCATION" ];
then
mkdir -p $CONFIGURE_LOCATION
mkdir -p "$CONFIGURE_LOCATION"
fi
fi
if [ "$CLEANING" = "yes" ]
then
Log "Removing $LOGFILES_LOCATION contents... "
if [ -d $LOGFILES_LOCATION ]
if [ -d "$LOGFILES_LOCATION" ]
then
rm -rf $LOGFILES_LOCATION/STAR
rm -rf "${LOGFILES_LOCATION:?}/"STAR
if [ "$LeaveLinks" = "yes" ]
then
if [ ! -L $LOGFILES_LOCATION ]
if [ ! -L "$LOGFILES_LOCATION" ]
then
rm -rf $LOGFILES_LOCATION
rm -rf "$LOGFILES_LOCATION"
fi
else
if [ -L $LOGFILES_LOCATION ]
if [ -L "$LOGFILES_LOCATION" ]
then
rm -f $LOGFILES_LOCATION
rm -f "$LOGFILES_LOCATION"
else
rm -rf $LOGFILES_LOCATION
rm -rf "$LOGFILES_LOCATION"
fi
fi
fi
@ -400,22 +397,22 @@ XCOMM
if [ "$ACTUAL_VAR_LOC" != "" ]
then
if [ ! -d $ACTUAL_VAR_LOC ]
if [ ! -d "$ACTUAL_VAR_LOC" ]
then
mkdir -p $ACTUAL_VAR_LOC
if [ ! -d $ACTUAL_VAR_LOC ]
mkdir -p "$ACTUAL_VAR_LOC"
if [ ! -d "$ACTUAL_VAR_LOC" ]
then
Log "cannot create $ACTUAL_VAR_LOC directory"
exit 1
fi
fi
ln -s $ACTUAL_VAR_LOC $LOGFILES_LOCATION
ln -s "$ACTUAL_VAR_LOC" "$LOGFILES_LOCATION"
else
if [ ! -d $LOGFILES_LOCATION -a ! -L $LOGFILES_LOCATION ];
if [ ! -d "$LOGFILES_LOCATION" ] && [ ! -L "$LOGFILES_LOCATION" ];
then
mkdir -p $LOGFILES_LOCATION
mkdir -p "$LOGFILES_LOCATION"
fi
fi
@ -424,7 +421,7 @@ XCOMM
USAGE()
{
echo -e "Usage: $(basename $0) {-s <source>|-z <package>} [options]"
echo -e "Usage: $(basename "$0") {-s <source>|-z <package>} [options]"
echo -e ""
echo -e "\t-s <source>\t\t\tthe top of the build tree"
echo -e "\t-z <package>\t\tthe desktop install package"
@ -491,28 +488,28 @@ LoadFileSet()
fi
XCOMM don't bother if the fileset doesn't exist
if [ ! -e $DATABASE_DIR/${2}.udb ]
if [ ! -e "$DATABASE_DIR/${2}.udb" ]
then
return
fi
Log " $num installing database $2"
Log " - creating ${2}.lst file"
KORNSHELL $TOOL_DIR/udbToAny.ksh -toLst -ReleaseStream $PLATFORM \
$DATABASE_DIR/${2}.udb > /tmp/${2}.lst
KORNSHELL "$TOOL_DIR/udbToAny.ksh" -toLst -ReleaseStream "$PLATFORM" \
"$DATABASE_DIR/${2}.udb" > "/tmp/${2}.lst"
Log " - installing ... "
KORNSHELL $TOOL_DIR/mkProd -D $DESTINATION_DIR -S $BUILD_TREE /tmp/${2}.lst \
2>/tmp/${2}.err 1>/tmp/${2}.good
KORNSHELL "$TOOL_DIR/mkProd" -D "$DESTINATION_DIR" -S "$BUILD_TREE" "/tmp/${2}.lst" \
2>"/tmp/${2}.err" 1>"/tmp/${2}.good"
Log " done."
Log " - checking for errors ..."
rm -f /tmp/${2}.missing
rm -f "/tmp/${2}.missing"
awk '{if ($1 == "ERROR:") print " " $4}' \
/tmp/${2}.err >> /tmp/${2}.missing
if [ -s /tmp/${2}.missing ]
"/tmp/${2}.err" >> "/tmp/${2}.missing"
if [ -s "/tmp/${2}.missing" ]
then
Log " - missing files:"
cat /tmp/${2}.missing | tee -a $LOGFILE
"/tmp/${2}.missing" >> "$LOGFILE"
fi
}
ORIGINAL_COMMAND_LINE="$*"
@ -526,27 +523,27 @@ PLATFORM_SCRIPT_DIR=""
XCOMM
XCOMM Set system
XCOMM
if [ $BUILDSYSTEM = "AIX" ];
if [ "$BUILDSYSTEM" = "AIX" ];
then
PLATFORM=aix
PLATFORM_SCRIPT_DIR=ibm
elif [ $BUILDSYSTEM = "SunOS" ];
elif [ "$BUILDSYSTEM" = "SunOS" ];
then
PLATFORM=sun
PLATFORM_SCRIPT_DIR=sun
elif [ $BUILDSYSTEM = "Linux" ];
elif [ "$BUILDSYSTEM" = "Linux" ];
then
PLATFORM="linux"
PLATFORM_SCRIPT_DIR="linux"
elif [ $BUILDSYSTEM = "FreeBSD" ];
elif [ "$BUILDSYSTEM" = "FreeBSD" ];
then
PLATFORM="freebsd"
PLATFORM_SCRIPT_DIR="freebsd"
elif [ $BUILDSYSTEM = "OpenBSD" ];
elif [ "$BUILDSYSTEM" = "OpenBSD" ];
then
PLATFORM="openbsd"
PLATFORM_SCRIPT_DIR="openbsd"
elif [ $BUILDSYSTEM = "NetBSD" ];
elif [ "$BUILDSYSTEM" = "NetBSD" ];
then
PLATFORM="netbsd"
PLATFORM_SCRIPT_DIR="netbsd"
@ -557,9 +554,9 @@ XCOMM
if [ "$PLATFORM" = "aix" ];
then
USER=`/bin/whoami`
USER=$(/bin/whoami)
else
USER=`/usr/bin/whoami`
USER=$(/usr/bin/whoami)
fi
if [ "$USER" != "root" ];
@ -590,7 +587,6 @@ XCOMM
RUN_SCRIPTS_ONLY="no"
DATABASE_FILES=""
BUILD_TREE=""
TAR_DIR=""
LeaveLinks="no"
REMOVE_LINKS="no"
CLEAN_DAEMONS="yes"
@ -782,30 +778,29 @@ XCOMM
echo ""
if [ -z "$BUILD_TREE" -a -z "$TAR_TREE" ]
if [ -z "$BUILD_TREE" ] && [ -z "$TAR_TREE" ]
then
USAGE
exit 1
fi
if [ "$BUILD_TREE" != "" -a ! -d "$BUILD_TREE" ]
if [ "$BUILD_TREE" != "" ] && [ ! -d "$BUILD_TREE" ]
then
Log "Build tree does not exist."
exit 1
fi
if [ "$TAR_TREE" != "" -a ! -d "$TAR_TREE" ]
if [ "$TAR_TREE" != "" ] && [ ! -d "$TAR_TREE" ]
then
Log "Tar tree does not exist."
exit 1
fi
if [ "$DESTINATION_DIR" != "" -a ! -d "$DESTINATION_DIR" ]
if [ "$DESTINATION_DIR" != "" ] && [ ! -d "$DESTINATION_DIR" ]
then
Log "Creating $DESTINATION_DIR"
mkdir $DESTINATION_DIR
if [ $? -ne 0 ]
if ! mkdir "$DESTINATION_DIR"
then
Log "mkdir $DESTINATION_DIR failed"
exit 1
@ -823,11 +818,11 @@ XCOMM
if [ $TARBALL = "yes" ];
then
set -- `/bin/date`
set -- "$(/bin/date)"
DATE=$2_$3_$4_$6
fi
if [ -z "$BUILD_TREE" -a ${0##STAR/} = INSTALL.CDE ]; then
if [ -z "$BUILD_TREE" ] && [ "${0##STAR/}" = INSTALL.CDE ]; then
typeset -u CDEPACKAGE
typeset -u CDETARFILE
typeset -u CDETARFILEZ
@ -919,7 +914,7 @@ XCOMM
[ -z "$CONFIGURE_LOCATION" ] && CONFIGURE_LOCATION=CDE_CONFIGURATION_TOP
[ -z "$LOGFILES_LOCATION" ] && LOGFILES_LOCATION=CDE_LOGFILES_TOP
if [ -L $INSTALL_LOCATION -a "$CONFIGURE_ONLY" != "yes" ]
if [ -L $INSTALL_LOCATION ] && [ "$CONFIGURE_ONLY" != "yes" ]
then
touch $INSTALL_LOCATION/foo >/dev/null 2>/dev/null
if [ ! -f $INSTALL_LOCATION/foo ]
@ -937,7 +932,7 @@ XCOMM
if [ -d $INSTALL_LOCATION ]
then
if [ -x $INSTALL_LOCATION/bin -a ! -d $INSTALL_LOCATION/bin ]
if [ -x $INSTALL_LOCATION/bin ] && [ ! -d $INSTALL_LOCATION/bin ]
then
rm -f $INSTALL_LOCATION/bin
fi
@ -978,22 +973,22 @@ XCOMM
then
Log "Load the Desktop from $BUILD_TREE"
cd $STARTING_DIR
cd "$STARTING_DIR" || exit 1
let j=1
for i in `echo $DATABASE_FILES`
for i in $DATABASE_FILES
do
LoadFileSet "$j" "$i"
let j=j+1
done
else
Log "Load the Desktop from $TAR_TREE"
compressed=$(awk '/COMPRESSED: /{print $2}' $TAR_TREE/$CDEPACKAGE)
compressed=$(awk '/COMPRESSED: /{print $2}' "$TAR_TREE/$CDEPACKAGE")
if [ "$compressed" = "yes" ]; then
uncompress <$TAR_TREE/$CDETARFILEZ | tar xvf - $INSTALL_LOCATION
uncompress <"$TAR_TREE/$CDETARFILEZ" | tar xvf - $INSTALL_LOCATION
else
tar -xvf $TAR_TREE/$CDETARFILE $INSTALL_LOCATION
tar -xvf "$TAR_TREE/$CDETARFILE" $INSTALL_LOCATION
fi
DATABASE_FILES=$(awk 'BEGIN {FS=":"} /FILESETS: /{print $2}' $TAR_TREE/$CDEPACKAGE)
DATABASE_FILES=$(awk 'BEGIN {FS=":"} /FILESETS: /{print $2}' "$TAR_TREE/$CDEPACKAGE")
fi
Log " "
@ -1009,7 +1004,7 @@ XCOMM
MakeTarball
fi
cd $STARTING_DIR
cd "$STARTING_DIR" || exit 1
if [ "$RUN_SCRIPTS" = "yes" ]
then

View file

@ -8,9 +8,9 @@
USAGE="Usage: $0 file.lst"
case $# in
0) echo $USAGE;;
0) echo "$USAGE";;
1);;
*) echo $USAGE;;
*) echo "$USAGE";;
esac
awk '
@ -20,4 +20,4 @@ END {
if ( i > 0 )
for ( i in links) print links[i];
}
' $@
' "$@"

View file

@ -5,5 +5,5 @@
# and coalesce multiple blanks/tabs into a single blank
#
cat $@ | egrep -v '^[ ]*#|^[ ]*$' | sed 's/[ ][ ]*/ /g'|\
cat "$@" | grep -E -v '^[ ]*#|^[ ]*$' | sed 's/[ ][ ]*/ /g'|\
sed 's/ $//'

View file

@ -1,4 +1,4 @@
#!/bin/ksh
awk '{if ($1 == "install_target" && $3 != "") print $3}' \
$2/databases/$1.udb >$1.list
"$2/databases/$1.udb" >"$1.list"

View file

@ -19,19 +19,19 @@ XCOMM #
XCOMM ############################################
RemoveDemoFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -45,8 +45,8 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
@ -61,17 +61,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-DEMOS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveFontFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -41,11 +41,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -57,18 +57,15 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-FONTS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -13,19 +13,19 @@ XCOMM #######
RemoveHelpFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -39,11 +39,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -55,21 +55,18 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP-C
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
XCOMM
XCOMM set up symlinks that point into the $CDE_TOP tree
XCOMM
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -13,19 +13,19 @@ XCOMM #######
RemoveHelpFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -39,11 +39,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF1
@ -55,17 +55,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveHelpRunFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -41,11 +41,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -57,17 +57,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-HELP-RUN
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveIconFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -41,11 +41,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -57,17 +57,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-ICONS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveIncludeFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -41,11 +41,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -57,17 +57,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-INC
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveManFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -41,11 +41,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -57,17 +57,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-DEMOS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,30 +15,30 @@ XCOMM ############################################
RemoveManDevFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
if [ -L $SRC -a -d $SRC ]
if [ -L "$SRC" ] && [ -d "$SRC" ]
then
results=`ls $SRC`
results=$(find -name "$SRC")
if [ ! -s "$SRC" ]
then
rm -f $SRC
rm -f "$SRC"
else
continue
fi
else
rm -f $SRC
rm -f "$SRC"
fi
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -52,11 +52,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -68,17 +68,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-MAN-DEV
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemoveMsgCatFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -41,11 +41,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -57,17 +57,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-MSG-C
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -15,19 +15,19 @@ XCOMM ############################################
RemovePrgFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -41,11 +41,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -57,17 +57,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM ##########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-PRG
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -14,19 +14,19 @@ XCOMM #######
XCOMM ############################################
RemoveShlibFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -40,11 +40,11 @@ VerifyInstalledFiles()
{
echo "Status mode owner group filename"
echo "-----------------------------------------"
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "verify.func"
done <<-EOF
@ -56,17 +56,14 @@ XCOMM exists the link is correct /usr/dt/link
XCOMM #########################################################################
XCOMM
XCOMM Main Body
XCOMM Main Body
XCOMM
XCOMM #########################################################################
PRODUCT=CDE
FILESET=CDE-SHLIBS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "deconfigure" ]
then

View file

@ -7,9 +7,6 @@ XCOMM @(#) $TOG: configMin.src /main/1 1998/03/11 16:18:12 mgreess $
XCOMM #######
#define HASH #
PRODUCT=CDE
FILESET=CDE-MIN
DO_CONFIGURATION=""
retval=0
FixEtcServices()
@ -72,19 +69,19 @@ TMPFILE=/tmp/services
RemoveMinFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -102,7 +99,7 @@ XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "../verify.func"
done <<-EOF
@ -118,7 +115,7 @@ XCOMM Main Body
XCOMM
XCOMM ###############################################################
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "configure" ]
then

View file

@ -9,9 +9,6 @@ XCOMM #######
#define HASH #
#define STAR *
PRODUCT=CDE
FILESET=CDE-RUN
DO_CONFIGURATION=""
retval=0
CreateAppConfigDirectory()
@ -21,41 +18,42 @@ CreateAppConfigDirectory()
HASH all of its subdirectories
HASH
cd $DT_CONFIG_TOP
if [ ! -d $APPCONFIG ]
cd "$DT_CONFIG_TOP" || exit
if [ ! -d "$APPCONFIG" ]
then
mkdir $APPCONFIG
mkdir "$APPCONFIG"
fi
cd $APPCONFIG
cd "$APPCONFIG" || exit
for i in $APPCONFIG_DIRS
do
if [ ! -d $i ]
(
if [ ! -d "$i" ]
then
mkdir $i
mkdir "$i"
fi
cd $i
cd "$i" || exit
HASH
HASH for each locale
HASH
for j in $DT_TOP/$APPCONFIG/$i/STAR
do
if [ ! -d `basename $j` ]
if [ ! -d "$(basename "$j")" ]
then
mkdir `basename $j`
mkdir "$(basename "$j")"
fi
done
cd ..
)
done
}
doDttermTerminfo()
{
if [ -f $DT_TOP/config/dtterm.ti ]
if [ -f "$DT_TOP/config/dtterm.ti" ]
then
tic $DT_TOP/config/dtterm.ti
tic "$DT_TOP/config/dtterm.ti"
if [ -f /usr/share/lib/terminfo/d/dtterm ]
then
chown bin /usr/share/lib/terminfo/d/dtterm
@ -69,7 +67,7 @@ doDttermTerminfo()
chmod 644 /usr/share/terminfo/d/dtterm
fi
fi
if [ ! -f /usr/share/lib/terminfo/d/dtterm -a ! -f /usr/share/terminfo/d/dtterm ]
if [ ! -f /usr/share/lib/terminfo/d/dtterm ] && [ ! -f /usr/share/terminfo/d/dtterm ]
then
echo "Unable to compile $DT_TOP/config/dtterm.ti"
fi
@ -80,19 +78,19 @@ doDttermTerminfo()
RemoveRunFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -122,7 +120,7 @@ XCOMM exists the link is correct /usr/dt/link
PrintUsage()
{
echo "Usage:" $0 "[OPERATION]"
echo "Usage:" "$0" "[OPERATION]"
echo ""
echo "Operations:"
echo " -e configure"
@ -140,22 +138,16 @@ XCOMM Main Body
XCOMM
XCOMM ##########################################################################
PRODUCT=CDE
FILESET=CDE-RUN
DT_TOP=CDE_INSTALLATION_TOP
DT_CONFIG_TOP=CDE_CONFIGURATION_TOP
DT_TEMP_TOP=CDE_LOGFILES_TOP
ROOT=/
retval=0
APPCONFIG=appconfig
APPCONFIG_DIRS="appmanager help icons types"
PRINTERS=""
DEFAULT_PRINTER="DtPrint"
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "usage" ]
then
@ -175,12 +167,12 @@ DEFAULT_PRINTER="DtPrint"
mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager
fi
cd $DT_TEMP_TOP
cd "$DT_TEMP_TOP" || exit
mv $APPCONFIG/appmanager .hidden-appmanager
chmod -R 755 *
chmod -R 755 -- *
chmod 755 .hidden-appmanager
chown -R bin *
chgrp -R bin *
chown -R bin -- *
chgrp -R bin -- *
mv .hidden-appmanager $APPCONFIG/appmanager
chmod 755 .
chown bin .
@ -209,14 +201,14 @@ DEFAULT_PRINTER="DtPrint"
HASH Configure Xsession.d
HASH
cd $DT_CONFIG_TOP/config
cd $DT_CONFIG_TOP/config || exit
if [ ! -d Xsession.d ]
then
mkdir Xsession.d
fi
cd $DT_CONFIG_TOP
chmod -R 755 *
cd $DT_CONFIG_TOP || exit
chmod -R 755 -- *
doDttermTerminfo

View file

@ -6,19 +6,19 @@ XCOMM $TOG: configShlibs.src /main/1 1998/03/11 16:18:33 mgreess $
XCOMM ############################################
RemoveShlibFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -36,7 +36,7 @@ XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "../verify.func"
done <<-EOF
@ -54,14 +54,14 @@ XCOMM
XCOMM creates links in the install tree libtt.so -> libtt.so.1
XCOMM
cd CDE_INSTALLATION_TOP/lib
cd CDE_INSTALLATION_TOP/lib || exit
for lib in `/bin/ls *.so.*`
for lib in $(/bin/ls lib*.so.*)
do
link=`echo $lib | cut -d. -f1,2`
link=$(echo "$lib" | cut -d. -f1,2)
rm -f $link
ln -s $lib $link
rm -f "$link"
ln -s "$lib" "$link"
done
@ -73,11 +73,8 @@ XCOMM Main Body
XCOMM
XCOMM #########################################################################
PRODUCT=CDE
FILESET=CDE-SHLIBS
retval=0
CDE_TOP=CDE_INSTALLATION_TOP
CDE_CONF_TOP=CDE_CONFIGURATION_TOP
HandleOption $*

View file

@ -11,26 +11,23 @@ XCOMM
XCOMM #######
#define HASH #
PRODUCT=CDE
FILESET=CDE-TT
DO_CONFIGURATION=""
retval=0
RemoveTTFiles()
{
while read SRC
while read -r SRC
do
if [ "$SRC" != "" ]
then
rm -f $SRC
rm -f "$SRC"
dirname=${SRC%/STAR}
if [ -d $dirname ]
if [ -d "$dirname" ]
then
cd $dirname
cd "$dirname" || exit
while [ "$dirname" != "$CDE_TOP" ]
do
cd ..
rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
rmdir "${dirname##STAR/}" >/dev/null 2>/dev/null
dirname=${dirname%/STAR}
done
fi
@ -48,7 +45,7 @@ XCOMM exists correct correct correct /usr/dt/foo1
XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
XCOMM exists the link is correct /usr/dt/link
while read SRC
while read -r SRC
do
#include "../verify.func"
done <<-EOF
@ -64,7 +61,7 @@ XCOMM Main Body
XCOMM
XCOMM ######################################################################
HandleOption $*
HandleOption "$*"
if [ "$OPERATION" = "configure" ]
then

View file

@ -1,14 +0,0 @@
if [ "$SRC" != "" ]
then
set -A tokens $SRC
if [ "${tokens[3]}" = "file" ]
then
if [ -f ${tokens[0]} ]
then
filesize=`ls -l ${tokens[0]} | awk '{print $5}'`
echo "$filesize\t\t\c"
echo "${tokens[0]}"
let total=total+filesize
fi
fi
fi

View file

@ -1,9 +1,9 @@
if [ "$SRC" != "" ]
then
set -A tokens $SRC
set -A tokens "$SRC"
if [ "${tokens[3]}" = "file" ]
then
if [ -f ${tokens[0]} ]
if [ -f "${tokens[0]}" ]
then
printf "exists "
else
@ -13,7 +13,7 @@
fi
elif [ "${tokens[3]}" = "sym_link" ]
then
if [ -L ${tokens[0]} ]
if [ -L "${tokens[0]}" ]
then
printf "exists "
else
@ -26,9 +26,9 @@
if [ "${tokens[3]}" = "file" ]
then
touch /tmp/config-test
chmod ${tokens[1]} /tmp/config-test
tmpperms=`ls -l /tmp/config-test | awk '{print $1}'`
realperms=`ls -l ${tokens[0]} | awk '{print $1}'`
chmod "${tokens[1]}" /tmp/config-test
tmpperms=$(ls -l /tmp/config-test | awk '{print $1}')
realperms=$(ls -l "${tokens[0]}" | awk '{print $1}')
if [ "$tmpperms" = "$realperms" ]
then
@ -37,7 +37,7 @@
printf " WRONG "
fi
owner=`ls -l ${tokens[0]} | awk '{print $3}'`
owner=$(ls -l "${tokens[0]}" | awk '{print $3}')
if [ "$owner" = "${tokens[4]}" ]
then
@ -46,7 +46,7 @@
printf " WRONG "
fi
group=`ls -l ${tokens[0]} | awk '{print $4}'`
group=$(ls -l "${tokens[0]}" | awk '{print $4}')
if [ "$group" = "${tokens[5]}" ]
then
@ -56,7 +56,7 @@
fi
elif [ "${tokens[3]}" = "sym_link" ]
then
linkto=`ls -l ${tokens[0]} | awk '{print $11}'`
linkto=$(ls -l "${tokens[0]}" | awk '{print $11}')
if [ "${tokens[2]}" = "$linkto" ]
then
printf " the link is correct "

View file

@ -1,430 +0,0 @@
XCOMM platform: $XConsortium: Amoeba.cf /main/12 1996/09/28 16:04:48 rws $
XCOMM platform: $XFree86: xc/config/cf/Amoeba.cf,v 3.6 1995/01/28 15:40:08 dawes Exp $
/* The presence of this configuration file in the X distribution
* does not imply full support for the system it describes.
* Additional patches from The XFree86 Project, Inc. will be required to
* compile the X distribution on Amoeba. According to them, these patches
* will also be made available at the regular Amoeba ftp site
* ftp.am.cs.vu.nl.
*/
/*
* Configuration file for Amoeba 5.2
*/
#ifndef OSName
#define OSName Amoeba 5.2
#endif
XCOMM operating system: OSName
#ifndef OSMajorVersion
#define OSMajorVersion 5
#endif
#ifndef OSMinorVersion
#define OSMinorVersion 2
#endif
#ifndef OSTeenyVersion
#define OSTeenyVersion 0
#endif
#ifndef OSVendor
#define OSVendor Vrije Universiteit
#endif
#define AmoebaArchitecture YES
/* Configuration defaults */
#ifndef AmoebaTop
#define AmoebaTop __AM_TOP__
#endif
#ifndef AmoebaBin
#define AmoebaBin $(ATOP)/bin.sun4
#endif
#ifndef AmoebaConf
#define AmoebaConf __AM_CONF__
#endif
#define HasNdbm YES
#define NeedSdbm YES
#define HasShm NO
#define HasSecureRPC NO
#define SetTtyGroup NO
#define HasPutenv YES
#define HasSockets NO
#define HasStreams NO
#if defined(Sun3Architecture) || defined(SparcArchitecture)
#define XsunAmoebaServer YES
#define XsunAmoebaMonoServer YES
#endif
#define BuildFonts NO
#define BuildFontServer NO
#define BuildPexExt NO
#define BuildXIE NO
#define YaccCmd byacc
#define TermcapLibrary /* in libajax */
#define LexLib /* not needed */
#define PexCCOptions DefaultCCOptions
#define ServerOSDefines XFree86ServerOSDefines
#define UsrLibDir $(DESTDIR)/profile/module/x11/lib
#define LibDir $(DESTDIR)/profile/module/x11/lib
#define ManDirectoryRoot $(DESTDIR)/profile/module/x11/man
#define BinDir $(DESTDIR)/profile/module/x11/bin
#define IncRoot $(DESTDIR)/profile/module/x11/include
#define FontDir $(DESTDIR)/profile/module/x11/fonts/$(ARCH)
#define DefaultRGBDatabase $(DESTDIR)/profile/module/x11/lib/rgb/$(ARCH)/rgb
#define ManSuffix 1
#define ManPath ManDirectoryRoot
#define XmanLocalSearchPath ManDirectoryRoot
#define DefaultUserPath :/bin:$(BINDIR)
#define DefaultSystemPath /bin:$(BINDIR):
#define StandardIncludes -I$(ATOP)/src/h \
-I$(ATOP)/src/h/posix \
-I$(ATOP)/src/h/posix/machdep/$(ARCH) \
-I$(ATOP)/src/h/machdep/arch/$(ARCH) \
-I$(ATOP)/src/h/toolset/$(TOOLSET)
#define Malloc0ReturnsNull YES
#define ServerInstallFlags -s 32
#define FontDefines -DFONT_SNF
#define ConnectionFlags -DAMTCPCONN -DAMRPCCONN
#define ServerXdmcpDefines /* no -DXDMCP */
#define UseRgbTxt YES
#define NdbmDefines -DSDBM -DNDBM -I$(XINCLUDESRC)
#define DBMLibrary /* $(LIBSRC)/sdbm/libsdbm.a */
#if defined(i386Architecture)
#ifndef AckToolset
#define AckToolset YES
#define ExtraFPLoadFlags -fp
#endif
#define XF86MonoServer YES
#endif
#if defined(Sun3Architecture)
#ifndef AckToolset
#define AckToolset YES
#endif
#endif
#if AckToolset
#define CcCmd ack
#define ServerCcCmd ack
#define LdCmd ack
#define AckArchOption -mam_$(ARCH)
#define DefaultCCOptions AckArchOption
#define LibraryCCOptions AckArchOption
#define LdCombineFlags -Rled-r -c.out
#define ArCmd aal clrv
#define RanlibCmd /bin/true
#define AsCmd AmoebaConf/$(ARCH).$(TOOLSET)/toolset/do_as AckArchOption
#define AsIncl -I$(ATOP)/src/h/machdep/arch/$(ARCH)
#define AsmDefines -DACK_ASSEMBLER
#define LdPreLib /**/
#define LdPostLib /**/
#endif
#if defined(SparcArchitecture)
#define AllocateLocalDefines -DINCLUDE_ALLOCA_H
#define CcCmd cc
#define ServerCcCmd cc
#define LdCmd AmoebaConf/$(ARCH).$(TOOLSET)/toolset/do_gld
#define DefaultCCOptions -sun4
#define LibraryCCOptions -sun4
#define AmoebaCompilerDefs -Usun
#define ServerExtraDefines AllocateLocalDefines
#define LdPostLib /**/
#endif
#ifndef AmoebaCompilerDefs
#define AmoebaCompilerDefs /**/
#endif
#define CommonAmoebaDefines -DAMOEBA -D$(ARCH) AmoebaCompilerDefs
#define StandardDefines CommonAmoebaDefines
#define StandardCppDefines StandardDefines
#ifndef ExtraFPLoadFlags
#define ExtraFPLoadFlags
#endif
#define MathLibrary $(ALIB)/math/libmath.a
#define OSLibraries $(ALIB)/ajax/libajax.a \
$(ALIB)/amoeba/libamoeba.a \
MathLibrary \
ExtraFPLoadFlags
#define ServerExtraSysLibs $(CBRT) OSLibraries
#define ExtraLoadFlags OSLibraries
ATOP = AmoebaTop
ALIB = AmoebaConf/$(ARCH).$(TOOLSET)/lib
#if AckToolset
/* The ACK toolset already links in the appropriate head.o by default */
HEAD =
#else
HEAD = $(ALIB)/head/head.o
#endif
ABIN = AmoebaBin
AINSTALL = /bin/sh $(CONFIGSRC)/util/aminstall.sh $(ABIN)
AINSTALLFLAGS =
TOB = /bin/sh $(CONFIGSRC)/util/aminstall.sh $(ABIN)
MKXDIRHIER = /bin/sh $(CONFIGSRC)/util/ammkdirhier.sh $(ABIN)
/* Make wizardy: */
COMPILE.c=$(CC) $(CFLAGS) $(CPPFLAGS) -c
LINK.c=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
#if defined(i386Architecture)
ARCH = i80386
TOOLSET = ack
ALDFLAGS = /* -mam_i80386 now in CCopts */ -.c -Rcv-s32
#include <xfree86.cf>
#endif
#if defined(Sun3Architecture)
ARCH = mc68000
TOOLSET = ack
ALDFLAGS = -.c -Rcv-s32
#endif
#if defined(SparcArchitecture)
ARCH = sparc
TOOLSET = sun
SPARCLIBDIR = AmoebaBin/gnu/sparc
ALDFLAGS = -mam_sparc -n -Ttext 40000 -Bstatic -e start -L$(SPARCLIBDIR)
#endif
#define BootstrapCFlags -DAMOEBA -DCROSS_$(ARCH) -DCROSS_COMPILE
/*
* The rest of this files consists of rules to allow cross-compilation
* and installation of binaries and data files from the Unix host to
* the Amoeba file system.
*/
/* #ifdef CROSS_COMPILING */
#define CrossCompiling YES
#define HostLinkRule(target, flags, src, libs) cc -o target src
#define LinkRule(program,options,objects,libraries) \
$(LD) $(ALDFLAGS) $(HEAD) -o program options objects libraries $(EXTRA_LOAD_FLAGS)
/* ComplexHostProgramTarget - Compile a program such that we can run
* it on this host, i.e., don't use the default cross compiler.
*/
#ifndef ComplexHostProgramTarget
#define ComplexHostProgramTarget(program) @@\
CC=cc @@\
STD_INCLUDES= @@\
CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\
EXTRA_LOAD_FLAGS= @@\
PROGRAM = program @@\
@@\
AllTarget(program) @@\
@@\
program: $(OBJS) $(DEPLIBS) @@\
RemoveTargetProgram($@) @@\
HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
@@\
DependTarget() @@\
@@\
LintTarget() @@\
@@\
clean:: @@\
RemoveFile(ProgramTargetName(program))
#endif /* ComplexHostProgramTarget */
#ifndef SimpleHostProgramTarget
#define SimpleHostProgramTarget(program) @@\
OBJS = program.o @@\
SRCS = program.c @@\
@@\
ComplexHostProgramTarget(program)
#endif /* SimpleHostProgramTarget */
#ifndef Concat
#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
#define Concat(a,b)a##b
#else
#define Concat(a,b)a/**/b
#endif
#endif
/*
* LintLibReferences - variables for lint libraries
*/
#ifndef LintLibReferences
#define LintLibReferences(varname,libname,libsource) @@\
Concat(LINT,varname) = Concat(libsource/llib-,libname.ln)
#endif
/*
* UnsharedLibReferences - variables for unshared libraries
*/
#ifndef UnsharedLibReferences
#define UnsharedLibReferences(varname,libname,libsource) @@\
Concat3(DEP,varname,LIB) = Concat($(BUILDLIBDIR)/lib,libname.a) @@\
Concat(varname,LIB) = Concat($(BUILDLIBDIR)/lib,libname.a) @@\
LintLibReferences(varname,libname,libsource)
#endif
#ifndef InstallLibrary
#define InstallLibrary(libname,dest) @@\
install:: Concat(lib,libname.a) @@\
@echo '** TODO: Install Library ' Concat(lib,libname.a)
#endif /* InstallLibrary */
#ifndef MergeIntoInstalledLibrary
#define MergeIntoInstalledLibrary(tolib,fromlib) @@\
install:: fromlib @@\
@echo '** TODO: merge ' fromlib into tolib
#endif /* MergeIntoInstalledLibrary */
#ifndef InstallLibraryAlias
#define InstallLibraryAlias(libname,alias,dest) @@\
install:: @@\
@echo '** TODO: Install lib alias ' libname alias dest
#endif /* InstallLibraryAlias */
#ifndef InstallLintLibrary
#define InstallLintLibrary(libname,dest) @@\
install.ln:: Concat(llib-l,libname.ln) @@\
@echo '** TODO: Install lintlib ' Concat(llib-l,libname.ln)
#endif /* InstallLintLibrary */
#ifndef InstallManPageLong
#define InstallManPageLong(file,destdir,dest) @@\
install.man:: file.man @@\
@echo '** TODO: Install man page ' file.man
#endif /* InstallManPageLong */
#ifndef InstallGenManPageLong
#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
install.man:: file.man @@\
@echo '** TODO: Install man page ' file.man
#endif /* InstallGenManPageLong */
#ifndef InstallManPageAliases
#define InstallManPageAliases(file,destdir,aliases) @@\
install.man:: @@\
@(TMP=/tmp/tmp.$$$$; \ @@\
$(RM) $${TMP}; \ @@\
echo .so `basename destdir`/file.$(MANSUFFIX) > $${TMP}; \ @@\
for i in aliases; do (set -x; \ @@\
$(TOB) $${TMP} $(DESTDIR)destdir/$$i.$(MANSUFFIX)); \ @@\
done; \ @@\
$(RM) $${TMP})
#endif /* InstallManPageAliases */
#ifndef InstallGenManPageAliases
#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
install.man:: @@\
@(TMP=/tmp/tmp.$$$$; \ @@\
$(RM) $${TMP}; \ @@\
echo .so `basename destdir`/file.suffix > $${TMP}; \ @@\
for i in aliases; do (set -x; \ @@\
$(TOB) $${TMP} $(DESTDIR)destdir/$$i.suffix); \ @@\
done; \ @@\
$(RM) $${TMP})
#endif /* InstallGenManPageAliases */
#ifndef InstallNamedNonExec
#define InstallNamedNonExec(srcname,dstname,dest) @@\
install:: srcname @@\
$(MKXDIRHIER) $(DESTDIR)dest @@\
$(TOB) srcname $(DESTDIR)dest/dstname
#endif /* InstallNamedNonExec */
#ifndef InstallNonExecFile
#define InstallNonExecFile(file,dest) @@\
install:: file @@\
$(MKXDIRHIER) dest @@\
$(TOB) file dest/file
#endif /* InstallNonExecFile */
#ifndef InstallNonExec
#define InstallNonExec(file,dest) @@\
install:: file @@\
$(TOB) file dest/file
#endif /* InstallNonExec */
#ifndef InstallProgramWithFlags
#define InstallProgramWithFlags(program,dest,flags) @@\
install:: program @@\
$(MKXDIRHIER) dest/program @@\
$(AINSTALL) $(AINSTALLFLAGS) program dest/program/pd.$(ARCH)
#endif /* InstallProgramWithFlags */
#ifndef InstallScript
#define InstallScript(program,dest) @@\
install:: program.script @@\
$(TOB) program.script dest/program
#endif /* InstallScript */
#ifndef InstallNamedScript
#define InstallNamedScript(srcname,dstname,dest) @@\
install:: srcname @@\
$(TOB) srcname dest/dstname
#endif /* InstallNamedScript */
#ifndef InstallNamedProg
#define InstallNamedProg(srcname,dstname,dest) @@\
install:: srcname @@\
$(MKXDIRHIER) $(DESTDIR)dest/dstname @@\
$(AINSTALL) $(AINSTALLFLAGS) srcname $(DESTDIR)dest/dstname/pd.$(ARCH)
#endif /* InstallNamedProg */
#ifndef InstallMultipleDestFlags
#define InstallMultipleDestFlags(step,list,dest,flags) @@\
step:: list @@\
$(MKXDIRHIER) $(DESTDIR)dest @@\
@case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
for i in list; do \ @@\
(set -x; $(TOB) $$i dest/$$i); \ @@\
done
#endif /* InstallMultipleDestFlags */
#ifndef InstallMultipleProg
#define InstallMultipleProg(list,dest) @@\
install:: list @@\
@case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
for i in list; do \ @@\
(set -x; \ @@\
$(MKXDIRHIER) $(DESTDIR)dest/$$i; \ @@\
$(AINSTALL) $(AINSTALLFLAGS) $$i dest/$$i/pd.$(ARCH));\ @@\
done
#endif /* InstallMultipleProg */
#ifndef InstallAppDefaults
#if InstallAppDefFiles
#define InstallAppDefaults(class) @@\
install:: class.ad @@\
$(MKXDIRHIER) $(XAPPLOADDIR) @@\
$(TOB) class.ad $(DESTDIR)$(XAPPLOADDIR)/class
#else
#define InstallAppDefaults(class)
#endif /* InstallAppDefFiles */
#endif /* InstallAppDefaults */
#ifndef InstallAppDefaultsLong
#if InstallAppDefFiles
#define InstallAppDefaultsLong(file,class) @@\
install:: file.ad @@\
$(MKXDIRHIER) $(DESTDIR)$(XAPPLOADDIR) @@\
$(TOB) file.ad $(DESTDIR)$(XAPPLOADDIR)/class
#else
#define InstallAppDefaultsLong(file,class)
#endif /* InstallAppDefFiles */
#endif /* InstallAppDefaultsLong */
/* #endif CROSS_COMPILE */

View file

@ -197,29 +197,6 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
# endif
#endif /* __FreeBSD__ */
#ifdef AMOEBA
/* Should be before the 'sun' entry because we may be cross-compiling */
# define MacroIncludeFile <Amoeba.cf>
# define MacroFile Amoeba.cf
# if defined(i80386) || defined(__i80386__)
# undef i80386
# define i386Architecture
# else
# if defined(mc68000) || defined(__mc68000__)
# undef mc68000
# define Sun3Architecture
# define SunArchitecture
# else
# if defined(sparc) || defined(__sparc__)
# undef sparc
# define SparcArchitecture
# define SunArchitecture
# endif
# endif
# undef sun
# endif
#endif /* AMOEBA */
#ifdef sun
# define MacroIncludeFile <sun.cf>
# define MacroFile sun.cf
@ -469,12 +446,6 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
# undef SVR4
#endif /* Oki */
#ifdef WIN32
# define MacroIncludeFile <Win32.cf>
# define MacroFile Win32.cf
# define Win32Architecture
#endif /* WIN32 */
#ifdef linux
# define MacroIncludeFile <linux.cf>
# define MacroFile linux.cf

View file

@ -15,7 +15,6 @@ site.def
RULEFILES = \
Imake.rules \
Motif.rules \
Win32.rules \
X11.rules \
bsdLib.rules \
cde.rules \
@ -55,13 +54,11 @@ xf86.tmpl
CFFILES = \
Imake.cf \
Amoeba.cf \
DGUX.cf \
FreeBSD.cf \
Mips.cf \
NetBSD.cf \
Oki.cf \
Win32.cf \
bsd.cf \
convex.cf \
cray.cf \

View file

@ -1,133 +0,0 @@
XCOMM platform: $TOG: Win32.cf /main/57 1997/12/04 11:03:33 kaleb $
#ifndef OSName
#define OSName DefaultOSName
#endif
#ifndef OSMajorVersion
#define OSMajorVersion DefaultOSMajorVersion
#endif
#ifndef OSMinorVersion
#define OSMinorVersion DefaultOSMinorVersion
#endif
#ifndef OSTeenyVersion
#define OSTeenyVersion DefaultOSTeenyVersion
#endif
XCOMM operating system: OSName OSMajorVersion./**/OSMinorVersion
#ifndef CompilerMajorVersion
/* 0 == NT 3.1 Win32 SDK, 2 == MSVC++ 2, 4 == MSVC 4 */
#define CompilerMajorVersion 4
#endif
#define BootstrapCFlags -DWIN32
#ifdef _M_IX86
#define CpuDefines -D_X86_
#endif
/* brain-damaged windows headers will not compile with -Za */
#define StandardDefines -DWIN32 -DWIN32_LEAN_AND_MEAN -D_DLL -D_MT -D__STDC__ CpuDefines
#if CompilerMajorVersion < 4
#define DefaultCCOptions -nologo -batch -G4 -W2
#else
#define DefaultCCOptions -nologo -G4 -W2
#endif
#if CompilerMajorVersion < 4
#define DebuggableCDebugFlags -Zi
#else
#define DebuggableCDebugFlags -Zi -Od
#endif
#define ThreadedX YES
#define HasThreadSafeAPI NO
#define CpCmd copy
#define LnCmd copy
#define MvCmd ren
#define RmCmd del
#ifndef RmTreeCmd
XCOMM choices here include:
XCOMM o `del /q /s` and live with pressing the "any" key
XCOMM o `deltree, copied from MS-DOS 5
XCOMM o `rm -rfx` from the SDK Subscription (MSTOOLS in your Path)
XCOMM o `rm -rf` from the GNU file utilities
XCOMM We're using the GNU file utilities
#define RmTreeCmd rm -rf
#endif
#define CcCmd cl
#define HasCplusplus YES
#define CplusplusCmd cl
#if CompilerMajorVersion < 4
#define PreProcessCmd CcCmd -nologo -batch -EP
#define CppCmd CcCmd -nologo -batch -E
#else
#define PreProcessCmd CcCmd -nologo -EP
#define CppCmd CcCmd -nologo -E
#endif
#define PatheticCpp YES
#define ConstructMFLAGS YES
#if (CompilerMajorVersion == 0)
#define ArCmdBase lib32
#else
#define ArCmdBase lib
#endif
#define ArCmd ArCmdBase
#define CplusplusCmd cl
#define MkdirHierCmd $(CONFIGSRC:/=\)\util\mkdirhier
#define InstallCmd copy
#define InstPgmFlags /**/
#define InstBinFlags /**/
#define InstUidFlags /**/
#define InstLibFlags /**/
#define InstIncFlags /**/
#define InstManFlags /**/
#define InstDatFlags /**/
#define InstallFlags /**/
#if (CompilerMajorVersion == 0)
#define ExtraLibraries crtdll.lib kernel32.lib wsock32.lib
#elif (CompilerMajorVersion < 4)
#define ExtraLibraries msvcrt.lib kernel32.lib wsock32.lib
#else
#define ExtraLibraries msvcrt.lib kernel32.lib wsock32.lib -link -nodefaultlib:libc
#endif
#define MakeCmd nmake -nologo
#if (CompilerMajorVersion == 0)
#define LdCmd link32
#else
#define LdCmd link
#endif
#define MathLibrary
#define HasSymLinks NO
#define HasVarDirectory NO
#define HasPutenv YES
#define Osuf obj
#ifndef CCsuf
#define CCsuf cxx
#endif
#define BuildServer NO
#define ConnectionFlags -DTCPCONN
/* override as necessary in site.def/host.def */
#ifndef StdIncDir
#define StdIncDir C:/MSDEVSTD/INCLUDE
#endif
#define LdPreLib /**/
#define LdPostLib /**/
#ifndef UseInstalled
#define ImakeCmd $(IMAKESRC:/=\)\imake
#define DependCmd $(DEPENDSRC:/=\)\makedepend
#endif
#define DependFlags -D_WIN32
#define FilesToClean *.bak *.obj *.lib make.log
#define ShLibDir $(BINDIR)
#define XFileSearchPathBase Concat4($(LIBDIR)/;L/;T/;N;C,;S:$(LIBDIR)/;l/;T/;N;C,;S:$(LIBDIR)/;T/;N;C,;S:$(LIBDIR)/;L/;T/;N;S:$(LIBDIR)/;l/;T/;N;S:$(LIBDIR)/;T/;N;S)
#define XawI18nDefines -DHAS_WCHAR_H
#define UseRgbTxt YES
#define HasCbrt NO
#define HasFfs NO
#define HasXdmAuth NO
/* the following components haven't been ported yet */
#define BuildLBX NO
#define BuildXprint NO
#define XprtServer NO
#include <Win32.rules>

View file

@ -1,525 +0,0 @@
XCOMM platform: $TOG: Win32.rules /main/51 1997/12/02 14:48:29 kaleb $
#define HasSharedLibraries YES
#define NeedLibInsideFlag YES
#define SharedLibXaw NO
#define SharedLibXmu NO
#define SharedLibXt NO
#define SharedDataSeparation NO
#define SharedCodeDef /**/
#define SharedLibraryDef /**/
#define ShLibIncludeFile <WinLib.tmpl>
#define SharedLibraryLoadFlags -dll
#define PositionIndependentCFlags /**/
.c.obj:
$(CC) -c $*.c @<<
$(CFLAGS)
<<
#if HasCplusplus
.CCsuf.obj:
$(CXX) -c $*.CCsuf @<<
$(CFLAGS)
<<
#endif
#define ProgramTargetName(target) target.exe
#define RunProgram(progvar,options) $(progvar:/=\) options
#define RemoveFile(file) if exist file $(RM) file
#define RemoveFiles(files) @$(MAKE) $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: files @@\
!for %%i in ( Avoid.Error $$** ) do if exist %%i $(RM) %%i @@\
@@\
Avoid.Error files: @@\
<<
#define MakeDir(dir) -$(MKDIRHIER) dir
#define ObjectCompile(options) RemoveFile($@) @@\
$(CC) -c $*.c @<< @@\
$(CFLAGS) options @@\
<<
#define LibObjCompile(dir,options) RemoveFiles($@ dir\$@) @@\
$(CC) -c $*.c @<< @@\
$(CCOPTIONS) $(ALLDEFINES) options @@\
<< @@\
$(MV) $@ dir\$@
#define BuildIncludesTop(srclist,dstsubdir,dstupdir) @@\
includes:: srclist @@\
MakeDir($(BUILDINCDIR:/=\)) @@\
@$(MAKE) $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: srclist @@\
cd $(BUILDINCDIR:/=\) @@\
!RemoveFile($$**) @@\
!$(LN) $(BUILDINCTOP:/=\)\$(CURRENT_DIR:/=\)\$$** . @@\
@@\
Avoid.Error srclist: @@\
<<
#define BuildIncludes(srclist,dstsubdir,dstupdir) @@\
XVARdef0 = $(BUILDINCDIR)/dstsubdir @@\
XVARdef1 = $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR) @@\
@@\
includes:: srclist @@\
MakeDir($(XVARuse0:/=\)) @@\
@$(MAKE) -A $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: srclist @@\
cd $(XVARuse0:/=\) @@\
!RemoveFile($$**) @@\
!$(LN) $(XVARuse1:/=\)\$$** . @@\
@@\
Avoid.Error srclist: @@\
<<
#define LinkFileList(step,list,dir,sub) @@\
XVARdef0 = dir @@\
XVARdef1 = sub @@\
XVARdef2 = list @@\
@@\
step:: $(XVARuse2:/=\) @@\
cd $(XVARuse0:/=\) @@\
!RemoveFile($**) @@\
!$(LN) $(XVARuse1:/=\)\\$** .
#define LinkRule(program,options,objects,libraries) \
$(CCLINK) Concat(-Fe,program) options objects libraries $(EXTRA_LOAD_FLAGS)
#define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\
XVARdef0 = objects @@\
@@\
ProgramTargetName(program): $(XVARuse0:.o=.obj) deplibs @@\
RemoveTargetProgram($@) @@\
LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),locallibs $(LDLIBS) syslibs) @@\
@@\
clean:: @@\
RemoveFile(ProgramTargetName(program))
#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\
ProgramTargetName(program): $(objs:.o=.obj) $(deplib) @@\
RemoveTargetProgram($@) @@\
LinkRule($@,$(LDOPTIONS),$(objs:.o=.obj),locallib $(LDLIBS) syslib) @@\
@@\
InstallProgram(program,$(BINDIR)) @@\
InstallManPage(program,$(MANDIR))
#define ComplexProgramTarget(program) @@\
PROGRAM = ProgramTargetName(program) @@\
@@\
AllTarget(ProgramTargetName(program)) @@\
@@\
ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
@@\
DependTarget() @@\
LintTarget() @@\
@@\
clean:: @@\
RemoveFile($(PROGRAM))
#define ComplexProgramTarget_1(program,locallib,syslib) @@\
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) @@\
SRCS = $(SRCS1) $(SRCS2) $(SRCS3) @@\
PROGRAM1 = ProgramTargetName(program) @@\
@@\
AllTarget($(PROGRAM1) $(PROGRAM2) $(PROGRAM3)) @@\
@@\
ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib) @@\
@@\
DependTarget() @@\
LintTarget() @@\
@@\
clean:: @@\
for %%i in ($(PROGRAMS)) do $(RM) ProgramTargetName(%%i)
#define ComplexProgramTarget_2(program,locallib,syslib) @@\
PROGRAM2 = ProgramTargetName(program) @@\
@@\
ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
#define ComplexProgramTarget_3(program,locallib,syslib) @@\
PROGRAM3 = ProgramTargetName(program) @@\
@@\
ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
#define MoveToBakFile(file) -@if exist file $(MV) file file.bak
#define RMoveToBakFile(file) -RemoveFile(file.bak) @@\
-@if exist file $(MV) file file.bak
#define InstallMultipleDestFlags(step,list,dest,flags) @@\
XVARdef0 = $(DESTDIR)dest @@\
@@\
step:: list @@\
MakeDir($(XVARuse0:/=\)) @@\
!$(INSTALL) $(INSTALLFLAGS) flags $** $(XVARuse0:/=\)
#define CleanTarget() @@\
clean:: @@\
RemoveFiles(FilesToClean ExtraFilesToClean)
#define LibraryTargetName(libname)libname.lib
#define LibraryTargetNameSuffix(libname,suffix)Concat(libname,suffix.lib)
#define MakeLibrary(libname,objlist) $(AR) @<< @@\
-out:libname objlist @@\
<<
#define LinkSourceFile(src,dir) @@\
XVARdef0 = dir/src @@\
@@\
src: $(XVARuse0:/=\) @@\
RemoveFile($@) @@\
$(LN) $? $@ @@\
@@\
includes:: src @@\
@@\
depends:: src @@\
@@\
clean:: @@\
RemoveFile(src)
#define LinkFile(tofile,fromfile) @@\
XVARdef0 = fromfile @@\
tofile:: $(XVARuse0:/=\) @@\
RemoveFile($@) @@\
$(LN) $? $@ @@\
@@\
includes:: tofile @@\
@@\
depend:: tofile @@\
@@\
clean:: @@\
RemoveFile(tofile)
#define NormalLibraryTarget(libname,objlist) @@\
AllTarget(LibraryTargetName(libname)) @@\
@@\
XVARdef0 = objlist @@\
@@\
LibraryTargetName(libname): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
MakeLibrary($@,$(XVARuse0:.o=.obj)) @@\
LinkBuildLibrary($@)
#define NormalLibraryTarget2(libname,objlist1,objlist2) @@\
NormalLibraryTarget(libname,objlist1 objlist2)
#define NormalLibraryTarget3(libname,objlist1,objlist2,objlist3) @@\
NormalLibraryTarget(libname,objlist1 objlist2 objlist3)
#define NormalDepLibraryTarget(libname,deplist,objlist) @@\
AllTarget(LibraryTargetName(libname)) @@\
@@\
XVARdef0 = deplist @@\
XVARdef1 = objlist @@\
XVARdef2 = $(XVARuse1:/=\) @@\
@@\
LibraryTargetName(libname): $(XVARuse0:/=\) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
MakeLibrary($@,$(XVARuse2:.o=.obj)) @@\
LinkBuildLibrary($@)
#define ProfiledLibraryTarget(libname,objlist) @@\
AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\
@@\
XVARdef0 = objlist @@\
@@\
LibraryTargetNameSuffix(libname,_p): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
cd profiled @@\
MakeLibrary(..\$@,$(XVARuse0:.o=.obj)) @@\
cd ..
#define DebuggedLibraryTarget(libname,objlist) @@\
AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\
@@\
XVARdef0 = objlist @@\
@@\
LibraryTargetNameSuffix(libname,_d): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
cd debugger @@\
MakeLibrary(..\$@,$(XVARuse0:.o=.obj)) @@\
cd ..
#ifndef UseInstalled
#define ImakeDependency(target) @@\
target:: ProgramTargetName($(IMAKE)) @@\
@@\
ProgramTargetName($(IMAKE)): @@\
<<tmp.bat @@\
cd $(IMAKESRC:/=\) @@\
if exist Makefile $(MAKE) all @@\
if not exist Makefile $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)" @@\
<<
#endif
#ifndef UseInstalled
#define DependDependency() @@\
depend:: ProgramTargetName($(DEPEND)) @@\
@@\
ProgramTargetName($(DEPEND)): @@\
<<tmp.bat @@\
cd $(DEPENDSRC:/=\) @@\
$(MAKE) @@\
<<
#endif
#define DependTarget() @@\
DependDependency() @@\
@@\
depend:: @@\
$(DEPEND:/=\) @<< @@\
$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) @@\
<<
#define DependTarget3(srcs1,srcs2,srcs3) @@\
DependDependency() @@\
@@\
depend:: @@\
$(DEPEND:/=\) @<< @@\
$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1 srcs2 srcs3 @@\
<<
#define ForceSubdirs(dirs) @@\
Avoid.Error dirs: FRC @@\
@cd $@ @@\
@echo making all in $(CURRENT_DIR)/$@... @@\
$(MAKE) $(MFLAGS) PassCDebugFlags all @@\
cd .. @@\
@@\
FRC:
#define MakeMakeSubdirs(dirs,target) @@\
XVARdef0 = dirs @@\
XVARdef1 = $$ @@\
@@\
target:: @@\
@$(MAKE) -A $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: $(XVARuse0:/=\) @@\
@@\
Avoid.Error $(XVARuse0:/=\): @@\
cd $(XVARuse1)@ @@\
RMoveToBakFile(Makefile) @@\
ImakeSubCmdHelper -DTOPDIR=../$(TOP) -DCURDIR=$(CURRENT_DIR)/$(XVARuse1)@ @@\
$(MAKE) $(MFLAGS) Makefiles @@\
cd .. @@\
<<
#ifdef UseInstalled
# define ImakeSubCmdHelper $(IMAKE_CMD)
#else
# define ImakeSubCmdHelper ..\$(IMAKE) -I../$(IRULESRC) $(IMAKE_DEFINES)
#endif
#define NamedTargetSubdirs(name,dirs,verb,flags,subname) @@\
XVARdef0 = dirs @@\
XVARdef1 = $$ @@\
@@\
name:: @@\
@$(MAKE) -A $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: $(XVARuse0:/=\) @@\
@@\
Avoid.Error $(XVARuse0:/=\): @@\
cd $(XVARuse1)@ @@\
@echo verb in $(CURRENT_DIR)/$(XVARuse1)@... @@\
$(MAKE) $(MFLAGS) flags subname @@\
cd .. @@\
<<
#define UnsharedLibReferences(varname,libname,libsource) @@\
Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,libsource/,libname.lib) @@\
Concat(varname,LIB) = LoaderLibPrefix _Use(libname.lib,$(Concat3(DEP,varname,LIB))) @@\
LintLibReferences(varname,libname,libsource)
#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
revname = rev @@\
UnsharedLibReferences(varname,libname,libsource)
#define SubdirLibraryRule(objlist) @@\
XVARdef0 = objlist @@\
@@\
all:: DONE @@\
@@\
DONE: $(XVARuse0:.o=.obj) @@\
RemoveFile($@) @@\
echo - > $@ @@\
@@\
clean:: @@\
RemoveFile(DONE)
#define CppScriptTarget(dst,src,defs,deplist) @@\
dst:: @@\
@echo sorry, unable to make $@
#define CppFileTarget(dst,src,defs,deplist) @@\
XFAKEVAR = X @@\
dst:: src deplist @@\
RemoveFile($@) @@\
$(PREPROCESSCMD) -I. <<CppTmpFile.c @<< >$@ @@\
XCOMM define $(XFAKEVAR)COMM XCOMM @@\
XCOMM include <src> @@\
<< @@\
defs @@\
<< @@\
@@\
clean:: @@\
RemoveFiles(dst)
#define InstallNamedTarget(step,srcname,flags,dest,dstname) @@\
XVARdef0 = $(DESTDIR)dest @@\
@@\
step:: srcname @@\
MakeDir($(XVARuse0:/=\)) @@\
$(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
#define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname) @@\
XVARdef0 = $(DESTDIR)dest @@\
@@\
step:: srcname @@\
MakeDir($(XVARuse0:/=\)) @@\
@if exist $(XVARuse0:/=\)\\dstname echo Not overwriting existing $(XVARuse0:/=\)\\dstname @@\
if not exist $(XVARuse0:/=\)\\dstname $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
#define InstallLibrary(libname,dest) @@\
InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),dest)
#define InstallScript(program,dest) /**/
#define InstallNamedProg(srcname,dstname,dest) @@\
install:: srcname @@\
@echo sorry, unable to install srcname
#define InstallSharedLibrary(libname,rev,dest) @@\
InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
InstallTarget(install,libname.dll,$(INSTLIBFLAGS),dest)
#define InstallSharedLibraryData(libname,rev,dest)
#define MakeDLL(libname,solist) $(LD) @<< @@\
$(SHLIBLDFLAGS) -out:libname.dll libname.exp solist @@\
<<
#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
AllTarget(libname.dll) @@\
@@\
CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
@@\
XVARdef0 = solist @@\
@@\
LibraryTargetName(libname): $(XVARuse0:.o=.obj) libname.def $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
MakeLibrary($@,-def:libname.def $(XVARuse0:.o=.obj)) @@\
LinkBuildLibrary($@) @@\
@@\
libname.dll: LibraryTargetName(libname) $(EXTRALIBRARYDEPS) @@\
RemoveFile(libname.dll) @@\
MakeDLL(libname,$(XVARuse0:.o=.obj) $(REQUIREDLIBS) $(EXTRA_LIBRARIES)) @@\
LinkBuildDLL(libname.dll) @@\
@@\
clean:: @@\
RemoveFile(LibraryTargetName(libname)) @@\
RemoveFile(libname.dll)
#define SharedLibraryDataTarget(libname,rev,salist)
#define ObjectCplusplusCompile(options) RemoveFile($@) @@\
$(CXX) -c $*.CCsuf @<< @@\
$(CFLAGS) options @@\
<<
#define CplusplusLinkRule LinkRule
#define CplusplusProgramTargetHelper ProgramTargetHelper
#ifndef ComplexCplusplusProgramTarget
#define ComplexCplusplusProgramTarget(program) @@\
PROGRAM = ProgramTargetName(program) @@\
@@\
AllTarget(ProgramTargetName(program)) @@\
@@\
CplusplusProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
@@\
DependTarget() @@\
LintTarget() @@\
@@\
clean:: @@\
RemoveFile(ProgramTargetName(program))
#endif /* ComplexCplusplusProgramTarget */
#ifndef UseInstalled
# define LinkBuildDLL(binary) MakeDir($(BUILDBINDIR:/=\)) @@\
RemoveFile(Concat($(BUILDBINDIR:/=\)\,binary)) @@\
cd $(BUILDBINDIR:/=\) && $(LN) Concat($(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\,binary) .
# ifdef LinkBuildBinary
# undef LinkBuildBinary
# endif
# define LinkBuildBinary(binary) @@\
all:: $(BUILDBINDIR)\ProgramTargetName(binary) ProgramTargetName(binary) @@\
@@\
$(BUILDBINDIR)\ProgramTargetName(binary): ProgramTargetName(binary) @@\
MakeDir($(BUILDBINDIR:/=\)) @@\
RemoveFile($(BUILDBINDIR:/=\)\ProgramTargetName(binary))) @@\
cd $(BUILDBINDIR:/=\) && $(LN) $(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\ProgramTargetName(binary) .
# ifdef LinkBuildLibrary
# undef LinkBuildLibrary
# endif
# define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR:/=\)) @@\
RemoveFile(Concat($(BUILDLIBDIR:/=\)\,lib)) @@\
cd $(BUILDLIBDIR:/=\) && $(LN) Concat($(BUILDLIBTOP:/=\)\$(CURRENT_DIR:/=\)\,lib) .
#endif
#ifndef ProjectUnsharedLibReferences
#define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\
Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/lib,buildlibdir/,libname.lib) @@\
Concat(varname,LIB) = $(Concat3(DEP,varname,LIB)) @@\
LintLibReferences(varname,libname,libsource)
#endif
/*
* ServerTargetWithFlags - generate rules to compile, link, and relink a server
*/
#ifndef ServerTargetWithFlags
#define ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
XVARdef0 = objects @@\
@@\
AllTarget(ProgramTargetName(server)) @@\
ProgramTargetName(server): subdirs $(XVARuse0:.o=.obj) libs @@\
MoveToBakFile($@) @@\
LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
@@\
Concat(load,server): @@\
MoveToBakFile(ProgramTargetName(server)) @@\
LinkRule(ProgramTargetName(server),$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
@@\
loadX:: Concat(load,server) @@\
@@\
ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
@@\
InstallProgramWithFlags(server,$(BINDIR),flags) @@\
@@\
clean:: @@\
RemoveFile(ProgramTargetName(server))
#endif /* ServerTargetWithFlags */

View file

@ -50,16 +50,3 @@ clean:
$(RM) -r Makefile.proto Makefile Makefile.dep bootstrap .depend
depend:
imake.exe::
@echo making imake with BOOTSTRAPCFLAGS=-DWIN32
imake.exe:: imake.obj
cl -nologo imake.obj libc.lib kernel32.lib
imake.obj: imake.c
cl -nologo -W2 -D__STDC__ -c -DWIN32 $(CFLAGS) imake.c
clean.Win32:
if exist imake.exe del imake.exe
if exist imake.obj del imake.obj

View file

@ -161,9 +161,6 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <ctype.h>
#include "Xosdefs.h"
#ifdef WIN32
# include "Xw32defs.h"
#endif
#ifndef X_NOT_POSIX
# ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
@ -172,9 +169,7 @@ in this Software without prior written authorization from The Open Group.
#include <sys/types.h>
#include <fcntl.h>
#ifdef X_NOT_POSIX
# ifndef WIN32
# include <sys/file.h>
# endif
# include <sys/file.h>
#else
# include <unistd.h>
#endif
@ -203,15 +198,10 @@ typedef int waitType;
# define waitSig(w) ((w) & 0xff)
typedef int waitType;
# else /* SYSV */
# ifdef WIN32
# include <process.h>
typedef int waitType;
# else
# include <sys/wait.h>
# define waitCode(w) ((w).w_T.w_Retcode)
# define waitSig(w) ((w).w_T.w_Termsig)
typedef union wait waitType;
# endif
# endif
# ifndef WIFSIGNALED
# define WIFSIGNALED(w) waitSig(w)
@ -233,11 +223,7 @@ extern char *getenv();
#ifdef X_NOT_STDC_ENV
extern int errno;
#endif
#ifndef WIN32
#include <sys/utsname.h>
#else
#include <windows.h>
#endif
#ifndef SYS_NMLN
# ifdef _SYS_NMLN
# define SYS_NMLN _SYS_NMLN
@ -316,13 +302,7 @@ static char *cpp = NULL;
static char *tmpMakefile = "/tmp/Imf.XXXXXX";
static char *tmpImakefile = "/tmp/IIf.XXXXXX";
static char *make_argv[ ARGUMENTS ] = {
#ifdef WIN32
"nmake"
#else
"make"
#endif
};
static char *make_argv[ ARGUMENTS ] = {"make"};
static int make_argindex;
static int cpp_argindex;
@ -727,15 +707,6 @@ doit(FILE *outfd, const char *cmd, char **argv)
/*
* Fork and exec the command.
*/
#ifdef WIN32
if (outfd)
dup2(fileno(outfd), 1);
status = _spawnvp(_P_WAIT, cmd, argv);
if (status < 0)
LogFatal("Cannot spawn %s.", cmd);
if (status > 0)
LogFatal("Exit code %d.", status);
#else
pid = fork();
if (pid < 0)
LogFatal("Cannot fork.");
@ -756,11 +727,8 @@ doit(FILE *outfd, const char *cmd, char **argv)
execvp(cmd, argv);
LogFatal("Cannot exec %s.", cmd);
}
#endif
}
#ifndef WIN32
#if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \
defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
static void
@ -828,13 +796,12 @@ parse_utsname(struct utsname *name, const char *fmt, char *result, const char *m
int ret = sscanf(buf, fmt + arg + 1, result);
(void) ret;
}
#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.
*/
#if (defined(DEFAULT_OS_MAJOR_REV) || defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
static const char *
trim_version(const char *p)
@ -1240,7 +1207,6 @@ get_gcc_incdir(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(DEFAULT_OS_TEENY_REV))
struct utsname name;
@ -1287,22 +1253,6 @@ define_os_defaults(FILE *inFile)
#if defined (sun) && defined(SVR4)
get_sun_compiler_versions (inFile);
#endif
#else /* WIN32 */
OSVERSIONINFO osvi;
static char* os_names[] = { "Win32s", "Windows 95", "Windows NT" };
memset(&osvi, 0, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
GetVersionEx (&osvi);
fprintf (inFile, "#define DefaultOSName Microsoft %s\n",
os_names[osvi.dwPlatformId]);
fprintf(inFile, "#define DefaultOSMajorVersion %d\n", osvi.dwMajorVersion);
fprintf(inFile, "#define DefaultOSMinorVersion %d\n", osvi.dwMinorVersion);
fprintf(inFile, "#define DefaultOSTeenyVersion %d\n",
osvi.dwBuildNumber & 0xFFFF);
#endif /* WIN32 */
return FALSE;
}
@ -1539,9 +1489,6 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
char *p1, *p2;
if (! initialized) {
#ifdef WIN32
FILE *fp = tmpfd;
#endif
int total_red;
struct stat st;
@ -1558,12 +1505,8 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
end = buf + total_red;
*end = '\0';
fseek(tmpfd, 0, 0);
#if defined(SYSV) || defined(WIN32)
#if defined(SYSV)
tmpfd = freopen(tmpfname, "w+", tmpfd);
#ifdef WIN32
if (! tmpfd) /* if failed try again */
tmpfd = freopen(tmpfname, "w+", fp);
#endif
if (! tmpfd)
LogFatal("cannot reopen %s.", tmpfname);
#else /* !SYSV */
@ -1587,10 +1530,6 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
break;
}
else if (*p1 == '\n') { /* real EOL */
#ifdef WIN32
if (p1 > pline && p1[-1] == '\r')
p1[-1] = '\0';
#endif
*p1++ = '\0';
break;
}
@ -1653,9 +1592,6 @@ KludgeOutputLine(char **pline)
if (quotechar) {
if (quotechar == '\\' ||
(*p == quotechar &&
# ifdef WIN32
quotechar != ')' &&
# endif
p[-1] != '\\'))
quotechar = '\0';
continue;

View file

@ -99,10 +99,10 @@ in this Software without prior written authorization from The Open Group.
#ifdef Mips
# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
# define imake_ccflags "-DBSD43"
# else
# else
# define imake_ccflags "-DSYSV"
# endif
#endif
#endif
#ifdef is68k
#define imake_ccflags "-Dluna -Duniosb"
@ -132,14 +132,6 @@ in this Software without prior written authorization from The Open Group.
#define imake_ccflags "-fn -tm c1"
#endif
#ifdef WIN32
#if _MSC_VER < 1000
#define imake_ccflags "-nologo -batch -D__STDC__"
#else
#define imake_ccflags "-nologo -D__STDC__"
#endif
#endif
#ifdef __sxg__
#define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
#endif
@ -207,14 +199,9 @@ in this Software without prior written authorization from The Open Group.
* all colons). One way to tell if you need this is to see whether or not
* your Makefiles have no tabs in them and lots of @@ strings.
*/
#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__llvm__) || (defined(AMOEBA) && defined(CROSS_COMPILE))
#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(__llvm__)
#define FIXUP_CPP_WHITESPACE
#endif
#ifdef WIN32
#define REMOVE_CPP_LEADSPACE
#define INLINE_SYNTAX
#define MAGIC_MAKE_VARS
#endif
/*
* Step 4: USE_CC_E, DEFAULT_CC, DEFAULT_CPP
@ -225,10 +212,6 @@ in this Software without prior written authorization from The Open Group.
#ifdef hpux
#define USE_CC_E
#endif
#ifdef WIN32
#define USE_CC_E
#define DEFAULT_CC "cl"
#endif
#if defined(_IBMR2) && !defined(DEFAULT_CPP)
#define DEFAULT_CPP "/usr/ccs/lib/cpp"
#endif
@ -475,14 +458,6 @@ char *cpp_argv[ARGUMENTS] = {
"-DSVR4",
#endif
#endif
#ifdef WIN32
"-DWIN32",
"-nologo",
#if _MSC_VER < 1000
"-batch",
#endif
"-D__STDC__",
#endif
#ifdef NCR
"-DNCR", /* NCR */
#endif
@ -490,40 +465,6 @@ char *cpp_argv[ARGUMENTS] = {
"-traditional",
"-D__linux__",
#endif
#ifdef __sxg__
"-D__sxg__",
#endif
#ifdef nec_ews_svr2
"-Dnec_ews_svr2",
#endif
#ifdef AMOEBA
"-DAMOEBA",
# ifdef CROSS_COMPILE
"-DCROSS_COMPILE",
# ifdef CROSS_i80386
"-DCROSS_i80386",
# endif
# ifdef CROSS_sparc
"-DCROSS_sparc",
# endif
# ifdef CROSS_mc68000
"-DCROSS_mc68000",
# endif
# else
# ifdef i80386
"-Di80386",
# endif
# ifdef sparc
"-Dsparc",
# endif
# ifdef mc68000
"-Dmc68000",
# endif
# endif
#endif
#if defined(__sgi) && defined(__ANSI_CPP__)
"-cckr",
#endif
#ifdef __minix_vmd
"-Dminix",
#endif

View file

@ -134,7 +134,7 @@ catch (sig)
fatalerr ("got signal %d\n", sig);
}
#if defined(USG) || (defined(i386) && defined(SYSV)) || defined(WIN32)
#if defined(USG) || (defined(i386) && defined(SYSV))
#define USGISH
#endif
@ -661,15 +661,8 @@ redirect(line, makefile)
fatalerr("cannot open \"%s\"\n", makefile);
snprintf(backup, BUFSIZ, "%s.bak", makefile);
unlink(backup);
#ifdef WIN32
fclose(fdin);
#endif
if (rename(makefile, backup) < 0)
fatalerr("cannot rename %s to %s\n", makefile, backup);
#ifdef WIN32
if ((fdin = fopen(backup, "r")) == NULL)
fatalerr("cannot open \"%s\"\n", backup);
#endif
if ((fdout = freopen(makefile, "w", stdout)) == NULL)
fatalerr("cannot open \"%s\"\n", backup);
len = strlen(line);

View file

@ -7,18 +7,10 @@ MDEP_PROG = makedepend
EXPORTLISTGEN = exportlistgen
#endif
#ifdef Win32Architecture
CMKDIRHIER = mkdirhier.exe
#endif
PROGRAMS = xmkmf $(MDEP_PROG) mergelib ProgramTargetName(makestrs) $(EXPORTLISTGEN) $(CMKDIRHIER)
DEPLIBS =
DEPEND_DEFINES = $(DEPENDDEFINES)
#ifndef Win32Architecture
EXTRA_LIBRARIES =
#endif
XCOMM Some compilers generate fatal errors if an -L directory does
XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use.
LDPRELIB =
@ -45,10 +37,6 @@ SimpleProgramTarget(lndir)
#endif
#endif
#ifdef Win32Architecture
SimpleProgramTarget(mkdirhier)
#endif
NormalProgramTarget(makestrs,makestrs.o,,,)
InstallNamedProg(xmkmf,xmkmf,$(BINDIR))

View file

@ -1,74 +0,0 @@
#!/bin/sh
# $XConsortium: aminstall.sh,v 1.1 94/03/29 15:54:08 gildea Exp $
# aminstall - transfer cross-compiled files to system running Amoeba.
# Usage: aminstall binary-directory [-s stksz] unix-source amoeba-dest
#
# Default soap mask for files
#
SPMASK=0xFF:2:2
export SPMASK
PROG=$0
USAGE="Usage: $PROG binary-directory unix-source amoeba-dest"
#
# Argument check
#
case $# in
3|5) ;;
*) echo $USAGE >&2
exit 1
;;
esac
bindir=$1
stksz=
case $2 in
-s) if [ $# -ne 5 ]
then
echo $USAGE >&2
exit 1
fi
stksz="-s $3"
shift
shift
;;
esac
unxfile=$2
dest=$3
#
# Change /public .... into /super (just for installation)
#
stripped=`echo $dest | sed 's:^/public::'`
if [ X$dest != X$stripped ]; then
dest=/super$stripped
fi
#
# If the file already exists, then delete it
#
INFO=`$bindir/std_info $dest 2>&1`
case $INFO in
*"not found"*) ;;
*failed*) ;;
*bytes*) $bindir/del -f $dest
;;
/??????) echo $PROG: cannot install over directory 1>&2
exit
;;
*) $bindir/del -d $dest
;;
esac
#
# Transfer the file to Amoeba
#
$bindir/../bin.scripts/ainstall $stksz $unxfile $dest > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "This is not binary - using tob"
$bindir/tob $unxfile $dest
fi

View file

@ -1,7 +1,7 @@
Common Desktop Environment Version 2.3.0 (stable)
Common Desktop Environment Version 2.3.0a (devel)
(c) Copyright 1993-2012 The Open Group
(c) Copyright 2012-2018 CDE Project contributors, see CONTRIBUTORS for details

View file

@ -303,6 +303,11 @@ programs/localized/%_LANG_%/app-defaults/Dtbuilder
install_target = /usr/dt/app-defaults/%_LANG_%/Dtbuilder
}
XCOMM
programs/localized/%_LANG_%/app-defaults/Dtudcfonted
{ default
install_target = /usr/dt/app-defaults/%_LANG_%/Dtudcfonted
}
XCOMM
XCOMM >>-----------------------------
XCOMM appmanager
XCOMM <<-----------------------------

View file

@ -423,6 +423,22 @@ doc/C/man/man1/dttypes.1
install_target = /usr/dt/share/man/man1/dttypes.1
}
#
doc/C/man/man1/dtudcexch.1
{ uxp
install_target = /usr/dt/share/catman/C/cde_man/cat1/dtudcexch.1
}
{ default
install_target = /usr/dt/share/man/man1/dtudcexch.1
}
#
doc/C/man/man1/dtudcfonted.1
{ uxp
install_target = /usr/dt/share/catman/C/cde_man/cat1/dtudcfonted.1
}
{ default
install_target = /usr/dt/share/man/man1/dtudcfonted.1
}
#
doc/C/man/man1/dtwm.1
{ default
install_target = /usr/dt/share/man/man1/dtwm.1

View file

@ -306,6 +306,16 @@ programs/localized/%_LANG_%/msg/dtconfig.cat
install_target = /usr/dt/lib/nls/msg/%_LANG_%/dtconfig.cat
}
XCOMM
programs/localized/%_LANG_%/msg/dtudcexch.cat
{ default
install_target = /usr/dt/lib/nls/msg/%_LANG_%/dtudcexch.cat
}
XCOMM
programs/localized/%_LANG_%/msg/dtudcfonted.cat
{ default
install_target = /usr/dt/lib/nls/msg/%_LANG_%/dtudcfonted.cat
}
XCOMM
programs/localized/%_LANG_%/msg/dtpdm.cat
{ default
install_target = /usr/dt/lib/nls/msg/%_LANG_%/dtpdm.cat

View file

@ -1670,6 +1670,76 @@ programs/dtcalc/dtcalc
mode = 0555
}
#
programs/dtudcfonted/dtudcfonted
{ default
install_target = /usr/dt/bin/dtudcfonted
mode = 0555
}
#
programs/localized/C/app-defaults/Dtudcfonted
{ default
install_target = /usr/dt/app-defaults/C/Dtudcfonted
}
#
programs/dtudcexch/dtudcexch
{ default
install_target = /usr/dt/bin/dtudcexch
mode = 0555
}
#
programs/dtudcfonted/dtaddcpf/dtaddcpf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtaddcpf
mode = 0555
}
#
programs/dtudcfonted/dtbdftocpf/dtbdftocpf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtbdftocpf
mode = 0555
}
#
programs/dtudcfonted/dtcpftobdf/dtcpftobdf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtcpftobdf
mode = 0555
}
#
programs/dtudcfonted/dtcpftogpf/dtcpftogpf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtcpftogpf
mode = 0555
}
#
programs/dtudcfonted/dtcpgpf/dtcpgpf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtcpgpf
mode = 0555
}
#
programs/dtudcfonted/dtgpftobdf/dtgpftobdf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtgpftobdf
mode = 0555
}
#
programs/dtudcfonted/dtgpftocpf/dtgpftocpf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtgpftocpf
mode = 0555
}
#
programs/dtudcfonted/dtlsgpf/dtlsgpf
{ default
install_target = /usr/dt/lib/dtudcfonted/dtlsgpf
mode = 0555
}
#
programs/dtudcfonted/libfal/fonts.list
{ default
install_target = /usr/dt/config/C/fonts.list
}
#
programs/dtterm/dtterm
{ default
install_target = /usr/dt/bin/dtterm

View file

@ -1,5 +1,5 @@
<!-- $TOG: HELPEnt.sgm /main/12 1999/10/12 09:35:15 mgreess $ -->
<!ENTITY CDEcopyright "<GlossTerm Role=nogloss>Common Desktop Environment 2.3.0</GlossTerm>,
<!ENTITY CDEcopyright "<GlossTerm Role=nogloss>Common Desktop Environment 2.3.0a</GlossTerm>,
&copy; Copyright 1993-2012 The Open Group
&copy; Copyright 2012-2018 CDE Project contributors, see CONTRIBUTORS for details

View file

@ -1,25 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ilall.c /main/3 1995/10/23 15:41:33 rswiston $ */
THIS FILE NO LONGER USED - ld -o IS NOW DONE INSTEAD, IN /ilc/Makefile .

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ilcompg3g4.h /main/3 1995/10/23 15:42:24 rswiston $ */
NO LONGER USED - REPLACED BY ilcompg3g4.c

View file

@ -1,26 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ilcompressg3.c /main/3 1995/10/23 15:43:14 rswiston $ */
NO LONGER USED - REPLACED BY ilcompg3g4.c

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ilcompressg4.c /main/3 1995/10/23 15:43:21 rswiston $ */
NO LONGER USED - REPLACED BY ilcompg3g4.c

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpeg.c /main/3 1995/10/23 15:49:57 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegcodec.c /main/3 1995/10/23 15:50:11 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegcsize.h /main/3 1995/10/23 15:50:25 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegdct.h /main/3 1995/10/23 15:50:38 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegfwft0.c /main/3 1995/10/23 15:50:54 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegglobals.h /main/3 1995/10/23 15:51:08 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpeghuffman.c /main/3 1995/10/23 15:51:22 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegio.c /main/3 1995/10/23 15:51:36 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegisodct.c /main/3 1995/10/23 15:51:47 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegmarker.c /main/3 1995/10/23 15:51:59 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegmarker.h /main/3 1995/10/23 15:52:12 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegparam.h /main/3 1995/10/23 15:52:25 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegprototypes.h /main/3 1995/10/23 15:52:40 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegstream.c /main/3 1995/10/23 15:52:53 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegstream.h /main/3 1995/10/23 15:53:06 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegsystem.h /main/3 1995/10/23 15:53:18 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegtables.h /main/3 1995/10/23 15:53:35 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -1,27 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: iljpegtransform.c /main/3 1995/10/23 15:53:48 rswiston $ */
NO LONGER USED. All elements named "iljpeg?*" are no longer used.
Replaced by new JPEG code "iljpg?*".

View file

@ -58,7 +58,7 @@ extern "C" {
DtREVISION * 100 + \
DtUPDATE_LEVEL)
#define DtVERSION_STRING "CDE Version 2.3.0"
#define DtVERSION_STRING "CDE Version 2.3.0a"
/*

View file

@ -549,7 +549,7 @@ _DtDtsMMCacheName(int override)
results = malloc(strlen(_DTDTSMMTEMPDIR)+
strlen(_DTDTSMMTEMPFILE)+
strlen(dsp)+3);
sprintf(results, "%s/%s%s\0",
sprintf(results, "%s/%s%s",
_DTDTSMMTEMPDIR,
_DTDTSMMTEMPFILE,
dsp);

View file

@ -680,11 +680,7 @@ auth_finalize(void)
ProgramName, temp_name);
} else {
(void) unlink (ttauth_filename);
#ifdef WIN32
if (rename(temp_name, ttauth_filename) == -1)
#else
if (link (temp_name, ttauth_filename) == -1)
#endif
{
fprintf (stderr,
"%s: unable to link authority file %s, use %s\n",

View file

@ -18,7 +18,7 @@
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
.TH TTAUTH 1 "Release 2.3.0" "CDE"
.TH TTAUTH 1 "Release 2.3.0a" "CDE"
.SH NAME
ttauth \- ToolTalk authority file utility
.SH SYNOPSIS

View file

@ -68,12 +68,9 @@ extern char *getenv();
#ifndef X_NOT_POSIX
#include <unistd.h>
#else
#ifndef WIN32
extern unsigned sleep ();
#else
#define link rename
#endif
#endif
static int read_short(FILE *, unsigned short *);
static int read_string(FILE *, char **);
@ -97,12 +94,6 @@ _tt_AuthFileName ()
static char *buf;
static int bsize;
int size;
#ifdef WIN32
#ifndef PATH_MAX
#define PATH_MAX 512
#endif
char dir[PATH_MAX];
#endif
if (name = getenv ("TTAUTHORITY"))
return (name);
@ -111,24 +102,6 @@ _tt_AuthFileName ()
if (!name)
{
#ifdef WIN32
char *ptr1;
char *ptr2;
int len1 = 0, len2 = 0;
if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) {
len1 = strlen (ptr1);
len2 = strlen (ptr2);
} else if (ptr2 = getenv("USERNAME")) {
len1 = strlen (ptr1 = "/users/");
len2 = strlen (ptr2);
}
if ((len1 + len2 + 1) < PATH_MAX) {
sprintf (dir, "%s%s", ptr1, (ptr2) ? ptr2 : "");
name = dir;
}
if (!name)
#endif
return (NULL);
}
@ -226,24 +199,18 @@ _tt_LockAuthFile(char *file_name, int retries, int timeout, long dead)
void
_tt_UnlockAuthFile(char *file_name)
{
#ifndef WIN32
char creat_name[1025];
#endif
char link_name[1025];
if ((int) strlen (file_name) > 1022)
return;
#ifndef WIN32
strcpy (creat_name, file_name);
strcat (creat_name, "-c");
#endif
strcpy (link_name, file_name);
strcat (link_name, "-l");
#ifndef WIN32
unlink (creat_name);
#endif
unlink (link_name);
}

View file

@ -6,7 +6,7 @@
/* TT_VERSION defines the version string which is imbedded in all the */
/* binaries and shipped libraries. */
TT_VERSION = "CDE Version 2.3.0"
TT_VERSION = "CDE Version 2.3.0a"
TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"

View file

@ -17,9 +17,6 @@ DTINFODIR = dtinfo
DTINFODIR = dtinfo
#endif
XCOMM JET 4/2/2018 - disabling dtudcfonted and dtudcexch. They are
XCOMM very broken in terms of coverity and compiler warnings. Also,
XCOMM who uses them? And for what?
SUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
dtsession dthello dtstyle dtexec dtdbcache dticon dtterm \
@ -27,7 +24,7 @@ SUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
dtscreen dtksh dtcm dtsearchpath \
dtappbuilder dtappintegrate dtprintegrate dtconfig \
dtcreate dtprintinfo fontaliases dtdspmsg ttsnoop \
dtimsstart dtdocbook dtpdm dtsr \
dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \
dtpdmd $(DTINFODIR) $(EXTRADIRS)
LINTSUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
@ -35,7 +32,7 @@ LINTSUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
dtcalc dtaction dtcreate \
dtscreen dtksh dtcm dtsearchpath \
dtappbuilder dtappintegrate dtprintegrate dtprintinfo dtdspmsg \
dtimsstart dtdocbook dtpdm dtsr \
dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \
dtpdmd $(DTINFODIR) $(EXTRADIRS)
MakeSubdirs($(SUBDIRS))

View file

@ -47,7 +47,7 @@ XCOMM #
XCOMM ------------------------------------------------------------------#
function ShowSyntax
{
echo "Usage: $SCRIPT_NAME -s <source> [-t <target>] [-l <language>] [-u]" | tee -a $LOGFILE
echo "Usage: $SCRIPT_NAME -s <source> [-t <target>] [-l <language>] [-u]" | tee -a "$LOGFILE"
return 0
}
XCOMM ------------------------------------------------------------------#
@ -66,15 +66,15 @@ XCOMM ------------------------------------------------------------------#
function GetAbsolutePath
{
if [ "/" = "$1" ]; then
echo $2
elif [ -L $1 ]; then
GetAbsolutePath `ls -l $1 | awk '{print $NF}'` $2
echo "$2"
elif [ -L "$1" ]; then
GetAbsolutePath "$(find . -name "$1" | awk '{print $NF}')" "$2"
else
{
if [ "." = "$1" -o ".." = "$1" ]; then
GetAbsolutePath / /`basename $1`$2
if [ "." = "$1" ] || [ ".." = "$1" ]; then
GetAbsolutePath / /"$(basename "$1")""$2"
else
GetAbsolutePath `dirname $1` /`basename $1`$2
GetAbsolutePath "$(dirname "$1")" /"$(basename "$1")""$2"
fi
}
fi
@ -116,7 +116,7 @@ function GetRelativePath
for (i = 2 + s; i <= b; i++) {
printf("%s%s", B[i], (i < b) ? "/":"\n");
}
}' $2 $1
}' "$2" "$1"
}
XCOMM ------------------------------------------------------------------#
XCOMM LinkCfgs #
@ -136,46 +136,52 @@ function LinkCfgs
typeset pattern="" files=""
shift;shift;shift
if [[ -L $source || -L $(dirname $source) ]] then
spath=$(GetAbsolutePath $source)
if [[ -L $source || -L $(dirname "$source") ]]
then
spath=$(GetAbsolutePath "$source")
else
spath=$source
fi
if [[ -L $target || -L $(dirname $target) ]] then
tpath=$(GetAbsolutePath $target)
if [[ -L $target || -L $(dirname "$target") ]]
then
tpath=$(GetAbsolutePath "$target")
else
tpath=$target
fi
rpath=""
for pattern in "$@"
do
if [[ $pattern = "(*)" ]] then
files=$(ls -d $source/COMMENT_STAR 2>/dev/null)
if [[ $pattern = "(*)" ]]
then
files=$(ls -d "$source"/COMMENT_STAR 2>/dev/null)
else
files=$(ls -d $source/$pattern 2>/dev/null)
files=$(ls -d "$source"/"$pattern" 2>/dev/null)
fi
if [[ $? = 0 ]] then
count=$(echo $files | wc -w)
if $files
then
count=$(echo "$files" | wc -w)
for cfgfile in $files
do
basecfg=$(basename $cfgfile)
if [[ $torf = TRUE ]] then
if [[ $rpath = "" ]] then
rpath=$(GetRelativePath $spath $tpath)
basecfg=$(basename "$cfgfile")
if [[ $torf = TRUE ]]
then
if [[ $rpath = "" ]]
then
rpath=$(GetRelativePath "$spath" "$tpath")
fi
rm -f $tpath/$basecfg
echo "ln -sf $rpath/$basecfg $tpath/$basecfg" >> $LOGFILE
ln -sf $rpath/$basecfg $tpath/$basecfg >> $LOGFILE 2>&1
rm -f "$tpath"/"$basecfg"
echo "ln -sf $rpath/$basecfg $tpath/$basecfg" >> "$LOGFILE"
ln -sf "$rpath/$basecfg" "$tpath/$basecfg" >> "$LOGFILE" 2>&1
else
rm $tpath/$basecfg >/dev/null 2>&1
if [[ $? = 0 ]] then
echo "rm $tpath/$basecfg" >> $LOGFILE
if rm "$tpath"/"$basecfg" >/dev/null 2>&1
then
echo "rm $tpath/$basecfg" >> "$LOGFILE"
fi
fi
done
fi
done
return $count
return "$count"
}
XCOMM ------------------------------------------------------------------#
@ -195,12 +201,12 @@ XCOMM #
XCOMM ------------------------------------------------------------------#
function IntegrateUnintegrate
{
typeset torf=$1 srcs="" trgs="" fpats="" langs="" tpath="" spath="" rpath="" k="" languages="" lang=""
typeset cfgs="" srcabs="" trgabs=""
typeset torf=$1 srcs="" trgs="" fpats="" tpath="" spath="" rpath="" languages="" lang=""
typeset srcabs="" trgabs=""
integer i=0 icons=0 types=1 help=2 appmgr=3
srcabs=$(GetAbsolutePath $APP_ROOT)
trgabs=$(GetAbsolutePath $APP_TARGET)
srcabs=$(GetAbsolutePath "$APP_ROOT")
trgabs=$(GetAbsolutePath "$APP_TARGET")
srcs[0]=$srcabs$ICONS$APP_LANG
srcs[1]=$srcabs$TYPES$APP_LANG
@ -220,32 +226,36 @@ function IntegrateUnintegrate
rc=1
while (( i < 4 ))
do
if [[ $APP_LANG = "" ]] then
languages=$(ls -d ${srcs[i]}/COMMENT_STAR 2>/dev/null)
if [[ $? = 0 ]] then
if [[ $APP_LANG = "" ]]
then
if languages=$(ls -d "${srcs[i]}"/COMMENT_STAR 2>/dev/null)
then
for lang in $languages
do
baselang=$(basename $lang)
if [[ -d $lang ]] then
if [[ $torf = TRUE ]] then
if [[ ! -d ${trgs[i]}/$baselang ]] then
mkdir -p ${trgs[i]}/$baselang
baselang=$(basename "$lang")
if [[ -d $lang ]]
then
if [[ $torf = TRUE ]]
then
if [[ ! -d ${trgs[i]}/$baselang ]]
then
mkdir -p "${trgs[i]}"/"$baselang"
fi
fi
LinkCfgs ${srcs[i]}/$baselang ${trgs[i]}/$baselang $torf ${fpats[i]}
if [[ $? != 0 ]] then
if ! LinkCfgs "${srcs[i]}/$baselang" "${trgs[i]}/$baselang" "$torf" "${fpats[i]}"
then
rc=0
fi
fi
done
fi
else
LinkCfgs ${srcs[i]} ${trgs[i]} $torf ${fpats[i]}
if [[ $? != 0 ]] then
if ! LinkCfgs "${srcs[i]}" "${trgs[i]}" "$torf" "${fpats[i]}"
then
rc=0
fi
fi
i=i+1
i=$((i+1))
done
return $rc
}
@ -261,10 +271,10 @@ XCOMM ------------------------------------------------------------------#
function ExitOut
{
typeset retcode=$1
echo "<<<<<<< END OF APPLICATION INTEGRATION >>>>>>>" >> $LOGFILE
echo "<<<<<<< END OF APPLICATION INTEGRATION >>>>>>>" >> "$LOGFILE"
echo "See $LOGFILE file for more information"
exit $retcode
exit "$retcode"
}
XCOMM ----<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>-----
XCOMM ----<<<<<<<<<<<.-------------------------.>>>>>>>>>>>-----
@ -278,7 +288,6 @@ XCOMM Initialize variables
XCOMM -------------------------------------------------------------------
sFLAG=0
tFLAG=0
lFLAG=0
uFLAG=0
TYPES=/types
@ -287,16 +296,15 @@ ICONS=/icons
HELP=/help
APPCONFIG=/dt/appconfig
CONFIG_TOP=CDE_CONFIGURATION_TOP
DT=`basename $CONFIG_TOP`
DT=$(basename $CONFIG_TOP)
APP_TARGET=${CONFIG_TOP%/$DT}$APPCONFIG
PIXMAP_FILES=*.pm
BITMAP_FILES=*.bm
HELPVOLUME_FILES_OLD=*.hv
HELPVOLUME_FILES_NEW=*.sdl
HELPFAMILY_FILES=*.hf
ACTIONDB_FILES=*.dt
FRONTPANEL_FILES=*.fp
PIXMAP_FILES="*.pm"
BITMAP_FILES="*.bm"
HELPVOLUME_FILES_OLD="*.hv"
HELPVOLUME_FILES_NEW="*.sdl"
HELPFAMILY_FILES="*.hf"
ACTIONDB_FILES="*.dt"
APPMAN_FILES="(*)"
ID=$(id)
@ -314,7 +322,8 @@ XCOMM -------------------------------------------------------------------
ID=${ID##*uid=}
ID=${ID#*\(}
ID=${ID%%\)*}
if [[ $ID != root ]] then
if [[ $ID != root ]]
then
echo "Error: Must be root user to run $0!" >&2
exit 3
fi
@ -322,23 +331,24 @@ fi
XCOMM -------------------------------------------------------------------
XCOMM Put prolog into log file.
XCOMM -------------------------------------------------------------------
echo "<<<<<<< START OF APPLICATION INTEGRATION >>>>>>>" > $LOGFILE
echo "<<<<<<< START OF APPLICATION INTEGRATION >>>>>>>" > "$LOGFILE"
XCOMM -------------------------------------------------------------------
XCOMM Put the date of application integration into the log file.
XCOMM -------------------------------------------------------------------
echo $(date) >> $LOGFILE
date >> "$LOGFILE"
XCOMM -------------------------------------------------------------------
XCOMM Put the command line into the log file.
XCOMM -------------------------------------------------------------------
echo "$SCRIPT_NAME $*" >> $LOGFILE
echo "$SCRIPT_NAME $*" >> "$LOGFILE"
XCOMM -------------------------------------------------------------------
XCOMM Check if there are no command line arguments.
XCOMM If none, then display the command syntax.
XCOMM -------------------------------------------------------------------
if [[ $# = 0 ]] then
if [[ $# = 0 ]]
then
ShowSyntax
ExitOut 0
fi
@ -353,8 +363,7 @@ do
APP_ROOT="$OPTARG";;
t) tFLAG=1
APP_TARGET="$OPTARG";;
l) lFLAG=1
APP_LANG="$OPTARG";;
l) APP_LANG="$OPTARG";;
u) uFLAG=1;;
?) echo " "
ShowSyntax
@ -365,42 +374,50 @@ done
XCOMM -------------------------------------------------------------------
XCOMM Check if application's root was specified and is valid.
XCOMM -------------------------------------------------------------------
if [[ $sFLAG = 0 ]] then
if [[ $sFLAG = 0 ]]
then
echo "Error: Did not specify -s option!" >&2
ExitOut 4
else
if [[ ! -d $APP_ROOT ]] then
if [[ ! -d $APP_ROOT ]]
then
APP_PATH=$APP_ROOT
echo "Error: $APP_PATH is not a directory!" >&2
ExitOut 4
fi
if [[ ! -r $APP_ROOT ]] || [[ ! -x $APP_ROOT ]] then
if [[ ! -r $APP_ROOT ]] || [[ ! -x $APP_ROOT ]]
then
APP_PATH=$APP_ROOT
echo "Error: Can not read $APP_PATH directory!" >&2
ExitOut 4
fi
fi
if [[ ${APP_ROOT%%/COMMENT_STAR} != "" ]] then
if [[ ${APP_ROOT%%/COMMENT_STAR} != "" ]]
then
APP_ROOT=$(pwd)/$APP_ROOT
fi
XCOMM -------------------------------------------------------------------
XCOMM If target is specified, do some sanity checks on this path.
XCOMM -------------------------------------------------------------------
if [[ $tFLAG = 1 ]] then
if [[ ! -d $APP_TARGET ]] then
if [[ $tFLAG = 1 ]]
then
if [[ ! -d $APP_TARGET ]]
then
APP_PATH=$APP_TARGET
echo "Error: $APP_PATH is not a directory!" >&2
ExitOut 4
fi
if [[ ! -r $APP_TARGET ]] || [[ ! -x $APP_TARGET ]] then
if [[ ! -r $APP_TARGET ]] || [[ ! -x $APP_TARGET ]]
then
APP_PATH=$APP_TARGET
echo "Error: Can not read $APP_PATH directory!" >&2
ExitOut 4
fi
if [[ ${APP_TARGET%%/COMMENT_STAR} != "" ]] then
if [[ ${APP_TARGET%%/COMMENT_STAR} != "" ]]
then
APP_TARGET=$(pwd)/$APP_TARGET
fi
fi
@ -410,16 +427,18 @@ XCOMM Set up variables.
XCOMM -------------------------------------------------------------------
APP_ROOT=$APP_ROOT$APPCONFIG
if [[ $APP_LANG != "" ]] then
if [[ $APP_LANG != "" ]]
then
APP_LANG=/$APP_LANG
fi
XCOMM -------------------------------------------------------------------
XCOMM Unintegrate the application by un-doing the integration steps.
XCOMM -------------------------------------------------------------------
if [[ $uFLAG = 1 ]] then
IntegrateUnintegrate FALSE
if [[ $? = 0 ]] then
if [[ $uFLAG = 1 ]]
then
if IntegrateUnintegrate FALSE
then
echo "Unintegration Complete"
else
echo "No files to unintegrate"
@ -432,16 +451,17 @@ XCOMM See if these directories exist. If they don't, then create them.
XCOMM -------------------------------------------------------------------
for i in $APP_TARGET$ICONS$APP_LANG $APP_TARGET$TYPES$APP_LANG $APP_TARGET$APPMANAGER$APP_LANG $APP_TARGET$HELP$APP_LANG
do
if [[ ! -d $i ]] then
mkdir -p $i
if [[ ! -d $i ]]
then
mkdir -p "$i"
fi
done
XCOMM -------------------------------------------------------------------
XCOMM Determine which awk to use.
XCOMM -------------------------------------------------------------------
$(type nawk > /dev/null 2>&1)
if [[ $? != 0 ]] then
if ! type nawk > /dev/null 2>&1
then
AWK="awk"
else
AWK="nawk"
@ -450,8 +470,8 @@ fi
XCOMM -------------------------------------------------------------------
XCOMM Integrate the application.
XCOMM -------------------------------------------------------------------
IntegrateUnintegrate TRUE
if [[ $? = 0 ]] then
if IntegrateUnintegrate TRUE
then
echo "Integration Complete"
else
echo "No files to integrate"

View file

@ -3,11 +3,7 @@ XCOMM $XConsortium: Imakefile /main/6 1996/10/24 00:10:08 cde-hp $
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
#if !UseNSGMLS
SGMLSDIR = sgmls
#endif
SUBDIRS = doc2sdl lib tcl instant $(SGMLSDIR) xlate_locale
SUBDIRS = doc2sdl lib instant xlate_locale
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))

View file

@ -123,24 +123,6 @@ if {[info commands OutputString] == ""} {
}
# set up a default string compare routine so everything works even
# if run outside of instant(1); it won't really be i18n safe, but
# it'll give us a dictionary sort
if {[info commands CompareI18NStrings] == ""} {
proc CompareI18NStrings {string1 string2} {
set string1 [string toupper $string1]
set string2 [string toupper $string2]
if {$string1 > $string2} {
return 1
} else if {$string1 < $string2} {
return -1
} else {
return 0
}
}
}
# emit a string to the output stream
proc Emit {string} {
OutputString $string
@ -1624,10 +1606,14 @@ proc EndPart {} {
# check that all the glossed terms have been defined
foreach name [array names currentGlossArray] {
if {[lindex $currentGlossArray($name) 1] != "defined"} {
set glossString [lindex $currentGlossArray($name) 2]
UserError "No glossary definition for \"$glossString\"" no
}
if {[info exists currentGlossArray($name)]} {
if {[lindex $currentGlossArray($name) 1] != "defined"} {
set glossString [lindex $currentGlossArray($name) 2]
UserError "No glossary definition for \"$glossString\"" no
}
} else {
puts stderr "EndPart: currentGlossArray: index does not exist: '$name'"
}
}
# delete this glossary array
@ -2195,6 +2181,7 @@ proc SortAndEmitGlossary {popForm} {
set names [array names currentGlossArray]
foreach name $names {
# puts stderr "JET0: name: $name"
upvar 0 currentGlossArray($name) glossEntryList
# skip this array entry if we've already emitted it; mark as
@ -2213,9 +2200,15 @@ proc SortAndEmitGlossary {popForm} {
append sortArray($sortAs) $content
}
set names [lsort -command CompareI18NStrings [array names sortArray]]
foreach name $names {
Emit $sortArray($name)
set idxnames [lsort -dictionary [array names sortArray]]
foreach name $idxnames {
# puts stderr "JET1: name: $name"
if {[info exists sortArray($name)]} {
Emit $sortArray($name)
} else {
puts stderr "SortAndEmitGlossary: sortArray index does not exist: '$name'"
}
}
if {[string toupper $popForm] == "POPFORM"} {
@ -2473,32 +2466,36 @@ proc WriteIndex {} {
set file [open "${baseName}.idx" w]
# sort the index using our special I18N safe sort function that
# gives us a dictionary (case insensitive) sort
set names [lsort -command CompareI18NStrings [array names indexArray]]
# sort the index
if {[set length [llength $names]]} {
set idxnames [lsort -dictionary [array names indexArray]]
if {[set length [llength $idxnames]]} {
set oldLevel 0
puts $file "<INDEX COUNT=\"$length\">"
foreach name $names {
set thisEntry $indexArray($name)
switch [lindex $thisEntry 0] {
1 { switch $oldLevel {
1 { puts $file "</ENTRY>" }
2 { puts $file "</ENTRY>\n</ENTRY>" }
3 { puts $file "</ENTRY>\n</ENTRY>\n</ENTRY>" }
foreach name $idxnames {
if {[info exists indexArray($name)]} {
set thisEntry $indexArray($name)
switch [lindex $thisEntry 0] {
1 { switch $oldLevel {
1 { puts $file "</ENTRY>" }
2 { puts $file "</ENTRY>\n</ENTRY>" }
3 { puts $file "</ENTRY>\n</ENTRY>\n</ENTRY>" }
}
}
2 { switch $oldLevel {
2 { puts $file "</ENTRY>" }
3 { puts $file "</ENTRY>\n</ENTRY>" }
}
2 { switch $oldLevel {
2 { puts $file "</ENTRY>" }
3 { puts $file "</ENTRY>\n</ENTRY>" }
}
}
3 { if {$oldLevel == 3} { puts $file "</ENTRY>" } }
}
puts -nonewline $file "<ENTRY[Locs $thisEntry]>"
puts -nonewline $file [lindex $thisEntry 3]
set oldLevel [lindex $thisEntry 0]
}
3 { if {$oldLevel == 3} { puts $file "</ENTRY>" } }
}
puts -nonewline $file "<ENTRY[Locs $thisEntry]>"
puts -nonewline $file [lindex $thisEntry 3]
set oldLevel [lindex $thisEntry 0]
} else {
puts stderr "WriteIndex: index does not exist: '$name'"
}
}
switch $oldLevel {
@ -2547,10 +2544,10 @@ proc FootnoteRef {idref} {
# add an element to the current SNB - try to reuse an entry if
# possible
proc AddToSNB {type data} {
proc AddToSNB {stype data} {
global currentSNB nextId
set index "$type::$data"
set index "${stype}::${data}"
if {[info exists currentSNB($index)]} {
set snbId $currentSNB($index)

View file

@ -2,10 +2,22 @@ XCOMM $XConsortium: Imakefile /main/6 1996/11/29 11:06:09 rswiston $
XLATESRC = $(DTSVCSRC)/DtUtil2
INCLUDES = -I../lib/tptregexp -I../tcl -I$(XLATESRC)
TCLINC =
TCLLIB =
#if defined(LinuxArchitecture)
TCLINC = -I/usr/include/tcl
TCLLIB = -ltcl
#elif defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
TCLINC = -I/usr/local/include/tcl8.6
TCLLIB = -ltcl86
#endif
INCLUDES = -I../lib/tptregexp -I$(XLATESRC) $(TCLINC)
DEPLIBS = $(DEPDTSVCLIB)
LOCAL_LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
-L../lib/tptregexp -ltptregexp ../tcl/libtcl.a
-L../lib/tptregexp -ltptregexp $(TCLLIB)
#if defined(SunArchitecture)
EXTRA_LIBRARIES = -lsocket -lnsl -lgen -lm
#else

View file

@ -324,9 +324,3 @@ void PrintElemTree(Element_t *);
void PrintStats(Element_t *);
void PrintIDList();
/* ----- other declarations ----- */
#ifdef ultrix
#define strdup(s) strcpy((char *)malloc(strlen(s)+1), s)
#endif

View file

@ -111,19 +111,15 @@ extern void Browse();
static int TclPrintLocation(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[]);
const char *argv[]);
static int DefaultOutputString(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[]);
static int CompareI18NStrings(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[]);
const char *argv[]);
static int TclReadLocaleStrings(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[]);
const char *argv[]);
char *GetOutFileBaseName();
char *
@ -208,17 +204,6 @@ main(
0,
0);
/* Add a function to the interpreter to compare to strings. Our
* comparison will unmung any i18n characters (see
* {Un}EscapeI18NChars()) and uppercase the strings before
* comparison to insure we get a dictionary sort. We also use the
* nl_strcmp() function to get proper i18n collation */
Tcl_CreateCommand(interpreter,
"CompareI18NStrings",
CompareI18NStrings,
0,
0);
/* Add a function to read a localized set of data from a file.
* We'll make sure the munging takes place so we can parse it
* in Tcl and any strings we get will output properly when
@ -356,12 +341,11 @@ static char *UnEscapeI18NChars(
static int DefaultOutputString(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[])
const char *argv[])
{
#define LOCAL_BUFFER_LENGTH 128
char *string, *pString, *pArgv;
char localBuffer[LOCAL_BUFFER_LENGTH];
int retCode, stringLength;
char *string = NULL, *pString = NULL;
const char *pArgv = NULL;
int retCode = 0, stringLength = 0;
if (argc < 2) {
Tcl_SetResult(interpreter, "Missing string to output", TCL_VOLATILE);
@ -375,14 +359,10 @@ static int DefaultOutputString(ClientData clientData,
/* leave room for worst case expansion plus quotes plus null */
pArgv = argv[1];
stringLength = (2 * strlen(pArgv)) + 3;
stringLength = (3 * strlen(pArgv)) + 3;
/* try to use automatic buffer; use malloc if string is too large */
if (stringLength <= LOCAL_BUFFER_LENGTH) {
string = localBuffer;
} else {
string = malloc(stringLength);
}
string = Tcl_Alloc(stringLength);
memset(string, 0, stringLength);
pString = string;
@ -390,109 +370,69 @@ static int DefaultOutputString(ClientData clientData,
* any characters that will throw Tcl for a loop */
*pString++ = '"';
while (*pArgv) {
switch (*pArgv) {
case '{':
case '}':
case '"':
case '\'':
case '[':
case ']':
case '$':
case '\\':
*pString++ = '\\';
}
*pString++ = *pArgv++;
if (*pArgv & 0x80)
{
/* 8-bit data - need to encode since modern Tcl expects
* any "binary" (8-bit) data in strings to be proper UTF-8
* encoded. We aren't doing that (yet), so convert any
* detected 8b characters into a \xNN format.
*
* This code should be unnecessary when we switch to UTF8.
*/
char fmt[16];
snprintf(fmt, 16, "%02x", (int)*pArgv & 0xff);
#if 0
fprintf(stderr, "JET: converted 0x%02x to '%s'\n",
*pArgv, fmt);
#endif
/* copy the 4 bytes into the string */
*pString++ = '\\';
*pString++ = 'x';
*pString++ = fmt[0];
*pString++ = fmt[1];
pArgv++;
}
else
{
switch (*pArgv) {
case '{':
case '}':
case '"':
case '\'':
case '[':
case ']':
case '$':
case '\\':
*pString++ = '\\';
}
*pString++ = *pArgv++;
}
}
*pString++ = '"';
*pString++ = 0;
/* put the string to the output */
retCode = Tcl_VarEval(interpreter, "puts -nonewline ", string, 0);
/* free the string if we're not using the automatic buffer */
if (string != localBuffer) {
free(string);
retCode = Tcl_VarEval(interpreter, "puts -nonewline ", string,
(char *)NULL);
#if 0
/* JET*/
if (retCode != TCL_OK)
{
fprintf(stderr, "JET: retCode = %d, LEN = %d STRING = '%s'\n",
retCode, strlen(string), string);
fprintf(stderr, "\tstring[1] = 0x%02x\n", string[1]);
}
#endif
Tcl_Free(string);
/* and ripple up any error code we got from the "puts" */
return retCode;
}
static int CompareI18NStrings(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[])
{
int ret_val, len;
char *ret_string, *cp;
if (argc < 3) {
Tcl_SetResult(interpreter,
"Missing string(s) to compare",
TCL_VOLATILE);
return TCL_ERROR;
}
if (argc > 3) {
Tcl_SetResult(interpreter, "Too many arguments", TCL_VOLATILE);
return TCL_ERROR;
}
/* unmung the two strings (see {Un}EscapeI18NChars()) */
UnEscapeI18NChars(argv[1]);
UnEscapeI18NChars(argv[2]);
/* upper case the strings to insure a dictionary sort */
cp = argv[1];
while (*cp) {
if ((len = mblen(cp, MB_CUR_MAX)) == 1) {
if (isalpha(*cp)) {
*cp = toupper(*cp);
}
cp++;
} else {
if (len > 0)
cp += len;
else
break; /* JET - we should be done here... */
}
}
cp = argv[2];
while (*cp) {
if ((len = mblen(cp, MB_CUR_MAX)) == 1) {
if (isalpha(*cp)) {
*cp = toupper(*cp);
}
cp++;
} else {
if (len > 0)
cp += len;
else
break; /* JET - we should be done here... */
}
}
/* compare the strings using an I18N safe sort */
ret_val = strcoll(argv[1], argv[2]);
if (ret_val > 0) {
ret_string = "1";
} else if (ret_val < 0) {
ret_string = "-1";
} else {
ret_string = "0";
}
Tcl_SetResult(interpreter, ret_string, TCL_VOLATILE);
return TCL_OK;
}
static int TclPrintLocation(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[])
const char *argv[])
{
if (argc > 1) {
Tcl_SetResult(interpreter, "Too many arguments", TCL_VOLATILE);
@ -917,27 +857,27 @@ EscapeI18NChars(
static char *
ReadLocaleStrings(char *file_name, int *ret_code) {
int fd;
char *pBuf;
char *i18nBuf;
off_t size;
struct stat stat_buf;
ReadLocaleStrings(const char *file_name, int *ret_code) {
int fd;
char *pBuf;
char *i18nBuf;
off_t size;
struct stat stat_buf;
fd = open(file_name, O_RDONLY);
if (fd == -1) {
*ret_code = 1;
return "";
return NULL;
}
fstat(fd, &stat_buf);
size = stat_buf.st_size;
pBuf = malloc(size+1);
pBuf[size] = 0;
pBuf = Tcl_Alloc(size+1);
memset(pBuf, 0, size+1);
if (read(fd, pBuf, size) != size) {
*ret_code = 2;
return "";
return NULL;
}
i18nBuf = EscapeI18NChars(pBuf);
@ -952,10 +892,10 @@ struct stat stat_buf;
static int TclReadLocaleStrings(ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[]) {
char *pBuf;
int ret_code;
char errorBuf[512];
const char *argv[]) {
char *pBuf;
int ret_code;
char errorBuf[512];
if (argc > 2) {
Tcl_SetResult(interpreter, "Too many arguments", TCL_VOLATILE);

View file

@ -207,7 +207,7 @@ ExpandVariables(
if (*ip == VDELIM && *(ip+1) == L_CURLY && *(ip+2) != '_') {
ip++;
ip++; /* point at variable name */
len + 2;
len += 2;
vp = vbuf;
/* Look for matching (closing) curly. (watch for nesting)
* We store the variable content in a tmp buffer, so we don't
@ -294,9 +294,16 @@ CallInterpreter(
)
{
int result;
char line[20];
int recursive;
#if 0
if (ib)
{
fprintf(stderr, "JET: %s: IB = '%s'\n", __FUNCTION__,
ib);
}
#endif
/* save the value of this "e" to be used by Tcl_PrintLocation in
* the case of a user error
*/

View file

@ -525,7 +525,7 @@ OutputString(
int track_pos
)
{
char c, *sdata, *cp;
char c = 0, *sdata, *cp;
static int char_pos; /* remembers our character position */
static int interp_pos; /* like char_pos but when output is to interp */
int *ppos; /* points to appropriate line position var */
@ -678,8 +678,8 @@ static int CheckOutputBuffer(
*/
int FFlush(FILE *stream)
{
if (stream) return fflush(stream);
return 0;
if (stream) return fflush(stream);
return 0;
}
@ -722,8 +722,8 @@ int Putc(
if (result != TCL_OK) {
fprintf(stderr,
"interpreter error \"%s\" at line %d executing:\n",
interpreter->result,
interpreter->errorLine);
Tcl_GetStringResult(interpreter),
Tcl_GetErrorLine(interpreter));
fprintf(stderr, "\"%s\"\n", commandBuf);
return EOF;
}
@ -787,8 +787,8 @@ int FPuts(
if (result != TCL_OK) {
fprintf(stderr,
"interpreter error \"%s\" at line %d executing:\n",
interpreter->result,
interpreter->errorLine);
Tcl_GetStringResult(interpreter),
Tcl_GetErrorLine(interpreter));
fprintf(stderr, "\"%s\"\n", pBuff);
if (pBuff != commandBuf) free(pBuff);
return EOF;

File diff suppressed because it is too large Load diff

View file

@ -1,56 +0,0 @@
This file describes how to install sgmls.
UNIX
----
Look at the Makefile and edit it if necessary.
Do `make config.h'. This runs a shell script that generates an
appropriate config.h file from unix.cfg. If this works, have a look
at config.h and make sure it's correct. (In particular you might want
to change the definition of DEFAULT_PATH.) If this doesn't work, copy
unix.cfg to config.h, and then edit config.h yourself; please also
tell me what went wrong.
Do `make'.
If you like, do `make test' to run some tests.
Do `make install' to install the binaries.
If you like, do `make install.man' to install the man pages.
MS-DOS with Borland C++ 2.0
---------------------------
Rename makefile to makefile.ux and then rename makefile.bcc to
makefile.
Copy dos.cfg to config.h.
Look at config.h and makefile and edit them if you want.
Do `make -S'.
Copy sgmls.exe and sgmlsasp.exe to a directory that's on your path.
VAX/VMS
-------
Copy vms.cfg to config.h.
Look at Makefile.vms and config.h and edit them if you want.
Use the script in Makefile.vms to build sgmls and sgmlsasp.
VM/CMS
------
[This configuration is untested.]
Copy cms.cfg to config.h.
Use Makefile.cms to build sgmls and sgmlsasp.
James Clark
jjc@jclark.com

View file

@ -1,45 +0,0 @@
XCOMM $XConsortium: Imakefile /main/3 1996/07/17 12:21:51 rws $
#ifdef IBMArchitecture
EXTRA_DEFINES = -Dvfork=fork
#endif
PROG1=sgmls
SRCS1=lexrf.c pcbrf.c synrf.c context.c md1.c md2.c pars1.c pars2.c serv.c \
sgml1.c sgml2.c sgmlmsg.c sgmlxtrn.c traceset.c entgen.c sgmlio.c \
xfprintf.c main.c unixproc.c sgmldecl.c version.c strerror.c getopt.c \
msgcat.c lineout.c ambig.c exclude.c lextaba.c
OBJS1=lexrf.o pcbrf.o synrf.o context.o md1.o md2.o pars1.o pars2.o serv.o \
sgml1.o sgml2.o sgmlmsg.o sgmlxtrn.o traceset.o entgen.o sgmlio.o \
xfprintf.o main.o unixproc.o sgmldecl.o version.o strerror.o getopt.o \
msgcat.o lineout.o ambig.o exclude.o lextaba.o
PROG2=sgmlsasp
OBJS2=sgmlsasp.o replace.o sgmls.o strerror.o getopt.o
SRCS2a=sgmlsasp.c replace.c sgmls.c
SRCS2=$(SRCS2a) strerror.c getopt.c
PROG3=rast
SRCS3a=rast.c
SRCS3=$(SRCS3a) sgmls.c strerror.c
OBJS3=rast.o sgmls.o strerror.o getopt.o
XCOMM Not build for now...
PROG4=genlex
SRCS4a=genlex.c ebcdic.c
SRCS4=$(SRCS4a) lextaba.c lexrf.c
OBJS4=genlex.o ebcdic.o lextaba.o lexrf.o
XCOMM SRCS=$(SRCS1) $(SRCS2a) $(SRCS3a) $(SRCS4a) lextabe.c
HDRS=action.h adl.h entity.h error.h etype.h sgmldecl.h keyword.h lextoke.h \
msg.h sgmlaux.h sgmlfnsm.h sgmlincl.h sgmlmain.h lineout.h sgmlxtrn.h \
source.h synxtrn.h tools.h trace.h context.h getopt.h msgcat.h std.h \
appl.h sgmls.h sgmlsasp.h replace.h lexcode.h latin1.h ebcdic.h
PROGRAMS = $(PROG1) $(PROG2) $(PROG3)
ComplexProgramTarget_1(sgmls,,)
ComplexProgramTarget_2(sgmlsasp,,)
ComplexProgramTarget_3(rast,,)

View file

@ -1,43 +0,0 @@
LICENSE AND DISCLAIMER OF WARRANTIES
Standard Generalized Markup Language Users' Group (SGMLUG)
SGML Parser Materials
1. License
SGMLUG hereby grants to any user: (1) an irrevocable royalty-free,
worldwide, non-exclusive license to use, execute, reproduce, display,
perform and distribute copies of, and to prepare derivative works
based upon these materials; and (2) the right to authorize others to
do any of the foregoing.
2. Disclaimer of Warranties
(a) The SGML Parser Materials are provided "as is" to any USER. USER
assumes responsibility for determining the suitability of the SGML
Parser Materials for its use and for results obtained. SGMLUG makes
no warranty that any errors have been eliminated from the SGML Parser
Materials or that they can be eliminated by USER. SGMLUG shall not
provide any support maintenance or other aid to USER or its licensees
with respect to SGML Parser Materials. SGMLUG shall not be
responsible for losses of any kind resulting from use of the SGML
Parser Materials including (without limitation) any liability for
business expense, machine downtime, or damages caused to USER or third
parties by any deficiency, defect, error, or malfunction.
(b) SGMLUG DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, ARISING OUT
OF OR RELATING TO THE SGML PARSER MATERIALS OR ANY USE THEREOF,
INCLUDING (WITHOUT LIMITATION) ANY WARRANTY WHATSOEVER AS TO THE
FITNESS FOR A PARTICULAR USE OR THE MERCHANTABILITY OF THE SGML PARSER
MATERIALS.
(c) In no event shall SGMLUG be liable to USER or third parties
licensed by USER for any indirect, special, incidental, or
consequential damages (including lost profits).
(d) SGMLUG has no knowledge of any conditions that would impair its right
to license the SGML Parser Materials. Notwithstanding the foregoing,
SGMLUG does not make any warranties or representations that the
SGML Parser Materials are free of claims by third parties of patent,
copyright infringement or the like, nor does SGMLUG assume any
liability in respect of any such infringement of rights of third
parties due to USER's operation under this license.

View file

@ -1,104 +0,0 @@
This file describes recent user-visible changes in sgmls. Bug fixes
are not described. See the man pages for more details.
Version 1.1
===========
The rast filter converts the output of sgmls to RAST format. See
rast.man.
There have been some changes to the output format: system and public
identifiers for external entities and notations are specified using
the new `s' and `p' commands; the filenames for external entities are
specified using the new `f' command rather than being arguments to the
`E' and `S' commands; the `\s' escape sequence is no longer generated;
an `S' command is generated for an entity mentioned in a `{' command;
RS characters are no longer stripped and are represented by `\012'.
The -c option now takes an argument giving the name of the file to
which the report of capacity calculations should be written. The
report is in RACT format.
sgmls can now handle non-seekable devices (such as pipes). If no
filenames are specified on the command line, sgmls will read the
document entity from standard input. A filename of `-' can also be
used to refer to standard input.
The output format no longer distinguishes attributes whose declared
value is ID, IDREF or IDREFS and uses the TOKEN keyword for these.
(The ESIS does not distinguish these attributes.)
The -a option is no longer allowed.
Version 1.0
===========
Eight bit characters can be made name characters.
Ambiguous content models are always detected. The -a option is ignored.
Version 0.8
===========
On Unix systems, the configure script can automatically generate
config.h from unix.cfg.
An APPINFO parameter in the SGML declaration other than NONE is output
as a `#' command.
sgmls has a -iNAME option which defines a parameter entity NAME with
replacement text "INCLUDE".
sgmls has a -u option that warns about undefined elements.
In SGML_PATH, the public text designating sequence (escape sequence)
is now accessed with %E rather than %S. %S now gives the system
identifier. When a system identifier is supplied, SGML_PATH will be
used to generate a filename only if SGML_PATH uses %S and the system
identifier does not contain (semi-)colons.
An accordance with Amendment 1 to ISO 8879:1986, in the SGML
declaration `ISO 8879:1986' rather than `ISO 8879-1986' is required.
With MS-DOS, errors can be redirected to a file using the -f option.
Version 0.7
===========
More quantity limits can be changed. In particular, GRPCNT, GRPLVL
and GRPGTCNT can be increased up to 253; NAMELEN can be increased to
239. Names are now dynamically allocated (that is, the amount of
memory used to store a name depends on the actual length of the name
rather than on value specified for NAMELEN.)
sgmlasp supports a -n option which disables upper-case substitution
for names in replacement files.
sgmls has a -p option which makes it parse only the prolog.
The format of the I command has been changed: CDATA and SDATA entities
are distinguished using a keyword rather than by surrounding SDATA
entities with \|s.
Version 0.6
===========
A concrete syntax can now be specified explicitly in the SGML
declaration, and various parts of the reference concrete syntax can be
changed, including some quantity limits.
The treatment of notation identifiers and the syntax of the N output
command have been changed.
SUBDOC support works with MS-DOS.
The -n option has been removed; references to subdocument entities are
always resolved.
It is no longer possible to change the implied SGML declaration using
environment variables. You must use an explicit SGML declaration
instead.
The V output command has been removed.
sgmlsasp supports multiple replacement files.

View file

@ -1,38 +0,0 @@
/* $XConsortium: README /main/2 1996/07/15 14:10:45 drk $ */
This is sgmls, an SGML parser derived from the ARCSGML parser
materials which were written by Charles F. Goldfarb. (These are
available for anonymous ftp from ftp.ifi.uio.no [128.240.88.1] in the
directory SIGhyper/SGMLUG/distrib.)
The version number is given in the file version.c.
The file INSTALL contains installation instructions.
The file NEWS describes recent user-visible changes.
The file sgmls.man contains a Unix manual page; sgmls.txt is the
formatted version of this.
The file sgml-mode.el contains a very simple SGML mode for GNU Emacs.
The files sgmls.c and sgmls.h contain a small library for parsing the
output of sgmls. This is used by sgmlsasp, which translates the
output of sgmls using an ASP replacement file, and by rast, which
translates the output of sgmls to the format of a RAST result. The
files sgmlsasp.man and rast.man contain Unix manual pages for sgmlsasp
and rast; sgmlsasp.txt and rast.txt are the formatted versions of
these.
The file LICENSE contains the license which applies to arcsgml and
accordingly to those parts of sgmls derived from arcsgml. See also
the copyright notice at the beginning of sgmlxtrn.c. The parts that
were written by me are in the public domain (any files that were
written entirely by me contain a comment to that effect.) The file
sgml-mode.el is covered by the GNU GPL.
Please report any bugs to me. When reporting bugs, please include the
version number, details of your machine, OS and compiler, and a
complete self-contained file that will allow me to reproduce the bug.
James Clark
jjc@jclark.com

View file

@ -1,78 +0,0 @@
Warn about mixed content models where #PCDATA can't occur everywhere.
Perhaps there should be a configuration option saying what a control
character is for the purpose of SHUNCHAR CONTROLS.
Should the current character that is printed in error messages be
taken from be taken from the file entity or the current entity?
Refine SYS_ action. If we distinguish DELNONCH in lexmark, lexgrp,
lexsd, we can have separate action that ignores the following
character as well.
Should RSs in CDATA/SDATA entities be ignored as specified in 322:1-2?
Similarily, do the rules on REs in 322:3-11 apply to CDATA/SDATA
entities? (I don't think they count as being `in content'.)
What should the entity manager do when it encounters code 13 in an
input file? (Currently it treats it as an RE.)
Document when invalid exclusions are detected.
Option not to perform capacity checking.
Give a warning if the recommendation of 422:1-3 is contravened.
Should an empty CDATA/RCDATA marked section be allowed in the document
type declaration subset?
Include example of use of SGML_PATH in documentation.
Try to detect the situation in 310:8-10 (but see 282:1-2).
Resize hash tables if they become too full.
Say something in the man page about message catalogues.
Consider whether support for SHORTREF NONE requires further changes
(other than disallowing short reference mapping declaration).
Fake /dev/fd/N and /dev/stdin for systems that don't provide it.
Improve the effficiency of the entity manager by not closing and
reopening files. If we run out of FILEs choose the stream with the
fewest bytes remaining to be read, and read the rest of it into
memory. Each entity level will have its own read buffer.
Support multi-line error messages: automatically indent after
newline. (We could output to a temporary file first, then copy to
stderr replacing newlines by newline+indent).
Option that says to output out of context things.
Divide up formal public identifier errors. Give these errors their
own type code.
Consider whether, when OMITTAG is NO, we need to change interpretation
of an empty start-tag (7.4.1.1).
Possibly turn errors 70 and 136 into warnings.
Make things work with NORMSEP > 2. Would need to keep track of number
of CDATA and SDATA entities in CDATA attributes.
Handle `SCOPE INSTANCE'.
In entgen.c, truncate filenames for OSs that don't do this themselves.
Provide an option that specifies that maximum number of errors; when
this limit is exceeded sgmls would exit.
Document non-portable assumptions in the code.
Option to write out SGML declaration. In this case make it write out
APPINFO parameter.
Allow there to be catalogs mapping public ids to filenames.
Environment variable SGML_CATALOG containing list of filenames of
catalogs.

View file

@ -1,202 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: action.h /main/3 1996/06/19 17:14:03 drk $ */
/* ACTION.H: Symbols for all PCB action codes. */
/* CONACT.H: Symbols for content parse action names (end with '_').
There must be no conflict with PARSEACT.H, which
uses 0 through 19, or SGMLACT.H, which uses 20 through 32
(except that 31 - 32 can be defined here because they are
used only by PARSEPRO and do not conflict with SGML.C).
*/
#define CIR_ 31 /* Invalid character(s) ignored in MDS; restarting parse. */
#define DTD_ 32 /* Process DOCTYPE declaration. */
#define DTE_ 33 /* End of DOCTYPE declaration. */
#define PEP_ 34 /* TEMP: Previous character ended prolog. */
#define DAS_ 35 /* Current character begins data. */
#define FCE_ 36 /* Process free character (SR12-18, 21-30). */
#define DCE_ 37 /* Data character in element text; change PCB. */
#define LAS_ 38 /* Start lookahead buffer with current character. */
#define LAM_ 39 /* Move character to lookahead buffer. */
#define LAF_ 40 /* Flush the lookahead buffer; REPEATCC. */
#define NED_ 41 /* Process null end-tag delimiter. */
#define NET_ 42 /* Process null end-tag. */
#define NST_ 43 /* Process null start-tag. */
#define NLF_ 44 /* Flush lookahead buffer except for trailing NET or SR. */
#define ETC_ 45 /* End-tag in CDATA or RCDATA; treat as data if invalid. */
#define SRMIN 46 /* Dummy for SHORT REFERENCES: srn = SRn - SRMIN. */
#define SR1_ 47 /* TAB */
#define SR2_ 48 /* RE */
#define SR3_ 49 /* RS */
#define SR4_ 50 /* Leading blanks */
#define SR5_ 51 /* Null record */
#define DAR_ 52 /* Flush data buffer after repeating current character. */
#define SR7_ 53 /* Trailing blanks */
#define SR8_ 54 /* Space */
#define SR9_ 55 /* Two or more blanks */
#define SR10 56 /* Quotation mark (first data character) */
#define SR11 57 /* Number sign */
#define SR12 58 /* FCE CHARACTERS start here */
/* _ 59 */
#define BSQ_ 60 /* Blank sequence begun; find its end. */
/* 61 In use by PARSEACT.H */
/* 62 In use by PARSEACT.H */
/* 63 In use by PARSEACT.H */
/* 64 In use by PARSEACT.H */
#define SR19 65 /* Hyphen */
#define SR20 66 /* Two hyphens */
#define SR25 71 /* Left bracket */
#define SR26 72 /* Right bracket */
#define RBR_ 73 /* Two right brackets. */
#define GTR_ 74 /* EOB with pending data character */
#define MSP_ 75 /* Marked section start in prolog outside DTD */
#define APP_ 76 /* APPINFO (other than NONE) */
#define STE_ 77 /* Start tag ended prolog */
/* GRPACT.H: Symbols for group tokenization action names (all alpha).
There must be no conflict with PARSEACT.H, which
uses 0 - 19.
*/
#define AND 20 /* AND connector found. */
#define DTAG 21 /* Data tag token group occurred (treat as #CHARS). */
#define GRPE 22 /* Group ended. */
#define GRP_ 23 /* Group started. */
#define NAS_ 24 /* Name started in content model or name group. */
#define NMT_ 25 /* Name or name token started in name token group. */
#define OPT 26 /* OPT occurrence indicator for previous token. */
#define OR 27 /* OR connector found. */
#define OREP 28 /* OREP occurrence indicator for previous token. */
#define REP 29 /* REP occurrence indicator for previous token. */
#define RNS_ 30 /* Reserved name started (#PCDATA). */
#define SEQ 31 /* SEQ connector found. */
/* LITACT.H: Symbols for content parse action names (end with '_').
There must be no conflict with PARSEACT.H, which
uses 0 through 19.
*/
#define MLA_ 20 /* Move character to look-aside data buffer. */
#define LPR_ 21 /* Move previous character to data buffer. */
#define RSM_ 22 /* Process record start and move it to data buffer. */
#define FUN_ 23 /* Replace function character with a space. */
#define LP2_ 24 /* Move previous two characters to data buffer. */
#define MLE_ 25 /* Minimum literal error: invalid character ignored. */
#define RPR_ 26 /* Remove previous character from data buffer; terminate. */
#define TER_ 27 /* Terminate the parse. */
/* MDACT.H: Symbols for markup declaration parse action names (all alpha).
There must be no conflict with PARSEACT.H, which
uses 0 - 19.
*/
#define CDR 20 /* CD[1] (MINUS) occurred previously. */
#define EMD 21 /* End of markup declaration. */
#define GRPS 22 /* Group started. */
#define LIT 23 /* Literal started: character data. */
#define LITE 24 /* Literal started: character data; LITA is delimiter. */
#define MGRP 25 /* Minus exception group (MINUS,GRPO). */
#define NAS 26 /* Name started. */
#define NMT 27 /* Name token started. */
#define NUM 28 /* Number or number token started. */
#define PEN 29 /* Parameter entity name being defined (PERO found). */
#define PGRP 30 /* Plus exception group (PLUS,GRPO). */
#define RNS 31 /* Reserved name started. */
#define MDS 32 /* Markup declaration subset start. */
#define PENR 33 /* REPEATCC; PERO found. */
/* PARSEACT.H: Symbols for common parse action names (end with '_').
There must be no conflict with other action name
files, which use numbers greater than 19.
*/
#define CRA_ 1 /* Character reference: alphabetic. */
#define CRN_ 2 /* Character reference: numeric; non-char refs o.k.. */
#define NON_ 3 /* Single byte of non-character data found. */
#define EOF_ 4 /* Error: illegal entity end; resume old input; return. */
#define ER_ 5 /* Entity reference; start new input source; continue. */
#define GET_ 6 /* EOB, EOS, or EE: resume old input source; continue. */
#define INV_ 7 /* Error: invalid char terminated markup; repeat char. */
#define LEN_ 8 /* Error: length limit exceeded; end markup; repeat char. */
#define NOP_ 9 /* No action necessary. */
#define PCI_ 10 /* Previous character was invalid. */
#define PER_ 11 /* Parameter reference; start new input source; continue. */
#define RC2_ 12 /* Back up two characters. */
#define RCC_ 13 /* Repeat current character. */
#define RCR_ 14 /* Repeat current character and return to caller. */
#define EE_ 15 /* EOS or EE: resume old input source; return to caller. */
#define RS_ 16 /* Record start: ccnt=0; ++rcnt. */
#define ERX_ 17 /* Entity reference; start new input source; return. */
#define SYS_ 18 /* Error allowed: SYSCHAR in input stream; replace it. */
#define EOD_ 19 /* End of document. */
/* Number way out of order to avoid recompilation. */
#define NSC_ 58 /* Handle DELNONCH/DELXNONCH when NON_ is allowed */
#define PEX_ 61 /* Parameter entity ref; start new input source; return. */
#define DEF_ 62 /* Data entity found. */
#define PIE_ 63 /* PI entity found (needed in markup). */
#define LNR_ 64 /* LEN_ error with extra REPEATCC. */
/* SGMLACT.H: Symbols for content parse action names (end with '_')
that are returned to SGML.C for processing.
There must be no conflict with PARSEACT.H, which
uses 0 through 19, or CONACT.H, which uses 34 and above.
(Note: 31 is also used in CONACT.H, but no conflict
is created because they are tested only in PARSEPRO.C, which
completes before SGML.C starts to examine those codes.
Also, when EOD_ is returned from PARSECON, it is changed
to LOP_.)
*/
#define CON_ 20 /* Normal content action (one of the following). */
#define DAF_ 21 /* Data found. */
#define ETG_ 22 /* Process end-tag. */
#define MD_ 23 /* Process markup declaration (NAMESTRT found). */
#define MDC_ 24 /* Process markup declaration comment (CD found). */
#define MSS_ 25 /* Process marked section start. */
#define MSE_ 26 /* Process marked section end. */
#define PIS_ 27 /* Processing instruction (string). */
#define REF_ 28 /* Record end found. */
#define STG_ 29 /* Process start-tag. */
#define RSR_ 30 /* Return RS to effect SGML state transition. */
#define LOP_ 31 /* Loop for new content without returning anything. */
/* TAGACT.H: Symbols for tag parse action names (all alpha).
There must be no conflict with PARSEACT.H, which
uses 0 - 19.
*/
#define AVD 20 /* Delimited attribute value started: normal delimiter. */
#define AVU 21 /* Undelimited value started. */
#define ETIC 22 /* Tag closed with ETI. */
#define NVS 23 /* Name of attribute or value started. */
#define NASV 24 /* Saved NAS was actually an NTV. */
#define NTV 25 /* Name token value started; get name and full value. */
#define TAGC 26 /* Tag closed normally. */
#define TAGO 27 /* Tag closed implicitly by TAGO character. */
#define AVDA 28 /* Delimited attribute value started: alternative delim. */
#define DSC 29 /* Closed by DSC character. */
/* VALACT.H: Symbols for attribute value tokenization action names (all alpha).
*/
#define NOPA 0 /* No action necessary. */
#define INVA 1 /* Invalid character; terminate parse. */
#define LENA 2 /* Length limit of token exceeded; terminate parse. */
#define NASA 3 /* Name started. */
#define NMTA 4 /* Name token started. */
#define NUMA 5 /* Number or number token started. */
/* SGML declaration parsing actions. */
#define ESGD 20 /* End of SGML declaration. */
#define LIT1 21 /* Literal started. */
#define LIT2 22 /* Literal started with LITA delimiter. */
#define NUM1 23 /* Number started. */
#define NAS1 24 /* Name started. */
#define ISIG 25 /* Insignificant character occurred. */

View file

@ -1,141 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: adl.h /main/3 1996/06/19 17:14:09 drk $ */
/* ADL.H: Definitions for attribute descriptor list processing.
*/
/* N/C/SDATA external entity types for nxetype member of ne structure. */
#define ESNCDATA 1 /* External character data entity. */
#define ESNNDATA 2 /* Non-SGML data entity. */
#define ESNSDATA 3 /* External specific character data entity. */
#define ESNSUB 4 /* SGML subdocument entity. */
/* N/C/SDATA control block for AENTITY attributes and NDATA returns.*/
struct ne { /* N/C/SDATA entity control block. */
UNIV neid; /* Files for NDATA entity. */
UNCH *nepubid; /* Public identifier if specified. */
UNCH *nesysid; /* System identifier if specified. */
PDCB nedcn; /* Data content notation control block. */
struct ad *neal; /* Data attribute list (NULL if none). */
UNCH *neename; /* Ptr to entity name (length and EOS). */
UNCH nextype; /* Entity type: NDATA SDATA CDATA SUBDOC. */
};
#define NESZ (sizeof(struct ne))
typedef struct ne *PNE;
/* NDATA entity control block fields. */
#define NEID(p) (((PNE)p)->neid) /* File ID of NDATA entity. */
#define NESYSID(p) (((PNE)p)->nesysid) /* System ID of NDATA entity. */
#define NEPUBID(p) (((PNE)p)->nepubid) /* Public ID of NDATA entity. */
#define NEDCN(p) (((PNE)p)->nedcn->ename) /* Data content notation name. */
#define NEDCNSYSID(p) (((PNE)p)->nedcn->sysid) /* Notation system ID.*/
#define NEDCNPUBID(p) (((PNE)p)->nedcn->pubid) /* Notation public ID.*/
#define NEDCNDEFINED(p) (((PNE)p)->nedcn->defined) /* Notation defined? */
#define NEDCNADL(p) (((PNE)p)->nedcn->adl) /* Data content notation attlist.*/
#define NEENAME(p) (((PNE)p)->neename) /* Entity name pointer. */
#define NEXTYPE(p) (((PNE)p)->nextype) /* External entity type. */
#define NEAL(p) (((PNE)p)->neal) /* Data attributes (if any). */
#define NEDCNMARK(p) DCNMARK(((PNE)p)->nedcn)
/* Attribute descriptor list entry. */
struct ad {
UNCH *adname; /* Attribute name with length and EOS. */
UNCH adflags; /* Attribute flags. */
UNCH adtype; /* Value type. */
UNS adnum; /* Group size or member pos in grp. */
UNS adlen; /* Length of default or value (for capacity). */
UNCH *addef; /* Default value (NULL if REQUIRED or IMPLIED). */
union {
PNE n; /* AENTITY: NDATA control block. */
PDCB x; /* ANOTEGRP: DCN control block. */
} addata; /* Special data associated with some attributes.*/
};
#define ADSZ (sizeof(struct ad)) /* Size of an ad structure. */
/* Attribute flags for entire list adflags: ADLF. */
#define ADLREQ 0x80 /* Attribute list: 1=REQUIRED att defined. */
#define ADLNOTE 0x40 /* Attribute list: 1=NOTATION att defined. */
#define ADLCONR 0x20 /* Attribute list: 1=CONREF att defined. */
/* Attribute flags for list member adflags: ADFLAGS(n). */
#define AREQ 0x80 /* Attribute: 0=null; 1=required. */
#define ACURRENT 0x40 /* Attribute: 0=normal; 1=current. */
#define AFIXED 0x20 /* Attribute: 0=normal; 1=must equal default. */
#define AGROUP 0x10 /* Attribute: 0=single; 1=group of ad's. */
#define ACONREF 0x08 /* Attribute: 0=normal; 1=att is CONREF. */
#define AINVALID 0x04 /* Attribute: 1=value is invalid; 0=o.k. */
#define AERROR 0x02 /* Attribute: 1=error was specified; 0=o.k. */
#define ASPEC 0x01 /* Attribute: 1=value was specified; 0=default. */
/* Attribute types for adtype. */
#define ANMTGRP 0x00 /* Attribute: Name token group or member. */
#define ANOTEGRP 0x01 /* Attribute: Notation (name group). */
#define ACHARS 0x02 /* Attribute: Character string. */
#define AENTITY 0x03 /* Attribute: Data entity (name). */
#define AID 0x04 /* Attribute: ID value (name). */
#define AIDREF 0x05 /* Attribute: ID reference value (name). */
#define ANAME 0x06 /* Attribute: Name. */
#define ANMTOKE 0x07 /* Attribute: Name token. */
#define ANUMBER 0x08 /* Attribute: Number. */
#define ANUTOKE 0x09 /* Attribute: Number token. */
#define ATKNLIST 0x0A /* Attribute: >= means value is a token list. */
#define AENTITYS 0x0A /* Attribute: Data entities (name list). */
#define AIDREFS 0x0B /* Attribute: ID reference value (name list). */
#define ANAMES 0x0C /* Attribute: Name list. */
#define ANMTOKES 0x0D /* Attribute: Name token list. */
#define ANUMBERS 0x0E /* Attribute: Number list. */
#define ANUTOKES 0x0F /* Attribute: Number token list. */
/* Field definitions for entries in an attribute list.
The first argument to all of these is the list address.
*/
/* Attribute list: flags. */
#define ADLF(a) ((a)[0].adflags)
/* Attribute list: number of list members. */
#define ADN(a) ((a)[0].adtype)
/* Attribute list: number of attributes. */
#define AN(a) ((a)[0].adnum)
/* Nth attribute in list: name. */
#define ADNAME(a, n) (((a)[n].adname+1))
/* Nth att in list: number of val)ues. */
#define ADNUM(a, n) ((a)[n].adnum)
/* Nth attribute in list: flags. */
#define ADFLAGS(a, n) ((a)[n].adflags)
/* Nth attribute in list: type. */
#define ADTYPE(a, n) ((a)[n].adtype)
/* Nth attribute in list: len of def or val.*/
#define ADLEN(a, n) ((a)[n].adlen)
/* Nth attribute in list: def or value. */
#define ADVAL(a, n) ((a)[n].addef)
/* Nth attribute in list: special data. */
#define ADDATA(a, n) ((a)[n].addata)
/* Nth att: token at Pth pos in value. */
#define ADTOKEN(a, n, p)(((a)[n].addef+(p)))
#define IDHASH 101 /* Size of ID hash table. Must be prime. */
struct id { /* ID attribute control block. */
struct id *idnext; /* Next ID in chain. */
UNCH *idname; /* ID name with length prefix and EOS. */
UNCH iddefed; /* Non-zero if it has been defined. */
struct fwdref *idrl; /* Chain of forward references to this ID. */
};
#define IDSZ sizeof(struct id)
typedef struct id *PID; /* Ptr to ID attribute control block. */

View file

@ -1,461 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ambig.c /main/3 1996/06/19 17:14:13 drk $ */
/* ambig.c -
Content model ambiguity checking.
Written by James Clark (jjc@jclark.com).
*/
/*
This uses the construction in pp8-9 of [1], extended to deal with AND
groups.
Note that it is not correct for the purposes of ambiguity analysis to
handle AND groups by turning them into an OR group of SEQ groups
(consider (a&b?)).
We build an automaton for the entire content model by adding the
following case for AND:
nullable(v) := nullable(left child) and nullable(right child)
if nullable(right child) then
for each x in last(left child) do
follow(v,x) = follow(left child,x) U first(right child);
if nullable(left child) then
for each x in last(right child) do
follow(v,x) = follow(right child,x) U first(left child);
first(v) := first(left child) U first(right child);
last(v) := first(left child) U first(right child);
We also build an automaton for each AND group by building automata for
each of the members of the AND group using the above procedure and
then combine the members using:
for each x in last(left child) do
follow(v,x) = follow(left child,x) U first(right child);
for each x in last(right child) do
follow(v,x) = follow(right child,x) U first(left child);
first(v) := first(left child) U first(right child);
The content model is ambiguous just in case one of these automata is
non-deterministic. (Note that when checking determinism we need to
check the `first' set as well as all the `follow' sets.)
Why is this correct? Consider a primitive token in a member of an AND
group. There are two worst cases for ambiguity: firstly, when none of
the other members of AND group have been matched; secondly, when just
the nullable members remain to be matched. The first case is not
affected by context of the AND group (unless the first case is
identical to the second case.)
Note that inclusions are not relevant for the purposes of determining
the ambiguity of content models. Otherwise the case in clause
11.2.5.1:
An element that can satisfy an element in the content model is
considered to do so, even if the element is also an inclusion.
could never arise.
[1] Anne Brueggemann-Klein, Regular Expressions into Finite Automata,
Universitaet Freiburg, Institut fur Informatik, 33 July 1991.
*/
#include "sgmlincl.h"
/* Sets of states are represented by 0-terminated, ordered lists of
indexes in gbuf. */
#define MAXSTATES (GRPGTCNT+2)
#define listcat(x, y) strcat((char *)(x), (char *)(y))
#define listcpy(x, y) strcpy((char *)(x), (char *)(y))
/* Information about a content token. */
struct contoken {
UNCH size;
UNCH nullable;
UNCH *first;
UNCH *last;
};
static VOID contoken P((int, int, struct contoken *));
static VOID andgroup P((int, int, struct contoken *));
static VOID orgroup P((int, int, struct contoken *));
static VOID seqgroup P((int, int, struct contoken *));
static VOID andambig P((int));
static int listambig P((UNCH *));
static VOID listmerge P((UNCH *, UNCH *));
static struct contoken *newcontoken P((void));
static VOID freecontoken P((struct contoken *));
/* Dynamically allocated vector of follow sets. */
static UNCH **follow;
static UNCH *mergebuf; /* for use by listmerge */
/* Set to non-zero if the content model is ambiguous. */
static int ambigsw;
/* Check the current content model (in gbuf) for ambiguity. */
VOID ambig()
{
struct contoken *s;
int i;
if (!follow) {
/* We can't allocate everything in one chunk, because that would
overflow a 16-bit unsigned if GRPGTCNT was 253. */
UNCH *ptr;
follow = (UNCH **)rmalloc(MAXSTATES*sizeof(UNCH *));
follow[0] = 0;
ptr = (UNCH *)rmalloc((MAXSTATES - 1)*MAXSTATES);
for (i = 1; i < MAXSTATES; i++) {
follow[i] = ptr;
ptr += MAXSTATES;
}
mergebuf = (UNCH *)rmalloc(MAXSTATES);
}
for (i = 1; i < MAXSTATES; i++)
follow[i][0] = 0;
ambigsw = 0;
s = newcontoken();
contoken(1, 1, s);
ambigsw = ambigsw || listambig(s->first);
freecontoken(s);
for (i = 1; !ambigsw && i < MAXSTATES; i++)
if (listambig(follow[i]))
ambigsw = 1;
if (ambigsw)
mderr(137, (UNCH *)0, (UNCH *)0);
}
/* Free memory used for ambiguity checking. */
VOID ambigfree()
{
if (follow) {
frem((UNIV)follow[1]);
frem((UNIV)follow);
frem((UNIV)mergebuf);
follow = 0;
}
}
/* Determine whether a list of primitive content tokens (each
represented by its index in gbuf) is ambiguous. */
static
int listambig(list)
UNCH *list;
{
UNCH *p;
int chars = 0;
int rc = 0;
for (p = list; *p; p++) {
if ((gbuf[*p].ttype & TTMASK) == TTETD) {
struct etd *e = gbuf[*p].tu.thetd;
if (e->mark) {
rc = 1;
break;
}
e->mark = 1;
}
else {
assert((gbuf[*p].ttype & TTMASK) == TTCHARS);
if (chars) {
rc = 1;
break;
}
chars = 1;
}
}
for (p = list; *p; p++)
if ((gbuf[*p].ttype & TTMASK) == TTETD)
gbuf[*p].tu.thetd->mark = 0;
return rc;
}
/* Analyze a content token. The `checkand' argument is needed to ensure
that the algorithm is not exponential in the AND-group nesting depth.
*/
static
VOID contoken(m, checkand, res)
int m; /* Index of content token in gbuf */
int checkand; /* Non-zero if AND groups should be checked */
struct contoken *res; /* Result */
{
UNCH flags = gbuf[m].ttype;
switch (flags & TTMASK) {
case TTCHARS:
case TTETD:
res->first[0] = m;
res->first[1] = 0;
res->last[0] = m;
res->last[1] = 0;
res->size = 1;
res->nullable = 0;
break;
case TTAND:
if (checkand)
andambig(m);
andgroup(m, checkand, res);
break;
case TTOR:
orgroup(m, checkand, res);
break;
case TTSEQ:
seqgroup(m, checkand, res);
break;
default:
abort();
}
if (flags & TREP) {
UNCH *p;
for (p = res->last; *p; p++)
listmerge(follow[*p], res->first);
}
if (flags & TOPT)
res->nullable = 1;
}
/* Check an AND group for ambiguity. */
static
VOID andambig(m)
int m;
{
int i, tnum;
int lim;
struct contoken *curr;
struct contoken *next;
tnum = gbuf[m].tu.tnum;
assert(tnum > 0);
curr = newcontoken();
next = newcontoken();
contoken(m + 1, 0, curr);
i = m + 1 + curr->size;
curr->size += 1;
for (--tnum; tnum > 0; --tnum) {
UNCH *p;
contoken(i, 0, next);
curr->size += next->size;
i += next->size;
for (p = curr->last; *p; p++)
listcat(follow[*p], next->first);
for (p = next->last; *p; p++)
listmerge(follow[*p], curr->first);
listcat(curr->first, next->first);
listcat(curr->last, next->last);
}
lim = m + curr->size;
for (i = m + 1; i < lim; i++) {
if (listambig(follow[i]))
ambigsw = 1;
follow[i][0] = 0;
}
freecontoken(curr);
freecontoken(next);
}
/* Handle an AND group. */
static
VOID andgroup(m, checkand, res)
int m;
int checkand;
struct contoken *res;
{
int i, tnum;
/* union of the first sets of nullable members of the group */
UNCH *nullablefirst;
struct contoken *next;
tnum = gbuf[m].tu.tnum;
assert(tnum > 0);
contoken(m + 1, checkand, res);
nullablefirst = (UNCH *)rmalloc(MAXSTATES);
if (res->nullable)
listcpy(nullablefirst, res->first);
else
nullablefirst[0] = 0;
i = m + 1 + res->size;
res->size += 1;
next = newcontoken();
for (--tnum; tnum > 0; --tnum) {
UNCH *p;
contoken(i, checkand, next);
res->size += next->size;
i += next->size;
if (next->nullable)
for (p = res->last; *p; p++)
listcat(follow[*p], next->first);
for (p = next->last; *p; p++)
listmerge(follow[*p], nullablefirst);
listcat(res->first, next->first);
if (next->nullable)
listcat(nullablefirst, next->first);
listcat(res->last, next->last);
res->nullable &= next->nullable;
}
frem((UNIV)nullablefirst);
freecontoken(next);
}
/* Handle a SEQ group. */
static
VOID seqgroup(m, checkand, res)
int m;
int checkand;
struct contoken *res;
{
int i, tnum;
struct contoken *next;
tnum = gbuf[m].tu.tnum;
assert(tnum > 0);
contoken(m + 1, checkand, res);
i = m + 1 + res->size;
res->size += 1;
next = newcontoken();
for (--tnum; tnum > 0; --tnum) {
UNCH *p;
contoken(i, checkand, next);
res->size += next->size;
i += next->size;
for (p = res->last; *p; p++)
listcat(follow[*p], next->first);
if (res->nullable)
listcat(res->first, next->first);
if (next->nullable)
listcat(res->last, next->last);
else
listcpy(res->last, next->last);
res->nullable &= next->nullable;
}
freecontoken(next);
}
/* Handle an OR group. */
static
VOID orgroup(m, checkand, res)
int m;
int checkand;
struct contoken *res;
{
int i, tnum;
struct contoken *next;
tnum = gbuf[m].tu.tnum;
assert(tnum > 0);
contoken(m + 1, checkand, res);
i = m + 1 + res->size;
res->size += 1;
next = newcontoken();
for (--tnum; tnum > 0; --tnum) {
contoken(i, checkand, next);
res->size += next->size;
i += next->size;
listcat(res->first, next->first);
listcat(res->last, next->last);
res->nullable |= next->nullable;
}
freecontoken(next);
}
/* Merge the second ordered list into the first. */
static
VOID listmerge(p, b)
UNCH *p, *b;
{
UNCH *a = mergebuf;
strcpy((char *)a, (char *)p);
for (;;) {
if (*a) {
if (*b) {
if (*a < *b)
*p++ = *a++;
else if (*a > *b)
*p++ = *b++;
else
a++;
}
else
*p++ = *a++;
}
else if (*b)
*p++ = *b++;
else
break;
}
*p = '\0';
}
static
struct contoken *newcontoken()
{
struct contoken *p = (struct contoken *)rmalloc(sizeof(struct contoken)
+ MAXSTATES*2);
p->first = (UNCH *)(p + 1);
p->last = p->first + MAXSTATES;
return p;
}
static
VOID freecontoken(p)
struct contoken *p;
{
frem((UNIV)p);
}
/*
Local Variables:
c-indent-level: 5
c-continued-statement-offset: 5
c-brace-offset: -5
c-argdecl-indent: 0
c-label-offset: -5
End:
*/

View file

@ -1,56 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: appl.h /main/3 1996/06/19 17:14:17 drk $ */
/* appl.h */
enum {
E_NOMEM = 1,
E_DOC,
E_EXEC,
E_FORK,
E_WAIT,
E_SIGNAL,
E_OPEN,
E_CAPBOTCH,
E_SUBDOC
};
VOID process_document P((int));
VOID output_conforming P((void));
UNIV xmalloc P((UNS));
UNIV xrealloc P((UNIV, UNS));
VOID appl_error VP((int, ...));
#ifdef SUPPORT_SUBDOC
int run_process P((char **));
char **make_argv P((UNIV));
VOID get_subcaps P((void));
#endif
#ifdef SUPPORT_SUBDOC
extern int suberr;
#endif
extern int suppsw;
extern int locsw;

View file

@ -1,146 +0,0 @@
/* cms.cfg: Configuration file for sgmls on VM/CMS. */
/* Contributed by C. M. Sperberg-McQueen <u35395@uicvm.uic.edu>. */
/* A list of filename templates to use for searching for external
entities.
The filenames are separated by the character specified in PATH_FILE_SEP.
See sgmls.man for details. */
#define DEFAULT_PATH "%N.%X:%N.%C"
/* The character that separates the filenames templates. */
#define PATH_FILE_SEP ';'
/* The character that separates filenames in a system identifier.
Usually the same as PATH_FILE_SEP. */
#define SYSID_FILE_SEP ';'
/* The environment variable that contains the list of fileid patterns. */
#define PATH_ENV_VAR "SGML_PATH"
/* MIN_DAT_SUBS_FROM and MIN_DATS_SUBS_TO tell sgmls how to transform a
name or system identifier into a legal filename. A character in
MIN_DAT_SUBS_FROM will be transformed into the character in the
corresponding position in MIN_DAT_SUBS_TO. If there is no such
position, then the character is removed. */
/* This says that spaces and the characters :'(),./=? should be deleted. */
#define MIN_DAT_SUBS_FROM " :\'(),./=?"
#define MIN_DAT_SUBS_TO ""
/* Define this to allow tracing. */
/* #define TRACE 1 */
/* Define this you want support for subdocuments. This is implemented
using features that are not part of Standard C, so you might not want
to define it if you are porting to a new system. Otherwise I suggest
you leave it defined. */
/* OK, I'll drop it for now. -MSM */
#define SUPPORT_SUBDOC 0
/* Define HAVE_EXTENDED_PRINTF if your *printf functions supports
X/Open extensions; if they do, then, for example,
printf("%2$s%1$s", "bar", "foo")
should print `foobar'. */
/* #define HAVE_EXTENDED_PRINTF 1 */
/* Define HAVE_CAT if your system provides the X/Open message
catalogue functions catopen() and catgets(), and you want to use them.
An implementations of these functions is included and will be used if
you don't define this. On SunOS 4.1.1, if you do define this you
should set CC=/usr/xpg2bin/cc in the makefile. */
/* #define HAVE_CAT 1 */
#ifdef __STDC__
/* Define this if your compiler supports prototypes. */
#define USE_PROTOTYPES 1
#endif
/* Can't use <stdarg.h> without prototypes. */
#ifndef USE_PROTOTYPES
#define VARARGS 1
#endif
/* If your compiler defines __STDC__ but doesn't provide <stdarg.h>,
you must define VARARGS yourself here. */
/* #define VARARGS 1 */
/* Define this if you do not have strerror(). */
/* Manual says we do, linker says it don't like it. -msm */
/* #define STRERROR_MISSING 1 */
/* Define this unless the character testing functions in ctype.h
are defined for all values representable as an unsigned char. You do
not need to define this if your system is ANSI C conformant. You
should define for old Unix systems. */
/* #define USE_ISASCII 1 */
/* Define this if your system provides the BSD style string operations
rather than ANSI C ones (eg bcopy() rather than memcpy(), and index()
rather than strchr()). */
/* #define BSD_STRINGS 1 */
/* Define this if you have getopt(). */
/* #define HAVE_GETOPT 1 */
/* Define this if you have access(). */
#define HAVE_ACCESS 1
/* Define this if you have <unistd.h>. */
/* #define HAVE_UNISTD_H 1 */
/* Define this if you have waitpid(). */
/* #define HAVE_WAITPID 1 */
/* Define this if your system is POSIX.1 (ISO 9945-1:1990) compliant. */
/* #define POSIX 1 */
/* Define this if you have the vfork() system call. */
/* #define HAVE_VFORK 1 */
/* Define this if you have <vfork.h>. */
/* #define HAVE_VFORK_H 1 */
/* Define this if you don't have <stdlib.h> */
/* #define STDLIB_H_MISSING 1 */
/* Define this if you don't have <stddef.h> */
/* #define STDDEF_H_MISSING 1 */
/* Define this if you don't have remove(); unlink() will be used instead. */
/* #define REMOVE_MISSING 1 */
/* Define this if you don't have raise(); kill() will be used instead. */
/* #define RAISE_MISSING 1 */
/* Define this if you don't have fsetpos() and fgetpos(). */
/* Hmm. Waterloo C manual includes them but says "reserved
for future use." -msm */
/* #define FPOS_MISSING 1 */
/* Universal pointer type. */
/* If your compiler doesn't fully support void *, change `void' to `char'. */
typedef void *UNIV;
/* If your compiler doesn't support void as a function return type,
change `void' to `int'. */
typedef void VOID;
/* If you don't have an ANSI C conformant <limits.h>, define
CHAR_SIGNED as 1 or 0 according to whether the `char' type is signed.
The <limits.h> on some versions of System Release V 3.2 is not ANSI C
conformant: the value of CHAR_MIN is 0 even though the `char' type is
signed. */
/* #define CHAR_SIGNED 1 */
/* #define CHAR_SIGNED 0 */
#ifndef CHAR_SIGNED
#include <limits.h>
#if CHAR_MIN < 0
#define CHAR_SIGNED 1
#else
#define CHAR_SIGNED 0
#endif
#endif /* not CHAR_SIGNED */
/* VM/CMS uses EBCDIC. */
#include "ebcdic.h"

View file

@ -1,170 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: config.h /main/4 1996/06/19 17:14:22 drk $ */
/* unix.cfg: Configuration file for sgmls on Unix. */
/* A list of filename templates to use for searching for external entities.
The filenames are separated by the character specified in PATH_FILE_SEP.
See sgmls.man for details. */
#define DEFAULT_PATH "/usr/local/lib/sgml/%O/%C/%T:%N.%X:%N.%D"
/* The character that separates the filenames templates. */
#define PATH_FILE_SEP ':'
/* The character that separates filenames in a system identifier.
Usually the same as PATH_FILE_SEP. */
#define SYSID_FILE_SEP ':'
/* The environment variable that contains the list of filename templates. */
#define PATH_ENV_VAR "SGML_PATH"
/* MIN_DAT_SUBS_FROM and MIN_DATS_SUBS_TO tell sgmls how to transform a name
or system identifier into a legal filename. A character in
MIN_DAT_SUBS_FROM will be transformed into the character in the
corresponding position in MIN_DAT_SUBS_TO. If there is no such
position, then the character is removed. */
/* This says that spaces should be transformed to underscores, and
slashes to percents. */
#define MIN_DAT_SUBS_FROM " /"
#define MIN_DAT_SUBS_TO "_%"
/* Define this to allow tracing. */
/* #define TRACE 1 */
/* Define this you want support for subdocuments. This is implemented
using features that are not part of Standard C, so you might not want
to define it if you are porting to a new system. Otherwise I suggest
you leave it defined. */
#define SUPPORT_SUBDOC 1
/* Define HAVE_EXTENDED_PRINTF if your *printf functions supports
X/Open extensions; if they do, then, for example,
printf("%2$s%1$s", "bar", "foo")
should print `foobar'. */
#define HAVE_EXTENDED_PRINTF 1
/* Define HAVE_CAT if your system provides the X/Open message
catalogue functions catopen() and catgets(), and you want to use them.
An implementations of these functions is included and will be used if
you don't define this. On SunOS 4.1.1, if you do define this you
should set CC=/usr/xpg2bin/cc in the makefile. */
#define HAVE_CAT 1
#ifdef __STDC__
/* Define this if your compiler supports prototypes. */
#define USE_PROTOTYPES 1
#endif
/* Can't use <stdarg.h> without prototypes. */
#ifndef USE_PROTOTYPES
#define VARARGS 1
#endif
/* If your compiler defines __STDC__ but doesn't provide <stdarg.h>,
you must define VARARGS yourself here. */
/* #define VARARGS 1 */
/* Define this if you do not have strerror(). */
/* #define STRERROR_MISSING 1 */
/* Define this unless the character testing functions in ctype.h
are defined for all values representable as an unsigned char. You do
not need to define this if your system is ANSI C conformant. You
should define for old Unix systems. */
/* #define USE_ISASCII 1 */
/* Define this if your system provides the BSD style string operations
rather than ANSI C ones (eg bcopy() rather than memcpy(), and index()
rather than strchr()). */
/* #define BSD_STRINGS 1 */
/* Define this if you have getopt(). */
#define HAVE_GETOPT 1
/* Define this if you have access(). */
#define HAVE_ACCESS 1
/* Define this if you have <unistd.h>. */
#define HAVE_UNISTD_H 1
/* Define this if you have <sys/stat.h>. */
#define HAVE_SYS_STAT_H 1
/* Define this if you have waitpid(). */
#define HAVE_WAITPID 1
/* Define this if your system is POSIX.1 (ISO 9945-1:1990) compliant. */
#define POSIX 1
/* Define this if you have the vfork() system call. */
#define HAVE_VFORK 1
/* Define this if you have <vfork.h>. */
/* #define HAVE_VFORK_H 1 */
/* Define this if you don't have <stdlib.h> */
/* #define STDLIB_H_MISSING 1 */
/* Define this if you don't have <stddef.h> */
/* #define STDDEF_H_MISSING 1 */
/* Define this if you don't have <limits.h> */
/* #define LIMITS_H_MISSING 1 */
/* Define this if you don't have remove(); unlink() will be used instead. */
/* #define REMOVE_MISSING 1 */
/* Define this if you don't have raise(); kill() will be used instead. */
/* #define RAISE_MISSING 1 */
/* Define this if you don't have fsetpos() and fgetpos(). */
/* #define FPOS_MISSING 1 */
/* Universal pointer type. */
/* If your compiler doesn't fully support void *, change `void' to `char'. */
typedef void *UNIV;
/* If your compiler doesn't support void as a function return type,
change `void' to `int'. */
typedef void VOID;
/* If you don't have an ANSI C conformant <limits.h>, define
CHAR_SIGNED as 1 or 0 according to whether the `char' type is signed.
The <limits.h> on some versions of System Release V 3.2 is not ANSI C
conformant: the value of CHAR_MIN is 0 even though the `char' type is
signed. */
/* #define CHAR_SIGNED 1 */
/* #define CHAR_SIGNED 0 */
#ifndef CHAR_SIGNED
#include <limits.h>
#if CHAR_MIN < 0
#define CHAR_SIGNED 1
#else
#define CHAR_SIGNED 0
#endif
#endif /* not CHAR_SIGNED */
/* Assume the system character set is ISO Latin-1. */
#include "latin1.h"

View file

@ -1,617 +0,0 @@
#!/bin/sh
# Generate config.h from unix.cfg.
trap 'rm -f doit doit.c doit.o doit.log config.out; exit 1' 1 2 3 15
on=
off=
CC=${CC-cc}
# Normally we use VARARGS if __STDC__ is not defined.
# Test whether this assumption is wrong.
cat >doit.c <<\EOF
#ifdef __STDC__
#include <stdarg.h>
int foo(char *s,...)
{
va_list ap;
va_start(ap, s);
va_end(ap);
return 0;
}
#else
int foo = 0;
#endif
EOF
$CC $CFLAGS -c doit.c >/dev/null 2>&1
if test $? -ne 0
then
on="$on VARARGS"
fi
cat >doit.c <<\EOF
#include <stddef.h>
int foo = 0;
EOF
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
then
off="$off STDDEF_H_MISSING"
else
on="$on STDDEF_H_MISSING"
fi
cat >doit.c <<\EOF
#include <stdlib.h>
int foo = 0;
EOF
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
then
off="$off STDLIB_H_MISSING"
else
on="$on STDLIB_H_MISSING"
fi
cat >doit.c <<\EOF
#include <limits.h>
int foo = 0;
EOF
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
then
off="$off LIMITS_H_MISSING"
else
on="$on LIMITS_H_MISSING"
fi
cat >doit.c <<\EOF
#include <vfork.h>
int foo = 0;
EOF
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
then
on="$on HAVE_VFORK_H"
else
off="$off HAVE_VFORK_H"
fi
cat >doit.c <<\EOF
#include <unistd.h>
int foo = 0;
EOF
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
then
on="$on HAVE_UNISTD_H"
else
off="$off HAVE_UNISTD_H"
fi
cat >doit.c <<\EOF
#include <sys/types.h>
#include <sys/stat.h>
int foo = 0;
EOF
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
then
on="$on HAVE_SYS_STAT_H"
else
off="$off HAVE_SYS_STAT_H"
fi
cat >doit.c <<\EOF
/* Exit normally unless we need to use isascii. */
#include <ctype.h>
#include <signal.h>
static int whoops()
{
_exit(1);
}
main()
{
int c;
#ifdef isascii
#ifdef SIGSEGV
signal(SIGSEGV, whoops);
#endif
#ifdef SIGBUS
signal(SIGBUS, whoops);
#endif
#ifdef SIGIOT
signal(SIGIOT, whoops);
#endif
for (c = 128; c < 256; c++) {
if (c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || c == '5'
|| c == '6' || c == '7' || c == '8' || c == '9') {
if (!isdigit(c) || isalpha(c) || iscntrl(c) || isspace(c) || ispunct(c))
exit(1);
}
else if (isdigit(c))
exit(1);
else if (isalpha(c)) {
if (iscntrl(c) || isspace(c) || ispunct(c)
|| (islower(c) && toupper(c) != c && !isupper(toupper(c)))
|| (isupper(c) && tolower(c) != c && !islower(tolower(c))))
exit(1);
}
else if (islower(c) || isupper(c))
exit(1);
else if (iscntrl(c)) {
if (ispunct(c))
exit(1);
}
}
#endif /* isascii */
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
# This tries to find the symbol that looks like the array
# used by <ctype.h>, and sees if its length appears to be 128
# rather than 256.
if test 1 = `(nm -n doit 2>/dev/null) | awk '
BEGIN {
weight["0"] = 0;
weight["1"] = 1;
weight["2"] = 2;
weight["3"] = 3;
weight["4"] = 4;
weight["5"] = 5;
weight["6"] = 6;
weight["7"] = 7;
weight["8"] = 8;
weight["9"] = 9;
weight["a"] = weight["A"] = 10;
weight["b"] = weight["B"] = 11;
weight["c"] = weight["C"] = 12;
weight["d"] = weight["D"] = 13;
weight["e"] = weight["E"] = 14;
weight["f"] = weight["F"] = 15;
}
/^[0-9a-zA-Z]* D .*ctype/ && ctype_nr == 0 {
ctype_nr = NR;
addr = 0;
len = length($1);
for (i = 1; i <= len; i++)
addr = addr*16 + weight[substr($1, i, 1)];
}
/^[0-9a-zA-Z]* D / && NR == ctype_nr + 1 {
next_addr = 0;
len = length($1);
for (i = 1; i <= len; i++)
next_addr = next_addr*16 + weight[substr($1, i, 1)];
}
END {
size = next_addr - addr;
if (size >= 128 && size < 256)
print "1";
else
print "0";
}'`
then
on="$on USE_ISASCII"
else
if ((yes | man 3 ctype) 2>/dev/null) \
| sed -e 's/.//g' -e 's/ *$//' -e '/de-$/N' \
-e 's/-\n//g' -e '/defined$/N' -e '/only$/N' \
-e '/where$/N' -e '/isascii$/N' -e '/is$/N' \
-e 's/\n/ /g' -e 's/ */ /g' \
| grep "defined only where isascii is true" >/dev/null
then
on="$on USE_ISASCII"
else
off="$off USE_ISASCII"
fi
fi
else
on="$on USE_ISASCII"
fi
cat >doit.c <<\EOF
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
remove("foo");
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
off="$off REMOVE_MISSING"
else
on="$on REMOVE_MISSING"
fi
cat >doit.c <<\EOF
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
getopt(argc, argv, "v");
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
on="$on HAVE_GETOPT"
else
off="$off HAVE_GETOPT"
fi
cat >doit.c <<\EOF
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
access("foo", 4);
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
on="$on HAVE_ACCESS"
else
off="$off HAVE_ACCESS"
fi
cat >doit.c <<\EOF
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
vfork();
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
on="$on HAVE_VFORK"
else
off="$off HAVE_VFORK"
fi
cat >doit.c <<\EOF
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0) {
int status;
waitpid(-1, &status, 0);
}
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
on="$on HAVE_WAITPID"
else
off="$off HAVE_WAITPID"
fi
cat >doit.c <<\EOF
#include <string.h>
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
strerror(0);
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
off="$off STRERROR_MISSING"
else
on="$on STRERROR_MISSING"
fi
cat >doit.c <<\EOF
#include <strings.h>
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
bcopy((char *)0, (char *)0, 0);
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
# Only use BSD_STRINGS if ANSI string functions don't work.
cat >doit.c <<\EOF
#include <string.h>
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
memcpy((char *)0, (char *)0, 0);
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
off="$off BSD_STRINGS"
else
on="$on BSD_STRINGS"
fi
else
off="$off BSD_STRINGS"
fi
cat >doit.c <<\EOF
#include <signal.h>
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0)
raise(SIGINT);
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
off="$off RAISE_MISSING"
else
on="$on RAISE_MISSING"
fi
cat >doit.c <<\EOF
#include <stdio.h>
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0) {
fpos_t pos;
fsetpos(stdin, &pos);
fgetpos(stdin, &pos);
}
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
off="$off FPOS_MISSING"
else
on="$on FPOS_MISSING"
fi
cat >doit.c <<\EOF
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0) {
pid_t pid;
int status;
long n = sysconf(_SC_OPEN_MAX);
pid = waitpid(-1, &status, 0);
WIFSTOPPED(status);
WIFSIGNALED(status);
WIFEXITED(status);
WEXITSTATUS(status);
WTERMSIG(status);
WSTOPSIG(status);
}
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
on="$on POSIX"
else
off="$off POSIX"
fi
cat >doit.c <<\EOF
#include <stdio.h>
#include <signal.h>
static int whoops()
{
_exit(1);
}
main()
{
char buf[30];
#ifdef SIGSEGV
signal(SIGSEGV, whoops);
#endif
#ifdef SIGBUS
signal(SIGBUS, whoops);
#endif
#ifdef SIGIOT
signal(SIGIOT, whoops);
#endif
sprintf(buf, "%2$s%2$s%1$s%1$s", "bar", "foo");
exit(!!strcmp(buf, "foofoobarbar"));
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
on="$on HAVE_EXTENDED_PRINTF"
else
off="$off HAVE_EXTENDED_PRINTF"
fi
cat >doit.c <<\EOF
#include <nl_types.h>
main(argc, argv)
int argc;
char **argv;
{
if (argc == 0) {
nl_catd d = catopen("foo", 0);
catgets(d, 1, 1, "default");
catclose(d);
}
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
on="$on HAVE_CAT"
else
off="$off HAVE_CAT"
fi
cat >doit.c <<\EOF
#include <limits.h>
char c = UCHAR_MAX;
main(argc, argv)
int argc;
char **argv;
{
#if CHAR_MIN < 0
exit(!(c < 0));
#else
exit(!(c > 0));
#endif
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
char_signed=
else
cat >doit.c <<\EOF
main()
{
int i;
for (i = 0; i < 512; i++) {
char c = (char)i;
if (c < 0)
exit(1);
}
exit(0);
}
EOF
if $CC $CFLAGS -o doit doit.c $LIBS >/dev/null 2>&1 && ./doit 2>/dev/null
then
char_signed=0
else
char_signed=1
fi
fi
cat >doit.c <<\EOF
typedef void VOID;
extern VOID bar();
VOID foo()
{
}
EOF
if $CC $CFLAGS -c doit.c >/dev/null 2>&1
then
void_ret=void
else
void_ret=int
fi
cat >doit.c <<\EOF
void *foo()
{
static char *buf;
return buf;
}
EOF
if $CC $CFLAGS -c doit.c >doit.log 2>&1
then
if test -s doit.log
then
void_star="char \*"
else
void_star="void \*"
fi
else
void_star="char \*"
fi
edit=
rm -f doit.c doit doit.log doit.o
for var in $on
do
edit="$edit -e 's;^/\\* *\\(#define $var [^/]*\\) *\\*/;\\1;'"
done
for var in $off
do
edit="$edit -e 's;^#define $var [^/]*;/* & */;'"
done
if test -n "$char_signed"
then
edit="$edit -e 's;^/\\* *\\(#define CHAR_SIGNED $char_signed\\) *\\*/;\\1;'"
fi
edit="$edit -e 's/^typedef .*VOID;/typedef $void_ret VOID;/'"
edit="$edit -e 's/^typedef .*UNIV;/typedef ${void_star}UNIV;/'"
if test "X$(PREFIX)" != "X/usr/local"
then
edit="$edit -e '/DEFAULT_PATH/s;/usr/local;$PREFIX;g'"
fi
eval sed $edit unix.cfg ">config.out"
mv config.out config.h
exit 0

View file

@ -1,467 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: context.c /main/3 1996/06/19 17:14:26 drk $ */
#include "sgmlincl.h" /* #INCLUDE statements for SGML parser. */
#include "context.h"
#define GI (tags[ts].tetd->etdgi+1) /* GI of current element. */
#define NEWGI (newetd->etdgi+1) /* GI of new tag. */
#define STATUS (*statuspt) /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
#define PEX (-1) /* GI is a plus exception and not a minus. */
#define ANYHIT(h) (grplongs == 1 ? ((h)[0] != 0) : anyhit(h))
#define HITSET(h, n) (h[(unsigned)(n-1)>>LONGPOW] \
|= (1L<<((n-1)&(LONGBITS-1))))
#define HITON(h, n) (h[(unsigned)(n-1)>>LONGPOW] & (1L<<((n-1)&(LONGBITS-1))))
#define HITOFF(h, n) (!(HITON(h, n)))
#define TOKENHIT HITON(H,T)
static
VOID copypos(to, from)
struct mpos *to, *from;
{
int i;
for (i = 0; i <= (int)from[0].t; i++) {
to[i].g = from[i].g;
to[i].t = from[i].t;
memcpy(to[i].h, from[i].h, grplongs*sizeof(unsigned long));
}
}
/* CONTEXT: Determine whether a GI is valid in the present structural context.
Returns RCHIT if valid, RCEND if element has ended, RCREQ if a
different element is required, and RCMISS if it is totally invalid.
On entry, pos points to the model token to be tested against the GI.
TO DO: Save allowed GIs for an error message on an RCMISS.
Support a "query" mode (what is allowed now?) by working
with a copy of pos.
*/
int context(gi, mod, pos, statuspt, mexts)
struct etd *gi; /* ETD of new GI. */
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
UNCH *statuspt; /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
int mexts; /* >0=stack level of minus grp; -1=plus; 0=none.*/
{
UNCH toccsv, gtypesv; /* Save token's TOCC and GTYPE in case grp ends.*/
if (mexts == -1) {
if (STATUS == RCEND)
return RCPEX;
copypos(savedpos, pos);
}
Tstart = T; /* Save starting token for AND group testing. */
while (STATUS!=RCMISS && STATUS!=RCEND) {
TRACEGI("CONTEXT", gi, mod, pos, Tstart);
while (TTYPE==TTOR || TTYPE==TTSEQ || TTYPE==TTAND) {
pos[P+1].g = M++; pos[++P].t = 1; HITCLEAR(H);
Tstart = T; /* Save starting token for AND group testing. */
TRACEGI("OPENGRP", gi, mod, pos, Tstart);
}
STATUS = (UNCH)tokenreq(gi, mod, pos);
TRACEGI("STATUS", gi, mod, pos, Tstart);
if (gi==TOKEN.tu.thetd) { /* Hit in model. */
STATUS = (UNCH)RCHIT;
gtypesv = GTYPE; toccsv = TOCC;
newtoken(mod, pos, statuspt);
return(mexts<=0 ? RCHIT : (gtypesv==TTOR || BITON(toccsv, TOPT))
? RCMEX : RCHITMEX);
}
if (STATUS==RCREQ) {
if (mexts == -1)
break;
STATUS = RCHIT;
nextetd = TOKEN.tu.thetd;
newtoken(mod, pos, statuspt);
return(RCREQ);
}
/* else if (STATUS==RCNREQ) */
if (mexts>0) return(RCMEX);
newtoken(mod, pos, statuspt);
}
if (mexts == -1) {
copypos(pos, savedpos);
return STATUS = RCPEX;
}
return((int)STATUS);
}
/* ECONTEXT: Determine whether the current element can be ended, or whether
non-optional tokens remain at the current level or higher.
Returns 1 if element can be ended, or 0 if tokens remain.
On entry, STATUS==RCEND if there are no tokens left; if not,
pos points to the next model token to be tested.
TO DO: Support a "query" mode (what is required now?) by working
with a copy of pos.
*/
int econtext(mod, pos, statuspt)
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
UNCH *statuspt; /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
{
unsigned next; /* Position in AND group of next testable token.*/
Tstart = T;
TRACEEND("ECONT", mod, pos, 0, 0, Tstart);
if (P<=1) {nextetd = 0; return(TOKENHIT || BITON(TOCC, TOPT));}
nextetd = TTYPE == TTETD ? TOKEN.tu.thetd : 0;
while (STATUS!=RCMISS && STATUS!=RCEND) {
STATUS = (UNCH)testend(mod, pos, 0, 0);
TRACEEND("ECONTEND", mod, pos, 0, 0, Tstart);
nextetd = P<=1 || TTYPE != TTETD ? 0 : TOKEN.tu.thetd;
if (STATUS==RCEND) return(1);
if (P<=1) return(TOKENHIT || BITON(TOCC, TOPT));
if (STATUS==RCMISS) {
if (BITON(TOCC, TOPT)) nextetd = 0;
return(0);
}
if (!tokenopt(mod, pos)) return(0);
STATUS = RCNREQ;
if (GTYPE!=TTAND) ++T; /* T!=GNUM or group would have ended. */
else T = (UNCH)(((next = (UNS)offbit(H, (int)T, GNUM))!=0) ?
next : offbit(H, 0, GNUM));
M = G + grpsz(&GHDR, (int)T-1) + 1;
TRACEEND("ECONTNEW", mod, pos, 0, 0, Tstart);
}
if (STATUS==RCMISS) {
if (BITON(TOCC, TOPT)) nextetd = 0;
return(0);
}
return(1); /* STATUS==RCEND */
}
/* NEWTOKEN: Find the next token to test. Set STATUS to indicate results:
RCEND if element has ended (no more tokens to test);
RCREQ if required new token was found;
RCNREQ if non-required new token was found;
RCHIT if a hit token was repeated (now non-required);
and RCMISS if a new token can't be found because current token
(which was not hit) was neither unconditionally required nor
optional.
*/
VOID newtoken(mod, pos, statuspt)
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
UNCH *statuspt; /* Token status: RCHIT RCMISS RCEND RCREQ RCNREQ*/
{
unsigned nextand = 0; /* Position in AND group of next testable token.*/
int currhit = (STATUS==RCHIT); /* 1=current GI hit; 0=not. */
/* If the GI was a hit, turn on the hit bit and set the status to
assume that the token to be tested against the next GI will
be non-required. If the current token is repeatable, exit so
it will stand as the next token to test.
*/
if (STATUS==RCHIT) {
HITSET(H, T);
STATUS = RCNREQ;
if (BITON(TOCC, TREP)) return;
}
/* At this point, we must determine the next token to test:
either against the next GI, if this one was a hit, or
against the same GI if conditions permit a retry.
To find the next token, we must first end the current group,
if possible, and any we can that contain it.
If the outermost group was a hit and is repeatable, or
if the element has ended, we exit now.
If it hasn't ended, or was optional and ended with a miss,
we can retry the GI against the next token.
*/
if ((STATUS = (UNCH)testend(mod, pos, 1, 1))!=RCNREQ) return;
/* At this point, the "current token" is either the original one,
or the token for the highest level unhit group that it ended.
We will retry a missed GI, by testing it against the next
token, if the current token:
1. Is optional;
2. Was hit (i.e., because it is repeatable and was hit by a
previous GI or because it is a hit group that just ended);
3. Is in an AND or OR group and is not the last testable token.
It will be the next sequential one (unhit one, in an AND group);
if there are none left, use the first unhit token in the group.
In either case, set M to correspond to the new T.
*/
retest:
TRACEEND("RETEST", mod, pos, (int)nextand, 1, Tstart);
if (GTYPE==TTAND) {
nextand = offbit(H, (int)T, GNUM);
if (!nextand)
nextand = offbit(H, 0, GNUM);
}
if ( BITON(TOCC, TOPT)
|| TOKENHIT
|| GTYPE==TTOR /* T!=GNUM or group would have ended. */
|| nextand ) {
if (GTYPE!=TTAND) ++T; /* T!=GNUM or group would have ended. */
else T = nextand;
M = G + grpsz(&GHDR, (int)T-1) + 1;
if (GTYPE==TTAND) {
/* If AND group wrapped, it can end if all non-optionals were
hit. */
if (T==Tstart && !currhit) {
UNCH Psave = P;
int rc = testend(mod, pos, 0, 1);
if (Psave!=P) {if ((STATUS = (UNCH)rc)==RCNREQ) goto retest;}
else STATUS = RCMISS;
}
/* We only test unhit tokens, so we must use an unhit token
as Tstart (which is used to detect when the AND group has
wrapped). */
else if (HITON(H,Tstart)) Tstart = T;
}
}
else STATUS = RCMISS;
TRACEEND("NEWTOKEN", mod, pos, (int)nextand, 1, Tstart);
}
/* TESTEND: End the current group, if possible, and any that it is nested in.
The current token will either be a group header, or some token
that could not end its group. Return 1 if the (possibly new)
current token is repeatable; 0 if it is not.
*/
int testend(mod, pos, andoptsw, newtknsw)
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
int andoptsw; /* 1=test optional AND members; 0=ignore. */
int newtknsw; /* 1=new token test; 0=end element test. */
{
int rc = 0; /* Return code: RCNREQ RCHIT RCMISS RCEND */
while (!rc) {
TRACEEND("TRACEEND", mod, pos, rc, andoptsw, Tstart);
/* TESTMISS:
If we've hit no tokens yet in the current group, and
the current token is the last unhit one in the group we can test,
we will end the group (it may never really have started!)
because we might be able to try the token that follows it.
In any group, a token is the last testable unhit token if it
is the last sequential one, as the GI was already tested against
the preceding unhit tokens. In addition,
in a SEQ group, it is the last testable unhit token if it isn't
optional, because we can't skip past it to the following ones.
If we end the group, before popping the level, set M to G, as this
level`s group header will be the next level's current token.
*/
if (!ANYHIT(H) && (T==GNUM
|| (GTYPE==TTSEQ && BITOFF(TOCC, TOPT)))) {
M = G; --P; Tstart = T;
if (P<=1) {
if (BITON(TOCC, TOPT) || TOKENHIT) rc = RCEND;
else rc = RCMISS;
}
continue;
}
/* TESTHIT:
See if we've hit all the non-optional tokens in the group.
If so, pop to the previous level and set the group's hit bit.
If we were called from NEWTOKEN we are trying to find the token
to test against the next start-tag, so if the group is repeatable,
process it again. (If not, we were called from ECONTEXT and
are testing whether the element can be ended.)
Otherwise, if we are at the first level, the element is over.
*/
if ((GTYPE==TTOR && TOKENHIT)
|| (GTYPE==TTSEQ && T==(UNCH)GNUM
&& (TOKENHIT || BITON(TOCC, TOPT)))
|| (GTYPE==TTAND && allhit(&GHDR, H, 0, andoptsw))) {
M = G;
--P;
HITSET(H, T);
Tstart = T;
if (newtknsw && BITON(TOCC, TREP)) rc = RCHIT;
else if (P<=1) rc = RCEND;
/* If we are looking for a new token to test against the next
start-tag, then we need to consider optional and members
in this group, even if we didn't need to consider them
in the group that we just ended because that group had
wrapped. */
else if (newtknsw) andoptsw = 1;
/* Else loop to test new outer group. */
}
else rc = RCNREQ; /* No group ended this time, so return. */
}
TRACEEND("ENDFOUND", mod, pos, rc, andoptsw, Tstart);
return(rc);
}
/* TOKENOPT: Return 1 if current token is contextually optional;
otherwise, return 0.
*/
int tokenopt(mod, pos)
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
{
TRACEEND("TOKENOPT", mod, pos, 0, 0, Tstart);
return (BITON(TOCC, TOPT) /* Inherently optional. */
|| TOKENHIT /* Was hit (handles "plus" suffix case). */
|| (!ANYHIT(H) && groupopt(mod, pos)));
/* In optional group with no hits. */
}
/* GROUPOPT: Temporarily makes the current group be the current token so that
TOKENOPT() can be applied to it. Returns the value returned
by TOKENOPT.
*/
int groupopt(mod, pos)
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
{
UNCH saveM; /* Save M when testing if group is not required.*/
int rc; /* 1=contextually optional; 0=not. */
if (P==1) return(BITON(GOCC, TOPT) || TOKENHIT);
saveM = M; M = G; --P;
rc = tokenopt(mod, pos);
++P; G = M; M = saveM;
return(rc);
}
/* TOKENREQ: Returns RCREQ if the current token is "contextually required".
That is, it is not contextually optional and
1) it is a member of a "seq" group that is either required
or has at least 1 hit token.
2) it is a member of an "and" group in which all other
tokens were hit.
Optional tokens are not counted
if GI is ETDCDATA, as we are looking for an
omitted start-tag. Otherwise, they are counted,
as the GI might match one of them.
Returns RCNREQ if the current token is "not required".
*/
int tokenreq(gi, mod, pos)
struct etd *gi; /* ETD of new GI. */
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
{
TRACEGI("TOKENREQ", gi, mod, pos, Tstart);
return( tokenopt(mod, pos) ? RCNREQ
: ( GTYPE==TTSEQ && (ANYHIT(H) || groupreq(gi, mod, pos)==RCREQ)
#if 0
|| (GTYPE==TTAND && allhit(&GHDR, H, T, \*gi!=ETDCDATA*\ 1))
#endif
)
? RCREQ : RCNREQ );
}
/* GROUPREQ: Temporarily makes the current group be the current token so that
TOKENREQ() can be applied to it. Returns the value returned
by TOKENREQ.
*/
int groupreq(gi, mod, pos)
struct etd *gi; /* ETD of new GI. */
struct thdr mod[]; /* Model of current open element. */
struct mpos pos[]; /* Position in open element's model. */
{
UNCH saveM; /* Save M when testing if group is not required.*/
int rc; /* Return code: RCREQ RCNREQ */
if (P==1) return(BITOFF(GOCC, TOPT) ? RCREQ : RCNREQ);
saveM = M; M = G; --P;
rc = tokenreq(gi, mod, pos);
++P; G = M; M = saveM;
return(rc);
}
/* GRPSZ: Returns the number of tokens spanned by a group in the model (M),
from the group's start (G) to a specified index within the group (T).
M = 0, plus 1 for each token in the group, plus the size of
any subgroups (gotten by calling GRPSZ recursively). On entry,
M must be equal to G at the current level.
*/
int grpsz(g, t)
struct thdr *g; /* mod[G]: Ptr to group in the model. */
int t; /* T: Index of last token in the group. */
{
struct thdr *p = g; /* Ptr to current token in the model. */
int m = 0; /* Size of group (including nested groups). */
int i = 0; /* Number of group members (loop counter). */
UNS type; /* Token type (without TOREP bits). */
while (++i<=t) {
++p; ++m;
type = GET(p->ttype, TTMASK);
if (type==TTOR || type==TTSEQ || type==TTAND) {
m += grpsz(p, p->tu.tnum);
p = g+m;
}
}
return(m);
}
/* ALLHIT: Returns 1 if all hit bits for the specified group are turned on,
(other than those that correspond to optional tokens if "opt" is
0) and the "but" bit (all bits if "but" bit is zero). Otherwise,
returns 0. GRPSZ is used to skip past subgroup tokens.
*/
int allhit(p, hits, but, opt)
struct thdr *p; /* mod[G]: Ptr to group in the model. */
unsigned long *hits; /* H: Hit bits to be tested. */
int but; /* Index of bit to ignore; 0=test all. */
int opt; /* 1=optional tokens must be hit; 0=ignore. */
{
int b = 0; /* Index of bit being tested in hits. */
int e = p->tu.tnum; /* Ending index (number of bits to test). */
unsigned type; /* Token type (without TOREP bits). */
while (++p, ++b<=e) {
if (HITOFF(hits,b) && (opt || BITOFF(p->ttype,TOPT)) && b!=but)
return 0;
if ((type = GET(p->ttype,TTMASK))==TTOR || type==TTSEQ || type==TTAND)
p += grpsz(p, p->tu.tnum);
}
return 1;
}
/* OFFBIT: Returns the index of the first unset bit after (i.e., not including)
the caller's "first" bit. If all bits through the
specified last bit are on, it returns 0.
*/
int offbit(bits, first, last)
unsigned long *bits; /* Bits to be tested. */
int first; /* Index of first bit to be tested in bits. */
int last; /* Index of last bit to be tested in bits. */
{
while (++first <= last)
if (HITOFF(bits, first))
return first;
return 0;
}
/* ANYHIT: Return 1 if any bit is set. */
int anyhit(bits)
unsigned long *bits;
{
int i;
for (i = 0; i < grplongs; i++)
if (bits[i] != 0)
return 1;
return 0;
}
/*
Local Variables:
c-indent-level: 5
c-continued-statement-offset: 5
c-brace-offset: -5
c-argdecl-indent: 0
c-label-offset: -5
comment-column: 30
End:
*/

View file

@ -1,40 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: context.h /main/3 1996/06/19 17:14:30 drk $ */
/* context.h */
#define M pos[0].g /* Index of current token in model. */
#ifdef P
#undef P
#endif
#define P pos[0].t /* Index of current group in pos. */
#define G pos[P].g /* Index of current group in model. */
#define T pos[P].t /* Index of current token in its group. */
#define H pos[P].h /* Pointer to hit bits for current group. */
#define GHDR mod[G] /* Current group header. */
#define TOKEN mod[M] /* Current token. */
#define TTYPE (GET(TOKEN.ttype, TTMASK)) /* Token type of current token. */
#define TOCC (GET(TOKEN.ttype, TOREP)) /* Occurrence for current token. */
#define GTYPE (GET(GHDR.ttype, TTMASK)) /* Token type of current group. */
#define GOCC (GET(GHDR.ttype, TOREP)) /* Occurrence for current group. */
#define GNUM GHDR.tu.tnum /* Number of tokens in current grp. */

View file

@ -1,95 +0,0 @@
/* dos.cfg: Configuration file for sgmls on MS-DOS. */
/* Define this if your compiler supports prototypes. */
#define USE_PROTOTYPES 1
/* Define this if you do not have strerror(). */
/* Borland C++ has strerror(), but it adds a newline to the end of the
message, so don't use it. */
#define STRERROR_MISSING 1
/* Define this if you have getopt(). */
/* #define HAVE_GETOPT 1 */
#ifndef HAVE_GETOPT
/* #define OPTION_CHAR '/' */
/* Use MS-DOS (undocumented) system call to get switch character. */
#define SWITCHAR 1
#define REORDER_ARGS 1
/* #define CASE_INSENSITIVE_OPTIONS 1 */
#endif
/* A list of filename templates to use for searching for external entities.
See sgmls.man for details. */
#define DEFAULT_PATH "C:\\SGML\\%N.%X;%N.%X;%N.%D"
/* The character that separates the filenames templates. */
#define PATH_FILE_SEP ';'
/* The character that separates filenames in a system identifier.
Usually the same as PATH_FILE_SEP. */
#define SYSID_FILE_SEP ';'
/* The environment variable that contains the list of filename templates. */
#define PATH_ENV_VAR "SGML_PATH"
/* Define this if open() understands the O_NOINHERIT flag. This tells
DOS that subprocesses should not inherit the file descriptor. */
#define HAVE_O_NOINHERIT 1
/* When turning a minimum literal into a filename, each character in
MIN_DAT_SUBS_FROM will be replaced by the character at the
corresponding position in MIN_DATA_SUBS_TO. If there is no such
character, then the character will be stripped. */
#define MIN_DAT_SUBS_FROM " +,./:=?"
#define MIN_DAT_SUBS_TO ""
/* Define this if you have access(). */
#define HAVE_ACCESS 1
/* Define this if you have <unistd.h>. */
/* #define HAVE_UNISTD_H 1 */
/* Define this if you have a Unix-style <sys/stat.h>. */
#define HAVE_SYS_STAT_H 1
/* Define this to strip an extension off the program name in argv[0],
before using it in error messsages. */
#define PROG_STRIP_EXTENSION 1
/* Define this to fold the program name in argv[0] to lower case,
before using it in error messsages. */
#define PROG_FOLD 1
/* Before using argv[0] in error messages, strip off everything up to and
including the last character in prog that occurs in PROG_PREFIX. */
#define PROG_PREFIX "\\/:"
/* Define this to allow tracing. */
/* #define TRACE 1 */
/* Define this you want support for subdocuments. This is implemented
using features that are not part of Standard C. */
#define SUPPORT_SUBDOC 1
/* Define this if your shell does not allow you conveniently to
redirect errors to a file. Then sgmls will provide an option (-f)
that does this. */
#define CANT_REDIRECT_STDERR 1
typedef void *UNIV; /* Universal (i.e., undefined) pointer type. */
typedef void VOID; /* void as a function return type */
/* If you don't have <limits.h>, define CHAR_SIGNED as 1 or 0
according to whether the `char' type is signed. */
/* #define CHAR_SIGNED 1 */
/* #define CHAR_SIGNED 0 */
#ifndef CHAR_SIGNED
#include <limits.h>
#if CHAR_MIN < 0
#define CHAR_SIGNED 1
#else
#define CHAR_SIGNED 0
#endif
#endif /* not CHAR_SIGNED */
/* Assume the system character set is ISO Latin-1. */
#include "latin1.h"

View file

@ -1,63 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: dosproc.c /main/3 1996/06/19 17:14:34 drk $ */
/* dosproc.c -
MS-DOS implementation of run_process().
Written by James Clark (jjc@jclark.com).
*/
#include "config.h"
#ifdef SUPPORT_SUBDOC
#include "std.h"
#include "entity.h"
#include "appl.h"
#include <process.h>
int run_process(argv)
char **argv;
{
int ret;
fflush(stdout);
fflush(stderr);
ret = spawnvp(P_WAIT, argv[0], argv);
if (ret < 0)
appl_error(E_EXEC, argv[0], strerror(errno));
return ret;
}
#endif /* SUPPORT_SUBDOC */
/*
Local Variables:
c-indent-level: 5
c-continued-statement-offset: 5
c-brace-offset: -5
c-argdecl-indent: 0
c-label-offset: -5
End:
*/

View file

@ -1,65 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ebcdic.c /main/3 1996/06/19 17:14:38 drk $ */
/* ASCII to EBCDIC (ISO 8859-1 to IBM CP 37v2) table. */
/* Contributed by C. M. Sperberg-McQueen <u35395@uicvm.uic.edu>. */
/* The mapping must be 1 to 1. The positions of *CHAR and *CH in the table
must not be changed, although the values in ebcdic.h can be. */
#include "ebcdic.h"
unsigned char charset[] = {
0, 1, 2, 3, 55, 45, 46, 47,
GENRECHAR, TABCHAR, RSCHAR, 11, 12, RECHAR, 14, 15,
16, 17, 18, 19, 60, 61, 50, 38,
24, 25, EOFCHAR, 39, EOBCHAR, DELCDATA, DELSDATA, DELNONCH,
SPCCHAR, 90, 127, 123, 91, 108, 80, 125,
77, 93, 92, 78, 107, 96, 75, 97,
240, 241, 242, 243, 244, 245, 246, 247,
248, 249, 122, 94, 76, 126, 110, 111,
124, 193, 194, 195, 196, 197, 198, 199,
200, 201, 209, 210, 211, 212, 213, 214,
215, 216, 217, 226, 227, 228, 229, 230,
231, 232, 233, 173, 224, 189, 176, 109,
121, 129, 130, 131, 132, 133, 134, 135,
136, 137, 145, 146, 147, 148, 149, 150,
151, 152, 153, 162, 163, 164, 165, 166,
167, 168, 169, 192, 79, 208, 161, 7,
4, 6, 8, 9, 10, 20, 21, 23,
26, 27, 32, 33, 34, 35, 36, 40,
41, 42, 43, 44, 48, 49, 51, 52,
53, 54, 56, 57, 58, 59, 62, 255,
65, 170, 74, 177, 159, 178, 106, 181,
187, 180, 154, 138, 95, 202, 175, 188,
144, 143, 234, 250, 190, 160, 182, 179,
157, 218, 155, 139, 183, 184, 185, 171,
100, 101, 98, 102, 99, 103, 158, 104,
116, 113, 114, 115, 120, 117, 118, 119,
172, 105, 237, 238, 235, 239, 236, 191,
128, 253, 254, 251, 252, 186, 174, 89,
68, 69, 66, 70, 67, 71, 156, 72,
84, 81, 82, 83, 88, 85, 86, 87,
140, 73, 205, 206, 203, 207, 204, 225,
112, 221, 222, 219, 220, 141, 142, 223,
};

View file

@ -1,63 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: ebcdic.h /main/3 1996/06/19 17:14:42 drk $ */
/* SGML Character Use: EBCDIC
*/
#define EOFCHAR '\077' /* FUNCTION: EE (entity end: files). */
#define EOBCHAR '\034' /* NONCHAR: EOB (file entity: end of buffer. */
#define RSCHAR '\045' /* FUNCTION: RS (record start). */
#define RECHAR '\015' /* FUNCTION: RE (record end). */
#define TABCHAR '\005' /* FUNCTION: TAB (horizontal tab). */
#define SPCCHAR '\100' /* FUNCTION: SPACE (horizontal space). */
#define GENRECHAR '\026' /* NONCHAR: Generated RE. */
#define DELCDATA '\035' /* NONCHAR: Delimiter for CDATA entity in
attribute value. */
#define DELSDATA '\036' /* NONCHAR: Delimiter for SDATA entity in
attribute value. */
#define DELNONCH '\037' /* NONCHAR: non-SGML character prefix. */
/* This should work for EBCDIC. See comment in latin1.h. */
#define SHIFTNON(ch) ((UNCH)(ch) | 0200)
#define UNSHIFTNON(ch) ((UNCH)(ch) & ~0200)
/* See comment in latin1.h. */
#define CANON_NONSGML 255
/* See comment in latin1.h. */
#define CANON_DATACHAR 254
/* Components for a formal public identifier for the whole of the
system character set. Protect with ifndef so that it can be overriden
in config.h. */
/* Use a private escape sequence. */
#ifndef SYSTEM_CHARSET_DESIGNATING_SEQUENCE
#define SYSTEM_CHARSET_DESIGNATING_SEQUENCE "ESC 2/5 2/15 3/0"
#endif
#ifndef SYSTEM_CHARSET_OWNER
#define SYSTEM_CHARSET_OWNER "-//IBM"
#endif
#ifndef SYSTEM_CHARSET_DESCRIPTION
#define SYSTEM_CHARSET_DESCRIPTION "Code Page 1047"
#endif

View file

@ -1,428 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: entgen.c /main/3 1996/06/19 17:14:46 drk $ */
/* entgen.c -
Implement entgen() which generates a list of filenames from a struct fpi.
Written by James Clark (jjc@jclark.com).
*/
#include "config.h"
#ifdef HAVE_ACCESS
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* For R_OK. */
#endif /* HAVE_UNISTD_H */
#ifndef R_OK
#define R_OK 4
#endif /* not R_OK */
#endif /* HAVE_ACCESS */
#include "sgmlaux.h"
/* Environment variable that contains path. */
#ifndef PATH_ENV_VAR
#define PATH_ENV_VAR "SGML_PATH"
#endif
/* Default search path. See field() for interpretation of %*. */
#ifndef DEFAULT_PATH
#define DEFAULT_PATH "/usr/local/lib/sgml/%O/%C/%T:%N.%X:%N.%D"
#endif
#ifndef PATH_FILE_SEP
#define PATH_FILE_SEP ':'
#endif
#ifndef SYSID_FILE_SEP
#define SYSID_FILE_SEP ':'
#endif
/* This says: change space to underscore, slash to percent. */
#ifndef MIN_DAT_SUBS_FROM
#define MIN_DAT_SUBS_FROM " /"
#endif
#ifndef MIN_DAT_SUBS_TO
#define MIN_DAT_SUBS_TO "_%"
#endif
static int field P((struct fpi *, int, char *));
static int mindatcpy P((char *, char *, int, int));
static int testopen P((char *));
static UNIV sysidgen P((char *));
static char *path = 0;
/* Non-zero if searching should be performed when a system identifier
is specified. */
static int sysidsrch = 0;
#define EMPTY_VERSION "default"
static char *classes[] = {
"capacity",
"charset",
"notation",
"syntax",
"document",
"dtd",
"elements",
"entities",
"lpd",
"nonsgml",
"shortref",
"subdoc",
"text"
};
/* This is mainly for compatibility with arcsgml. */
static char *genext[] = {
"nsd", /* Non-SGML data entity. */
"gml", /* GML document or text entity. */
"spe", /* System parameter entity. */
"dtd", /* Document type definition. */
"lpd", /* Link process definition. */
"pns", /* Public non-SGML data entity. */
"pge", /* Public general entity. */
"ppe", /* Public parameter entity. */
"pdt", /* Public document type definition. */
"plp", /* Public link process definition. */
"vns", /* Display version non-SGML data entity. */
"vge", /* Display version general entity. */
"vpe", /* Display version parameter entity. */
"vdt", /* Display version document type definition.*/
"vlp", /* Display version link process definition.*/
};
static char *ext[] = {
"sgml", /* SGML subdocument */
"data", /* Data */
"text", /* General text */
"parm", /* Parameter entity */
"dtd", /* Document type definition */
"lpd", /* Link process definition */
};
/* Like memcpy, but substitute, fold to lower case (if fold is
non-zero) and null terminate. This is used both for minimum data and
for names. If p is NULL, do nothing. Return len. */
static int mindatcpy(p, q, len, fold)
char *p, *q;
int len;
int fold;
{
static char subsfrom[] = MIN_DAT_SUBS_FROM;
static char substo[] = MIN_DAT_SUBS_TO;
int n;
if (!p)
return len;
for (n = len; --n >= 0; q++) {
char *r = strchr(subsfrom, *q);
if (!r) {
if (fold && ISASCII(*q) && isupper((UNCH)*q))
*p++ = tolower((UNCH)*q);
else
*p++ = *q;
}
else {
int i = r - subsfrom;
if (i < sizeof(substo) - 1)
*p++ = substo[i];
}
}
*p = '\0';
return len;
}
/* Return length of field. Copy into buf if non-NULL. */
static int field(f, c, buf)
struct fpi *f;
int c;
char *buf;
{
int n;
switch (c) {
case '%':
if (buf) {
buf[0] = '%';
buf[1] = '\0';
}
return 1;
case 'N': /* the entity, document or dcn name */
return mindatcpy(buf, (char *)f->fpinm, ustrlen(f->fpinm),
(f->fpistore != 1 && f->fpistore != 2 && f->fpistore != 3
? NAMECASE
: ENTCASE));
case 'D': /* dcn name */
if (f->fpistore != 1) /* not a external data entity */
return -1;
if (f->fpinedcn == 0) /* it's a SUBDOC */
return -1;
return mindatcpy(buf, (char *)f->fpinedcn, ustrlen(f->fpinedcn),
NAMECASE);
case 'X':
/* This is for compatibility with arcsgml */
if (f->fpistore < 1 || f->fpistore > 5)
return -1;
n = (f->fpipubis != 0)*(f->fpiversw > 0 ? 2 : 1)*5+f->fpistore - 1;
if (buf)
strcpy(buf, genext[n]);
return strlen(genext[n]);
case 'Y': /* tYpe */
n = f->fpistore;
if (n < 1 || n > 5)
return -1;
if (n == 1 && f->fpinedcn == 0) /* it's a SUBDOC */
n = 0;
if (buf)
strcpy(buf, ext[n]);
return strlen(ext[n]);
case 'P': /* public identifier */
if (!f->fpipubis)
return -1;
return mindatcpy(buf, (char *)f->fpipubis, ustrlen(f->fpipubis), 0);
case 'S': /* system identifier */
if (!f->fpisysis)
return -1;
else {
UNCH *p;
n = 0;
for (p = f->fpisysis; *p; p++)
if (*p != RSCHAR) {
if (buf)
buf[n] = *p == RECHAR ? '\n' : *p;
n++;
}
return n;
}
}
/* Other fields need a formal public identifier. */
/* return -1 if the formal public identifier was invalid or missing. */
if (f->fpiversw < 0 || !f->fpipubis)
return -1;
switch (c) {
case 'A': /* Is it available? */
return f->fpitt == '+' ? 0 : -1;
case 'I': /* Is it ISO? */
return f->fpiot == '!' ? 0 : -1;
case 'R': /* Is it registered? */
return f->fpiot == '+' ? 0 : -1;
case 'U': /* Is it unregistered? */
return f->fpiot == '-' ? 0 : -1;
case 'L': /* public text language */
if (f->fpic == FPICHARS)
return -1;
/* it's entered in all upper case letters */
return mindatcpy(buf, (char *)f->fpipubis + f->fpil, f->fpill, 1);
case 'O': /* owner identifier */
return mindatcpy(buf, (char *)f->fpipubis + f->fpio, f->fpiol, 0);
case 'C': /* public text class */
n = f->fpic - 1;
if (n < 0 || n >= sizeof(classes)/sizeof(classes[0]))
return -1;
if (buf)
strcpy(buf, classes[n]);
return strlen(classes[n]);
case 'T': /* text description */
return mindatcpy(buf, (char *)f->fpipubis + f->fpit, f->fpitl, 0);
case 'V':
if (f->fpic < FPICMINV) /* class doesn't have version */
return -1;
if (f->fpiversw > 0) /* no version */
return -1;
if (f->fpivl == 0) { /* empty version: */
/* use device-independent version*/
if (buf)
strcpy(buf, EMPTY_VERSION);
return strlen(EMPTY_VERSION);
}
return mindatcpy(buf, (char *)f->fpipubis + f->fpiv, f->fpivl, 0);
case 'E': /* public text designating (escape) sequence */
if (f->fpic != FPICHARS)
return -1;
return mindatcpy(buf, (char *)f->fpipubis + f->fpil, f->fpill, 0);
default:
break;
}
return -1;
}
static int testopen(pathname)
char *pathname;
{
#ifdef HAVE_ACCESS
return access(pathname, R_OK) >= 0;
#else /* not HAVE_ACCESS */
FILE *fp;
fp = fopen(pathname, "r");
if (!fp)
return 0;
fclose(fp);
return 1;
#endif /* not HAVE_ACCESS */
}
/* Return a pointer to an dynamically-allocated buffer that contains
the names of the files containing this entity, with each filename
terminated by a '\0', and with the list of filenames terminated by
another '\0'. */
UNIV entgen(f)
struct fpi *f;
{
char *file;
assert(f->fpistore != 6); /* Musn't call entgen for a notation. */
if (!path) {
char *p;
char c;
path = getenv(PATH_ENV_VAR);
if (!path)
path = DEFAULT_PATH;
p = path;
/* Only search for system identifiers if path uses %S. */
while ((c = *p++) != '\0')
if (c == '%') {
if (*p == 'S') {
sysidsrch = 1;
break;
}
if (*p != '\0' && *p != PATH_FILE_SEP)
p++;
}
}
if (f->fpisysis
&& (!sysidsrch
|| strchr((char *)f->fpisysis, SYSID_FILE_SEP)
|| strcmp((char *)f->fpisysis, STDINNAME) == 0))
return sysidgen((char *)f->fpisysis);
file = path;
for (;;) {
char *p;
int len = 0;
char *fileend = strchr(file, PATH_FILE_SEP);
if (!fileend)
fileend = strchr(file, '\0');
/* Check that all substitutions are non-null, and calculate
the resulting total length of the filename. */
for (p = file; p < fileend; p++)
if (*p == '%') {
int n;
/* Set len to -1 if a substitution is invalid. */
if (++p >= fileend) {
len = -1;
break;
}
n = field(f, *p, (char *)0);
if (n < 0) {
len = -1;
break;
}
len += n;
}
else
len++;
if (len > 0) {
/* We've got a valid non-empty filename. */
char *s;
char *buf;
s = buf = (char *)rmalloc(len + 2);
for (p = file; p < fileend; p++)
if (*p == '%')
s += field(f, *++p, s);
else
*s++ = *p;
*s++ = '\0';
if (testopen(buf)) {
/* Terminate the array of filenames. */
*s++ = '\0';
return buf;
}
free((UNIV)buf);
}
if (*fileend == '\0')
break;
file = ++fileend;
}
return 0;
}
/* Handle a system identifier without searching. */
static
UNIV sysidgen(s)
char *s;
{
char *buf, *p;
buf = (char *)rmalloc(strlen(s) + 2);
for (p = buf; *s; s++) {
if (*s == SYSID_FILE_SEP) {
if (p > buf && p[-1] != '\0')
*p++ = '\0';
}
else if (*s == RECHAR)
*p++ = '\n';
else if (*s != RSCHAR)
*p++ = *s;
}
/* Terminate this filename. */
if (p > buf && p[-1] != '\0')
*p++ = '\0';
if (p == buf) {
/* No filenames. */
frem((UNIV)buf);
return 0;
}
/* Terminate the list. */
*p++ = '\0';
return buf;
}
/*
Local Variables:
c-indent-level: 5
c-continued-statement-offset: 5
c-brace-offset: -5
c-argdecl-indent: 0
c-label-offset: -5
End:
*/

View file

@ -1,212 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: entity.h /main/3 1996/06/19 17:14:51 drk $ */
/* Struct dcncb: attribute list added to support data attributes. */
#ifndef ENTITY_H /* Don't include this file more than once. */
#define ENTITY_H
/* ENTITY.H: Definitions and control block templates for entity management.
*/
#include "tools.h" /* Definitions for type declarations, etc. */
#include "msgcat.h"
#define STDINNAME "-" /* File name that refers to standard input. */
#define EOS '\0' /* NONCHAR: EE (entity end: strings). */
#define AVALCASE 2 /* 2=untranslated string of name characters. */
#define REFNAMELEN 8 /* reference quantity set NAMELEN */
#define REFLITLEN 240 /* reference quantity set LITLEN */
/* Minimization status of returned tags.
*/
#define MINNONE 0 /* Minimization: tag not minimized. */
#define MINNULL 1 /* Minimization: tag was null. */
#define MINNET 2 /* Minimization: end-tag was NET delimiter. */
#define MINDATA 3 /* Minimization: end-tag was data tag. */
#define MINSTAG 4 /* Minimization: tag implied by start-tag. */
#define MINETAG 5 /* Minimization: end-tag implied by end-tag. */
/* Formal public identifier public text classes.
*/
#define FPICAP 1
#define FPICHARS 2
#define FPINOT 3
#define FPISYN 4
#define FPICMINV 5 /* Minimum fpic value for versionable text. */
#define FPIDOC 5
#define FPIDTD 6
#define FPIELEM 7
#define FPIENT 8
#define FPILPD 9
#define FPINON 10
#define FPISHORT 11
#define FPISUB 12
#define FPITEXT 13
struct fpi { /* Formal public identifier. */
UNCH fpiot; /* Owner type: + or - or ! (for ISO). */
UNS fpiol; /* Length of owner identifier. */
UNS fpio; /* Offset in pubis of owner identifier (no EOS).*/
int fpic; /* Public text class. */
UNCH fpitt; /* Text type: - or + (for available). */
UNS fpitl; /* Length of text identifier. */
UNS fpit; /* Offset in pubis of text identifier (no EOS). */
UNS fpill; /* Language/designating sequence length. */
UNS fpil; /* Offset in pubis of language. */
UNS fpivl; /* Length of display version . */
UNS fpiv; /* Offset in pubis of display version (no EOS). */
int fpiversw; /* 1=use best ver; 0=use stated ver; -1=error. */
UNCH *fpinm; /* Entity/DCN name (EOS, no length). */
UNCH fpistore; /* 1=NDATA 2=general 3=parm 4=DTD 5=LPD 6=DCN. */
/* Name of the entity's DCN. Valid only when fpistore == 1.
NULL if it's a SUBDOC. */
UNCH *fpinedcn;
UNCH *fpipubis; /* Public ID string (EOS). */
UNCH *fpisysis; /* System ID string (EOS). */
};
#define FPISZ sizeof(struct fpi)
typedef struct fpi *PFPI; /* Ptr to FPI control block. */
/* General control blocks.
*/
#define NONONCH 1 /* Character references to non-chars invalid. */
#define OKNONCH 0 /* Character references to non-chars allowed. */
struct parse { /* Parse control block. */
char *pname; /* Parse name; content, tag, etc. */
UNCH *plex; /* Lexical analysis table. */
UNCH **ptab; /* State and action table. */
UNS state; /* State. */
UNS input; /* Input. */
UNS action; /* Action. */
UNS newstate; /* Next state. */
};
struct restate {
UNS sstate; /* State. */
UNS sinput; /* Input. */
UNS saction; /* Action. */
UNS snext; /* Next state. */
};
struct map {
UNCH *mapnm; /* Name followed by EOS. */
int mapdata; /* Data associated with that name. */
};
struct hash { /* Dummy structure for function arguments. */
struct hash *enext; /* Next entry in chain. */
UNCH *ename; /* Entry name with size and EOS. */
};
typedef struct hash *PHASH; /* Ptr to hash table entry. */
typedef struct hash **THASH; /* Ptr to hash table. */
struct fwdref { /* A forward id reference. */
struct fwdref *next; /* Pt to next reference in chain. */
UNIV msg; /* Ptr to saved error messsage. */
};
#define FWDREFSZ sizeof(struct fwdref)
struct dcncb { /* Data content notation control block. */
struct dcncb *enext; /* Next DCN in chain. */
UNCH *ename; /* Notation name followed by EOS. */
UNCH mark; /* For use by application. */
UNCH entsw; /* Entity defined with this notation? */
UNCH defined; /* Has this notation been defined. */
UNCH *sysid; /* System identifier of notation. */
UNCH *pubid; /* Public identifier of notation. */
struct ad *adl; /* Data attribute list (NULL if none). */
};
#define DCBSZ sizeof(struct dcncb)
#define DCNMARK(p) ((p)->mark ? 1 : ((p)->mark = 1, 0))
typedef struct dcncb *PDCB; /* Ptr to DCN control block. */
/* Number of capacities in a capacity set. */
#define NCAPACITY 17
struct sgmlcap {
char **name;
UNCH *points;
long *number;
long *limit;
};
struct sgmlstat { /* Document statistics. */
UNS dcncnt; /* Number of data content notations defined. */
UNS pmexgcnt; /* Number of plus or minus exception groups. */
UNS etdcnt; /* Number of element types declared. */
UNS etdercnt; /* Number of element types defined by default. */
UNS pmexcnt; /* Number of plus/minus exception grp members. */
UNS modcnt; /* Number of content model tokens defined. */
UNS attcnt; /* Number of attributes defined. */
UNS attdef; /* Characters of attribute defaults defined. */
UNS attgcnt; /* Number of att value grp members (incl dcn). */
UNS idcnt; /* Number of ID attributes specified. */
UNS idrcnt; /* Number of ID references specified. */
UNS ecbcnt; /* Number of entities declared. */
UNS ecbtext; /* Characters of entity text defined. */
UNS srcnt; /* Number of short reference tables defined. */
UNS dcntext; /* Characters of notation identifiers defined. */
};
struct switches { /* Parser control switches (1=non-standard). */
int swdupent; /* 1=msg if duplicate ENTITY def attempted;0=no.*/
int swcommnt; /* 1=return comment declarations as data; 0=no. */
int swrefmsg; /* 1=msg if undeclared ref is defaulted; 0=no. */
UNS swbufsz; /* Size of source file buffer for READ(). */
int swenttr; /* 1=trace entity stack in error messages; 0=no.*/
int sweltr; /* 1=trace element stack in error messages; 0=no. */
int swambig; /* 1=check content model ambiguity */
int swundef; /* 1=warn about undefined elements and notations. */
char *prog; /* Program name for error messages. */
#ifdef TRACE
char *trace; /* What to trace in the body. */
char *ptrace; /* What to trace in the prolog. */
#endif /* TRACE */
nl_catd catd; /* Message catalog descriptor. */
long nopen; /* Number of open document entities */
int onlypro; /* Parse only the prolog. */
char **includes; /* List of parameter entities to be defined
as "INCLUDE"; NULL terminated.*/
VOID (*die) P((void)); /* Function to call on fatal error. */
};
struct markup { /* Delimiter strings for text processor. */
UNCH *cro; /* LEXCON markup string: CRO */
UNCH *dso; /* LEXCON markup string: DSO */
UNCH *ero; /* LEXCON markup string: ERO */
UNCH *etag; /* LEXMARK markup string: end-tag */
UNCH *lit; /* LEXMARK markup string: LIT */
UNCH *lita; /* LEXMARK markup string: LITA */
UNCH *mdc; /* LEXCON markup string: MDC */
UNCH *mdo; /* LEXCON markup string: MDO */
UNCH *mse; /* LEXCON markup string: mse */
UNCH *mss; /* LEXCON markup string: mss */
UNCH *mssc; /* LEXCON markup string: mss CDATA */
UNCH *mssr; /* LEXCON markup string: mss RCDATA */
UNCH *pic; /* LEXCON markup string: PIC */
UNCH *pio; /* LEXCON markup string: PIO */
UNCH *refc; /* LEXGRP markup string: REFC */
UNCH *stag; /* LEXMARK markup string: start-tag */
UNCH *tagc; /* LEXMARK markup string: TAGC */
UNCH *vi; /* LEXMARK markup string: VI */
int lennet; /* LEXMARK markup string length: null end-tag. */
int lennst; /* LEXMARK markup string length: null start-tag.*/
};
#endif /* ndef ENTITY_H */

View file

@ -1,84 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: error.h /main/3 1996/06/19 17:14:57 drk $ */
/* ERROR.H: Symbols for SGML error codes (start with 'E_').
Numbers 46 - 56 are generated by ERROR.C.
Later numbers are coded directly.
*/
/* SGMLERR.C: General errors and syntax errors.
*/
#define E_CONTEXT 1 /* W GI not allowed at this point in structure. */
#define E_MDNAME 2 /* E Invalid markup declaration name. */
/*efine E_LEN 3 E Syntax error: length exceeded. */
#define E_SYS 4 /* W Illegal system character. */
#define E_ETAG 5 /* E End-tag does not match any open start-tag. */
#define E_STAGMAX 6 /* E Maximum number of open elements exceeded. */
/* E_ALLNULL 7 W Start- and end-tag omitted with null content. */
#define E_EOF 8 /* E/W Illegal entity end in markup or delimited text. */
/* fine E_INV 9 E Markup error: invalid character. */
#define E_CHARS 10 /* W Data found in content that doesn't allow it. */
/* fine E_NOETDE 11 E End-tag GI not defined by element declaration. */
#define E_BADNM 12 /* E Name is not syntactically valid. */
#define E_BADATT 13 /* E Attribute was not defined by element declaration. */
#define E_VALINV 14 /* W Att value/declaration conflict: invalid char. */
#define E_VALLEN 15 /* W Att value/declaration conflict: token too long. */
#define E_VALCNT 16 /* W Att value/declaration conflict: too many tokens. */
#define E_VALTYPE 17 /* W Att value/declaration conflict: wrong token type.*/
#define E_VALGRP 18 /* W Att value/declaration conflict: token not in grp.*/
#define E_VALREQ 19 /* W Att value/declaration conflict: req unspecified. */
/* E_EMIN 20 W End-tag implied by end-tag; not minimizable. */
/* E_SMIN 21 W Omitted start-tag was not minimizable. */
#define E_POSSATT 22 /* E Possible att found but not defined; used as data.*/
/* Late additions numbered out of order to avoid recompilation. */
/*efine E_ENTSYNC 37 E Entity and group nesting levels out of sync. */
#define E_BADVAL 25 /* W Att value omitted (null); default used. */
/* E_ECONTXT 30 W Element ended prematurely (some content omitted).*/
/* E_EMINST 39 W End-tag implied by start-tag; not minimizable. */
/* E_MEXTAG 40 W *** In Use *** */
#define E_MEXERR 41 /* W Attempt to exclude contextually required element.*/
#define E_DOCTYPE 42 /* W No document type defined; *DOCTYPE assumed. */
/* E_NOETDS 43 E Start-tag GI not defined by element declaration. */
#define E_RESTART 44 /* E Invalid chars ignored; trying to restart parse. */
/* MDERROR.C: Errors in markup declarations.
*/
/*efine E_DUP 23 E Duplicate specification. */
/*efine E_KEY 24 E Incorrect keyword for parameter. */
/*efine E_MSE 26 E MSE occurred with no corresponding MS. */
/*efine E_MSS 27 E MSS exceeded maximum nesting level. */
/*efine E_NUM 28 E Incorrect number of parameters. */
#define E_TYPE 29 /* E Incorrect parameter type. */
/* Late additions numbered out of order to avoid recompilation. */
/*efine E_VAL 38 W Incorrect parameter value. */
/* RESERROR.C: Errors in resource routines.
*/
/* Unused I End of primary source entity. */
/* fine E_FILBUF 31 E Could not read next buffer. */
/* fine E_ERFILE 32 E Could not open file. */
/* fine E_MALLOC 33 T Could not obtain required main storage. */
/* fine E_ERMAX 34 E Maximum number of open entities exceeded. */
/* fine E_ERNAME 35 E Referenced entity undeclared. */
/* fine E_ERLOOP 36 E Entity referenced within itself: ref ignored. */
/* Late additions numbered out of order to avoid recompilation. */
/* E_ERDEF 45 E Referenced entity undeclared; SYSTEM assumed. */

Some files were not shown because too many files have changed in this diff Show more