--- hylafax-4.1.1.orig/etc/faxsetup.sh.in
+++ hylafax-4.1.1/etc/faxsetup.sh.in
@@ -74,7 +74,7 @@
 defPROTOUID=3			# use this uid if PROTOUID doesn't exist
 GROUP=/etc/group		# where to go for group entries
 PROTOGID=@FAXGID@		# group who's gid we use for FAX user
-defPROTOGID=10			# use this gid if PROTOGID doesn't exist
+defPROTOGID=21			# use this gid if PROTOGID doesn't exist
 
 VERSION="@VERSION@"		# configured version
 DATE="@DATE@"			# data software was configured
@@ -793,7 +793,7 @@
 	boom
     }
     cd $DIR_SPOOL
-    DIRS="archive bin client config dev docq doneq etc info log\
+    DIRS="archive bin client config dev docq doneq info log\
 	pollq recvq sendq status tmp"
     for i in $DIRS; do
 	test -d $i || dirMisConfigured $DIR_SPOOL/$i
@@ -815,7 +815,7 @@
 #
 if onClient; then
     test -d $DIR_BIN	 || dirMisConfigured $DIR_BIN
-    for file in sendfax sendpage faxstat faxalter faxcover faxmail faxrm; do
+    for file in sendfax sendpage faxstat faxalter faxcover faxmail faxrm textfmt; do
 	test -x $DIR_BIN/$file || {
 	    cat >&2 <<EOF
 
@@ -848,23 +848,6 @@
 	   boom
 	}
     done
-    test -d $DIR_LIBEXEC || dirMisConfigured $DIR_LIBEXEC
-    for file in textfmt; do
-	test -f $DIR_LIBEXEC/$file || {
-	    cat >&2 <<EOF
-
-FATAL ERROR: $DIR_LIBEXEC/$file does not exist!
-
-The file $DIR_LIBEXEC/$file does not exist.  If the HylaFAX
-software is not yet installed you must do so before running this script.
-If the software is installed but is configured for use in a different
-location than this script expects then the software will not function
-correctly.
-
-EOF
-	   boom
-	}
-    done
 
     otherBasicClientChecks
 fi
@@ -1611,7 +1594,7 @@
     test -z "$x" -o "$x" = y -o "$x" = yes
 }
 
-if onServer; then
+if false; then
     x=`grep "^$FAX:" $PASSWD | cut -d: -f3`
     if [ -z "$x" ]; then
 	echo ""
@@ -2117,7 +2100,7 @@
 #
 # Startup/restart server processes.
 #
-if onServer; then
+if false; then
     echo ""
     echo "Restarting HylaFAX server processes."
 
--- hylafax-4.1.1.orig/etc/faxaddmodem.sh.in
+++ hylafax-4.1.1/etc/faxaddmodem.sh.in
@@ -112,10 +112,10 @@
 SVR4UULCKN=$LIBEXEC/lockname	# SVR4 UUCP lock name construction program
 ONDELAY=$LIBEXEC/ondelay	# prgm to open devices blocking on carrier
 CAT="$CAT -u"			# something to do unbuffered reads and writes
-FAX=fax				# identity of the fax user
+FAX=@FAXUID@			# identity of the fax user
 GROUP=/etc/group		# where to go for group entries
-PROTOGID=$FAXGID		# group who's gid we use for FAX user
-defPROTOGID=10			# use this gid if PROTOGID doesn't exist
+PROTOGID=@FAXGID@		# group who's gid we use for FAX user
+defPROTOGID=21			# use this gid if PROTOGID doesn't exist
 MODEMCONFIG=$SPOOL/config	# location of prototype modem config files
 RMCMD="$RM -f"			# forced removal
 
@@ -421,15 +421,15 @@
 defaultCountryCode=\"\"
 defaultLongDistancePrefix=\"\"
 defaultInternationalPrefix=\"\"
-defaultDialStringRules=\"\"
-defaultServerTracing=1
-defaultSessionTracing=1
-defaultRecvFileMode=0600
-defaultLogFileMode=0600
-defaultDeviceMode=0600
+defaultDialStringRules=\"etc/dialrules\"
+defaultServerTracing=0x08501
+defaultSessionTracing=0x08501
+defaultRecvFileMode=0640
+defaultLogFileMode=0640
+defaultDeviceMode=0660
 defaultRingsBeforeAnswer=0
 defaultSpeakerVolume=quiet
-defaultGettyArgs=\"\"
+defaultGettyArgs="\"-r -b %l\""
 defaultQualifyTSI=\"\"
 defaultJobReqBusy=180
 defaultJobReqNoCarrier=300
@@ -440,12 +440,12 @@
 defaultJobReqOther=300
 defaultPollModemWait=30
 defaultPollLockWait=30
-defaultTagLineFont=\"\"
-defaultTagLineFormat="\"From %%n|%c|Page %%P of %%T\""
+defaultTagLineFont=\"etc/lutRS18.pcf\"
+defaultTagLineFormat=\"\"
 defaultPercentGoodLines=95
 defaultMaxConsecutiveBadLines=5
 defaultMaxRecvPages=1000
-defaultLogFacility=daemon
+defaultLogFacility=local5
 defaultClocalAsRoot=\"\"
 defaultPriorityScheduling=\"\"
 defaultAdaptiveAnswer=\"\"
@@ -1760,7 +1760,7 @@
 #
 # Create FIFO.<tty> special file and remove any old one.
 #
-FIFO=$SPOOL/FIFO.$DEVID
+FIFO=$SPOOL/dev/FIFO.$DEVID
 test -p $FIFO || {
     prompt "Creating fifo $FIFO for faxgetty..."
     if (mkfifo $FIFO) >/dev/null 2>&1; then
@@ -1833,7 +1833,7 @@
 defaultSendFaxCmd=\"bin/faxsend\"
 defaultSendPageCmd=\"bin/pagesend\"
 defaultSendUUCPCmd=\"bin/uucpsend\"
-defaultSessionTracing=0xffffffff
+defaultSessionTracing=0x08501
 defaultTimeOfDay=\"Any\"
 defaultUse2D=Yes
 #
--- hylafax-4.1.1.orig/etc/faxsetup.sh.in~
+++ hylafax-4.1.1/etc/faxsetup.sh.in~
@@ -0,0 +1,2361 @@
+#! @SCRIPT_SH@
+#	$Id: faxsetup.sh.in,v 1.27 2002/02/15 04:52:20 darren Exp $
+#
+# @WARNING@
+#
+# HylaFAX Facsimile Software
+#
+# Copyright (c) 1990-1996 Sam Leffler
+# Copyright (c) 1991-1996 Silicon Graphics, Inc.
+# HylaFAX is a trademark of Silicon Graphics
+# 
+# Permission to use, copy, modify, distribute, and sell this software and 
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+# 
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+# 
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+# OF THIS SOFTWARE.
+#
+
+#
+# VERSION:	@VERSION@
+# DATE:		@DATE@
+# TARGET:	@TARGET@
+#
+
+#
+# faxsetup [options]
+#
+# This script interactively prepares and verifies 
+# a HylaFAX client and/or server machine for use.
+#
+PATH=/bin:/usr/bin:/etc
+test -d /usr/ucb  && PATH=$PATH:/usr/ucb		# Sun and others
+test -d /usr/bsd  && PATH=$PATH:/usr/bsd		# Silicon Graphics
+test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc	# Sun and others
+test -d /usr/sbin && PATH=/usr/sbin:$PATH		# 4.4BSD-derived
+test -d /usr/local/bin && PATH=$PATH:/usr/local/bin	# for GNU tools
+
+AWK=@AWK@			# awk for use below
+CAT=@CAT@			# cat command for use below
+CHGRP=@CHGRP@			# change file group for use below
+CHMOD=@CHMOD@			# change file mode for use below
+CHOWN=@CHOWN@			# change file owner for use below
+CP=@CP@				# cp command for use below
+ECHO=@ECHO@			# echo command for use below
+FUSER=@FUSER@			# fuser command to dump in setup.cache
+GREP=@GREP@			# grep command for use below
+LN=@LN@				# ln command for use below
+LN_S=@LN_S@			# ln option for creating a symbolic link
+MKFIFO=@MKFIFO@			# FIFO creation program for use below
+MV=@MV@				# move file for use below
+RMCMD=@RM@			# remove file for use below
+SCRIPT_SH=@SCRIPT_SH@		# shell for use below
+SED=@SED@			# sed for use below
+
+FAX=fax				# identity of the fax user
+SERVICES=/etc/services		# location of services database
+INETDCONF=/usr/etc/inetd.conf	# default location of inetd configuration file
+ALIASES=/usr/lib/aliases	# default location of mail aliases database file
+PASSWD=/etc/passwd		# where to go for password entries
+PROTOUID=@FAXUID@		# user who's uid we use for FAX user
+defPROTOUID=3			# use this uid if PROTOUID doesn't exist
+GROUP=/etc/group		# where to go for group entries
+PROTOGID=@FAXGID@		# group who's gid we use for FAX user
+defPROTOGID=10			# use this gid if PROTOGID doesn't exist
+
+VERSION="@VERSION@"		# configured version
+DATE="@DATE@"			# data software was configured
+TARGET="@TARGET@"		# configured target
+
+PATH_AFM=@FONTPATH@		# directory for Adobe Font Metric files
+DIR_BIN=@BIN@			# directory for client applications
+DIR_LIBDATA=@LIBDATA@		# directory for client data files
+DIR_LIBEXEC=@LIBEXEC@		# directory where servers are located
+DIR_LOCKS=@UUCP_LOCKDIR@	# UUCP locking directory
+DIR_MAN=@MANDIR@		# directory for manual pages
+DIR_SBIN=@SBIN@			# directory for server applications
+DIR_SPOOL=@SPOOL@		# top of fax spooling tree
+
+TIFFBIN=@TIFFBIN@		# TIFF tools
+LOCKS=@UUCP_LOCKTYPE@		# UUCP lock type
+
+PATH_GETTY=@PATHGETTY@		# pathname for getty program
+PATH_SENDMAIL=@SENDMAIL@	# pathname for sendmail
+PATH_VGETTY=@PATHVGETTY@	# pathname for voice getty program
+PATH_EGETTY=@PATHEGETTY@	# pathname for external getty program
+
+PS=@PSPACKAGE@			# default PostScript RIP package
+PATH_GSRIP=@GSRIP@		# pathname of Ghostscript RIP
+PATH_DPSRIP=@DPSRIP@		# pathname of old IRIX DPS RIP
+PATH_IMPRIP=@IMPRIP@		# pathname of IRIX Impressario RIP
+
+POSIXLY_CORRECT=1; export POSIXLY_CORRECT		# disable GNU extensions
+
+#
+# Location of sysv init script
+#
+DIR_SYSVINIT=@SYSVINITDIR@
+FAXQ_SERVER=@FAXQ_SERVER@
+HFAXD_SERVER=@HFAXD_SERVER@
+HFAXD_OLD_PROTOCOL=@HFAXD_OLD_PROTOCOL@
+HFAXD_SNPP_SERVER=@HFAXD_SNPP_SERVER@
+
+#
+# These are the configuration parameters written to the
+# setup.cache file and read in by all the HylaFAX scripts.
+#
+# We use the same names used by configure for consistency
+# (but some confusion within this script).
+#
+VARS="SCRIPT_SH
+FONTPATH		PATH_AFM
+AWK
+BIN		DIR_BIN
+CAT
+CHGRP
+CHMOD
+CHOWN
+CP
+DPSRIP		PATH_DPSRIP
+ECHO
+FAXQ_SERVER
+FUSER
+GREP
+GSRIP		PATH_GSRIP
+HFAXD_SERVER
+HFAXD_OLD_PROTOCOL
+HFAXD_SNPP_SERVER
+IMPRIP		PATH_IMPRIP
+LIBDATA		DIR_LIBDATA
+LIBEXEC		DIR_LIBEXEC
+LN
+MANDIR		DIR_MAN
+MKFIFO
+MV
+PATH
+PATHGETTY	PATH_GETTY
+PATHVGETTY	PATH_VGETTY
+PATHEGETTY	PATH_EGETTY
+PSPACKAGE	PS
+RM		RMCMD
+SBIN		DIR_SBIN
+SED
+SENDMAIL	PATH_SENDMAIL
+SPOOL		DIR_SPOOL
+SYSVINIT
+TIFFBIN
+TARGET
+UUCP_LOCKDIR	DIR_LOCKS
+UUCP_LOCKTYPE	LOCKS"
+
+dumpvals()
+{
+    echo "$VARS" |
+	while read a b; do eval c=\$${b:-$a}; echo "$a='$c'"; done
+}
+
+#
+# Error diagnostics that should go to the terminal are
+# done with this interface or cat.
+#
+bitch()
+{
+    echo "$@" 1>&2
+}
+
+#
+# This is the preferred interface for
+# configure to terminate abnormally.
+#
+boom()
+{
+    $RM $JUNK
+    exit 1
+}
+
+usage()
+{
+    cat<<EOF
+Usage: faxsetup [options] [host]
+Options: [defaults in brackets after descriptions]
+  -client		 setup client support
+  -server		 setup server support
+  -with-PARAM[=ARG]      set configuration PARAM [ARG=yes]
+
+  -help                  print this message
+  -quiet                 do not print 'Using ...' messages
+  -verbose		 opposite of -quiet
+EOF
+}
+
+QUIET=no
+isServer=no
+isClient=no
+
+onClient()
+{
+    test $isClient = yes
+}
+onServer()
+{
+    test $isServer = yes
+}
+
+#
+# Crack command line arguments.  We purposely
+# use syntax and options that are compatible
+# with GNU autoconf.
+#
+WITHARGS=no
+ac_prev=
+for ac_option
+do
+    if [ -n "$ac_prev" ]; then		# assign the argument to previous option
+	eval "$ac_prev=\$ac_option"
+	ac_prev=
+	continue
+    fi
+    case "$ac_option" in		# collect optional argument
+    -*=*)	ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'`;;
+    *)		ac_optarg=;;
+    esac
+    case "$ac_option" in
+    -with-*|--with-*)
+	ac_with=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+	# Reject names that are not valid shell variable names.
+	if [ -n "`echo $ac_with| sed 's/[-_a-zA-Z0-9]//g'`" ]; then
+	    bitch "configure: $ac_with: invalid parameter name."
+	    die
+	fi
+	ac_with=`echo $ac_with| sed 's/-/_/g'`
+	case "$ac_option" in
+	*=*)	;;
+	*)	ac_optarg=yes;;
+	esac
+	eval "${ac_with}='$ac_optarg'"
+	WITHARGS=yes
+	;;
+    -client)		isClient=yes;;
+    -server)		isServer=yes;;
+
+    -quiet)		QUIET=yes;;
+    -verbose)		QUIET=no;;
+    -help)		usage; exit 0;;
+    -*)
+	bitch "faxsetup: $ac_option: invalid option; use -help for usage."
+	boom
+	;;
+    esac
+done
+
+if [ -n "$ac_prev" ]; then
+    bitch "faxsetup: missing argument to --`echo $ac_prev | sed 's/_/-/g'`"
+    boom
+fi
+
+# if nothing specified on command line, default client+server
+if [ $isClient = no -a $isServer = no ]; then
+    isClient=yes
+    isServer=yes
+fi
+
+#
+# Descriptor usage:
+# 1: ???
+# 2: messages that should be seen even if we're in the background.
+# 3: [stdout from test runs]
+# 4: verbose-style messages (Using ...)
+# 5: setup.cache file
+#
+if [ $QUIET = yes ]; then
+    exec 4>/dev/null			# chuck messages
+else
+    exec 4>&1				# messages go to stdout
+fi
+
+Note()
+{
+    echo "$@" 1>&4
+}
+
+Note ""
+Note "Setup program for HylaFAX (tm) $VERSION."
+Note ""
+Note "Created for $TARGET on $DATE."
+Note ""
+
+CPU=`expr $TARGET : '\([^\-]*\)'` || CPU=unknown
+VENDOR=`expr $TARGET : '[^\-]*-\([^-]*\)'` || VENDOR=unknown
+OS=`expr $TARGET : '[^\-]*-[^\-]*-\([a-zA-Z]*\).*'` || OS=unknown
+RELEASE=`(uname -r) 2>/dev/null` || RELEASE=unknown
+
+#
+# Read in any site, target, vendor, os, or os-release
+# specific setup work.  Note that we read stuff here
+# so that configuration parameters can be altered.  We
+# use some pre-defined function names below to provide
+# hooks for other actions.
+#
+
+#
+# Hooks for additional client+server checks
+#
+otherBasicServerChecks()
+{
+    true
+}
+otherBasicClientChecks()
+{
+    true
+}
+#
+# Hook for adding stuff to setup.modem
+#
+dumpOtherModemFuncs()
+{
+    true
+}
+
+#
+# Figure out which brand of echo we have and define prompt
+# and printf shell functions accordingly.  Note that we
+# assume that if the System V-style echo is not present,
+# then the BSD printf program is available.  These functions
+# are defined here so that they can be tailored on a per-site,
+# etc. basis.
+#
+if [ `echo foo\\\c`@ = "foo@" ]; then
+    # System V-style echo supports \r
+    # and \c which is all that we need
+    prompt()
+    {
+       echo "$* \\c"
+    }
+    printf()
+    {
+       echo "$*\\c"
+    }
+    dumpPromptFuncs()
+    {
+	cat<<-'EOF'
+	prompt()
+	{
+	   echo "$* \\c"
+	}
+	printf()
+	{
+	   echo "$*\\c"
+	}
+	EOF
+    }
+elif [ "`echo -n foo`@" = "foo@" ]; then
+    # BSD-style echo; use echo -n to get
+    # a line without the trailing newline
+    prompt()
+    {
+       echo -n "$* "
+    }
+    dumpPromptFuncs()
+    {
+	cat<<-'EOF'
+	prompt()
+	{
+	   echo -n "$* "
+	}
+	EOF
+    }
+else
+    # something else; do without
+    prompt()
+    {
+	echo "$*"
+    }
+    dumpPromptFuncs()
+    {
+	cat<<-'EOF'
+	prompt()
+	{
+	    echo "$*"
+	}
+	EOF
+    }
+fi
+
+if onServer; then
+    #
+    # Setup the password file manipulation functions according
+    # to whether we have System-V style support through the
+    # passmgmt program, or BSD style support through the chpass
+    # program, or for SCO boxes through pwconv, or SVR4 style support
+    # through useradd. If none are found, we setup functions that
+    # will cause us to abort if we need to munge the password file.
+    #
+    # NB: some systems override these function definitions through
+    #     per-os faxsetup files
+    #
+    if [ -f /bin/passmgmt -o -f /usr/sbin/passmgmt ]; then
+	addPasswd()
+	{
+	    passmgmt -o -a -c 'Facsimile Agent' -h $4 -u $2 -g $3 $1
+	}
+	deletePasswd()
+	{
+	    passmgmt -d $1
+	}
+	modifyPasswd()
+	{
+	    passmgmt -m -h $4 -u $2 -o -g $3 $1
+	}
+	lockPasswd()
+	{
+	    passwd -l $1
+	}
+    elif [ -f /usr/bin/chpass ]; then
+	addPasswd()
+	{
+	    chpass -a "$1:*:$2:$3::0:0:Facsimile Agent:$4:"
+	}
+	modifyPasswd()
+	{
+	    chpass -a "$1:*:$2:$3::0:0:Facsimile Agent:$4:"
+	}
+	lockPasswd()
+	{
+	    return 0				# entries are always locked
+	}
+    elif [ -f /etc/pwconv ]; then	# could be a SCO box
+	addPasswd()
+	{
+	    echo "${1}:NOLOGIN:${2}:${3}:Facsimile Agent:${4}:/bin/false" >> ${PASSWD}
+	    /etc/pwconv
+	}
+	lockPasswd()
+	{
+	    return 0				# entries are always locked
+	}
+    elif [ -f /usr/sbin/useradd -o -f /etc/useradd ]; then
+	addPasswd()
+	{
+	    useradd -c 'Facsimile Agent' -d $4 -u $2 -o -g $3 $1
+	}
+	deletePasswd()
+	{
+	    userdel $1
+	}
+	modifyPasswd()
+	{
+	    usermod -m -d $4 -u $2 -o -g $3 $1
+	}
+	lockPasswd()
+	{
+	    passwd -l $1
+	}
+    else
+	addPasswd()
+	{
+	    cat >&2 <<EOF
+
+FATAL ERROR: I don't know how to add a passwd entry!
+
+You will have to create the password entry manually using the following info:
+
+Login Name: $1
+Password:   *
+Uid:        $2
+Gid:        $3
+Full Name:  Facsimile Agent
+Home Dir:   $4
+
+EOF
+	    boom
+	}
+	modifyPasswd()
+	{
+	    cat >&2 <<EOF
+
+FATAL ERROR: I don't know how to modify a passwd entry!
+
+You will have to update the password entry manually using the following info:
+
+Login Name: $1
+Password:   *
+Uid:        $2
+Gid:        $3
+Full Name:  Facsimile Agent
+Home Dir:   $4
+
+EOF
+	    boom
+	}
+    fi
+
+    #
+    # Functions required by faxaddmodem.
+    #
+    case $TARGET in
+    *-sunos*|*-linux*|*-ultrix*|*-hpux*|*-freebsd*|*-netbsd*)
+	dumpTTYFuncs()
+	{
+	    cat<<'EOF'
+	    ttyPort()
+	    {
+		expr $1 : 'tty\(.*\)'
+	    }
+	    ttyLocks()
+	    {
+		echo $UUCP_LOCKDIR/LCK..$1
+	    }
+	    ttyAliases()
+	    {
+		echo /dev/$1
+	    }
+	    ttyDev()
+	    {
+		echo /dev/$1
+	    }
+	    checkPort()
+	    {
+		 return
+	    }
+EOF
+	}
+	;;
+    *-svr4*|*-sysv4*|*-sysv5*|*-solaris*)
+	dumpTTYFuncs()
+	{
+	    cat<<'EOF'
+	    ttyPort()
+	    {
+		port=`expr $1 : 'term\/\(.*\)' \| $1`		# Usual
+		port=`expr $port : 'cua\/\(.*\)' \| $port`	# Solaris
+		port=`expr $port : 'tty\(.*\)' \| $port`	# Old-style
+		echo $port
+	    }
+	    ttyLocks()
+	    {
+		devs=$1
+		locks="$UUCP_LOCKDIR/`$SVR4UULCKN /dev/$devs`" || {
+		    echo "Sorry, I cannot determine the UUCP lock file name for $devs"
+		    exit 1
+		}
+		echo $locks
+	    }
+	    ttyAliases()
+	    {
+		echo /dev/$1
+	    }
+	    ttyDev()
+	    {
+		echo /dev/$1
+	    }
+	    checkPort()
+	    {
+		 return
+	    }
+EOF
+	}
+	;;
+    *)
+	dumpTTYFuncs()
+	{
+	    Note ""
+	    Note "Beware, I am guessing the tty naming conventions for your system."
+	    cat<<'EOF'
+	    ttyPort()
+	    {
+		expr $1 : 'tty\(.*\)'
+	    }
+	    ttyLocks()
+	    {
+		echo $UUCP_LOCKDIR/LCK..$1
+	    }
+	    ttyAliases()
+	    {
+		echo /dev/$1
+	    }
+	    ttyDev()
+	    {
+		echo /dev/$1
+	    }
+	    checkPort()
+	    {
+		 return
+	    }
+EOF
+	}
+	;;
+    esac
+
+    case $TARGET in
+    *-*bsd*)
+	dumpSTTYFuncs()
+	{
+	    cat<<EOF
+	    ttyStty()
+	    {
+		echo $STTYCMD -f \$tdev
+	    }
+	    ttySpeeds()
+	    {
+		speeds=
+		if [ -z "\$SPEED" ]; then
+		    for s in 38400 19200 9600 4800 2400 1200; do
+			$STTYCMD -f \$tdev \$s </dev/null >/dev/null 2>&1 && speeds="\$speeds \$s"
+		    done
+		fi
+		echo \$speeds
+	    }
+EOF
+	}
+	;;
+    *)
+	dumpSTTYFuncs()
+	{
+	    cat<<EOF
+	    ttyStty()
+	    {
+		echo $STTYCMD
+	    }
+	    ttySpeeds()
+	    {
+		speeds=
+		if [ -z "\$SPEED" ]; then
+		    for s in 38400 19200 9600 4800 2400 1200; do
+			onDev $STTYCMD \$s </dev/null >/dev/null 2>&1 && speeds="\$speeds \$s"
+		    done
+		fi
+		echo \$speeds
+	    }
+EOF
+	}
+	;;
+    esac
+
+    machdepPasswdWork()
+    {
+	true
+    }
+
+    #
+    # Default values for new scheduler config files
+    #
+    defaultLogFacility=daemon
+    defaultCountryCode=1
+    defaultAreaCode=
+    defaultLongDistancePrefix=1
+    defaultInternationalPrefix=011
+    defaultDialStringRules=\"etc/dialrules\"
+    defaultServerTracing=1
+    defaultContCoverPage=
+    defaultContCoverCmd=\"bin/mkcover\"
+    defaultDestControls=
+    defaultMaxConcurrentJobs=1
+    defaultMaxDials=12
+    defaultMaxSendPages=0xffffffff
+    defaultMaxTries=3
+    defaultModemGroup=
+    defaultPostScriptTimeout=180
+    defaultPS2FaxCmd=\"bin/ps2fax\"
+    defaultSendFaxCmd=\"bin/faxsend\"
+    defaultSendPageCmd=\"bin/pagesend\"
+    defaultSendUUCPCmd=\"bin/uucpsend\"
+    defaultSessionTracing=0xffffffff
+    defaultTimeOfDay=\"Any\"
+    defaultUse2D=Yes
+    defaultNotifyCmd=\"bin/notify\"
+    defaultUUCPLockDir=\"$DIR_LOCKS\"
+    defaultUUCPLockTimeout=30
+    defaultUUCPLockType=\"$LOCKS\"
+fi
+
+CONFIG_FILES=
+if [ -f $DIR_SBIN/faxsetup.local ]; then
+    . $DIR_SBIN/faxsetup.local
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.local"
+elif [ -f $DIR_SBIN/faxsetup.${CPU}-${VENDOR}-${OS}${RELEASE} ]; then
+    . $DIR_SBIN/faxsetup.${CPU}-${VENDOR}-${OS}${RELEASE}
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.${CPU}-${VENDOR}-${OS}${RELEASE}"
+elif [ -f $DIR_SBIN/faxsetup.${VENDOR}-${OS}${RELEASE} ]; then
+    . $DIR_SBIN/faxsetup.${VENDOR}-${OS}${RELEASE}
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.${VENDOR}-${OS}${RELEASE}"
+elif [ -f $DIR_SBIN/faxsetup.${CPU}-${VENDOR}-${OS} ]; then
+    . $DIR_SBIN/faxsetup.${CPU}-${VENDOR}-${OS}
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.${CPU}-${VENDOR}-${OS}"
+elif [ -f $DIR_SBIN/faxsetup.${VENDOR}-${OS} ]; then
+    . $DIR_SBIN/faxsetup.${VENDOR}-${OS}
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.${VENDOR}-${OS}"
+elif [ -f $DIR_SBIN/faxsetup.${CPU}-${VENDOR} ]; then
+    . $DIR_SBIN/faxsetup.${CPU}-${VENDOR}
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.${CPU}-${VENDOR}"
+elif [ -f $DIR_SBIN/faxsetup.${VENDOR} ]; then
+    . $DIR_SBIN/faxsetup.${VENDOR}
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.${VENDOR}"
+elif [ -f $DIR_SBIN/faxsetup.${OS} ]; then
+    . $DIR_SBIN/faxsetup.${OS}
+    CONFIG_FILES="$CONFIG_FILES $DIR_SBIN/faxsetup.${OS}"
+fi
+
+#
+# Flush cached values if something was specified on the
+# command line 
+#
+if onServer; then
+    REASON=
+    if [ $WITHARGS = yes ]; then 
+	REASON="of command line parameters"
+    elif [ "$CONFIG_FILES" ]; then
+	REASON=`find $CONFIG_FILES -newer $DIR_SPOOL/etc/setup.cache -print 2>/dev/null`
+	test "$REASON" && REASON="$REASON has been updated"
+    fi
+    if [ "$REASON" -a -f $DIR_SPOOL/etc/setup.cache ]; then
+       Note "Flushing cached parameters because $REASON."
+       Note ""
+       rm -f $DIR_SPOOL/etc/setup.cache
+    fi
+    if [ -f $DIR_SPOOL/etc/setup.cache ]; then
+	Note "Reading cached parameters from $DIR_SPOOL/etc/setup.cache."
+	Note ""
+	. $DIR_SPOOL/etc/setup.cache
+    fi
+fi
+
+RM="$RMCMD -f"				# remove file for use below
+
+#
+# Deduce the effective user id:
+#   1. POSIX-style, the id program
+#   2. the old whoami program
+#   3. last gasp, check if we have write permission on /dev
+#
+euid=`id|$SED -e 's/.*uid=[0-9]*(\([^)]*\)).*/\1/'`
+test -z "$euid" && euid=`(whoami) 2>/dev/null`
+test -z "$euid" -a -w /dev && euid=root
+if [ "$euid" != "root" ]; then
+    bitch "Sorry, but you must run this script as the super-user!"
+    boom
+fi
+
+onClient && Note "Checking system for proper client configuration."
+onServer && Note "Checking system for proper server configuration."
+
+#
+# Verify configuration parameters are correct.
+#
+
+dirMisConfigured()
+{
+   cat >&2 <<EOF
+
+FATAL ERROR: $1 does not exist or is not a directory!
+
+The directory $1 does not exist or this file is not a directory.  If
+the HylaFAX software is not yet installed you must do so before running
+this script.  If the software is installed but is configured for use in
+a different location than this script expects then the software will not
+function correctly.
+
+EOF
+   boom
+}
+
+#
+# Check basic spooling area setup.
+#
+if onServer; then
+    test -d $DIR_SPOOL || {
+	cat >&2 <<-EOF
+
+	FATAL ERROR: $DIR_SPOOL does not exist or is not a directory!
+
+	The HylaFAX spooling area $DIR_SPOOL does not exist or this file is
+	not a directory.  If the HylaFAX software is not yet installed you
+	must do so before running this script.  If the software is installed
+	but is configured for use in a different location than this script
+	expects then you may override the default pathname by running this
+	script with a -with-DIR_SPOOL option; e.g.
+
+	faxsetup -with-DIR_SPOOL=/var/spool/someplace_unexpected
+
+	EOF
+	boom
+    }
+    cd $DIR_SPOOL
+    DIRS="archive bin client config dev docq doneq etc info log\
+	pollq recvq sendq status tmp"
+    for i in $DIRS; do
+	test -d $i || dirMisConfigured $DIR_SPOOL/$i
+    done
+    #
+    # XXX should check permission and ownership of sensitive dirs
+    #
+
+    JUNK="etc/setup.tmp"
+    trap "$RM \$JUNK; exit 1" 1 2 15
+
+    exec 5>etc/setup.tmp
+    echo '# Warning, this file was automatically generated by faxsetup' >&5
+    echo '# on' `date` "for ${USER:-$euid}" >&5
+fi
+
+#
+# Basic client installation.
+#
+if onClient; then
+    test -d $DIR_BIN	 || dirMisConfigured $DIR_BIN
+    for file in sendfax sendpage faxstat faxalter faxcover faxmail faxrm; do
+	test -x $DIR_BIN/$file || {
+	    cat >&2 <<EOF
+
+FATAL ERROR: $DIR_BIN/$file is not an executable program!
+
+The file $DIR_BIN/$file does not exist or this file is not
+an executable program.  If the HylaFAX software is not yet installed you
+must do so before running this script.  If the software is installed but
+is configured for use in a different location than this script expects
+then the software will not function correctly.
+
+EOF
+	   boom
+	}
+    done
+    test -d $DIR_LIBDATA || dirMisConfigured $DIR_LIBDATA
+    for file in pagesizes faxcover.ps typerules; do
+	test -f $DIR_LIBDATA/$file || {
+	    cat >&2 <<EOF
+
+FATAL ERROR: $DIR_LIBDATA/$file does not exist!
+
+The file $DIR_LIBDATA/$file does not exist.  If the HylaFAX
+software is not yet installed you must do so before running this script.
+If the software is installed but is configured for use in a different
+location than this script expects then the software will not function
+correctly.
+
+EOF
+	   boom
+	}
+    done
+    test -d $DIR_LIBEXEC || dirMisConfigured $DIR_LIBEXEC
+    for file in textfmt; do
+	test -f $DIR_LIBEXEC/$file || {
+	    cat >&2 <<EOF
+
+FATAL ERROR: $DIR_LIBEXEC/$file does not exist!
+
+The file $DIR_LIBEXEC/$file does not exist.  If the HylaFAX
+software is not yet installed you must do so before running this script.
+If the software is installed but is configured for use in a different
+location than this script expects then the software will not function
+correctly.
+
+EOF
+	   boom
+	}
+    done
+
+    otherBasicClientChecks
+fi
+
+#
+# Server setup other than the spooling area.
+#
+if onServer; then
+    test -d $DIR_LIBEXEC || dirMisConfigured $DIR_LIBEXEC
+    test -d $DIR_SBIN	 || dirMisConfigured $DIR_SBIN
+    test -d $DIR_LOCKS   || {
+       cat >&2 <<EOF
+
+FATAL ERROR: $DIR_LOCKS does not exist or is not a directory!
+
+The UUCP lockfile directory is not where it is expected or this file
+is not a directory.  It is possible to configure the HylaFAX software
+to use a directory other than the configured one by setting up the
+UUCPLockDir configuration parameter in each configuration file in the
+$DIR_SPOOL/etc directory, but this is potentially error-prone.
+Your best bet is to either create a symbolic link for the expected
+pathname or reconfigure HylaFAX with the correct pathname and build
+a new distribution.
+EOF
+	boom
+    }
+    test -d $TIFFBIN	|| {
+	cat >&2 <<EOF
+
+FATAL ERROR: $TIFFBIN does not exist or is not a directory!
+
+The directory of tools from the TIFF software distribution is not
+where it is expected or this file is not a directory.  If you do not
+have the TIFF distribution installed on this machine then you must
+install it; the master FTP location is ftp://ftp.sgi.com/graphics/tiff.
+Otherwise, if the software is installed in a directory other than
+where it is expected you can configure the HylaFAX software to use
+an alternate directory by supplying a -with-TIFFBIN option when running
+this script; e.g. faxsetup -with-TIFFBIN=someplace_nonstandard.
+
+EOF
+	boom
+    }
+    for file in tiffcp tiff2ps fax2ps tiffinfo; do
+	test -x $TIFFBIN/$file	|| {
+	    cat >&2 <<EOF
+
+FATAL ERROR: $TIFFBIN/$file does not exist or is not an executable program!
+
+The program $TIFFBIN/$file is not where it is expected or the file
+is not executable.  This program is part of the TIFF software
+distribution that is required for use with HylaFAX.  If you do not
+have the TIFF distribution installed on this machine then you must
+install it; the master FTP location is ftp://ftp.sgi.com/graphics/tiff.
+Otherwise, if the software is installed in a directory other than
+where it is expected you can configure the HylaFAX software to use
+an alternate directory by supplying a -with-TIFFBIN option when running
+this script; e.g.  faxsetup -with-TIFFBIN=someplace_nonstandard.
+
+EOF
+	    boom
+	}
+    done
+
+    otherBasicServerChecks
+fi
+
+#
+# Quick check to see if the manual pages are installed;
+# perhaps not even worth the effort.
+#
+test -d $DIR_MAN || {
+    cat >&4 <<EOF
+
+
+Warning: $DIR_MAN does not exist or is not a directory!
+
+The directory for manual pages does not exist or is not a directory.
+If this directory does not exist because the manual pages have not been
+installed then you can ignore this message.  Otherwise you may want to
+check out what happened to the manual pages.
+EOF
+}
+
+#
+# Utility program parameters.
+#
+appMisConfigured()
+{
+   cat >&2 <<EOF
+
+FATAL ERROR: $1 does not exist or is not an executable program!
+
+The file:
+
+    $1
+
+does not exist or this file is not an executable program.  The HylaFAX
+software expects this program to exist and be in this location.  If the
+program resides in a different location then you must either reconfigure
+and rebuild HylaFAX or override the default pathnames in the distributed
+software through one of the HylaFAX configuration files (consult the
+HylaFAX documentation).
+
+EOF
+   boom
+}
+warnAppMisConfigured()
+{
+   cat >&2 <<EOF
+
+
+Warning: $1 does not exist or is not an executable program!
+
+The file:
+
+    $1
+
+does not exist or this file is not an executable program.  The
+HylaFAX software optionally uses this program and the fact that
+it does not exist on the system is not a fatal error.  If the
+program resides in a different location and you do not want to
+install a symbolic link for $1 that points to your program
+then you must reconfigure and rebuild HylaFAX from source code.
+EOF
+}
+
+if onServer; then
+    test -x $PATH_GETTY		|| warnAppMisConfigured $PATH_GETTY
+    test -x $PATH_VGETTY	|| warnAppMisConfigured $PATH_VGETTY
+    test -x $PATH_EGETTY	|| warnAppMisConfigured $PATH_EGETTY
+
+    for i in $CAT $CHGRP $CHMOD $CHOWN $CP $ECHO $GREP $LN $MKFIFO $MV \
+	$RMCMD $SED $SENDMAIL; do
+	test -x $i || appMisConfigured $i
+    done
+
+    #
+    # Test/verify we know how to create FIFO special files.
+    #
+    case $MKFIFO in
+    *mknod)
+	mkfifo()
+	{
+	    $MKFIFO $1 p
+	}
+	;;
+    *)
+	mkfifo()
+	{
+	    $MKFIFO $1
+	}
+	;;
+    esac
+    $RM conffifo; JUNK="$JUNK conffifo"
+    if (mkfifo conffifo && test -p conffifo) >/dev/null 2>&1; then
+	true
+    elif test -r conffifo; then			# NB: not everyone has test -p
+	true
+    else
+	cat >&2 <<EOF
+
+FATAL ERROR: Don't know how to create FIFO special files!
+
+We were unable to create a FIFO special file using the command:
+
+     $MKFIFO conffifo
+
+HylaFAX requires support for FIFO special files and will not function
+without this support.  If your system does not have support for FIFO
+files then reconfigure it to include support (on some systems this
+support is optional and requires recompilation or rebuilding of the
+kernel).  If your system does have support for FIFO files but they are
+not created using the expected program then you will need to reconfigure
+and rebuild HylaFAX from the source distribution or emulate the needed
+functionality (possibly by providing a shell script).
+
+EOF
+	boom
+    fi
+fi
+
+#
+# AWK support.
+#
+if onServer; then
+    test -x $AWK		|| appMisConfigured $AWK
+    # awk must support functions and -v
+    CheckAwk()
+    {
+	($1 -v BAR=bar '
+    function foo(x) {
+    print "GOT" x
+    }
+    BEGIN { foo(BAR) }
+    ' </dev/null | grep GOTbar) >/dev/null 2>&1
+	return
+    }
+    CheckAwk $AWK || {
+	cat >&2 <<EOF
+
+FATAL ERROR: $AWK does not support needed functionality!
+
+The following test does not work correctly with the configured awk program.
+
+----------------------------------------------------------
+$AWK -v BAR=bar '
+function foo(x) {
+print "GOT" x
+}
+BEGIN { foo(BAR) }
+' </dev/null | grep GOTbar
+----------------------------------------------------------
+
+The HylaFAX software requires an awk program that supports functions and
+the -v option for passing parameters from the command line.  The deficiency
+of $AWK on your system will cause problems in various parts of the HylaFAX
+software.
+
+If you are running an old version of $AWK then get a more up to date
+version.  Otherwise you can reconfigure HylaFAX from the source distribution
+to force a different awk program to be used or you can, as a last resort,
+try altering the shell scripts that are part of HylaFAX that use $AWK.
+
+EOF
+	boom
+    }
+fi
+
+#
+# Runtime Fontpath/Fontmap detection
+#
+if onClient; then
+	getGSFonts()
+	{
+		$PATH_GSRIP -h 2>/dev/null | $AWK -F '[ ]' '
+			BEGIN { start = 0; }
+			/Search path:/ { start = 1 }
+			{
+				if (start == 1) {
+						if ($1 == "") {
+						gsub(" ","")
+						gsub("^[.]","")
+						gsub("^:","")
+						printf "%s", $0
+					} else if ($1 != "Search") start = 0
+				}
+			}	
+		'
+	}
+	RUNTIME_PATH_AFM=`getGSFonts`
+	if [ -n "$RUNTIME_PATH_AFM" \
+				-a "$RUNTIME_PATH_AFM" != "$PATH_AFM" ]; then 
+	    Note ""
+	    Note "Setting Ghostscript font path in $DIR_LIBDATA/hyla.conf."
+	    Note ""
+	    if [ -f $DIR_LIBDATA/hyla.conf ]; then
+		$AWK '!/^FontMap|^FontPath|\/FontPath added by/ { print }' \
+			$DIR_LIBDATA/hyla.conf > $DIR_LIBDATA/hyla.conf.tmp
+	    fi
+	    echo "# FontMap/FontPath added by faxsetup (`date 2>/dev/null`)" \
+	                                        >> $DIR_LIBDATA/hyla.conf.tmp
+	    echo "FontMap:   $RUNTIME_PATH_AFM" >> $DIR_LIBDATA/hyla.conf.tmp
+	    echo "FontPath:  $RUNTIME_PATH_AFM" >> $DIR_LIBDATA/hyla.conf.tmp
+	    $MV $DIR_LIBDATA/hyla.conf.tmp $DIR_LIBDATA/hyla.conf
+	    PATH_AFM=$RUNTIME_PATH_AFM
+	fi
+fi
+
+#
+# Installation of Adobe Font Metric files
+#
+if onClient; then
+    FDIRS=`echo $PATH_AFM | sed "s/:/ /g"`
+    MATCH=
+    for FDIR in $FDIRS; do
+    if [ -d $FDIR ]; then
+	cd $FDIR
+	if [ -n "`ls | grep '.afm'`" ] || [ -f Courier ]; then
+		MATCH=$FDIR
+		break
+	fi
+    else
+	cat >&4 <<EOF
+
+
+Warning: $FDIR does not exist or is not a directory!
+
+The directory $FDIR does not exist or this file is not a directory.
+This is the directory where the HylaFAX client applications expect to
+locate font metric information to use in formatting ASCII text for
+submission as facsimile.  Without this information HylaFAX may generate
+illegible facsimile from ASCII text.
+
+EOF
+    fi
+    done
+    if [ -z "$MATCH" ];then
+	    cat >&4 <<EOF
+
+
+Warning: Font metric information files were not found!
+
+The font metric information file for the Courier font was not found in
+the $PATH_AFM path.  This means that client HylaFAX applications 
+that use this information to format ASCII text for submission as fax will
+use incorrect information and generate potentially illegible facsimile.
+
+If font metric information is present on your system in a directory other
+than $PATH_AFM then you can setup a symbolic link to the appropriate
+directory or you can specify the appropriate pathname in the configuration
+file $DIR_LIBDATA/hyla.conf with a line of the form:
+
+FontPath:	someplace_unexpected
+
+If you do not have the font metric information files loaded on your system
+system you can obtain them by public FTP from the place where you obtained
+the HylaFAX software or from the master FTP site at ftp.sgi.com.
+EOF
+     fi
+fi
+
+#
+# PostScript RIP support.
+#
+if onServer; then
+    cd $DIR_SPOOL
+    case $PS in
+    dps)	PATH_PSRIP=$PATH_DPSRIP;;
+    imp)	PATH_PSRIP=$PATH_IMPRIP;;
+    gs)		PATH_PSRIP=$PATH_GSRIP;;
+    esac
+    if [ -x "$PATH_PSRIP" ]; then
+	if [ $PS = gs ]; then
+	    # verify Ghostscript was linked with the tiffg3 device driver
+	    $PATH_PSRIP -h | grep tiffg3 >/dev/null 2>&1 || {
+		cat >&2 <<EOF
+
+FATAL ERROR: No tiffg3 driver in $PATH_PSRIP.
+
+HylaFAX has been configured to use Ghostscript as the PostScript
+imaging program but the output of $PATH_PSRIP -h does not
+list the tiffg3 driver as a configured driver (see below).
+
+----------------------------------------------------------
+% $PATH_PSRIP -h
+EOF
+$PATH_PSRIP -h
+----------------------------------------------------------
+		cat >&2 <<EOF
+
+The tiffg3 driver is required for HylaFAX to operate correctly. 
+Consult the documentation for information on building Ghostscript
+with the necessary TIFF driver and then rerun faxsetup when a new
+Ghostscript has been installed.
+
+EOF
+		boom
+	    }
+	elif [ $PS = dps ]; then
+	    JUNK="$JUNK ps.fax"
+	    $CAT etc/dpsprinter.ps | $PATH_PSRIP >/dev/null 2>&1
+	    if [ $? -eq 2 ]; then
+		if expr $RELEASE \>= 6.2 >/dev/null; then
+		    cat >&2 <<EOF
+
+FATAL ERROR: No DPS-based RIP available for IRIX $RELEASE!
+
+The DPS-based PostScript RIP is a COFF executable and cannot be used
+under IRIX $RELEASE.  You must use a different RIP such as fw_gs.sw.gs
+which is found on the SGI Freeware CD-ROM and which is based on the
+freely distributed Ghostscript software package.  This package is
+also included in the binary distribution of HylaFAX for SGI systems
+found on ftp.sgi.com.
+
+Once you have installed the Ghostscript distribution rerun faxsetup
+with the option -with-PS=gs to override the default setting.
+
+EOF
+		    boom
+		fi
+	    fi
+	fi
+    elif [ $PS = dps ]; then
+	if expr $RELEASE \>= 6.2 >/dev/null; then
+	    cat >&2 <<EOF
+
+FATAL ERROR: No DPS-based RIP available for IRIX $RELEASE!
+
+This distribution has been configured to use the DPS-based PostScript
+RIP that is only available as a COFF executable.  This program cannot
+be used under IRIX $RELEASE.  You must use a different RIP such as the
+Ghostscript-based RIP in the fw_gs.sw.gs installation image which is
+found on the SGI Freeware CD-ROM.  The fw_gs package is also included
+in the binary distribution of HylaFAX for SGI systems found on ftp.sgi.com.
+
+Once you have installed the Ghostscript distribution rerun faxsetup
+with the option -with-PS=gs to override the default setting.
+
+EOF
+	    boom
+	else
+	    appMisConfigured $PATH_PSRIP
+	fi
+    else
+	appMisConfigured $PATH_PSRIP
+    fi
+    #
+    # Force bin/ps2fax and bin/pdf2fax to point to the appropriate scripts.
+    #
+    Note ""
+    Note "Make $DIR_SPOOL/bin/ps2fax a link to $DIR_SPOOL/bin/ps2fax.$PS."
+    Note ""
+    $RM bin/ps2fax
+    $RM bin/pdf2fax
+    if [ -n "$LN_S" ]; then
+	$LN $LN_S ps2fax.$PS bin/ps2fax;
+	if [ $PS = gs ]; then
+	    Note ""
+	    Note "Make $DIR_SPOOL/bin/pdf2fax a link to $DIR_SPOOL/bin/pdf2fax.$PS."
+	    Note ""
+	    $LN $LN_S pdf2fax.$PS bin/pdf2fax;
+	else
+	    Note ""
+	    Note "Server-side PDF conversion is not supported on this system."
+	    Note ""
+	fi
+    else
+	$LN bin/ps2fax.$PS bin/ps2fax;
+	if [ $PS = gs ]; then
+	    Note ""
+	    Note "Make $DIR_SPOOL/bin/pdf2fax a link to $DIR_SPOOL/bin/pdf2fax.$PS."
+	    Note ""
+	    $LN bin/pdf2fax.$PS bin/pdf2fax;
+	else
+	    Note ""
+	    Note "Server-side PDF conversion is not supported on this system."
+	    Note ""
+	fi
+    fi
+fi
+
+#
+# Find the full pathname of a file
+# using the specified test operation.
+#
+findThing()
+{
+    t="$1"; app=$2; path=$3;
+    case $app in
+    /*) eval $t $app && { echo $app; return; };;
+    esac
+    IFS=:
+    for i in $path; do
+	eval $t $i/$app && { echo $i/$app; return; }
+    done
+}
+
+#
+# Find the full pathname of an executable.
+#
+findApp()
+{
+    findThing "test -x" $1 $2
+}
+
+#
+# Deal with known alternate locations for system files.
+#
+PickFile()
+{
+    for i do
+	test -f $i && { echo $i; return; }
+    done
+    echo $1
+}
+
+INETDCONF=`PickFile	$INETDCONF /etc/inetd.conf /etc/inet/inetd.conf`
+ALIASES=`PickFile	$ALIASES   /etc/aliases /etc/ucbmail/aliases /etc/mail/aliases /usr/mmdf/table/alias.user /usr/mmdf/table/alias.n`
+SERVICES=`PickFile	$SERVICES  /etc/inet/services`
+test -f /etc/master.passwd	&& PASSWD=/etc/master.passwd
+
+#
+# Figure out which brand of echo we have and define
+# prompt and printf shell functions accordingly.
+# Note that we assume that if the System V-style
+# echo is not present, then the BSD printf program
+# is available.
+#
+t=`(printf hello) 2>/dev/null`
+if [ "$t" != hello ]; then
+    cat >&2 <<EOF
+
+FATAL ERROR: No printf command or emulation!
+
+HylaFAX requires a shell-level program that understands C-style strings
+(e.g. "\r") and has a mechanism for printing a string without a trailing
+newline character.  The System V echo command and the BSD/POSIX-style
+printf command are known to support these functions;  however your system
+does not appear to have either of these programs.  If you have a program
+hidden somewhere on your system be sure to include it in the search path
+used by faxsetup:
+
+    $PATH
+
+and then rerun faxsetup.  Otherwise a printf command is included in the
+GNU shell utilities package that can be retrieved by public FTP.
+
+EOF
+    boom
+fi
+if onServer; then
+    dumpPromptFuncs >&5
+fi
+
+#
+# Prompt the user for a string that can not be null.
+#
+promptForNonNullStringParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+#
+# Prompt the user for a string that can be null.
+#
+promptForStringParameter()
+{
+    prompt "$2 [$1]?"; read x
+    if [ "$x" ]; then
+	# strip leading and trailing white space
+	x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+    else
+	x="$1"
+    fi
+    param="$x"
+}
+
+#
+# Prompt the user for a numeric value.
+#
+promptForNumericParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    match=`expr "$x" : "\([0-9]*\)"`
+	    if [ "$match" != "$x" ]; then
+		echo ""
+		echo "This must be entirely numeric; please correct it."
+		echo ""
+		x="";
+	    fi
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+#
+# Prompt the user for a C-style numeric value.
+#
+promptForCStyleNumericParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space and C-style 0x prefix
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    match=`expr "$x" : "\([0-9]*\)" \| "$x" : "\(0x[0-9a-fA-F]*\)"`
+	    if [ "$match" != "$x" ]; then
+		echo ""
+		echo "This must be entirely numeric; please correct it."
+		echo ""
+		x="";
+	    fi
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+#
+# Prompt the user for a boolean value.
+#
+promptForBooleanParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    case "$x" in
+	    n|no|off)	x=no;;
+	    y|yes|on)	x=yes;;
+	    *)
+cat <<EOF
+
+"$x" is not a valid boolean parameter setting;
+use one of: "yes", "on", "no", or "off".
+EOF
+		x="";;
+	    esac
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+#
+# Compile a table of configuration parameters prompts into
+# a shell program that can be ``eval'd'' to prompt the user
+# for changes to the current parameter settings.
+#
+compilePrompts()
+{
+    $AWK -F'[	]+' '
+function p(t)
+{
+    printf "promptFor%sParameter \"$%s\" \"%s\";%s=\"$param\"\n", t, $2, $3, $2
+}
+$1 == "#"	{ p("Numeric"); next }
+$1 == "C#"	{ p("CStyleNumeric"); next }
+$1 == "S"	{ p("String"); next }
+$1 == "NNS"	{ p("NonNullString"); next }
+$1 == "B"	{ p("Boolean"); next }
+		{ printf "promptFor%s\n", $1 }
+'
+}
+
+faxUID=`grep "^$PROTOUID:" $PASSWD | cut -d: -f3`
+if [ -z "$faxUID" ]; then faxUID=$defPROTOUID; fi
+faxGID=`grep "^$PROTOGID:" $GROUP | cut -d: -f3`
+if [ -z "$faxGID" ]; then faxGID=$defPROTOGID; fi
+
+#
+# Change the password file entry for the fax user.
+#
+fixupFaxUser()
+{
+    emsg1=`modifyPasswd $FAX $faxUID $faxGID $DIR_SPOOL 2>&1`
+    case $? in
+    0)	echo "Done, the \"$FAX\" user should now have the right user id.";;
+    *) cat <<-EOF
+
+	FATAL ERROR: Command failed!
+
+	The modify password command failed with the message:
+
+	"$emsg1"
+
+	HylaFAX will not work correctly until the proper uid is setup
+	for it in the password file.  Please fix this problem and then
+	rerun faxsetup.
+
+	EOF
+	boom
+	;;
+    esac
+}
+
+#
+# Add a fax user to the password file and lock the
+# entry so that noone can login as the user.
+#
+addFaxUser()
+{
+    emsg1=`addPasswd $FAX $faxUID $faxGID $DIR_SPOOL 2>&1`
+    case $? in
+    0)  emsg2=`lockPasswd $FAX 2>&1`
+	case $? in
+	0) echo "Added user \"$FAX\" to $PASSWD.";;
+	*) emsg3=`deletePasswd $FAX 2>&1`
+	   case $? in
+	   0|9) cat <<-EOF
+
+		Failed to add user "$FAX" to $PASSWD because the
+		attempt to lock the password failed with:
+
+		"$emsg2"
+
+		Please fix this problem and rerun this script."
+
+		EOF
+		;;
+	   *)   cat <<-EOF
+
+		You will have to manually edit $PASSWD because
+		after successfully adding the new user "$FAX", the
+		attempt to lock its password failed with:
+
+		"$emsg2"
+
+		and the attempt to delete the insecure passwd entry failed with:
+
+		"$emsg3"
+
+		To close this security hole, you should add a password
+		to the "$FAX" entry in the file $PASSWD, or lock this
+		entry with an invalid password.
+
+		EOF
+		;;
+	    esac
+	    boom;;
+	esac;;
+    9)  # fax was already in $PASSWD, but not found with grep
+	;;
+    *)  cat <<-EOF
+
+	There was a problem adding user "$FAX" to $PASSWD;
+	the command failed with:
+
+	"$emsg1"
+
+	HylaFAX will not work until you have corrected this problem.
+
+	EOF
+	boom;;
+    esac
+}
+
+isOK()
+{
+    x="$1"
+    test -z "$x" -o "$x" = y -o "$x" = yes
+}
+
+if onServer; then
+    x=`grep "^$FAX:" $PASSWD | cut -d: -f3`
+    if [ -z "$x" ]; then
+	echo ""
+	echo ""
+	echo "You do not appear to have a \"$FAX\" user in the password file."
+	prompt "HylaFAX needs this to work properly, add it [yes]?"
+	read x
+	isOK $x && addFaxUser
+    elif [ "$x" != "$faxUID" ]; then
+	echo ""
+	echo ""
+	echo "It looks like you have a \"$FAX\" user in the password file,"
+	echo "but with a uid different than the uid for uucp.  You probably"
+	echo "have old fax software installed.  In order for this software"
+	echo "to work properly, the fax user uid must be the same as uucp."
+	prompt "Is it ok to change the password entry for \"$FAX\" [yes]?"
+	read x;
+	isOK $x && fixupFaxUser
+    fi
+    machdepPasswdWork
+
+    #
+    # Verify existence, permission and ownership of sensitive files.
+    # XXX there are other files too 
+    #
+    HOSTS=$DIR_SPOOL/etc/hosts.hfaxd
+    test -f $HOSTS || {
+	cat<<EOF
+
+Warning: $1 does not exist!
+
+The file $1 does not exist or is not a regular file.
+This file specifies which clients are permitted to use the HylaFAX
+server.  The file will be initialized so that local clients are
+provided service.  Consult the HTML documentation and the manual
+page hosts.hfaxd(@MANNUM4_5@) for more information on setting up this file.
+
+EOF
+	$RM $HOSTS
+	echo "localhost" >$HOSTS
+	echo "127.0.0.1" >>$HOSTS
+    }
+    #
+    # Too complicated to check contents:
+    # simply force correct protection and ownership
+    #
+    $CHOWN $faxUID $HOSTS; $CHGRP $faxGID $HOSTS
+    $CHMOD 600 $HOSTS
+fi
+
+#
+# Check for services entries for hylafax and snpp.
+#
+hasYP=`(ypcat services) 2>/dev/null | tail -1` 2>/dev/null
+x=`$GREP '^hylafax[ 	]' $SERVICES 2>/dev/null` 2>/dev/null
+if [ -z "$x" ]; then
+    if [ "$hasYP" ]; then
+	x=`ypcat services 2>/dev/null | $GREP '^hylafax[ 	]'` 2>/dev/null
+    fi
+    if [ -z "$x" ]; then
+	ENTRY="hylafax	4559/tcp		# HylaFAX client-server protocol"
+	cat<<-EOF
+
+
+	Warning: No hylafax service entry found!
+
+	No entry was found for the hylafax service in the YP/NIS database
+	or in the $SERVICES file.  The software should work properly
+	without one (except if you want to start hfaxd from inetd), but you
+	will see warning messages whenever you run a HylaFAX client
+	application.  If you want to manually add an entry the following
+	information should be used:
+
+	$ENTRY
+
+	EOF
+	prompt "Should a hylafax entry be added to $SERVICES [yes]?"
+	read x
+	isOK $x && echo "$ENTRY" >>$SERVICES
+    fi
+fi
+x=`$GREP '^snpp[ 	]' $SERVICES 2>/dev/null` 2>/dev/null
+if [ -z "$x" ]; then
+    if [ "$hasYP" ]; then
+	x=`ypcat services 2>/dev/null | $GREP '^snpp[ 	]'` 2>/dev/null
+    fi
+    if [ -z "$x" ]; then
+	ENTRY="snpp	444/tcp		# Simple Network Paging Protocol"
+	cat<<-EOF
+
+
+	Warning: No snpp service entry found!
+
+	No entry was found for the Simple Network Paging Protocol (SNPP)
+	service in the YP/NIS database or in the $SERVICES file.
+	The software should work properly without one (except if you want
+	to start hfaxd from inetd), but you will see warning messages whenever
+	you run the HylaFAX sendpage program.  If you want to manually add
+	an entry the following information should be used:
+
+	$ENTRY
+
+	EOF
+	prompt "Should an snpp entry be added to $SERVICES [yes]?"
+	read x
+	isOK $x && echo "$ENTRY" >>$SERVICES
+    fi
+fi
+
+#
+# Check that for servers being started at system boot.
+#
+if onServer; then
+    signalINETD=no
+    if [ -f ${DIR_SYSVINIT}/hylafax ]; then
+	# started by init at boot time
+        if [ $FAXQ_SERVER = no ]; then
+            cat <<EOF
+
+Warning faxq will NOT be automatically started on reboot!
+
+EOF
+            true
+        fi
+    fi
+    if [ -f $INETDCONF -a $HFAXD_SERVER = no ]; then
+	E="hylafax	stream	tcp	nowait	root	$DIR_LIBEXEC/hfaxd	hfaxd -I"
+	editInetdConf()
+	{
+	    ed - $INETDCONF<<EOF
+/^hylafax[ 	]*stream[ 	]*tcp/d
+a
+$E
+.
+w
+q
+EOF
+	    if [ $? != 0 ]; then
+		cat<<EOF
+
+FATAL ERROR: Unable to correct HylaFAX entry in $INETDCONF!
+
+We were unable to edit the $INETDCONF file to correct the entry
+for starting up the HylaFAX client-server protocol process.  You
+must manually correct this entry so that it reads:
+
+$E
+
+and then rerun faxsetup.
+
+EOF
+		boom
+	    fi
+	}
+	eval `$GREP '^hylafax[ 	]*stream[ 	]*tcp' $INETDCONF | \
+	    $AWK -F'[ 	]+' '{ print "F=" $6 "; U=" $5 }' 2>/dev/null`
+	if [ -z "$F" -a -z "$U" ]; then
+	    cat<<EOF
+
+
+There is no entry for the hylafax service in $INETDCONF.
+The HylaFAX client-server protocol process can be setup to run
+standalone or started by the inetd program.  A standalone setup
+is preferred for performance reasons, especially if hfaxd is to
+support multiple protocols (e.g. SNPP); however it may require
+manual setup if your operating system does not have a System-V
+style init program.
+
+EOF
+	    prompt "Should an entry be added to $INETDCONF [no]?"; read x
+	    if [ "$x" = y -o "$x" = yes ]; then
+		echo "$E" >>$INETDCONF;
+		signalINETD=yes
+	    fi
+	else
+	    if [ "$F" != $DIR_LIBEXEC/hfaxd ]; then
+		cat<<EOF
+
+
+Warning: $INETDCONF is setup wrong!
+
+The $INETDCONF file is setup to start $F
+instead of $DIR_LIBEXEC/hfaxd.  You will need to correct
+this before client requests to submit jobs will be properly serviced.
+
+EOF
+		prompt "Should the entry in $INETDCONF be corrected [yes]?"; read x
+		isOK "$x" && editInetdConf
+	    fi
+	    if [ "$U" != $FAX ]; then
+		cat<<EOF
+
+
+Warning: $INETDCONF is setup wrong!
+
+Warning, the HylaFAX entry is setup so that $F is run by the
+$U user instead of the $FAX user.  This must be corrected
+before client requests to submit jobs will be properly serviced.
+
+EOF
+		prompt "Should the entry in $INETDCONF be corrected [yes]?"; read x
+		isOK "$x" && editInetdConf
+	    fi
+	fi
+    elif [ ! -f $INETDCONF -a $HFAXD_SERVER = no ]; then
+	cat<<EOF
+
+
+Warning: Don't know how to startup HylaFAX servers!
+
+No $INETDCONF file was found and the System V boot script
+that starts up the HylaFAX server processes was also not present.
+You will need to manually arrange for the various HylaFAX servers
+to be started up on your system when it is booted multi-user. 
+Specifically you will need to start the faxq and hfaxd programs and
+any faxgetty processes that are to service inbound calls on modems.
+
+EOF
+    fi
+fi
+
+#
+# Check for a FaxMaster entry for sending mail.
+#
+if onServer; then
+    x=`(ypcat -k aliases) 2>/dev/null | $GREP -i '^faxmaster'` 2>/dev/null
+    if [ -z "$x" -a -f $ALIASES ]; then
+	x=`$GREP -i '^faxmaster' $ALIASES`
+    fi
+    if [ -z "$x" ]; then
+	cat<<-EOF
+
+
+	There does not appear to be an entry for the FaxMaster either in
+	the YP/NIS database or in the $ALIASES file.  The
+	FaxMaster is the primary point of contact for HylaFAX problems. 
+	The HylaFAX client-server protocol server identifies this alias as
+	the place to register complaints and HylaFAX directs automatic mail
+	messages to this user when problems are identified on a server
+	machine or when the routine server maintainence scripts are run
+	(e.g. faxcron).
+
+	EOF
+	prompt "Should an entry be added for the FaxMaster to $ALIASES [yes]?"
+	read x
+	if isOK $x; then
+	    promptForNonNullStringParameter "${USER:-root}" \
+	       "Users to receive fax-related mail"
+	    (echo "# alias for notification messages from HylaFAX servers";
+	     echo "FaxMaster: $param") >>$ALIASES
+	    if newaliases 2>/dev/null; then
+		echo "Rebuilt $ALIASES database."
+	    else
+		# could be a SCO machine running mmdf
+		if test -x /usr/mmdf/table/dbmbuild ; then
+		    su mmdf -c "/usr/mmdf/table/dbmbuild"
+		else
+		    echo "Can not find newaliases to rebuild $ALIASES;"
+		    echo "you will have to do it yourself."
+		fi
+	    fi
+	fi
+    fi
+    FAXMASTER=$x
+fi
+
+#
+# Generate or update default values for status/any.info
+#
+if onServer; then
+    if [ -r $DIR_SPOOL/status/any.info ]; then
+	INFO=`cat $DIR_SPOOL/status/any.info | \
+	$GREP -v "HylaFAX version" | $GREP -v "FaxMaster"`
+    else INFO=""
+    fi
+    if [ -d $DIR_SPOOL/status ]; then
+	echo "Update $DIR_SPOOL/status/any.info."
+	echo "HylaFAX version $VERSION built $DATE for $TARGET" \
+	> $DIR_SPOOL/status/any.info
+	echo $FAXMASTER >> $DIR_SPOOL/status/any.info
+	echo $INFO >> $DIR_SPOOL/status/any.info
+    fi
+fi
+
+#
+# Emit shell functions required by faxaddmodem.
+#
+if onServer; then
+    STTYCMD=`findApp stty $PATH`
+    (dumpTTYFuncs; dumpSTTYFuncs; dumpOtherModemFuncs)>&5
+    $RM etc/setup.modem
+    $MV etc/setup.tmp etc/setup.modem
+    $CHMOD 444 etc/setup.modem
+
+    $RM etc/setup.cache
+    (echo '# Warning, this file was automatically generated by faxsetup'
+     echo '# on' `date` "for ${USER:-$euid}"
+     dumpvals |sort)> etc/setup.cache
+    $CHMOD 444 etc/setup.cache
+
+    Note ""
+    Note "Modem support functions written to $DIR_SPOOL/etc/setup.modem."
+    Note "Configuration parameters written to $DIR_SPOOL/etc/setup.cache."
+fi
+
+#
+# Configuration parameters specific to scheduler operation.
+# Required parameters are *always* emitted in the created
+# configuration file; optional parameters are emitted
+# only if the configured value differs from the default
+# value known to be used by the server.
+#
+# NB: the order of some parameters is important; e.g.
+#     DialStringRules must be after AreaCode and CountryCode.
+#
+RequiredSchedulerParameters="
+    LogFacility
+    CountryCode
+    AreaCode
+    LongDistancePrefix
+    InternationalPrefix
+    DialStringRules
+    ServerTracing
+"
+OptionalSchedulerParameters="
+    ContCoverPage
+    ContCoverCmd
+    DestControls
+    MaxConcurrentJobs
+    MaxDials
+    MaxSendPages
+    MaxTries
+    ModemGroup
+    PostScriptTimeout
+    PS2FaxCmd
+    SendFaxCmd
+    SendPageCmd
+    SendUUCPCmd
+    SessionTracing
+    TimeOfDay
+    Use2D
+"
+#
+# NB: these defaults are set above
+#
+OptionalParameters="
+    $OptionalSchedulerParameters
+    JobReqOther
+    NotifyCmd
+    UUCPLockDir
+    UUCPLockTimeout
+    UUCPLockType
+"
+SchedulerParameters="
+    $RequiredSchedulerParameters
+    $OptionalParameters
+"
+
+#
+# Echo the configuration lines for those scheduler parameters
+# whose value is different from the default value.  Note
+# that we handle the case where there is embedded whitespace
+# by enclosing the parameter value in quotes.
+#
+echoSchedulerParameters()
+{
+    (for i in $RequiredSchedulerParameters; do
+	eval echo \"$i:\$$i:\"
+     done
+     for i in $OptionalSchedulerParameters; do
+	eval echo \"$i:\$$i:\$default$i\"
+     done) | $AWK -F: '
+function p(tag, value)
+{
+    tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8));
+    if (match(value, "^[^\"].*[ ]") == 0)
+	printf "%s:%s%s\n", tag, tabs, value
+    else
+	printf "%s:%s\"%s\"\n", tag, tabs, value
+}
+$2 != $3{ p($1, $2) }'
+}
+
+#
+# Print the current server configuration parameters.
+#
+printSchedulerConfig()
+{
+    (for i in $SchedulerParameters; do
+	eval echo \"$i:\$$i:\$default$i\"
+    done) | $AWK -F: '
+function p(tag, value)
+{
+    tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8));
+    printf "%s:%s%s\n", tag, tabs, value
+}
+BEGIN	{ printf "\nThe non-default scheduler parameters are:\n\n" }
+$2 != $3{ p($1, $2) }
+END	{ printf "\n" }'
+}
+
+checkForLocalFile()
+{
+    f="`echo $1 | $SED 's/\"//g'`"
+    if [ ! -f $DIR_SPOOL/$f ]; then
+	cat<<EOF
+
+Warning, the $2 file,
+
+    $DIR_SPOOL/$f
+
+does not exist, or is not a plain file.  This file must
+reside in the $DIR_SPOOL directory tree.
+EOF
+	ok=no;
+    fi
+}
+
+isNotOK()
+{
+    x="$1"
+    test "$x" != y -a "$x" != yes
+}
+
+CONFIG=$DIR_SPOOL/etc/config		# faxq config file
+if onServer; then
+    if [ ! -f $CONFIG ]; then
+	for i in $SchedulerParameters; do
+	    eval $i=\$default$i
+	done
+	echo ""
+	echo "No scheduler config file exists, creating one from scratch."
+	ok=prompt				# prompt for parameters
+
+	PROMPTS=/tmp/faxpr$$
+	JUNK="$JUNK $PROMPTS"
+	$RM -rf $PROMPTS
+
+	while true; do
+	    if [ "$ok" != skip ]; then
+		test -f $PROMPTS || (
+		${NOCLOBBER_ON}
+		> $PROMPTS || exit 1
+		${NOCLOBBER_OFF}
+		compilePrompts>$PROMPTS<<EOF
+#	CountryCode		Country code
+#	AreaCode		Area code
+#	LongDistancePrefix	Long distance dialing prefix
+#	InternationalPrefix	International dialing prefix
+NNS	DialStringRules		Dial string rules file (relative to $DIR_SPOOL)
+C#	ServerTracing		Tracing during normal server operation
+C#	SessionTracing		\
+	Default tracing during send and receive sessions
+S	ContCoverPage		Continuation cover page (relative to $DIR_SPOOL)
+C#	PostScriptTimeout	\
+	Timeout when converting PostScript documents (secs)
+C#	MaxConcurrentJobs	\
+	Maximum number of concurrent jobs to a destination
+S	ModemGroup		Define a group of modems
+S	TimeOfDay		Time of day restrictions for outbound jobs
+S	DestControls		\
+	Pathname of destination controls file (relative to $DIR_SPOOL)
+C#	UUCPLockTimeout		\
+	Timeout before purging a stale UUCP lock file (secs)
+C#	MaxSendPages		Max number of pages to permit in an outbound job
+S	LogFacility		Syslog facility name for ServerTracing messages
+EOF
+)
+		. $PROMPTS
+	    fi
+	    checkForLocalFile $DialStringRules "dial string rules"
+	    if [ "$DestControls" != "" -a "$DestControls" != '""' ]; then
+		checkForLocalFile $DestControls "destination controls";
+	    fi
+	    printSchedulerConfig; prompt "Are these ok [yes]?"; read ok
+	    isOK "$ok" && break
+	done
+
+	#
+	# All done with the prompting; edit up a config file!
+	#
+	echo ""
+	echo "Creating new configuration file $CONFIG..."
+	echoSchedulerParameters >$CONFIG 2>/dev/null
+	test -s $CONFIG || {
+	    JUNK="$JUNK $CONFIG"		# clobber on exit
+	    cat<<EOF
+
+FATAL ERROR: Problem writing $CONFIG!
+
+Sorry, something went wrong writing the new scheduler configuration
+file.  Check to make sure there is sufficient disk space and rerun
+this script.
+
+EOF
+	    boom
+	}
+	$CHOWN $faxUID $CONFIG; $CHGRP $faxGID $CONFIG
+	$CHMOD 644 $CONFIG
+    fi
+fi
+
+#
+# Startup/restart server processes.
+#
+if onServer; then
+    echo ""
+    echo "Restarting HylaFAX server processes."
+
+    findproc()
+    {
+	# NB: ps ax should give an error on System V, so we try it first!
+	pid="`ps ax 2>/dev/null | $AWK \"\
+		/[\/ (]$1[ )]/	{print \\$1;}
+		/[\/ ]$1\$/	{print \\$1;}\"`"
+	test "$pid" ||
+	    pid="`ps -e 2>/dev/null | $AWK \"/ $1[ ]*\$/ {print \\$1;}\"`"
+	echo "$pid"
+    }
+
+    HFAXD="`findproc hfaxd`"
+#    if [ "$HFAXD" ]; then
+#    fi
+    FAXD="`findproc faxd`"
+    if [ "$FAXD" ]; then
+	echo ""
+	echo "You seem to be running FlexFAX (there are faxd processes)."
+	prompt "Is it ok to terminate these processes ($FAXD) [yes]?"; read x
+	if isOK "$x"; then
+	    if kill $FAXD; then
+		echo "Sent a SIGTERM to processes $FAXD."
+	    else
+		echo "Unable to send a SIGTERM to processes $FAXD."
+	    fi
+	    while true; do
+		for delay in 1 1 2 2 5 5; do
+		    FAXD="`findproc faxd`"
+		    test "$FAXD" || break
+		    sleep $delay
+		done
+		test -z "$FAXD" && break
+		cat<<EOF
+
+Warning: faxd is still running!
+
+Something is hung.  The command
+
+    kill $FAXD
+    
+did not terminate the faxd processes as expected.
+EOF
+		prompt "Should we continue to wait [no]?"; read x
+		isNotOK "$x" && break
+	    done
+	fi
+    fi
+    FAXQ="`findproc faxq`"
+    if [ "$FAXQ" ]; then
+	cat<<EOF
+
+You have a HylaFAX scheduler process running.  faxq will be
+restarted shortly, as soon as some other work has been completed.
+EOF
+	prompt "Can I terminate this faxq process ($FAXQ) [yes]?";
+	read x
+	if isOK "$x" ]; then
+	    $DIR_SBIN/faxquit >/dev/null 2>&1
+	    while true; do
+		for delay in 1 1 2 2 5 5; do
+		    FAXQ="`findproc faxq`"
+		    test "$FAXQ" || break
+		    sleep $delay
+		done
+		test -z "$FAXQ" && break
+		pids=
+		for p in faxsend pagesend; do
+		    pids="${pids}`findproc $p`"
+		done
+		if [ "$pids" ]; then
+		    cat<<EOF
+
+Warning: faxq is busy with outbound jobs!
+
+faxq did not terminate in response to the faxquit command because
+there are subprocesses actively processing outbound jobs.
+EOF
+		    prompt "Should we continue to wait [yes]?"; read x
+		    isOK "$x" || break
+		else
+		    cat<<EOF
+
+Warning: faxq is still running for some reason!
+
+Something is hung, faxq did not terminate in response to the faxquit
+command.  There do not appear to be any faxsend or pagesend subprocesses
+actively handling outbound jobs so the reason for it running is unknown.
+EOF
+		    prompt "Should we continue to wait [no]?"; read x
+		    isNotOK "$x" && break
+		fi
+	    done
+	fi
+    fi
+
+    if [ "$FAXQ" -o "$FAXD" ]; then
+	cat<<EOF
+
+FATAL ERROR: Old server processes still running!
+
+One or more old server processes are still running.  It is not wise
+to start new server processes while old processes are running because
+their actions might conflict.  You need to terminate the existing
+processes and rerun this script or manually startup the new HylaFAX
+server processes.
+
+EOF
+	boom
+    fi
+
+    if [ "$signalINETD" = yes ]; then
+	INETD="`findproc inetd`"
+	if [ "$INETD" ]; then
+	    if kill -HUP $INETD 2>/dev/null; then
+		echo "Sent inetd a SIGHUP so that it re-reads the configuration file."
+	    else
+		echo "Unable to send inetd a SIGHUP, you may need to do it yourself."
+	    fi
+	else
+	    echo "Strange, you do not seem to have an inetd process running."
+	fi
+    fi
+
+    prompt "Should I restart the HylaFAX server processes [yes]?"; read x
+    if isOK "$x"; then
+	echo ""
+	if [ -x ${DIR_SYSVINIT}/hylafax ]; then
+	    echo ${DIR_SYSVINIT}/hylafax start
+	    ${DIR_SYSVINIT}/hylafax start
+	else
+	    echo $DIR_SBIN/faxq; $DIR_SBIN/faxq
+	fi
+    fi
+
+    DEVS="`cd $DIR_SPOOL/etc; echo config.*`"
+    if [ -z "$DEVS" -o "$DEVS" = 'config.*' ]; then
+	cat<<EOF
+
+You do not appear to have any modems configured for use.  Modems are
+configured for use with HylaFAX with the faxaddmodem(@MANNUM1_8@) command.
+EOF
+	prompt "Do you want to run faxaddmodem to configure a modem [yes]?"; read x
+	while isOK "$x"; do
+	     $DIR_SBIN/faxaddmodem
+	     prompt "Do you want to run faxaddmodem to configure another modem [yes]?"; read x
+	done
+	DEVS="`cd $DIR_SPOOL/etc; echo config.*`"
+    fi
+
+    if [ -n "$DEVS" -a "$DEVS" != 'config.*' ]; then
+	FAXGETTY="`findproc faxgetty`"
+	if [ "$FAXGETTY" ]; then
+	    cat<<EOF
+
+Looks like you have some faxgetty processes running (PIDs are):
+
+    $FAXGETTY
+
+It is usually a good idea to restart these processes after running
+faxsetup; especially if have just installed new software.  If these
+processes are being started by init(@MANNUM1_8@) then sending each of them a
+QUIT message with the faxquit command should cause them to be restarted.
+EOF
+	    prompt "Is it ok to send a QUIT command to each process [yes]?"
+	    read x
+	    if isOK "$x"; then
+		for x in $DEVS; do
+		    devid="`expr $x : 'config.\(.*\)'`"
+		    if [ -w $DIR_SPOOL/FIFO.$devid ]; then
+			echo $DIR_SBIN/faxquit $devid
+			$DIR_SBIN/faxquit $devid >/dev/null 2>&1
+		    fi
+		done
+	    fi
+	else
+	    if [ -f /etc/inittab ]; then
+		FAXGETTY="`$GREP '[^#].*:respawn:faxgetty.*' /etc/inittab`"
+	    elif [ -f /etc/ttys ]; then
+		FAXGETTY="`$GREP '[^#].*faxgetty.*' /etc/ttys`"
+	    fi
+	    if [ "$FAXGETTY" ]; then
+		cat<<EOF
+
+You appear to have faxgetty setup to run on some tty lines but no faxgetty
+processes were found running.  This might happen if you manually edited the
+tty configuration file but did not notify init to re-read the file.
+
+EOF
+		prompt "Send init a SIGHUP so that it re-reads its configuration file [yes]?"
+		read x
+		if isOK "$x"; then
+		    init="`findproc init`"
+		    if [ "$init" ]; then
+			if kill -HUP $init; then
+			    echo "Sent init a SIGHUP; the faxgetty processes should be started."
+			else
+			    echo "Unable to send init a SIGHUP; you may need to do this yourself."
+			fi
+		    else
+			echo "Strange, you do not seem to have an init process running!"
+		    fi
+		fi
+	    else
+		cat<<EOF
+
+You do not appear to be using faxgetty to notify the HylaFAX scheduler
+about new modems and/or their status.  This means that you must use the
+faxmodem program to inform the new faxq process about the modems you
+want to have scheduled by HylaFAX.  Beware that if you have modems that
+require non-default capabilities specified to faxmodem then you should
+read faxmodem(@MANNUM1_8@) manual page and do this work yourself (since this
+script is not intelligent enough to automatically figure out the modem
+capabilities and supply the appropriate arguments).
+
+EOF
+		prompt "Should I run faxmodem for each configured modem [yes]?"
+		read x
+		if isOK "$x"; then
+		    for x in $DEVS; do
+			devid="`expr $x : 'config.\(.*\)'`"
+			if [ -w $DIR_SPOOL/FIFO.$devid ]; then
+			    echo $DIR_SBIN/faxmodem $devid
+			    $DIR_SBIN/faxmodem $devid >/dev/null 2>&1
+			fi
+		    done
+		fi
+	    fi
+	fi
+    fi
+fi
+
+Note ""
+Note "Done verifying system setup."
+
+if onServer; then
+    $RM $JUNK
+fi
+exit 0
--- hylafax-4.1.1.orig/etc/faxaddmodem.sh.in~
+++ hylafax-4.1.1/etc/faxaddmodem.sh.in~
@@ -0,0 +1,2046 @@
+#! @SCRIPT_SH@
+#	$Id: faxaddmodem.sh.in,v 1.20 2002/02/15 03:55:04 darren Exp $
+#
+# @WARNING@
+#
+# HylaFAX Facsimile Software
+#
+# Copyright (c) 1990-1996 Sam Leffler
+# Copyright (c) 1991-1996 Silicon Graphics, Inc.
+# HylaFAX is a trademark of Silicon Graphics
+# 
+# Permission to use, copy, modify, distribute, and sell this software and 
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+# 
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+# 
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+# OF THIS SOFTWARE.
+#
+
+#
+# VERSION:	@VERSION@
+# DATE:		@DATE@
+# TARGET:	@TARGET@
+#
+
+#
+# faxaddmodem [tty]
+#
+# This script interactively configures a HylaFAX server
+# from keyboard input on a standard terminal.  There may
+# be some system dependencies in here; hard to say with
+# this mountain of shell code!
+#
+SPOOL=@SPOOL@
+
+SPEED=
+while [ x"$1" != x"" ] ; do
+    case $1 in
+    -s)	    SPEED=$2; shift;;
+    -*)	    echo "Usage: $0 [-s SPEED] [ttyname]"; exit 1;;
+    *)	    TTY=$1;;
+    esac
+    shift
+done
+
+# Test selected modem speed against a list of known standards
+
+if [ "$SPEED" != "" -a "$SPEED" != 38400 -a "$SPEED" != 19200 \
+   -a "$SPEED" != 9600 -a "$SPEED" != 4800 -a "$SPEED" != 2400 \
+   -a "$SPEED" != 1200 ]; then
+   cat<<EOF
+
+Warning, you have selected a DTE-DCE communication rate ($SPEED) that
+differs from known standards. $SPEED may not work correctly for sending
+and receiving facsimile: check your modem manual to make sure that
+$SPEED is acceptable.
+
+EOF
+fi
+
+test -f $SPOOL/etc/setup.cache || {
+    cat<<EOF
+
+FATAL ERROR: $SPOOL/etc/setup.cache is missing!
+
+The file $SPOOL/etc/setup.cache is not present.  This
+probably means the machine has not been setup using the faxsetup(@MANNUM1_8@)
+command.  Read the documentation on setting up HylaFAX before you
+startup a server system.
+
+EOF
+    exit 1
+}
+. $SPOOL/etc/setup.cache	# common configuration stuff
+. $SPOOL/etc/setup.modem	# modem-specific stuff
+
+#
+# Deduce the effective user id:
+#   1. POSIX-style, the id program
+#   2. the old whoami program
+#   3. last gasp, check if we have write permission on /dev
+#
+euid=`id|$SED -e 's/.*uid=[0-9]*(\([^)]*\)).*/\1/'`
+test -z "$euid" && euid=`(whoami) 2>/dev/null`
+test -z "$euid" -a -w /dev && euid=root
+if [ "$euid" != "root" ]; then
+    echo "Sorry, but you must run this script as the super-user!"
+    exit 1
+fi
+
+# security
+TMPDIR=/tmp/.faxaddmodem$$
+umask 077
+rm -rf $TMPDIR
+mkdir $TMPDIR || exit 1
+
+SH=$SCRIPT_SH			# shell for use below
+CPATH=$SPOOL/etc/config		# prefix of configuration file
+OUT=$TMPDIR/addmodem$$         # temp file in which modem output is recorded
+SVR4UULCKN=$LIBEXEC/lockname	# SVR4 UUCP lock name construction program
+ONDELAY=$LIBEXEC/ondelay	# prgm to open devices blocking on carrier
+CAT="$CAT -u"			# something to do unbuffered reads and writes
+FAX=fax				# identity of the fax user
+GROUP=/etc/group		# where to go for group entries
+PROTOGID=$FAXGID		# group who's gid we use for FAX user
+defPROTOGID=10			# use this gid if PROTOGID doesn't exist
+MODEMCONFIG=$SPOOL/config	# location of prototype modem config files
+RMCMD="$RM -f"			# forced removal
+
+#
+# Build a list of config files in a portable way for grepping...
+#
+
+cd $MODEMCONFIG
+CONFIG_LIST=""
+for file in *; do
+  if [ -f "$file" ]; then
+    CONFIG_LIST="$CONFIG_LIST $file"
+  fi
+done
+
+#
+# Prompt the user for a string that can not be null.
+#
+promptForNonNullStringParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+#
+# Prompt the user for a string that can be null.
+#
+promptForStringParameter()
+{
+    prompt "$2 [$1]?"; read x
+    if [ "$x" ]; then
+	# strip leading and trailing white space
+	x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+    else
+	x="$1"
+    fi
+    param="$x"
+}
+
+#
+# Prompt the user for a numeric value.
+#
+promptForNumericParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    match=`expr "$x" : "\([0-9]*\)"`
+	    if [ "$match" != "$x" ]; then
+		echo ""
+		echo "This must be entirely numeric; please correct it."
+		echo ""
+		x="";
+	    fi
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+#
+# Prompt the user for a C-style numeric value.
+#
+promptForCStyleNumericParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space and C-style 0x prefix
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    match=`expr "$x" : "\([0-9]*\)" \| "$x" : "\(0x[0-9a-fA-F]*\)"`
+	    if [ "$match" != "$x" ]; then
+		echo ""
+		echo "This must be entirely numeric; please correct it."
+		echo ""
+		x="";
+	    fi
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+#
+# Prompt the user for a boolean value.
+#
+promptForBooleanParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    case "$x" in
+	    n|no|off)	x=no;;
+	    y|yes|on)	x=yes;;
+	    *)
+cat <<EOF
+
+"$x" is not a valid boolean parameter setting;
+use one of: "yes", "on", "no", or "off".
+EOF
+		x="";;
+	    esac
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+faxGID=`$GREP "^$PROTOGID:" $GROUP | cut -d: -f3`
+if [ -z "$faxGID" ]; then faxGID=$defPROTOGID; fi
+
+while [ -z "$TTY" -o ! -c /dev/$TTY ]; do
+    test "$TTY" != "" && echo "/dev/$TTY is not a terminal device."
+    prompt "Serial port that modem is connected to [$TTY]?"; read TTY
+done
+
+JUNK="$OUT"
+trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; exit 1" 0 1 2 15
+
+if [ ! -d $UUCP_LOCKDIR ]; then
+    cat<<EOF
+
+The UUCP lock file directory, $UUCP_LOCKDIR, does not appear
+to exist or be a directory.  This must be corrected before you
+can use this script to setup a modem for use.  Rerun the faxsetup
+command to correct this problem.
+
+EOF
+    exit 1
+fi
+
+PORT=`ttyPort $TTY`			# shortened tty port name
+LOCKX=`ttyLocks $TTY`			# UUCP lock file names
+DEVS=`ttyAliases $TTY`			# all TTY aliases
+tdev=`ttyDev $TTY`			# TTY device to use for communication
+DEVID="`echo $TTY | tr '/' '_'`"	# HylaFAX device identifier
+CONFIG=$CPATH.$DEVID			# HylaFAX configuration filename
+
+#
+# Check that device is not currently being used.
+#
+for x in $LOCKX; do
+    if [ -f $x ]; then
+	echo "Sorry, the device is currently in use by another program."
+	exit 1
+    fi
+done
+
+#
+# Look for old/conflicting configuration stuff.
+#
+OLDCONFIG= OLDFIFO=			# set by checkPort
+checkPort $TTY
+
+#
+# Lock the device for later use when deducing the modem type.
+#
+JUNK="$JUNK $LOCKX"
+
+LOCKSTR=`expr "         $$" : '.*\(..........\)'`
+# lock the device by all of its names
+for x in $LOCKX; do
+    echo "$LOCKSTR" > $x
+done
+
+# zap any gettys or other users
+if ! [ -f $FUSER ]; then
+    cat<<EOF
+Hmm, there does not appear to be an fuser command on your machine.
+This means that I am unable to ensure that all processes using the
+modem have been killed.  I will keep going, but beware that you may
+have competition for the modem.
+EOF
+else $FUSER -k $DEVS >/dev/null 2>&1
+fi
+
+cat<<EOF
+
+Ok, time to setup a configuration file for the modem.  The manual
+page config(@MANNUM4_5@) may be useful during this process.  Also be aware
+that at any time you can safely interrupt this procedure.
+
+EOF
+
+#
+# Configuration parameters specific to server operation
+# (as opposed to that of the fax modem).  The required
+# parameters are *always* emitted in the final created
+# configuration file; otherwise parameters are emitted
+# only if the configured value differs from the default
+# value known to be used by the server.
+#
+# NB: the order of some parameters is important; e.g.
+#     FAXNumber must be after AreaCode and CountryCode.
+#
+RequiredServerParameters="
+    CountryCode
+    AreaCode
+    FAXNumber
+    LongDistancePrefix
+    InternationalPrefix
+    DialStringRules
+    ServerTracing
+    SessionTracing
+    RecvFileMode
+    LogFileMode
+    DeviceMode
+    RingsBeforeAnswer
+    SpeakerVolume
+    GettyArgs
+"
+#
+# Some of these things are also modem-dependent.  It's a
+# hard call whether to treat them as server-related and
+# propagate them to a new config file or to treat them as
+# modem-specific and taken them from the prototype modem
+# configuration file.
+#
+OptionalServerParameters="
+    LocalIdentifier
+    LogFacility
+    ClocalAsRoot
+    PriorityScheduling
+    TagLineFont
+    TagLineFormat
+    QualifyCID
+    QualifyTSI
+
+    AdaptiveAnswer
+    AnswerRotary
+    AnswerBias
+    NoCarrierRetrys
+
+    PercentGoodLines
+    MaxConsecutiveBadLines
+
+    MaxRecvPages
+
+    JobReqBusy
+    JobReqNoCarrier
+    JobReqNoAnswer
+    JobReqNoFConn
+    JobReqDataConn
+    JobReqProto
+    JobReqOther
+    PollModemWait
+    PollLockWait
+    LockDataCalls
+    LockVoiceCalls
+
+    FaxRcvdCmd
+    NotifyCmd
+    PollRcvdCmd
+
+    RingData
+    RingFax
+    RingVoice
+
+    UUCPLockDir
+    UUCPLockTimeout
+    UUCPLockType
+
+    PagerMaxMsgLength
+
+    IXOService
+    IXODeviceID
+    IXOMaxUnknown
+    IXOIDProbe
+    IXOIDTimeout
+    IXOLoginRetries
+    IXOLoginTimeout
+    IXOGATimeout
+    IXOXmitRetries
+    IXOXmitTimeout
+    IXOAckTimeout
+"
+ServerParameters="$RequiredServerParameters $OptionalServerParameters"
+#
+# Default values for server configuration parameters.
+#
+defaultFAXNumber=\"\"
+defaultLocalIdentifier=\"\"
+defaultAreaCode=\"\"
+defaultCountryCode=\"\"
+defaultLongDistancePrefix=\"\"
+defaultInternationalPrefix=\"\"
+defaultDialStringRules=\"\"
+defaultServerTracing=1
+defaultSessionTracing=1
+defaultRecvFileMode=0600
+defaultLogFileMode=0600
+defaultDeviceMode=0600
+defaultRingsBeforeAnswer=0
+defaultSpeakerVolume=quiet
+defaultGettyArgs=\"\"
+defaultQualifyTSI=\"\"
+defaultJobReqBusy=180
+defaultJobReqNoCarrier=300
+defaultJobReqNoAnswer=300
+defaultJobReqNoFConn=300
+defaultJobReqDataConn=300
+defaultJobReqProto=60
+defaultJobReqOther=300
+defaultPollModemWait=30
+defaultPollLockWait=30
+defaultTagLineFont=\"\"
+defaultTagLineFormat="\"From %%n|%c|Page %%P of %%T\""
+defaultPercentGoodLines=95
+defaultMaxConsecutiveBadLines=5
+defaultMaxRecvPages=1000
+defaultLogFacility=daemon
+defaultClocalAsRoot=\"\"
+defaultPriorityScheduling=\"\"
+defaultAdaptiveAnswer=\"\"
+defaultAnswerRotary=\"\"
+defaultAnswerBias=\"\"
+defaultFaxRcvdCmd=\"\"
+defaultNoCarrierRetrys=\"\"
+defaultNotifyCmd=\"bin/notify\"
+defaultPollRcvdCmd=\"\"
+defaultQualifyCID=\"\"
+defaultRingData=\"\"
+defaultRingFax=\"\"
+defaultRingVoice=\"\"
+defaultUUCPLockDir=\"$UUCP_LOCKDIR\"
+defaultUUCPLockTimeout=30
+defaultUUCPLockType=\"$UUCP_LOCKTYPE\"
+defaultLockDataCalls=Yes
+defaultLockVoiceCalls=Yes
+defaultPagerMaxMsgLength=\"\"
+defaultIXOService=\"\"
+defaultIXODeviceID=\"\"
+defaultIXOMaxUnknown=\"\"
+defaultIXOIDProbe=\"\"
+defaultIXOIDTimeout=\"\"
+defaultIXOLoginRetries=\"\"
+defaultIXOLoginTimeout=\"\"
+defaultIXOGATimeout=\"\"
+defaultIXOXmitRetries=\"\"
+defaultIXOXmitTimeout=\"\"
+defaultIXOAckTimeout=\"\"
+
+#
+# Initialize server parameters from the defaults.
+#
+setupServerParameters()
+{
+    for i in $ServerParameters; do
+	eval $i=\$default$i
+    done
+}
+
+#
+# Get server config values from an existing config file.
+#
+getServerParameters()
+{
+    eval `$SED -e 's/[ 	]*#.*$//' \
+	-e "s;\([^:]*\):[ 	]*\(.*\);\1='\2';" $1`
+}
+
+#
+# Echo the configuration lines for those server parameters
+# whose value is different from the default value.  Note
+# that we handle the case where there is embedded whitespace
+# by enclosing the parameter value in quotes.
+#
+echoServerSedCommands()
+{
+    (for i in $RequiredServerParameters; do
+	eval echo \"$i:\$$i:\"
+     done
+     for i in $OptionalServerParameters; do
+	eval echo \"$i:\$$i:\$default$i\"
+     done) | $AWK -F: '
+function p(tag, value)
+{
+    tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8));
+    if (match(value, "^[^\"].*[ ]") == 0)
+	printf "%s:%s%s\\\n", tag, tabs, value
+    else
+	printf "%s:%s\"%s\"\\\n", tag, tabs, value
+}
+BEGIN	{ printf "/^#.*BEGIN-SERVER/,/^#.*END-SERVER/c\\\n" }
+$2 != $3{ p($1, $2) }
+END	{ printf "#\n" }'	# terminate input text to ``c'' command
+}
+
+#
+# Compile a table of configuration parameters prompts into
+# a shell program that can be ``eval'd'' to prompt the user
+# for changes to the current parameter settings.
+#
+compilePrompts()
+{
+    $AWK -F'[	]+' '
+function p(t)
+{
+    printf "promptFor%sParameter \"$%s\" \"%s\";%s=\"$param\"\n", t, $2, $3, $2
+}
+$1 == "#"	{ p("Numeric"); next }
+$1 == "C#"	{ p("CStyleNumeric"); next }
+$1 == "S"	{ p("String"); next }
+$1 == "NNS"	{ p("NonNullString"); next }
+$1 == "B"	{ p("Boolean"); next }
+		{ printf "promptFor%s\n", $1 }
+'
+}
+
+#
+# Prompt the user for volume setting.
+#
+promptForSpeakerVolume()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "Modem speaker volume [$SpeakerVolume]?"; read x
+	if [ "$x" != "" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    case "$x" in
+	    [oO]*)	x=off;;
+	    [lL]*)	x=low;;
+	    [qQ]*)	x=quiet;;
+	    [mM]*)	x=medium;;
+	    [hH]*)	x=high;;
+	    *)
+cat <<EOF
+
+"$x" is not a valid speaker volume setting; use one
+of: "off", "low", "quiet", "medium", and "high".
+
+EOF
+		x="";;
+	    esac
+	else
+	    x="$SpeakerVolume"
+	fi
+    done
+    SpeakerVolume="$x"
+}
+
+#
+# Verify that the fax number, area code, and country
+# code jibe.  Perhaps this is too specific to the USA?
+#
+checkFaxNumber()
+{
+    pat="[\"]*+$CountryCode[-. ]*$AreaCode[-. ]*[0-9][- .0-9]*[\"]*"
+    match=`expr "$FAXNumber" : "\($pat\)"`
+    if [ "$match" != "$FAXNumber" ]; then
+	cat<<EOF
+
+Your facsimile phone number ($FAXNumber) does not agree with your
+country code ($CountryCode) or area code ($AreaCode).  The number
+should be a fully qualified international dialing number of the form:
+
+    +$CountryCode $AreaCode <local phone number>
+
+Spaces, hyphens, and periods can be included for legibility.  For example,
+
+    +$CountryCode.$AreaCode.555.1212
+
+is a possible phone number (using your country and area codes).
+EOF
+	ok=no;
+    fi
+}
+
+#
+# Verify that a number is octal and if not, add a prefixing "0".
+#
+checkOctalNumber()
+{
+    param=$1
+    if [ "`expr "$param" : '\(.\)'`" != 0 ]; then
+	param="0${param}"
+	return 0
+    else
+	return 1
+    fi
+}
+
+checkForLocalFile()
+{
+    f="`echo $1 | $SED 's/\"//g'`"
+    if [ ! -f $SPOOL/$f ]; then
+	cat<<EOF
+
+Warning, the $2 file,
+
+    $SPOOL/$f
+
+does not exist, or is not a plain file.  This file must
+reside in the $SPOOL directory tree.
+EOF
+	ok=no;
+    fi
+}
+
+#
+# Print the current server configuration parameters.
+#
+printServerConfig()
+{
+    (for i in $ServerParameters; do
+	eval echo \"$i:\$$i:\$default$i\"
+    done) | $AWK -F: '
+function p(tag, value)
+{
+    tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8));
+    printf "%s:%s%s\n", tag, tabs, value
+}
+BEGIN	{ printf "\nThe non-default server configuration parameters are:\n\n" }
+$2 != $3{ p($1, $2) }
+END	{ printf "\n" }'
+}
+
+setupServerParameters
+SCHEDCONFIG=$CPATH
+if [ -f $SCHEDCONFIG ]; then
+    echo "Reading scheduler config file $SCHEDCONFIG."
+    echo ""
+    getServerParameters $SCHEDCONFIG
+fi
+if [ -f $CONFIG -o -z "$OLDCONFIG" ]; then
+    OLDCONFIG=$CONFIG
+fi
+if [ -f $OLDCONFIG ]; then
+    echo "Hey, there is an existing config file $OLDCONFIG..."
+    getServerParameters $OLDCONFIG
+    ok="skip"				# skip prompting first time through
+else
+    echo "No existing configuration, let's do this from scratch."
+    echo ""
+    getServerParameters $MODEMCONFIG/skel # get from skeletal file
+    ok="prompt"				# prompt for parameters
+fi
+
+if [ -z "$FAXNumber" ]; then
+    FAXNumber="+$CountryCode $AreaCode 555-1212"
+fi
+
+isOK()
+{
+    x="$1"
+    test -z "$x" -o "$x" = y -o "$x" = yes
+}
+isNotOK()
+{
+    x="$1"
+    test -n "$x" -a "$x" != y -a "$x" != yes
+}
+
+#
+# Prompt user for server-related configuration parameters
+# and do consistency checking on what we get.
+#
+PROMPTS=$TMPDIR/faxpr$$
+JUNK="$JUNK $PROMPTS"
+while isNotOK $ok; do
+    if [ "$ok" != skip ]; then
+	test -f $PROMPTS || compilePrompts>$PROMPTS<<EOF
+#	CountryCode		Country code
+#	AreaCode		Area code
+NNS	FAXNumber		Phone number of fax modem
+S	LocalIdentifier		Local identification string (for TSI/CIG)
+#	LongDistancePrefix	Long distance dialing prefix
+#	InternationalPrefix	International dialing prefix
+NNS	DialStringRules		Dial string rules file (relative to $SPOOL)
+C#	ServerTracing		Tracing during normal server operation
+C#	SessionTracing		Tracing during send and receive sessions
+#	RecvFileMode		Protection mode for received facsimile
+#	LogFileMode		Protection mode for session logs
+#	DeviceMode		Protection mode for $TTY
+#	RingsBeforeAnswer	Rings to wait before answering
+SpeakerVolume
+S	GettyArgs		Command line arguments to getty program
+S	QualifyTSI		\
+	Pathname of TSI access control list file (relative to $SPOOL)
+S	QualifyCID		\
+	Pathname of Caller-ID access control list file (relative to $SPOOL)
+S	TagLineFont		Tag line font file (relative to $SPOOL)
+S	TagLineFormat		Tag line format string
+C#	UUCPLockTimeout		\
+	Time before purging a stale UUCP lock file (secs)
+B	LockDataCalls		Hold UUCP lockfile during inbound data calls
+B	LockVoiceCalls		Hold UUCP lockfile during inbound voice calls
+#	PercentGoodLines	\
+	Percent good lines to accept during copy quality checking
+#	MaxConsecutiveBadLines	\
+	Max consecutive bad lines to accept during copy quality checking
+#	MaxRecvPages		\
+	Max number of pages to accept in a received facsimile
+S	LogFacility		Syslog facility name for ServerTracing messages
+B	ClocalAsRoot		Set UID to 0 to manipulate CLOCAL
+B	PriorityScheduling	Use available priority job scheduling mechanism
+EOF
+	. $PROMPTS
+    fi
+    checkOctalNumber $RecvFileMode &&	RecvFileMode=$param
+    checkOctalNumber $LogFileMode &&	LogFileMode=$param
+    checkOctalNumber $DeviceMode &&	DeviceMode=$param
+    checkForLocalFile $DialStringRules "dial string rules"
+    checkFaxNumber;
+    if [ "$TagLineFont" != "" -a "$TagLineFont" != '""' ]; then
+	checkForLocalFile $TagLineFont "tag line font";
+    fi
+    printServerConfig; prompt "Are these ok [yes]?"; read ok
+done
+
+#
+# We've got all the server-related parameters, now for the modem ones.
+#
+
+cat<<EOF
+
+Now we are going to probe the tty port to figure out the type
+of modem that is attached.  This takes a few seconds, so be patient.
+Note that if you do not have the modem cabled to the port, or the
+modem is turned off, this may hang (just go and cable up the modem
+or turn it on, or whatever).
+EOF
+
+case $TARGET in
+*-sunos*)
+    #
+    # Sun systems have a command for manipulating software
+    # carrier on a terminal line.  Set or reset carrier
+    # according to the type of tty device being used.
+    #
+    case $TTY in
+    tty*) ttysoftcar -y $TTY >/dev/null 2>&1;;
+    cua*) ttysoftcar -n $TTY >/dev/null 2>&1;;
+    esac
+    ;;
+esac
+
+if [ -x ${ONDELAY} ]; then
+    onDev() {
+	if [ "$1" = -c ]; then
+	    shift; catpid=`${ONDELAY} $tdev $SH -c "$* >$OUT" & echo $!`
+	else
+	    ${ONDELAY} $tdev $SH -c "$*"
+	fi
+    }
+else
+cat<<'EOF'
+
+The "ondelay" program to open the device without blocking is not
+present.  We're going to try to continue without it; let's hope that
+the serial port won't block waiting for carrier...
+EOF
+    onDev() {
+	if [ "$1" = -c ]; then
+	    shift; catpid=`$SH <$tdev >$tdev -c "$* >$OUT" & echo $!`
+	else
+	    $SH <$tdev >$tdev -c "$*"
+	fi
+    }
+fi
+
+STTY=`ttyStty $tdev`				# appropriate stty cmd
+
+#
+# Send each command in SendString to the modem and collect
+# the result in $OUT.  Read this very carefully.  It's got
+# a lot of magic in it!
+#
+SendToModem()
+{
+    COMMAND=$*
+    sleep 1					# wait for previous kill
+    case $TARGET in
+    *-linux*)	;;
+    *)	onDev $STTY 0; sleep 1	;;		# reset the modem (hopefully)
+    esac
+						# start listening for output
+    onDev -c "$STTY clocal && exec $CAT $tdev"; sleep 2
+    #
+    # NB: eof is set to ^A so that only 1 character is needed
+    #     for a pending read on HPUX systems
+    #
+    onDev $STTY -echo -icrnl -ixon -ixoff -isig eof '"^A"' clocal $SPEED;
+	sleep 1
+    # NB: merging \r & ATQ0 causes some modems problems
+    printf "\r" >$tdev; sleep 1;		# force consistent state
+    printf "ATQ0V1E1\r" >$tdev; sleep 1;	# enable echo and result codes
+    for i in $COMMAND; do
+	printf "$i\r" >$tdev; sleep 1;
+    done
+    kill -9 $catpid; catpid=
+    # NB: [*&\\\\$] must have the "$" last for AIX (yech)
+    pat=`echo "$i"|$SED -e 's/[*&\\\\$]/\\\\&/g'` # escape regex metacharacters
+    RESPONSE=`tr -ds '\015' '\012' < $OUT | \
+	$SED -n "/$pat/{n;s/ *$//;p;q;}" | $SED 's/+F.*=//'`
+}
+
+echo ""
+if [ -z "$SPEED" ]; then
+    #
+    # Probe for the highest speed at which the modem
+    # responds to "AT" with "OK".
+    #
+    printf "Probing for best speed to talk to modem:"
+    SPEEDS=`ttySpeeds $tdev`			# set of speeds for auto-bauding
+    for SPEED in $SPEEDS
+    do
+	printf " $SPEED"
+	SendToModem AT >/dev/null 2>&1
+	sleep 1
+	RESULT=`tr -ds '\015' '\012' < $OUT | tail -1`
+	test "$RESULT" = OK && break;
+    done
+    if [ "$RESULT" != OK ]; then
+	echo ""
+	echo "Unable to deduce DTE-DCE speed; check that you are using the"
+	echo "correct device and/or that your modem is setup properly.  If"
+	echo "all else fails, try the -s option to lock the speed."
+	exit 1
+    fi
+    echo " OK."
+else
+    echo "Using user-specified $SPEED to talk to modem."
+fi
+RESULT="";
+while [ -z "$RESULT" ]; do
+    #
+    # This goes in the background while we try to
+    # reset the modem.  If something goes wrong, it'll
+    # nag the user to check on the problem.
+    #
+    (trap 0 1 2 15;
+     while true; do
+	sleep 10;
+	echo ""
+	echo "Hmm, something seems to be hung, check your modem eh?"
+     done)& nagpid=$!
+    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; kill $nagpid \$catpid; exit 1" 0 1 2 15
+    SendToModem "AT+FCLASS=?" 			# ask for class support
+
+    exec 3>&2 2> /dev/null  # Mute stderr against child death
+    kill $nagpid
+    wait $nagpid            # Really waits its end
+    exec 2>&3 3>&-          # Restore stderr
+
+    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 1" 0 1 2 15
+    sleep 1
+
+    RESULT=`tr -ds '\015' '\012' < $OUT | tail -1`
+    if [ -z "$RESPONSE" ]; then
+	echo ""
+	echo "There was no response from the modem.  Perhaps the modem is"
+	echo "turned off or the cable between the modem and host is not"
+	echo "connected.  Please check the modem and hit a carriage return"
+	prompt "when you are ready to try again:"
+	read x
+    fi
+done
+
+ModemType="" Manufacturer="" Model="" ProtoType=skel
+
+#
+# Initialize desired flow control scheme
+# according to the device name (if it's
+# meaningful).  Otherwise, setup to use any
+# default flow control defined in the prototype
+# configuration file.
+#
+FlowControl=default
+case $TARGET in
+*-irix*)
+    case $TTY in
+    ttym${PORT}) FlowControl=xonxoff;;
+    ttyf${PORT}) FlowControl=rtscts;;
+    esac
+    ;;
+esac
+
+#
+# Prompt the user for a flow control scheme.
+#
+promptForFlowControlParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    case "$x" in
+	    xon*|XON*)	x=xonxoff;;
+	    rts*|RTS*)	x=rtscts;;
+	    def*|DEF*)	x=default;;
+	    *)
+cat <<EOF
+
+"$x" is not a valid flow control parameter setting; use one of:
+
+xonxoff		for software flow control
+rtscts		for hardware flow control
+default		for whatever is set in a prototype config file
+
+Note that this setting defines the scheme to use when sending
+and receiving facsimile.  Many modems do not support hardware
+flow control during fax operation though they do support it for
+data communication.
+
+EOF
+		x="";;
+	    esac
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+getFlowControlConfig()
+{
+    promptForFlowControlParameter "$FlowControl" "DTE-DCE flow control scheme"
+    case "$param" in
+    xon*|XON*) FlowControl=XONXOFF;;
+    rts*|RTS*) FlowControl=RTSCTS;;
+    def*|DEF*) FlowControl=DEFAULT;;
+    esac
+}
+
+#
+# Select a configuration file for a modem based on the
+# deduced modem type.  Each routine below sends a set
+# of commands to the modem to figure out the modem model
+# and manufacturer and then compares them against the
+# set of known values in associated config files.
+# Note that this is done with a tricky bit of shell
+# hacking--generating a case statement that is then
+# eval'd with the result being the setup of the
+# ProtoType shell variable.
+#
+configureClass2Modem()
+{
+    ModemType=Class2
+    echo "Hmm, this looks like a Class 2 modem."
+
+    SendToModem "AT+FCLASS=2" "AT+FMFR?"
+    Manufacturer=$RESPONSE
+    echo "Modem manufacturer is \"$Manufacturer\"."
+
+    SendToModem "AT+FCLASS=2" "AT+FMDL?"
+    Model=$RESPONSE
+    echo "Modem model is \"$Model\"."
+
+    getFlowControlConfig
+
+    eval `(cd $MODEMCONFIG; \
+	$GREP 'CONFIG:[ 	]*CLASS2' $CONFIG_LIST |\
+	$AWK -F: '
+	    BEGIN { print "case \"$Manufacturer-$Model-$FlowControl\" in" }
+	    FILENAME ~ /^OLD/ { next }
+	    FILENAME ~ /^config\./ { next }
+	    { print $4 ") ProtoType=" $1 ";;" }
+	    END { print "*) ProtoType=class2;;"; print "esac" }
+	')`
+}
+
+#
+# As above, but for Class 2.0 modems.
+#
+configureClass2dot0Modem()
+{
+    ModemType=Class20
+    echo "Hmm, this looks like a Class 2.0 modem."
+    #
+    SendToModem "AT+FCLASS=2.0" "AT+FMI?"
+    Manufacturer=$RESPONSE
+    echo "Modem manufacturer is \"$Manufacturer\"."
+
+    SendToModem "AT+FCLASS=2.0" "AT+FMM?"
+    Model=$RESPONSE
+    echo "Modem model is \"$Model\"."
+
+    getFlowControlConfig
+
+    eval `(cd $MODEMCONFIG; \
+	$GREP 'CONFIG:[ 	]*CLASS2.0' $CONFIG_LIST |\
+	$AWK -F: '
+	    BEGIN { print "case \"$Manufacturer-$Model-$FlowControl\" in" }
+	    FILENAME ~ /^OLD/ { next }
+	    FILENAME ~ /^config\./ { next }
+	    { print $4 ") ProtoType=" $1 ";;" }
+	    END { print "*) ProtoType=class2.0;;"; print "esac" }
+	')`
+}
+
+#
+# Class 1 modems are handled a bit differently as
+# there are no commands to obtain the manufacturer
+# and model.  Instead we use ATI0 to get the product
+# code and then compare it against the set of known
+# values in the config files.
+#
+configureClass1Modem()
+{
+    ModemType=Class1 Manufacturer=Unknown Model=Unknown
+    echo "Hmm, this looks like a Class 1 modem."
+
+    SendToModem "ATI0"; CODE="$RESPONSE"
+    echo "Product code (ATI0) is \"$CODE\"."
+    SendToModem "ATI3"; INFO="$RESPONSE"
+    echo "Other information (ATI3) is \"$INFO\"."
+
+    getFlowControlConfig
+
+    eval `(cd $MODEMCONFIG; $GREP 'CONFIG:[ 	]*CLASS1' $CONFIG_LIST) |\
+	$SED 's/:[ 	]*/:/g' |\
+	$AWK -F: '
+BEGIN	{ proto = "" }
+FILENAME ~ /^OLD/ { next }
+FILENAME ~ /^config\./ { next }
+C == $4 && I ~ $5 && F ~ $6 {
+	  if (proto != "") {
+	      print "echo \"Warning, multiple configuration files exist for this modem,\";"
+	      print "echo \"   the file " $1 " is ignored.\";"
+	  } else
+	      proto = $1 " " $7;
+	}
+END	{ if (proto == "")
+	      proto = "class1"
+	  print "ProtoType=" proto
+	}
+	' C="$CODE" I="$INFO" F="$FlowControl" -`
+    echo "Modem manufacturer is \"$Manufacturer\"."
+    echo "Modem model is \"$Model\"."
+}
+
+configureClass1and2Modem()
+{
+    echo "This modem looks to have support for both Class 1 and 2;"
+    prompt "how should it be configured [1]?"
+    x=""
+    while [ "$x" != 1 -a "$x" != 2 ]; do
+	read x
+	case "$x" in
+	1|2)	;;
+	?*)	echo ""
+	        prompt "Configure as Class 1 or 2 [1]?";;
+	*)	x=1;;
+	esac
+    done
+    echo ""
+    case $x in
+    1) configureClass1Modem;;
+    2) configureClass2Modem;;
+    esac
+}
+
+configureClass1and2dot0Modem()
+{
+    echo "This modem looks to have support for both Class 1 and 2.0;"
+    prompt "how should it be configured [1]?"
+    x=""
+    while [ "$x" != 1 -a "$x" != 2.0 ]; do
+	read x
+	case "$x" in
+	1|2.0)	;;
+	?*)	echo ""
+	        prompt "Configure as Class 1 or 2.0 [1]?";;
+	*)	x=1;;
+	esac
+    done
+    echo ""
+    case $x in
+    1)   configureClass1Modem;;
+    2.0) configureClass2dot0Modem;;
+    esac
+}
+
+configureClass2and2dot0Modem()
+{
+    echo "This modem looks to have support for both Class 2 and 2.0;"
+    prompt "how should it be configured [2]?"
+    x=""
+    while [ "$x" != 2 -a "$x" != 2.0 ]; do
+	read x
+	case "$x" in
+	2|2.0)	;;
+	?*)	echo ""
+	        prompt "Configure as Class 2 or 2.0 [2]?";;
+	*)	x=2;;
+	esac
+    done
+    echo ""
+    case $x in
+    2)   configureClass2Modem;;
+    2.0) configureClass2dot0Modem;;
+    esac
+}
+
+configureClass1and2and2dot0Modem()
+{
+    echo "This modem looks to have support for both Class 1, 2 and 2.0;"
+    prompt "how should it be configured [1]?"
+    x=""
+    while [ "$x" != 1 -a "$x" != 2 -a "$x" != 2.0 ]; do
+	read x
+	case "$x" in
+	1|2|2.0)	;;
+	?*)	echo ""
+	        prompt "Configure as Class 1, 2 or 2.0 [1]?";;
+	*)	x=1;;
+	esac
+    done
+    echo ""
+    case $x in
+    1)   configureClass1Modem;;
+    2)   configureClass2Modem;;
+    2.0) configureClass2dot0Modem;;
+    esac
+}
+
+giveup()
+{
+    echo "The result of the AT+FCLASS=? command was:"
+    echo ""
+    cat $OUT
+    cat<<EOF
+
+We were unable to deduce what type of modem you have.  This means that
+it did not respond as a Class 1, Class 2, or Class 2.0 modem should.
+If you believe that your modem conforms to the Class 1, Class 2, or
+Class 2.0 interface specification, then check that the modem is
+operating properly and that you can communicate with the modem from the
+host.  If your modem is not one of the above types of modems, then this
+software does not support it and you will need to write a driver that
+supports it.
+
+EOF
+    exit 1
+}
+
+echo ""
+if [ "$RESULT" = "OK" ]; then
+    # Looks like a Class 1, 2, or 2.0 modem, get more information
+    case "`echo $RESPONSE | $SED -e 's/[()]//g'`" in
+    1)			configureClass1Modem;;
+    2)			configureClass2Modem;;
+    2.0)		configureClass2dot0Modem;;
+    0,1)		configureClass1Modem;;
+    0,2)		configureClass2Modem;;
+    0,2.0)		configureClass2dot0Modem;;
+    1,2)		configureClass1and2Modem;;
+    1,2.0)		configureClass1and2dot0Modem;;
+    2,2.0)		configureClass2and2dot0Modem;;
+    0,1,2)		configureClass1and2Modem;;
+    0,1,2.0)		configureClass1and2dot0Modem;;
+    0,2,2.0)		configureClass2and2dot0Modem;;
+    1,2,2.0)		configureClass1and2and2dot0Modem;;
+    0,1,2,2.0)		configureClass1and2and2dot0Modem;;
+    0,1,2,2.0,*)	configureClass1and2and2dot0Modem;;
+    0,1,1.0,2,2.0,*)	configureClass1and2and2dot0Modem;;
+    0,1,1.0,2,*)	configureClass1and2Modem;;
+    1,2,2.0,*)		configureClass1and2and2dot0Modem;;
+    0,2,2.0,*)		configureClass2and2dot0Modem;;
+    0,1,2.0,*)		configureClass1and2dot0Modem;;
+    0,1,2,*)		configureClass1and2Modem;;
+    2,2.0,*)		configureClass2and2dot0Modem;;
+    1,2.0,*)		configureClass1and2dot0Modem;;
+    1,2,*)		configureClass1and2Modem;;
+    0,2.0,*)		configureClass2dot0Modem;;
+    0,2,*)		configureClass2Modem;;
+    0,1,*)		configureClass1Modem;;
+    2.0,*)		configureClass2dot0Modem;;
+    2,*)		configureClass2Modem;;
+    1,*)		configureClass1Modem;;
+    *)			giveup;;
+    esac
+else
+    giveup
+fi
+
+#
+# Given a modem type, manufacturer and model, select
+# a prototype configuration file to work from.
+#
+echo ""
+echo "Using prototype configuration file $ProtoType..."
+proto=$MODEMCONFIG/$ProtoType
+if [ ! -f $proto ]; then
+    echo "Uh oh, I can't find the prototype file"
+    echo ""
+    echo "\"$proto\""
+    echo ""
+    if [ "$ProtoType" != "skel" ]; then
+        prompt "Do you want to continue using the skeletal configuration file [yes]?"
+        read x
+	isOK $x || exit 1
+	ProtoType=skel;
+	proto=$MODEMCONFIG/$ProtoType;
+	if [ ! -f $proto ]; then
+	    cat<<EOF
+
+Sigh, the skeletal configuration file is not available either.  There
+is nothing that I can do without some kind of prototype config file;
+I'm bailing out...
+EOF
+	    exit 1
+	fi
+    else
+	echo "There is nothing more that I can do; I'm bailing out..."
+	exit 1
+    fi
+fi
+
+#
+# Prompt the user for an AT-style command.
+#
+promptForATCmdParameter()
+{
+    prompt "$2 [$1]?"; read x
+    if [ "$x" ]; then
+	# strip leading and trailing white space, quote marks;
+	# redouble any backslashes lost through shell processing
+	x=`echo "$x" | $SED \
+	    -e 's/^[ 	]*//' \
+	    -e 's/[ 	]*$//' \
+	    -e 's/\"//g' -e 's/\\\\/&&/g'`
+    else
+	x="$1"
+    fi
+    param="$x"
+}
+
+#
+# Prompt the user for a bit order.
+#
+promptForBitOrderParameter()
+{
+    x=""
+    while [ -z "$x" ]; do
+	prompt "$2 [$1]?"; read x
+	if [ "$x" ]; then
+	    # strip leading and trailing white space
+	    x=`echo "$x" | $SED -e 's/^[ 	]*//' -e 's/[ 	]*$//'`
+	    case "$x" in
+	    [lL]*)	x=LSB2MSB;;
+	    [mM]*)	x=MSB2LSB;;
+	    *)
+cat <<EOF
+
+"$x" is not a valid bit order parameter setting; use one of:
+
+lsb2msb		for x86-style machines
+msb2lsb		for other machines
+
+EOF
+		x="";;
+	    esac
+	else
+	    x="$1"
+	fi
+    done
+    param="$x"
+}
+
+ModemParameters="
+    ModemAnswerAnyCmd
+    ModemAnswerCmd
+    ModemAnswerDataBeginCmd
+    ModemAnswerDataCmd
+    ModemAnswerFaxBeginCmd
+    ModemAnswerFaxCmd
+    ModemAnswerResponseTimeout
+    ModemAnswerVoiceBeginCmd
+    ModemAnswerVoiceCmd
+    ModemBaudRateDelay
+    ModemClassQueryCmd
+    ModemCommaPauseTimeCmd
+    ModemDialCmd
+    ModemDialResponseTimeout
+    ModemEchoOffCmd
+    ModemFlowControl
+    ModemFrameFillOrder
+    ModemHardFlowCmd
+    ModemAtCmdDelay
+    ModemMfrQueryCmd
+    ModemModelQueryCmd
+    ModemNoAutoAnswerCmd
+    ModemNoFlowCmd
+    ModemOnHookCmd
+    ModemPageDoneTimeout
+    ModemPageStartTimeout
+    ModemRate
+    ModemRecvFillOrder
+    ModemResetCmds
+    ModemResetDelay
+    ModemResultCodesCmd
+    ModemRevQueryCmd
+    ModemSendBeginCmd
+    ModemSendFillOrder
+    ModemSetVolumeCmd
+    ModemSetupAACmd
+    ModemSetupDCDCmd
+    ModemSetupDTRCmd
+    ModemSoftFlowCmd
+    ModemSoftResetCmd
+    ModemSoftResetCmdDelay
+    ModemVerboseResultsCmd
+    ModemWaitForConnect
+    ModemWaitTimeCmd
+
+    FaxT1Timer
+    FaxT2Timer
+    FaxT4Timer
+
+    Class0Cmd
+
+    PagerSetupCmds
+"
+Class1Parameters="
+    Class1Cmd
+    Class1NFLOCmd
+    Class1HFLOCmd
+    Class1SFLOCmd
+    Class1PPMWaitCmd
+    Class1TCFWaitCmd
+    Class1EOPWaitCmd
+    Class1FrameOverhead
+    Class1RecvAbortOK
+    Class1RecvIdentTimer
+    Class1SendMsgDelay
+    Class1SwitchingDelay
+    Class1TCFMaxNonZero
+    Class1TCFMinRun
+    Class1TCFRecvTimeout
+    Class1TCFResponseDelay
+    Class1TrainingRecovery
+"
+Class2Parameters="
+    Class2AbortCmd
+    Class2BORCmd
+    Class2BUGCmd
+    Class2CIGCmd
+    Class2CQCmd
+    Class2CQQueryCmd
+    Class2CRCmd
+    Class2Cmd
+    Class2DCCCmd
+    Class2DCCQueryCmd
+    Class2DISCmd
+    Class2DDISCmd
+    Class2LIDCmd
+    Class2NRCmd
+    Class2PHCTOCmd
+    Class2PIECmd
+    Class2PTSCmd
+    Class2RecvDataTrigger
+    Class2RELCmd
+    Class2SendRTC
+    Class2SPLCmd
+    Class2TBCCmd
+    Class2XmitWaitForXON
+    Class2NFLOCmd
+    Class2HFLOCmd
+    Class2SFLOCmd
+"
+
+#
+# Get the default modem parameter values
+# from the prototype configuration file.
+#
+getModemProtoParameters()
+{
+    eval `$SED -e 's/[ 	]*#.*$//' \
+	 -e "s;\([^:]*\):[ 	]*\(.*\);proto\1='\2'\;\1='\2';" $1`
+}
+
+#
+# Setup the sed commands for crafting the configuration file:
+#
+echoModemSedCommands()
+{
+    ModemCmds=""
+
+    (for i in $ModemParameters; do
+	eval echo \"$i:\$$i:\$proto$i\"
+    done
+    case "$ModemType" in
+    Class1*)
+	for i in $Class1Parameters; do
+	    eval echo \"$i:\$$i:\$proto$i\"
+	done
+	;;
+    Class2*)
+	for i in $Class2Parameters; do
+	    eval echo \"$i:\$$i:\$proto$i\"
+	done
+	;;
+    esac) | $AWK -F: '
+function p(tag, value)
+{
+    if (match(value, "^[^\"].*[ ]") == 0)
+	printf "/^%s:/s/\\(:[ 	]*\\).*/\\1%s/\n", tag, value
+    else
+	printf "/^%s:/s/\\(:[ 	]*\\).*/\\1\"%s\"/\n", tag, value
+}
+$2 != $3{ p($1, $2) }
+END	{ printf "/CONFIG:/d\n" }'
+}
+
+#
+# Check if the configured flow control scheme is
+# consistent with the tty device being used.
+#
+checkFlowControlAgainstTTY()
+{
+    case "$ModemFlowControl" in
+    xonxoff|XONXOFF)
+	if [ "$TTY" = ttyf${PORT} -a -c /dev/ttym${PORT} ]; then
+	    echo ""
+	    echo "Warning, the modem is setup to use software flow control,"
+	    echo "but the \"$TTY\" device is used with hardware flow control"
+	    prompt "Do you want to use \"ttym${PORT}\" instead [yes]?"
+	    read x
+	    if isOK $x; then
+		TTY="ttym${PORT}"
+		DEVID="`echo $TTY | tr '/' '_'`"
+		CONFIG=$CPATH.$DEVID
+	    fi
+	fi
+	;;
+    rtscts|RTSCTS)
+	if [ "$TTY" = ttym${PORT} -a -c /dev/ttyf${PORT} ]; then
+	    echo ""
+	    echo "Warning, the modem is setup to use hardware flow control,"
+	    echo "but the \"$TTY\" device does not honor the RTS/CTS signals."
+	    prompt "Do you want to use \"ttyf${PORT}\" instead [yes]?"
+	    read x
+	    if isOK $x; then
+		TTY="ttyf${PORT}"
+		DEVID="`echo $TTY | tr '/' '_'`"
+		CONFIG=$CPATH.$DEVID
+	    fi
+	fi
+	;;
+    esac
+}
+
+#
+# Print the current modem-related parameters.
+#
+printModemConfig()
+{
+    (for i in $ModemParameters; do
+	eval echo \"$i:\$$i:\$proto$i\"
+    done
+    case "$ModemType" in
+    Class1*)
+	for i in $Class1Parameters; do
+	    eval echo \"$i:\$$i:\$proto$i\"
+	done
+	;;
+    Class2*)
+	for i in $Class2Parameters; do
+	    eval echo \"$i:\$$i:\$proto$i\"
+	done
+	;;
+    esac) | $AWK -F: '
+function p(tag, value)
+{
+    tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8));
+    printf "%s:%s%s\n", tag, tabs, value
+}
+BEGIN	{ printf "\nThe modem configuration parameters are:\n\n" }
+$3 != ""{ p($1, $2) }
+END	{ printf "\n" }'
+}
+
+promptFor()
+{
+    eval test \"\$proto$2\" && {
+	eval promptFor${1}Parameter \"\$$2\" \"$3\";
+	eval $2=\"\$param\";
+    }
+}
+
+#
+# Compile a table of configuration parameters prompts into
+# a shell program that can be ``eval'd'' to prompt the user
+# for changes to the current parameter settings.
+#
+compileModemPrompts()
+{
+    $AWK -F'[	]+' '
+function p(t)
+{
+    printf "test -n \"$proto%s\" && { promptFor%sParameter \"$%s\" \"%s\";%s=\"$param\"; }\n", $2, t, $2, $3, $2
+}
+$1 == "#"	{ p("Numeric"); next }
+$1 == "C#"	{ p("CStyleNumeric"); next }
+$1 == "S"	{ p("String"); next }
+$1 == "NNS"	{ p("NonNullString"); next }
+$1 == "BO"	{ p("BitOrder"); next }
+$1 == "FC"	{ p("FlowControl"); next }
+$1 == "B"	{ p("Boolean"); next }
+$1 == "AT"	{ p("ATCmd"); next }
+		{ print }
+'
+}
+
+#
+# Build the script that prompts the user to edit the current
+# modem configuration parameters.  Note that we can only edit
+# parameters that are in the prototype config file; thus all
+# the checks to see if the prototype value exists.
+#
+buildModemPrompts()
+{
+    compileModemPrompts<<EOF
+AT	ModemAnswerCmd		Command for answering the phone
+AT	ModemAnswerAnyCmd	Command for answering any type of call
+AT	ModemAnswerDataCmd	Command for answering a data call
+AT	ModemAnswerFaxCmd	Command for answering a fax call
+AT	ModemAnswerVoiceCmd	Command for answering a voice call
+AT	ModemAnswerDataBeginCmd	Command for start of a data call
+AT	ModemAnswerFaxBeginCmd	Command for start of a fax call
+AT	ModemAnswerVoiceBeginCmd	Command for start of a voice call
+#	ModemAnswerResponseTimeout	Answer command response timeout (ms)
+#	ModemBaudRateDelay	Delay after setting tty baud rate (ms)
+AT	ModemClassQueryCmd	Command to query modem services
+AT	ModemCommaPauseTimeCmd	\
+	Command for setting time to pause for \",\" in dialing string
+AT	ModemDialCmd		Command for dialing (%s for number to dial)
+#	ModemDialResponseTimeout	Dialing command response timeout (ms)
+AT	ModemEchoOffCmd		Command for disabling command echo
+FC	ModemFlowControl	DTE-DCE flow control scheme
+BO	ModemFrameFillOrder	Bit order for HDLC frames
+AT	ModemHardFlowCmd	\
+	Command for setting DCE-DTE hardware flow control
+#	ModemAtCmdDelay		Delay before sending each modem AT cmd (ms)
+AT	ModemMfrQueryCmd	Command for querying modem manufacture
+AT	ModemModelQueryCmd	Command for querying modem model
+AT	ModemNoAutoAnswerCmd	Command for disabling auto-answer
+AT	ModemNoFlowCmd		Command for disabling DCE-DTE flow control
+AT	ModemOnHookCmd		Command for placing phone \"on hook\" (hangup)
+#	ModemPageDoneTimeout	Page send/receive timeout (ms)
+#	ModemPageStartTimeout	Page send/receive timeout (ms)
+#	ModemRate		DTE-DCE communication baud rate
+BO	ModemRecvFillOrder	\
+	Bit order that modem sends received facsimile data
+AT	ModemResetCmds		Additional commands for resetting the modem
+#	ModemResetDelay		Delay after sending modem reset commands (ms)
+AT	ModemResultCodesCmd	Command for enabling result codes
+AT	ModemRevQueryCmd	Command for querying modem firmware revision
+BO	ModemSendFillOrder	\
+	Bit order that modem expects for transmitted facsimile data
+AT	ModemSetVolumeCmd	Commands for setting modem speaker volume levels
+AT	ModemSetupAACmd		Command for setting up adaptive-answer
+AT	ModemSetupDCDCmd	Command for setting up DCD handling
+AT	ModemSetupDTRCmd	Command for setting up DTR handling
+AT	ModemSoftFlowCmd	\
+	Command for setting DCE-DTE software flow control
+AT	ModemSoftResetCmd	Command for doing a soft reset
+#	ModemSoftResetCmdDelay	Time in ms to pause after a soft reset
+AT	ModemVerboseResultsCmd	Command for enabling verbose result codes
+B	ModemWaitForConnect	\
+	Force server to wait for \"CONNECT\" response on answer
+AT	ModemWaitTimeCmd	\
+	Command for setting time to wait for carrier when dialing
+#	FaxT1Timer		CCITT T.30 T1 timer (ms)
+#	FaxT2Timer		CCITT T.30 T2 timer (ms)
+#	FaxT4Timer		CCITT T.30 T4 timer (ms)
+AT	Class0Cmd		Command to enter Class 0
+EOF
+    case "$ModemType" in
+    Class1*)
+	compileModemPrompts<<EOF
+AT	Class1Cmd		Command to enter Class 1
+AT	Class1NFLOCmd		\
+	Command to setup no flow control after switch to Class 1
+AT	Class1HFLOCmd		\
+	Command to setup hardware flow control after switch to Class 1
+AT	Class1SFLOCmd		\
+	Command to setup software flow control after switch to Class 1
+AT	Class1PPMWaitCmd	\
+	Command to stop and wait prior to sending PPM
+AT	Class1TCFWaitCmd	\
+	Command to stop and wait prior to sending TCF
+AT	Class1EOPWaitCmd	\
+	Command to stop and wait prior to sending EOP
+#	Class1FrameOverhead	Extra bytes in a received HDLC frame
+#	Class1RecvAbortOK	\
+	Maximum time to wait for OK after aborting a receive (ms)
+#	Class1RecvIdentTimer	\
+	Maximum wait for initial identification frame (ms)
+#	Class1SendMsgDelay	Delay after completing training (ms)
+#	Class1SwitchingDelay	Delay in switching transmission direction (ms)
+#	Class1TCFRecvTimeout	Timeout for receiving TCF (ms)
+#	Class1TCFResponseDelay	Delay before sending DCS and TCF (ms)
+#	Class1TrainingRecovery	Delay after failed training (ms)
+EOF
+	;;
+    Class2*)
+	compileModemPrompts<<EOF
+AT	Class2Cmd		Command to enter $ModemType
+AT	Class2NFLOCmd	\
+	Command to setup no flow control after switch to $ModemType
+AT	Class2HFLOCmd	\
+	Command to setup hardware flow control after switch to $ModemType
+AT	Class2SFLOCmd	\
+	Command to setup software flow control after switch to $ModemType
+AT	Class2AbortCmd		Command to abort an active session
+AT	Class2BORCmd		Command to setup data bit order
+AT	Class2BUGCmd		Command to enable HDLC frame tracing
+AT	Class2CIGCmd		Command to set polling identifer
+AT	Class2CQCmd		Command to setup copy quality parameters
+AT	Class2CRCmd		Command to enable receive capability
+AT	Class2DCCCmd		Command to set/constrain modem capabilities
+AT	Class2DCCQueryCmd	Command to query modem capabilities
+AT	Class2DISCmd		Command to set session parameters
+AT	Class2LIDCmd		Command to set local identifier string
+AT	Class2NRCmd		Command to enable status reporting
+AT	Class2PHCTOCmd		Command to set Phase C timeout
+AT	Class2PIECmd		Command to disable procedure interrupt handling
+AT	Class2RELCmd		Command to receive byte-aligned EOL codes
+AT	Class2RecvDataTrigger	Character sent before receiving page data
+AT	Class2SPLCmd		Command to set polling request
+AT	Class2TBCCmd		Command to enable DTE-DCE stream comm. mode
+B	Class2XmitWaitForXON	Wait for XON before sending page data
+EOF
+	;;
+    esac
+}
+
+#
+# Construct the configuration file.
+#
+case $ProtoType in
+skel|class*)
+    # Go through each important parameter (sigh)
+    cat<<EOF
+
+There is no prototype configuration file for your modem, so we will
+have to fill in the appropriate parameters by hand.  You will need the
+manual for how to program your modem to do this task.  In case you are
+uncertain of the meaning of a configuration parameter you should
+consult the config(@MANNUM4_5@) manual page for an explanation.
+
+Note that modem commands must be specified exactly as they are to be
+sent to the modem.  Note also that quote marks (") will not be displayed
+and will automatically be deleted.  You can use this facility to supply
+null parameters as "".
+
+Finally, beware that the set of parameters is long.  If you prefer to
+use your favorite editor instead of this script you should fill things
+in here as best you can and then edit the configuration file
+
+"$CONFIG"
+
+after completing this procedure.
+
+EOF
+    ok=no;;
+*)  ok=skip;;
+esac
+
+getModemProtoParameters $proto
+#
+# Override any default flow control setting
+# in the prototype configuration file.
+#
+case $FlowControl in
+RTS*)	ModemFlowControl=rtscts;;
+XON*)	ModemFlowControl=xonxoff;;
+esac
+rm -f $PROMPTS
+while isNotOK $ok; do
+    if [ "$ok" != skip ]; then
+	test -f $PROMPTS || buildModemPrompts>$PROMPTS
+	. $PROMPTS
+    fi
+    printModemConfig
+    case $TARGET in
+    *-irix*)	checkFlowControlAgainstTTY;;
+    esac
+    #
+    # XXX not sure what kind of consistency checking that can
+    # be done w/o knowing more about the modem...
+    #
+    prompt "Are these ok [yes]?"; read ok
+done
+TMPSED=$TMPDIR/faxsed$$; JUNK="$JUNK $TMPSED"
+(echoServerSedCommands; echoModemSedCommands)>$TMPSED
+
+#
+# All done with the prompting; edit up a config file!
+#
+echo ""
+echo "Creating new configuration file $CONFIG..."
+JUNK="$JUNK $CONFIG.new"
+if $SED -f $TMPSED $proto >$CONFIG.new; then
+    if cmp -s $CONFIG.new $CONFIG >/dev/null 2>&1; then
+	echo "...nothing appears to have changed; leaving the original file."
+	$RMCMD $CONFIG.new
+    else
+	if [ -f $CONFIG ]; then
+	    echo "...saving current file as $CONFIG.sav."
+	    mv $CONFIG $CONFIG.sav
+	fi
+	$MV $CONFIG.new $CONFIG
+	$CHOWN $FAX $CONFIG
+	$CHGRP $faxGID $CONFIG
+	$CHMOD 644 $CONFIG
+    fi
+else
+    echo ""
+    echo "*** Sorry, something went wrong building $CONFIG.new."
+    echo "*** The original config file is unchanged; I'm terminating before"
+    echo "***    I do something stupid."
+    echo ""
+    exit 1
+fi
+
+#
+# Create FIFO.<tty> special file and remove any old one.
+#
+FIFO=$SPOOL/FIFO.$DEVID
+test -p $FIFO || {
+    prompt "Creating fifo $FIFO for faxgetty..."
+    if (mkfifo $FIFO) >/dev/null 2>&1; then
+	echo "done."
+    elif (mknod $FIFO p) >/dev/null 2>&1; then
+	echo "done."
+    else
+	echo ""
+	echo "*** Unable to create fifo \"$FIFO\"; terminating."
+	exit 1
+    fi
+}
+$CHOWN $FAX $FIFO; $CHGRP $faxGID $FIFO; $CHMOD 600 $FIFO
+if [ "$OLDFIFO" ]; then
+    echo "Removing old fifo $OLDFIFO.";
+    $RMCMD $OLDFIFO;
+fi
+
+echo "Done setting up the modem configuration."
+
+echo ""
+
+#
+# Configuration parameters specific to scheduler operation.
+# Required parameters are *always* emitted in the created
+# configuration file; optional parameters are emitted
+# only if the configured value differs from the default
+# value known to be used by the server.
+#
+# NB: the order of some parameters is important; e.g.
+#     DialStringRules must be after AreaCode and CountryCode.
+#
+RequiredSchedulerParameters="
+    LogFacility
+    CountryCode
+    AreaCode
+    LongDistancePrefix
+    InternationalPrefix
+    DialStringRules
+    ServerTracing
+"
+OptionalSchedulerParameters="
+    ContCoverPage
+    ContCoverCmd
+    DestControls
+    MaxConcurrentJobs
+    MaxDials
+    MaxSendPages
+    MaxTries
+    ModemGroup
+    PostScriptTimeout
+    PS2FaxCmd
+    SendFaxCmd
+    SendPageCmd
+    SendUUCPCmd
+    SessionTracing
+    TimeOfDay
+    Use2D
+"
+defaultContCoverPage=
+defaultContCoverCmd=\"bin/mkcover\"
+defaultDestControls=
+defaultMaxConcurrentJobs=1
+defaultMaxDials=12
+defaultMaxSendPages=0xffffffff
+defaultMaxTries=3
+defaultModemGroup=
+defaultPostScriptTimeout=180
+defaultPS2FaxCmd=\"bin/ps2fax\"
+defaultSendFaxCmd=\"bin/faxsend\"
+defaultSendPageCmd=\"bin/pagesend\"
+defaultSendUUCPCmd=\"bin/uucpsend\"
+defaultSessionTracing=0xffffffff
+defaultTimeOfDay=\"Any\"
+defaultUse2D=Yes
+#
+# NB: these defaults are set above
+#
+OptionalParameters="
+    $OptionalSchedulerParameters
+    JobReqOther
+    NotifyCmd
+    UUCPLockDir
+    UUCPLockTimeout
+    UUCPLockType
+"
+SchedulerParameters="
+    $RequiredSchedulerParameters
+    $OptionalParameters
+"
+#
+# The following parameters are checked to make sure
+# they have values consistent with what was just written
+# to the modem configuration file.  It is ok for some
+# of these to be different, but usually they should be
+# the same so if they disagree we prompt the user to
+# see if we should propagate the new values from the
+# modem config file to the scheduler config file.
+#
+CheckedParameters="
+    LogFacility
+    CountryCode
+    AreaCode
+    LongDistancePrefix
+    InternationalPrefix
+    DialStringRules
+    JobReqOther
+    NotifyCmd
+    UUCPLockDir
+    UUCPLockTimeout
+    UUCPLockType
+"
+
+#
+# Echo the configuration lines for those scheduler parameters
+# whose value is different from the default value.  Note
+# that we handle the case where there is embedded whitespace
+# by enclosing the parameter value in quotes.
+#
+echoSchedulerParameters()
+{
+    (for i in $RequiredSchedulerParameters; do
+	eval echo \"$i:\$$i:\"
+     done
+     for i in $OptionalSchedulerParameters; do
+	eval echo \"$i:\$$i:\$default$i\"
+     done) | $AWK -F: '
+function p(tag, value)
+{
+    tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8));
+    if (match(value, "^[^\"].*[ ]") == 0)
+	printf "%s:%s%s\n", tag, tabs, value
+    else
+	printf "%s:%s\"%s\"\n", tag, tabs, value
+}
+$2 != $3{ p($1, $2) }'
+}
+
+#
+# Print the current server configuration parameters.
+#
+printSchedulerConfig()
+{
+    (for i in $SchedulerParameters; do
+	eval echo \"$i:\$$i:\$default$i\"
+    done) | $AWK -F: '
+function p(tag, value)
+{
+    tabs = substr("\t\t\t", 1, 3-int((length(tag)+1)/8));
+    printf "%s:%s%s\n", tag, tabs, value
+}
+BEGIN	{ printf "\nThe non-default scheduler parameters are:\n\n" }
+$2 != $3{ p($1, $2) }
+END	{ printf "\n" }'
+}
+
+#
+# Check the current contents of the scheduler configuration file
+# against that parameters just setup for the per-modem config file.
+# If anything has changed (e.g. phone number info), then prompt
+# the user to update the file.
+#
+updateConfig=yes
+#
+# Initialize server parameters from the defaults.
+#
+for i in $OptionalSchedulerParameters; do
+    eval $i=\$default$i
+done
+if [ -f $SCHEDCONFIG ]; then
+    echo "Checking $SCHEDCONFIG for consistency..."
+    #
+    # Save current settings in variables with a ``modem'' prefix.
+    #
+    for i in $CheckedParameters; do
+	eval modem$i=\$$i
+    done
+    #
+    # Read old configuration file in as the ``current settings''.
+    #
+    getServerParameters $SCHEDCONFIG
+    #
+    # Check current parameter settings against ``modem settings''.
+    # If inconsistencies are detected in the parameters that should
+    # (by default) be kept consistent, then try to propagate the new
+    # parameter settings from the modem config file to the scheduler
+    # config file.
+    #
+    ok=yes
+    for i in $CheckedParameters; do
+	eval test \"\$$i\" != \"\$modem$i\" && { ok=skip; break; }
+    done
+    if [ $ok != yes ]; then
+	echo "...some parameters are different."
+	#
+	# Move the ``modem settings'' to the current settings
+	# and let the user ok them or change them to what they
+	# want.  We do this shuffle w/o touching the default
+	# settings so that optional parameter handling works
+	# (i.e. that only non-default values for optional params
+	# are displayed and/or written to the file).
+	#
+	for i in $CheckedParameters; do
+	    eval $i=\$modem$i
+	done
+    else
+	echo "...everything looks ok; leaving existing file unchanged."
+	updateConfig=no
+    fi
+else
+    echo "No scheduler configuration file exists, creating one from scratch."
+    ok=skip				# got important params above
+fi
+
+rm -f $PROMPTS
+while isNotOK $ok; do
+    if [ "$ok" != skip ]; then
+	test -f $PROMPTS || compilePrompts>$PROMPTS<<EOF
+#	CountryCode		Country code
+#	AreaCode		Area code
+#	LongDistancePrefix	Long distance dialing prefix
+#	InternationalPrefix	International dialing prefix
+NNS	DialStringRules		Dial string rules file (relative to $SPOOL)
+C#	ServerTracing		Tracing during normal server operation
+C#	SessionTracing		\
+	Default tracing during send and receive sessions
+S	ContCoverPage		Continuation cover page (relative to $SPOOL)
+C#	PostScriptTimeout	\
+	Timeout when converting PostScript documents (secs)
+C#	MaxConcurrentJobs	\
+	Maximum number of concurrent jobs to a destination
+S	ModemGroup		Define a group of modems
+S	TimeOfDay		Time of day restrictions for outbound jobs
+S	DestControls		\
+	Pathname of destination controls file (relative to $SPOOL)
+C#	UUCPLockTimeout		\
+	Timeout before purging a stale UUCP lock file (secs)
+C#	MaxSendPages		Max number of pages to permit in an outbound job
+S	LogFacility		Syslog facility name for ServerTracing messages
+EOF
+	. $PROMPTS
+    fi
+    checkForLocalFile $DialStringRules "dial string rules"
+    if [ "$DestControls" != "" -a "$DestControls" != '""' ]; then
+	checkForLocalFile $DestControls "destination controls";
+    fi
+    printSchedulerConfig; prompt "Are these ok [yes]?"; read ok
+done
+
+if [ $updateConfig = yes ]; then
+    #
+    # All done with the prompting; edit up a config file!
+    #
+    echo ""
+    echo "Creating new configuration file $SCHEDCONFIG..."
+    JUNK="$JUNK $SCHEDCONFIG.new"
+    echoSchedulerParameters >$SCHEDCONFIG.new 2>/dev/null
+    if cmp -s $SCHEDCONFIG.new $SCHEDCONFIG >/dev/null 2>&1; then
+	echo "...nothing appears to have changed; leaving the original file."
+	rm -f $SCHEDCONFIG.new
+    elif [ -s $SCHEDCONFIG.new ]; then
+	if [ -f $SCHEDCONFIG ]; then
+	    echo "...saving current file as $SCHEDCONFIG.sav."
+	    $MV $SCHEDCONFIG $SCHEDCONFIG.sav
+	fi
+	$MV $SCHEDCONFIG.new $SCHEDCONFIG
+	$CHOWN $FAX $SCHEDCONFIG
+	$CHGRP $faxGID $SCHEDCONFIG
+	$CHMOD 644 $SCHEDCONFIG
+    else
+	echo ""
+	echo "*** Sorry, something went wrong building $SCHEDCONFIG.new."
+	echo "*** The original config file is unchanged; check your disk space?"
+	echo ""
+	exit 1
+    fi
+fi
+
+echo ""
+echo "Don't forget to run faxmodem(@MANNUM1_8@) (if you have a send-only environment)"
+echo "or configure init to run faxgetty on $TTY."
+
+exec >/dev/null 2>&1
--- hylafax-4.1.1.orig/man/sendfax.1
+++ hylafax-4.1.1/man/sendfax.1
@@ -975,7 +975,6 @@
 .IR faxmail (1),
 .IR faxrm (1),
 .IR faxstat (1),
-.IR sgi2fax (1),
 .IR textfmt (1),
 .IR hfaxd (${MANNUM1_8}),
 .IR hylafax-server (${MANNUM4_5}),
--- hylafax-4.1.1.orig/man/textfmt.1
+++ hylafax-4.1.1/man/textfmt.1
@@ -32,7 +32,7 @@
 .SH NAME
 textfmt \- convert text to \*(Ps\(rg for facsimile transmission
 .SH SYNOPSIS
-.B ${LIBEXEC}/textfmt
+.B ${BIN}/textfmt
 [
 .I options
 ] [
--- hylafax-4.1.1.orig/man/sendfax.1~
+++ hylafax-4.1.1/man/sendfax.1~
@@ -0,0 +1,982 @@
+.\"	$Id: sendfax.1,v 1.17 2001/08/12 23:40:33 darren Exp $
+.\"
+.\"  HylaFAX Facsimile Software
+.\"
+.\" Copyright (c) 1990-1996 Sam Leffler
+.\" Copyright (c) 1991-1996 Silicon Graphics, Inc.
+.\" HylaFAX is a trademark of Silicon Graphics
+.\" 
+.\" Permission to use, copy, modify, distribute, and sell this software and 
+.\" its documentation for any purpose is hereby granted without fee, provided
+.\" that (i) the above copyright notices and this permission notice appear in
+.\" all copies of the software and related documentation, and (ii) the names of
+.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
+.\" publicity relating to the software without the specific, prior written
+.\" permission of Sam Leffler and Silicon Graphics.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+.\" 
+.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+.\" OF THIS SOFTWARE.
+.\"
+.if n .po 0
+.ds Fx \fIHyla\s-1FAX\s+1\fP
+.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
+.TH SENDFAX 1 "January 06, 2001"
+.SH NAME
+sendfax \- submit a facsimile job for transmission
+.SH SYNOPSIS
+.B sendfax
+[
+.I options
+] [
+.IR files ...
+]
+.SH DESCRIPTION
+.I sendfax
+submits one or more facsimile transmission requests
+to a \*(Fx facsimile server.
+Requests are normally processed immediately, although
+they may also be queued for transmission at a later time
+using a syntax identical to the
+.IR at (1)
+command.
+For each job that is queued,
+.I sendfax
+prints a
+.I "job identifier"
+and a
+.I "job group identifier"
+on the standard output.
+A job identifier is the token by which jobs are
+identified within \*(Fx; job group identifiers are
+used to reference a set of jobs that have been
+submitted at the same time.
+Job and job group identifiers can be supplied to the
+.IR faxrm (1)
+command to remove the jobs or to the
+.IR faxalter (1)
+command to alter job parameters.
+.PP
+Facsimile are made from the concatenation
+of a cover page (see below)
+and one or more files specified on the command line.
+If no files are supplied on the command line,
+.I sendfax
+will read data from the standard input unless polling is requested.
+Cover pages are distinguished for the purpose of generating ``\c
+.IR "continuation cover pages" ''
+on the server;
+these are makeup cover pages that are automatically generated if a
+job fails after sending the original user-specified cover page.
+.PP
+.I sendfax
+passes \*(Ps\(rg and
+.SM TIFF
+documents directly through to the fax server for transmission,
+and attempts to convert other file formats to either \*(Ps or
+.SM TIFF.
+In normal operation
+.I sendfax
+automatically converts
+.SM ASCII\c
+-text,
+.IR troff (1)
+output,
+Portable Document Format (PDF), and
+Silicon Graphics format images for transmission.
+Support for other file formats can be easily added
+through an extensible file typing and conversion facility; see
+.IR typerules (${MANNUM4_5}).
+Note that since
+.SM TIFF
+Class F documents are processed directly it is simple to forward
+a received facsimile.
+.PP
+By default
+.I sendfax
+will generate a cover page for each facsimile that is to be transmitted.
+This cover page is created by the ancillary
+.IR faxcover (1)
+program using information deduced by
+.I sendfax
+and by information supplied on the command line.
+Automatic cover page generation may be suppressed with the
+.B \-n
+option.
+.PP
+In addition to sending documents,
+.I sendfax
+can be used to poll a remote facsimile machine to retrieve
+waiting documents.
+If the
+.B \-p
+option is specified, a polling request will be submitted
+to each destination.
+If a poll request is made in conjunction with the transmission
+of documents, the poll request will take place after the documents
+are transmitted.
+Documents retrieved by polling are returned to the requestor
+by electronic mail and may be viewed with a suitable viewer program.
+.PP
+One or more destinations must be specified on the command line
+using the
+.B \-d
+option.
+A destination is the dialing string to use to contact
+the remote fax machine.
+Phone numbers may include non-alphanumeric characters for
+readability\(emonly alphanumerics and ``+'' (for denoting a
+country code) are significant in placing a call.
+Alphabetic characters are automatically mapped to their numeric
+key equivalents: ``abcABC'' to ``2'', ``defDEF'' to ``3'', etc.
+Dialing prefixes, such as ``1'' and ``011''
+(for long distance calling in the United States) need
+not be included if an unambigous number is specified.
+Examples of unambiguous phone numbers are:
+.nf
+.sp .5
+.RS
+.ta \w'+31.77.594.313      'u
+\+31.77.594.131	\fIto call the Netherlands\fP
++14159657824	\fIto call California\fP
+9657824	\fIto make a local call\fP
+1-215-356-1666	\fIto call Pennsylvania from within the US\fP
+.RE
+.sp .5
+.fi
+Non-numeric strings, such as ``*70'' (to defeat
+call waiting), may be included in the destination phone number.
+Whether or not they are stripped from the string used to
+dial the destination fax machine is dependent on the dialstring
+rules configured for use on the server; c.f.
+.IR hylafax-config (${MANNUM4_5})
+and
+.IR dialrules (${MANNUM4_5}).
+.PP
+A destination may also be specified as
+.IR user@fax-number .
+In this case the
+.I user
+string will be passed to
+.I faxcover
+as the identity of the recipient.
+Note that multi-word names must be enclosed in quote marks;
+for example,
+``Sam Leff\&ler@+1.415.555.1212''.
+.PP
+The order of options on the command line is significant.
+Each fax to be transmitted is assigned the current value of
+parameters specified on the command line; e.g. whether or not to
+generate a cover page.
+This means that options that specify parameters for a particular
+destination must precede the dialstring specified with the
+.B \-d
+option.
+For example,
+.IP
+sendfax -n -d 5551212 /etc/passwd
+.LP
+submits a fax to 5551212 that has no cover page while
+.IP
+sendfax -d 5551212 -n /etc/passwd
+.LP
+submits the same fax but with the default cover page handling.
+Note also that parameter values persist across 
+.B \-d
+options so the following
+.IP
+sendfax -n -d 5551212 -d 5551313 /etc/network
+.LP
+submits two facsimile, both of which have no cover page.
+.SH OPTIONS
+.TP 12
+.B \-1
+Transmit facsimile documents using 1-D MR compression.
+By default \*(Fx will use the optimal compression scheme supported
+by the transmitting modem and receiving facsimile device.
+.TP 12
+.B \-2
+Transmit facsimile documents using 2-D MR compression, if possible.
+By default \*(Fx will use the optimal compression scheme supported
+by the transmitting modem and receiving facsimile device.
+.TP 12
+.BI \-a " time"
+Schedule transmission up to one year in advance at the indicated
+.IR time .
+.I Time 
+is specified in the format:
+``[HH:MM [AM|PM]|now] [+ N 
+.I period 
+| 
+.I month 
+DD | 
+.I dayofweek 
+]\'\' where 
+.I month 
+can be Jan(uary), Feb(ruary), Mar(ch), Apr(il), May, Jun(e), Jul(y), 
+Aug(ust), Sep(tember), Oct(ober), Nov(ember), or Dec(ember); 
+.I period 
+can be minute(s), hour(s), day(s), week(s), or month(s); 
+.I dayofweek 
+can be Mon(day), Tue(sday), Wed(nesday), Thu(rsday), Fri(day), 
+Sat(urday), Sun(day); 
+e.g. ``now + 30 minutes\'\' to schedule transmission
+30 minutes in the future.  Trailing information in the 
+.I time 
+field (such as YYYY) is ignored. 
+By default,
+.I sendfax
+schedules facsimile for immediate delivery.  Time should be given 
+in the user's local time.
+.TP
+.BI \-b " speed"
+Transmit facsimile documents using a signalling rate that is
+constrained to be at least
+.I speed
+bits/second.
+If the specified speed is greater than the transmitting modem
+or receiver is capable of, it is reduced to the highest possible
+speed both devices support.
+If a negotiated signalling rate greater than or equal to
+.I speed
+cannot be negotiated then the job is aborted.
+Possible speeds are: 2400, 4800, 7200, 9600, 12000, and 14400.
+By default \*(Fx will use the fastest possible rate supported by
+the transmitting modem and receiving facsimile device.
+.TP
+.BI \-B " speed"
+Try to transmit facsimile documents using the
+desired signalling rate.
+Possible speeds are: 2400, 4800, 7200, 9600, 12000, and 14400.
+If the specified speed is greater than the transmitting modem
+or receiver is capable of, it is reduced to the highest possible
+speed both devices support.
+By default \*(Fx will use the fastest possible rate supported by
+the transmitting modem and receiving facsimile device (unless
+restricted by other server configuration); this
+option can be used to reduce the speed.
+Note that international calls are frequently more reliable when
+transmissions are restricted to 9600 bits/second.
+.TP 12
+.BI \-c " comments"
+Pass
+.I comments
+to the
+.IR faxcover (1)
+program for inclusion in the comments field of any generated
+cover page.
+.TP 12
+.BI \-C " file"
+Pass
+.I file
+to the
+.IR faxcover (1)
+program for use as the cover page template.
+.TP 12
+.B \-D
+Enable notification by electronic mail when the
+facsimile has been delivered.
+By default \*(Fx will notify the submitter only if there is
+a problem with a job.
+.TP 12
+.BI \-d " destination"
+Create a job to transmit the supplied documents to
+a facsimile machine at the indicated
+.IR destination .
+If the
+.I destination
+is of the form ``\fIuser\fP@\fIphone-number\fP'' then any
+cover page will show \fIuser\fP as the intended receipient.
+.TP 12
+.B \-E
+Disable use of the Error Correction Mode (\s-1ECM\s+1)
+when transmitting page data.
+By default \*(Fx will attempt to use \s-1ECM\s+1 when both
+the trasmitting modem and receiving device support it.
+Note that international calls are sometimes faster when
+\s-1ECM\s+1 is disabled.
+Beware also that some modems and/or facsimile devices do not
+properly implement \s-1ECM\s+1 causing transmission failures.
+.TP 12
+.BI \-f " from"
+Use
+.I from
+as the identity of the facsimile sender.
+Otherwise the sender is the user that invoked
+.IR sendfax .
+The sender is an account name to which the \*(Fx software
+should direct notification messages.
+The
+.I from
+identity may be a fullblown ``From:'' line, e.g.
+e.g. ``Joe Blow <joe@foo.com>''
+and ``joe@foo.com (Joe Blow)'' are acceptable.
+If no host-part is specified in the
+.I from
+string the local hostname is used.
+This option is useful when
+.I sendfax
+is invoked on behalf of another user, such as in the implementation
+of an electronic mail to fax gateway.
+.TP 12
+.BI \-F " format"
+Use the specified
+.I format
+when imaging tag lines on outgoing pages.
+Consult the description of the
+.B TagLineFormat
+parameter in
+.IR hylafax-config (${MANNUM4_5})
+for an explanation of how to construct a format string.
+.IP
+\fINote that many locales require that proper identification
+appear on all transmitted facsimile; when using this facility
+one should always include proper identification (e.g. a phone
+number) in the imaged taglines.\fP
+.IR 
+.TP 12
+.BI \-h " \fR[\fPmodem\fR@]\fPhost\fR[\fP:port\fR]\fP"
+Force the jobs to be processed on a specific
+.I host
+and, optionally, using a particular
+.IR modem .
+The
+.I host
+may be either a symbolic name or a network address.
+If no
+.B \-h
+option is supplied,
+.I sendfax
+uses the
+.SM FAXSERVER
+environment variable to identify the \*(Fx server to
+which the jobs should be directed.
+If no server is specified then
+.I sendfax
+attempts to contact a server on the local host.
+If no modem is specified, the job will be submitted to any
+available modem.
+.TP 12
+.BI \-i " identifier"
+Use the 
+.I identifier
+string in any notification messages instead of the usual job
+identifier number.
+This option is useful for applications that cross reference
+notification messages against job submissions.
+.TP
+.BI \-I " time"
+If a job must be requeued because of a communication failure schedule
+the retry according to the specified
+.IR time .
+Times are given in seconds.
+Minutes, hours, and days can be specified with
+``\fImin\fP'', ``\fIhour\fP'', and ``\fIday\fP'' suffixes, respectively.
+By default \*(Fx reschedules jobs using retry times that depend on
+the manner in which the job failed; this interface permits a user to
+override this algorithm and specify a single fixed retry time for all
+communication failures.
+.TP 12
+.BI \-k " time"
+Kill the job if it does not complete in the indicated
+.IR time .
+The
+.I time
+is specifed using notation identical to the
+.B \-a
+option.
+Note that the
+.I time
+is relative to the time of the initial time-to-send.
+The default kill time is ``now + 3 hours'' (three hours from the time
+the job is first processed).
+To retry for an hour, ``now +1 hour'' could be used.
+.TP 12
+.B \-l
+Transmit the facsimile at a vertical resolution of
+98 lines/inch; otherwise known as \fIlow resolution\fP.
+.TP 12
+.B \-m
+Transmit the facsimile at a vertical resolution of
+196 lines/inch; otherwise known as \fImedium resolution\fP
+or \fIfine mode\fP.
+.TP
+.BI \-M " mst"
+Transmit facsimile documents using the specified
+minimum scanline time.
+Possible times are: 0ms, 5ms, 10ms2, 10ms, 20ms2, 20ms, 40ms2, and 40ms.
+If the specified time is less than the transmitting modem
+or receiver is capable of, it is increased to the lowest possible
+time both devices support.
+By default \*(Fx will use the lowest possible time supported by
+the transmitting modem and receiving facsimile device (unless
+restricted by other server configuration).
+This option is mostly useful for debugging.
+.TP 12
+.B \-n
+Suppress the automatic generation of a cover page for
+subsequent facsimile.
+Note that polling requests do not receive a cover page unless they
+are combined with the transmission of one or more files.
+.TP
+.B \-N
+Do not notify the sender by electronic mail when the
+facsimile has been delivered or requeued.
+.TP 12
+.B \-p
+Poll each destination for any available documents.
+If a poll request is made together with document transmission, the
+poll operation is done after the documents are transmitted.
+Documents received by polling are returned to the sender by
+electronic mail.
+.TP 12
+.BI \-P " priority"
+Assign the specified scheduling
+.I priority
+to subsequent jobs.
+A priority is an integer value in the range [0-255].
+Lower values result in higher priority processing.
+By default, each job is assigned 127 for an initial scheduling priority.
+If a job's priority is greater than bulk faxes then the
+job's priority is raised (numerically lowered) for each
+failed attempt to transmit so that retransmit attempts
+are done ahead of newly submitted jobs.
+In the case of bulk faxes (numerically higher than 190), then the
+job's priority is lowered (numerically raised) for each failed
+attempt to transmit so that the whole of the bulk-queued jobs
+will be attempted before any are retried.
+The
+.I priority
+may also be specified as one of the following symbolic names:
+.I default
+or 
+.I normal
+(127),
+.I bulk
+or
+.I junk
+(191),
+.I high
+(63).
+.TP 12
+.B \-R
+Enable notification by electronic mail when the
+facsimile has been delivered and when it is requeued for retransmission.
+By default \*(Fx will notify the submitter only if there is
+a problem with a job.
+.TP 12
+.BI \-r " regarding"
+Pass 
+.I regarding
+to the
+.IR faxcover (1)
+program as the value of the ``Re:'' field of any generated cover page.
+.TP 12
+.BI \-s " size"
+Set the page size to use for the transmitted facsimile.
+Facsimile are normally imaged with a system-default page size
+(usually letter-size pages, 8.5" by 11", for sites in North America).
+Alternate page sizes are specified symbolically using either
+the name or abbreviation of an entry in the
+.IR pagesizes (${MANNUM4_5})
+database; e.g.
+.I a3
+(ISO A3),
+.I a4
+(ISO A4),
+.I a5
+(ISO A5),
+.I a6
+(ISO A6),
+.I b4
+(ISO B4),
+.I na-let
+(North American Letter),
+.I us-leg
+(American Legal),
+.I us-led
+(American Ledger),
+.I us-exe
+(American Executive),
+.I jp-let
+(Japanese Letter),
+and
+.I jp-leg
+(Japanese Legal).
+Comparisons are case-insensitive and any match of a
+substring of the full page-size name is sufficient; e.g. ``legal'' would
+match ``American Legal''.
+.IP
+Note that it may not be permissible to image into the
+full page area; the guaranteed reproducible area for a page is 
+typically inset.
+Also, note that while arbitrary page sizes can be specified through
+the page size database,
+only a limited set of page dimensions are supported by the
+Group 3 facsimile protocol.
+Thus if an odd-size facsimile is submitted for transmission
+it may not be possible to determine if it can be sent
+until the fax server establishes communication
+with the remote facsimile machine.
+.TP 12
+.BI \-t " tries"
+Make no more than
+.I tries
+attempts to send the facsimile.
+By default, \*(Fx will terminate a job if:
+3 consecutive attempts to send a particular page fail, or
+it appears the receiver is not a facsimile machine.
+Otherwise \*(Fx places no limit on the
+.I number
+of attempts to send a facsimile, instead terminating a job
+if it is not completed within a 
+.I "kill time"
+timeout interval.
+Note that a try
+is a call in which carrier is established and the facsimile
+protocol is commenced; this is contrasted with a call
+attempt that might have failed because the line was busy.
+.TP 12
+.BI \-T " maxdials"
+Make no more than
+.I maxdials
+calls in attempting to send the facsimile.  By default, HylaFAX will 
+redial 12 times before killing a job.
+.TP 12
+.BI \-U " voice-no"
+Pass
+.I voice-no
+to the
+.IR faxcover (1)
+program as the sender's voice number.
+.TP 12
+.BI \-V " voice-no"
+Pass
+.I voice-no
+to the
+.IR faxcover (1)
+program as the destination person's voice number.
+.TP 12
+.BI \-w
+Wait for the job to complete before ending the sendfax session.
+If this option is used, the sendfax process will not terminate until
+the job is completed.
+.TP 12
+.BI \-W " fax-no"
+Pass
+.I fax-no
+to the
+.IR faxcover (1)
+program as the sender's fax number.
+.TP 12
+.BI \-x " company"
+Pass
+.I company
+to the
+.IR faxcover (1)
+program as the destination company name.
+.TP 12
+.BI \-X " company"
+Pass
+.I company
+to the
+.IR faxcover (1)
+program as the sender's company name.
+.TP 12
+.BI \-y " location"
+Pass
+.I location
+to the
+.IR faxcover (1)
+program as the destination company's location.
+.TP 12
+.BI \-Y " location"
+Pass
+.I location
+to the
+.IR faxcover (1)
+program as the sender's company location.
+.TP 12
+.B \-v
+Print information on the standard output
+about each conversion and cover sheet
+generation operation it does.
+If 
+.B \-v
+is specified twice, the protocol between
+.I sendfax
+and the
+.I hfaxd
+server process that does the submission work on the
+remote machine is also displayed.
+.SH "CONFIGURATION PARAMETERS"
+.I sendfax
+reads configuration information from the files
+.BR ${LIBDATA}/hfaxd.conf ,
+.BR ${LIBDATA}/hyla.conf ,
+.BR ${LIBDATA}/sendfax.conf ,
+and
+.BR ~/.hylarc ;
+in that order, with later-read settings superceding any 
+that may have been previously read.
+Configuration files follow the conventions described in
+.IR hylafax-client (1).
+The following configuration parameters are recognized.
+Parameters marked with \(S1 are not available in ${LIBDATA}/hfaxd.conf :
+.sp .5
+.nf
+.ta \w'AutoCoverPage    'u +\w'boolean    'u +\w'\s-1\fIsee below\fP\s+1    'u
+\fBTag	Type	Default	Description\fP
+AutoCoverPage	boolean	\s-1Yes\s+1	automatically generate cover page
+ChopThreshold	float	\s-13.0\s+1	page chopping threshold
+CoverCmd	string	\s-1\fIsee below\fP\s+1	pathname of cover sheet program
+Cover-Comments	string	\-	cover page comments string
+Cover-Company\(S1	string	\-	cover page to-company name string
+Cover-Location\(S1	string	\-	cover page to-company location string
+Cover-Regarding	string	\-	cover page regarding string
+Cover-Template	string	\-	cover page template filename
+Cover-Voice\(S1	string	\-	cover page to-voice number string
+Cover-From-Company\(S1	string	\-	cover page from-company string
+Cover-From-Location\(S1	string	\-	cover page from-location string
+Cover-From-Voice\(S1	string	\-	cover page from-voice number string
+Cover-From-Fax\(S1	string	\-	cover page from-fax number string
+DateFormat	string	\-	cover page date format string
+DesiredEC	boolean	\-	desired use of \s-1ECM\s+1
+DesiredMST	string	\-	desired minimum scanling time to use
+DesiredSpeed	integer	\-	desired signalling rate to use
+DialRules	string	\s-1\fIsee below\fP\s+1	file containing dialstring rules
+From	string	\-	sender's identity
+HRes	float	\s-1204.\s+1	horizontal resolution
+Host	string	\s-1localhost\s+1	host to contact for service
+KillTime	string	\-	time to expire job
+MailAddr	string	\-	mail address for notification messages
+MaxDials	integer	\s-112\s+1	times to retry dialing
+MaxTries	integer	\s-13\s+1	times to retry transmission
+MinSpeed	integer	\-	minimum acceptable signalling rate
+Modem	string	\-	modem to use on server
+Notify	string	\s-1none\s+1	control email notification
+PageChop	string	\s-1default\s+1	control page chop handling
+PageLength	float	\-	page length in millimeters
+PageSize	string	\s-1default\s+1	page size by name
+PageWidth	float	\-	page width in millimeters
+Port	integer	\s-14559\s+1	port to use in contacting server
+Priority	string	\s-1default\s+1	job scheduling priority
+Protocol	string	\s-1tcp\s+1	protocol to use in contacting server
+RetryTime	string	\-	delay between failed attempts to send
+SendTime	string	\-	time to send job
+TagLine	string	\-	tagline format string
+TypeRules	string	\s-1\fIsee below\fP\s+1	file containing file typing rules
+VRes	float	\s-198.\s+1	vertical resolution
+Verbose	boolean	\s-1No\s+1	whether or not to enable protocol tracing
+.fi
+.PP
+The configuration parameters are explained below.
+Certain configuration parameters, notably those for setting strings
+on automatically generated cover pages, are defined mainly for use
+by other \*(Fx programs that share common code used by
+.IR sendfax .
+.TP 16
+.B AutoCoverPage
+Control whether or not a cover page is automatically generated
+for each job.
+(Equivalent to the
+.B \-n
+option.)
+.TP 16
+.B ChopThreshold
+The amount of white space, in inches, that must be present at the bottom
+of a page before \*(Fx will attempt to truncate the page transmission.
+.TP 16
+.B CoverCmd
+The absolute pathname of the program to use to generate cover pages.
+The default cover sheet program is 
+.BR ${BIN}/faxcover .
+.TP 16
+.B Cover-Comments
+The comments string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B Cover-Company
+The to-company name string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B Cover-Location
+The to-company location string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B Cover-Regarding
+The regarding string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B Cover-Template
+The absolute pathname of a cover sheet template file to use
+in auto-generating cover pages.
+.TP 16
+.B Cover-Voice
+The to-voice number string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B Cover-From-Company
+The from-company name string to pass to the cover sheet program
+when auto-generating cover pages.
+.TP 16
+.B Cover-From-Location
+The from-location string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B Cover-From-Voice
+The from-voice number string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B Cover-From-Fax
+The from-fax number string to pass to the cover sheet program when
+auto-generating cover pages.
+.TP 16
+.B DateFormat
+The 
+.IR strftime (3)
+format string to pass to the cover page command when auto-generating
+cover pages.
+.TP 16
+.B DesiredEC
+Whether or not to request the use of the optional
+Error Correct Mode (\s-1ECM\s+1) when transmitting facsimile.
+(Equivalent to the
+.B \-E
+option.)
+.TP 16
+.B DesiredMST
+The desired minimum scanline time to use when transmitting facsimile.
+(Equivalent to the
+.B \-M
+option.)
+.TP 16
+.B DesiredSpeed
+The desired signalling rate to the use when transmitting facsimile.
+(Equivalent to the
+.B \-B
+option.)
+.TP 16
+.B DialRules
+The name of the file containing the dialstring processing rules to
+when preparing an externally visible representation of the dialstring
+(e.g. to strip credit card numbers).
+By default this is ${LIBDATA}/dialrules.
+.TP 16
+.B From
+The sender's identity.
+(Equivalent to the
+.B \-f
+option.)
+.TP 16
+.B Host
+The host to contact for service.
+(Equivalent to the
+.B \-h
+option.)
+.TP 16
+.B HRes
+The horizontal resolution to use when transmitting facsimile.
+(NB: \fIthis currently has no effect\fP.)
+.TP 16
+.B KillTime
+The expiration time to assign to each job.
+(Equivalent to the
+.B \-k
+option.)
+.TP 16
+.B MailAddr
+The electronic mail address to direct notification messages from the
+server.
+If this string is specified without an ``@hostname'' part then the
+local hostname will automatically be appended.
+(Equivalent to the
+.B \-f
+option.)
+.TP 16
+.B MaxDials
+The maximum number of times to dial the phone for each job.
+(Equivalent to the
+.B \-T
+option.)
+.TP 16
+.B MaxTries
+The maximum number of times to retry sending a job.
+(Equivalent to the
+.B \-t
+option.)
+.TP 16
+.B MinSpeed
+The minimum acceptable signalling rate to use when transmitting facsimile.
+(Equivalent to the
+.B \-b
+option.)
+.TP 16
+.B Modem
+The modem to use on the server.
+(Equivalent to the
+.B \-h
+option.)
+.TP 16
+.B Notify
+Control the email notification messages from the server.
+This string may be one of ``done'', ``none'', ``requeued'' or ``default''
+with an optionally preceding ``when '' (e.g. ``when done'').
+Note that ``when requeued'' implies ``when done''.
+(Equivalent to the
+.BR \-D ,
+.BR \-R ,
+and
+.B \-N
+options.)
+.TP 16
+.B PageChop
+Control page chop handling when transmitting facsimile.
+This string may be one of ``none'', ``all'', or ``last' to have
+no pages chopped, all pages chopped, or only the last page chopped;
+respectively.
+Page chopping is controlled by the 
+.B ChopThreshold
+parameter.
+.TP 16
+.B PageLength
+Set the transmitted page length in millimeters.
+.TP 16
+.B PageSize
+Set the page dimensions according to an entry in the
+.IR pagesizes (${MANNUM4_5})
+database.
+(Equivalent to the
+.B \-s
+option.)
+.TP 16
+.B PageWidth
+Set the transmitted page width in millimeters.
+.TP 16
+.B Port
+The network port to contact for service.
+(Eqvuialent to the
+.B \-h
+option.)
+.TP 16
+.B Priority
+The scheduling priority to assign to each job.
+(Equivalent to the
+.B \-P
+option.)
+.TP 16
+.B Protocol
+The name of the communication protocol to use when contacting a server.
+(Equivalent to the
+.B FAXSERVICE
+environment variable.)
+.TP 16
+.B RetryTime
+The time to delay between job retries due to a communication failure.
+(Equivalent to the
+.B \-I
+option.)
+.TP 16
+.B SendTime
+The time to send jobs.
+(Equivalent to the
+.B \-a
+option.)
+.TP 16
+.B TagLine
+The tagline format string to use when transmitting facsimile.
+(Equivalent to the
+.B \-F
+option.)
+.TP 16
+.B TypeRules
+The name of the file containing file type conversion rules.
+By default this is ${LIBDATA}/typerules.
+.TP 16
+.B Verbose
+Control protocol tracing.
+(Equivalent to the
+.B \-vv
+option.)
+.TP 16
+.B VRes
+Set the vertical resolution in lines/inch
+to use when transmitting facsimile.
+(Equivalent to the
+.B \-m
+and
+.B \-l
+options.)
+.SH DIAGNOSTICS
+The following messages are generated because of problems
+encountered on the local machine.
+.PP
+.B "Could not call server."
+The facsimile server on the remote machine did not respond.
+.PP
+.B "No input data; tranmission aborted."
+No data was supplied (typically on the standard input).
+No facsimile will be sent.
+.PP
+.B "Error converting data; command was "%s."
+A data conversion operation failed; the shell
+command that was used is printed.
+.PP
+.B "Can not convert %s."
+Data needed to be converted for transmission, but the
+required conversion rule was not located.
+This may indicate that the \*(Fx
+software was incorrectly installed; or perhaps
+that an
+.SM NFS\c
+-mounted directory is temporarily unavailable.
+.PP
+.B "%s: Can not determine file type."
+.I sendfax
+was unable to deduce the type of the file.
+.PP
+.B "%s: Not a regular file."
+The file is something other than a regular file; for
+example, a directory.
+.PP
+The following messages may be printed by
+.IR sendfax .
+These messages describe problems encountered by
+the server process on the remote machine.
+This list is incomplete;
+other messages may be generated by the server under
+unusual circumstances.
+.SH FILES
+.ta \w'${LIBDATA}/sendfax.conf    'u
+.nf
+~/.hylarc	per-user configuration file
+${LIBDATA}/hyla.conf	system-wide configuration file
+${LIBDATA}/sendfax.conf	system-wide configuration file
+${LIBDATA}/typerules	file type and conversion rules
+${LIBDATA}/pagesizes	page size database
+${LIBDATA}/dialrules	optional client dialstring rules
+${BIN}/faxcover	for generating cover sheets
+${LIBEXEC}/textfmt	for converting text to PostScript
+${LIBEXEC}/sgi2fax	for converting SGI RGB images
+${SPOOL}/tmp/sndfaxXXXXXX	temporary files
+.fi
+.SH "SEE ALSO"
+.IR at (1),
+.IR hylafax-client (1),
+.IR faxalter (1),
+.IR faxcover (1),
+.IR faxmail (1),
+.IR faxrm (1),
+.IR faxstat (1),
+.IR sgi2fax (1),
+.IR textfmt (1),
+.IR hfaxd (${MANNUM1_8}),
+.IR hylafax-server (${MANNUM4_5}),
+.IR typerules (${MANNUM4_5})
--- hylafax-4.1.1.orig/faxd/Getty.c++
+++ hylafax-4.1.1/faxd/Getty.c++
@@ -218,7 +218,8 @@
 {
     // NB: this is executed in the parent
     fxStr device = fxStr::format("%s/" | line, _PATH_DEV);
-    Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
+    // XXX Debian
+    // Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
     Sys::chmod(device, 0600);			// reset protection
 }
 
--- hylafax-4.1.1.orig/faxd/faxGettyApp.c++
+++ hylafax-4.1.1/faxd/faxGettyApp.c++
@@ -651,7 +651,7 @@
 void
 faxGettyApp::notifyRecvBegun(const FaxRecvInfo& ri)
 {
-    (void) sendRecvStatus(getModemDeviceID(), "S" | ri.encode());
+    (void) sendRecvStatus(getModemDeviceID(), "S%s", (const char*) ri.encode());
 
     FaxServer::notifyRecvBegun(ri);
 }
@@ -662,7 +662,7 @@
 void
 faxGettyApp::notifyPageRecvd(TIFF* tif, const FaxRecvInfo& ri, int ppm)
 {
-    (void) sendRecvStatus(getModemDeviceID(), "P" | ri.encode());
+    (void) sendRecvStatus(getModemDeviceID(), "P%s", (const char*) ri.encode());
 
     FaxServer::notifyPageRecvd(tif, ri, ppm);
 
@@ -675,7 +675,7 @@
 void
 faxGettyApp::notifyDocumentRecvd(const FaxRecvInfo& ri)
 {
-    (void) sendRecvStatus(getModemDeviceID(), "D" | ri.encode());
+    (void) sendRecvStatus(getModemDeviceID(), "D%s", (const char*) ri.encode());
 
     FaxServer::notifyDocumentRecvd(ri);
 
--- hylafax-4.1.1.orig/faxd/CopyQuality.c++
+++ hylafax-4.1.1/faxd/CopyQuality.c++
@@ -245,8 +245,12 @@
 		    flushRawData(tif, 0, buf, recvRow - buf);
 		    recvRow = buf;
 		}
-		memcpy(recvRow, (const char*) raw, n);
-		recvRow += n;
+		if (n >= RCVBUFSIZ)
+		    flushRawData(tif, 0, (u_char*) ((const char*) raw), n);
+		else {
+		    memcpy(recvRow, (const char*) raw, n);
+		    recvRow += n;
+		}
 		recvEOLCount++;
 	    }
 	}
--- hylafax-4.1.1.orig/faxd/Class1Send.c++
+++ hylafax-4.1.1/faxd/Class1Send.c++
@@ -780,11 +780,8 @@
 	uint32* stripbytecount;
 	(void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbytecount);
 	tstrip_t strip;
-	#ifdef __alpha
-	    u_long totdata = 0;
-	#else
-	    uint32 totdata = 0;
-	#endif
+	/* Changed by pavel@debian.org to u_long on all architectures, not only alpha */
+	u_long totdata = 0;
 	for (strip = 0; strip < nstrips; strip++)
 	    totdata += stripbytecount[strip];
 	/*
--- hylafax-4.1.1.orig/faxd/ModemServer.c++
+++ hylafax-4.1.1/faxd/ModemServer.c++
@@ -562,12 +562,15 @@
      */
     struct stat sb;
     (void) Sys::fstat(modemFd, sb);
+/* XXX Debian
 #if HAS_FCHOWN
     if (fchown(modemFd, UUCPLock::getUUCPUid(), sb.st_gid) < 0)
 #else
     if (Sys::chown(dev, UUCPLock::getUUCPUid(), sb.st_gid) < 0)
 #endif
 	traceServer("%s: chown: %m", dev);
+*/
+
 #if HAS_FCHMOD
     if (fchmod(modemFd, deviceMode) < 0)
 #else
--- hylafax-4.1.1.orig/faxd/Class2Send.c++
+++ hylafax-4.1.1/faxd/Class2Send.c++
@@ -372,11 +372,8 @@
 	uint32* stripbytecount;
 	(void) TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbytecount);
 	tstrip_t strip;
-	#ifdef __alpha
-	    u_long totdata = 0;
-	#else
-	    uint32 totdata = 0;
-	#endif
+	/* Changed by pavel@debian.org to u_long on all architectures, not only alpha */
+	u_long totdata = 0;
 	for (strip = 0; strip < nstrips; strip++)
 	    totdata += stripbytecount[strip];
 	/*
--- hylafax-4.1.1.orig/util/pagesizes.in
+++ hylafax-4.1.1/util/pagesizes.in
@@ -71,4 +71,4 @@
 Japanese Letter		JP-LET	 8598	12141	 7600	 10200	900	400
 Japanese Legal		JP-LEG	12141	17196	11200	 15300	900	400
 #
-@DEFPAGESIZE@
+#@DEFPAGESIZE@
--- hylafax-4.1.1.orig/util/faxfetch.c++
+++ hylafax-4.1.1/util/faxfetch.c++
@@ -99,7 +99,7 @@
 	    hangupServer();
 	}
 	if (emsg != "")
-	    printError(emsg);
+	    printError("%s", (const char*) emsg);
     }
 }
 
--- hylafax-4.1.1.orig/util/recvstats.sh.in
+++ hylafax-4.1.1/util/recvstats.sh.in
@@ -70,7 +70,7 @@
     shift
 done
 if [ -z "$FILES" ]; then
-    FILES=$SPOOL/etc/xferfaxlog
+    FILES=$SPOOL/log/xferfaxlog
 fi
 
 #
@@ -120,7 +120,7 @@
 #
 # Generate an awk program to process the statistics file.
 #
-tmpAwk=/tmp/xferfax$$
+tmpAwk=`tempfile`
 trap "rm -f $tmpAwk; exit 1" 0 1 2 15
 
 # security
--- hylafax-4.1.1.orig/util/faxcron.sh.in
+++ hylafax-4.1.1/util/faxcron.sh.in
@@ -41,10 +41,10 @@
 AGELOG=30			# keep log info for last 30 days
 AGERCV=7			# purge received facsimile after 7 days
 AGETMP=1			# purge orphaned temp files after 1 day
-FAXUSER=fax			# owner of log files
+FAXUSER=root			# owner of log files
 LOGMODE=0644			# mode for log files
-XFERLOG=etc/xferfaxlog		# HylaFAX xferfaxlog file location
-LAST=etc/lastrun		# file where time+date of last run recorded
+XFERLOG=log/xferfaxlog		# HylaFAX xferfaxlog file location
+LAST=status/faxcron.lastrun	# file where time+date of last run recorded
 
 cd @SPOOL@			# NB: everything below assumes this
 
@@ -73,8 +73,8 @@
 rm -rf $TMPDIR
 mkdir $TMPDIR || exit 1
 
-JUNK=$TMPDIR/faxjunk$$         # temp file used multiple times
-AWKTMP=$TMPDIR/faxawk$$                # temp file for awk program
+JUNK=`tempfile`			      	# temp file used multiple times
+AWKTMP=`tempfile`			# temp file for awk program
 
 while [ x"$1" != x"" ] ; do
     case $1 in
@@ -285,7 +285,7 @@
 EOF
 $AWK -f $AWKTMP -v LASTRUN="$LASTRUN" TRANSCRIPT="\
     LOGFILE=log/%s;\
-    TMP=$TMPDIR/faxlog\$\$;\
+    TMP=`tempfile`;\
     if [ -f \$LOGFILE ]; then\
 	$SED -n -e '/%s %s %s.*SESSION BEGIN/,/SESSION END/p' \$LOGFILE |\
 	$SED -e '/start.*timer/d'\
--- hylafax-4.1.1.orig/util/typerules
+++ hylafax-4.1.1/util/typerules
@@ -131,15 +131,12 @@
 0	string		WNGZWZSS	error	Wingz spreadsheet
 0       string          #Inventor V	error	IRIS Inventor file 
 >15     string          binary		error	binary IRIS Inventor file
->15     string          ascii		ps	%F/textfmt -B -f Courier-Bold\
-						-Ml=0.4in -p 11 -s %s >%o <%i
+>15     string          ascii		ps	textfmt -B -Ml=0.4in -p 11 -s %s >%o <%i
 #
 # This causes anything else with ascii-only data to be treated as text.
 #
-0	ascii		x		ps	%F/textfmt -B -f Courier-Bold\
-						-Ml=0.4in -p 11 -s %s >%o <%i
+0	ascii		x		ps	textfmt -B -Ml=0.4in -p 11 -s %s >%o <%i
 
 #  Support 7-bit text which would otherwise be seen as binary.
 #
-0	byte		x		ps	%F/textfmt -B -f Courier-Bold \
-							  -p 11 -s %s >%o <%i
+0	byte		x		ps	textfmt -B -p 11 -s %s >%o <%i
--- hylafax-4.1.1.orig/util/textfmt.c++
+++ hylafax-4.1.1/util/textfmt.c++
@@ -59,7 +59,7 @@
 	" [-V #]"
 	" files... >out.ps\n", prog);
     fprintf(stderr,"Default options:"
-	" -f Courier"
+	" -f com"
 	" -1"
 	" -p 11bp"
 	" -o 0"
--- hylafax-4.1.1.orig/util/TextFmt.c++
+++ hylafax-4.1.1/util/TextFmt.c++
@@ -74,7 +74,7 @@
     workStarted = false;
 
     fonts = new FontDict;
-    curFont = addFont("Roman", "Courier");
+    curFont = addFont("Roman", "com");
 
     TextFmt::setupConfig();	// NB: virtual
 }
--- hylafax-4.1.1.orig/util/faxwatch.c++
+++ hylafax-4.1.1/util/faxwatch.c++
@@ -102,7 +102,7 @@
 	hangupServer();
     }
     if (emsg != "")
-	printError(emsg);
+	printError("%s", (const char*) emsg);
 }
 
 void
--- hylafax-4.1.1.orig/util/pdf2fax.gs.sh
+++ hylafax-4.1.1/util/pdf2fax.gs.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-#	$Id: pdf2fax.gs.sh,v 1.1 2001/03/19 06:52:40 darren Exp $
+#	$Id: pdf2fax.gs.sh.in,v 1.1 2002/02/17 23:31:19 darren Exp $
 #
 # HylaFAX Facsimile Software
 #
@@ -49,7 +49,7 @@
 FATAL ERROR: $SPOOL/etc/setup.cache is missing!
 
 The file $SPOOL/etc/setup.cache is not present.  This
-probably means the machine has not been setup using the faxsetup(1M)
+probably means the machine has not been setup using the faxsetup(8C)
 command.  Read the documentation on setting up HylaFAX before you
 startup a server system.
 
--- hylafax-4.1.1.orig/util/Socket.h
+++ hylafax-4.1.1/util/Socket.h
@@ -57,11 +57,11 @@
 class Socket {
 public:
     static int accept(int s, void* addr, socklen_t* addrlen);
-    static int bind(int s, const void* addr, int addrlen);
-    static int connect(int s, const void* addr, int addrlen);
+    static int bind(int s, const void* addr, socklen_t addrlen);
+    static int connect(int s, const void* addr, socklen_t addrlen);
     static int getpeername(int s, void* name, socklen_t* namelen);
     static int getsockname(int s, void* name, socklen_t* namelen);
-    static int setsockopt(int s, int level, int oname, const void* oval, int olen);
+    static int setsockopt(int s, int level, int oname, const void* oval, socklen_t olen);
     static struct hostent* gethostbyname(const char* name);
 };
 
@@ -74,12 +74,12 @@
 #endif
 }
 
-inline int Socket::bind(int s, const void* addr, int addrlen)
+inline int Socket::bind(int s, const void* addr, socklen_t addrlen)
 {
     return ::bind(s, (const struct sockaddr*) addr, addrlen);
 }
 
-inline int Socket::connect(int s, const void* addr, int addrlen)
+inline int Socket::connect(int s, const void* addr, socklen_t addrlen)
 {
     return ::connect(s, (const struct sockaddr*) addr, addrlen);
 }
@@ -102,7 +102,7 @@
 #endif
 }
 
-inline int Socket::setsockopt(int s, int level, int oname, const void* oval, int olen)
+inline int Socket::setsockopt(int s, int level, int oname, const void* oval, socklen_t olen)
 {
     return ::setsockopt(s, level, oname, (const char*) oval, olen);
 }
--- hylafax-4.1.1.orig/util/xferfaxstats.sh.in
+++ hylafax-4.1.1/util/xferfaxstats.sh.in
@@ -67,7 +67,7 @@
     shift
 done
 if [ -z "$FILES" ]; then
-    FILES=$SPOOL/etc/xferfaxlog
+    FILES=$SPOOL/log/xferfaxlog
 fi
 
 #
@@ -152,7 +152,7 @@
 #
 # Generate an awk program to process the statistics file.
 #
-tmpAwk=/tmp/xferfax$$
+tmpAwk=`tempfile`
 trap "rm -f $tmpAwk; exit 1" 0 1 2 15
 
 ($CAT<<'EOF'
--- hylafax-4.1.1.orig/defs.in
+++ hylafax-4.1.1/defs.in
@@ -219,13 +219,13 @@
 CINCS		= ${VCINCS} ${LCINCS} ${GCINCS}
 
 GCOPTS		= @GCOPTS@ ${OPTIMIZER} @PROTOTYPES@
-GCDEFS		= @ANSICPP@
+GCDEFS         = @ANSICPP@ -D_GNU_SOURCE -DCONFIG_SOCKARGLENTYPE="unsigned int"
 GCINCS		= -I. -I${DEPTH} -I${REGEXINC} -I${SRCDIR} \
-		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC}
+		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC} 
 #
 # C++ flags are decomposed using the same hierarchy as C flags.
 #
-C++FLAGS	= ${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS}
+C++FLAGS	= ${CVERSION} ${GC++FLAGS} ${VC++FLAGS} ${LC++FLAGS} 
 
 VC++FLAGS	= ${VC++DEFS} ${VC++INCS} ${VC++OPTS}
 LC++FLAGS	= ${LC++DEFS} ${LC++INCS} ${LC++OPTS}
@@ -238,7 +238,7 @@
 GC++OPTS	= @GCXXOPTS@ ${OPTIMIZER}
 GC++INCS	= -I. -I${DEPTH} -I${REGEXINC} -I${SRCDIR} \
 		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC}
-GC++DEFS	= @ANSICXXPP@
+GC++DEFS	= @ANSICXXPP@ -D_GNU_SOURCE -DCONFIG_SOCKARGLENTYPE="unsigned int"
 
 #
 # Loader flags, composed of library (-l's) and option parts, with
@@ -278,8 +278,8 @@
 # mkdepend options, so we initialize LMKDEPCFLAGS with ${LMKDEPFLAGS}.
 #
 MKDEPENDC++	= ${MKDEPEND} ${MKDEPC++FLAGS} -c \
-		    "${C++F} ${C++FILE} -c -M @MKDEPCXXOPTS@"
-MKDEPENDC	= ${MKDEPEND} ${MKDEPCFLAGS} -c "${CCF} -c -M @MKDEPCOPTS@"
+		    '${C++F} ${C++FILE} -c -M @MKDEPCXXOPTS@'
+MKDEPENDC	= ${MKDEPEND} ${MKDEPCFLAGS} -c '${CCF} -c -M @MKDEPCOPTS@'
 
 MKDEPC++FLAGS	= ${VMKDEPC++FLAGS} ${LMKDEPC++FLAGS} ${GMKDEPC++FLAGS}
 MKDEPCFLAGS	= ${VMKDEPCFLAGS} ${LMKDEPCFLAGS} ${GMKDEPCFLAGS}
--- hylafax-4.1.1.orig/faxrm/faxrm.c++
+++ hylafax-4.1.1/faxrm/faxrm.c++
@@ -100,7 +100,7 @@
 	hangupServer();
     }
     if (emsg != "")
-	printError(emsg);
+	printError("%s", (const char*) emsg);
 }
 
 bool
--- hylafax-4.1.1.orig/hfaxd/Parser.c++
+++ hylafax-4.1.1/hfaxd/Parser.c++
@@ -963,7 +963,7 @@
 	break;
     case T_TRIGGER:
 	if (string_param(s, "trigger-spec")) {
-	    logcmd(t, s);
+	    logcmd(t, "%s", (const char*)s);
 	    triggerCmd("%s", (const char*) s);
 	    return (true);
 	}
--- hylafax-4.1.1.orig/hfaxd/Jobs.c++
+++ hylafax-4.1.1/hfaxd/Jobs.c++
@@ -132,7 +132,7 @@
     { T_STATE,		A_RUSR|A_RADM|A_ROTH },
     { T_STATUS,		A_RUSR|A_RADM|A_WADM|A_ROTH },
     { T_SUBADDR,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
-    { T_TAGLINE,	A_RUSR|A_RADM|A_WADM|A_ROTH },
+    { T_TAGLINE,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
     { T_TOTDIALS,	A_RUSR|A_RADM|A_ROTH },
     { T_TOTPAGES,	A_RUSR|A_RADM|A_ROTH },
     { T_TOTTRIES,	A_RUSR|A_RADM|A_ROTH },
@@ -141,7 +141,7 @@
     { T_TO_USER,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
     { T_USE_CONTCOVER,	A_RUSR|A_RADM|A_WADM|A_ROTH },
     { T_USE_ECM,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
-    { T_USE_TAGLINE,	A_RUSR|A_RADM|A_WADM|A_ROTH },
+    { T_USE_TAGLINE,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
     { T_USRKEY,		A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
     { T_VRES,		A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
     { T_NIL,		0 },
--- hylafax-4.1.1.orig/hfaxd/hfaxd.conf
+++ hylafax-4.1.1/hfaxd/hfaxd.conf
@@ -24,7 +24,9 @@
 # Note that clients can override this with JOBFMT.
 #
 #JobFmt:		"%-3j %3i %1a %6.6o %-12.12e %5P %5D %7z %.25s"
-#
+# Modified as per request by Kevin Dalley in order to handle international
+# format numbers in the US.
+JobFmt:		        "%-3j %3i %1a %6.6o %-14.14e %5P %5D %7z %.25s"
 # The default format used to return recvq status queries.
 # Note that clients can override this with RCVFMT.
 #
--- hylafax-4.1.1.orig/hfaxd/FileTransfer.c++
+++ hylafax-4.1.1/hfaxd/FileTransfer.c++
@@ -556,7 +556,7 @@
 	} else
 	    perror_reply(553, filename, errno);
     } else
-	reply(553, emsg);
+	reply(553, "%s", (const char*)emsg);
 }
 
 /*
--- hylafax-4.1.1.orig/hfaxd/FileSystem.c++
+++ hylafax-4.1.1/hfaxd/FileSystem.c++
@@ -209,7 +209,8 @@
     for (u_int i = 0, n = N(dirs); i < n; i++) {
 	struct stat sb;
 	if (!FileCache::lookup(dirs[i].pathname, sb) || !S_ISDIR(sb.st_mode)) {
-	    logError("%s: Not a directory.", dirs[i].pathname);
+	    /* XXX Debian /var/spool/fax/etc is a link */
+	    /* logError("%s: Not a directory.", dirs[i].pathname); */
 	    continue;
 	}
 	dirs[i].ino = sb.st_ino;
--- hylafax-4.1.1.orig/hfaxd/SNPPServer.c++
+++ hylafax-4.1.1/hfaxd/SNPPServer.c++
@@ -849,7 +849,7 @@
 	fxStr emsg;
 	u_int seqnum = getDocumentNumbers(1, emsg);
 	if (seqnum == (u_int) -1) {
-	    reply(554, emsg);
+	    reply(554, "%s", (const char*)emsg);
 	    return;
 	}
 	msgFile = fxStr::format("/%s/doc%u.page", FAX_TMPDIR, seqnum);
@@ -1053,7 +1053,7 @@
 	fxStr emsg;
 	u_int seqnum = getDocumentNumbers(1, emsg);
 	if (seqnum == (u_int) -1) {
-	    reply(554, emsg);
+	    reply(554, "%s", (const char*)emsg);
 	    return;
 	}
 	msgFile = fxStr::format("/%s/doc%u.page", FAX_TMPDIR, seqnum);
--- hylafax-4.1.1.orig/hfaxd/Status.c++
+++ hylafax-4.1.1/hfaxd/Status.c++
@@ -136,9 +136,10 @@
 	if (!FileCache::update(statusFile, sb) || !S_ISREG(sb.st_mode))
 	    continue;
 	// verify there is a modem config file
-	fxStr configFile = fxStr::format("/" FAX_CONFIG ".%s", dp->d_name);
+	fxStr configFile = fxStr::format(FAX_CONFIG ".%s", dp->d_name);
+	/* XXX Debian
 	if (!FileCache::lookup(configFile, sb) || !S_ISREG(sb.st_mode))
-	    continue;
+	    continue;*/
 	fxStr fifoFile(fifoPrefix | dp->d_name);
 	if (!FileCache::lookup(fifoFile, sb) || !S_ISFIFO(sb.st_mode))
 	    continue;
@@ -314,8 +315,9 @@
 	    continue;
 	// verify there is a modem config file
 	fxStr configFile = fxStr::format("/" FAX_CONFIG ".%s", dp->d_name);
+	/* XXX Debian
 	if (!FileCache::lookup(configFile, sb) || !S_ISREG(sb.st_mode))
-	    continue;
+	    continue;*/
 	fxStr fifoFile(fifoPrefix | dp->d_name);
 	if (!FileCache::lookup(fifoFile, sb) || !S_ISFIFO(sb.st_mode))
 	    continue;
--- hylafax-4.1.1.orig/configure
+++ hylafax-4.1.1/configure
@@ -37,25 +37,25 @@
 #
 # Setup general configuration parameters.
 #
-DIR_BIN=/usr/local/bin
-DIR_SBIN=/usr/local/sbin
-DIR_LIBDATA=/usr/local/lib/fax
-DIR_LIB=/usr/local/lib
+DIR_BIN=/usr/bin
+DIR_SBIN=/usr/sbin
+DIR_LIBDATA=/etc/hylafax
+DIR_LIB=/usr/lib
 DIR_LIBEXEC=$DIR_SBIN
 DIR_SPOOL=/var/spool/hylafax
-DIR_HTML=/var/httpd/htdocs/hylafax
-DIR_CGI=/var/httpd/cgi-bin
+DIR_HTML=/usr/share/doc/hylafax-doc/html
+DIR_CGI=/usr/lib/cgi-bin
 PATH_DPSRIP=$DIR_LIBEXEC/ps2fax.exe
 PATH_IMPRIP=/usr/lib/print/psrip
-HTMLPATH=/hylafax
+HTMLPATH=/doc/hylafax-doc/html
 CGIPATH=/cgi-bin
 DEFVRES=98
 PAGESIZE="North American Letter"
 FAXUID=uucp
-FAXGID=
+FAXGID=uucp
 SYSUID=bin
 SYSGID=
-DSO=auto
+DSO=no
 GETTY=auto
 HTML=no
 PS=auto
@@ -1954,7 +1954,7 @@
 	*-sysv5UnixWare*)	CONFIG_MAXGID=60000;;	# UnixWare 7
 	*-sysv5OpenUNIX*)	CONFIG_MAXGID=60000;;	# OpenUNIX 8
 	*-hpux*)	CONFIG_MAXGID=60000;;
-	*)		CONFIG_MAXGID=60002;;	# default
+	*)		CONFIG_MAXGID=65534;;	# default
 	esac
     }
     if [ "$CONFIG_MAXGID" ]; then
@@ -3620,63 +3620,14 @@
     *)		GETTY=SysV;;
     esac
 fi
-Note "Looks like you need $GETTY getty support."
-if [ -z "$PATH_GETTY" ]; then
-    if CheckForDefine _PATH_GETTY paths.h; then
-	Note "Using _PATH_GETTY from <paths.h> as the program to exec for a data call."
-    else
-	#
-	# NB: use findFile instead of findApp because on some
-	#     systems this file is mode 544; so if configure
-	#     is run by an unprivileged user the file will not
-	#     be located.
-	#
-	PATH_GETTY=`findFile ttymon /usr/lib/saf:/usr/libexec:/sbin:$PATH`
-	test -z "$PATH_GETTY" && \
-	    PATH_GETTY=`findApp getty /usr/libexec:/sbin:$PATH`
-	test -z "$PATH_GETTY" && \
-	    PATH_GETTY=`findApp agetty /usr/libexec:/sbin:$PATH`
-	test -z "$PATH_GETTY" && \
-	    PATH_GETTY=`findApp mgetty /usr/libexec:/sbin:$PATH`
-	if [ -z "$PATH_GETTY" ]; then
-	    PATH_GETTY=/etc/getty
-	    Note ""
-	    Note "WARNING, could not locate a suitable getty program to exec for a"
-	    Note "         data call; using a default value $PATH_GETTY."
-	    Note ""
-	else
-	    Note "Looks like $PATH_GETTY is the program to exec for a data call."
-	fi
-    fi
-else
-    Note "Using $PATH_GETTY as the program to exec for a data call."
-fi
 
-# vgetty support
-if [ -z "$PATH_VGETTY" ]; then
-    PATH_VGETTY=`findApp vgetty /usr/libexec:/sbin:$PATH` 
-    if [ -z "$PATH_VGETTY" ]; then
-	PATH_VGETTY=/bin/vgetty
-	Note "WARNING, no vgetty program found to handle a voice call, using $PATH_VGETTY."
-    else
-	Note "Looks like $PATH_VGETTY is the program to exec for a voice call."
-    fi
-else
-    Note "Using $PATH_VGETTY as the program to exec for a voice call."
-fi
+#
+# Debian change: use /etc/hylafax/*getty-link instead of the full paths
+#
 
-# egetty support
-if [ -z "$PATH_EGETTY" ]; then
-    PATH_EGETTY=`findApp egetty /usr/libexec:/sbin:$PATH` 
-    if [ -z "$PATH_EGETTY" ]; then
-	PATH_EGETTY=/bin/egetty
-	Note "WARNING, no egetty program found, using $PATH_EGETTY."
-    else
-	Note "Looks like $PATH_EGETTY is the program to exec for an extern call."
-    fi
-else
-    Note "Using $PATH_EGETTY as the program to exec for an extern call."
-fi
+PATH_GETTY="/etc/hylafax/getty-link"
+PATH_VGETTY="/etc/hylafax/vgetty-link"
+PATH_EGETTY="/etc/hylafax/egetty-link"
 
 #
 # UUCP lock file type and location.
--- hylafax-4.1.1.orig/sendfax/sendfax.c++
+++ hylafax-4.1.1/sendfax/sendfax.c++
@@ -234,7 +234,7 @@
         }
         hangupServer();
     }
-    if (!status) printError(emsg);
+    if (!status) printError("%s", (const char*) emsg);
     return (status);
 }
 
--- hylafax-4.1.1.orig/faxstat/faxstat.c++
+++ hylafax-4.1.1/faxstat/faxstat.c++
@@ -119,7 +119,7 @@
 	hangupServer();
     }
     if (emsg != "")
-	printError(emsg);
+	printError("%s", (const char*) emsg);
 }
 
 bool
--- hylafax-4.1.1.orig/faxalter/faxalter.c++
+++ hylafax-4.1.1/faxalter/faxalter.c++
@@ -184,7 +184,7 @@
 	hangupServer();
     }
     if (emsg != "")
-	printError(emsg);
+	printError("%s", (const char*) emsg);
 }
 
 void
--- hylafax-4.1.1.orig/faxcover/faxcover.c++
+++ hylafax-4.1.1/faxcover/faxcover.c++
@@ -109,7 +109,7 @@
 	cover = cp;
 
     setupPageSize("default");
-    while ((c = getopt(argc, argv, "C:D:L:N:V:X:n:t:f:c:p:l:m:z:r:s:v:x:")) != -1)
+    while ((c = getopt(argc, argv, "C:D:n:N:t:f:c:p:l:L:m:r:s:v:V:x:X:0:1:2:3:4:5:6:7:8:9:")) != -1)
 	switch (c) {
 	case 's':			// page size
 	    setupPageSize(optarg);
--- hylafax-4.1.1.orig/config/skel
+++ hylafax-4.1.1/config/skel
@@ -37,23 +37,23 @@
 DialStringRules:	etc/dialrules
 FAXNumber:		+1.999.555.1212
 LocalIdentifier:	"NothingSetup"	# default is canonical FAXNumber
-ServerTracing:		1		# log server-related operations
-SessionTracing:		11		# log server-related operations
-RecvFileMode:		0600		# recvd facsimile are not public
-LogFileMode:		0600		# private log files
-DeviceMode:		0600		# device is accessible only to uucp/fax
-GettyArgs:		"-h %l dx_%s"	# requires modem to auto-detect fax/data
-QualifyTSI:		""		# do not restrict inbound facsimile
+#ServerTracing:		1		# log server-related operations
+#SessionTracing:		11		# log server-related operations
+#RecvFileMode:		0600		# recvd facsimile are not public
+#LogFileMode:		0600		# private log files
+#DeviceMode:		0600		# device is accessible only to uucp/fax
+#GettyArgs:		"-h %l dx_%s"	# requires modem to auto-detect fax/data
+#QualifyTSI:		""		# do not restrict inbound facsimile
 SpeakerVolume:		off		# machine's are already too loud
 RingsBeforeAnswer:	1		# answer on first ring
-TagLineFont:		etc/lutRS18.pcf	# tag line font
+#TagLineFont:		etc/lutRS18.pcf	# tag line font
 TagLineFormat:		"From %%l|%c|Page %%P of %%T"
 MaxBadCalls:		5		# max 5 consecutive bad calls
 PostScriptTimeout:	300		# 5 minute timeout on PostScript jobs
 MaxSendPages:		25		# max pages in an outbound job
 MaxRecvPages:		25		# max pages in an inbound job
-ContCoverPage:		etc/cover.templ	# enable continuation cover pages
-DestControls:		etc/destcontrols # destination-specific controls
+#ContCoverPage:		etc/cover.templ	# enable continuation cover pages
+#DestControls:		etc/destcontrols # destination-specific controls
 MaxConcurrentJobs:	1		# serialize jobs to the same dest
 TimeOfDay:		"Any"		# outbound jobs any day, any time
 # END-SERVER
--- hylafax-4.1.1.orig/config.h.in
+++ hylafax-4.1.1/config.h.in
@@ -137,7 +137,7 @@
  * file; currently in an ASCII format designed for processing
  * by programs like awk and perl.
  */
-#define	FAX_XFERLOG	FAX_ETCDIR "/xferfaxlog"
+#define	FAX_XFERLOG	FAX_LOGDIR "/xferfaxlog"
 
 /*
  * Client access to services on the server machine is controlled
@@ -155,7 +155,7 @@
  */
 #define	FAX_INFOSUF	"info"		/* suffix for server info files */
 
-#define	FAX_FIFO	"FIFO"		/* FIFO file for talking to daemon */
+#define	FAX_FIFO	"dev/FIFO"	/* FIFO file for talking to daemon */
 #define	MODEM_ANY	"any"		/* any modem acceptable identifier */
 #define	FAX_PROTOVERS	2		/* old client-server protocol version */
 
@@ -203,7 +203,7 @@
  * through the LogFaclity configuration parameters read
  * by all the server programs.
  */
-#define	LOG_FAX		"daemon"	/* logging identity */
+#define	LOG_FAX		"local5"	/* logging identity */
 
 /*
  * The pathnames of the getty, vgetty, and egetty programs
--- hylafax-4.1.1.orig/sendpage/sendpage.c++
+++ hylafax-4.1.1/sendpage/sendpage.c++
@@ -166,7 +166,7 @@
 	hangupServer();
     }
     if (!status)
-	printError(emsg);
+	printError("%s", (const char*) emsg);
     return (status);
 }
 
--- hylafax-4.1.1.orig/debian/man/faxmsg.8
+++ hylafax-4.1.1/debian/man/faxmsg.8
@@ -0,0 +1,23 @@
+.TH FAXMSG 8C
+.SH NAME
+faxmsg \- back end to faxabort, faxanswer and faxquit
+.SH SYNOPSIS
+.B /usr/sbin/faxmsg
+.SH "DESCRIPTION"
+.B faxmsg
+is never called directly - it is always called by the names
+.B faxabort, faxanswer,
+or
+.B faxquit.
+
+This manual page was written for the Debian GNU/Linux distribution
+(but may be used by others), because the original program does not
+have a manual page.
+.SH "SEE ALSO"
+.IR hylafax (5F),
+.IR faxabort (8C),
+.IR faxanswer (8C),
+.IR faxquit (8C)
+.SH AUTHOR
+This manual page was written by Dermot Bradley <bradley@debian.org>,
+for the Debian GNU/Linux system.
--- hylafax-4.1.1.orig/debian/man/probemodem.8
+++ hylafax-4.1.1/debian/man/probemodem.8
@@ -0,0 +1,28 @@
+.TH PROBEMODEM 8C
+.SH NAME
+probemodem \- check modem and report the result of certain commands
+.SH SYNOPSIS
+.B /usr/sbin/probemodem
+.I "[options] [device]"
+.SH "DESCRIPTION"
+The
+.B probemodem
+script checks a modem attached to a serial line and reports the results
+of certain commands.
+
+The
+.I device
+argument is the name of the tty port that the modem is attached to.
+
+This manual page was written for the Debian GNU/Linux distribution
+(but may be used by others), because the original program does not
+have a manual page.
+.SH OPTIONS
+.TP
+.BI \-s " speed"
+Set the speed to use for the tty port.
+.SH "SEE ALSO"
+.IR hylafax (5F)
+.SH AUTHOR
+This manual page was written by Dermot Bradley <bradley@debian.org>,
+for the Debian GNU/Linux system.
--- hylafax-4.1.1.orig/debian/man/typetest.8
+++ hylafax-4.1.1/debian/man/typetest.8
@@ -0,0 +1,26 @@
+.TH TYPETEST 8C
+.SH NAME
+typetest \- test out typerules
+.SH SYNOPSIS
+.B /usr/sbin/typetest
+.I "[options] files"
+.SH "DESCRIPTION"
+The
+.B typetest
+script tests out typerules.
+
+The
+.I files
+argument is the name of a file to test the rules on.
+
+This manual page was written for the Debian GNU/Linux distribution
+(but may be used by others), because the original program does not
+have a manual page.
+.SH OPTIONS
+.TP
+.BI \-f " rulesfile".
+.SH "SEE ALSO"
+.IR hylafax (5F)
+.SH AUTHOR
+This manual page was written by Dermot Bradley <bradley@debian.org>,
+for the Debian GNU/Linux system.
--- hylafax-4.1.1.orig/debian/man/lockname.8
+++ hylafax-4.1.1/debian/man/lockname.8
@@ -0,0 +1,23 @@
+.TH LOCKNAME 8C
+.SH NAME
+lockname \- generate a UUCP lock filename
+.SH SYNOPSIS
+.B /usr/sbin/lockname
+.SH "DESCRIPTION"
+.B lockname
+is invoked by
+.B faxaddmodem
+and
+.B probemodem
+to generate a UUCP lock filename according to SVR4 conventions.
+
+This manual page was written for the Debian GNU/Linux distribution
+(but may be used by others), because the original program does not
+have a manual page.
+.SH "SEE ALSO"
+.IR hylafax (5F),
+.IR faxaddmodem (8C),
+.IR probemodem (8C)
+.SH AUTHOR
+This manual page was written by Dermot Bradley <bradley@debian.org>,
+for the Debian GNU/Linux system.
--- hylafax-4.1.1.orig/debian/man/ondelay.8
+++ hylafax-4.1.1/debian/man/ondelay.8
@@ -0,0 +1,23 @@
+.TH ONDELAY 8C
+.SH NAME
+ondelay \- open device without waiting for carrier
+.SH SYNOPSIS
+.B /usr/sbin/ondelay
+.SH "DESCRIPTION"
+.B ondelay
+is invoked by
+.B faxaddmodem
+and
+.B probemodem
+to open a device without waiting for a carrier.
+
+This manual page was written for the Debian GNU/Linux distribution
+(but may be used by others), because the original program does not
+have a manual page.
+.SH "SEE ALSO"
+.IR hylafax (5F),
+.IR faxaddmodem (8C),
+.IR probemodem (8C)
+.SH AUTHOR
+This manual page was written by Dermot Bradley <bradley@debian.org>,
+for the Debian GNU/Linux system.
--- hylafax-4.1.1.orig/debian/changelog
+++ hylafax-4.1.1/debian/changelog
@@ -0,0 +1,341 @@
+hylafax (1:4.1.1-3) stable-security; urgency=high
+
+  * Backport from the 4.1.8 security release that fixes a remotely exploitable
+    format string vulnerability in hfaxd that could be present
+    in certain non-default configurations. (CAN-2003-0886)
+
+ -- Matthias Klose <doko@debian.org>  Wed, 12 Nov 2003 22:51:08 +0100
+
+hylafax (1:4.1.1-1.1) stable-security; urgency=high
+
+  * Non-maintainer upload by security team
+  * Backported secrurity fixes from 4.1.3:
+    . Fixed hostname format string vulnerabilities in faxrm, faxstat,
+      faxalter, sendfax, sendpage, faxfetch and faxwatch
+    . Fixed a potential buffer overflow when copying TIF data
+    . Fixed TSI format string vulnerability in faxgetty
+  * Added a double cast so g++ will actually like the last backported fix
+  
+ -- Martin Schulze <joey@infodrom.org>  Fri,  9 Aug 2002 15:17:25 +0200
+
+hylafax (1:4.1.1-1) unstable; urgency=medium
+
+  * New upstream release (Closes: #123223)
+  * HylaFAX spool is now /var/spool/hylafax (upstream change)
+  * Fixed typerules to call textfmt instead of /usr/sbin/textfmt. Textfmt now
+    uses a default font (Closes: #142125)
+  * This is not a bug in HylaFAX (Closes: #139022)
+  * Fixed permissions on spool and config directories. Also fixed (upstream)
+    bug in faxsetup, which always created modem FIFO's with incorrect
+    permissions (Closes: #139830, #113849, #113849, #135173)
+  * Added Russian Debconf template (Closes: #137659)
+  * Extended README.debian, new QuickStart document, and packaged upstream
+    changelog and TODO.
+
+ -- Pavel Tcholakov <pavel@debian.org>  Sat, 13 Apr 2002 11:55:49 +0000
+
+hylafax (1:4.1-6) unstable; urgency=low
+
+  * The following bugs are (believed to be) fixed in unstable
+  (Closes: #110297, #118501, #118539, #118546)
+  * Package hylafax-server *depends* on hylafax-client (Closes: #118514)
+  * A properly configured hylafax-server package creates symlinks for 
+  /var/spool/fax/bin/{pdf,ps}2fax.gs (Closes: #120500)
+  * /var/spool/fax is owned by uucp:uucp (Closes: #120495)
+  * Migrate existing hosts file to hosts.hfaxd, if one exists
+  (Closes: #120498)
+
+ -- Pavel Tcholakov <pavel@debian.org>  Mon, 10 Dec 2001 11:48:59 +0000
+
+hylafax (1:4.1-5) unstable; urgency=low
+
+  * Added missing build-dependency on ed (Closes: #116660)
+
+ -- Pavel Tcholakov <pavel@debian.org>  Thu, 25 Oct 2001 19:56:06 +0000
+
+hylafax (1:4.1-4) unstable; urgency=low
+
+  * Added pt_BG translation of debconf templates (Closes: #110188)
+  * Postrm script doesn't remove /var/spool/fax anymore (Closes: #113085)
+
+ -- Pavel Tcholakov <pavel@debian.org>  Wed, 26 Sep 2001 17:13:10 +0000
+
+hylafax (1:4.1-3) unstable; urgency=low
+
+  * Fixed dialtest/typetest installation (Closes: #106818)
+  * Script ps2fax.gs.sh is now installed under the name of ps2fax.gs
+    (Closes: #105730)
+
+ -- Pavel Tcholakov <pavel@debian.org>  Fri, 10 Aug 2001 11:16:13 +0000
+
+hylafax (1:4.1-2) unstable; urgency=low
+
+  * Fixed postinst debconf freeze, thanks to Zsolt Varga.
+  * Modified default hfaxd.conf JobFmt setting as per request by Kevin
+    Dalley in order to handle international format numbers in the US
+    (Closes: #105825)
+
+ -- Pavel Tcholakov <pavel@debian.org>  Fri, 20 Jul 2001 21:20:16 +0000
+
+hylafax (1:4.1-1) unstable; urgency=low
+
+  * New upstream release (Closes: #72474, #102661)
+  * Closed obsolete bugs (Closes: #84755)
+  * Won't fix (Closes: #37741, #53874, #59846)
+  * Fixed cron.monthly script to correctly generate the fax statistics,
+    thanks to Pal Loberg (Closes: #98128)
+  * pagesizes is no longer a conffile since it's actually automatically
+    generated at post-inst (Closes: #47621)
+
+ -- Pavel Tcholakov <pavel@debian.org>  Tue, 10 Jul 2001 12:20:04 +0000
+
+hylafax (4.1beta3-5) unstable; urgency=low
+
+  * Package hylafax-server had incorrect section of doc; fixed
+  * Added Brett Wuth's email about configuring mgetty as README.mgetty
+    (Closes: #99476)
+
+ -- Pavel Tcholakov <pavel@linux.zonebg.com>  Sat,  9 Jun 2001 10:56:20 +0200
+
+hylafax (4.1beta3-4) unstable; urgency=low
+
+  * Changed hylafax-doc Section to doc (Closes: #94843)
+  * Added Bulgarian and German translations of the Debconf templates
+    (Closes: #95131)
+  * Changed mode for /var/spool/fax/dev to root:uucp, 775 (Closes:
+    #94139, #96594)
+  * Symlink problem cannot be reproduced with latest version (Closes:
+    #90274)
+
+ -- Pavel Tcholakov <pavel@linux.zonebg.com>  Sat, 12 May 2001 17:01:55 +0200
+
+hylafax (4.1beta3-3) unstable; urgency=low
+
+  * Added gs-aladdin as an alternative to gs in the dependencies list
+    (Closes: #92123, #92528)
+  * Initial debconf-ization
+  * Previous versions of HylaFAX used to use /etc/hylafax/*getty-link
+    instead of the various getty flavours directly, but 4.1beta3-1 and -
+    2 broke this. The old behaviour is restored now (Closes: #92863)
+
+ -- Pavel Tcholakov <pavel@linux.zonebg.com>  Sat,  7 Apr 2001 16:55:38 +0200
+
+hylafax (4.1beta3-2) unstable; urgency=low
+
+  * Fixed Debian-specific file paths (Closes: #90726)
+  * Swithched back HylaFAX UID/GID to uucp:uucp (Closes: #90706)
+
+ -- Pavel Tcholakov <pavel@linux.zonebg.com>  Sat, 24 Mar 2001 16:02:25 +0200
+
+hylafax (4.1beta3-1) unstable; urgency=low
+
+  * New upstream release
+  * Changed runtime UID/GID to fax:fax instead of uucp:uucp (Closes:
+    #87870)
+
+ -- Pavel Tcholakov <pavel@linux.zonebg.com>  Wed, 21 Mar 2001 14:11:11 +0200
+
+hylafax (4.1beta2-2) unstable; urgency=low
+
+  * Took the package maintainership (closes: #81959, #81960, #81957)
+  * Removed debian/yada in source package and added Build-dependency on
+    yada (closes: #82403)
+  * Changed hylafax-server to depend on hylafax-client (closes: #78373)
+  * Moved man pages from hylafax-doc to hylafax-client and hylafax-server
+    respectively. Package hylafax-doc carries only the HTML
+    documentation now
+  * Documentation is now registered with doc-base
+  * Create separate account for faxmaster instead of just aliasing it to
+    root (closes: #67380)
+  * Hylafax-server no longer touches /etc/{inittab,aliases,syslog.conf}
+    (closes: #54654)
+  * Changed faxcron script to call find with "-type f" to avoid annoying
+    messages (closes: #25303, #70873)
+  * Added -dFIXEDMEDIA to the ps2fax.gs.sh script as suggested by Jose
+    Carlos Benfati <benfati@super11.net> (closes: #65210)
+  * Added spaces after y/n questions in the hylafax-server postinst
+    script (closes: #63208)
+  * In hylafax-doc: moved html-patch to the Install section of packages
+    to fix a problem with the MD5 sums of some of the documents
+  * Added a lintian override to suppress some warnings about hylafax-
+    server
+
+ -- Pavel Tcholakov <pavel@linux.zonebg.com>  Thu,  1 Mar 2001 21:26:43 +0200
+
+hylafax (4.1beta2-1) unstable; urgency=low
+
+  * New upstream release with pristine sources
+  * Orphaned the package
+
+ -- Christophe Le Bars <clebars@debian.org>  Wed, 10 Jan 2001 23:30:37 +0100
+
+hylafax (4.0.2-14) frozen unstable; urgency=low
+
+  * Applied patch to work with libtiff3.5 (closes: #50523)
+  * Fixed again DCONFIG_SOCKARGLENTYPE (closes: #51186)
+
+ -- Christophe Le Bars <clebars@debian.org>  Thu, 23 Mar 2000 23:18:07 +0100
+
+hylafax (4.0.2-13) unstable; urgency=low
+
+  * Fixed wrong chgrp on etc symlink (closes: #50931)
+  * Fixed perms on /etc/hylafax/hosts (closes: #52767)
+  * Fixed misleading prompt about configuration (closes: #51836)
+  * Moved manpages in hylafax-doc (closes: #51757)
+  * Warning : This upload is still incompatible with libtiff3.5
+
+ -- Christophe Le Bars <clebars@debian.org>  Tue, 15 Feb 2000 23:51:48 +0100
+
+hylafax (4.0.2-12) unstable; urgency=low
+
+  * Fixed manpages misusages of "public domain" (closes: #47589)
+  * Changed util/Socket.h (closes: #46341)
+  * Recompiled hylafax against libtiff3 (closes: #48962)
+  * Added new Debian faxcover.ps (closes: #35974)
+
+ -- Christophe Le Bars <clebars@debian.org>  Sat, 13 Nov 1999 17:08:37 +0100
+
+hylafax (4.0.2-11) unstable; urgency=low
+
+  * Switched /usr/doc/ -> /usr/share/doc/
+  * Fixed DCONFIG_SOCKARGLENTYPE (closes: #46341)
+  * Changed postinst to ask less questions on upgrade (closes: #46053)
+
+ -- Christophe Le Bars <clebars@debian.org>  Wed,  6 Oct 1999 02:10:57 +0200
+
+hylafax (4.0.2-10) unstable; urgency=medium
+
+  * Fixed removal of /var/spool/fax (closes: #43218)
+  * Converted package management to YADA
+  * Applied upstream leap-year patch
+  * Applied upstream security fix patch about faxsurvey
+
+ -- Christophe Le Bars <clebars@debian.org>  Wed,  1 Sep 1999 00:13:18 +0200
+
+hylafax (4.0.2-9) unstable; urgency=low
+
+  * Fixed debian/postinst bashisms (closes: #35020)
+  * Removed chown on ttyS? (closes: #34276)
+  * Changed cron.weekly to test xferlog (closes: #33697)
+  * Fixed configure to use CONFIG_MAXGID="65534" (closes: #31323)
+
+ -- Christophe Le Bars <clebars@debian.org>  Sat, 29 May 1999 14:03:39 +0200
+
+hylafax (4.0.2-8) frozen unstable; urgency=low
+
+  * Fixed debian/rules to generate hylafax-doc in binary-arch target (Fixes: Bug#25586)
+  * Removed xferlog from hylafax-server (Fixes: Bug#28795)
+  * Compiled hylafax-server against libstdc++2.9 (Fixes: Bug#29066)
+  * Compiled hylafax-client against libstdc++2.9 (Fixes: Bug#29065)
+  * Changed font metric information directory to /usr/share/enscript (Fixes: Bug#25700)
+
+ -- Christophe Le Bars <clebars@debian.org>  Sun, 20 Dec 1998 18:53:57 +0100
+
+hylafax (4.0.2-7) unstable stable; urgency=high
+
+  * Fixed faxcron, recvstats and xferstats /tmp bug (with tempfile)
+
+ -- Christophe Le Bars <clebars@debian.org>  Mon, 28 Sep 1998 11:59:13 +0200
+
+hylafax (4.0.2-6) unstable; urgency=low
+
+  * Changed a dependency for hylafax-doc : now only suggests man2html (Fixes: Bug#26107)
+  * Fixed wedged.sh (Fixes: Bug#23200)
+  * Added a new faxrcvd.sh using MIME (Behan Webster patch) (Fixes: Bug#20930)
+  * Fixed debian/install and debian/html-patch calls (Fixes: Bug#24506)
+  * Deleted debian/rules LDFLAGS Make variable (Fixes: Bug#25579)
+  * Added new options to faxcover
+
+ -- Christophe Le Bars <clebars@debian.org>  Sun,  6 Sep 1998 17:06:42 +0200
+
+hylafax (4.0.2-5) unstable stable; urgency=high
+
+  * Removed faxsurvey (security fix)
+
+ -- Christophe Le Bars <clebars@debian.org>  Wed,  5 Aug 1998 14:04:10 +0200 
+
+hylafax (4.0.2-4) frozen unstable; urgency=low
+
+  * Added '>/dev/null' to savelog calls in /etc/cron.weekly 
+  * Fixed /etc/init.d/hylafax to conform boot console policy (Fixes: Bug#21285)
+  * Added postinst in hylafax-client to determine default paper size
+    with paperconf (Fixes: Bug#21149)
+  * Fixed postinst in hylafax-server to purge syslog.conf entry (Fixes: Bug#21634)
+
+ -- Christophe Le Bars <clebars@debian.org>  Sat, 25 Apr 1998 16:21:01 +0200
+
+hylafax (4.0.2-3) frozen unstable; urgency=medium
+
+  * Fixed /etc/aliases handling in postinst (Fixes: Bug#20464)
+  * Added newaliases call in postinst
+  * Added getty symlinks handling in postinst (Fixes: Bug#20467)
+  * Fixed /etc/hylafax link (Fixes: Bug#21003)
+
+ -- Christophe Le Bars <clebars@debian.org>  Sat, 11 Apr 1998 02:07:55 +0200
+
+hylafax (4.0.2-2) frozen unstable; urgency=medium
+
+  * Fixed a dependency on enscript in hylafax-client (Fixes: Bug#19610)
+  * Fixed copyright path (Fixes: Bug#19329)
+  * Deleted special file (Fixes: Bug#19329)
+
+ -- Christophe Le Bars <clebars@debian.org>  Wed, 25 Mar 1998 00:50:23 +0100
+
+hylafax (4.0.2-1) unstable; urgency=low
+
+  * New upstream release with pristine sources
+  * Added a dependency on mgetty-viewfax in hylafax-client
+  * Patched hfaxd to use /etc/hylafax (#18178)
+  * User can now specify tagline (Bug#18179)
+  * Fixed test on /var/spool/fax/etc in faxsetup (Bug#18346)
+
+ -- Christophe Le Bars <clebars@debian.org>  Tue,  3 Mar 1998 20:07:11 +0100
+
+hylafax (4.0.1-5) unstable; urgency=low
+
+  * Added a dependency on libtiff-tools in hylafax-server (Bug#17818)
+  * Fixed textfmt path in faxsetup (Bug#17834)
+  * Removed a warning message in faxstat (Bug#17835)
+
+ -- Christophe Le Bars <clebars@debian.org>  Mon,  9 Feb 1998 19:49:20 +0000
+
+hylafax (4.0.1-4) unstable; urgency=low
+
+  * Fixed error with old init.d script (Bug#17678)
+  * Added hylafax suffix to man pages (Bug#17681)
+  * Added faxanswer faxabort and faxquit symbolic links (Bug#17727)
+  * Added hylafax-client man pages (Bug#17734)
+  * Moved textfmt to hylafax-client (Bug#17736)
+
+ -- Christophe Le Bars <clebars@debian.org>  Wed,  4 Feb 1998 00:11:25 +0100
+
+hylafax (4.0.1-3) unstable; urgency=low
+
+  * New maintainer
+  * Changed distribution
+  * Built with libc6
+  * Updated to Debian standards
+  * New debian/rules
+  * Fixed sendmail path (Bug#10451)
+  * Fixed FIFO permission problem (Bug#9292)
+  * Closed obsoletes bugs (Bug#9170) (Bug#9171) (Bug#9293)
+
+ -- Christophe Le Bars <clebars@debian.org>  Sun, 25 Jan 1998 16:00:56 +0100
+
+hylafax (4.0.1-2) experimental; urgency=low
+
+  * Incremented debian version number so as not to clash with Christoph
+    Lameter's hylafax package.
+
+ -- Dermot Bradley <bradley@debian.org>  Tue, 15 Apr 1997 12:14:10 +0100
+
+hylafax (4.0.1-1) experimental; urgency=low
+
+  * Initial Release. Some problems.
+  * Looking for someone else to give the finishing touches to the package.
+
+ -- Christoph Lameter <clameter@debian.org>  Fri, 21 Feb 1997 19:34:40 -0800
+
+Local variables:
+mode: debian-changelog
+End:
--- hylafax-4.1.1.orig/debian/README.debian
+++ hylafax-4.1.1/debian/README.debian
@@ -0,0 +1,107 @@
+HylaFAX for Debian
+==================
+
+Welcome to Debian's HylaFAX distribution.
+
+This document contains some notes specific to Debian's HylaFAX packages.
+For general HylaFAX information, please see http://www.hylafax.org.
+
+HylaFAX on Debian is split into three packages:
+
+* hylafax-server:  the tools necessary to run a HylaFAX server that can send
+  and receive facsimiles.  Please note, that you will need hylafax-client as
+  well.
+
+* hylafax-client:  the tools necessary to operate a local or remote HylaFAX
+  server.  Install this package on networked clients.
+
+* hylafax-doc:     HTML documentation on HylaFAX.  Please note, that
+  hylafax-server and hylafax-client come with manpages for the programs they
+  contain, whereas this is a more extensive manual.
+
+
+1. Quick Start
+--------------
+
+To get started, run "faxsetup" to enter your basic configuration and then
+"faxaddmodem" to set up one or more modems (both as root).  If you have a
+send-only environment, you will need to run "faxmodem" on the appropriate
+device.  Alternatively, you should run "faxgetty" which handles incoming fax
+calls.  Have a look at the included QuickStart document in the same
+directory.
+
+The hylafax-server(5) manpage provides a nice overview of the various
+HylaFAX components and how they interact with each other.  For further
+guidance, please refer to the contents of the hylafax-doc package.
+
+
+2. /etc/inittab & faxgetty --------------------------
+
+If you want your system to accept incoming fax calls via one or more modems,
+you will need to run faxgetty on their respective ports.  The postinst script
+of hylafax-server does not modify /etc/inittab anymore.  This is what it used
+to put there, just as an example of how to use faxgetty:
+
+#-- hylafax begin
+# The following is example on how to use faxgetty for your modem lines.
+# Please leave the lines with "hylafax begin" "hylafax end" in this file. If
+# you decide to remove hylafax from this system then the parts between those
+# comments will be erased and your inittab cleaned up.
+
+#S0:23:respawn:/usr/sbin/faxgetty ttyS0
+#S1:23:respawn:/usr/sbin/faxgetty ttyS1
+
+#-- hylafax end
+
+It is fairly straightforward.  If you modify /etc/inittab, make sure you do
+"init q" in order to make init(8) reload it.
+
+
+3. Logging
+----------
+
+Default syslog facility:	local5	
+
+Please also note, that hylafax-server doesn't modify /etc/syslog.conf either
+now.  In order to create a separate log for HylaFAX messages add the
+following line to your /etc/syslog.conf:
+
+local5.*                       -/var/log/hylafax/hylafax.log
+
+and issue an /etc/init.d/syslog reload command to activate the changes.  If
+you are using syslog-ng please consult the appropriate documentation.
+
+
+4. Faxmaster
+------------
+
+Previous versions of hylafax-server used to create alias for faxmaster
+pointing to root.  Since sending email to root is insecure, modifying a file
+belonging to another package is a policy violation and having in mind that
+at least one popular MTA doesn't support /etc/aliases, that behaviour is
+changed and hylafax-server now creates a separate account for the faxmaster.
+By default, this user is disabled, i.e. nobody can login as faxmaster.
+Please create an appropriate alias manually if you want to have
+administrative messages sent to another user.  Alternatively, you can set
+that user's password and have the mail messages retrieved somehow.
+
+
+5. Other notes
+--------------
+
+Default allow users: localhost 
+
+hylafax can't use AdaptiveAnswer without these links:
+	/etc/hylafax/getty-link -> /sbin/mgetty 
+	/etc/hylafax/vgetty-link -> /usr/sbin/vgetty 
+	/etc/hylafax/egetty-link -> /sbin/mgetty 
+
+
+6. Feedback
+-----------
+
+Please use Debian's bug(1) utility to report problems.
+
+
+-- 
+Pavel Tcholakov <pavel@debian.org>
--- hylafax-4.1.1.orig/debian/control
+++ hylafax-4.1.1/debian/control
@@ -0,0 +1,44 @@
+Source: hylafax
+Maintainer: Matthias Klose <doko@debian.org>
+Section: comm
+Priority: extra
+Standards-Version: 3.2.1
+Build-Depends: grep-dctrl, libtiff3g-dev (>= 3.5.5), libtiff-tools (>= 3.5.5), zlib1g-dev (>= 0.95), ed, yada (>= 0.9.9)
+Build-Depends-Indep: grep-dctrl, yada (>= 0.9.9)
+
+Package: hylafax-doc
+Architecture: all
+Section: doc
+Suggests: www-browser, man2html
+Description: Flexible client/server fax software - HTML Documentation
+ HTML version of HylaFAX documentation and manpages.
+ .
+ HylaFAX support the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+
+Package: hylafax-client
+Architecture: any
+Section: comm
+Depends: ${hylafax-client:Depends}, enscript, libpaperg
+Suggests: mgetty-viewfax
+Conflicts: mgetty-fax
+Description: Flexible client/server fax software - client utilities
+ The HylaFAX client software communicates with a HylaFAX server via TCP/IP.
+ .
+ HylaFAX support the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+
+Package: hylafax-server
+Architecture: any
+Section: comm
+Depends: ${hylafax-server:Depends}, libtiff-tools, gs (>= 5.01) | gs-aladdin, hylafax-client, debconf (>= 0.2.17)
+Suggests: hylafax-doc, mgetty
+Conflicts: mgetty-fax
+Description: Flexible client/server fax software - server daemons
+ This package support the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+ .
+ The host running the server must have either a Class 1, Class 2, or a
+ Class 2.0 fax modem attached to one of its serial ports. End-user
+ applications to manage the transmission of documents via facsimile are
+ provided separately by the hylafax-client package.
--- hylafax-4.1.1.orig/debian/security.dpatch-disabled
+++ hylafax-4.1.1/debian/security.dpatch-disabled
@@ -0,0 +1,203 @@
+#PATCHOPTIONS: -p1
+diff -cr hylafax-v4.0pl2.orig/distrules hylafax-v4.0pl2/distrules
+*** hylafax-v4.0pl2.orig/distrules	Sat Feb 14 05:46:33 1998
+--- hylafax-v4.0pl2/distrules	Wed Oct 14 14:22:22 1998
+***************
+*** 75,81 ****
+      html/setup-advanced.html			\
+      html/setup-client.html			\
+      html/source.html				\
+-     html/survey.html				\
+      html/toc.html				\
+      html/troubleshooting.html			\
+      html/upgrade4.0.html			\
+--- 75,80 ----
+***************
+*** 120,127 ****
+      html/install-source.html			\
+      html/modems.html				\
+      html/namechange.html			\
+-     html/survey-help.html			\
+-     html/survey-query.html			\
+      html/version.html				\
+      html/ftpmail-help.html			\
+      html/v2.3beta036special.html		\
+--- 119,124 ----
+***************
+*** 157,163 ****
+      html/tools/man2html.c			\
+      html/tools/unquote.c			\
+      html/tools/manpage.sh.in			\
+-     html/tools/faxsurvey.sh.in			\
+      ${NULL}
+  #
+  # Files that are makeup the HylaFAX
+--- 154,159 ----
+diff -cr hylafax-v4.0pl2.orig/etc/faxaddmodem.sh.in hylafax-v4.0pl2/etc/faxaddmodem.sh.in
+*** hylafax-v4.0pl2.orig/etc/faxaddmodem.sh.in	Sat Feb 14 05:47:03 1998
+--- hylafax-v4.0pl2/etc/faxaddmodem.sh.in	Wed Oct 14 14:22:23 1998
+***************
+*** 85,93 ****
+      exit 1
+  fi
+  
+  SH=$SCRIPT_SH			# shell for use below
+  CPATH=$SPOOL/etc/config		# prefix of configuration file
+! OUT=/tmp/addmodem$$		# temp file in which modem output is recorded
+  SVR4UULCKN=$LIBEXEC/lockname	# SVR4 UUCP lock name construction program
+  ONDELAY=$LIBEXEC/ondelay	# prgm to open devices blocking on carrier
+  CAT="$CAT -u"			# something to do unbuffered reads and writes
+--- 85,99 ----
+      exit 1
+  fi
+  
++ # security
++ TMPDIR=/tmp/.faxaddmodem$$
++ umask 077
++ rm -rf $TMPDIR
++ mkdir $TMPDIR || exit 1
++ 
+  SH=$SCRIPT_SH			# shell for use below
+  CPATH=$SPOOL/etc/config		# prefix of configuration file
+! OUT=$TMPDIR/addmodem$$         # temp file in which modem output is recorded
+  SVR4UULCKN=$LIBEXEC/lockname	# SVR4 UUCP lock name construction program
+  ONDELAY=$LIBEXEC/ondelay	# prgm to open devices blocking on carrier
+  CAT="$CAT -u"			# something to do unbuffered reads and writes
+***************
+*** 219,225 ****
+  done
+  
+  JUNK="$OUT"
+! trap "$RMCMD \$JUNK; exit 1" 0 1 2 15
+  
+  if [ ! -d $UUCP_LOCKDIR ]; then
+      cat<<EOF
+--- 225,231 ----
+  done
+  
+  JUNK="$OUT"
+! trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; exit 1" 0 1 2 15
+  
+  if [ ! -d $UUCP_LOCKDIR ]; then
+      cat<<EOF
+***************
+*** 656,662 ****
+  # Prompt user for server-related configuration parameters
+  # and do consistency checking on what we get.
+  #
+! PROMPTS=/tmp/faxpr$$
+  JUNK="$JUNK $PROMPTS"
+  while isNotOK $ok; do
+      if [ "$ok" != skip ]; then
+--- 662,668 ----
+  # Prompt user for server-related configuration parameters
+  # and do consistency checking on what we get.
+  #
+! PROMPTS=$TMPDIR/faxpr$$
+  JUNK="$JUNK $PROMPTS"
+  while isNotOK $ok; do
+      if [ "$ok" != skip ]; then
+***************
+*** 832,843 ****
+  	echo ""
+  	echo "Hmm, something seems to be hung, check your modem eh?"
+       done)& nagpid=$!
+!     trap "$RMCMD \$JUNK; kill $nagpid \$catpid; exit 1" 0 1 2 15
+! 
+      SendToModem "AT+FCLASS=?" 			# ask for class support
+  
+      kill $nagpid
+!     trap "$RMCMD \$JUNK; test \"\$catpid\" && kill \$catpid; exit 1" 0 1 2 15
+      sleep 1
+  
+      RESULT=`tr -ds '\015' '\012' < $OUT | tail -1`
+--- 838,848 ----
+  	echo ""
+  	echo "Hmm, something seems to be hung, check your modem eh?"
+       done)& nagpid=$!
+!     trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; kill $nagpid \$catpid; exit 1" 0 1 2 15
+      SendToModem "AT+FCLASS=?" 			# ask for class support
+  
+      kill $nagpid
+!     trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 1" 0 1 2 15
+      sleep 1
+  
+      RESULT=`tr -ds '\015' '\012' < $OUT | tail -1`
+***************
+*** 1701,1707 ****
+      prompt "Are these ok [yes]?"; read ok
+  done
+  verifyModemRate
+! TMPSED=/tmp/faxsed$$; JUNK="$JUNK $TMPSED"
+  (echoServerSedCommands; echoModemSedCommands)>$TMPSED
+  
+  #
+--- 1706,1712 ----
+      prompt "Are these ok [yes]?"; read ok
+  done
+  verifyModemRate
+! TMPSED=$TMPDIR/faxsed$$; JUNK="$JUNK $TMPSED"
+  (echoServerSedCommands; echoModemSedCommands)>$TMPSED
+  
+  #
+diff -cr hylafax-v4.0pl2.orig/etc/faxsetup.sh.in hylafax-v4.0pl2/etc/faxsetup.sh.in
+*** hylafax-v4.0pl2.orig/etc/faxsetup.sh.in	Sat Feb 14 05:47:05 1998
+--- hylafax-v4.0pl2/etc/faxsetup.sh.in	Wed Oct 14 14:22:23 1998
+***************
+*** 1942,1952 ****
+  
+  	PROMPTS=/tmp/faxpr$$
+  	JUNK="$JUNK $PROMPTS"
+! 	$RM $PROMPTS
+  
+  	while true; do
+  	    if [ "$ok" != skip ]; then
+! 		test -f $PROMPTS || compilePrompts>$PROMPTS<<EOF
+  #	CountryCode		Country code
+  #	AreaCode		Area code
+  #	LongDistancePrefix	Long distance dialing prefix
+--- 1942,1956 ----
+  
+  	PROMPTS=/tmp/faxpr$$
+  	JUNK="$JUNK $PROMPTS"
+!         $RM -rf $PROMPTS
+  
+  	while true; do
+  	    if [ "$ok" != skip ]; then
+!                 test -f $PROMPTS || (
+!                 set -o noclobber
+!                 > $PROMPTS || exit 1
+!                 set +o noclobber
+!                 compilePrompts>$PROMPTS<<EOF
+  #	CountryCode		Country code
+  #	AreaCode		Area code
+  #	LongDistancePrefix	Long distance dialing prefix
+***************
+*** 1969,1974 ****
+--- 1973,1979 ----
+  C#	MaxSendPages		Max number of pages to permit in an outbound job
+  S	LogFacility		Syslog facility name for ServerTracing messages
+  EOF
++ )
+  		. $PROMPTS
+  	    fi
+  	    checkForLocalFile $DialStringRules "dial string rules"
+diff -cr hylafax-v4.0pl2.orig/etc/probemodem.sh.in hylafax-v4.0pl2/etc/probemodem.sh.in
+*** hylafax-v4.0pl2.orig/etc/probemodem.sh.in	Sat Feb 14 05:47:06 1998
+--- hylafax-v4.0pl2/etc/probemodem.sh.in	Wed Oct 14 14:22:23 1998
+***************
+*** 77,82 ****
+--- 77,88 ----
+  ONDELAY=$LIBEXEC/ondelay	# prgm to open devices blocking on carrier
+  CAT="$CAT -u"			# something to do unbuffered reads and writes
+  
++ # security
++ rm -rf $OUT
++ set -o noclobber
++ > $OUT || exit 1
++ set +o noclobber
++ 
+  while [ -z "$TTY" -o ! -c /dev/$TTY ]; do
+      if [ "$TTY" != "" ]; then
+  	echo "/dev/$TTY is not a terminal device."
+
--- hylafax-4.1.1.orig/debian/libtiff35.dpatch-disabled
+++ hylafax-4.1.1/debian/libtiff35.dpatch-disabled
@@ -0,0 +1,202 @@
+#PATCHOPTIONS: -p0
+--- faxd/CopyQuality.c++	1999/09/02 10:16:22	1.4
++++ faxd/CopyQuality.c++	2000/03/22 12:32:01
+@@ -50,7 +50,7 @@
+     setupDecoder(conf.recvFillOrder, params.is2D());
+ 
+     u_int rowpixels = params.pageWidth();	// NB: assume rowpixels <= 2432
+-    uint16 runs[2*2432];			// run arrays for cur+ref rows
++    uint32 runs[2*2432];			// run arrays for cur+ref rows
+     setRuns(runs, runs+2432, rowpixels);
+ 
+     recvEOLCount = 0;				// count of EOL codes
+--- faxd/G3Decoder.c++	1999/06/13 07:41:03	1.2
++++ faxd/G3Decoder.c++	2000/03/22 12:32:04
+@@ -41,13 +41,13 @@
+     DECLARE_STATE_EOL();						\
+     int a0;				/* reference element */		\
+     int RunLength;			/* length of current run */	\
+-    uint16* pa;				/* place to stuff next run */	\
+-    uint16* thisrun;			/* current row's run array */	\
++    uint32* pa;				/* place to stuff next run */	\
++    uint32* thisrun;			/* current row's run array */	\
+     const TIFFFaxTabEnt* TabEnt
+ #define	DECLARE_STATE_2D()						\
+     DECLARE_STATE();							\
+     int b1;				/* next change on prev line */	\
+-    uint16* pb				/* next run in reference line */
++    uint32* pb				/* next run in reference line */
+ /*
+  * Load any state that may be changed during decoding.
+  */
+@@ -113,7 +113,7 @@
+ }
+ 
+ void
+-G3Decoder::setRuns(uint16* cr, uint16* rr, int w)
++G3Decoder::setRuns(uint32* cr, uint32* rr, int w)
+ {
+     curruns = cr;
+     if (refruns = rr) {
+@@ -134,7 +134,7 @@
+ {
+     u_int rowbytes = howmany(w, 8);
+     if (curruns == NULL) {
+-	uint16 runs[2*2432];		// run arrays for cur+ref rows
++	uint32 runs[2*2432];		// run arrays for cur+ref rows
+ 	setRuns(runs, runs+2432, w);
+ 	while (h-- > 0) {
+ 	    decodeRow(raster, w);
+@@ -235,7 +235,7 @@
+ 	_TIFFFax3fillruns((u_char*) scanline, thisrun, pa, lastx);
+     if (is2D) {
+ 	SETVAL(0);			// imaginary change for reference
+-	SWAP(uint16*, curruns, refruns);
++	SWAP(uint32*, curruns, refruns);
+     }
+     rowref++;
+     UNCACHE_STATE();
+--- faxd/G3Decoder.h	1999/06/13 07:41:03	1.2
++++ faxd/G3Decoder.h	2000/03/22 12:32:05
+@@ -43,8 +43,8 @@
+     int		RTCrun;		// count of consecutive zero-length rows
+     int		rowref;		// reference count of rows decoded
+     int		RTCrow;		// row number of start of RTC
+-    uint16*	refruns;	// runs for reference line
+-    uint16*	curruns;	// runs for current line
++    uint32*	refruns;	// runs for reference line
++    uint32*	curruns;	// runs for current line
+     const u_char* bitmap;	// bit reversal table
+ protected:
+     G3Decoder();
+@@ -68,8 +68,8 @@
+     virtual ~G3Decoder();
+ 
+     void	setupDecoder(u_int fillorder, bool is2D);
+-    void	setRuns(uint16*, uint16*, int);
+-    uint16*	lastRuns();
++    void	setRuns(uint32*, uint32*, int);
++    uint32*	lastRuns();
+ 
+     void	decode(void* raster, u_int w, u_int h);
+     bool	decodeRow(void* scanline, u_int w);
+@@ -92,7 +92,7 @@
+ #define	EOFraised()		(sigsetjmp(jmpEOF, 0) != 0)
+ #define	RTCraised()		(sigsetjmp(jmpRTC, 0) != 0)
+ 
+-inline uint16* G3Decoder::lastRuns()	{ return is2D ? refruns : curruns; }
++inline uint32* G3Decoder::lastRuns()	{ return is2D ? refruns : curruns; }
+ inline const u_char* G3Decoder::getBitmap()	{ return bitmap; }
+ inline int G3Decoder::getPendingBits() const	{ return bit; }
+ inline bool G3Decoder::seenRTC() const	{ return (RTCrow != -1); }
+--- faxd/TagLine.c++	1999/08/23 11:19:34	1.4
++++ faxd/TagLine.c++	2000/03/22 12:32:13
+@@ -208,7 +208,7 @@
+      */
+     TagLineMemoryDecoder dec(buf);
+     dec.setupDecoder(fillorder,  params.is2D());
+-    uint16 runs[2*2432];		// run arrays for cur+ref rows
++    uint32 runs[2*2432];		// run arrays for cur+ref rows
+     dec.setRuns(runs, runs+2432, w);
+ 
+     dec.decode(NULL, w, th);		// discard decoded data
+--- faxd/choptest.c++	1999/06/13 07:41:05	1.2
++++ faxd/choptest.c++	2000/03/22 12:32:14
+@@ -70,7 +70,7 @@
+ }
+ 
+ static bool
+-isBlank(uint16* runs, u_int rowpixels)
++isBlank(uint32* runs, u_int rowpixels)
+ {
+     u_int x = 0;
+     for (;;) {
+@@ -89,7 +89,7 @@
+ {
+     setupDecoder(fillorder,  params.is2D());
+     u_int rowpixels = params.pageWidth();	// NB: assume rowpixels <= 2432
+-    uint16 runs[2*2432];			// run arrays for cur+ref rows
++    uint32 runs[2*2432];			// run arrays for cur+ref rows
+     setRuns(runs, runs+2432, rowpixels);
+ 
+     if (!RTCraised()) {
+--- faxd/cqtest.c++	1999/09/02 10:16:22	1.4
++++ faxd/cqtest.c++	2000/03/22 12:32:16
+@@ -144,7 +144,7 @@
+     setupDecoder(recvFillOrder, params.is2D());
+ 
+     u_int rowpixels = params.pageWidth();	// NB: assume rowpixels <= 2432
+-    uint16 runs[2*2432];			// run arrays for cur+ref rows
++    uint32 runs[2*2432];			// run arrays for cur+ref rows
+     setRuns(runs, runs+2432, rowpixels);
+ 
+     recvEOLCount = 0;				// count of EOL codes
+--- faxd/faxQueueApp.c++	2000/03/08 13:44:06	1.7
++++ faxd/faxQueueApp.c++	2000/03/22 12:32:43
+@@ -805,7 +805,7 @@
+ }
+ 
+ static bool
+-isBlank(uint16* runs, u_int rowpixels)
++isBlank(uint32* runs, u_int rowpixels)
+ {
+     u_int x = 0;
+     for (;;) {
+@@ -824,7 +824,7 @@
+ {
+     setupDecoder(fillorder,  params.is2D());
+     u_int rowpixels = params.pageWidth();	// NB: assume rowpixels <= 2432
+-    uint16 runs[2*2432];			// run arrays for cur+ref rows
++    uint32 runs[2*2432];			// run arrays for cur+ref rows
+     setRuns(runs, runs+2432, rowpixels);
+ 
+     if (!RTCraised()) {
+--- faxd/tagtest.c++	1999/08/23 11:19:35	1.4
++++ faxd/tagtest.c++	2000/03/22 12:32:47
+@@ -236,7 +236,7 @@
+      */
+     MemoryDecoder dec(buf);
+     dec.setupDecoder(fillorder,  params.is2D());
+-    uint16 runs[2*2432];		// run arrays for cur+ref rows
++    uint32 runs[2*2432];		// run arrays for cur+ref rows
+     dec.setRuns(runs, runs+2432, w);
+ 
+     u_int row;
+--- faxd/tif_fax3.h	1998/10/12 20:47:49	1.1.1.1
++++ faxd/tif_fax3.h	2000/03/22 12:32:51
+@@ -43,7 +43,7 @@
+  * The routine must have the type signature given below;
+  * for example:
+  *
+- * fillruns(unsigned char* buf, uint16* runs, uint16* erun, uint32 lastx)
++ * fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
+  *
+  * where buf is place to set the bits, runs is the array of b&w run
+  * lengths (white then black), erun is the last run in the array, and
+@@ -52,7 +52,7 @@
+  * data in the run array as needed (e.g. to append zero runs to bring
+  * the count up to a nice multiple).
+  */
+-typedef	void (*TIFFFaxFillFunc)(unsigned char*, uint16*, uint16*, uint32);
++typedef	void (*TIFFFaxFillFunc)(unsigned char*, uint32*, uint32*, uint32);
+ 
+ /*
+  * The default run filler; made external for other decoders.
+@@ -60,7 +60,7 @@
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+-extern	void _TIFFFax3fillruns(unsigned char*, uint16*, uint16*, uint32);
++extern	void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32);
+ #if defined(__cplusplus)
+ }
+ #endif
+@@ -84,7 +84,7 @@
+ typedef struct {		/* state table entry */
+ 	unsigned char State;	/* see above */
+ 	unsigned char Width;	/* width of code in bits */
+-	uint16	Param;		/* unsigned 16-bit run length in bits */
++	uint32	Param;		/* unsigned 32-bit run length in bits */
+ } TIFFFaxTabEnt;
+ 
+ extern	const TIFFFaxTabEnt TIFFFaxMainTable[];
--- hylafax-4.1.1.orig/debian/html-patch
+++ hylafax-4.1.1/debian/html-patch
@@ -0,0 +1,24 @@
+#!/bin/sh
+ROOT=${1-/usr/doc/hylafax}
+CGI=${2-/cgi-bin}
+PATTERN="@[a-zA-Z][a-zA-Z]*@"
+
+patch()
+{
+chmod +w $1
+ed - $1<<EOF
+g;@CGIPATH@/manpage;s;;$CGI/man2html;g
+g;@CGIPATH@;s;;$CGI;g
+w
+q
+EOF
+chmod -w $1
+}
+
+FILES=`grep -l "$PATTERN" *.html */*.html`
+test "$FILES" && {
+for i in $FILES
+   do
+       echo $i; patch $i;
+   done
+}
--- hylafax-4.1.1.orig/debian/README.mgetty
+++ hylafax-4.1.1/debian/README.mgetty
@@ -0,0 +1,91 @@
+From: Brett Wuth <wuth@castrov.cuug.ab.ca>
+Date: Fri, 1 Jun 2001 04:18:27 -0600 (MDT)
+Subject: hylafax-server: need doc on how to configure with mgetty
+
+[...]
+
+In order to have faxgetty accept data calls it must be configured to
+work with another program (likely mgetty).  Unfortunately the
+documentation isn't explicit on what needs to be done for mgetty.  I
+had to get out the source code of mgetty to figure out these
+options.  The documentation should make note of the following options
+required:
+
+
+------- in /etc/hylafax/config.ttyS1:
+
+ModemSetupAACmd: AT+FAA=1
+AdaptiveAnswer:         yes
+
+#mgetty:
+#  -x 9 : full debugging to /var/log/mgetty/mg_ttyS1.log
+#  -r   : direct line -- don't initialize modem
+#  -b   : non-blocking -- don't wait for ^M before prompting
+#  -s %s: set speed
+#  %l   : set device
+GettyArgs:	"-r -b -s %s %l"
+
+------- in /etc/mgetty/mgetty.config:
+# modem controlled by faxgetty
+port ttyS1
+   # already accepted data call, do not reset
+   toggle-dtr n
+
+
+Perhaps this bug should be logged against mgetty, but it's faxgetty
+that requires these options to be set up.
+
+Perhaps more than just documenting the solution, the hylafax installation
+script should set up the configuration automatically.
+
+These options have been tested with the following modem:
+ati3
+U.S. Robotics 56K Voice INT V4.7.35
+OK      
+ati7                                                                           
+Configuration Profile...                                                       
+                                                                               
+Product type           US/Canada Internal                                      
+Product ID:            66174981                                                
+Options                V32bis,V.80,V.34+,x2, V.90                              
+Fax Options            Class 1/Class 2.0                                       
+Line Options           Caller ID, Distinctive Ring                             
+Voice Options          Speakerphone, TAD                                       
+Clock Freq             92.0Mhz                                                 
+EPROM                  256k                                                    
+RAM                    32k                                                     
+                                                                               
+FLASH date             4/22/98                                                 
+FLASH rev              4.7.35                                                  
+                                                                               
+DSP date               4/22/98                                                 
+DSP rev                4.7.35                                                  
+                                                                               
+OK                                                                             
+
+
+
+-- System Information
+Debian Release: 2.2
+Kernel Version: Linux castrov 2.2.18pre21 #1 Sat Nov 18 18:47:15 EST 2000 i486 unknown
+
+Versions of the packages hylafax-server depends on:
+hi  libtiff3g      3.4beta037-5.1 tiff runtime library [libc6]
+ii  gs             5.10-10.1      Postscript interpreter with X11 and svgalib 
+ii  libc6          2.1.3-18       GNU C Library: Shared libraries and Timezone
+ii  libjpeg62      6b-1.2         The Independent JPEG Group's JPEG runtime li
+ii  libstdc++2.9   2.91.61-1      The GNU stdc++ library (egcs version)
+ii  libtiff-tools  3.5.4-5        TIFF manipulation and conversion tools
+ii  zlib1g         1.1.3-5        compression library - runtime
+
+--- Begin /etc/hylafax/config (modified conffile)
+LogFacility:		local5
+CountryCode:		1
+AreaCode:		403
+LongDistancePrefix:	1
+InternationalPrefix:	011
+DialStringRules:	etc/dialrules
+ServerTracing:		1
+
+--- End /etc/hylafax/config
+
--- hylafax-4.1.1.orig/debian/rules
+++ hylafax-4.1.1/debian/rules
@@ -0,0 +1,757 @@
+#! /usr/bin/make -f
+# Generated automatically from debian/packages
+# by yada v0.9.9, of Tue, 07 Dec 1999
+# Modified by Piotr Roszatycki <dexter@debian.org>, Mon,  1 Oct 2001 13:14:11 +0200
+
+DEB_HOST_GNU_CPU    := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+DEB_HOST_GNU_TYPE   := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
+
+DEB_BUILD_GNU_CPU    := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
+DEB_BUILD_GNU_TYPE   := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+
+VERSION:=$(shell LC_ALL=C dpkg-parsechangelog | sed -ne 's/^Version: *\([^2]*\)/\1/p')
+
+SHELL=/bin/bash
+
+.PHONY: default
+default:
+	@echo "Specify a target:"; \
+	echo " build              compile the package"; \
+	echo " binary             make all binary packages"; \
+	echo " binary-arch        make all architecture-dependent binary packages"; \
+	echo " binary-indep       make all architecture-independent binary packages"; \
+	echo " clean              clean up the source package"; \
+	echo; \
+	echo " depends            check build-time dependencies"; \
+	echo " patch              apply patches from debian/*.dpatch"; \
+	echo " unpatch            unapply patches from debian/*.dpatch{,disabled}"; \
+	echo " install-tree       compile the package and create the install trees"; \
+	echo " clean-install-tree clean up only under debian/"; \
+	echo
+
+# Check build dependencies and conflicts
+
+.PHONY: depends
+depends: chmod-yada debian/depends-stamp
+debian/depends-stamp:
+	@echo 'Checking build conflicts and dependencies; just a minute...'
+	@echo -n 'grep-dctrl...'; v=$$(grep-status -X -F Package 'grep-dctrl' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'grep-dctrl (virtual package)...'; v=$$(grep-status -e -F Provides '(^grep-dctrl, |, grep-dctrl$$|^grep-dctrl$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	    exit 0; \
+	fi; \
+	echo 'Build depends on `grep-dctrl'\'' (any version), which is not satisfied' | fmt; exit 1
+	@echo -n 'libtiff3g-dev...'; v=$$(grep-status -X -F Package 'libtiff3g-dev' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'libtiff3g-dev (virtual package)...'; v=$$(grep-status -e -F Provides '(^libtiff3g-dev, |, libtiff3g-dev$$|^libtiff3g-dev$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	  if dpkg --compare-versions "$$v" '>=' '3.5.5'; then \
+	    exit 0; \
+	  fi; \
+	fi; \
+	echo 'Build depends on `libtiff3g-dev'\'' (version >= 3.5.5), which is not satisfied' | fmt; exit 1
+	@echo -n 'libtiff-tools...'; v=$$(grep-status -X -F Package 'libtiff-tools' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'libtiff-tools (virtual package)...'; v=$$(grep-status -e -F Provides '(^libtiff-tools, |, libtiff-tools$$|^libtiff-tools$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	  if dpkg --compare-versions "$$v" '>=' '3.5.5'; then \
+	    exit 0; \
+	  fi; \
+	fi; \
+	echo 'Build depends on `libtiff-tools'\'' (version >= 3.5.5), which is not satisfied' | fmt; exit 1
+	@echo -n 'zlib1g-dev...'; v=$$(grep-status -X -F Package 'zlib1g-dev' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'zlib1g-dev (virtual package)...'; v=$$(grep-status -e -F Provides '(^zlib1g-dev, |, zlib1g-dev$$|^zlib1g-dev$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	  if dpkg --compare-versions "$$v" '>=' '0.95'; then \
+	    exit 0; \
+	  fi; \
+	fi; \
+	echo 'Build depends on `zlib1g-dev'\'' (version >= 0.95), which is not satisfied' | fmt; exit 1
+	@echo -n 'ed...'; v=$$(grep-status -X -F Package 'ed' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'ed (virtual package)...'; v=$$(grep-status -e -F Provides '(^ed, |, ed$$|^ed$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	    exit 0; \
+	fi; \
+	echo 'Build depends on `ed'\'' (any version), which is not satisfied' | fmt; exit 1
+	@echo -n 'yada...'; v=$$(grep-status -X -F Package 'yada' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'yada (virtual package)...'; v=$$(grep-status -e -F Provides '(^yada, |, yada$$|^yada$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	  if dpkg --compare-versions "$$v" '>=' '0.9.9'; then \
+	    exit 0; \
+	  fi; \
+	fi; \
+	echo 'Build depends on `yada'\'' (version >= 0.9.9), which is not satisfied' | fmt; exit 1
+	@echo -n 'grep-dctrl...'; v=$$(grep-status -X -F Package 'grep-dctrl' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'grep-dctrl (virtual package)...'; v=$$(grep-status -e -F Provides '(^grep-dctrl, |, grep-dctrl$$|^grep-dctrl$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	    exit 0; \
+	fi; \
+	echo 'Build depends on `grep-dctrl'\'' (any version), which is not satisfied' | fmt; exit 1
+	@echo -n 'yada...'; v=$$(grep-status -X -F Package 'yada' | grep Version | head -1 | sed -e 's/^Version: //'); \
+	if test ! "$$v"; then echo -n 'yada (virtual package)...'; v=$$(grep-status -e -F Provides '(^yada, |, yada$$|^yada$$)' | grep Version | head -1 | sed -e 's/^Version: //'); fi; \
+	if test "$$v"; then \
+	  if dpkg --compare-versions "$$v" '>=' '0.9.9'; then \
+	    exit 0; \
+	  fi; \
+	fi; \
+	echo 'Build depends on `yada'\'' (version >= 0.9.9), which is not satisfied' | fmt; exit 1
+	@echo
+	@echo 'Conflicts and dependencies all satisfied!'
+	touch debian/depends-stamp
+
+.PHONY: patch unpatch
+# Apply patches matching `debian/*.dpatch' to the source tree,
+# and unapply any applied patches `debian/*.dpatch.disabled'
+patch: chmod-yada debian/patch-stamp
+debian/patch-stamp:
+	@set -e; backupdirs=$$(ls -d debian/backup-* 2>/dev/null | wc -l); \
+	if test $$backupdirs -gt 1; then \
+	  echo "*** Yada error: There are multiple debian/backup-* directories."; \
+	  echo "***             I can't cope.  Please clean up for me."; \
+	  exit 1; \
+	fi; \
+	if test $$backupdirs = 1; then \
+	  patchname="$$(echo debian/backup-* | sed 's=^debian/backup-==')"; \
+	  echo "*** Cleaning up after interrupted patching run for $$patchname"; \
+	  if test -f "debian/patch-$$patchname-applied"; then \
+	    rm -rf "debian/backup-$$patchname"; \
+	  else \
+	    (cd "debian/backup-$$patchname"; find . -type f -print0) | xargs -0ri mv -f -- debian/backup-$$patchname/{} {}; \
+	    find "debian/backup-$$patchname" -depth -type d -exec rmdir '{}' \;; \
+	    if test -e "debian/backup-$$patchname"; then \
+	      echo "*** Yada error: I could not recover cleanly from an interrupted patch."; \
+	      echo "***             I can't cope.  Please clean up for me."; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	fi
+
+	@set -e; backdowndirs=$$(ls -d debian/backdown-* 2>/dev/null | wc -l); \
+	if test $$backdowndirs -gt 1; then \
+	  echo "*** Yada error: There are multiple debian/backdown-* directories."; \
+	  echo "***             I can't cope.  Please clean up for me."; \
+	  exit 1; \
+	fi; \
+	if test $$backdowndirs = 1; then \
+	  patchname="$$(echo debian/backdown-* | sed 's=^debian/backdown-==')"; \
+	  echo "*** Cleaning up after interrupted unpatching run for $$patchname"; \
+	  if test ! -f "debian/patch-$$patchname-applied"; then \
+	    rm -rf "debian/backdown-$$patchname"; \
+	  else \
+	    (cd "debian/backdown-$$patchname"; find . -type f -print0) | xargs -0ri mv -f -- debian/backdown-$$patchname/{} {}; \
+	    find "debian/backdown-$$patchname" -depth -type d -exec rmdir '{}' \;; \
+	    if test -e "debian/backdown-$$patchname"; then \
+	      echo "*** Yada error: I could not recover cleanly from an interrupted patch."; \
+	      echo "***             I can't cope.  Please clean up for me."; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	fi
+
+	@set -e; for stampfile in debian/patch-*-applied; do \
+	  if test -f "$$stampfile"; then \
+	    patchname="$$(echo "$$stampfile" | sed 's=^debian/patch-\(.*\)-applied$$=\1=')"; \
+	    patchfile="debian/$$patchname.disabled"; \
+	    if test -f "$$patchfile"; then \
+	      echo "*** $$patchfile is now disabled; patching it out"; \
+	      patchoptions="$$(sed -n '/^#PATCHOPTIONS:/{;s/^[^:]*://;p;q;}' <"$$patchfile")"; \
+	      patch -R -f -i "$$patchfile" -b -V simple -B "debian/backdown-$$patchname/" $$patchoptions; \
+	      rm -f "$$stampfile"; \
+	      rm -rf "debian/backdown-$$patchname"; \
+	    fi; \
+	  fi; \
+	done
+
+	@set -e; for patchfile in debian/*.dpatch; do \
+	  if test -f "$$patchfile"; then \
+	    patchname="$$(echo "$$patchfile" | sed 's=^debian/==')"; \
+	    stampfile="debian/patch-$$patchname-applied"; \
+	    if test ! -f "$$stampfile"; then \
+	      echo "*** Applying patch from $$patchname"; \
+	      patchoptions="$$(sed -n '/^#PATCHOPTIONS:/{;s/^[^:]*://;p;q;}' <"$$patchfile")"; \
+	      patch -N -f -i "$$patchfile" -b -V simple -B "debian/backup-$$patchname/" $$patchoptions; \
+	      touch "$$stampfile"; \
+	      rm -rf "debian/backup-$$patchname"; \
+	    fi; \
+	  fi; \
+	done
+
+	touch debian/patch-stamp
+
+# Remove all managed patches from the source tree
+unpatch: chmod-yada
+	@set -e; backupdirs=$$(ls -d debian/backup-* 2>/dev/null | wc -l); \
+	if test $$backupdirs -gt 1; then \
+	  echo "*** Yada error: There are multiple debian/backup-* directories."; \
+	  echo "***             I can't cope.  Please clean up for me."; \
+	  exit 1; \
+	fi; \
+	if test $$backupdirs = 1; then \
+	  patchname="$$(echo debian/backup-* | sed 's=^debian/backup-==')"; \
+	  echo "*** Cleaning up after interrupted patching run for $$patchname"; \
+	  if test -f "debian/patch-$$patchname-applied"; then \
+	    rm -rf "debian/backup-$$patchname"; \
+	  else \
+	    (cd "debian/backup-$$patchname"; find . -type f -print0) | xargs -0ri mv -f -- debian/backup-$$patchname/{} {}; \
+	    find "debian/backup-$$patchname" -depth -type d -exec rmdir '{}' \;; \
+	    if test -e "debian/backup-$$patchname"; then \
+	      echo "*** Yada error: I could not recover cleanly from an interrupted patch."; \
+	      echo "***             I can't cope.  Please clean up for me."; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	fi
+
+	@set -e; backdowndirs=$$(ls -d debian/backdown-* 2>/dev/null | wc -l); \
+	if test $$backdowndirs -gt 1; then \
+	  echo "*** Yada error: There are multiple debian/backdown-* directories."; \
+	  echo "***             I can't cope.  Please clean up for me."; \
+	  exit 1; \
+	fi; \
+	if test $$backdowndirs = 1; then \
+	  patchname="$$(echo debian/backdown-* | sed 's=^debian/backdown-==')"; \
+	  echo "*** Cleaning up after interrupted unpatching run for $$patchname"; \
+	  if test ! -f "debian/patch-$$patchname-applied"; then \
+	    rm -rf "debian/backdown-$$patchname"; \
+	  else \
+	    (cd "debian/backdown-$$patchname"; find . -type f -print0) | xargs -0ri mv -f -- debian/backdown-$$patchname/{} {}; \
+	    find "debian/backdown-$$patchname" -depth -type d -exec rmdir '{}' \;; \
+	    if test -e "debian/backdown-$$patchname"; then \
+	      echo "*** Yada error: I could not recover cleanly from an interrupted patch."; \
+	      echo "***             I can't cope.  Please clean up for me."; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	fi
+
+	@set -e; for stampfile in debian/patch-*-applied; do \
+	  if test -f "$$stampfile"; then \
+	    patchname="$$(echo "$$stampfile" | sed 's=^debian/patch-\(.*\)-applied$$=\1=')"; \
+	    patchfile="debian/$$patchname"; \
+	    if test ! -f "$$patchfile"; then \
+	      patchfile="$$patchfile.disabled"; \
+	    fi; \
+	    if test -f "$$patchfile"; then \
+	      echo "*** Removing patch from $$patchname"; \
+	      patchoptions="$$(sed -n '/^#PATCHOPTIONS:/{;s/^[^:]*://;p;q;}' <"$$patchfile")"; \
+	      patch -R -f -i "$$patchfile" -b -V simple -B "debian/backdown-$$patchname/" $$patchoptions; \
+	      rm -f "$$stampfile"; \
+	      rm -rf "debian/backdown-$$patchname"; \
+	    else \
+	      echo "*** Yada warning: Cannot find a patchfile named \`$$patchname' to unapply"; \
+	    fi; \
+	  fi; \
+	done
+
+	rm -f debian/patch-stamp
+
+# Build the package and prepare the install tree
+
+.PHONY: build-only build
+build-only: debian/build-stamp
+build: chmod-yada build-only
+
+# Make sure these rules and the control file are up-to-date
+
+.PHONY: rules control
+rules: debian/rules
+debian/rules: $(shell which yada) debian/packages
+	$(shell which yada) rebuild rules
+
+control: debian/control
+debian/control: $(shell which yada) debian/packages
+	$(shell which yada) rebuild control
+
+debian/build-stamp: debian/depends-stamp debian/patch-stamp
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	@umask 022 \
+	    && export PACKAGE="hylafax" \
+	    && export VERSION="$(VERSION)" \
+	    && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
+	    && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
+	    && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
+	    && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
+	    && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
+	    && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" \
+ && (\
+	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
+	echo -E 'yes | CXX=c++ ./configure';\
+	echo -E 'make all COPTIONS="-O2 -g -Wall"') | /bin/sh
+	touch debian/build-stamp
+
+.PHONY: install-tree
+install-tree: chmod-yada install-tree-any
+install-tree-any: \
+	debian/tmp-hylafax-doc/DEBIAN/control \
+	debian/tmp-hylafax-client/DEBIAN/control \
+	debian/tmp-hylafax-server/DEBIAN/control
+
+debian/tmp-hylafax-doc/DEBIAN/control: debian/build-stamp debian/control
+	rm -rf debian/tmp-hylafax-doc
+	umask 022 && install -d debian/tmp-hylafax-doc/DEBIAN
+	install -d debian/tmp-hylafax-doc/usr/share/doc/hylafax-doc
+	umask 022; $(shell which yada) generate copyright \
+	                       >debian/tmp-hylafax-doc/usr/share/doc/hylafax-doc/copyright
+	install -m 644 -p debian/changelog \
+	                  debian/tmp-hylafax-doc/usr/share/doc/hylafax-doc/changelog.Debian
+	@umask 022 \
+	    && export PACKAGE="hylafax-doc" \
+	    && export ROOT="$$(pwd)/debian/tmp-hylafax-doc" \
+	    && export CONTROL="$$(pwd)/debian/tmp-hylafax-doc/DEBIAN" \
+	    && export VERSION="$(VERSION)" \
+	    && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
+	    && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
+	    && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
+	    && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
+	    && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
+	    && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" \
+ && (\
+	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
+	echo -E '	# HTML docs';\
+	echo -E '	#yada install -into /usr/lib/cgi-bin html/tools/unquote';\
+	echo -E '	yada install -doc -subdir html html/acknowledge.html';\
+	echo -E '	yada install -doc -subdir html html/binary.html';\
+	echo -E '	yada install -doc -subdir html html/building.html';\
+	echo -E '	yada install -doc -subdir html html/class1.html';\
+	echo -E '	yada install -doc -subdir html html/class2.0.html';\
+	echo -E '	yada install -doc -subdir html html/class2.html';\
+	echo -E '	yada install -doc -subdir html html/contrib.html';\
+	echo -E '	yada install -doc -subdir html html/copyright.html';\
+	echo -E '	yada install -doc -subdir html html/documentation.html';\
+	echo -E '	yada install -doc -subdir html html/faxgateway.html';\
+	echo -E '	yada install -doc -subdir html html/ftpmail-help.html';\
+	echo -E '	yada install -doc -subdir html html/ghostscript.html';\
+	echo -E '	yada install -doc -subdir html html/HOWTO.html';\
+	echo -E '	yada install -doc -subdir html html/hylafax3.0.html';\
+	echo -E '	yada install -doc -subdir html html/hylafax4.0.html';\
+	echo -E '	yada install -doc -subdir html html/index.html';\
+	echo -E '	yada install -doc -subdir html html/install-source.html';\
+	echo -E '	yada install -doc -subdir html html/ixotap.html';\
+	echo -E '	yada install -doc -subdir html html/mailing-lists.html';\
+	echo -E '	yada install -doc -subdir html html/modems.html';\
+	echo -E '	yada install -doc -subdir html html/namechange.html';\
+	echo -E '	yada install -doc -subdir html html/operation.html';\
+	echo -E '	yada install -doc -subdir html html/overview.html';\
+	echo -E '	yada install -doc -subdir html html/sam.html';\
+	echo -E '	yada install -doc -subdir html html/matthias.html';\
+	echo -E '	yada install -doc -subdir html html/setup-advanced.html';\
+	echo -E '	yada install -doc -subdir html html/setup-client.html';\
+	echo -E '	yada install -doc -subdir html html/setup.html';\
+	echo -E '	yada install -doc -subdir html html/source.html';\
+	echo -E '	yada install -doc -subdir html html/toc.html';\
+	echo -E '	yada install -doc -subdir html html/troubleshooting.html';\
+	echo -E '	yada install -doc -subdir html html/upgrade4.0.html';\
+	echo -E '	yada install -doc -subdir html html/v2.3beta036.html';\
+	echo -E '	yada install -doc -subdir html html/v2.3beta036special.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta096.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta100.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta108.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta110.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta111.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta112.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta113.html';\
+	echo -E '	yada install -doc -subdir html html/v3.0beta114.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta005.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta006.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta007.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta008.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta009.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta010.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta011.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta012.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta013.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta014.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta015.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta018.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta020.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta021.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta022.html';\
+	echo -E '	yada install -doc -subdir html html/v4.0beta023.html';\
+	echo -E '	yada install -doc -subdir html html/version.html';\
+	echo -E '	yada install -doc -subdir html/Majordomo html/Majordomo/help.html';\
+	echo -E '	yada install -doc -subdir html/Modems/Hayes html/Modems/Hayes/hayes.html';\
+	echo -E '	yada install -doc -subdir html/Modems/Supra html/Modems/Supra/class1.html';\
+	echo -E '	yada install -doc -subdir html/Modems/Supra html/Modems/Supra/class2.html';\
+	echo -E '	yada install -doc -subdir html/Modems/Telebit html/Modems/Telebit/faxcmds.html';\
+	echo -E '	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/autodetect.html';\
+	echo -E '	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/codes.html';\
+	echo -E '	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/commands.html';\
+	echo -E '	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/compression.html';\
+	echo -E '	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/examples.html';\
+	echo -E '	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/voice.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/att-dataport.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/digicom-scout.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/everex-2496d.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/hayes-optima2400.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/index.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/multitech-1432.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/multitech-1932.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/nuvo-96424pfx.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/ppi-pm14400fxmt.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/supra-v32bis.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/telebit-t3000.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/twincom-144df.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/ucom-traveller96.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/usr-courier.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/usr-sportster.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/zyxel-1496.html';\
+	echo -E '	#yada install -doc -subdir html/Modems html/Modems/K56flex.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/multitech-2834.html';\
+	echo -E '	yada install -doc -subdir html/Modems html/Modems/hayes-accura288.html';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/at_work_icon.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/ball_blue_icon.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/button.excl.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/back.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/frog.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/improved.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/info_icon.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/new.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/next.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/smiley.gif';\
+	echo -E '	yada install -doc -subdir html/icons html/icons/warning_icon.gif';\
+	echo -E '	yada install -doc -subdir html html/sam.gif';\
+	echo -E '	yada install -doc -subdir html html/matthias.gif';\
+	echo -E '	yada install -doc -subdir html html/hylafax.gif';\
+	echo -E '	# Needed for doc-base';\
+	echo -E '	yada install -into /usr/share/doc-base debian/doc-base -as hylafax';\
+	echo -E '	# fixes some relative paths';\
+	echo -E '	chmod +x debian/html-patch';\
+	echo -E '	(cd debian/tmp-hylafax-doc/usr/share/doc/hylafax-doc/html && \';\
+	echo -E '	 ../../../../../../html-patch /usr/share/doc/hylafax-doc /cgi-bin)';\
+	echo -E '	chmod -R u+w debian/tmp-hylafax-doc/usr/share/doc/') | /bin/sh
+	$(shell which yada) compress hylafax-doc
+	$(shell which yada) generate maintscripts hylafax-doc
+	find debian/tmp-hylafax-doc -type f -print \
+	  | sed -n 's/^debian\/tmp-hylafax-doc\(\/etc\/.*\)$$/\1/p' \
+	    > debian/tmp-hylafax-doc/DEBIAN/conffiles
+	if test ! -s debian/tmp-hylafax-doc/DEBIAN/conffiles; then rm -f debian/tmp-hylafax-doc/DEBIAN/conffiles; fi
+	$(shell which yada) rebuild control
+	$(shell which yada) generate substvars hylafax-doc
+	umask 022 && dpkg-gencontrol -isp -phylafax-doc -Pdebian/tmp-hylafax-doc
+
+debian/tmp-hylafax-client/DEBIAN/control: debian/build-stamp debian/control
+	rm -rf debian/tmp-hylafax-client
+	umask 022 && install -d debian/tmp-hylafax-client/DEBIAN
+	install -d debian/tmp-hylafax-client/usr/share/doc/hylafax-client
+	umask 022; $(shell which yada) generate copyright \
+	                       >debian/tmp-hylafax-client/usr/share/doc/hylafax-client/copyright
+	install -m 644 -p debian/changelog \
+	                  debian/tmp-hylafax-client/usr/share/doc/hylafax-client/changelog.Debian
+	@umask 022 \
+	    && export PACKAGE="hylafax-client" \
+	    && export ROOT="$$(pwd)/debian/tmp-hylafax-client" \
+	    && export CONTROL="$$(pwd)/debian/tmp-hylafax-client/DEBIAN" \
+	    && export VERSION="$(VERSION)" \
+	    && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
+	    && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
+	    && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
+	    && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
+	    && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
+	    && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" \
+ && (\
+	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
+	echo -E '	yada install -conffile -subdir hylafax debian/hyla.conf';\
+	echo -E '	yada install -conffile -subdir hylafax debian/faxcover.ps';\
+	echo -E '	yada install -conffile -subdir hylafax faxmail/faxmail.ps';\
+	echo -E '	yada install -conffile -subdir hylafax util/pagesizes';\
+	echo -E '	yada install -conffile -subdir hylafax util/typerules';\
+	echo -E '	yada install -bin util/textfmt';\
+	echo -E '	yada install -bin faxalter/faxalter';\
+	echo -E '	yada install -bin faxcover/faxcover';\
+	echo -E '	yada install -bin faxmail/faxmail';\
+	echo -E '	yada install -bin faxrm/faxrm';\
+	echo -E '	yada install -bin faxstat/faxstat';\
+	echo -E '	yada install -bin sendfax/sendfax';\
+	echo -E '	yada install -bin sendpage/sendpage';\
+	echo -E '	# Client manpages';\
+	echo -E '	yada install -man man/cman.files/pagesizes.4f -section 5 -as pagesizes.5hylafax';\
+	echo -E '	yada install -man man/cman.files/typerules.4f -section 5 -as typerules.5hylafax';\
+	echo -E '	yada install -man man/cman.apps/faxalter.1 -section 1 -as faxalter.1hylafax';\
+	echo -E '	yada install -man man/cman.apps/faxcover.1 -section 1 -as faxcover.1hylafax';\
+	echo -E '	yada install -man man/cman.apps/faxmail.1 -section 1 -as faxmail.1hylafax';\
+	echo -E '	yada install -man man/cman.apps/faxrm.1 -section 1 -as faxrm.1hylafax';\
+	echo -E '	yada install -man man/cman.apps/faxstat.1 -section 1 -as faxstat.1hylafax';\
+	echo -E '	yada install -man man/cman.apps/sendfax.1 -section 1 -as sendfax.1hylafax';\
+	echo -E '	yada install -man man/cman.apps/sendpage.1 -section 1 -as sendpage.1hylafax';\
+	echo -E '	yada install -man man/cman.apps/textfmt.1 -section 1 -as textfmt.1hylafax') | /bin/sh
+	LD_LIBRARY_PATH="debian/tmp-hylafax-client/lib:debian/tmp-hylafax-client/usr/lib:$$LD_LIBRARY_PATH" dpkg-shlibdeps -pshlibs:hylafax-client -dDepends debian/tmp-hylafax-client/usr/bin/*
+	$(shell which yada) compress hylafax-client
+	$(shell which yada) generate maintscripts hylafax-client
+	find debian/tmp-hylafax-client -type f -print \
+	  | sed -n 's/^debian\/tmp-hylafax-client\(\/etc\/.*\)$$/\1/p' \
+	    > debian/tmp-hylafax-client/DEBIAN/conffiles
+	if test ! -s debian/tmp-hylafax-client/DEBIAN/conffiles; then rm -f debian/tmp-hylafax-client/DEBIAN/conffiles; fi
+	$(shell which yada) rebuild control
+	$(shell which yada) generate substvars hylafax-client
+	umask 022 && dpkg-gencontrol -isp -phylafax-client -Pdebian/tmp-hylafax-client
+
+debian/tmp-hylafax-server/DEBIAN/control: debian/build-stamp debian/control
+	rm -rf debian/tmp-hylafax-server
+	umask 022 && install -d debian/tmp-hylafax-server/DEBIAN
+	install -d debian/tmp-hylafax-server/usr/share/doc/hylafax-server
+	umask 022; $(shell which yada) generate copyright \
+	                       >debian/tmp-hylafax-server/usr/share/doc/hylafax-server/copyright
+	install -m 644 -p debian/changelog \
+	                  debian/tmp-hylafax-server/usr/share/doc/hylafax-server/changelog.Debian
+	@umask 022 \
+	    && export PACKAGE="hylafax-server" \
+	    && export ROOT="$$(pwd)/debian/tmp-hylafax-server" \
+	    && export CONTROL="$$(pwd)/debian/tmp-hylafax-server/DEBIAN" \
+	    && export VERSION="$(VERSION)" \
+	    && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
+	    && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
+	    && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
+	    && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
+	    && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
+	    && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" \
+ && (\
+	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
+	echo -E '	yada install -data -into /DEBIAN debian/hylafax-server.templates -as templates';\
+	echo -E '	yada install -data -into /usr/share/doc/hylafax-server debian/README.mgetty debian/README.debian debian/QuickStart';\
+	echo -E '	yada install -data -into /usr/share/doc/hylafax-server TODO CONTRIBUTORS';\
+	echo -E '	yada install -data -into /usr/share/doc/hylafax-server CHANGES -as changelog';\
+	echo -E '	yada install -conffile -exec -subdir cron.weekly debian/cron.weekly -as hylafax';\
+	echo -E '	yada install -conffile -exec -subdir cron.monthly debian/cron.monthly -as hylafax';\
+	echo -E '	yada install -conffile -exec -subdir init.d debian/init.d -as hylafax';\
+	echo -E '	yada install -conffile -subdir hylafax debian/hosts.hfaxd';\
+	echo -E '	yada install -conffile -subdir hylafax hfaxd/hfaxd.conf';\
+	echo -E '	yada install -conffile -subdir hylafax util/cover.templ';\
+	echo -E '	yada install -conffile -subdir hylafax etc/dialrules';\
+	echo -E '	yada install -conffile -subdir hylafax etc/dialrules.sf-ba';\
+	echo -E '	yada install -conffile -subdir hylafax etc/dialrules.europe';\
+	echo -E '	yada install -conffile -subdir hylafax debian/hylafax.config -as config';\
+	echo -E '	yada install -conffile -subdir hylafax etc/lutRS18.pcf';\
+	echo -E '	#yada install -lib util/libfaxutil.so.4.0.1 faxd/libfaxserver.so.4.0.1';\
+	echo -E '	#ln -s /usr/lib/libfaxutil.so.4.0.1 /usr/lib/libfaxutil.so';\
+	echo -E '	#ln -s /usr/lib/libfaxserver.so.4.0.1 /usr/lib/libfaxserver.so';\
+	echo -E '	yada install -bin -into /usr/sbin util/faxmsg util/faxconfig util/faxmodem util/faxstate util/faxwatch util/faxinfo util/tiffcheck';\
+	echo -E '	yada install -bin -into /usr/sbin util/typetest -as typetest';\
+	echo -E '	yada install -bin -into /usr/sbin util/dialtest -as dialtest';\
+	echo -E '	yada install -bin -into /usr/sbin util/faxadduser -as faxadduser';\
+	echo -E '	yada install -bin -unstripped -into /usr/sbin util/xferfaxstats.sh -as xferfaxstats';\
+	echo -E '	yada install -bin -unstripped -into /usr/sbin util/recvstats.sh -as recvstats';\
+	echo -E '	yada install -bin -unstripped -into /usr/sbin util/faxcron.sh -as faxcron';\
+	echo -E '	yada install -bin -into /usr/sbin faxd/faxq faxd/faxqclean faxd/faxgetty faxd/faxsend faxd/pagesend faxd/tsitest faxd/tagtest faxd/cqtest faxd/choptest';\
+	echo -E '	yada install -bin -into /usr/sbin hfaxd/hfaxd';\
+	echo -E '	yada install -bin -unstripped -into /usr/sbin etc/faxaddmodem.sh -as faxaddmodem';\
+	echo -E '	yada install -bin -unstripped -into /usr/sbin etc/faxsetup.sh -as faxsetup';\
+	echo -E '	yada install -bin -unstripped -into /usr/sbin etc/probemodem.sh -as probemodem';\
+	echo -E '	yada install -bin -into /usr/sbin etc/lockname etc/ondelay';\
+	echo -E '	yada install -dir /var/log/hylafax';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/ps2fax.gs.sh -as ps2fax.gs';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/pdf2fax.gs.sh -as pdf2fax.gs';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/pcl2fax.sh -as pcl2fax';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/tiff2fax.sh -as tiff2fax';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/notify.sh -as notify';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/notify.awk';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/faxrcvd.sh -as faxrcvd';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/pollrcvd.sh -as pollrcvd';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/mkcover.sh -as mkcover';\
+	echo -E '	yada install -bin -unstripped -into /var/spool/hylafax/bin util/wedged.sh -as wedged';\
+	echo -E '	yada install -dir /var/spool/hylafax/client';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/class1';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/class2';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/class2.0';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/skel';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/att-dataport-2';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/att-dataport-2.0';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/att-dataport';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/cirrus';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/dsi-scout+';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/e-tech';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/everex-2496d';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/exar';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/gvc-288';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/gvc-288-2';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/intel-400e';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/moto-288';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/mt-1432';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/nuvo-voyager';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/ppi-pm14400fxmt';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/ppi-pm14400fxsa';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/rc144ac';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/rc144ac-1';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/rc288dpi';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/rc288dpi-1';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/rc32acl';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/rc32acl-1';\
+	echo -E '	#yada install -data -into /var/spool/hylafax/config config/rockwell';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/telebit-t3000';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/telebit-qblazer';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/telebit-wb';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/tricom2842';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/uds-fastalk';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/usr-2.0';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/usr-rts';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/usr-xon';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/zyxel-1496e';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/zyxel-1496e-1';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/zyxel-1496e-2.0';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/zyxel-2864';\
+	echo -E '	yada install -data -into /var/spool/hylafax/config config/sierra';\
+	echo -E '	yada install -dir /var/spool/hylafax/dev';\
+	echo -E '	yada install -dir /var/spool/hylafax/info';\
+	echo -E '	yada install -dir /var/spool/hylafax/log';\
+	echo -E '	yada install -dir /var/spool/hylafax/recvq';\
+	echo -E '	yada install -dir /var/spool/hylafax/status';\
+	echo -E '	yada install -dir /var/spool/hylafax/sendq';\
+	echo -E '	yada install -dir /var/spool/hylafax/doneq';\
+	echo -E '	yada install -dir /var/spool/hylafax/docq';\
+	echo -E '	yada install -dir /var/spool/hylafax/tmp';\
+	echo -E '	yada install -dir /var/spool/hylafax/pollq';\
+	echo -E '	yada install -dir /var/spool/hylafax/archive';\
+	echo -E '	ln -s faxmsg debian/tmp-hylafax-server/usr/sbin/faxanswer';\
+	echo -E '	ln -s faxmsg debian/tmp-hylafax-server/usr/sbin/faxabort';\
+	echo -E '	ln -s faxmsg debian/tmp-hylafax-server/usr/sbin/faxquit';\
+	echo -E '	ln -s /etc/hylafax debian/tmp-hylafax-server/var/spool/hylafax/etc';\
+	echo -E '	# Server manpages';\
+	echo -E '	yada install -man man/sman.files/cid.4f -section 5 -as cid.5hylafax';\
+	echo -E '	yada install -man man/sman.files/destctrls.4f -section 5 -as destctrls.5hylafax';\
+	echo -E '	yada install -man man/sman.files/dialrules.4f -section 5 -as dialrules.5hylafax';\
+	echo -E '	yada install -man man/sman.files/doneq.4f -section 5 -as doneq.5hylafax';\
+	echo -E '	yada install -man man/sman.files/hosts.hfaxd.4f -section 5 -as hosts.hfaxd.5hylafax';\
+	echo -E '	yada install -man man/sman.files/hylafax-config.4f -section 5 -as hylafax.5hylafax';\
+	echo -E '	yada install -man man/sman.files/hylafax-info.4f -section 5 -as hylafax-info.5hylafax';\
+	echo -E '	yada install -man man/sman.files/hylafax-log.4f -section 5 -as hylafax-log.5hylafax';\
+	echo -E '	yada install -man man/sman.files/hylafax-server.4f -section 5 -as hylafax-server.5hylafax';\
+	echo -E '	yada install -man man/sman.files/hylafax-shutdown.4f -section 5 -as hylafax-shutdown.5hylafax';\
+	echo -E '	yada install -man man/sman.files/pagermap.4f -section 5 -as pagermap.5hylafax';\
+	echo -E '	yada install -man man/sman.files/recvq.4f -section 5 -as recvq.5hylafax';\
+	echo -E '	yada install -man man/sman.files/sendq.4f -section 5 -as sendq.5hylafax';\
+	echo -E '	yada install -man man/sman.files/status.4f -section 5 -as status.5hylafax';\
+	echo -E '	yada install -man man/sman.files/tsi.4f -section 5 -as tsi.5hylafax';\
+	echo -E '	yada install -man man/sman.files/xferfaxlog.4f -section 5 -as xferfaxlog.5hylafax';\
+	echo -E '	yada install -man debian/man/faxmsg.8 -section 8 -as faxmsg.8hylafax';\
+	echo -E '	yada install -man debian/man/lockname.8 -section 8 -as lockname.8hylafax';\
+	echo -E '	yada install -man debian/man/ondelay.8 -section 8 -as ondelay.8hylafax';\
+	echo -E '	yada install -man debian/man/probemodem.8 -section 8 -as probemodem.8hylafax';\
+	echo -E '	yada install -man debian/man/typetest.8 -section 8 -as typetest.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/choptest.1m -section 8 -as choptest.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/cqtest.1m -section 8 -as cqtest.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/dialtest.1m -section 8 -as dialtest.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxabort.1m -section 8 -as faxabort.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxaddmodem.1m -section 8 -as faxaddmodem.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxadduser.1m -section 8 -as faxadduser.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxanswer.1m -section 8 -as faxanswer.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxconfig.1m -section 8 -as faxconfig.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxcron.1m -section 8 -as faxcron.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxgetty.1m -section 8 -as faxgetty.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxinfo.1m -section 8 -as faxinfo.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxmodem.1m -section 8 -as faxmodem.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxq.1m -section 8 -as faxq.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxqclean.1m -section 8 -as faxqclean.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxquit.1m -section 8 -as faxquit.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxrcvd.1m -section 8 -as faxrcvd.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxsend.1m -section 8 -as faxsend.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxsetup.1m -section 8 -as faxsetup.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxstate.1m -section 8 -as faxstate.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/faxwatch.1m -section 8 -as faxwatch.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/hfaxd.1m -section 8 -as hfaxd.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/mkcover.1m -section 8 -as mkcover.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/notify.1m -section 8 -as notify.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/pagesend.1m -section 8 -as pagesend.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/pollrcvd.1m -section 8 -as pollrcvd.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/ps2fax.1m -section 8 -as ps2fax.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/pdf2fax.1m -section 8 -as pdf2fax.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/recvstats.1m -section 8 -as recvstats.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/tagtest.1m -section 8 -as tagtest.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/tiff2fax.1m -section 8 -as tiff2fax.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/tiffcheck.1m -section 8 -as tiffcheck.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/tsitest.1m -section 8 -as tsitest.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/wedged.1m -section 8 -as wedged.8hylafax';\
+	echo -E '	yada install -man man/sman.apps/xferfaxstats.1m -section 8 -as xferfaxstats.8hylafax';\
+	echo -E '	# Override Lintian warnings';\
+	echo -E '	yada install -data -into /usr/share/lintian/overrides debian/lintian.override.hylafax-server -as hylafax-server') | /bin/sh
+	LD_LIBRARY_PATH="debian/tmp-hylafax-server/lib:debian/tmp-hylafax-server/usr/lib:$$LD_LIBRARY_PATH" dpkg-shlibdeps -pshlibs:hylafax-server -dDepends debian/tmp-hylafax-server/usr/sbin/*
+	$(shell which yada) compress hylafax-server
+	$(shell which yada) generate maintscripts hylafax-server
+	find debian/tmp-hylafax-server -type f -print \
+	  | sed -n 's/^debian\/tmp-hylafax-server\(\/etc\/.*\)$$/\1/p' \
+	    > debian/tmp-hylafax-server/DEBIAN/conffiles
+	if test ! -s debian/tmp-hylafax-server/DEBIAN/conffiles; then rm -f debian/tmp-hylafax-server/DEBIAN/conffiles; fi
+	$(shell which yada) rebuild control
+	$(shell which yada) generate substvars hylafax-server
+	umask 022 && dpkg-gencontrol -isp -phylafax-server -Pdebian/tmp-hylafax-server
+
+# Build package files
+
+.PHONY: binary binary-arch binary-indep
+binary: binary-arch binary-indep
+binary-arch: chmod-yada binary-arch-any
+
+.PHONY: binary-arch-any
+binary-arch-any: \
+	binary-package-hylafax-client \
+	binary-package-hylafax-server
+binary-indep: chmod-yada \
+	binary-package-hylafax-doc
+
+.PHONY: binary-package-hylafax-doc
+binary-package-hylafax-doc: check-root debian/tmp-hylafax-doc/DEBIAN/control
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	chown -R 0.0 debian/tmp-hylafax-doc
+	chmod -R u=rwX,go=rX debian/tmp-hylafax-doc
+	@if [ -d debian/tmp-hylafax-doc/usr/doc/hylafax-doc ]; then \
+	  echo "*** Yada warning: /usr/doc/hylafax-doc should be /usr/share/doc/hylafax-doc";\
+	fi
+	dpkg-deb --build debian/tmp-hylafax-doc ..
+
+.PHONY: binary-package-hylafax-client
+binary-package-hylafax-client: check-root debian/tmp-hylafax-client/DEBIAN/control
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	chown -R 0.0 debian/tmp-hylafax-client
+	chmod -R u=rwX,go=rX debian/tmp-hylafax-client
+	@if [ -d debian/tmp-hylafax-client/usr/doc/hylafax-client ]; then \
+	  echo "*** Yada warning: /usr/doc/hylafax-client should be /usr/share/doc/hylafax-client";\
+	fi
+	dpkg-deb --build debian/tmp-hylafax-client ..
+
+.PHONY: binary-package-hylafax-server
+binary-package-hylafax-server: check-root debian/tmp-hylafax-server/DEBIAN/control
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	chown -R 0.0 debian/tmp-hylafax-server
+	chmod -R u=rwX,go=rX debian/tmp-hylafax-server
+	@umask 022 && export PACKAGE="hylafax-server" \
+	    && export ROOT="$$(pwd)/debian/tmp-hylafax-server" \
+	    && export CONTROL="$$(pwd)/debian/tmp-hylafax-server/DEBIAN" && (\
+	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
+	echo -E '	chgrp uucp debian/tmp-hylafax-server/etc/hylafax';\
+	echo -E '	chown uucp:uucp debian/tmp-hylafax-server/var/spool/hylafax/{bin,client,config,dev,info,log,recvq,status,archive,docq,doneq,pollq,sendq,tmp}';\
+	echo -E '	chmod 755 debian/tmp-hylafax-server/var/spool/hylafax/{archive,docq,doneq,pollq,sendq}';\
+	echo -E '	chmod 4777 debian/tmp-hylafax-server/var/spool/hylafax/tmp';\
+	echo -E '	chmod 755 debian/tmp-hylafax-server/var/spool/hylafax/dev';\
+	echo -E '	chown uucp debian/tmp-hylafax-server/etc/hylafax/hosts.hfaxd';\
+	echo -E '	chmod 600 debian/tmp-hylafax-server/etc/hylafax/hosts.hfaxd') | /bin/sh
+	@if [ -d debian/tmp-hylafax-server/usr/doc/hylafax-server ]; then \
+	  echo "*** Yada warning: /usr/doc/hylafax-server should be /usr/share/doc/hylafax-server";\
+	fi
+	dpkg-deb --build debian/tmp-hylafax-server ..
+
+.PHONY: check-root
+check-root:
+	@[ `id -u` = 0 ] || (echo "You must be root to do this!"; false)
+
+.PHONY: chmod-yada
+chmod-yada:
+	@if [ -f debian/yada -a ! -x debian/yada ]; then \
+	  chmod +x debian/yada; \
+	fi
+
+# Clean up afterwards
+
+.PHONY: clean clean-install-tree clean-build
+clean: chmod-yada clean-install-tree clean-build unpatch debian/control debian/rules
+
+clean-build:
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	rm -f debian/build-stamp debian/depends-stamp
+	@umask 022 && (\
+	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
+	echo -E '[ ! -f Makefile ] || make distclean';\
+	echo -E '[ ! -d man/cman.apps ] || rmdir man/cman.apps man/cman.files man/sman.apps man/sman.files';\
+	echo -E 'rm -f port/Makefile port/install.sh port/mkdepend') | /bin/sh
+
+clean-install-tree: chmod-yada debian/rules
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	rm -f debian/install-tree-stamp
+	rm -rf debian/tmp* debian/files* debian/substvars
--- hylafax-4.1.1.orig/debian/packages
+++ hylafax-4.1.1/debian/packages
@@ -0,0 +1,669 @@
+
+################################################################################
+
+Source: hylafax
+Section: comm
+Priority: extra
+Maintainer: Pavel Tcholakov <pavel@debian.org>
+Standards-Version: 3.2.1
+Upstream-Source: <URL:ftp://ftp.hylafax.org/source/hylafax-4.1beta3.tar.gz>
+Home-Page: <URL:http://www.hylafax.org/>
+Packager: Pavel Tcholakov <pavel@debian.org>
+Build-Depends: libtiff3g-dev (>= 3.5.5), libtiff-tools (>= 3.5.5), zlib1g-dev (>= 0.95), ed
+Description: Flexible client/server fax software
+Packaged-For: Debian
+Patches: *.dpatch
+Major-Changes:
+ New options for the faxcover command
+ Better faxrcvd default script
+Copyright: .
+          HylaFAX Facsimile Software
+ .
+        Copyright (c) 1990-1996 Sam Leffler
+        Copyright (c) 1991-1996 Silicon Graphics, Inc.
+        HylaFAX is a trademark of Silicon Graphics, Inc.
+ .
+ Permission to use, copy, modify, distribute, and sell this software and
+ its documentation for any purpose is hereby granted without fee, provided
+ that (i) the above copyright notices and this permission notice appear in
+ all copies of the software and related documentation, and (ii) the names of
+ Sam Leffler and Silicon Graphics may not be used in any advertising or
+ publicity relating to the software without the specific, prior written
+ permission of Sam Leffler and Silicon Graphics.
+ .
+ THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ .
+ IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ OF THIS SOFTWARE.
+ .
+ Acknowledgements
+ ----------------
+ This software is more than 6 years old and is the product of many
+ folks' work.  Robin Schaufler did the original scheme for delayed
+ submission and worked on the client-server protocol.  More recently,
+ the following people have helped either by testing or by contributing
+ fixes and/or improvements:
+ .
+  Matthias Apitz     Chris Beekhuis	  Peter Bentley	
+  Marc Boucher       Piete Brooks         Bill Campbell
+  Brent Chapman      Camden Clarke        Tom Corson
+  Alan Crosswell     Mark Diekhans        Greg Ferguson
+  Steve Fine	     Andrew Ford          Nico Garcia
+  Wolfgang Henke     Viet Hoang           Bert Hooyman
+  Ken Hornstein	     Dirk Husemann        Brian Katzung
+  Masao Kitano	     Carsten Koch         John T Kohl
+  Scott Kramer       Rickard Linck        Rick Lyons
+  Tom Lislegaard     Rob MacKinnon	  Kevin McManamon
+  Les Mikesell	     Bill Morrow	  Andy Moskoff
+  Chris Munonye	     Rob Newberry	  Dag Nygren
+  Jonas Olsson       Dave Packer	  Damon Permezel
+  David Pike         Amir Plivatsky       Andy Rabagliati
+  Eric Rescorla      Matthew Rice         Tim Rice
+  Marshall Rose      Daniel Rosenblatt    Joel Rosi-Schwartz
+  Tim Rylance        Joseph E. Sacco      Thomas A. Szybist
+  Brent Townshend    Peter White          Steve Williams
+  Scott Woodard      David Vrona          Paul Vixie
+  Christian Zahl
+ .
+ (and surely others).  Also, a special thanks to Ed McCreight for
+ helping me understand the stuff "between the lines" that's necessary to
+ make a working Class 1 driver.
+ .
+ The regular expression support is based on Henry Spencer's POSIX 1003.2
+ compliant regex package that has this Copyright:
+ .
+	Copyright 1992, 1993, 1994 Henry Spencer.  All rights reserved.
+	This software is not subject to any license of the American Telephone
+	and Telegraph Company or of the Regents of the University of California.
+ .
+	Permission is granted to anyone to use this software for any purpose on
+	any computer system, and to alter it and redistribute it, subject
+	to the following restrictions:
+ .
+	1. The author is not responsible for the consequences of use of this
+	   software, no matter how awful, even if they arise from flaws in it.
+ .
+	2. The origin of this software must not be misrepresented, either by
+	   explicit claim or by omission.  Since few users ever read sources,
+	   credits must appear in the documentation.
+ .
+	3. Altered versions must be plainly marked as such, and must not be
+	   misrepresented as being the original software.  Since few users
+	   ever read sources, credits must appear in the documentation.
+ .
+	4. This notice may not be removed or altered.
+ .
+	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+	/*-
+	 * Copyright (c) 1994
+	 *	The Regents of the University of California.  All rights reserved.
+	 *
+	 * Redistribution and use in source and binary forms, with or without
+	 * modification, are permitted provided that the following conditions
+	 * are met:
+	 * 1. Redistributions of source code must retain the above copyright
+	 *    notice, this list of conditions and the following disclaimer.
+	 * 2. Redistributions in binary form must reproduce the above copyright
+	 *    notice, this list of conditions and the following disclaimer in the
+	 *    documentation and/or other materials provided with the distribution.
+	 * 3. All advertising materials mentioning features or use of this software
+	 *    must display the following acknowledgement:
+	 *	This product includes software developed by the University of
+	 *	California, Berkeley and its contributors.
+	 * 4. Neither the name of the University nor the names of its contributors
+	 *    may be used to endorse or promote products derived from this software
+	 *    without specific prior written permission.
+	 *
+	 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+	 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+	 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+	 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+	 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+	 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+	 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+	 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+	 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+	 * SUCH DAMAGE.
+	 *
+	 *	@(#)COPYRIGHT	8.1 (Berkeley) 3/16/94
+	 */
+ .
+ The zlib package used in the client-server protocol is copyright
+ 1995-1996 Jean-loup Gailly and Mark Adler.  Consult the file
+ /usr/share/doc/zlib1/copyright for more information.
+ .
+ The code to read PCF fonts is distantly related to the X11R5 code
+ that is ``Copyright 1990 Massachusetts Institute of Technology'':
+ .
+	/*
+	 * $XConsortium: pcfread.c,v 1.10 92/05/12 18:07:47 gildea Exp $
+	 *
+	 * Copyright 1990 Massachusetts Institute of Technology
+	 *
+	 * Permission to use, copy, modify, distribute, and sell this software and its
+	 * documentation for any purpose is hereby granted without fee, provided that
+	 * the above copyright notice appear in all copies and that both that
+	 * copyright notice and this permission notice appear in supporting
+	 * documentation, and that the name of M.I.T. not be used in advertising or
+	 * publicity pertaining to distribution of the software without specific,
+	 * written prior permission.  M.I.T. makes no representations about the
+	 * suitability of this software for any purpose.  It is provided "as is"
+	 * without express or implied warranty.
+	 *
+	 * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+	 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
+	 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+	 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+	 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+	 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+	 *
+	 * Author:  Keith Packard, MIT X Consortium
+	 */
+ .
+ The textfmt program is distantly related to the lptops program written
+ by Nelson Beebe; there was no copyright notice on the version of the code
+ that textfmt grew out of.
+ .
+ The config.guess and config.sub scripts are part of the GNU autoconf
+ package and covered by the GNU Public License (GPL).  Several ideas
+ in the configure script are directly "borrowed" from autoconf (and I
+ have tried to maintain as much compatibility as possible).
+ .
+ The PCF font etc/lutRS18.pcf included for use with tag lines is a
+ compiled version of a LucidaTypewriter font that was contributed to X11
+ by Bigelow & Holmes.  Redistribution of this font requires inclusion of
+ this copyright notice:
+ .
+    NOTICE TO USER: The source code, including the glyphs or icons 
+    forming a par of the OPEN LOOK TM Graphic User Interface, on this 
+    tape and in these files is copyrighted under U.S. and international
+    laws. Sun Microsystems, Inc. of Mountain View, California owns
+    the copyright and has design patents pending on many of the icons. 
+    AT&T is the owner of the OPEN LOOK trademark associated with the
+    materials on this tape. Users and possessors of this source code 
+    are hereby granted a nonexclusive, royalty-free copyright and 
+    design patent license to use this code in individual and 
+    commercial software. A royalty-free, nonexclusive trademark
+    license to refer to the code and output as "OPEN LOOK" compatible 
+    is available from AT&T if, and only if, the appearance of the
+    icons or glyphs is not changed in any manner except as absolutely
+    necessary to accommodate the standard resolution of the screen or
+    other output device, the code and output is not changed except as 
+    authorized herein, and the code and output is validated by AT&T. 
+    Bigelow & Holmes is the owner of the Lucida (R) trademark for the
+    fonts and bit-mapped images associated with the materials on this 
+    tape. Users are granted a royalty-free, nonexclusive license to use
+    the trademark only to identify the fonts and bit-mapped images if, 
+    and only if, the fonts and bit-mapped images are not modified in any
+    way by the user. 
+ .
+    Any use of this source code must include, in the user documentation 
+    and internal comments to the code, notices to the end user as  
+    follows:
+ .
+    (c) Copyright 1989 Sun Microsystems, Inc. Sun design patents
+    pending in the U.S. and foreign countries. OPEN LOOK is a 
+    trademark of AT&T. Used by written permission of the owners.
+ .
+    (c) Copyright Bigelow & Holmes 1986, 1985. Lucida is a registered 
+    trademark of Bigelow & Holmes. Permission to use the Lucida 
+    trademark is hereby granted only in association with the images 
+    and fonts described in this file.
+ .
+    SUN MICROSYSTEMS, INC., AT&T, AND BIGELOW & HOLMES
+    MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF
+    THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" 
+    WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. 
+    SUN  MICROSYSTEMS, INC., AT&T AND BIGELOW  & HOLMES, 
+    SEVERALLY AND INDIVIDUALLY, DISCLAIM ALL WARRANTIES 
+    WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+    PARTICULAR PURPOSE. IN NO EVENT SHALL SUN MICROSYSTEMS,
+    INC., AT&T OR BIGELOW & HOLMES BE LIABLE FOR ANY
+    SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA      
+    OR PROFITS, WHETHER IN AN ACTION OF  CONTRACT, NEGLIGENCE
+    OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
+Build-Sequence: avoid-root
+Build: sh
+ yes | CXX=c++ ./configure
+ make all COPTIONS="-O2 -g -Wall"
+Clean: sh
+ [ ! -f Makefile ] || make distclean
+ [ ! -d man/cman.apps ] || rmdir man/cman.apps man/cman.files man/sman.apps man/sman.files
+ rm -f port/Makefile port/install.sh port/mkdepend
+
+################################################################################
+
+Package: hylafax-server
+Architecture: any
+Depends: [/usr/sbin/*], libtiff-tools, gs (>= 5.01) | gs-aladdin, hylafax-client, debconf (>= 0.2.17)
+Suggests: hylafax-doc, mgetty
+Conflicts: mgetty-fax
+Section: comm
+Description: Flexible client/server fax software - server daemons
+ This package support the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+ .
+ The host running the server must have either a Class 1, Class 2, or a
+ Class 2.0 fax modem attached to one of its serial ports. End-user
+ applications to manage the transmission of documents via facsimile are
+ provided separately by the hylafax-client package.
+Install: sh
+	yada install -data -into /DEBIAN debian/hylafax-server.templates -as templates
+	yada install -data -into /usr/share/doc/hylafax-server debian/README.mgetty debian/README.debian debian/QuickStart
+	yada install -data -into /usr/share/doc/hylafax-server TODO CONTRIBUTORS
+	yada install -data -into /usr/share/doc/hylafax-server CHANGES -as changelog
+	yada install -conffile -exec -subdir cron.weekly debian/cron.weekly -as hylafax
+	yada install -conffile -exec -subdir cron.monthly debian/cron.monthly -as hylafax
+	yada install -conffile -exec -subdir init.d debian/init.d -as hylafax
+	yada install -conffile -subdir hylafax debian/hosts.hfaxd
+	yada install -conffile -subdir hylafax hfaxd/hfaxd.conf
+	yada install -conffile -subdir hylafax util/cover.templ
+	yada install -conffile -subdir hylafax etc/dialrules
+	yada install -conffile -subdir hylafax etc/dialrules.sf-ba
+	yada install -conffile -subdir hylafax etc/dialrules.europe
+	yada install -conffile -subdir hylafax debian/hylafax.config -as config
+	yada install -conffile -subdir hylafax etc/lutRS18.pcf
+	#yada install -lib util/libfaxutil.so.4.0.1 faxd/libfaxserver.so.4.0.1
+	#ln -s /usr/lib/libfaxutil.so.4.0.1 /usr/lib/libfaxutil.so
+	#ln -s /usr/lib/libfaxserver.so.4.0.1 /usr/lib/libfaxserver.so
+	yada install -bin -into /usr/sbin util/faxmsg util/faxconfig util/faxmodem util/faxstate util/faxwatch util/faxinfo util/tiffcheck
+	yada install -bin -into /usr/sbin util/typetest -as typetest
+	yada install -bin -into /usr/sbin util/dialtest -as dialtest
+	yada install -bin -into /usr/sbin util/faxadduser -as faxadduser
+	yada install -bin -unstripped -into /usr/sbin util/xferfaxstats.sh -as xferfaxstats
+	yada install -bin -unstripped -into /usr/sbin util/recvstats.sh -as recvstats
+	yada install -bin -unstripped -into /usr/sbin util/faxcron.sh -as faxcron
+	yada install -bin -into /usr/sbin faxd/faxq faxd/faxqclean faxd/faxgetty faxd/faxsend faxd/pagesend faxd/tsitest faxd/tagtest faxd/cqtest faxd/choptest
+	yada install -bin -into /usr/sbin hfaxd/hfaxd
+	yada install -bin -unstripped -into /usr/sbin etc/faxaddmodem.sh -as faxaddmodem
+	yada install -bin -unstripped -into /usr/sbin etc/faxsetup.sh -as faxsetup
+	yada install -bin -unstripped -into /usr/sbin etc/probemodem.sh -as probemodem
+	yada install -bin -into /usr/sbin etc/lockname etc/ondelay
+	yada install -dir /var/log/hylafax
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/ps2fax.gs.sh -as ps2fax.gs
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/pdf2fax.gs.sh -as pdf2fax.gs
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/pcl2fax.sh -as pcl2fax
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/tiff2fax.sh -as tiff2fax
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/notify.sh -as notify
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/notify.awk
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/faxrcvd.sh -as faxrcvd
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/pollrcvd.sh -as pollrcvd
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/mkcover.sh -as mkcover
+	yada install -bin -unstripped -into /var/spool/hylafax/bin util/wedged.sh -as wedged
+	yada install -dir /var/spool/hylafax/client
+	yada install -data -into /var/spool/hylafax/config config/class1
+	yada install -data -into /var/spool/hylafax/config config/class2
+	yada install -data -into /var/spool/hylafax/config config/class2.0
+	yada install -data -into /var/spool/hylafax/config config/skel
+	yada install -data -into /var/spool/hylafax/config config/att-dataport-2
+	yada install -data -into /var/spool/hylafax/config config/att-dataport-2.0
+	yada install -data -into /var/spool/hylafax/config config/att-dataport
+	yada install -data -into /var/spool/hylafax/config config/cirrus
+	yada install -data -into /var/spool/hylafax/config config/dsi-scout+
+	yada install -data -into /var/spool/hylafax/config config/e-tech
+	yada install -data -into /var/spool/hylafax/config config/everex-2496d
+	yada install -data -into /var/spool/hylafax/config config/exar
+	yada install -data -into /var/spool/hylafax/config config/gvc-288
+	yada install -data -into /var/spool/hylafax/config config/gvc-288-2
+	yada install -data -into /var/spool/hylafax/config config/intel-400e
+	yada install -data -into /var/spool/hylafax/config config/moto-288
+	yada install -data -into /var/spool/hylafax/config config/mt-1432
+	yada install -data -into /var/spool/hylafax/config config/nuvo-voyager
+	yada install -data -into /var/spool/hylafax/config config/ppi-pm14400fxmt
+	yada install -data -into /var/spool/hylafax/config config/ppi-pm14400fxsa
+	yada install -data -into /var/spool/hylafax/config config/rc144ac
+	yada install -data -into /var/spool/hylafax/config config/rc144ac-1
+	yada install -data -into /var/spool/hylafax/config config/rc288dpi
+	yada install -data -into /var/spool/hylafax/config config/rc288dpi-1
+	yada install -data -into /var/spool/hylafax/config config/rc32acl
+	yada install -data -into /var/spool/hylafax/config config/rc32acl-1
+	#yada install -data -into /var/spool/hylafax/config config/rockwell
+	yada install -data -into /var/spool/hylafax/config config/telebit-t3000
+	yada install -data -into /var/spool/hylafax/config config/telebit-qblazer
+	yada install -data -into /var/spool/hylafax/config config/telebit-wb
+	yada install -data -into /var/spool/hylafax/config config/tricom2842
+	yada install -data -into /var/spool/hylafax/config config/uds-fastalk
+	yada install -data -into /var/spool/hylafax/config config/usr-2.0
+	yada install -data -into /var/spool/hylafax/config config/usr-rts
+	yada install -data -into /var/spool/hylafax/config config/usr-xon
+	yada install -data -into /var/spool/hylafax/config config/zyxel-1496e
+	yada install -data -into /var/spool/hylafax/config config/zyxel-1496e-1
+	yada install -data -into /var/spool/hylafax/config config/zyxel-1496e-2.0
+	yada install -data -into /var/spool/hylafax/config config/zyxel-2864
+	yada install -data -into /var/spool/hylafax/config config/sierra
+	yada install -dir /var/spool/hylafax/dev
+	yada install -dir /var/spool/hylafax/info
+	yada install -dir /var/spool/hylafax/log
+	yada install -dir /var/spool/hylafax/recvq
+	yada install -dir /var/spool/hylafax/status
+	yada install -dir /var/spool/hylafax/sendq
+	yada install -dir /var/spool/hylafax/doneq
+	yada install -dir /var/spool/hylafax/docq
+	yada install -dir /var/spool/hylafax/tmp
+	yada install -dir /var/spool/hylafax/pollq
+	yada install -dir /var/spool/hylafax/archive
+	ln -s faxmsg debian/tmp-hylafax-server/usr/sbin/faxanswer
+	ln -s faxmsg debian/tmp-hylafax-server/usr/sbin/faxabort
+	ln -s faxmsg debian/tmp-hylafax-server/usr/sbin/faxquit
+	ln -s /etc/hylafax debian/tmp-hylafax-server/var/spool/hylafax/etc
+	# Server manpages
+	yada install -man man/sman.files/cid.4f -section 5 -as cid.5hylafax
+	yada install -man man/sman.files/destctrls.4f -section 5 -as destctrls.5hylafax
+	yada install -man man/sman.files/dialrules.4f -section 5 -as dialrules.5hylafax
+	yada install -man man/sman.files/doneq.4f -section 5 -as doneq.5hylafax
+	yada install -man man/sman.files/hosts.hfaxd.4f -section 5 -as hosts.hfaxd.5hylafax
+	yada install -man man/sman.files/hylafax-config.4f -section 5 -as hylafax.5hylafax
+	yada install -man man/sman.files/hylafax-info.4f -section 5 -as hylafax-info.5hylafax
+	yada install -man man/sman.files/hylafax-log.4f -section 5 -as hylafax-log.5hylafax
+	yada install -man man/sman.files/hylafax-server.4f -section 5 -as hylafax-server.5hylafax
+	yada install -man man/sman.files/hylafax-shutdown.4f -section 5 -as hylafax-shutdown.5hylafax
+	yada install -man man/sman.files/pagermap.4f -section 5 -as pagermap.5hylafax
+	yada install -man man/sman.files/recvq.4f -section 5 -as recvq.5hylafax
+	yada install -man man/sman.files/sendq.4f -section 5 -as sendq.5hylafax
+	yada install -man man/sman.files/status.4f -section 5 -as status.5hylafax
+	yada install -man man/sman.files/tsi.4f -section 5 -as tsi.5hylafax
+	yada install -man man/sman.files/xferfaxlog.4f -section 5 -as xferfaxlog.5hylafax
+	yada install -man debian/man/faxmsg.8 -section 8 -as faxmsg.8hylafax
+	yada install -man debian/man/lockname.8 -section 8 -as lockname.8hylafax
+	yada install -man debian/man/ondelay.8 -section 8 -as ondelay.8hylafax
+	yada install -man debian/man/probemodem.8 -section 8 -as probemodem.8hylafax
+	yada install -man debian/man/typetest.8 -section 8 -as typetest.8hylafax
+	yada install -man man/sman.apps/choptest.1m -section 8 -as choptest.8hylafax
+	yada install -man man/sman.apps/cqtest.1m -section 8 -as cqtest.8hylafax
+	yada install -man man/sman.apps/dialtest.1m -section 8 -as dialtest.8hylafax
+	yada install -man man/sman.apps/faxabort.1m -section 8 -as faxabort.8hylafax
+	yada install -man man/sman.apps/faxaddmodem.1m -section 8 -as faxaddmodem.8hylafax
+	yada install -man man/sman.apps/faxadduser.1m -section 8 -as faxadduser.8hylafax
+	yada install -man man/sman.apps/faxanswer.1m -section 8 -as faxanswer.8hylafax
+	yada install -man man/sman.apps/faxconfig.1m -section 8 -as faxconfig.8hylafax
+	yada install -man man/sman.apps/faxcron.1m -section 8 -as faxcron.8hylafax
+	yada install -man man/sman.apps/faxgetty.1m -section 8 -as faxgetty.8hylafax
+	yada install -man man/sman.apps/faxinfo.1m -section 8 -as faxinfo.8hylafax
+	yada install -man man/sman.apps/faxmodem.1m -section 8 -as faxmodem.8hylafax
+	yada install -man man/sman.apps/faxq.1m -section 8 -as faxq.8hylafax
+	yada install -man man/sman.apps/faxqclean.1m -section 8 -as faxqclean.8hylafax
+	yada install -man man/sman.apps/faxquit.1m -section 8 -as faxquit.8hylafax
+	yada install -man man/sman.apps/faxrcvd.1m -section 8 -as faxrcvd.8hylafax
+	yada install -man man/sman.apps/faxsend.1m -section 8 -as faxsend.8hylafax
+	yada install -man man/sman.apps/faxsetup.1m -section 8 -as faxsetup.8hylafax
+	yada install -man man/sman.apps/faxstate.1m -section 8 -as faxstate.8hylafax
+	yada install -man man/sman.apps/faxwatch.1m -section 8 -as faxwatch.8hylafax
+	yada install -man man/sman.apps/hfaxd.1m -section 8 -as hfaxd.8hylafax
+	yada install -man man/sman.apps/mkcover.1m -section 8 -as mkcover.8hylafax
+	yada install -man man/sman.apps/notify.1m -section 8 -as notify.8hylafax
+	yada install -man man/sman.apps/pagesend.1m -section 8 -as pagesend.8hylafax
+	yada install -man man/sman.apps/pollrcvd.1m -section 8 -as pollrcvd.8hylafax
+	yada install -man man/sman.apps/ps2fax.1m -section 8 -as ps2fax.8hylafax
+	yada install -man man/sman.apps/pdf2fax.1m -section 8 -as pdf2fax.8hylafax
+	yada install -man man/sman.apps/recvstats.1m -section 8 -as recvstats.8hylafax
+	yada install -man man/sman.apps/tagtest.1m -section 8 -as tagtest.8hylafax
+	yada install -man man/sman.apps/tiff2fax.1m -section 8 -as tiff2fax.8hylafax
+	yada install -man man/sman.apps/tiffcheck.1m -section 8 -as tiffcheck.8hylafax
+	yada install -man man/sman.apps/tsitest.1m -section 8 -as tsitest.8hylafax
+	yada install -man man/sman.apps/wedged.1m -section 8 -as wedged.8hylafax
+	yada install -man man/sman.apps/xferfaxstats.1m -section 8 -as xferfaxstats.8hylafax
+	# Override Lintian warnings
+	yada install -data -into /usr/share/lintian/overrides debian/lintian.override.hylafax-server -as hylafax-server
+Finalise: sh
+	chgrp uucp debian/tmp-hylafax-server/etc/hylafax
+	chown uucp:uucp debian/tmp-hylafax-server/var/spool/hylafax/{bin,client,config,dev,info,log,recvq,status,archive,docq,doneq,pollq,sendq,tmp}
+	chmod 755 debian/tmp-hylafax-server/var/spool/hylafax/{archive,docq,doneq,pollq,sendq}
+	chmod 4777 debian/tmp-hylafax-server/var/spool/hylafax/tmp
+	chmod 755 debian/tmp-hylafax-server/var/spool/hylafax/dev
+	chown uucp debian/tmp-hylafax-server/etc/hylafax/hosts.hfaxd
+	chmod 600 debian/tmp-hylafax-server/etc/hylafax/hosts.hfaxd
+Prerm: sh
+ /etc/init.d/hylafax stop
+ # Delete the faxmaster account
+ if [ "$1" = "purge" ]; then
+	 userdel faxmaster
+ fi
+Postrm: sh
+ if [ "$1" = "purge" ]; then
+        update-rc.d hylafax remove >/dev/null
+ fi
+ if [ "$1" = "purge" -a -e /usr/share/debconf/confmodule ]; then
+        # Purge the debconf database for our package.
+	. /usr/share/debconf/confmodule
+	db_purge
+ fi
+Preinst: sh
+ if [ -e /var/spool/fax ]; then
+	 mv /var/spool/fax /var/spool/hylafax
+	 chown root:root /var/spool/hylafax
+	 chmod 755 /var/spool/hylafax
+	 chown uucp:uucp /var/spool/hylafax/*
+ fi
+Postinst: sh
+ # Source debconf library.
+ . /usr/share/debconf/confmodule
+ db_title HylaFAX Server
+ if [ "$1" != "configure" ]; then
+ 	exit 0
+ fi
+ # Create the faxmaster account if it doesn't exist already
+ if ! id faxmaster >/dev/null 2>&1; then
+	#echo "Creating 'faxmaster' account..."
+ 	adduser --system --group --home /var/spool/hylafax --disabled-password --gecos "HylaFAX administrative mailbox" faxmaster
+ fi
+ # Add getty symlinks
+ if [ -e /sbin/mgetty ]; then
+    [ -e /etc/hylafax/getty-link ] || ln -s /sbin/mgetty /etc/hylafax/getty-link
+    [ -e /etc/hylafax/egetty-link ] || ln -s /sbin/mgetty /etc/hylafax/egetty-link        
+ fi
+ if [ -e /usr/sbin/vgetty ]; then
+    [ -e /etc/hylafax/vgetty-link ] || ln -s /usr/sbin/vgetty /etc/hylafax/vgetty-link         
+ fi
+ update-rc.d hylafax defaults > /dev/null
+ if [ ! -f /var/spool/hylafax/etc/setup.cache ]; then
+         db_input medium hylafax-server/configure_note || true
+	 db_go
+ fi
+ if [ -f /var/spool/hylafax/etc/setup.cache ]; then
+	 db_input low hylafax-server/start_now || true
+	 db_go
+	 db_get hylafax-server/start_now
+	 if [ "$RET" = "true" ]; then
+		/etc/init.d/hylafax start >/dev/null 2>&1
+         fi
+ fi
+ if [ -f /var/spool/hylafax/etc/hosts -a ! -f /var/spool/hylafax/etc/hosts.hfaxd ]; then
+	 mv /var/spool/hylafax/etc/hosts /var/spool/hylafax/etc/hosts.hfaxd
+ fi
+ db_stop
+
+################################################################################
+
+Package: hylafax-client
+Architecture: any
+Section: comm
+Depends: [/usr/bin/*], enscript, libpaperg
+Suggests: mgetty-viewfax
+Conflicts: mgetty-fax
+Description: Flexible client/server fax software - client utilities
+ The HylaFAX client software communicates with a HylaFAX server via TCP/IP.
+ .
+ HylaFAX support the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+Install: sh
+	yada install -conffile -subdir hylafax debian/hyla.conf
+	yada install -conffile -subdir hylafax debian/faxcover.ps
+	yada install -conffile -subdir hylafax faxmail/faxmail.ps
+	yada install -conffile -subdir hylafax util/pagesizes
+	yada install -conffile -subdir hylafax util/typerules
+	yada install -bin util/textfmt
+	yada install -bin faxalter/faxalter
+	yada install -bin faxcover/faxcover
+	yada install -bin faxmail/faxmail
+	yada install -bin faxrm/faxrm
+	yada install -bin faxstat/faxstat
+	yada install -bin sendfax/sendfax
+	yada install -bin sendpage/sendpage
+	# Client manpages
+	yada install -man man/cman.files/pagesizes.4f -section 5 -as pagesizes.5hylafax
+	yada install -man man/cman.files/typerules.4f -section 5 -as typerules.5hylafax
+	yada install -man man/cman.apps/faxalter.1 -section 1 -as faxalter.1hylafax
+	yada install -man man/cman.apps/faxcover.1 -section 1 -as faxcover.1hylafax
+	yada install -man man/cman.apps/faxmail.1 -section 1 -as faxmail.1hylafax
+	yada install -man man/cman.apps/faxrm.1 -section 1 -as faxrm.1hylafax
+	yada install -man man/cman.apps/faxstat.1 -section 1 -as faxstat.1hylafax
+	yada install -man man/cman.apps/sendfax.1 -section 1 -as sendfax.1hylafax
+	yada install -man man/cman.apps/sendpage.1 -section 1 -as sendpage.1hylafax
+	yada install -man man/cman.apps/textfmt.1 -section 1 -as textfmt.1hylafax
+Postinst: sh
+ # Add default paper in /etc/hylafax/pagesizes
+ if ! grep -q '^default' /etc/hylafax/pagesizes; then
+	perl -e 'print "default\t\t\t" . `paperconf -N|tr -d "\n"` . "\t";
+		print int(`paperconf -mw` * 1200 / 25.4) . "\t";
+		print int(`paperconf -mh` * 1200 / 25.4) . "\t";
+		print int((`paperconf -mw` * 1200 / 25.4 - 300)*0.962) . "\t";
+		print int((`paperconf -mh` * 1200 / 25.4 - 100)*0.948) . "\t";
+		print "472\t345\n";' >> /etc/hylafax/pagesizes
+ fi
+
+################################################################################
+
+Package: hylafax-doc
+Architecture: all
+Section: doc
+Suggests: www-browser, man2html
+Description: Flexible client/server fax software - HTML Documentation
+ HTML version of HylaFAX documentation and manpages.
+ .
+ HylaFAX support the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+Install: sh
+	# HTML docs
+	#yada install -into /usr/lib/cgi-bin html/tools/unquote
+	yada install -doc -subdir html html/acknowledge.html
+	yada install -doc -subdir html html/binary.html
+	yada install -doc -subdir html html/building.html
+	yada install -doc -subdir html html/class1.html
+	yada install -doc -subdir html html/class2.0.html
+	yada install -doc -subdir html html/class2.html
+	yada install -doc -subdir html html/contrib.html
+	yada install -doc -subdir html html/copyright.html
+	yada install -doc -subdir html html/documentation.html
+	yada install -doc -subdir html html/faxgateway.html
+	yada install -doc -subdir html html/ftpmail-help.html
+	yada install -doc -subdir html html/ghostscript.html
+	yada install -doc -subdir html html/HOWTO.html
+	yada install -doc -subdir html html/hylafax3.0.html
+	yada install -doc -subdir html html/hylafax4.0.html
+	yada install -doc -subdir html html/index.html
+	yada install -doc -subdir html html/install-source.html
+	yada install -doc -subdir html html/ixotap.html
+	yada install -doc -subdir html html/mailing-lists.html
+	yada install -doc -subdir html html/modems.html
+	yada install -doc -subdir html html/namechange.html
+	yada install -doc -subdir html html/operation.html
+	yada install -doc -subdir html html/overview.html
+	yada install -doc -subdir html html/sam.html
+	yada install -doc -subdir html html/matthias.html
+	yada install -doc -subdir html html/setup-advanced.html
+	yada install -doc -subdir html html/setup-client.html
+	yada install -doc -subdir html html/setup.html
+	yada install -doc -subdir html html/source.html
+	yada install -doc -subdir html html/toc.html
+	yada install -doc -subdir html html/troubleshooting.html
+	yada install -doc -subdir html html/upgrade4.0.html
+	yada install -doc -subdir html html/v2.3beta036.html
+	yada install -doc -subdir html html/v2.3beta036special.html
+	yada install -doc -subdir html html/v3.0beta096.html
+	yada install -doc -subdir html html/v3.0beta100.html
+	yada install -doc -subdir html html/v3.0beta108.html
+	yada install -doc -subdir html html/v3.0beta110.html
+	yada install -doc -subdir html html/v3.0beta111.html
+	yada install -doc -subdir html html/v3.0beta112.html
+	yada install -doc -subdir html html/v3.0beta113.html
+	yada install -doc -subdir html html/v3.0beta114.html
+	yada install -doc -subdir html html/v4.0beta005.html
+	yada install -doc -subdir html html/v4.0beta006.html
+	yada install -doc -subdir html html/v4.0beta007.html
+	yada install -doc -subdir html html/v4.0beta008.html
+	yada install -doc -subdir html html/v4.0beta009.html
+	yada install -doc -subdir html html/v4.0beta010.html
+	yada install -doc -subdir html html/v4.0beta011.html
+	yada install -doc -subdir html html/v4.0beta012.html
+	yada install -doc -subdir html html/v4.0beta013.html
+	yada install -doc -subdir html html/v4.0beta014.html
+	yada install -doc -subdir html html/v4.0beta015.html
+	yada install -doc -subdir html html/v4.0beta018.html
+	yada install -doc -subdir html html/v4.0beta020.html
+	yada install -doc -subdir html html/v4.0beta021.html
+	yada install -doc -subdir html html/v4.0beta022.html
+	yada install -doc -subdir html html/v4.0beta023.html
+	yada install -doc -subdir html html/version.html
+	yada install -doc -subdir html/Majordomo html/Majordomo/help.html
+	yada install -doc -subdir html/Modems/Hayes html/Modems/Hayes/hayes.html
+	yada install -doc -subdir html/Modems/Supra html/Modems/Supra/class1.html
+	yada install -doc -subdir html/Modems/Supra html/Modems/Supra/class2.html
+	yada install -doc -subdir html/Modems/Telebit html/Modems/Telebit/faxcmds.html
+	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/autodetect.html
+	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/codes.html
+	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/commands.html
+	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/compression.html
+	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/examples.html
+	yada install -doc -subdir html/Modems/ZyXEL html/Modems/ZyXEL/voice.html
+	yada install -doc -subdir html/Modems html/Modems/att-dataport.html
+	yada install -doc -subdir html/Modems html/Modems/digicom-scout.html
+	yada install -doc -subdir html/Modems html/Modems/everex-2496d.html
+	yada install -doc -subdir html/Modems html/Modems/hayes-optima2400.html
+	yada install -doc -subdir html/Modems html/Modems/index.html
+	yada install -doc -subdir html/Modems html/Modems/multitech-1432.html
+	yada install -doc -subdir html/Modems html/Modems/multitech-1932.html
+	yada install -doc -subdir html/Modems html/Modems/nuvo-96424pfx.html
+	yada install -doc -subdir html/Modems html/Modems/ppi-pm14400fxmt.html
+	yada install -doc -subdir html/Modems html/Modems/supra-v32bis.html
+	yada install -doc -subdir html/Modems html/Modems/telebit-t3000.html
+	yada install -doc -subdir html/Modems html/Modems/twincom-144df.html
+	yada install -doc -subdir html/Modems html/Modems/ucom-traveller96.html
+	yada install -doc -subdir html/Modems html/Modems/usr-courier.html
+	yada install -doc -subdir html/Modems html/Modems/usr-sportster.html
+	yada install -doc -subdir html/Modems html/Modems/zyxel-1496.html
+	#yada install -doc -subdir html/Modems html/Modems/K56flex.html
+	yada install -doc -subdir html/Modems html/Modems/multitech-2834.html
+	yada install -doc -subdir html/Modems html/Modems/hayes-accura288.html
+	yada install -doc -subdir html/icons html/icons/at_work_icon.gif
+	yada install -doc -subdir html/icons html/icons/ball_blue_icon.gif
+	yada install -doc -subdir html/icons html/icons/button.excl.gif
+	yada install -doc -subdir html/icons html/icons/back.gif
+	yada install -doc -subdir html/icons html/icons/frog.gif
+	yada install -doc -subdir html/icons html/icons/improved.gif
+	yada install -doc -subdir html/icons html/icons/info_icon.gif
+	yada install -doc -subdir html/icons html/icons/new.gif
+	yada install -doc -subdir html/icons html/icons/next.gif
+	yada install -doc -subdir html/icons html/icons/smiley.gif
+	yada install -doc -subdir html/icons html/icons/warning_icon.gif
+	yada install -doc -subdir html html/sam.gif
+	yada install -doc -subdir html html/matthias.gif
+	yada install -doc -subdir html html/hylafax.gif
+	# Needed for doc-base
+	yada install -into /usr/share/doc-base debian/doc-base -as hylafax
+	# fixes some relative paths
+	chmod +x debian/html-patch
+	(cd debian/tmp-hylafax-doc/usr/share/doc/hylafax-doc/html && \
+	 ../../../../../../html-patch /usr/share/doc/hylafax-doc /cgi-bin)
+	chmod -R u+w debian/tmp-hylafax-doc/usr/share/doc/
+Postinst: sh
+	if [ "$1" = configure ]; then
+		if command -v install-docs >/dev/null 2>&1; then
+			install-docs -i /usr/share/doc-base/hylafax
+		fi
+	fi
+Prerm: sh
+	if [ "$1" = remove -o "$1" = upgrade ]; then
+		if command -v install-docs >/dev/null 2>&1; then
+			install-docs -r hylafax
+		fi
+	fi
--- hylafax-4.1.1.orig/debian/config.dpatch-disabled
+++ hylafax-4.1.1/debian/config.dpatch-disabled
@@ -0,0 +1,164 @@
+#PATCHOPTIONS: -p0
+--- config.site	Thu Jan  7 10:14:13 1999
++++ config.site.new	Thu Jan 11 01:15:21 2001
+@@ -43,29 +43,29 @@
+ #
+ #DSO="auto"			# configure DSO support (auto|IRIX|no)
+ #GETTY="auto"			# type of getty support (auto|BSD|SysV)
+-#HTML="no"			# install HTML documentation (yes|no)
++#HTML="yes"			# install HTML documentation (yes|no)
+ #PS="auto"			# PostScript support to use (auto|gs|dps|imp)
+ #SGI2FAX="auto"			# configure SGI image support (auto|yes|no)
+ #DPS="no"			# install SGI DPS-based RIP (yes|no)
+ #GS="no"			# install Ghostscript RIP (yes|no)
+ #IMP="no"			# install SGI Impressario 2.1 support (yes|no)
+-#REGEX="yes"			# use distributed regular expression package
+-#ZLIB="yes"			# use distributed zlib distribution
+-#UTMP="utmpx"			# type of utmp+wtmp handling (auto|utmp|utmpx)
++REGEX="yes"			# use distributed regular expression package
++ZLIB="no"			# use distributed zlib distribution
++UTMP="auto"			# type of utmp+wtmp handling (auto|utmp|utmpx)
+ #DBLIB="no"			# use distributed libdb distribution
+ 
+ #
+ # Directory parameters.
+ #
+-#DIR_BIN="/usr/local/bin"		# directory for client apps
+-#DIR_LIBDATA="/usr/lib/fax"		# directory for client data
+-#DIR_LIBEXEC="/usr/lib/fax"		# directory for libraries&hidden apps
+-#DIR_MAN="/usr/local/man"		# directory for manual pages
+-#DIR_SPOOL="/var/spool/fax"		# directory for spooling area
+-#DIR_SBIN="/var/spool/fax/bin"		# directory for system apps
+-#DIR_LOCKS="/usr/spool/locks"		# directory for UUCP lock files
++DIR_BIN="/usr/bin"		# directory for client apps
++DIR_LIBDATA="/etc/hylafax"		# directory for client data
++DIR_LIBEXEC="/usr/sbin"		# directory for libraries&hidden apps
++DIR_MAN="/usr/man"		# directory for manual pages
++DIR_SPOOL="/var/spool/fax"		# directory for spooling area
++DIR_SBIN="/usr/sbin"		# directory for system apps
++DIR_LOCKS="/var/lock"		# directory for UUCP lock files
+ #FONTMAP="/usr/share/ghostscript/3.33"	# directorys containing Fontmap files
+-#PATH_AFM="/usr/lib/DPS/AFM"		# directorys for AFM files
++PATH_AFM="/usr/share/enscript/afm""		# directorys for AFM files
+ 
+ #
+ # HTML-specific parameters; only used when the
+@@ -75,31 +75,31 @@
+ # in forming URLs; they are not directory pathnames
+ # in the filesystem.
+ #
+-#DIR_HTML="/var/httpd/htdocs/hylafax"	# directory for HTML documentation
+-#DIR_CGI="/var/httpd/cgi-bin"		# directory for CGI scripts
+-#HTMLPATH="/hylafax"			# virtual path to HTML materials
+-#CGIPATH="/cgi-bin"			# virtual path to CGI scripts
++DIR_HTML="/usr/doc/hylafax"	# directory for HTML documentation
++DIR_CGI="/usr/lib/cgi-bin"		# directory for CGI scripts
++HTMLPATH="/doc/hylafax"			# virtual path to HTML materials
++CGIPATH="/cgi-bin"			# virtual path to CGI scripts
+ 
+ #
+ # Miscellaneous parameters.
+ #
+ #DEFVRES="196"				# default vertical res for outbound fax
+ #FILLORDER="MS2LSB"			# bit order of cpu (MSB2LSB/LSB2MSB)
+-#FAXGID="uucp"				# group ID for fax user
+-#FAXUID="uucp"				# user ID for fax user
+-#PAGESIZE="North American Letter"	# default page size
+-#SYSGID="sys"				# group ID for system installs
+-#SYSUID="bin"				# user ID for system installs
++FAXGID="fax"				# group ID for fax user
++FAXUID="fax"				# user ID for fax user
++PAGESIZE="A4"	# default page size
++SYSGID="root"				# group ID for system installs
++SYSUID="root"				# user ID for system installs
+ #LOCKS="ansi"				# default UUCP lockfile scheme
+ #
+-#PATH_GETTY="/etc/getty"		# pathname of suitable getty program
+-#PATH_VGETTY="/bin/vgetty"		# pathname of voice getty program
+-#PATH_EGETTY="/bin/egetty"		# pathname of external getty program
+-#PATH_SENDMAIL="/usr/lib/sendmail"	# pathname of suitable sendmail program
+-#PATH_GSRIP="/usr/local/bin/gs"		# pathname of Ghostscript-based RIP
++PATH_GETTY="/etc/hylafax/getty-link"		# pathname of suitable getty program
++PATH_VGETTY="/etc/hylafax/vgetty-link"		# pathname of voice getty program
++PATH_EGETTY="/etc/hylafax/egetty-link"		# pathname of external getty program
++PATH_SENDMAIL="/usr/sbin/sendmail"	# pathname of suitable sendmail program
++PATH_GSRIP="/usr/bin/gs"		# pathname of Ghostscript-based RIP
+ #PATH_DPSRIP="/var/spool/fax/bin/ps2fax.exe"	# pathname of DPS-based RIP
+ #PATH_IMPRIP="/usr/lib/print/psrip"	# pathname of Impressario 2.1 RIP
+-#MANSCHEME="sysv-source-cat-strip"	# manual page installation scheme
++MANSCHEME="bsd-source-gzip-strip"	# manual page installation scheme
+ #SYSVINIT=		                # location SysV init script 
+ 
+ # SVR4 packaging stuff
+@@ -126,7 +126,7 @@
+ #GCOPTS="-g"				# options to pass C compiler
+ #GCXXOPTS="-g"				# options to pass C++ compiler
+ #GENDIST="/sbin/gendist"		# pathname of SGI inst generator program
+-#INSTALL='${SHELL} ${PORT}/install.sh'	# SGI install program/emulator
++INSTALL='${PORT}/../debian/install ${PORT}'	# SGI install program/emulator
+ #LIBMALLOC="auto"			# yes|no|auto configure -lmalloc use
+ #LIBPORT='${PORT}/libport.a'		# library with emulation code
+ #LIBSUN="auto"				# yes|no|auto configure -lsun use
+@@ -145,9 +145,9 @@
+ # to link against.  If libtiff is installed in a
+ # non-standard location then setup LIBTIFF accordingly.
+ #
+-#LIBTIFF="-L/usr/local/lib -ltiff"	# linkage convention for libtiff
+-#TIFFINC="/usr/local/include"		# place to find tiffio.h
+-#TIFFBIN="/usr/local/bin"		# where TIFF tools live
++LIBTIFF="-ltiff"	# linkage convention for libtiff
++TIFFINC="/usr/include"		# place to find tiffio.h
++TIFFBIN="/usr/bin"		# where TIFF tools live
+ 
+ #
+ # The source for the ZLIB library is not required
+@@ -156,8 +156,8 @@
+ # include in this distribution is not to be used then
+ # set ZLIB=no and supply the following definitions.
+ #
+-#LIBZ="-L/usr/local/lib -lz"		# linkage convention for libz
+-#ZLIBINC="/usr/local/include"		# place to find zlib.h
++LIBZ="-lz"		# linkage convention for libz
++ZLIBINC="/usr/include"		# place to find zlib.h
+ 
+ #
+ # The source for the POSIX regular expression package
+@@ -206,7 +206,7 @@
+ #CONFIG_BADGETOPTPROTO="no"		# system has incorrect getopt func decl
+ #CONFIG_SOCKARGLENTYPE="unsigned long"	# call-by-ref arg type for socket funcs
+ #CONFIG_BADSELECTPROTO="no"		# system has way old select func decl
+-#CONFIG_MAXGID="5999"			# maximum permissable GID
++#CONFIG_MAXGID="65534"			# maximum permissable GID
+ #CONFIG_OSFCNH="auto"			# control inclusion of <osfcn.h>
+ 
+ #
+@@ -242,13 +242,13 @@
+ # based on whether or not they are capable of processing scripts
+ # included in the distribution (e.g AWK and SCRIPT_SH, SED).
+ #
+-#AWK="/bin/awk"				# pathname of suitable awk program
++AWK="/usr/bin/awk"				# pathname of suitable awk program
+ #CAT="/bin/cat"				# pathname of suitable cat program
+ #CHGRP="/etc/chgrp"			# pathname of suitable chgrp program
+ #CHMOD="/etc/chmod"			# pathname of suitable chmod program
+ #CHOWN="/etc/chown"			# pathname of suitable chown program
+-#CMP="/bin/cmp"				# pathname of suitable cmp program
+-#COL="/bin/col"				# pathname of suitable col program
++CMP="/usr/bin/cmp"				# pathname of suitable cmp program
++COL="/usr/bin/col"				# pathname of suitable col program
+ #CP="/bin/cp"				# pathname of suitable cp program
+ #ECHO="/bin/echo"			# pathname of suitable echo program
+ #GREP="/bin/grep"			# pathname of suitable grep program
+@@ -256,10 +256,10 @@
+ #LN_S="-s"				# option to ${LN} to create symlink
+ #MAN="/usr/bin/man"			# pathname of suitable man program
+ #MKDIR="/bin/mkdir"			# pathname of suitable mkdir program
+-#MKFIFO="/bin/mkfifo"			# pathname of suitable mkfifo program
++MKFIFO="/usr/bin/mkfifo"			# pathname of suitable mkfifo program
+ #MV="/bin/mv"				# pathname of suitable mv program
+ #MV_F="-f"				# option to ${MV} to force operation
+ #RMCMD="/bin/rm"			# pathname of suitable rm program
+ #SED="/bin/sed"				# pathname of suitable sed program
+ #SCRIPT_SH="/bin/sh"			# pathname of suitable shell
+-#SORT="/bin/sort"			# pathname of suitable sort program
++SORT="/usr/bin/sort"			# pathname of suitable sort program
--- hylafax-4.1.1.orig/debian/faxcover.dpatch-disabled
+++ hylafax-4.1.1/debian/faxcover.dpatch-disabled
@@ -0,0 +1,140 @@
+#PATCHOPTIONS: -p1
+diff -rbu hylafax-4.0.2.orig/faxcover/faxcover.c++ hylafax-4.0.2/faxcover/faxcover.c++
+--- hylafax-4.0.2.orig/faxcover/faxcover.c++	Sat Feb 14 11:48:39 1998
++++ hylafax-4.0.2/faxcover/faxcover.c++	Sat Sep  5 20:05:12 1998
+@@ -48,6 +48,20 @@
+     fxStr	regarding;	// fax is regarding...
+     fxStr	comments;	// general comments
+     fxStr	sender;		// sender's identity
++    fxStr	senderFaxNumber;   // sender's fax number
++    fxStr	senderVoiceNumber; // sender's voice number
++    fxStr	senderLocation;    // sender's geographical location
++    fxStr	senderCompany;     // sender's company/institution
++    fxStr	c0;             // cell 0
++    fxStr	c1;             // cell 1
++    fxStr	c2;             // cell 2
++    fxStr	c3;             // cell 3
++    fxStr	c4;             // cell 4
++    fxStr	c5;             // cell 5
++    fxStr	c6;             // cell 6
++    fxStr	c7;             // cell 7
++    fxStr	c8;             // cell 8
++    fxStr	c9;             // cell 9
+     fxStr	pageCount;	// # pages, not counting cover page
+     fxStr	dateFmt;	// strftime format string
+     float	pageWidth;	// page width (mm)
+@@ -103,7 +117,7 @@
+ 	cover = cp;
+ 
+     setupPageSize("default");
+-    while ((c = getopt(argc, argv, "C:D:n:t:f:c:p:l:m:r:s:v:x:")) != -1)
++    while ((c = getopt(argc, argv, "C:D:n:N:t:f:c:p:l:L:m:r:s:v:V:x:X:0:1:2:3:4:5:6:7:8:9:")) != -1)
+ 	switch (c) {
+ 	case 's':			// page size
+ 	    setupPageSize(optarg);
+@@ -120,13 +134,16 @@
+ 	case 'n':			// fax number
+ 	    toFaxNumber = optarg;
+ 	    break;
++       	case 'N':                       // sender's fax number
++           senderFaxNumber = optarg;
++           break;
+ 	case 'r':			// regarding
+ 	    regarding = optarg;
+ 	    break;
+ 	case 't':			// to identity
+ 	    toName = optarg;
+ 	    break;
+-	case 'f':			// from identity
++	case 'f':			// sender identity
+ 	    sender = optarg;
+ 	    break;
+ 	case 'c':			// comments
+@@ -138,12 +155,51 @@
+ 	case 'l':			// to's location
+ 	    toLocation = optarg;
+ 	    break;
++	case 'L':                       // sender's location
++           senderLocation = optarg;
++           break;
+ 	case 'v':			// to's voice phone number
+ 	    toVoiceNumber = optarg;
+ 	    break;
++       case 'V':                       // sender's voice phone number
++           senderVoiceNumber = optarg;
++           break;
+ 	case 'x':			// to's company
+ 	    toCompany = optarg;
+ 	    break;
++       case 'X':                       // sender's company
++           senderCompany = optarg;
++           break;
++       case '0':                       // cell 0
++           c0 = optarg;
++           break;
++       case '1':                       // cell 1
++           c1 = optarg;
++           break;
++       case '2':                       // cell 2
++           c2 = optarg;
++           break;
++       case '3':                       // cell 3
++           c3 = optarg;
++           break;
++       case '4':                       // cell 4
++           c4 = optarg;
++           break;
++       case '5':                       // cell 5
++           c5 = optarg;
++           break;
++       case '6':                       // cell 6
++           c6 = optarg;
++           break;
++       case '7':                       // cell 7
++           c7 = optarg;
++           break;
++       case '8':                       // cell 8
++           c8 = optarg;
++           break;
++       case '9':                       // cell 9
++           c9 = optarg;
++           break;
+ 	case '?':
+ 	    usage();
+ 	}
+@@ -187,6 +243,11 @@
+ 	" [-C template-file]"
+ 	" [-D date-format]"
+ 	" [-s pagesize]"
++	" [-0 cell-0] ... [-9 cell-9]"
++	" [-L from-location]"
++	" [-V from-voice-number]"
++	" [-X from-company]"
++	" [-N from-fax-number]"
+ 	" -f from"
+ 	" -n fax-number"
+ 	, (char*) appName);
+@@ -260,9 +321,23 @@
+     printf("/pageWidth %.2f def\n", pageWidth);
+     printf("/pageLength %.2f def\n", pageLength);
+     emitFromDefs(db->find(sender));
++    coverDef("from-fax-number", senderFaxNumber);
++    coverDef("from-voice-number", senderVoiceNumber);
++    coverDef("from-company", senderCompany);
++    coverDef("from-location",  senderLocation);
+     coverDef("page-count", pageCount);
+     emitDateDefs();
+     coverDef("regarding", regarding);
++    coverDef("c0", c0);
++    coverDef("c1", c1);
++    coverDef("c2", c2);
++    coverDef("c3", c3);
++    coverDef("c4", c4);
++    coverDef("c5", c5);
++    coverDef("c6", c6);
++    coverDef("c7", c7);
++    coverDef("c8", c8);
++    coverDef("c9", c9);
+     emitCommentDefs();
+     printf("%%%%EndProlog\n");
+     printf("%%%%Page: \"1\" 1\n");
--- hylafax-4.1.1.orig/debian/cron.monthly
+++ hylafax-4.1.1/debian/cron.monthly
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+test -f /usr/sbin/xferfaxstats || exit 0
+
+# Generate HylaFAX's monthly fax statistics
+
+# Generate statistics for faxes during the past month. Two reports
+# are generated - one ordered by the destination fax number, the
+# other ordered by the sender.
+
+/usr/sbin/xferfaxstats -dest -since `date +%D -d'-1 month'` | mail -s "Monthly fax stats - by destination" faxmaster
+
+/usr/sbin/xferfaxstats -send -since `date +%D -d'-1 month'` | mail -s "Monthly fax stats - by sender" faxmaster
--- hylafax-4.1.1.orig/debian/debian.dpatch-disabled
+++ hylafax-4.1.1/debian/debian.dpatch-disabled
@@ -0,0 +1,596 @@
+#PATCHOPTIONS: -p1
+diff -cr hylafax-v4.0pl2.orig/configure hylafax-v4.0pl2/configure
+--- hylafax-v4.0pl2.orig/configure	Sun Nov 14 22:32:52 1999
++++ hylafax-v4.0pl2/configure	Sun Nov 14 22:33:07 1999
+@@ -2821,7 +2821,7 @@
+ 	printf("old include files: version %u\n", TIFFLIB_VERSION);
+         exit(-1);
+     }
+-    if (strncmp(TIFFGetVersion(), "LIBTIFF, Version 3.4", 20) != 0) {
++    if (strncmp(TIFFGetVersion(), "LIBTIFF, Version 3.5", 20) != 0) {
+ 	printf("old library: version %s\n", TIFFGetVersion());
+ 	exit(-1);
+     } else
+diff -rbu hylafax-4.0.2.orig/config/skel hylafax-4.0.2/config/skel
+--- hylafax-4.0.2.orig/config/skel	Sat Feb 14 11:46:50 1998
++++ hylafax-4.0.2/config/skel	Tue Mar  3 20:05:59 1998
+@@ -37,23 +37,23 @@
+ #DialStringRules:	etc/dialrules
+ FAXNumber:		+1.999.555.1212
+ LocalIdentifier:	"NothingSetup"	# default is canonical FAXNumber
+-ServerTracing:		1		# log server-related operations
+-SessionTracing:		11		# log server-related operations
+-RecvFileMode:		0600		# recvd facsimile are not public
+-LogFileMode:		0600		# private log files
+-DeviceMode:		0600		# device is accessible only to uucp/fax
+-GettyArgs:		"-h %l dx_%s"	# requires modem to auto-detect fax/data
+-QualifyTSI:		""		# do not restrict inbound facsimile
++#ServerTracing:		1		# log server-related operations
++#SessionTracing:	11		# log server-related operations
++#RecvFileMode:		0600		# recvd facsimile are not public
++#LogFileMode:		0600		# private log files
++#DeviceMode:		0600		# device is accessible only to uucp/fax
++#GettyArgs:		"-h %l dx_%s"	# requires modem to auto-detect fax/data
++#QualifyTSI:		""		# do not restrict inbound facsimile
+ SpeakerVolume:		off		# machine's are already too loud
+ RingsBeforeAnswer:	1		# answer on first ring
+-TagLineFont:		etc/lutRS18.pcf	# tag line font
++#TagLineFont:		etc/lutRS18.pcf	# tag line font
+ TagLineFormat:		"From %%l|%c|Page %%p of %%t"
+ MaxBadCalls:		5		# max 5 consecutive bad calls
+ PostScriptTimeout:	300		# 5 minute timeout on PostScript jobs
+ MaxSendPages:		25		# max pages in an outbound job
+ MaxRecvPages:		25		# max pages in an inbound job
+-ContCoverPage:		etc/cover.templ	# enable continuation cover pages
+-DestControls:		etc/destcontrols # destination-specific controls
++#ContCoverPage:		etc/cover.templ	# enable continuation cover pages
++#DestControls:		etc/destctrls	# destination-specific controls
+ MaxConcurrentJobs:	1		# serialize jobs to the same dest
+ TimeOfDay:		"Any"		# outbound jobs any day, any time
+ # END-SERVER
+diff -rbu hylafax-4.0.2.orig/config.h.in hylafax-4.0.2/config.h.in
+--- hylafax-4.0.2.orig/config.h.in	Sat Feb 14 11:46:29 1998
++++ hylafax-4.0.2/config.h.in	Sun Sep  6 17:06:11 1998
+@@ -132,7 +132,7 @@
+  * file; currently in an ASCII format designed for processing
+  * by programs like awk and perl.
+  */
+-#define	FAX_XFERLOG	FAX_ETCDIR "/xferfaxlog"
++#define	FAX_XFERLOG	FAX_LOGDIR "/xferfaxlog"
+ 
+ /*
+  * Client access to services on the server machine is controlled
+@@ -150,7 +150,7 @@
+  */
+ #define	FAX_INFOSUF	"info"		/* suffix for server info files */
+ 
+-#define	FAX_FIFO	"FIFO"		/* FIFO file for talking to daemon */
++#define	FAX_FIFO	"dev/FIFO"	/* FIFO file for talking to daemon */
+ #define	MODEM_ANY	"any"		/* any modem acceptable identifier */
+ #define	FAX_PROTOVERS	2		/* old client-server protocol version */
+ 
+@@ -198,7 +198,7 @@
+  * through the LogFaclity configuration parameters read
+  * by all the server programs.
+  */
+-#define	LOG_FAX		"daemon"	/* logging identity */
++#define	LOG_FAX		"local5"	/* logging identity */
+ 
+ /*
+  * The pathnames of the getty, vgetty, and egetty programs
+diff -rbu hylafax-4.0.2.orig/configure hylafax-4.0.2/configure
+--- hylafax-4.0.2.orig/configure	Sat Feb 14 11:46:28 1998
++++ hylafax-4.0.2/configure	Sun May 30 01:10:33 1999
+@@ -1892,7 +1892,7 @@
+ 	case $TARGET in
+ 	*-sco*)		CONFIG_MAXGID=60000;;
+ 	*-hpux*)	CONFIG_MAXGID=60000;;
+-	*)		CONFIG_MAXGID=60002;;	# default
++	*)		CONFIG_MAXGID=65534;;	# default
+ 	esac
+     }
+     if [ "$CONFIG_MAXGID" ]; then
+diff -rbu hylafax-4.0.2.orig/defs.in hylafax-4.0.2/defs.in
+--- hylafax-4.0.2.orig/defs.in	Sat Feb 14 11:46:31 1998
++++ hylafax-4.0.2/defs.in	Tue Mar  3 20:05:59 1998
+@@ -215,11 +215,11 @@
+ GCOPTS		= @GCOPTS@ ${OPTIMIZER} @PROTOTYPES@
+-GCDEFS		= @ANSICPP@
++GCDEFS         = @ANSICPP@ -D_GNU_SOURCE -DCONFIG_SOCKARGLENTYPE="unsigned int"
+ GCINCS		= -I. -I${DEPTH} -I${REGEXINC} -I${SRCDIR} \
+-		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC}
++		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC} 
+ #
+ # C++ flags are decomposed using the same hierarchy as C flags.
+ #
+-C++FLAGS	= ${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS}
++C++FLAGS	= ${CVERSION} ${GC++FLAGS} ${VC++FLAGS} ${LC++FLAGS} 
+ 
+ VC++FLAGS	= ${VC++DEFS} ${VC++INCS} ${VC++OPTS}
+ LC++FLAGS	= ${LC++DEFS} ${LC++INCS} ${LC++OPTS}
+@@ -231,7 +231,7 @@
+ 
+ GC++OPTS	= @GCXXOPTS@ ${OPTIMIZER}
+ GC++INCS	= -I. -I${DEPTH} -I${REGEXINC} -I${SRCDIR} \
+-		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC}
+-GC++DEFS	= @ANSICXXPP@
++		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC}
++GC++DEFS	= @ANSICXXPP@ -D_GNU_SOURCE -DCONFIG_SOCKARGLENTYPE="unsigned int"
+ 
+ #
+diff -rbu hylafax-4.0.2.orig/etc/faxaddmodem.sh.in hylafax-4.0.2/etc/faxaddmodem.sh.in
+--- hylafax-4.0.2.orig/etc/faxaddmodem.sh.in	Sat Feb 14 11:47:03 1998
++++ hylafax-4.0.2/etc/faxaddmodem.sh.in	Sun May 30 01:50:19 1999
+@@ -91,10 +91,10 @@
+ SVR4UULCKN=$LIBEXEC/lockname	# SVR4 UUCP lock name construction program
+ ONDELAY=$LIBEXEC/ondelay	# prgm to open devices blocking on carrier
+ CAT="$CAT -u"			# something to do unbuffered reads and writes
+-FAX=fax				# identity of the fax user
++FAX=root			# identity of the fax user
+ GROUP=/etc/group		# where to go for group entries
+-PROTOGID=$FAXGID		# group who's gid we use for FAX user
+-defPROTOGID=10			# use this gid if PROTOGID doesn't exist
++PROTOGID=@FAXGID@		# group who's gid we use for FAX user
++defPROTOGID=21			# use this gid if PROTOGID doesn't exist
+ MODEMCONFIG=$SPOOL/config	# location of prototype modem config files
+ RMCMD="$RM -f"			# forced removal
+ 
+@@ -385,15 +385,15 @@
+ defaultCountryCode=\"\"
+ defaultLongDistancePrefix=\"\"
+ defaultInternationalPrefix=\"\"
+-defaultDialStringRules=\"\"
+-defaultServerTracing=1
+-defaultSessionTracing=1
+-defaultRecvFileMode=0600
+-defaultLogFileMode=0600
+-defaultDeviceMode=0600
++defaultDialStringRules=\"etc/dialrules\"
++defaultServerTracing=0x08501
++defaultSessionTracing=0x08501
++defaultRecvFileMode=0640
++defaultLogFileMode=0640
++defaultDeviceMode=0660
+ defaultRingsBeforeAnswer=0
+ defaultSpeakerVolume=quiet
+-defaultGettyArgs=\"\"
++defaultGettyArgs="\"-r -b %l\""
+ defaultQualifyTSI=\"\"
+ defaultJobReqBusy=300
+ defaultJobReqNoCarrier=900
+@@ -404,12 +404,12 @@
+ defaultJobReqOther=900
+ defaultPollModemWait=30
+ defaultPollLockWait=30
+-defaultTagLineFont=\"\"
+-defaultTagLineFormat="\"From %%n|%c|Page %%p of %%t\""
++defaultTagLineFont=\"etc/lutRS18.pcf\"
++defaultTagLineFormat=\"\"
+ defaultPercentGoodLines=95
+ defaultMaxConsecutiveBadLines=5
+ defaultMaxRecvPages=1000
+-defaultLogFacility=daemon
++defaultLogFacility=local5
+ defaultClocalAsRoot=\"\"
+ defaultAdaptiveAnswer=\"\"
+ defaultAnswerRotary=\"\"
+@@ -1736,7 +1736,7 @@
+ #
+ # Create FIFO.<tty> special file and remove any old one.
+ #
+-FIFO=$SPOOL/FIFO.$DEVID
++FIFO=$SPOOL/dev/FIFO.$DEVID
+ test -p $FIFO || {
+     prompt "Creating fifo $FIFO for faxgetty..."
+     if (mkfifo $FIFO) >/dev/null 2>&1; then
+@@ -1809,7 +1809,7 @@
+ defaultSendFaxCmd=\"bin/faxsend\"
+ defaultSendPageCmd=\"bin/pagesend\"
+ defaultSendUUCPCmd=\"bin/uucpsend\"
+-defaultSessionTracing=0xffffffff
++defaultSessionTracing=0x08501
+ defaultTimeOfDay=\"Any\"
+ defaultUse2D=Yes
+ #
+diff -rbu hylafax-4.0.2.orig/etc/faxsetup.sh.in hylafax-4.0.2/etc/faxsetup.sh.in
+--- hylafax-4.0.2.orig/etc/faxsetup.sh.in	Sat Feb 14 11:47:05 1998
++++ hylafax-4.0.2/etc/faxsetup.sh.in	Tue Mar  3 20:05:59 1998
+@@ -73,7 +73,7 @@
+ defPROTOUID=3			# use this uid if PROTOUID doesn't exist
+ GROUP=/etc/group		# where to go for group entries
+ PROTOGID=@FAXGID@		# group who's gid we use for FAX user
+-defPROTOGID=10			# use this gid if PROTOGID doesn't exist
++defPROTOGID=21			# use this gid if PROTOGID doesn't exist
+ 
+ VERSION="@VERSION@"		# configured version
+ DATE="@DATE@"			# data software was configured
+@@ -776,7 +776,7 @@
+ 	boom
+     }
+     cd $DIR_SPOOL
+-    DIRS="archive bin client config dev docq doneq etc info log\
++    DIRS="archive bin client config dev docq doneq info log\
+ 	pollq recvq sendq status tmp"
+     for i in $DIRS; do
+ 	test -d $i || dirMisConfigured $DIR_SPOOL/$i
+@@ -798,7 +798,7 @@
+ #
+ if onClient; then
+     test -d $DIR_BIN	 || dirMisConfigured $DIR_BIN
+-    for file in sendfax sendpage faxstat faxalter faxcover faxmail faxrm; do
++    for file in sendfax sendpage faxstat faxalter faxcover faxmail faxrm textfmt; do
+ 	test -x $DIR_BIN/$file || {
+ 	    cat >&2 <<EOF
+ 
+@@ -831,23 +831,6 @@
+ 	   boom
+ 	}
+     done
+-    test -d $DIR_LIBEXEC || dirMisConfigured $DIR_LIBEXEC
+-    for file in textfmt; do
+-	test -f $DIR_LIBEXEC/$file || {
+-	    cat >&2 <<EOF
+-
+-FATAL ERROR: $DIR_LIBEXEC/$file does not exist!
+-
+-The file $DIR_LIBEXEC/$file does not exist.  If the HylaFAX
+-software is not yet installed you must do so before running this script.
+-If the software is installed but is configured for use in a different
+-location than this script expects then the software will not function
+-correctly.
+-
+-EOF
+-	   boom
+-	}
+-    done
+ 
+     otherBasicClientChecks
+ fi
+@@ -1134,7 +1117,7 @@
+ #
+ # PostScript RIP support.
+ #
+-if onServer; then
++if false; then
+     case $PS in
+     dps)	PATH_PSRIP=$PATH_DPSRIP;;
+     imp)	PATH_PSRIP=$PATH_IMPRIP;;
+@@ -1533,7 +1516,7 @@
+     test -z "$x" -o "$x" = y -o "$x" = yes
+ }
+ 
+-if onServer; then
++if false; then
+     x=`grep "^$FAX:" $PASSWD | cut -d: -f3`
+     if [ -z "$x" ]; then
+ 	echo ""
+@@ -2006,7 +1989,7 @@
+ #
+ # Startup/restart server processes.
+ #
+-if onServer; then
++if false; then
+     echo ""
+     echo "Restarting HylaFAX server processes."
+ 
+diff -rbu hylafax-4.0.2.orig/faxd/Getty.c++ hylafax-4.0.2/faxd/Getty.c++
+--- hylafax-4.0.2.orig/faxd/Getty.c++	Sat Feb 14 11:49:29 1998
++++ hylafax-4.0.2/faxd/Getty.c++	Sat May 29 21:55:37 1999
+@@ -217,7 +217,8 @@
+ {
+     // NB: this is executed in the parent
+     fxStr device = fxStr::format("%s/" | line, _PATH_DEV);
+-    Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
++    // XXX Debian
++    // Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
+     Sys::chmod(device, 0600);			// reset protection
+ }
+ 
+diff -rbu hylafax-4.0.2.orig/faxd/ModemServer.c++ hylafax-4.0.2/faxd/ModemServer.c++
+--- hylafax-4.0.2.orig/faxd/ModemServer.c++	Sat Feb 14 11:49:34 1998
++++ hylafax-4.0.2/faxd/ModemServer.c++	Sun May 30 01:02:27 1999
+@@ -522,12 +522,15 @@
+      */
+     struct stat sb;
+     (void) Sys::fstat(modemFd, sb);
++/* XXX Debian
+ #if HAS_FCHOWN
+     if (fchown(modemFd, UUCPLock::getUUCPUid(), sb.st_gid) < 0)
+ #else
+     if (Sys::chown(dev, UUCPLock::getUUCPUid(), sb.st_gid) < 0)
+ #endif
+ 	traceServer("%s: chown: %m", dev);
++*/
++
+ #if HAS_FCHMOD
+     if (fchmod(modemFd, deviceMode) < 0)
+ #else
+diff -rbu hylafax-4.0.2.orig/hfaxd/Status.c++ hylafax-4.0.2/hfaxd/Status.c++
+--- hylafax-4.0.2.orig/hfaxd/Status.c++	Sat Feb 14 11:50:09 1998
++++ hylafax-4.0.2/hfaxd/Status.c++	Tue Mar  3 20:06:00 1998
+@@ -136,9 +136,10 @@
+ 	if (!FileCache::update(statusFile, sb) || !S_ISREG(sb.st_mode))
+ 	    continue;
+ 	// verify there is a modem config file
+-	fxStr configFile = fxStr::format("/" FAX_CONFIG ".%s", dp->d_name);
++	fxStr configFile = fxStr::format(FAX_CONFIG ".%s", dp->d_name);
++	/* XXX Debian
+ 	if (!FileCache::lookup(configFile, sb) || !S_ISREG(sb.st_mode))
+-	    continue;
++	    continue;*/
+ 	fxStr fifoFile(fifoPrefix | dp->d_name);
+ 	if (!FileCache::lookup(fifoFile, sb) || !S_ISFIFO(sb.st_mode))
+ 	    continue;
+@@ -306,8 +307,9 @@
+ 	    continue;
+ 	// verify there is a modem config file
+ 	fxStr configFile = fxStr::format("/" FAX_CONFIG ".%s", dp->d_name);
++	/* XXX Debian
+ 	if (!FileCache::lookup(configFile, sb) || !S_ISREG(sb.st_mode))
+-	    continue;
++	    continue;*/
+ 	fxStr fifoFile(fifoPrefix | dp->d_name);
+ 	if (!FileCache::lookup(fifoFile, sb) || !S_ISFIFO(sb.st_mode))
+ 	    continue;
+diff -rbu hylafax-4.0.2.orig/man/hylafax.1 hylafax-4.0.2/man/hylafax.1
+--- hylafax-4.0.2.orig/man/hylafax.1	Sat Feb 14 11:51:03 1998
++++ hylafax-4.0.2/man/hylafax.1	Tue Mar  3 20:06:00 1998
+@@ -671,8 +671,7 @@
+ ${BIN}/faxmail	for converting email to \*(Ps
+ ${BIN}/faxrm	for removing queued jobs
+ ${BIN}/faxstat	for facsimile server status
+-${LIBEXEC}/sgi2fax	\s-1SGI\s+1 image file converter
+-${LIBEXEC}/textfmt	\s-1ASCII\s+1 text converter
++${BIN}/textfmt	\s-1ASCII\s+1 text converter
+ ${LIBDATA}/typerules	file type and conversion rules
+ ${LIBDATA}/pagesizes	page size database
+ ${LIBDATA}/faxcover.ps	prototype cover page
+@@ -687,7 +686,6 @@
+ .IR faxmail (1),
+ .IR faxrm (1),
+ .IR faxstat (1),
+-.IR sgi2fax (1),
+ .IR faxq (1M),
+ .IR viewfax (1),
+ .IR hylafax (4F),
+diff -rbu hylafax-4.0.2.orig/man/sendfax.1 hylafax-4.0.2/man/sendfax.1
+--- hylafax-4.0.2.orig/man/sendfax.1	Sat Feb 14 11:51:10 1998
++++ hylafax-4.0.2/man/sendfax.1	Tue Mar  3 20:06:00 1998
+@@ -865,8 +865,7 @@
+ ${LIBDATA}/pagesizes	page size database
+ ${LIBDATA}/dialrules	optional client dialstring rules
+ ${BIN}/faxcover	for generating cover sheets
+-${LIBEXEC}/textfmt	for converting text to PostScript
+-${LIBEXEC}/sgi2fax	for converting SGI RGB images
++${BIN}/textfmt	for converting text to PostScript
+ /usr/tmp/sndfaxXXXXXX	temporary files
+ .fi
+ .SH "SEE ALSO"
+@@ -877,7 +876,6 @@
+ .IR faxmail (1),
+ .IR faxrm (1),
+ .IR faxstat (1),
+-.IR sgi2fax (1),
+ .IR textfmt (1),
+ .IR hfaxd (1M),
+ .IR hylafax (4F),
+diff -rbu hylafax-4.0.2.orig/man/textfmt.1 hylafax-4.0.2/man/textfmt.1
+--- hylafax-4.0.2.orig/man/textfmt.1	Sat Feb 14 11:51:15 1998
++++ hylafax-4.0.2/man/textfmt.1	Tue Mar  3 20:06:00 1998
+@@ -32,7 +32,7 @@
+ .SH NAME
+ textfmt \- convert text to \*(Ps\(tm for facsimile transmission
+ .SH SYNOPSIS
+-.B ${LIBEXEC}/textfmt
++.B ${BIN}/textfmt
+ [
+ .I options
+ ] [
+diff -rbu hylafax-4.0.2.orig/util/TextFmt.c++ hylafax-4.0.2/util/TextFmt.c++
+--- hylafax-4.0.2.orig/util/TextFmt.c++	Sat Feb 14 11:47:30 1998
++++ hylafax-4.0.2/util/TextFmt.c++	Sun Dec 20 19:46:20 1998
+@@ -74,7 +74,7 @@
+     workStarted = FALSE;
+ 
+     fonts = new FontDict;
+-    curFont = addFont("Roman", "Courier");
++    curFont = addFont("Roman", "com");
+ 
+     TextFmt::setupConfig();	// NB: virtual
+ }
+diff -rbu hylafax-4.0.2.orig/util/faxcron.sh.in hylafax-4.0.2/util/faxcron.sh.in
+--- hylafax-4.0.2.orig/util/faxcron.sh.in	Sat Feb 14 11:48:01 1998
++++ hylafax-4.0.2/util/faxcron.sh.in	Mon Sep 28 11:55:17 1998
+@@ -41,10 +41,10 @@
+ AGELOG=30			# keep log info for last 30 days
+ AGERCV=7			# purge received facsimile after 2 days
+ AGETMP=1			# purge orphaned temp files after 1 day
+-FAXUSER=fax			# owner of log files
++FAXUSER=root			# owner of log files
+ LOGMODE=0644			# mode for log files
+-XFERLOG=etc/xferfaxlog		# HylaFAX xferfaxlog file location
+-LAST=etc/lastrun		# file where time+date of last run recorded
++XFERLOG=log/xferfaxlog		# HylaFAX xferfaxlog file location
++LAST=status/faxcron.lastrun	# file where time+date of last run recorded
+ 
+ cd @SPOOL@			# NB: everything below assumes this
+ 
+@@ -68,8 +68,8 @@
+ TEE=tee
+ UPDATE="date +'%D %H:%M' >$LAST"
+ 
+-JUNK=/tmp/faxjunk$$		# temp file used multiple times
+-AWKTMP=/tmp/faxawk$$		# temp file for awk program
++JUNK=`tempfile`		# temp file used multiple times
++AWKTMP=`tempfile`	# temp file for awk program
+ 
+ while [ x"$1" != x"" ] ; do
+     case $1 in
+@@ -280,7 +280,7 @@
+ EOF
+ $AWK -f $AWKTMP -v LASTRUN="$LASTRUN" TRANSCRIPT="\
+     LOGFILE=log/%s;\
+-    TMP=/tmp/faxlog\$\$;\
++    TMP=`tempfile`;\
+     if [ -f \$LOGFILE ]; then\
+ 	$SED -n -e '/%s %s %s.*SESSION BEGIN/,/SESSION END/p' \$LOGFILE |\
+ 	$SED -e '/start.*timer/d'\
+diff -rbu hylafax-4.0.2.orig/util/pagesizes.in hylafax-4.0.2/util/pagesizes.in
+--- hylafax-4.0.2.orig/util/pagesizes.in	Sat Feb 14 11:48:00 1998
++++ hylafax-4.0.2/util/pagesizes.in	Sat Apr 25 15:06:20 1998
+@@ -71,4 +71,4 @@
+ Japanese Letter		JP-LET	 8598	12141	 7600	 10200	900	400
+ Japanese Legal		JP-LEG	12141	17196	11200	 15300	900	400
+ #
+-@DEFPAGESIZE@
++#@DEFPAGESIZE@
+diff -rbu hylafax-4.0.2.orig/util/recvstats.sh.in hylafax-4.0.2/util/recvstats.sh.in
+--- hylafax-4.0.2.orig/util/recvstats.sh.in	Sat Feb 14 11:48:06 1998
++++ hylafax-4.0.2/util/recvstats.sh.in	Mon Sep 28 11:56:03 1998
+@@ -67,7 +67,7 @@
+     shift
+ done
+ if [ -z "$FILES" ]; then
+-    FILES=$SPOOL/etc/xferfaxlog
++    FILES=$SPOOL/log/xferfaxlog
+ fi
+ 
+ #
+@@ -117,7 +117,7 @@
+ #
+ # Generate an awk program to process the statistics file.
+ #
+-tmpAwk=/tmp/xferfax$$
++tmpAwk=`tempfile`
+ trap "rm -f $tmpAwk; exit 1" 0 1 2 15
+ 
+ ($CAT<<'EOF'
+diff -rbu hylafax-4.0.2.orig/util/textfmt.c++ hylafax-4.0.2/util/textfmt.c++
+--- hylafax-4.0.2.orig/util/textfmt.c++	Sat Feb 14 11:48:14 1998
++++ hylafax-4.0.2/util/textfmt.c++	Sun Dec 20 19:44:31 1998
+@@ -58,7 +58,7 @@
+ 	" [-V #]"
+ 	" files... >out.ps\n", prog);
+     fprintf(stderr,"Default options:"
+-	" -f Courier"
++	" -f com"
+ 	" -1"
+ 	" -p 11bp"
+ 	" -o 0"
+diff -rbu hylafax-4.0.2.orig/util/typerules hylafax-4.0.2/util/typerules
+--- hylafax-4.0.2.orig/util/typerules	Sat Feb 14 11:48:08 1998
++++ hylafax-4.0.2/util/typerules	Sun Dec 20 19:46:54 1998
+@@ -125,10 +125,10 @@
+ 0	string		WNGZWZSS	error	Wingz spreadsheet
+ 0       string          #Inventor V	error	IRIS Inventor file 
+ >15     string          binary		error	binary IRIS Inventor file
+->15     string          ascii		ps	%F/textfmt -B -f Courier-Bold\
++>15     string          ascii		ps	textfmt -B -f cob\
+ 						    -p 11 -s %s >%o <%i
+ #
+ # This causes anything else with ascii-only data to be treated as text.
+ #
+-0	ascii		x		ps	%F/textfmt -B -f Courier-Bold\
++0	ascii		x		ps	textfmt -B -f cob\
+ 						    -p 11 -s %s >%o <%i
+diff -rbu hylafax-4.0.2.orig/util/wedged.sh hylafax-4.0.2/util/wedged.sh
+--- hylafax-4.0.2.orig/util/wedged.sh	Sat Feb 14 11:48:07 1998
++++ hylafax-4.0.2/util/wedged.sh	Wed Sep  2 02:42:07 1998
+@@ -70,27 +70,27 @@
+ #
+ # NB: this is for an System V-style system.
+ #
+-if [ -f /etc/inittab ]; then
+-    ed - /etc/inittab<<EOF
+-/^[^#].*:respawn:.*faxgetty[ ][ ]*$tty/s/respawn/off/
+-w
+-q
+-EOF
++#if [ -f /etc/inittab ]; then
++#    ed - /etc/inittab<<EOF
++#/^[^#].*:respawn:.*faxgetty[ ][ ]*$tty/s/respawn/off/
++#w
++#q
++#EOF
+     #
+     # ed doesn't appear to have consistent exit
+     # status under SysV-style systems (does under BSD);
+     # this means checking if the above succeeded is
+     # problematic.
+     #
+-    if [ $? -ne 0 ] && /bin/kill -1 1; then
+-	cat<<EOF
+-
+-The $tty entry in /etc/inittab that spawns faxgetty on $device has
+-been disabled.  After you have figured out what is wrong you may
+-want to restart this process.
+-EOF
+-    fi
+-fi
++#    if [ $? -ne 0 ] && /bin/kill -1 1; then
++#	cat<<EOF
++#
++#The $tty entry in /etc/inittab that spawns faxgetty on $device has
++#been disabled.  After you have figured out what is wrong you may
++#want to restart this process.
++#EOF
++#    fi
++#fi
+ 
+ echo ""
+ echo "Consult the server trace logs for more information on what is happening."
+diff -rbu hylafax-4.0.2.orig/util/xferfaxstats.sh.in hylafax-4.0.2/util/xferfaxstats.sh.in
+--- hylafax-4.0.2.orig/util/xferfaxstats.sh.in	Sat Feb 14 11:48:08 1998
++++ hylafax-4.0.2/util/xferfaxstats.sh.in	Mon Sep 28 11:56:18 1998
+@@ -67,7 +67,7 @@
+     shift
+ done
+ if [ -z "$FILES" ]; then
+-    FILES=$SPOOL/etc/xferfaxlog
++    FILES=$SPOOL/log/xferfaxlog
+ fi
+ 
+ #
+@@ -152,7 +152,7 @@
+ #
+ # Generate an awk program to process the statistics file.
+ #
+-tmpAwk=/tmp/xferfax$$
++tmpAwk=`tempfile`
+ trap "rm -f $tmpAwk; exit 1" 0 1 2 15
+ 
+ ($CAT<<'EOF'
+diff -rbu hylafax-4.0.2.orig/hfaxd/FileSystem.c++ hylafax-4.0.2/hfaxd/FileSystem.c++
+--- hylafax-4.0.2.orig/hfaxd/FileSystem.c++	Tue Aug 31 22:18:56 1999
++++ hylafax-4.0.2/hfaxd/FileSystem.c++	Sat Apr 11 17:18:09 1998
+@@ -209,7 +209,8 @@
+     for (u_int i = 0, n = N(dirs); i < n; i++) {
+ 	struct stat sb;
+ 	if (!FileCache::lookup(dirs[i].pathname, sb) || !S_ISDIR(sb.st_mode)) {
+-	    logError("%s: Not a directory.", dirs[i].pathname);
++	    /* XXX Debian /var/spool/fax/etc is a link */
++	    /* logError("%s: Not a directory.", dirs[i].pathname); */
+ 	    continue;
+ 	}
+ 	dirs[i].ino = sb.st_ino;
+diff -rbu hylafax-4.0.2.orig/hfaxd/Jobs.c++ hylafax-4.0.2/hfaxd/Jobs.c++
+--- hylafax-4.0.2.orig/hfaxd/Jobs.c++	Sat Feb 14 11:50:05 1998
++++ hylafax-4.0.2/hfaxd/Jobs.c++	Tue Mar  3 20:06:00 1998
+@@ -132,7 +132,7 @@
+     { T_STATE,		A_RUSR|A_RADM|A_ROTH },
+     { T_STATUS,		A_RUSR|A_RADM|A_WADM|A_ROTH },
+     { T_SUBADDR,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
+-    { T_TAGLINE,	A_RUSR|A_RADM|A_WADM|A_ROTH },
++    { T_TAGLINE,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
+     { T_TOTDIALS,	A_RUSR|A_RADM|A_ROTH },
+     { T_TOTPAGES,	A_RUSR|A_RADM|A_ROTH },
+     { T_TOTTRIES,	A_RUSR|A_RADM|A_ROTH },
+@@ -141,7 +141,7 @@
+     { T_TO_USER,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
+     { T_USE_CONTCOVER,	A_RUSR|A_RADM|A_WADM|A_ROTH },
+     { T_USE_ECM,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
+-    { T_USE_TAGLINE,	A_RUSR|A_RADM|A_WADM|A_ROTH },
++    { T_USE_TAGLINE,	A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
+     { T_USRKEY,		A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
+     { T_VRES,		A_RUSR|A_WUSR|A_RADM|A_WADM|A_ROTH },
+     { T_NIL,		0 },
--- hylafax-4.1.1.orig/debian/lintian.override.hylafax-server
+++ hylafax-4.1.1/debian/lintian.override.hylafax-server
@@ -0,0 +1,55 @@
+hylafax-server: non-standard-file-perm etc/hylafax/hosts.hfaxd 0600 != 0644
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/notify.awk
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/faxrcvd
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/pollrcvd
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/mkcover
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/notify
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/ps2fax.gs
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/pdf2fax.gs
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/wedged
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/tiff2fax
+hylafax-server: file-in-unusual-dir var/spool/hylafax/bin/pcl2fax
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/exar
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/skel
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/uds-fastalk
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/rc144ac-1
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/att-dataport-2.0
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/tricom2842
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/zyxel-1496e-2.0
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/everex-2496d
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/ppi-pm14400fxmt
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/ppi-pm14400fxsa
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/gvc-288-2
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/rc32acl-1
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/rockwell
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/e-tech
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/cirrus
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/class1
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/class2
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/mt-1432
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/telebit-qblazer
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/moto-288
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/zyxel-1496e-1
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/att-dataport
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/telebit-wb
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/sierra
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/gvc-288
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/usr-2.0
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/usr-rts
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/usr-xon
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/zyxel-1496e
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/intel-400e
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/att-dataport-2
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/dsi-scout+
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/class2.0
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/zyxel-2864
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/telebit-t3000
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/nuvo-voyager
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/rc288dpi
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/rc288dpi-1
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/rc144ac
+hylafax-server: file-in-unusual-dir var/spool/hylafax/config/rc32acl
+hylafax-server: file-in-unusual-dir var/spool/hylafax/etc
+hylafax-server: no-debconf-config
+hylafax-server: postinst-uses-db-input
+hylafax-server: non-standard-dir-perm var/spool/hylafax/tmp/ 4777 != 0755
--- hylafax-4.1.1.orig/debian/cron.weekly
+++ hylafax-4.1.1/debian/cron.weekly
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test -f /usr/sbin/faxcron || exit 0
+test -f /usr/sbin/faxqclean || exit 0
+test -f /var/spool/hylafax/log/xferfaxlog || exit 0
+
+# Rotate the HylaFAX logfile
+
+savelog -c 5 /var/log/hylafax/hylafax.log >/dev/null
+
+# HylaFAX routine maintenance script
+
+savelog -c 5 /var/log/hylafax/faxcron.log >/dev/null
+faxcron -info 35 -log 35 -rcv 100 -tmp 15 -mode 660 >> /var/log/hylafax/faxcron.log
+
+# HylaFAX queue cleaner process (3024000s = 35 day)
+
+savelog -c 5 /var/log/hylafax/faxqclean.log >/dev/null
+faxqclean -t -j 3024000 >> /var/log/hylafax/faxqclean.log
--- hylafax-4.1.1.orig/debian/faxcover.ps
+++ hylafax-4.1.1/debian/faxcover.ps
@@ -0,0 +1,1210 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
+%%Title: debian-faxcover.dvi
+%%Pages: 1
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%DocumentFonts: Times-Roman
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips -o debian-faxcover.ps debian-faxcover.dvi
+%DVIPSParameters: dpi=600, compressed
+%DVIPSSource:  TeX output 1999.11.13:1808
+%%BeginProcSet: texc.pro
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
+1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
+0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
+sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
+/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
+/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
+A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
+get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
+ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
+fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
+{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
+chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
+1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
+forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: 8r.enc
+% @@psencodingfile@{
+%   author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry",
+%   version = "0.6",
+%   date = "1 July 1998",
+%   filename = "8r.enc",
+%   email = "tex-fonts@@tug.org",
+%   docstring = "Encoding for TrueType or Type 1 fonts
+%                to be used with TeX."
+% @}
+% 
+% Idea is to have all the characters normally included in Type 1 fonts
+% available for typesetting. This is effectively the characters in Adobe
+% Standard Encoding + ISO Latin 1 + extra characters from Lucida.
+% 
+% Character code assignments were made as follows:
+% 
+% (1) the Windows ANSI characters are almost all in their Windows ANSI
+% positions, because some Windows users cannot easily reencode the
+% fonts, and it makes no difference on other systems. The only Windows
+% ANSI characters not available are those that make no sense for
+% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
+% (173). quotesingle and grave are moved just because it's such an
+% irritation not having them in TeX positions.
+% 
+% (2) Remaining characters are assigned arbitrarily to the lower part
+% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
+% 
+% (3) Y&Y Lucida Bright includes some extra text characters; in the
+% hopes that other PostScript fonts, perhaps created for public
+% consumption, will include them, they are included starting at 0x12.
+% 
+% (4) Remaining positions left undefined are for use in (hopefully)
+% upward-compatible revisions, if someday more characters are generally
+% available.
+% 
+% (5) hyphen appears twice for compatibility with both 
+% ASCII and Windows.
+% 
+/TeXBase1Encoding [
+% 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
+  /.notdef /dotaccent /fi /fl
+  /fraction /hungarumlaut /Lslash /lslash
+  /ogonek /ring /.notdef
+  /breve /minus /.notdef 
+% These are the only two remaining unencoded characters, so may as
+% well include them.
+  /Zcaron /zcaron 
+% 0x10
+ /caron /dotlessi 
+% (unusual TeX characters available in, e.g., Lucida Bright)
+ /dotlessj /ff /ffi /ffl 
+ /.notdef /.notdef /.notdef /.notdef
+ /.notdef /.notdef /.notdef /.notdef
+ % very contentious; it's so painful not having quoteleft and quoteright
+ % at 96 and 145 that we move the things normally found there to here.
+ /grave /quotesingle 
+% 0x20 (ASCII begins)
+ /space /exclam /quotedbl /numbersign
+ /dollar /percent /ampersand /quoteright
+ /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
+% 0x30
+ /zero /one /two /three /four /five /six /seven
+ /eight /nine /colon /semicolon /less /equal /greater /question
+% 0x40
+ /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
+% 0x50
+ /P /Q /R /S /T /U /V /W
+ /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+% 0x60
+ /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
+% 0x70
+ /p /q /r /s /t /u /v /w
+ /x /y /z /braceleft /bar /braceright /asciitilde
+ /.notdef % rubout; ASCII ends
+% 0x80
+ /.notdef /.notdef /quotesinglbase /florin
+ /quotedblbase /ellipsis /dagger /daggerdbl
+ /circumflex /perthousand /Scaron /guilsinglleft
+ /OE /.notdef /.notdef /.notdef
+% 0x90
+ /.notdef /.notdef /.notdef /quotedblleft
+ /quotedblright /bullet /endash /emdash
+ /tilde /trademark /scaron /guilsinglright
+ /oe /.notdef /.notdef /Ydieresis
+% 0xA0
+ /.notdef % nobreakspace
+ /exclamdown /cent /sterling
+ /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft
+ /logicalnot
+ /hyphen % Y&Y (also at 45); Windows' softhyphen
+ /registered
+ /macron
+% 0xD0
+ /degree /plusminus /twosuperior /threesuperior
+ /acute /mu /paragraph /periodcentered
+ /cedilla /onesuperior /ordmasculine /guillemotright
+ /onequarter /onehalf /threequarters /questiondown
+% 0xC0
+ /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis
+ /Igrave /Iacute /Icircumflex /Idieresis
+% 0xD0
+ /Eth /Ntilde /Ograve /Oacute
+ /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls
+% 0xE0
+ /agrave /aacute /acircumflex /atilde
+ /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis
+ /igrave /iacute /icircumflex /idieresis
+% 0xF0
+ /eth /ntilde /ograve /oacute
+ /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis
+] def
+
+%%EndProcSet
+%%BeginProcSet: texps.pro
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
+exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub
+dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
+ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict
+end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{
+dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1
+roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def
+dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}
+if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}
+def end
+
+%%EndProcSet
+%%BeginProcSet: special.pro
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{
+psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
+roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
+moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict
+begin/SpecialSave save N gsave normalscale currentpoint TR
+@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{
+CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
+closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
+sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
+}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
+CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
+lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N
+/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}
+repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N
+/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX
+currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY
+moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X
+/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0
+1 startangle endangle arc savematrix setmatrix}N end
+
+%%EndProcSet
+TeXDict begin 39158280 55380996 1000 600 600 (debian-faxcover.dvi)
+@start /Fa 138[50 1[39 33 1[50 50 1[78 5[50 33 44 2[50
+44 18[72 19[28 58[{TeXBase1Encoding ReEncodeFont}13 99.6264
+/Times-Roman rf /Fb 135[60 11[33 6[53 3[53 12[73 13[66
+11[33 58[{TeXBase1Encoding ReEncodeFont}7 119.552 /Times-Roman
+rf /Fc 133[64 1[72 2[72 40 56 48 2[72 72 112 40 1[40
+40 1[72 1[64 72 64 72 64 12[88 80 3[104 8[80 4[104 6[40
+11[36 46[{TeXBase1Encoding ReEncodeFont}25 143.462 /Times-Roman
+rf /Fd 209[52 46[{TeXBase1Encoding ReEncodeFont}1 206.559
+/Times-Roman rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%PaperSize: A4
+
+%%EndSetup
+%%Page: 1 1
+1 0 bop -472 -472 a
+ /zeroPcountStr (?) def /RKwordbreak ( ) def /RKbreakIntoLines { /proc
+exch def /linewidth exch def /textstring exch def /breakwidth RKwordbreak
+stringwidth pop def /curwidth 0 def /lastwordbreak 0 def /startchar
+0 def /restoftext textstring def { restoftext RKwordbreak search {
+/nextword exch def pop /restoftext exch def /wordwidth nextword stringwidth
+pop def curwidth wordwidth add linewidth gt { textstring startchar
+lastwordbreak startchar sub getinterval proc /startchar lastwordbreak
+def /curwidth wordwidth breakwidth add def } { /curwidth curwidth wordwidth
+add breakwidth add def } ifelse /lastwordbreak lastwordbreak nextword
+length add 1 add def } { pop exit } ifelse } loop /lastchar textstring
+length def textstring startchar lastchar startchar sub getinterval
+proc } def
+ -472 -472 a 4016 -472 a
+ currentpoint pop /rightm exch def
+ 4016 -472
+a -472 619 a @beginspecial 0 @llx 0 @lly 110 @urx 136
+@ury 1100 @rwi @setspecial
+%%BeginDocument: debian-logo.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: debian.pstex
+%%Creator: fig2dev Version 3.2 Patchlevel 1a
+%%CreationDate: Sat Nov 13 17:50:13 1999
+%%For: clb@opale (Christophe Le Bars,,,)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 110 136
+%%Pages: 0
+%%BeginSetup
+%%EndSetup
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+/col32 {0.843 0.016 0.318 srgb} bind def
+
+end
+save
+-11.0 147.0 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n -1000 3439 m -1000 -1000 l 3006 -1000 l 3006 3439 l cp clip n
+ 0.06000 0.06000 sc
+% Polyline
+n 1209 980 m 1208 980 l 1203 980 l 1197 981 l 1194 981 l 1193 982 l
+ 1194 983 l 1198 985 l 1202 987 l 1208 989 l 1214 991 l
+ 1220 992 l 1227 994 l 1237 995 l 1244 997 l 1246 997 l
+ 1249 995 l 1251 993 l 1253 991 l 1255 990 l 1256 989 l
+ 1258 987 l 1260 986 l 1261 984 l 1263 983 l 1264 982 l
+ 1266 980 l 1268 978 l 1270 976 l 1269 976 l 1264 977 l
+ 1258 979 l 1254 980 l 1250 980 l 1246 981 l 1242 981 l
+ 1237 981 l 1233 981 l 1229 981 l 1225 981 l 1221 981 l
+ 1215 980 l 1210 980 l 1209 980 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 1342 946 m 1343 945 l 1346 940 l 1350 934 l 1354 930 l 1356 926 l
+ 1359 921 l 1361 917 l 1363 912 l 1365 907 l 1367 903 l
+ 1368 899 l 1369 893 l 1371 887 l 1372 881 l 1372 880 l
+ 1372 881 l 1371 885 l 1370 890 l 1368 894 l 1367 897 l
+ 1366 899 l 1365 902 l 1363 906 l 1361 908 l 1360 911 l
+ 1358 914 l 1356 917 l 1354 922 l 1351 925 l 1351 926 l
+ 1349 927 l 1339 933 l 1328 939 l 1322 943 l 1320 943 l
+ 1321 940 l 1325 934 l 1330 927 l 1336 920 l 1341 914 l
+ 1344 908 l 1347 903 l 1349 897 l 1351 892 l 1351 891 l
+ 1350 893 l 1342 902 l 1332 916 l 1323 928 l 1318 935 l
+ 1317 939 l 1317 941 l 1321 941 l 1326 939 l 1332 937 l
+ 1337 936 l 1339 936 l 1340 936 l 1341 938 l 1342 940 l
+ 1342 942 l 1342 945 l 1342 946 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 1392 818 m 1392 816 l 1393 806 l 1393 795 l 1393 787 l 1393 783 l
+ 1392 782 l 1392 781 l 1391 781 l 1390 781 l 1389 781 l
+ 1388 782 l 1387 783 l 1387 784 l 1386 784 l 1386 785 l
+ 1385 786 l 1385 787 l 1384 788 l 1383 790 l 1382 794 l
+ 1380 799 l 1379 803 l 1379 804 l 1380 805 l 1382 807 l
+ 1383 809 l 1384 811 l 1384 815 l 1385 819 l 1386 823 l
+ 1387 826 l 1387 828 l 1388 828 l 1389 826 l 1391 822 l
+ 1392 819 l 1392 818 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 1114 205 m 1115 205 l 1118 206 l 1122 206 l 1125 207 l 1128 207 l
+ 1131 207 l 1134 208 l 1136 208 l 1139 209 l 1140 209 l
+ 1141 210 l 1141 211 l 1141 212 l 1142 212 l 1145 211 l
+ 1149 210 l 1151 210 l 1153 209 l 1154 209 l 1155 209 l
+ 1155 208 l 1156 208 l 1156 207 l 1155 207 l 1154 207 l
+ 1153 207 l 1152 207 l 1152 206 l 1151 206 l 1147 206 l
+ 1141 206 l 1132 205 l 1122 205 l 1115 205 l 1114 205 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 1141 212 m 1131 214 l 1140 213 l 1141 212 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 1555 835 m 1555 836 l 1555 842 l 1555 852 l 1555 860 l 1555 867 l
+ 1555 872 l 1553 877 l 1551 882 l 1549 887 l 1547 892 l
+ 1544 897 l 1542 903 l 1539 910 l 1535 919 l 1533 927 l
+ 1532 929 l 1531 930 l 1525 932 l 1517 937 l 1511 939 l
+ 1510 940 l 1509 942 l 1505 949 l 1501 958 l 1499 963 l
+ 1498 966 l 1499 968 l 1501 968 l 1503 968 l 1505 968 l
+ 1507 969 l 1506 971 l 1505 975 l 1502 982 l 1500 988 l
+ 1499 989 l 1498 990 l 1494 994 l 1486 1000 l 1479 1007 l
+ 1473 1012 l 1467 1018 l 1460 1024 l 1453 1031 l 1444 1039 l
+ 1436 1046 l 1429 1052 l 1422 1057 l 1416 1062 l 1410 1065 l
+ 1404 1068 l 1399 1070 l 1398 1070 l 1396 1070 l 1393 1070 l
+ 1391 1069 l 1391 1068 l 1392 1066 l 1395 1064 l 1398 1061 l
+ 1401 1059 l 1404 1057 l 1406 1055 l 1407 1053 l 1408 1051 l
+ 1409 1049 l 1408 1050 l 1402 1054 l 1395 1060 l 1388 1065 l
+ 1383 1069 l 1380 1072 l 1378 1075 l 1377 1079 l 1375 1082 l
+ 1373 1085 l 1370 1087 l 1365 1090 l 1357 1092 l 1347 1096 l
+ 1334 1099 l 1326 1102 l 1324 1102 l 1323 1101 l 1323 1099 l
+ 1322 1098 l 1321 1098 l 1317 1100 l 1309 1103 l 1295 1109 l
+ 1278 1115 l 1260 1121 l 1243 1126 l 1227 1130 l 1212 1133 l
+ 1199 1134 l 1187 1133 l 1174 1131 l 1161 1128 l 1148 1124 l
+ 1134 1118 l 1119 1111 l 1104 1103 l 1090 1093 l 1076 1083 l
+ 1062 1072 l 1050 1061 l 1040 1049 l 1031 1038 l 1023 1026 l
+ 1016 1014 l 1011 1002 l 1006 988 l 1003 972 l 1000 954 l
+ 997 933 l 996 912 l 994 891 l 994 875 l 993 864 l
+ 993 859 l 993 858 l 993 859 l 992 861 l 992 864 l
+ 991 866 l 991 867 l 990 867 l 989 867 l 988 868 l
+ 987 870 l 986 871 l 986 870 l 985 862 l 985 848 l
+ 984 831 l 984 815 l 984 802 l 986 791 l 988 780 l
+ 990 769 l 994 759 l 999 747 l 1005 736 l 1011 725 l
+ 1018 715 l 1025 706 l 1033 698 l 1041 691 l 1050 684 l
+ 1061 677 l 1075 669 l 1090 661 l 1102 655 l 1109 652 l
+ 1110 651 l 1111 650 l 1118 647 l 1130 642 l 1146 635 l
+ 1160 629 l 1173 625 l 1183 622 l 1193 621 l 1204 620 l
+ 1215 619 l 1226 620 l 1238 622 l 1250 624 l 1261 627 l
+ 1271 630 l 1280 634 l 1288 639 l 1297 644 l 1307 651 l
+ 1318 660 l 1329 669 l 1338 677 l 1343 681 l 1344 682 l
+ 1343 681 l 1338 674 l 1330 664 l 1322 654 l 1314 646 l
+ 1308 640 l 1302 635 l 1295 630 l 1288 624 l 1280 619 l
+ 1272 614 l 1263 610 l 1255 607 l 1247 604 l 1239 602 l
+ 1230 601 l 1219 600 l 1206 600 l 1193 600 l 1181 600 l
+ 1175 600 l 1174 600 l 1173 600 l 1167 600 l 1156 601 l
+ 1142 602 l 1129 603 l 1118 604 l 1109 606 l 1101 609 l
+ 1093 612 l 1084 616 l 1075 620 l 1067 626 l 1058 631 l
+ 1051 637 l 1044 643 l 1039 649 l 1032 656 l 1026 665 l
+ 1019 677 l 1013 689 l 1009 697 l 1008 699 l 1007 700 l
+ 1001 704 l 993 710 l 985 717 l 980 723 l 976 730 l
+ 973 737 l 971 746 l 969 756 l 967 765 l 966 774 l
+ 964 781 l 962 787 l 959 793 l 954 798 l 951 802 l
+ 950 803 l 950 804 l 949 808 l 948 818 l 947 833 l
+ 945 852 l 943 871 l 941 889 l 940 905 l 940 919 l
+ 940 930 l 941 941 l 942 950 l 944 960 l 948 970 l
+ 952 980 l 957 989 l 963 999 l 969 1007 l 976 1016 l
+ 983 1024 l 991 1031 l 999 1038 l 1007 1045 l 1016 1053 l
+ 1026 1061 l 1039 1071 l 1053 1083 l 1069 1095 l 1083 1106 l
+ 1093 1114 l 1098 1117 l 1099 1118 l 1100 1119 l 1103 1121 l
+ 1107 1124 l 1110 1127 l 1111 1128 l 1111 1129 l 1110 1130 l
+ 1109 1131 l 1107 1132 l 1106 1132 l 1106 1133 l 1105 1135 l
+ 1106 1138 l 1106 1140 l 1105 1139 l 1099 1137 l 1090 1132 l
+ 1082 1128 l 1076 1125 l 1071 1122 l 1065 1118 l 1060 1114 l
+ 1054 1110 l 1049 1106 l 1043 1101 l 1039 1097 l 1034 1093 l
+ 1029 1087 l 1023 1080 l 1016 1073 l 1012 1068 l 1011 1067 l
+ 1012 1068 l 1015 1073 l 1019 1079 l 1022 1084 l 1025 1088 l
+ 1028 1092 l 1031 1096 l 1034 1100 l 1038 1104 l 1041 1107 l
+ 1044 1111 l 1049 1115 l 1054 1119 l 1059 1123 l 1060 1124 l
+ 1059 1124 l 1054 1121 l 1045 1117 l 1037 1113 l 1031 1109 l
+ 1025 1103 l 1019 1096 l 1012 1087 l 1004 1078 l 998 1068 l
+ 991 1060 l 987 1054 l 982 1048 l 977 1044 l 972 1042 l
+ 969 1040 l 968 1040 l 968 1041 l 971 1045 l 978 1055 l
+ 987 1069 l 997 1085 l 1007 1099 l 1017 1111 l 1027 1122 l
+ 1036 1131 l 1047 1140 l 1056 1147 l 1067 1153 l 1078 1160 l
+ 1090 1167 l 1103 1174 l 1117 1180 l 1130 1185 l 1144 1190 l
+ 1157 1195 l 1169 1198 l 1180 1201 l 1191 1202 l 1191 1203 l
+ 1203 1204 l 1215 1204 l 1227 1203 l 1240 1200 l 1255 1197 l
+ 1270 1192 l 1283 1188 l 1293 1185 l 1297 1183 l 1298 1183 l
+ 1297 1183 l 1290 1183 l 1279 1184 l 1269 1184 l 1260 1184 l
+ 1253 1185 l 1245 1185 l 1237 1184 l 1227 1184 l 1218 1183 l
+ 1209 1182 l 1201 1181 l 1193 1179 l 1184 1177 l 1173 1173 l
+ 1160 1169 l 1153 1167 l 1151 1166 l 1150 1165 l 1145 1163 l
+ 1139 1160 l 1134 1157 l 1130 1154 l 1125 1151 l 1120 1147 l
+ 1115 1143 l 1111 1140 l 1109 1137 l 1107 1136 l 1107 1134 l
+ 1107 1133 l 1107 1132 l 1107 1131 l 1108 1130 l 1109 1130 l
+ 1115 1132 l 1127 1137 l 1145 1143 l 1164 1149 l 1182 1155 l
+ 1198 1160 l 1212 1163 l 1225 1166 l 1237 1168 l 1248 1169 l
+ 1261 1170 l 1274 1170 l 1287 1170 l 1301 1169 l 1315 1167 l
+ 1328 1164 l 1340 1161 l 1352 1158 l 1364 1153 l 1375 1148 l
+ 1386 1142 l 1398 1135 l 1413 1125 l 1428 1114 l 1445 1102 l
+ 1460 1091 l 1471 1082 l 1476 1079 l 1477 1078 l 1478 1077 l
+ 1482 1074 l 1489 1068 l 1496 1063 l 1501 1058 l 1506 1054 l
+ 1510 1049 l 1515 1044 l 1520 1038 l 1525 1033 l 1529 1028 l
+ 1532 1025 l 1536 1022 l 1539 1021 l 1542 1020 l 1544 1019 l
+ 1545 1019 l 1544 1020 l 1541 1024 l 1538 1029 l 1536 1032 l
+ 1536 1034 l 1537 1034 l 1538 1034 l 1540 1033 l 1542 1033 l
+ 1543 1033 l 1543 1034 l 1542 1037 l 1539 1041 l 1537 1045 l
+ 1537 1046 l 1538 1045 l 1542 1038 l 1547 1028 l 1551 1020 l
+ 1553 1015 l 1553 1013 l 1551 1012 l 1547 1013 l 1542 1014 l
+ 1539 1015 l 1538 1013 l 1539 1009 l 1543 1002 l 1549 991 l
+ 1558 979 l 1564 970 l 1565 968 l 1566 969 l 1570 974 l
+ 1576 983 l 1580 988 l 1581 989 l 1581 988 l 1580 982 l
+ 1580 973 l 1580 964 l 1582 957 l 1585 951 l 1589 944 l
+ 1595 937 l 1601 928 l 1608 920 l 1613 912 l 1618 904 l
+ 1620 895 l 1622 885 l 1623 872 l 1622 858 l 1622 849 l
+ 1622 847 l 1623 846 l 1625 843 l 1628 839 l 1631 838 l
+ 1632 838 l 1633 841 l 1634 846 l 1634 853 l 1634 860 l
+ 1633 868 l 1632 874 l 1630 881 l 1627 890 l 1624 900 l
+ 1622 907 l 1622 908 l 1623 907 l 1625 900 l 1629 889 l
+ 1632 880 l 1634 873 l 1635 869 l 1635 864 l 1634 860 l
+ 1632 857 l 1631 853 l 1630 850 l 1630 845 l 1630 837 l
+ 1631 827 l 1632 818 l 1632 816 l 1632 817 l 1633 820 l
+ 1634 824 l 1636 827 l 1637 829 l 1638 832 l 1639 835 l
+ 1640 837 l 1641 840 l 1642 843 l 1643 845 l 1644 848 l
+ 1645 852 l 1646 855 l 1646 856 l 1646 855 l 1644 848 l
+ 1642 837 l 1641 828 l 1640 820 l 1641 814 l 1642 807 l
+ 1645 800 l 1649 794 l 1652 787 l 1655 782 l 1658 777 l
+ 1660 770 l 1662 763 l 1664 756 l 1664 755 l 1662 755 l
+ 1660 755 l 1659 756 l 1657 757 l 1656 758 l 1655 760 l
+ 1653 761 l 1652 763 l 1651 764 l 1650 764 l 1648 764 l
+ 1648 763 l 1646 759 l 1646 753 l 1645 743 l 1644 731 l
+ 1643 724 l 1643 722 l 1643 721 l 1643 716 l 1644 711 l
+ 1644 707 l 1645 705 l 1646 705 l 1647 705 l 1647 706 l
+ 1648 707 l 1649 708 l 1650 707 l 1651 706 l 1652 705 l
+ 1650 704 l 1649 703 l 1647 701 l 1646 700 l 1644 698 l
+ 1642 695 l 1640 691 l 1638 687 l 1637 682 l 1635 677 l
+ 1633 670 l 1630 660 l 1628 653 l 1628 651 l 1630 649 l
+ 1632 648 l 1633 648 l 1634 649 l 1636 652 l 1637 656 l
+ 1639 660 l 1640 664 l 1642 667 l 1643 670 l 1645 671 l
+ 1647 672 l 1649 673 l 1649 672 l 1648 665 l 1647 658 l
+ 1645 652 l 1644 647 l 1643 643 l 1642 638 l 1640 634 l
+ 1639 630 l 1638 626 l 1638 622 l 1637 617 l 1637 611 l
+ 1637 606 l 1637 605 l 1636 603 l 1632 594 l 1626 584 l
+ 1623 579 l 1622 577 l 1621 579 l 1622 584 l 1623 590 l
+ 1624 595 l 1624 599 l 1623 600 l 1621 598 l 1617 593 l
+ 1614 588 l 1613 587 l 1612 585 l 1609 575 l 1605 560 l
+ 1602 548 l 1601 541 l 1601 538 l 1604 539 l 1609 543 l
+ 1615 548 l 1620 554 l 1625 557 l 1627 558 l 1629 557 l
+ 1630 555 l 1632 551 l 1633 547 l 1634 543 l 1634 540 l
+ 1635 542 l 1640 549 l 1648 562 l 1655 573 l 1660 583 l
+ 1665 593 l 1668 600 l 1670 608 l 1673 616 l 1676 625 l
+ 1678 634 l 1681 642 l 1683 649 l 1684 656 l 1686 663 l
+ 1688 671 l 1691 679 l 1693 688 l 1695 693 l 1695 694 l
+ 1695 693 l 1694 687 l 1692 677 l 1690 669 l 1689 662 l
+ 1687 656 l 1686 650 l 1684 644 l 1682 638 l 1680 631 l
+ 1679 625 l 1677 619 l 1675 614 l 1672 607 l 1670 599 l
+ 1666 591 l 1664 585 l 1664 584 l 1665 584 l 1666 584 l
+ 1667 583 l 1668 583 l 1669 582 l 1669 580 l 1669 579 l
+ 1668 576 l 1668 574 l 1666 567 l 1664 558 l 1661 548 l
+ 1659 539 l 1658 532 l 1657 529 l 1658 528 l 1661 532 l
+ 1666 540 l 1672 551 l 1676 558 l 1677 560 l 1677 559 l
+ 1675 554 l 1672 543 l 1667 527 l 1661 510 l 1656 494 l
+ 1650 480 l 1645 467 l 1640 456 l 1634 446 l 1627 436 l
+ 1620 425 l 1612 414 l 1603 403 l 1593 392 l 1583 381 l
+ 1573 371 l 1563 362 l 1553 353 l 1544 346 l 1535 339 l
+ 1526 332 l 1515 325 l 1503 318 l 1490 309 l 1475 301 l
+ 1462 294 l 1453 289 l 1449 286 l 1448 286 l 1449 287 l
+ 1451 289 l 1455 292 l 1457 294 l 1460 297 l 1462 299 l
+ 1465 302 l 1467 304 l 1469 306 l 1471 308 l 1471 309 l
+ 1471 310 l 1471 311 l 1470 311 l 1470 312 l 1469 312 l
+ 1468 311 l 1460 307 l 1450 301 l 1441 295 l 1434 291 l
+ 1431 288 l 1429 287 l 1428 286 l 1427 285 l 1427 284 l
+ 1426 283 l 1426 282 l 1427 282 l 1427 281 l 1427 280 l
+ 1427 278 l 1426 276 l 1425 273 l 1423 271 l 1423 270 l
+ 1421 269 l 1412 266 l 1402 262 l 1395 260 l 1390 260 l
+ 1387 260 l 1384 262 l 1382 264 l 1380 266 l 1378 268 l
+ 1375 269 l 1370 270 l 1364 270 l 1358 270 l 1357 270 l
+ 1356 269 l 1350 266 l 1340 261 l 1327 254 l 1315 248 l
+ 1306 244 l 1299 241 l 1294 238 l 1287 236 l 1280 234 l
+ 1274 233 l 1268 232 l 1261 230 l 1254 228 l 1244 225 l
+ 1231 221 l 1215 215 l 1205 212 l 1203 211 l 1203 212 l
+ 1204 215 l 1205 221 l 1206 224 l 1206 225 l 1205 225 l
+ 1197 222 l 1186 219 l 1177 217 l 1170 215 l 1165 215 l
+ 1160 217 l 1156 219 l 1152 222 l 1148 224 l 1143 226 l
+ 1137 227 l 1130 227 l 1119 227 l 1108 226 l 1100 225 l
+ 1098 225 l 1098 224 l 1097 224 l 1097 223 l 1098 223 l
+ 1099 222 l 1101 222 l 1104 221 l 1107 219 l 1111 218 l
+ 1114 218 l 1118 217 l 1122 216 l 1126 215 l 1130 214 l
+ 1131 214 l 1130 214 l 1123 215 l 1112 216 l 1103 217 l
+ 1097 217 l 1093 217 l 1090 215 l 1087 214 l 1085 212 l
+ 1082 210 l 1079 209 l 1075 209 l 1069 210 l 1060 212 l
+ 1050 214 l 1043 216 l 1042 216 l 1043 216 l 1045 214 l
+ 1048 212 l 1051 210 l 1053 209 l 1055 207 l 1058 206 l
+ 1060 205 l 1063 204 l 1065 203 l 1067 201 l 1070 200 l
+ 1074 198 l 1076 196 l 1077 196 l 1076 196 l 1070 197 l
+ 1060 197 l 1051 198 l 1043 200 l 1037 201 l 1029 203 l
+ 1022 205 l 1014 208 l 1007 210 l 1001 211 l 998 212 l
+ 996 211 l 996 209 l 999 205 l 1002 201 l 1003 200 l
+ 1002 200 l 997 203 l 987 207 l 975 212 l 963 218 l
+ 952 222 l 943 226 l 933 230 l 925 233 l 916 236 l
+ 907 240 l 896 244 l 886 248 l 876 252 l 866 256 l
+ 856 261 l 847 265 l 839 269 l 830 275 l 820 282 l
+ 810 290 l 798 299 l 786 310 l 776 319 l 771 323 l
+ 770 324 l 770 323 l 769 320 l 769 315 l 768 312 l
+ 768 311 l 767 312 l 762 318 l 753 327 l 745 335 l
+ 737 343 l 728 351 l 721 357 l 712 363 l 702 371 l
+ 692 379 l 683 387 l 674 394 l 666 402 l 659 408 l
+ 653 417 l 647 425 l 643 436 l 639 447 l 637 455 l
+ 637 456 l 635 457 l 632 457 l 630 458 l 629 459 l
+ 626 465 l 622 473 l 618 479 l 616 484 l 614 489 l
+ 611 494 l 609 500 l 607 506 l 605 511 l 603 516 l
+ 600 522 l 597 530 l 595 536 l 594 537 l 593 539 l
+ 589 545 l 583 553 l 580 558 l 577 560 l 575 561 l
+ 573 560 l 571 558 l 570 556 l 569 555 l 568 553 l
+ 567 552 l 567 553 l 568 553 l 568 554 l 567 555 l
+ 565 561 l 559 573 l 552 587 l 546 600 l 541 611 l
+ 537 621 l 534 629 l 531 637 l 528 645 l 525 654 l
+ 522 662 l 519 671 l 517 679 l 515 686 l 513 693 l
+ 510 702 l 507 712 l 503 725 l 499 738 l 497 746 l
+ 496 748 l 497 749 l 499 754 l 501 761 l 503 768 l
+ 503 777 l 503 783 l 503 791 l 502 800 l 501 810 l
+ 500 820 l 500 830 l 499 840 l 499 849 l 498 858 l
+ 498 867 l 498 878 l 499 890 l 499 904 l 500 914 l
+ 500 920 l 500 921 l 500 924 l 500 932 l 499 945 l
+ 499 963 l 499 987 l 499 1013 l 499 1041 l 500 1070 l
+ 501 1097 l 502 1123 l 504 1147 l 506 1169 l 509 1190 l
+ 513 1209 l 517 1227 l 522 1244 l 528 1262 l 534 1279 l
+ 541 1296 l 550 1314 l 559 1332 l 569 1350 l 580 1368 l
+ 592 1387 l 605 1405 l 618 1423 l 632 1441 l 646 1458 l
+ 660 1475 l 675 1490 l 689 1505 l 703 1518 l 717 1531 l
+ 731 1543 l 745 1553 l 760 1565 l 776 1575 l 793 1585 l
+ 811 1594 l 831 1604 l 852 1613 l 876 1623 l 901 1632 l
+ 928 1641 l 954 1650 l 977 1658 l 997 1665 l 1012 1669 l
+ 1020 1672 l 1023 1673 l 1024 1673 l 1025 1673 l 1032 1676 l
+ 1042 1679 l 1052 1681 l 1061 1683 l 1069 1685 l 1077 1686 l
+ 1086 1686 l 1096 1687 l 1107 1687 l 1116 1687 l 1126 1687 l
+ 1134 1687 l 1144 1687 l 1157 1688 l 1170 1688 l 1178 1688 l
+ 1180 1688 l 1178 1687 l 1169 1685 l 1155 1681 l 1142 1678 l
+ 1133 1676 l 1127 1675 l 1121 1675 l 1116 1675 l 1112 1675 l
+ 1107 1675 l 1101 1674 l 1095 1673 l 1086 1670 l 1074 1666 l
+ 1060 1662 l 1051 1659 l 1049 1658 l 1048 1657 l 1041 1654 l
+ 1031 1649 l 1022 1644 l 1016 1640 l 1012 1637 l 1007 1632 l
+ 1003 1628 l 999 1623 l 996 1618 l 993 1613 l 989 1609 l
+ 984 1605 l 978 1599 l 971 1592 l 966 1588 l 965 1587 l
+ 966 1588 l 969 1594 l 974 1602 l 977 1608 l 978 1609 l
+ 976 1608 l 967 1605 l 954 1600 l 943 1595 l 935 1592 l
+ 931 1590 l 929 1588 l 929 1586 l 930 1584 l 931 1582 l
+ 930 1580 l 927 1579 l 921 1576 l 912 1573 l 902 1570 l
+ 894 1567 l 893 1567 l 894 1566 l 897 1562 l 902 1555 l
+ 905 1551 l 906 1550 l 905 1550 l 900 1549 l 894 1548 l
+ 889 1546 l 885 1543 l 880 1540 l 876 1537 l 871 1532 l
+ 866 1528 l 862 1523 l 858 1519 l 855 1515 l 851 1510 l
+ 848 1504 l 846 1500 l 845 1499 l 844 1499 l 839 1499 l
+ 830 1500 l 825 1500 l 824 1500 l 823 1499 l 819 1494 l
+ 813 1486 l 808 1479 l 803 1474 l 800 1470 l 797 1464 l
+ 794 1459 l 791 1454 l 789 1450 l 787 1446 l 786 1442 l
+ 786 1438 l 786 1432 l 786 1428 l 786 1427 l 786 1428 l
+ 784 1431 l 781 1436 l 779 1439 l 779 1440 l 778 1439 l
+ 775 1435 l 771 1428 l 765 1420 l 758 1411 l 752 1403 l
+ 745 1395 l 737 1385 l 729 1374 l 721 1364 l 714 1355 l
+ 709 1348 l 706 1343 l 705 1340 l 705 1338 l 705 1337 l
+ 707 1337 l 710 1337 l 713 1338 l 717 1340 l 722 1342 l
+ 725 1343 l 728 1344 l 729 1345 l 726 1343 l 724 1341 l
+ 722 1340 l 720 1338 l 718 1337 l 716 1336 l 713 1334 l
+ 711 1332 l 709 1330 l 707 1327 l 704 1323 l 700 1317 l
+ 698 1312 l 697 1311 l 697 1310 l 700 1308 l 703 1303 l
+ 706 1301 l 706 1300 l 705 1299 l 700 1292 l 694 1284 l
+ 689 1277 l 685 1271 l 682 1265 l 678 1258 l 674 1252 l
+ 671 1246 l 670 1241 l 668 1237 l 668 1233 l 668 1229 l
+ 668 1226 l 668 1225 l 669 1226 l 671 1229 l 674 1233 l
+ 677 1236 l 679 1238 l 680 1239 l 682 1241 l 684 1242 l
+ 685 1242 l 687 1243 l 689 1244 l 690 1244 l 693 1245 l
+ 695 1246 l 695 1245 l 692 1239 l 687 1227 l 680 1211 l
+ 673 1194 l 666 1179 l 660 1168 l 656 1160 l 652 1156 l
+ 650 1154 l 646 1156 l 643 1164 l 640 1174 l 637 1185 l
+ 635 1192 l 632 1195 l 629 1193 l 625 1186 l 620 1174 l
+ 613 1157 l 606 1136 l 600 1118 l 597 1109 l 596 1107 l
+ 599 1107 l 602 1107 l 605 1107 l 605 1106 l 603 1104 l
+ 601 1101 l 600 1098 l 599 1096 l 598 1094 l 597 1092 l
+ 596 1089 l 595 1087 l 594 1085 l 593 1083 l 592 1081 l
+ 590 1078 l 589 1076 l 589 1075 l 589 1074 l 590 1068 l
+ 591 1056 l 591 1044 l 592 1038 l 592 1037 l 591 1036 l
+ 589 1032 l 583 1024 l 577 1014 l 572 1004 l 568 994 l
+ 565 984 l 564 974 l 564 964 l 564 954 l 565 942 l
+ 566 929 l 568 916 l 570 902 l 572 889 l 574 876 l
+ 576 864 l 577 853 l 579 841 l 581 828 l 582 814 l
+ 584 798 l 585 782 l 586 769 l 587 762 l 587 761 l
+ 587 759 l 589 752 l 590 742 l 593 734 l 595 728 l
+ 598 722 l 602 716 l 606 710 l 610 703 l 615 696 l
+ 619 690 l 623 682 l 627 673 l 632 661 l 638 648 l
+ 641 639 l 642 637 l 641 637 l 638 636 l 633 636 l
+ 630 635 l 629 635 l 629 634 l 632 630 l 637 623 l
+ 643 613 l 649 603 l 656 594 l 662 585 l 670 575 l
+ 677 566 l 685 557 l 695 546 l 705 535 l 715 524 l
+ 726 513 l 737 502 l 747 493 l 756 485 l 764 479 l
+ 774 472 l 783 468 l 794 465 l 805 463 l 816 462 l
+ 825 462 l 830 462 l 831 462 l 832 460 l 838 453 l
+ 844 445 l 848 441 l 849 439 l 847 440 l 844 444 l
+ 839 448 l 835 452 l 831 455 l 829 456 l 827 456 l
+ 825 456 l 824 456 l 823 455 l 822 454 l 821 453 l
+ 822 452 l 826 448 l 835 439 l 846 429 l 855 420 l
+ 863 413 l 869 408 l 873 405 l 880 402 l 886 402 l
+ 892 403 l 897 404 l 903 405 l 907 405 l 914 405 l
+ 922 403 l 932 401 l 938 399 l 939 399 l 941 398 l
+ 950 393 l 959 387 l 963 384 l 962 383 l 958 385 l
+ 951 388 l 942 391 l 933 395 l 925 398 l 919 400 l
+ 917 400 l 916 400 l 915 400 l 915 399 l 916 398 l
+ 917 396 l 918 395 l 919 393 l 921 391 l 922 390 l
+ 923 389 l 925 388 l 936 385 l 953 381 l 967 376 l
+ 976 372 l 982 369 l 985 365 l 987 360 l 988 355 l
+ 991 351 l 996 348 l 1001 346 l 1009 344 l 1020 342 l
+ 1035 340 l 1051 338 l 1065 337 l 1073 336 l 1074 336 l
+ 1075 337 l 1076 337 l 1077 338 l 1078 339 l 1078 340 l
+ 1077 341 l 1074 342 l 1069 343 l 1064 344 l 1059 345 l
+ 1054 346 l 1051 347 l 1047 348 l 1044 350 l 1042 352 l
+ 1041 352 l 1042 352 l 1047 349 l 1058 345 l 1071 340 l
+ 1083 336 l 1094 332 l 1105 330 l 1116 328 l 1125 327 l
+ 1136 327 l 1147 326 l 1159 327 l 1172 327 l 1185 328 l
+ 1198 329 l 1209 331 l 1221 332 l 1231 335 l 1241 337 l
+ 1251 340 l 1262 343 l 1274 347 l 1287 353 l 1301 358 l
+ 1313 363 l 1322 367 l 1326 369 l 1327 369 l 1328 369 l
+ 1332 372 l 1342 377 l 1356 384 l 1372 393 l 1386 401 l
+ 1399 409 l 1411 416 l 1421 424 l 1431 433 l 1439 440 l
+ 1448 448 l 1457 457 l 1466 467 l 1475 478 l 1484 489 l
+ 1492 501 l 1500 513 l 1508 524 l 1514 535 l 1520 546 l
+ 1525 556 l 1525 557 l 1530 569 l 1534 582 l 1537 597 l
+ 1540 613 l 1543 632 l 1545 652 l 1546 670 l 1548 683 l
+ 1548 689 l 1548 690 l 1550 691 l 1551 691 l 1553 692 l
+ 1553 694 l 1553 702 l 1552 715 l 1552 727 l 1552 737 l
+ 1552 746 l 1553 754 l 1554 764 l 1555 775 l 1556 785 l
+ 1556 795 l 1556 804 l 1555 813 l 1553 824 l 1550 836 l
+ 1546 850 l 1544 859 l 1543 861 l 1544 860 l 1547 853 l
+ 1551 843 l 1554 836 l 1555 835 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 937 1014 m 937 1015 l 936 1019 l 934 1026 l 933 1030 l 933 1031 l
+ 934 1032 l 938 1037 l 943 1044 l 946 1049 l 949 1053 l
+ 952 1058 l 955 1062 l 958 1067 l 961 1072 l 964 1076 l
+ 968 1080 l 972 1084 l 978 1090 l 983 1094 l 984 1095 l
+ 983 1094 l 980 1087 l 975 1079 l 972 1073 l 970 1069 l
+ 967 1065 l 964 1061 l 961 1057 l 959 1053 l 956 1049 l
+ 953 1044 l 950 1038 l 945 1030 l 941 1021 l 938 1015 l
+ 937 1014 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 976 1012 m 973 1009 l 971 1007 l 969 1004 l 968 1003 l 966 1000 l
+ 965 998 l 964 996 l 963 993 l 962 991 l 961 989 l
+ 959 986 l 958 983 l 956 981 l 956 980 l 956 981 l
+ 958 986 l 960 991 l 961 996 l 963 1000 l 965 1003 l
+ 967 1007 l 969 1010 l 971 1014 l 973 1017 l 975 1021 l
+ 977 1025 l 980 1030 l 982 1034 l 983 1035 l 983 1034 l
+ 981 1028 l 978 1019 l 976 1013 l 976 1012 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 1660 863 m 1660 864 l 1659 866 l 1658 870 l 1657 872 l 1657 873 l
+ 1657 875 l 1656 882 l 1654 893 l 1652 904 l 1650 913 l
+ 1649 920 l 1647 927 l 1645 935 l 1642 943 l 1639 952 l
+ 1637 959 l 1634 967 l 1631 974 l 1627 982 l 1622 992 l
+ 1617 1003 l 1614 1010 l 1613 1011 l 1614 1010 l 1618 1002 l
+ 1624 991 l 1629 980 l 1633 972 l 1637 964 l 1640 957 l
+ 1643 948 l 1646 939 l 1648 930 l 1650 922 l 1652 914 l
+ 1654 906 l 1655 897 l 1657 885 l 1659 873 l 1660 865 l
+ 1660 863 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 1119 193 m 1120 193 l 1124 191 l 1129 190 l 1134 189 l 1137 188 l
+ 1141 188 l 1146 188 l 1151 188 l 1156 188 l 1160 188 l
+ 1163 188 l 1168 187 l 1173 186 l 1177 185 l 1178 185 l
+ 1177 185 l 1171 186 l 1165 186 l 1159 187 l 1155 187 l
+ 1151 187 l 1146 188 l 1141 188 l 1136 189 l 1132 189 l
+ 1128 189 l 1122 190 l 1116 190 l 1110 191 l 1109 191 l
+ 1110 191 l 1112 192 l 1116 192 l 1118 193 l 1119 193 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 528 507 m 528 509 l 529 517 l 529 527 l 528 534 l 526 539 l
+ 524 543 l 521 546 l 517 549 l 514 550 l 512 551 l
+ 513 549 l 518 545 l 526 539 l 533 534 l 535 533 l
+ 536 531 l 539 522 l 543 513 l 546 506 l 546 504 l
+ 544 504 l 542 506 l 538 509 l 535 512 l 532 515 l
+ 530 515 l 529 514 l 528 511 l 528 508 l 528 507 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 488 673 m 488 672 l 490 667 l 492 660 l 494 655 l 495 651 l
+ 496 648 l 496 644 l 497 641 l 497 638 l 497 635 l
+ 498 632 l 498 629 l 499 625 l 500 622 l 500 621 l
+ 499 622 l 494 629 l 489 636 l 486 642 l 484 645 l
+ 484 648 l 484 651 l 486 653 l 487 655 l 488 657 l
+ 488 660 l 489 663 l 488 668 l 488 672 l 488 673 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 193 2218 m 193 2219 l 193 2225 l 193 2238 l 194 2258 l 195 2282 l
+ 196 2307 l 198 2330 l 200 2350 l 202 2366 l 205 2380 l
+ 208 2391 l 212 2400 l 218 2409 l 225 2416 l 233 2422 l
+ 242 2427 l 251 2431 l 260 2433 l 269 2435 l 278 2436 l
+ 285 2436 l 292 2436 l 302 2436 l 311 2436 l 319 2436 l
+ 324 2436 l 325 2436 l 327 2436 l 334 2436 l 345 2435 l
+ 356 2434 l 364 2433 l 370 2432 l 376 2429 l 382 2426 l
+ 388 2422 l 393 2417 l 397 2412 l 401 2407 l 404 2401 l
+ 407 2393 l 411 2383 l 414 2373 l 417 2365 l 417 2364 l
+ 417 2365 l 417 2370 l 418 2382 l 418 2399 l 418 2415 l
+ 419 2427 l 419 2432 l 419 2433 l 420 2433 l 423 2433 l
+ 428 2432 l 431 2432 l 434 2432 l 437 2432 l 440 2432 l
+ 443 2431 l 446 2431 l 450 2431 l 453 2431 l 459 2431 l
+ 465 2431 l 471 2431 l 472 2431 l 475 2431 l 477 2431 l
+ 479 2431 l 481 2431 l 482 2431 l 484 2431 l 485 2431 l
+ 487 2431 l 488 2431 l 489 2431 l 490 2431 l 492 2432 l
+ 494 2432 l 496 2432 l 497 2432 l 499 2432 l 500 2432 l
+ 501 2432 l 502 2432 l 504 2432 l 505 2432 l 506 2432 l
+ 507 2432 l 509 2432 l 511 2433 l 513 2433 l 512 2432 l
+ 510 2425 l 506 2417 l 503 2410 l 501 2403 l 500 2396 l
+ 498 2388 l 496 2378 l 495 2367 l 494 2355 l 493 2342 l
+ 492 2334 l 492 2324 l 492 2313 l 491 2299 l 491 2283 l
+ 491 2266 l 491 2250 l 491 2238 l 491 2233 l 491 2232 l
+ 491 2231 l 491 2226 l 491 2214 l 491 2197 l 491 2179 l
+ 491 2161 l 491 2144 l 491 2130 l 491 2116 l 491 2101 l
+ 491 2089 l 491 2076 l 491 2062 l 491 2047 l 491 2032 l
+ 491 2017 l 491 2002 l 492 1987 l 492 1974 l 492 1961 l
+ 492 1950 l 493 1939 l 493 1925 l 494 1912 l 495 1900 l
+ 497 1886 l 499 1873 l 500 1862 l 501 1857 l 501 1856 l
+ 500 1857 l 493 1860 l 486 1863 l 479 1866 l 475 1868 l
+ 470 1870 l 464 1872 l 458 1874 l 452 1876 l 445 1877 l
+ 439 1878 l 430 1879 l 419 1880 l 407 1881 l 399 1882 l
+ 397 1882 l 398 1883 l 403 1888 l 408 1895 l 412 1900 l
+ 415 1903 l 416 1906 l 417 1910 l 418 1915 l 418 1922 l
+ 418 1931 l 418 1938 l 418 1948 l 418 1960 l 418 1976 l
+ 418 1994 l 418 2009 l 418 2017 l 418 2018 l 417 2018 l
+ 414 2017 l 409 2016 l 406 2015 l 403 2014 l 399 2013 l
+ 396 2012 l 391 2011 l 387 2010 l 383 2009 l 378 2009 l
+ 371 2008 l 362 2008 l 355 2008 l 353 2008 l 352 2008 l
+ 346 2008 l 333 2009 l 315 2010 l 296 2011 l 279 2013 l
+ 264 2016 l 252 2019 l 242 2023 l 234 2028 l 227 2034 l
+ 221 2042 l 216 2050 l 211 2060 l 207 2071 l 204 2082 l
+ 201 2093 l 199 2104 l 198 2114 l 197 2124 l 196 2136 l
+ 195 2148 l 194 2162 l 194 2178 l 193 2195 l 193 2209 l
+ 193 2217 l 193 2218 l  cp gs 0.00 setgray ef gr 
+% Polyline
+n 820 2187 m 820 2186 l 820 2178 l 820 2164 l 819 2147 l 819 2132 l
+ 819 2118 l 818 2107 l 817 2096 l 816 2086 l 814 2075 l
+ 812 2064 l 808 2054 l 804 2044 l 799 2035 l 793 2028 l
+ 786 2022 l 778 2017 l 767 2014 l 753 2011 l 735 2010 l
+ 715 2008 l 698 2007 l 690 2007 l 688 2007 l 687 2007 l
+ 680 2007 l 665 2008 l 645 2010 l 624 2012 l 604 2015 l
+ 588 2019 l 575 2023 l 564 2029 l 556 2036 l 550 2045 l
+ 544 2055 l 540 2068 l 536 2081 l 534 2095 l 532 2110 l
+ 531 2124 l 530 2137 l 530 2149 l 530 2159 l 530 2174 l
+ 530 2186 l 530 2199 l 530 2211 l 530 2218 l 530 2219 l
+ 530 2220 l 530 2227 l 531 2242 l 531 2262 l 532 2285 l
+ 533 2305 l 535 2323 l 537 2337 l 539 2350 l 542 2360 l
+ 545 2370 l 550 2379 l 555 2388 l 561 2396 l 568 2403 l
+ 576 2410 l 584 2416 l 592 2421 l 600 2425 l 609 2428 l
+ 618 2430 l 628 2432 l 639 2434 l 653 2435 l 669 2436 l
+ 686 2437 l 702 2438 l 713 2438 l 718 2438 l 719 2438 l
+ 721 2438 l 729 2438 l 741 2438 l 752 2438 l 760 2437 l
+ 767 2437 l 774 2436 l 780 2435 l 786 2433 l 791 2432 l
+ 795 2431 l 799 2430 l 802 2428 l 807 2427 l 810 2426 l
+ 811 2426 l 811 2425 l 811 2418 l 811 2410 l 811 2404 l
+ 811 2400 l 811 2396 l 812 2392 l 812 2388 l 813 2384 l
+ 814 2380 l 815 2376 l 816 2371 l 817 2364 l 818 2358 l
+ 818 2357 l 817 2358 l 813 2360 l 809 2363 l 805 2365 l
+ 801 2368 l 798 2370 l 793 2372 l 788 2374 l 783 2376 l
+ 777 2378 l 771 2379 l 764 2379 l 754 2380 l 744 2380 l
+ 736 2380 l 735 2380 l 734 2380 l 729 2380 l 718 2379 l
+ 702 2378 l 686 2377 l 671 2375 l 658 2373 l 648 2370 l
+ 640 2366 l 634 2362 l 628 2355 l 623 2346 l 619 2335 l
+ 616 2324 l 615 2312 l 614 2301 l 613 2291 l 613 2282 l
+ 613 2271 l 613 2261 l 613 2251 l 613 2240 l 613 2233 l
+ 613 2232 l 614 2232 l 617 2232 l 625 2232 l 640 2232 l
+ 661 2232 l 687 2232 l 716 2232 l 744 2232 l 770 2232 l
+ 791 2232 l 806 2232 l 814 2232 l 817 2232 l 818 2232 l
+ 818 2231 l 818 2223 l 819 2210 l 820 2196 l 820 2188 l
+ 820 2187 l  cp gs 0.00 setgray ef gr 
+% Polyline
+n 850 2304 m 850 2306 l 850 2315 l 850 2328 l 850 2340 l 850 2350 l
+ 850 2357 l 850 2364 l 850 2370 l 850 2377 l 849 2383 l
+ 849 2388 l 848 2393 l 847 2398 l 845 2404 l 843 2411 l
+ 841 2417 l 840 2418 l 842 2419 l 849 2422 l 859 2425 l
+ 867 2428 l 873 2430 l 879 2431 l 885 2433 l 892 2434 l
+ 899 2435 l 906 2436 l 912 2437 l 919 2437 l 927 2438 l
+ 938 2438 l 949 2438 l 957 2438 l 958 2438 l 959 2438 l
+ 964 2438 l 973 2438 l 982 2438 l 990 2438 l 998 2438 l
+ 1006 2438 l 1014 2438 l 1023 2437 l 1033 2436 l 1043 2434 l
+ 1052 2431 l 1061 2427 l 1069 2422 l 1077 2415 l 1084 2407 l
+ 1092 2395 l 1101 2380 l 1111 2364 l 1118 2350 l 1122 2342 l
+ 1123 2341 l 1124 2340 l 1127 2332 l 1132 2321 l 1137 2310 l
+ 1140 2301 l 1143 2294 l 1145 2285 l 1147 2276 l 1148 2266 l
+ 1150 2256 l 1151 2247 l 1152 2239 l 1152 2231 l 1153 2222 l
+ 1153 2211 l 1153 2200 l 1153 2192 l 1153 2191 l 1153 2189 l
+ 1153 2182 l 1153 2173 l 1153 2165 l 1153 2158 l 1152 2150 l
+ 1152 2142 l 1151 2132 l 1150 2123 l 1149 2114 l 1147 2106 l
+ 1145 2098 l 1141 2090 l 1137 2081 l 1132 2071 l 1129 2064 l
+ 1128 2063 l 1127 2062 l 1124 2056 l 1118 2048 l 1113 2040 l
+ 1108 2034 l 1104 2030 l 1099 2026 l 1094 2022 l 1088 2018 l
+ 1082 2015 l 1076 2013 l 1071 2011 l 1065 2010 l 1058 2009 l
+ 1050 2009 l 1041 2008 l 1035 2008 l 1034 2008 l 1033 2008 l
+ 1027 2008 l 1016 2009 l 1003 2010 l 991 2011 l 982 2013 l
+ 975 2015 l 969 2018 l 962 2024 l 956 2031 l 950 2040 l
+ 946 2049 l 943 2057 l 940 2065 l 937 2072 l 935 2079 l
+ 932 2087 l 929 2096 l 927 2101 l 927 2102 l 927 2101 l
+ 927 2093 l 927 2082 l 927 2070 l 927 2058 l 927 2046 l
+ 927 2037 l 927 2028 l 927 2017 l 927 2005 l 928 1993 l
+ 928 1980 l 928 1968 l 928 1957 l 929 1946 l 929 1936 l
+ 929 1925 l 930 1913 l 931 1901 l 932 1887 l 933 1873 l
+ 933 1862 l 934 1856 l 934 1855 l 932 1856 l 924 1859 l
+ 912 1864 l 901 1869 l 893 1872 l 887 1875 l 879 1877 l
+ 872 1879 l 865 1880 l 858 1881 l 852 1882 l 846 1882 l
+ 838 1883 l 829 1884 l 821 1885 l 819 1885 l 821 1886 l
+ 827 1889 l 835 1894 l 841 1898 l 845 1904 l 847 1909 l
+ 848 1916 l 849 1926 l 850 1938 l 850 1952 l 850 1967 l
+ 850 1976 l 850 1986 l 850 1997 l 850 2011 l 850 2027 l
+ 850 2045 l 850 2064 l 850 2083 l 850 2099 l 850 2109 l
+ 850 2113 l 850 2114 l 850 2115 l 850 2120 l 850 2132 l
+ 850 2151 l 850 2178 l 850 2209 l 850 2240 l 850 2267 l
+ 850 2286 l 850 2298 l 850 2303 l 850 2304 l  cp gs 0.00 setgray ef gr 
+% Polyline
+n 1301 2433 m 1300 2433 l 1297 2432 l 1293 2432 l 1289 2431 l 1287 2431 l
+ 1284 2431 l 1282 2430 l 1279 2430 l 1276 2430 l 1273 2429 l
+ 1270 2429 l 1265 2429 l 1259 2429 l 1254 2429 l 1253 2429 l
+ 1252 2429 l 1246 2429 l 1239 2429 l 1233 2429 l 1229 2429 l
+ 1226 2430 l 1222 2430 l 1218 2430 l 1214 2431 l 1211 2431 l
+ 1207 2431 l 1203 2432 l 1198 2432 l 1194 2433 l 1193 2433 l
+ 1193 2432 l 1195 2429 l 1197 2425 l 1199 2422 l 1200 2419 l
+ 1201 2417 l 1202 2415 l 1203 2412 l 1203 2408 l 1204 2404 l
+ 1204 2399 l 1205 2392 l 1205 2382 l 1206 2370 l 1206 2363 l
+ 1206 2361 l 1206 2360 l 1206 2354 l 1207 2342 l 1208 2328 l
+ 1208 2313 l 1209 2300 l 1209 2287 l 1209 2273 l 1209 2261 l
+ 1210 2248 l 1210 2233 l 1210 2217 l 1210 2201 l 1210 2185 l
+ 1210 2170 l 1210 2156 l 1209 2144 l 1209 2133 l 1209 2118 l
+ 1208 2104 l 1207 2091 l 1206 2079 l 1205 2071 l 1205 2070 l
+ 1205 2069 l 1204 2062 l 1203 2054 l 1201 2049 l 1201 2045 l
+ 1199 2042 l 1198 2040 l 1197 2038 l 1195 2037 l 1193 2036 l
+ 1192 2034 l 1189 2032 l 1186 2030 l 1184 2028 l 1183 2028 l
+ 1185 2028 l 1195 2027 l 1210 2025 l 1223 2024 l 1232 2023 l
+ 1239 2022 l 1246 2021 l 1252 2020 l 1257 2019 l 1262 2018 l
+ 1266 2016 l 1271 2014 l 1277 2012 l 1286 2008 l 1292 2005 l
+ 1294 2004 l 1294 2006 l 1292 2013 l 1291 2023 l 1290 2030 l
+ 1289 2035 l 1288 2040 l 1288 2044 l 1287 2049 l 1287 2055 l
+ 1287 2061 l 1287 2066 l 1287 2074 l 1287 2085 l 1287 2097 l
+ 1287 2104 l 1287 2106 l 1287 2107 l 1287 2111 l 1287 2122 l
+ 1287 2140 l 1287 2163 l 1286 2189 l 1286 2215 l 1286 2240 l
+ 1286 2262 l 1286 2281 l 1285 2297 l 1285 2311 l 1285 2323 l
+ 1285 2333 l 1285 2349 l 1285 2362 l 1285 2373 l 1285 2382 l
+ 1285 2389 l 1286 2394 l 1286 2398 l 1287 2402 l 1289 2407 l
+ 1292 2415 l 1296 2424 l 1300 2431 l 1301 2433 l  cp gs 0.00 setgray ef gr 
+% Polyline
+n 1336 2309 m 1336 2311 l 1336 2318 l 1336 2330 l 1337 2341 l 1338 2350 l
+ 1339 2358 l 1340 2366 l 1342 2374 l 1344 2382 l 1348 2390 l
+ 1352 2397 l 1356 2402 l 1361 2407 l 1367 2412 l 1376 2418 l
+ 1386 2424 l 1393 2427 l 1394 2428 l 1395 2428 l 1400 2430 l
+ 1406 2432 l 1410 2434 l 1414 2435 l 1417 2435 l 1421 2436 l
+ 1425 2436 l 1428 2436 l 1431 2436 l 1433 2436 l 1435 2436 l
+ 1437 2436 l 1439 2436 l 1441 2436 l 1452 2436 l 1469 2435 l
+ 1483 2433 l 1494 2431 l 1502 2427 l 1509 2423 l 1515 2417 l
+ 1521 2409 l 1525 2401 l 1529 2394 l 1533 2387 l 1535 2381 l
+ 1539 2374 l 1542 2366 l 1546 2358 l 1549 2352 l 1549 2351 l
+ 1549 2353 l 1549 2361 l 1549 2370 l 1548 2377 l 1548 2383 l
+ 1548 2388 l 1548 2393 l 1549 2398 l 1549 2403 l 1549 2407 l
+ 1549 2412 l 1550 2418 l 1550 2425 l 1551 2432 l 1551 2433 l
+ 1552 2433 l 1555 2433 l 1559 2432 l 1562 2432 l 1565 2432 l
+ 1568 2432 l 1571 2432 l 1574 2431 l 1577 2431 l 1581 2431 l
+ 1584 2431 l 1589 2431 l 1596 2431 l 1601 2431 l 1602 2431 l
+ 1603 2431 l 1606 2431 l 1610 2431 l 1613 2431 l 1615 2431 l
+ 1617 2431 l 1620 2431 l 1623 2432 l 1626 2432 l 1628 2432 l
+ 1630 2432 l 1633 2432 l 1637 2433 l 1640 2433 l 1641 2433 l
+ 1641 2432 l 1639 2429 l 1636 2426 l 1634 2423 l 1633 2421 l
+ 1632 2419 l 1631 2417 l 1630 2414 l 1629 2412 l 1628 2408 l
+ 1628 2404 l 1627 2398 l 1626 2390 l 1625 2384 l 1625 2382 l
+ 1625 2380 l 1625 2374 l 1624 2365 l 1624 2358 l 1624 2353 l
+ 1624 2347 l 1624 2341 l 1624 2334 l 1624 2328 l 1624 2321 l
+ 1624 2315 l 1624 2309 l 1624 2300 l 1624 2290 l 1624 2283 l
+ 1624 2282 l 1624 2281 l 1624 2277 l 1624 2267 l 1624 2251 l
+ 1624 2229 l 1624 2204 l 1624 2178 l 1624 2156 l 1624 2140 l
+ 1624 2130 l 1624 2126 l 1624 2125 l 1624 2123 l 1624 2114 l
+ 1624 2099 l 1623 2086 l 1622 2075 l 1622 2066 l 1620 2059 l
+ 1619 2052 l 1617 2045 l 1614 2038 l 1610 2032 l 1605 2026 l
+ 1599 2021 l 1592 2018 l 1584 2015 l 1573 2013 l 1559 2011 l
+ 1541 2010 l 1521 2009 l 1504 2008 l 1495 2008 l 1493 2008 l
+ 1492 2008 l 1486 2008 l 1474 2008 l 1461 2009 l 1448 2009 l
+ 1438 2010 l 1429 2011 l 1422 2012 l 1413 2014 l 1404 2017 l
+ 1396 2020 l 1388 2023 l 1381 2026 l 1376 2029 l 1370 2032 l
+ 1364 2036 l 1357 2039 l 1351 2042 l 1350 2043 l 1350 2044 l
+ 1353 2048 l 1355 2053 l 1357 2057 l 1359 2060 l 1360 2063 l
+ 1362 2066 l 1364 2070 l 1365 2074 l 1367 2078 l 1368 2083 l
+ 1369 2090 l 1371 2099 l 1373 2106 l 1373 2108 l 1374 2107 l
+ 1379 2103 l 1387 2097 l 1394 2091 l 1400 2087 l 1405 2084 l
+ 1411 2081 l 1417 2078 l 1424 2076 l 1431 2073 l 1437 2072 l
+ 1443 2070 l 1449 2069 l 1457 2069 l 1466 2068 l 1475 2068 l
+ 1482 2068 l 1483 2068 l 1485 2068 l 1495 2068 l 1509 2069 l
+ 1522 2070 l 1530 2072 l 1536 2075 l 1540 2078 l 1542 2081 l
+ 1544 2085 l 1546 2090 l 1546 2096 l 1547 2101 l 1547 2107 l
+ 1547 2113 l 1547 2121 l 1547 2131 l 1547 2144 l 1547 2159 l
+ 1547 2168 l 1547 2170 l 1546 2170 l 1543 2170 l 1539 2170 l
+ 1536 2170 l 1533 2170 l 1531 2169 l 1528 2169 l 1525 2169 l
+ 1522 2169 l 1519 2168 l 1515 2168 l 1511 2168 l 1505 2168 l
+ 1500 2168 l 1499 2168 l 1498 2168 l 1490 2168 l 1475 2169 l
+ 1457 2169 l 1441 2170 l 1427 2171 l 1416 2172 l 1407 2174 l
+ 1399 2176 l 1392 2179 l 1385 2182 l 1378 2185 l 1371 2189 l
+ 1365 2194 l 1359 2199 l 1354 2205 l 1350 2211 l 1347 2217 l
+ 1344 2226 l 1341 2236 l 1339 2249 l 1338 2266 l 1337 2284 l
+ 1336 2299 l 1336 2308 l 1336 2309 l  cp gs 0.00 setgray ef gr 
+% Polyline
+n 1994 2357 m 1994 2358 l 1994 2364 l 1994 2372 l 1994 2378 l 1994 2383 l
+ 1994 2388 l 1994 2394 l 1994 2400 l 1995 2405 l 1996 2410 l
+ 1997 2415 l 1999 2420 l 2002 2427 l 2004 2432 l 2005 2433 l
+ 2004 2433 l 2000 2433 l 1996 2432 l 1992 2432 l 1989 2432 l
+ 1987 2431 l 1984 2431 l 1981 2430 l 1978 2430 l 1974 2430 l
+ 1970 2429 l 1963 2429 l 1955 2429 l 1948 2429 l 1946 2429 l
+ 1945 2429 l 1941 2429 l 1936 2429 l 1932 2429 l 1929 2429 l
+ 1927 2430 l 1924 2430 l 1922 2430 l 1919 2431 l 1917 2431 l
+ 1915 2431 l 1911 2432 l 1907 2432 l 1904 2433 l 1903 2433 l
+ 1903 2432 l 1904 2430 l 1905 2427 l 1905 2425 l 1906 2424 l
+ 1906 2423 l 1907 2422 l 1907 2420 l 1908 2419 l 1908 2418 l
+ 1908 2416 l 1908 2413 l 1909 2410 l 1909 2407 l 1909 2406 l
+ 1909 2405 l 1910 2400 l 1911 2394 l 1911 2388 l 1912 2381 l
+ 1912 2375 l 1912 2367 l 1912 2358 l 1913 2350 l 1913 2342 l
+ 1913 2335 l 1913 2329 l 1913 2322 l 1913 2315 l 1913 2309 l
+ 1913 2308 l 1913 2307 l 1913 2300 l 1913 2286 l 1913 2267 l
+ 1913 2247 l 1913 2233 l 1913 2226 l 1913 2225 l 1913 2224 l
+ 1913 2218 l 1913 2208 l 1913 2200 l 1913 2192 l 1913 2186 l
+ 1913 2178 l 1913 2171 l 1913 2162 l 1913 2154 l 1913 2147 l
+ 1913 2142 l 1912 2135 l 1912 2129 l 1912 2123 l 1911 2118 l
+ 1911 2117 l 1911 2116 l 1910 2113 l 1910 2108 l 1909 2104 l
+ 1909 2100 l 1908 2095 l 1907 2090 l 1906 2084 l 1903 2079 l
+ 1899 2075 l 1895 2073 l 1888 2071 l 1879 2070 l 1869 2069 l
+ 1862 2069 l 1861 2069 l 1860 2069 l 1853 2069 l 1843 2070 l
+ 1834 2071 l 1827 2072 l 1822 2074 l 1817 2078 l 1812 2083 l
+ 1809 2089 l 1806 2094 l 1804 2100 l 1802 2105 l 1800 2112 l
+ 1799 2119 l 1797 2126 l 1797 2127 l 1797 2128 l 1795 2135 l
+ 1794 2143 l 1793 2149 l 1792 2155 l 1792 2159 l 1791 2164 l
+ 1791 2171 l 1791 2179 l 1791 2188 l 1791 2198 l 1791 2205 l
+ 1791 2213 l 1791 2224 l 1791 2236 l 1791 2251 l 1791 2267 l
+ 1791 2282 l 1791 2292 l 1791 2297 l 1791 2298 l 1791 2299 l
+ 1791 2307 l 1791 2322 l 1791 2339 l 1791 2354 l 1791 2366 l
+ 1791 2375 l 1791 2382 l 1791 2391 l 1791 2397 l 1791 2402 l
+ 1792 2406 l 1792 2409 l 1793 2413 l 1795 2418 l 1797 2426 l
+ 1799 2432 l 1799 2433 l 1798 2433 l 1795 2433 l 1791 2432 l
+ 1788 2432 l 1786 2432 l 1783 2432 l 1780 2431 l 1776 2431 l
+ 1772 2431 l 1769 2430 l 1765 2430 l 1759 2430 l 1753 2430 l
+ 1747 2430 l 1746 2430 l 1745 2430 l 1741 2430 l 1736 2430 l
+ 1732 2430 l 1729 2430 l 1726 2430 l 1723 2430 l 1721 2431 l
+ 1718 2431 l 1715 2431 l 1713 2431 l 1709 2432 l 1705 2432 l
+ 1701 2433 l 1700 2433 l 1700 2432 l 1702 2430 l 1703 2426 l
+ 1705 2424 l 1706 2422 l 1706 2420 l 1707 2418 l 1708 2415 l
+ 1708 2412 l 1709 2408 l 1709 2404 l 1709 2397 l 1710 2389 l
+ 1710 2379 l 1710 2372 l 1710 2371 l 1710 2370 l 1710 2366 l
+ 1711 2358 l 1711 2348 l 1711 2337 l 1712 2326 l 1712 2314 l
+ 1712 2301 l 1712 2291 l 1713 2280 l 1713 2267 l 1713 2254 l
+ 1713 2239 l 1713 2224 l 1713 2209 l 1713 2195 l 1714 2181 l
+ 1714 2169 l 1713 2157 l 1713 2147 l 1713 2133 l 1713 2121 l
+ 1712 2109 l 1711 2097 l 1710 2085 l 1709 2076 l 1708 2072 l
+ 1708 2071 l 1708 2069 l 1707 2063 l 1706 2055 l 1704 2049 l
+ 1703 2045 l 1702 2042 l 1701 2039 l 1699 2037 l 1697 2035 l
+ 1696 2034 l 1694 2032 l 1693 2031 l 1690 2028 l 1688 2026 l
+ 1690 2026 l 1700 2025 l 1714 2024 l 1727 2024 l 1736 2023 l
+ 1743 2022 l 1750 2020 l 1756 2019 l 1762 2017 l 1766 2015 l
+ 1770 2013 l 1774 2011 l 1778 2009 l 1784 2006 l 1789 2004 l
+ 1790 2003 l 1790 2004 l 1790 2011 l 1790 2025 l 1790 2044 l
+ 1790 2063 l 1790 2077 l 1790 2084 l 1790 2085 l 1790 2084 l
+ 1793 2078 l 1796 2070 l 1798 2063 l 1801 2056 l 1803 2050 l
+ 1806 2042 l 1810 2035 l 1815 2027 l 1821 2021 l 1828 2016 l
+ 1834 2013 l 1842 2011 l 1851 2010 l 1864 2009 l 1877 2008 l
+ 1889 2007 l 1895 2007 l 1896 2007 l 1897 2007 l 1905 2007 l
+ 1919 2008 l 1935 2009 l 1950 2011 l 1961 2013 l 1970 2015 l
+ 1976 2019 l 1983 2025 l 1987 2034 l 1990 2044 l 1992 2054 l
+ 1993 2064 l 1993 2074 l 1993 2083 l 1993 2092 l 1994 2103 l
+ 1994 2115 l 1994 2122 l 1994 2124 l 1994 2125 l 1994 2129 l
+ 1994 2138 l 1994 2155 l 1994 2178 l 1994 2208 l 1994 2241 l
+ 1994 2273 l 1994 2303 l 1994 2326 l 1994 2343 l 1994 2352 l
+ 1994 2356 l 1994 2357 l  cp gs 0.00 setgray ef gr 
+% Polyline
+n 1308 1894 m 1244 1958 l 1180 1894 l 1244 1830 l 1308 1894 l  cp gs col32 1.00 shd ef gr 
+% Polyline
+n 417 2127 m 417 2129 l 416 2133 l 416 2139 l 416 2149 l 416 2157 l
+ 416 2166 l 416 2178 l 416 2191 l 416 2204 l 416 2216 l
+ 416 2227 l 416 2237 l 415 2248 l 415 2258 l 415 2268 l
+ 414 2278 l 414 2284 l 414 2285 l 414 2286 l 414 2293 l
+ 413 2301 l 413 2309 l 413 2316 l 412 2323 l 412 2330 l
+ 410 2338 l 408 2346 l 405 2353 l 401 2358 l 396 2361 l
+ 388 2364 l 377 2365 l 365 2366 l 357 2367 l 355 2367 l
+ 353 2367 l 344 2366 l 331 2365 l 320 2363 l 311 2360 l
+ 305 2356 l 300 2350 l 296 2343 l 292 2334 l 289 2324 l
+ 287 2316 l 286 2308 l 284 2300 l 282 2291 l 281 2282 l
+ 279 2275 l 279 2273 l 279 2271 l 278 2264 l 276 2255 l
+ 275 2248 l 275 2243 l 274 2237 l 274 2232 l 274 2226 l
+ 274 2222 l 274 2218 l 274 2214 l 274 2211 l 274 2207 l
+ 274 2205 l 274 2204 l 274 2203 l 274 2196 l 274 2186 l
+ 274 2176 l 274 2166 l 274 2156 l 274 2147 l 275 2138 l
+ 276 2127 l 277 2116 l 279 2105 l 282 2095 l 286 2087 l
+ 290 2080 l 296 2075 l 304 2071 l 314 2068 l 328 2066 l
+ 342 2064 l 355 2063 l 362 2063 l 363 2063 l 364 2063 l
+ 371 2063 l 378 2063 l 384 2064 l 388 2064 l 391 2065 l
+ 395 2066 l 398 2068 l 401 2069 l 404 2071 l 406 2072 l
+ 409 2073 l 413 2075 l 415 2077 l 416 2077 l 416 2079 l
+ 416 2087 l 417 2102 l 417 2117 l 417 2125 l 417 2127 l  cp gs col7 1.00 shd ef gr 
+% Polyline
+n 1071 2220 m 1071 2221 l 1071 2227 l 1071 2238 l 1071 2252 l 1070 2265 l
+ 1070 2276 l 1069 2286 l 1069 2296 l 1068 2306 l 1067 2316 l
+ 1065 2327 l 1062 2338 l 1059 2349 l 1055 2358 l 1051 2366 l
+ 1045 2372 l 1039 2377 l 1030 2380 l 1019 2383 l 1005 2385 l
+ 989 2387 l 976 2388 l 969 2388 l 968 2388 l 967 2388 l
+ 965 2388 l 961 2388 l 958 2388 l 956 2388 l 953 2387 l
+ 950 2387 l 947 2387 l 944 2386 l 942 2386 l 940 2386 l
+ 937 2385 l 934 2385 l 932 2384 l 931 2384 l 931 2382 l
+ 930 2376 l 930 2367 l 930 2359 l 929 2353 l 929 2347 l
+ 929 2339 l 929 2331 l 929 2323 l 929 2315 l 929 2307 l
+ 929 2298 l 929 2289 l 929 2276 l 929 2263 l 929 2254 l
+ 929 2252 l 929 2250 l 929 2240 l 929 2224 l 929 2210 l
+ 930 2199 l 930 2191 l 931 2184 l 932 2176 l 933 2170 l
+ 934 2163 l 935 2158 l 936 2154 l 937 2149 l 938 2145 l
+ 940 2139 l 941 2135 l 941 2134 l 942 2132 l 944 2124 l
+ 949 2112 l 953 2101 l 957 2093 l 961 2088 l 966 2084 l
+ 973 2081 l 979 2080 l 985 2079 l 989 2079 l 993 2079 l
+ 996 2079 l 999 2079 l 1001 2079 l 1003 2079 l 1012 2080 l
+ 1025 2081 l 1037 2084 l 1046 2087 l 1052 2093 l 1056 2098 l
+ 1059 2104 l 1062 2112 l 1064 2121 l 1066 2130 l 1067 2139 l
+ 1068 2148 l 1069 2157 l 1070 2167 l 1070 2179 l 1071 2193 l
+ 1071 2208 l 1071 2218 l 1071 2220 l  cp gs col7 1.00 shd ef gr 
+% Polyline
+n 611 2179 m 611 2177 l 611 2167 l 612 2151 l 612 2137 l 613 2126 l
+ 614 2116 l 615 2107 l 617 2097 l 620 2088 l 623 2080 l
+ 627 2073 l 632 2068 l 638 2064 l 646 2061 l 657 2060 l
+ 670 2059 l 678 2058 l 680 2058 l 682 2058 l 691 2059 l
+ 705 2060 l 717 2062 l 725 2065 l 731 2069 l 735 2075 l
+ 739 2083 l 741 2092 l 743 2103 l 743 2113 l 744 2122 l
+ 744 2131 l 744 2142 l 744 2155 l 743 2168 l 743 2177 l
+ 743 2179 l 742 2179 l 736 2179 l 723 2179 l 703 2179 l
+ 677 2179 l 651 2179 l 631 2179 l 618 2179 l 612 2179 l
+ 611 2179 l  cp gs col7 1.00 shd ef gr 
+% Polyline
+n 1549 2214 m 1549 2216 l 1549 2223 l 1548 2235 l 1548 2246 l 1547 2254 l
+ 1547 2261 l 1547 2268 l 1547 2276 l 1546 2283 l 1545 2290 l
+ 1544 2296 l 1542 2301 l 1540 2308 l 1537 2316 l 1534 2323 l
+ 1533 2324 l 1532 2326 l 1528 2334 l 1523 2343 l 1519 2350 l
+ 1515 2355 l 1511 2359 l 1506 2362 l 1501 2364 l 1496 2366 l
+ 1491 2367 l 1487 2368 l 1482 2369 l 1476 2369 l 1471 2369 l
+ 1470 2369 l 1469 2369 l 1462 2369 l 1451 2368 l 1442 2367 l
+ 1435 2365 l 1430 2363 l 1425 2358 l 1422 2352 l 1419 2345 l
+ 1417 2337 l 1416 2330 l 1415 2324 l 1415 2317 l 1414 2309 l
+ 1414 2299 l 1414 2293 l 1414 2292 l 1414 2290 l 1415 2279 l
+ 1416 2263 l 1418 2248 l 1421 2238 l 1425 2231 l 1430 2226 l
+ 1438 2222 l 1447 2219 l 1456 2217 l 1465 2216 l 1472 2215 l
+ 1479 2215 l 1486 2214 l 1494 2214 l 1502 2214 l 1507 2214 l
+ 1508 2214 l 1509 2214 l 1516 2214 l 1529 2214 l 1541 2214 l
+ 1548 2214 l 1549 2214 l  cp gs col7 1.00 shd ef gr 
+$F2psEnd
+rs
+
+%%EndDocument
+ @endspecial -374 w Fd(.)-472 619 y
+ from-company show
+ -472 619 a -472 739
+4489 48 v -846 857 a Fc(.)-472 857 y
+ from-location show
+ -472 857 a 120 x
+Fb(T)-8 b(el:)-251 977 y
+ from-voice-number show
+ -251 977 a -472 1098 a Fb(F)n(ax:)-225
+1098 y
+ from-fax-number show
+ -225 1098 a 12 1472 a Fc(From:)463 1472 y
+ from show
+ 463
+1472 a 175 1837 a Fc(T)d(o:)463 1837 y
+ to show
+ 463 1837 a -423
+2020 a Fc(Or)m(g)o(anization:)463 2020 y
+ to-company show
+ 463 2020 a -147
+2202 a Fc(Address:)463 2202 y
+ to-location show
+ 463 2202 a 142 2385 a Fc(T)h(el:)463
+2385 y
+ to-voice-number show
+ 463 2385 a 110 2567 a Fc(F)n(ax:)463 2567 y
+ to-fax-number show
+ 463
+2567 a -107 2933 a Fc(Subject:)463 2933 y
+ regarding show
+ 463 2933 a
+3035 3300 a Fa(Number)24 b(of)h(pages:)3780 3300 y
+ page-count (0) eq {zeroPcountStr}{page-count} ifelse show
+ 3780
+3300 a -472 3657 4489 24 v 758 4140 a
+ gsave (X) true charpath pathbbox 2 index sub 1.5 mul /fontdy exch
+def pop pop currentpoint /commentyy exch def /commentxx exch def comments
+rightm commentxx sub { commentxx commentyy moveto show /commentyy commentyy
+fontdy add def } RKbreakIntoLines grestore
+ 758 4140 a eop
+%%Trailer
+end
+userdict /end-hook known{end-hook}if
+%%EOF
--- hylafax-4.1.1.orig/debian/hosts.hfaxd
+++ hylafax-4.1.1/debian/hosts.hfaxd
@@ -0,0 +1 @@
+localhost:21::
--- hylafax-4.1.1.orig/debian/hylafax-server.templates
+++ hylafax-4.1.1/debian/hylafax-server.templates
@@ -0,0 +1,47 @@
+Template: hylafax-server/configure_note
+Type: note
+Description: Don't forget to configure HylaFAX with /usr/sbin/faxsetup.
+ Please run the faxsetup script which will ask you a few questions about your
+ setup and let you to add with a semi-automatical auto-detection procedure
+ one or more modems to the pool of devices available to HylaFAX.
+Description-bg: Íå çàáðàâÿéòå äà íàñòðîèòå HylaFAX ñ /usr/sbin/faxsetup.
+ Ìîëÿ ñòàðòèðàéòå faxsetup ñêðèïòà, êîéòî ùå âè çàäàäå íÿêîëêî âúïðîñà
+ îòíîñíî êîíôèãóðàöèÿòà íà ñèñòåìàòà è ùå âè ïîçâîëè äà äîáàâèòå ìîäåì(è)
+ ñ ïîëó-àâòîìàòèçèðàíà ïðîöåäóðà, êîÿòî íîðìàëíî ñàìà îòêðèâà íàñòðîéêèòå.
+Description-de: Vergessen Sie nicht, HylaFAX mit /usr/sbin/faxsetup zu konfigurieren.
+ Bitte f?hren Sie das Script faxsetup aus. Es wird Ihnen ein paar
+ Fragen zu Ihrer Systemumgebung stellen und Ihnen erm?glichen, mit
+ einer halbautomatischen Erkennung Modems f?r HylaFAX vorzubereiten.
+Description-pt_BR: NÐ³o se esqueÐ·a de configurar o HylaFAX com /usr/sbin/faxsetup.
+ Por favor execute o script faxsetup, o qual lhe farÐ± algumas perguntas
+ sobre sua configuraÐ·Ð³o e o deixarÐ± adicionar, atravÐ¹s de um procedimento
+ de autodetecÐ·Ð³o semi-automÐ±tico, um ou mais modems ao pool de
+ dispositivos disponÐ½veis para o HylaFAX.
+Description-ru: îÅ ÚÁÂÕÄØÔÅ ÎÁÓÔÒÏÉÔØ HylaFAX Ó /usr/sbin/faxsetup.
+ ðÏÖÁÌÕÊÓÔÁ, ÚÁÐÕÓÔÉÔÅ ÓÃÅÎÁÒÉÊ faxsetup, ËÏÔÏÒÙÊ ÚÁÄÁÓÔ ×ÁÍ ÎÅÓËÏÌØËÏ 
+ ×ÏÐÒÏÓÏ× ÐÏ ×ÁÛÅÊ ËÏÎÆÉÇÕÒÁÃÉÉ É ÐÏÚ×ÏÌÉÔ ×ÁÍ ÄÏÂÁ×ÉÔØ Ó ÐÏÍÏÝØÀ
+ ÐÏÌÕÁ×ÔÏÍÁÔÉÞÅÓËÏÊ ÐÒÏÃÅÄÕÒÙ Á×ÔÏÏÐÒÅÄÅÌÅÎÉÑ ÏÄÉÎ ÉÌÉ ÂÏÌØÛÅ ÍÏÄÅÍÏ× ×
+ ÐÕÌ ÕÓÔÒÏÊÓÔ×, ÄÏÓÔÕÐÎÙÈ ÄÌÑ HylaFAX.
+
+Template: hylafax-server/start_now
+Type: boolean
+Default: true
+Description: Would you like to start the HylaFAX daemon now?
+ Start the HylaFAX server process immediately. You should have configured
+ HylaFAX first (if you are upgrading from a previous version you most likely
+ already have a working configuration).
+Description-bg: Áèõòå ëè æåëàëè äà ñòàðòèðàòå HylaFAX äåìîíà âåäíàãà?
+ Àêî âå÷å ñòå íàñòðîèëè HylaFAX, ìîæåòå äà ãî ñòàðòèðàòå íåçàáàâíî, òàêà
+ ÷å äà îáðàáîòâà çàÿâêè çà âõîäÿùè/èçõîäÿùè ôàêñîâå.
+Description-de: Soll der HylaFAX-D?mon jetzt gestartet werden?
+ Wenn Sie HylaFAX jetzt starten wollen m?ssen Sie es bereits
+ konfiguriert haben, oder sie hatten von dieser Installation
+ bereits eine lauff?hige HylaFAX-Konfiguration.
+Description-pt_BR: VocÐº gostaria de iniciar o daemon HylaFAX agora ?
+ Inicie o processo do servidor HylaFAX imediatamente. VocÐº deve ter
+ configurado o HylaFAX primeiro (se vocÐº estÐ± atualizando de uma versÐ³o
+Description-ru: èÏÔÉÔÅ ÚÁÐÕÓÔÉÔØ ÄÅÍÏÎ HylaFAX ÓÅÊÞÁÓ?
+ îÅÍÅÄÌÅÎÎÙÊ ÚÁÐÕÓË ÓÅÒ×ÅÒÁ HylaFAX. ÷Ù ÄÏÌÖÎÙ ÓÎÁÞÁÌÁ ÓËÏÎÆÉÇÕÒÉÒÏ×ÁÔØ
+ HylaFAX (ÅÓÌÉ ×Ù ÏÂÎÏ×ÌÑÅÔÅ ÐÒÅÄÙÄÕÝÕÀ ×ÅÒÓÉÀ, ÔÏ ×Ù × ÂÏÌØÛÉÎÓÔ×Å
+ ÓÌÕÞÁÅ× ÂÕÄÅÔÅ ÒÁÓÐÏÌÁÇÁÔØ ÕÖÅ ÒÁÂÏÔÏÓÐÏÓÏÂÎÏÊ ËÏÎÆÉÇÕÒÁÃÉÅÊ).
+
--- hylafax-4.1.1.orig/debian/init.d
+++ hylafax-4.1.1/debian/init.d
@@ -0,0 +1,52 @@
+#!/bin/sh
+# Start or stop HylaFAX
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -x /usr/sbin/faxq || exit 0
+test -x /usr/sbin/hfaxd || exit 0
+test -f /var/spool/hylafax/etc/setup.cache || exit 0
+
+case "$1" in
+  start)
+    echo -n "Starting HylaFAX daemons:"
+    echo -n " faxq"
+    start-stop-daemon --start --exec /usr/sbin/faxq
+    echo -n " hfaxd"
+    start-stop-daemon --start --exec /usr/sbin/hfaxd -- -i 4559 -o 4557 -s 444
+    # Example for how to tell HylaFAX about send-only modems.
+    # Uncomment the following two lines, if you don't want to run faxgetty
+    # and only want to send faxes with HylaFAX. Change /dev/modem if needed.
+#    echo -n " faxmodem"
+#    /usr/sbin/faxmodem /dev/modem
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping HylaFAX daemons:"
+    echo -n " faxq"
+    start-stop-daemon --stop --exec /usr/sbin/faxq
+    echo -n " hfaxd"
+    start-stop-daemon --stop --exec /usr/sbin/hfaxd -- -i 4559 -o 4557 -s 444
+    echo "."
+    ;;
+  restart|force-reload)
+    echo -n "Restarting HylaFAX daemons:"
+    echo -n " faxq"
+    start-stop-daemon --stop --exec /usr/sbin/faxq
+    sleep 1
+    start-stop-daemon --start --exec /usr/sbin/faxq
+    echo -n " hfaxd"
+    start-stop-daemon --stop --exec /usr/sbin/hfaxd -- -i 4559 -o 4557 -s 444
+    sleep 1
+    start-stop-daemon --start --exec /usr/sbin/hfaxd -- -i 4559 -o 4557 -s 444
+    echo -n " faxgetty"
+    killall faxgetty 2> /dev/null || true
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/hylafax {start|stop|restart|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0
--- hylafax-4.1.1.orig/debian/defs-regex.patch
+++ hylafax-4.1.1/debian/defs-regex.patch
@@ -0,0 +1,50 @@
+# defs-regex.patch
+# Nico Garcia 17 Feb 98
+#
+# Re-arrange the INCDIR and LIBDIR in HylaFAX's defs.in to select the 
+# added on libraries and includes before the standard ones. 
+# Required to correct a problem with regex in RedHat Linux 5.0 and above.
+#
+# Instructions : cd to directory *above* HylaFAX source directory and run
+# command 'patch < defs-regex.patch' 
+
+*** hylafax-v4.0pl2.orig/defs.in	Sat Feb 14 05:46:31 1998
+--- hylafax-v4.0pl2/defs.in	Tue Feb 17 12:57:31 1998
+***************
+*** 214,221 ****
+  
+  GCOPTS		= @GCOPTS@ ${OPTIMIZER} @PROTOTYPES@
+  GCDEFS		= @ANSICPP@
+! GCINCS		= -I. -I${DEPTH} -I${SRCDIR} \
+! 		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC} -I${REGEXINC}
+  #
+  # C++ flags are decomposed using the same hierarchy as C flags.
+  #
+--- 214,221 ----
+  
+  GCOPTS		= @GCOPTS@ ${OPTIMIZER} @PROTOTYPES@
+  GCDEFS		= @ANSICPP@
+! GCINCS		= -I. -I${DEPTH} -I${REGEXINC} -I${SRCDIR} \
+! 		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC}
+  #
+  # C++ flags are decomposed using the same hierarchy as C flags.
+  #
+***************
+*** 230,237 ****
+  C++INCS		= ${VC++INCS} ${LC++INCS} ${GC++INCS}
+  
+  GC++OPTS	= @GCXXOPTS@ ${OPTIMIZER}
+! GC++INCS	= -I. -I${DEPTH} -I${SRCDIR} \
+! 		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC} -I${REGEXINC}
+  GC++DEFS	= @ANSICXXPP@
+  
+  #
+--- 230,237 ----
+  C++INCS		= ${VC++INCS} ${LC++INCS} ${GC++INCS}
+  
+  GC++OPTS	= @GCXXOPTS@ ${OPTIMIZER}
+! GC++INCS	= -I. -I${DEPTH} -I${REGEXINC} -I${SRCDIR} \
+! 		    -I${DEPTH}/${TOPSRCDIR}/util -I${TIFFINC}
+  GC++DEFS	= @ANSICXXPP@
+  
+  #
--- hylafax-4.1.1.orig/debian/hyla.conf
+++ hylafax-4.1.1/debian/hyla.conf
@@ -0,0 +1,33 @@
+#
+#	/etc/hylafax/hyla.conf
+#
+#	System-wide client configuration file
+
+
+# System-wide configuration information
+# -------------------------------------
+
+# Host - host to contact for service
+#
+Host:			localhost
+
+# Verbose - whether or not to enable protocol tracing
+#
+Verbose:		No
+
+
+# Faxstat configuration information
+# ---------------------------------
+
+# TimeZone - control whether the times and dates are reported in the local
+#	     timezone of the server (`local') or in GMT (`GMT').
+#
+TimeZone:		local
+
+
+# Sendfax configuration information
+# ---------------------------------
+
+# DialRules - file containing dialstring rules
+#
+DialRules: 		"/etc/hylafax/dialrules"
--- hylafax-4.1.1.orig/debian/doc-base
+++ hylafax-4.1.1/debian/doc-base
@@ -0,0 +1,11 @@
+Document: hylafax
+Title: HylaFAX Documentation
+Author: HylaFAX
+Abstract:  HTML version of HylaFAX documentation and manpages.
+ HylaFAX supports the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+Section: Comm
+
+Format: HTML
+Index: /usr/share/doc/hylafax-doc/html/index.html
+Files: /usr/share/doc/hylafax-doc/html/*.html
--- hylafax-4.1.1.orig/debian/QuickStart
+++ hylafax-4.1.1/debian/QuickStart
@@ -0,0 +1,29 @@
+Quick Start guide for Debian HylaFAX
+====================================
+
+Step 1:  As root, start "faxsetup".
+
+
+Step 2:  As root, do "faxaddmodem" for every modem that you want to make
+available to HylaFAX.
+
+
+Step 3:  If you want to receive facsimiles, edit your /etc/inittab and add a
+faxgetty line for each modem you want to accept calls on.  You might have to
+read inittab(5) first.  Once you have appended the faxgetty lines, do "init q"
+and watch the syslog - you will see faxgetty's "ready" message(s). Example
+with two modems, on /dev/ttyS0 and /dev/ttyS1:
+
+-8<-----------------------------------
+S0:23:respawn:/usr/sbin/faxgetty ttyS0
+S1:23:respawn:/usr/sbin/faxgetty ttyS1
+----------------------------------->8-
+
+
+Step 4:  If you have a send-only environment, edit your /etc/init.d/hylafax
+and uncomment/edit the call to faxaddmodem [modem].  Copy that line for
+every send-only modem that you have, if it is more than one.  This step is
+unnecessary for the modems that are managed by faxgetty.
+
+--
+Pavel Tcholakov <pavel@debian.org>
--- hylafax-4.1.1.orig/debian/hylafax.config
+++ hylafax-4.1.1/debian/hylafax.config
@@ -0,0 +1,7 @@
+#ContCoverPage:         "etc/cover.templ"
+#DestControls:		"etc/destctrls"
+#DialStringRules:       "etc/dialrules"
+#QualifyCID:		"etc/cid"
+#QualifyTSI:		"etc/tsi"
+#ServerTracing:		0x08501
+InternationalPrefix:	00
