aboutsummaryrefslogtreecommitdiffstats
path: root/comms/hylafax/files
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1997-05-29 14:49:26 +0800
committerasami <asami@FreeBSD.org>1997-05-29 14:49:26 +0800
commit2f68accf0773faec9ed71c3a35805888d171f5ec (patch)
tree93f2c00a3b004a6f8a239d659a59177bbe1ce643 /comms/hylafax/files
parente345de0b733a4ef2b18575670c289856d83db4f0 (diff)
downloadfreebsd-ports-graphics-2f68accf0773faec9ed71c3a35805888d171f5ec.tar.gz
freebsd-ports-graphics-2f68accf0773faec9ed71c3a35805888d171f5ec.tar.zst
freebsd-ports-graphics-2f68accf0773faec9ed71c3a35805888d171f5ec.zip
Upgrade to 4.01. This port requires tiff-3.4.
PR: 3518 Submitted by: itojun@itojun.org
Diffstat (limited to 'comms/hylafax/files')
-rw-r--r--comms/hylafax/files/README235
-rw-r--r--comms/hylafax/files/hylafax.sh.sample9
-rw-r--r--comms/hylafax/files/patch-ab59
-rw-r--r--comms/hylafax/files/patch-ad172
-rw-r--r--comms/hylafax/files/patch-ae144
5 files changed, 248 insertions, 371 deletions
diff --git a/comms/hylafax/files/README b/comms/hylafax/files/README
index a979996b61d..fa7926e3174 100644
--- a/comms/hylafax/files/README
+++ b/comms/hylafax/files/README
@@ -1,225 +1,10 @@
- NOTES ON HYLAFAX IN FREEBSD (/usr/ports/comms/hylafax)
- By Julian Stacey <jhs@freebsd.org> May 1995
-
-This port replaces flexfax (which is over a year old).
-Thanks to Sam Leffler of SGI for writing & releasing Hylafax :-)
-I <jhs@freebsd.org> wrote the FreeBSD ports/comm/hylafax/* files,
-
-Copyright Julian Stacey 1995:
- Please preserve & comply with Sam Leffler's & SGI's legal stuff
- I hereby release my work in this area for public use, & disclaim
- all liability !
- Leave my name intact please, I'm a freelance, publicity can be useful.
-
-Documentation:
- - On Line Manuals: man hylafax.
- - World Wide Web site: (http://www.vix.com/flexfax/
- - Source tree: Local copies of web in html & html/FAQ etc.
-
-Mailing List for Support, Development etc:
- Don't mail me your fax or modem problems, nor post Hylafax
- software bugs & fax modem problems to a Freebsd mail list.
- The correct mail list: flexfax@sgi.com
-
-Patches:
- Bug reports, accompanied by diff -c patches, will be reviewed &
- commited to FreeBSD/ports).
-
-Examples:
- Syntax etc examples are in: config.jhs config.ttyd1.jhs etc.ttys.jhs
-
-My Test Environment:
- SupraFax V32bis + FreeBSD-2-current (May 1995)
-
-Outstanding:
- I'm not sure if the lock file scheme is OK
- (It may be, I just used the default).
- Some of the permissions are not right,
- (sometimes I get many email acknowledgements for each fax
- sent (but fax is only sent once, no horrendous phone bill
- ... yet ;-)
- My faxgetty will not answer as a normal modem (maybe its the modem,
- or maybe my config file is wrong).
-
----
-Julian Stacey <jhs@freebsd.org> Tel. +49 89 268616. Fax Modem: 2608126
- http://www.regent.e-technik.tu-muenchen.de/people/jhs.html
-Vector Systems Ltd: an Internet, Unix & C consultancy in Munich Germany
-
-Appended are some example Config files:
-
-etc.ttys
-{-------
-ttyd1 "/usr/local/sbin/faxgetty" vt100 on unsecure
--------}
-
-config
-{-------
-LogFacility: daemon
-CountryCode: 49
-AreaCode: 89
-LongDistancePrefix: 0
-InternationalPrefix: 00
-DialStringRules: etc/dialrules.europe
-ServerTracing: 1
-MaxSendPages: 20
--------}
-
-config.ttyd1
-{-------
-# /var/spool/fax/etc/config.ttyd1 by jhs@freebsd.org
-# from $Header: /usr/people/sam/fax/config/RCS/rockwell,v 1.25 1995/03/10 23:36:02 sam Exp $
-# this file documented in man config
-
-# Sam says:
-# {
-# If you stop faxq then faxd.recv will remove the job itself;
-# otherwise if it sees faxq is running it passes the remove request on and
-# assumes the task was completed (there is no acknowledgement).
-
-# ServerTracing so that tracing messages are not sent out (listed in the
-# TODO file, a fix is welcome). If you think this might be happening, try
-# echo "CServerTracing: 0x201">/var/spool/fax/FIFO
-# to force faxq to reset the current value for ServerTracing.
-# }
-
-# Configuration for a Rockwell-based Class 2 modem.
-# Boca M1440E firmware V1.270 or newer
-# Dallas Fax (throw it away!)
-# Hayes Optima 24+Fax96 firmware TR00-J260-001 XXX or newer
-# SupraFAX v.32bis firmware V1.200-C or newer
-# Twincom 144/DF firmware revision V1.200 or newer
-# Dynalink 1414VE
-# (and others)
-
-# This configuration file sets up the modem to run at 19.2 for
-# sending and for receiving. XON/XOFF flow control is used on
-# the tty port. RTS/CTS can be used by switching the flow control
-# setup, but beware of modems that do not support it during
-# facsimile operations. Also beware that the adaptive-answer
-# facility, when supported, is usually unreliable.
-
-# AdaptiveAnswer boolean No enable adaptive answer of inbound calls
-AdaptiveAnswer Yes
-# AnswerRotary string Any alternatives for answering calls
-# AnswerRotary "fax data"
-# DestControls jhs set later see man destctrls
-
-MaxDials 3 # max calls to transmit a job (presumably doing succesive pages)
-# Wrong numbers cost me 23pf per fail, & earache to whoever answers the phone !
-# MaxTries 3 # max attempts to transmit a job (3 default)
-NoCarrierRetrys 0 # default 1 # number of times to retry dialing on ``NO CARRIER''
-
-# JobReqBusy integer 300 requeue interval for BUSY dial result
-
-MaxSendPages 20 # max pages to permit in a send
-
-# jhs later QualifyTSI file of TSI patterns for qualifying senders
-CountryCode: 49
-AreaCode: 89
-FAXNumber: +49.89.2608126 # also used to name session log file
-LocalIdentifier: "+49 89 2608126"
-LongDistancePrefix: 0
-InternationalPrefix: 00
-DialStringRules: etc/dialrules.europe
-ServerTracing: 1
-SessionTracing: 11
-RecvFileMode: 0644 # if you have nosey users, consider 0600
-LogFileMode: 0644 # make it 0600 if calling card access codes are logged
-DeviceMode: 0600
-RingsBeforeAnswer: 2
-SpeakerVolume: medium
-
-# Any appearance of ``%l'' is replaced with the tty name and any
-# appearance of ``%s'' is replaced with the serial port speed (in decimal).
-GettyArgs: "std.%s -" # "std.%s ttyd1" # default is "-h %l dx_%s"
-# FreeBSD man getty says: getty [type [tty]]
-# FreeBSD man login says: -h specifies host from which the connection received.
-# kew@timesink.spk.wa.us (FreeBSD 2.1.0) uses "std.%s -".
-
-TagLineFont: etc/lutRS18.pcf
-# pre jhs default was TagLineFormat: "From %%l|%c|Page %%p of %%t"
-# %c gives American-only date format, which is confusing in Britain or Germany
-# so I use international accountancy date format: (19)95 08 01 (ie 1st Aug)
-# I use no words in my tag line, as fax may be in German or English.
-#---
-# allow at least 4 spaces before VSL as PCS fax chops left margin
-# dont actually use space char, as entabbing this file will lose it all
-# dont put too much in any one field or will overprint
-# %%l takes LocalIdentifier
-# %%n sender fax ie +49.89.2608126
-# %%d target fax ie +498968004525, from sendfax -d gary@68004.525
-# %%p page number inc. cover sheet
-# %%t total pages inc. cover sheet
-# jhs created `pages' symbol (\241 dec161 xa1) in lutRS18.pcf
-# jhs created `phone' symbol (\244 dec164 xa4) in lutRS18.pcf
-# `phone' & `pages' are inspired by symbols that pcs fax machine prints
-# PCS FAX is "Canon Fax 280" Model H11232, + H11 2325 + HA2 1324, REN=3
-TagLineFormat: "Fax %%n|Tel \244 +49 89 268616|\241 %%p/%%t %Y:%m:%d %H:%M"
-
-# MaxRecvPages: unlimited
-
-# Modem-related stuff: should reflect modem command interface
-# and hardware connection/cabling (e.g. flow control).
-
-ModemType: Class2 # use class 2 interface
-ModemRate: 19200 # fax send&recv is locked at 19.2
-ModemFlowControl: xonxoff # default
-
-ModemResetCmds: AT&F2 # what you want for a Supra # JJ I have not checked operation since enabling this
-ModemNoFlowCmd: AT&K # disable flow control cmd
-ModemHardFlowCmd: AT&K3 # hardware flow control cmd
-ModemSoftFlowCmd: AT&K4 # software flow control cmd
-ModemSetupDTRCmd: AT&D3 # DTR off causes modem to reset
-#ModemSetupDTRCmd: AT&D2S25=1S38=0 # Dynalink 1414VE needs this
-ModemSetupDCDCmd: AT&C1 # DCD follows carrier
-ModemSetupAACmd: AT+FAA=1+FCLASS=0 # enable in current class
-# FAQ says: AT+FAA=1 Auto answer as facsimile or data depending on call
-
-ModemSendFillOrder: LSB2MSB # as expected
-ModemRecvFillOrder: MSB2LSB # opposite of what makes sense
-
-ModemDialCmd: ATDT%s@ # T for tone dialing, @ for silence
-
-# Caller ID configuration setup for Supra.
-
-# QualifyCID: etc/cid (off by default) CID access control list file
-CIDNumber: "NMBR = " # pattern string for phone number info # JJ I have not checked operation since enabling this
-CIDName: "NAME = " # pattern string for identity info # JJ I have not checked operation since enabling this
-
-# DEFAULTS FOR REFERENCE
-# ModemAnswerFaxCmd string ATA command for answering fax call
-# ModemAnswerDataCmd string ATA command for answering data call
-
-# Class1RecvIdentTimer
-# The time, in milliseconds, to wait for an initial
-# DCS when receiving a facsimile. CCITT recommenda-
-# tion T.30 specifies this as the value of the T1
-# timer. However, adaptive answering schemes such as
-# that described above under the AdaptiveAnswer
-# parameter may require that this timer be shortened.
-# Class1RecvIdentTimer 35000 Class 1: max wait (ms) for initial ident frame
-Class1RecvIdentTimer 12000
-
-# Supra default wait for carrier is 50/10th sec, change with ats7=255
-# Datatronic default wait for carrier is 45/10th sec.
-# matthias says: config.ttyd1
-#
-# FaxT1Timer
-# should not be changed without full understanding of the ... server.
-# The value of the T1 timer in milliseconds. This
-# timer is used to time out the initial session con-
-# tact; i.e. receipt of DIS/DCS.
-# FaxT1Timer 35000 CCITT T.30 T1 timer (ms)
-#
-# AdaptiveAnswer:
-# Class1RecvIdentTimer should be set to a value that
-# is shorter than FaxT1Timer.
-# yet defaults for both are exactly the same: 35000 / 1000 sec.
-
-UUCPLockDir /var/spool/lock # jhs added this after seeing where kermit created a lock.
-UUCPLockType ascii # jhs added this after seeing what kermit created
-# Note kermit -l /dev/supra created /var/spool/lock/LCK..supra
-# (supra is a link to cua01, so the lock wont really work, as I'm running
-# gettyfax on ttyd1.
--------}
+The port is complete rewrite of hylafax-3.0p1 port by Julian Stacey
+<jhs@freebsd.org>, May 1995.
+original notice was as follows:
+
+ Copyright Julian Stacey 1995:
+ Please preserve & comply with Sam Leffler's & SGI's legal stuff
+ I hereby release my work in this area for public use,
+ & disclaim all liability !
+ Leave my name intact please, I'm a freelance, publicity can
+ be useful.
diff --git a/comms/hylafax/files/hylafax.sh.sample b/comms/hylafax/files/hylafax.sh.sample
new file mode 100644
index 00000000000..069ac04e168
--- /dev/null
+++ b/comms/hylafax/files/hylafax.sh.sample
@@ -0,0 +1,9 @@
+#! /bin/sh
+# hylafax startup example.
+# be sure to initialize the followings:
+# server: /usr/local/sbin/faxsetup
+# modems: /usr/local/sbin/faxaddmodem
+# incoming calls: /etc/ttys
+if [ -x /usr/local/sbin/faxq ]; then
+ /usr/local/sbin/faxq && echo -n ' hylafax'
+fi
diff --git a/comms/hylafax/files/patch-ab b/comms/hylafax/files/patch-ab
index 03446a5f38d..cf63662b07a 100644
--- a/comms/hylafax/files/patch-ab
+++ b/comms/hylafax/files/patch-ab
@@ -1,32 +1,27 @@
-This patch prepared by Julian Stacey <jhs@FreeBSD.Org
-
-Make this a BATCH compilable port, instead of IS_INTERACTIVE
-
-Warning before removing or renaming this patch,
-consult this code segment in ../Makefile:
- .if !exists(patches/patch-aa)
- IS_INTERACTIVE= yes
- .endif
-
-*** configure Sat May 20 16:30:29 1995
---- configure Sat May 20 16:58:58 1995
-***************
-*** 2889,2895 ****
- fi
- checkForExecutable $PATH_SENDMAIL
- checkForExecutable $PATH_GETTY
-! printConfig; prompt "Are these ok [yes]?"; read ok
- test -z "$ok" && ok=yes
- case "$ok" in
- [1-9]|1[0-7]) promptForParameter $ok;;
---- 2889,2898 ----
- fi
- checkForExecutable $PATH_SENDMAIL
- checkForExecutable $PATH_GETTY
-! printConfig
-! ok=yes
-! echo "If you do not like this config, uncomment next prompt line in configure."
-! # prompt "Are these ok [yes]?"; read ok
- test -z "$ok" && ok=yes
- case "$ok" in
- [1-9]|1[0-7]) promptForParameter $ok;;
+--- ./configure.org Tue Nov 26 15:20:17 1996
++++ ./configure Wed May 28 21:55:16 1997
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/local/bin/bash
+ # $Id: configure,v 1.401 1996/11/23 17:28:45 sam Rel $
+ #
+ # HylaFAX Facsimile Software
+@@ -239,7 +241,7 @@
+ test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others
+ test -d /usr/contrib/bin && PATH=$PATH:/usr/contrib/bin # BSDi
+ test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others
+-test -d /usr/local/bin && PATH=/usr/local/bin:$PATH # for GNU stuff
++test -d /usr/local/bin && PATH=$PATH:/usr/local/bin # for GNU stuff
+ PATH=$PATH:$OPATH
+
+ POSIXLY_CORRECT=1; export POSIXLY_CORRECT # disable GNU extensions
+@@ -3928,7 +3930,8 @@
+ printConfig
+ checkForExecutable $PATH_SENDMAIL
+ checkForExecutable $PATH_GETTY
+- prompt "Are these ok [yes]?"; read ok
++# prompt "Are these ok [yes]?"; read ok
++ ok=yes
+ test -z "$ok" && ok=yes
+ case "$ok" in
+ [1-9]|1[0-9]) promptForParameter $ok;;
diff --git a/comms/hylafax/files/patch-ad b/comms/hylafax/files/patch-ad
index 1dc3eb71b51..ee3f0c4529d 100644
--- a/comms/hylafax/files/patch-ad
+++ b/comms/hylafax/files/patch-ad
@@ -1,102 +1,78 @@
-*** 1.14 1995/04/08 21:29:53
---- faxd/ClassModem.c++ 1995/06/21 14:44:41
+To fit the FreeBSD tty device handling scheme.
+
+*** faxd/Getty.c++.orig Sun Apr 20 16:40:07 1997
+--- faxd/Getty.c++ Sun Apr 20 16:40:31 1997
***************
-*** 910,915 ****
---- 910,919 ----
- * the syntax specified in the "standard". Try looking
- * at some of the responses given by rev ~4.04 of the
- * ZyXEL firmware (for example)!
-+ *
-+ * NB: We accept alphanumeric items but don't return them
-+ * in the parsed range so that modems like the ZyXEL 2864
-+ * that indicate they support ``Class Z'' are handled.
- */
- fxBool
- ClassModem::vparseRange(const char* cp, int nargs ... )
+*** 218,224 ****
+ // NB: this is executed in the parent
+ fxStr device = fxStr::format("%s/" | line, _PATH_DEV);
+ Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
+! Sys::chmod(device, 0600); // reset protection
+ }
+
+ extern void vlogError(const char* fmt, va_list ap);
+--- 218,224 ----
+ // NB: this is executed in the parent
+ fxStr device = fxStr::format("%s/" | line, _PATH_DEV);
+ Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
+! Sys::chmod(device, 0660); // reset protection
+ }
+
+ extern void vlogError(const char* fmt, va_list ap);
+*** faxd/UUCPLock.c++.orig Wed Nov 27 08:21:38 1996
+--- faxd/UUCPLock.c++ Sun Apr 20 17:09:21 1997
***************
-*** 926,935 ****
- matchc = CPAREN;
- acceptList = TRUE;
- cp++;
-! } else if (isdigit(cp[0])) { // <item>
- matchc = COMMA;
- acceptList = (nargs == 0);
-! } else {
- b = FALSE;
- break;
- }
---- 930,939 ----
- matchc = CPAREN;
- acceptList = TRUE;
- cp++;
-! } else if (isalnum(cp[0])) { // <item>
- matchc = COMMA;
- acceptList = (nargs == 0);
-! } else { // skip to comma
- b = FALSE;
- break;
- }
+*** 37,42 ****
+--- 37,43 ----
+ }
+ #endif
+ #include <pwd.h>
++ #include <grp.h>
+
+ /*
+ * UUCP Device Locking Support.
***************
-*** 939,952 ****
- cp++;
- continue;
- }
-! if (!isdigit(cp[0])) {
- b = FALSE;
- goto done;
- }
-! int v = 0;
-! do {
-! v = v*10 + (cp[0] - '0');
-! } while (isdigit((++cp)[0]));
- int r = v;
- if (cp[0] == '-') { // <low>-<high>
- cp++;
---- 943,963 ----
- cp++;
- continue;
- }
-! if (!isalnum(cp[0])) {
- b = FALSE;
- goto done;
- }
-! int v;
-! if (isdigit(cp[0])) {
-! v = 0;
-! do {
-! v = v*10 + (cp[0] - '0');
-! } while (isdigit((++cp)[0]));
-! } else {
-! v = -1; // XXX skip item below
-! while (isalnum((++cp)[0]))
-! ;
-! }
- int r = v;
- if (cp[0] == '-') { // <low>-<high>
- cp++;
+*** 146,153 ****
+ if (!pwd)
+ faxApp::fatal("Can not deduce identity of UUCP");
+ UUCPuid = pwd->pw_uid;
+- UUCPgid = pwd->pw_gid;
+ endpwent(); // paranoia
+ }
+ }
+ uid_t UUCPLock::getUUCPUid() { setupIDs(); return UUCPuid; }
+--- 147,159 ----
+ if (!pwd)
+ faxApp::fatal("Can not deduce identity of UUCP");
+ UUCPuid = pwd->pw_uid;
+ endpwent(); // paranoia
++
++ const group *grp = getgrnam("dialer");
++ if (!grp)
++ faxApp::fatal("Can not deduce identity of DIALER");
++ UUCPgid = grp->gr_gid;
++ endgrent(); // paranoia
+ }
+ }
+ uid_t UUCPLock::getUUCPUid() { setupIDs(); return UUCPuid; }
+*** config/skel.orig Sun Apr 20 21:53:58 1997
+--- config/skel Sun Apr 20 21:54:30 1997
***************
-*** 964,972 ****
- cp++;
- v++, r++; // XXX 2.0 -> 3
- }
-! // expand range or list
-! for (; v <= r; v++)
-! mask |= 1<<v;
- if (acceptList && cp[0] == COMMA) // (<item>,<item>...)
- cp++;
- }
---- 975,984 ----
- cp++;
- v++, r++; // XXX 2.0 -> 3
- }
-! if (v != -1) { // expand range or list
-! for (; v <= r; v++)
-! mask |= 1<<v;
-! }
- if (acceptList && cp[0] == COMMA) // (<item>,<item>...)
- cp++;
- }
-
-
-
-
+*** 41,48 ****
+ 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
+--- 41,48 ----
+ SessionTracing: 11 # log server-related operations
+ RecvFileMode: 0600 # recvd facsimile are not public
+ LogFileMode: 0600 # private log files
+! DeviceMode: 0660 # device is accessible only to uucp/fax
+! GettyArgs: "std.%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
diff --git a/comms/hylafax/files/patch-ae b/comms/hylafax/files/patch-ae
index 25d0feef09c..9b5f246ea87 100644
--- a/comms/hylafax/files/patch-ae
+++ b/comms/hylafax/files/patch-ae
@@ -1,17 +1,129 @@
-Deal with cc -version reporting "2.7.2.1" or any other junk following the
-third number.
+For multilingualization (iso-2022 variant encodings).
+Some part of this is biased to Japanization, however, it should
+give some hints to asian people.
-Inspired by a larger patch from <jhs@freebsd.org> and apparently
-Andreas Klemm <andreas@klemm.gtn.com>
-
---- configure.dist Mon Oct 14 10:17:10 1996
-+++ configure Mon Oct 14 10:18:20 1996
-@@ -446,7 +446,7 @@
- {
- app=$1; shift
- eval `$app -v 2>&1 | \
-- sed -n -e '/version/s/.* \([0-9]*\)\.\([0-9]*\).\([0-9]*\)/GCCdist=\1;GCCmajor=\2;GCCminor=\3/p'`
-+ sed -n -e '/version/s/.* \([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/GCCdist=\1;GCCmajor=\2;GCCminor=\3/p'`
- GCCversion="${GCCdist}.${GCCmajor}.${GCCminor}"; export GCCversion
- required="$1$2$3"
- actual="${GCCdist}${GCCmajor}${GCCminor}"
+*** util/TypeRules.c++.orig Wed Nov 27 08:20:45 1996
+--- util/TypeRules.c++ Sun Apr 20 23:43:42 1997
+***************
+*** 48,54 ****
+ }
+
+ static const char* typeNames[] =
+! { "ascii", "string", "address", "byte", "short", "long" };
+ static const char* opNames[] =
+ { "<any>", "=", "!=", "<", "<=", ">", ">=", "&", "^", "!" };
+ static const char* resultNames[] = { "tiff", "postscript", "error" };
+--- 48,54 ----
+ }
+
+ static const char* typeNames[] =
+! { "ascii", "asciiesc", "string", "address", "byte", "short", "long" };
+ static const char* opNames[] =
+ { "<any>", "=", "!=", "<", "<=", ">", ">=", "&", "^", "!" };
+ static const char* resultNames[] = { "tiff", "postscript", "error" };
+***************
+*** 65,71 ****
+ );
+ if (type == STRING)
+ printf(" \"%s\"", value.s);
+! else if (type != ASCII) {
+ if (op == ANY)
+ printf(" <any value>");
+ else
+--- 65,71 ----
+ );
+ if (type == STRING)
+ printf(" \"%s\"", value.s);
+! else if (type != ASCII && type != ASCIIESC) {
+ if (op == ANY)
+ printf(" <any value>");
+ else
+***************
+*** 83,88 ****
+--- 83,89 ----
+ const u_char* cp = (const u_char*) data;
+ switch (type) {
+ case ASCII:
++ {
+ u_int i;
+ for (i = 0; i < size; i++)
+ if (!isprint(cp[i]) && !isspace(cp[i])) {
+***************
+*** 92,97 ****
+--- 93,111 ----
+ }
+ ok = TRUE;
+ goto done;
++ }
++ case ASCIIESC:
++ {
++ u_int i;
++ for (i = 0; i < size; i++)
++ if (!isprint(cp[i]) && !isspace(cp[i]) && cp[i] != '\033') {
++ if (verbose)
++ printf("failed (unprintable char %#x)\n", cp[i]);
++ return (FALSE);
++ }
++ ok = TRUE;
++ goto done;
++ }
+ case STRING:
+ ok = (strncmp((const char*)(cp+off), value.s,
+ fxmin((u_int) strlen(value.s), (u_int)(size-off))) == 0);
+***************
+*** 307,312 ****
+--- 321,328 ----
+ rule.type = TypeRule::STRING;
+ else if (strncasecmp(tp, "ascii", cp-tp) == 0)
+ rule.type = TypeRule::ASCII;
++ else if (strncasecmp(tp, "asciiesc", cp-tp) == 0)
++ rule.type = TypeRule::ASCIIESC;
+ else if (strncasecmp(tp, "addr", cp-tp) == 0)
+ rule.type = TypeRule::ADDR;
+ else {
+***************
+*** 317,323 ****
+ cp++;
+ rule.op = TypeRule::EQ; // default is '='
+ const char* vp = cp;
+! if (rule.type != TypeRule::STRING && rule.type != TypeRule::ASCII) {
+ // numeric value
+ switch (*vp) {
+ case '=': rule.op = TypeRule::EQ; cp++; break;
+--- 333,340 ----
+ cp++;
+ rule.op = TypeRule::EQ; // default is '='
+ const char* vp = cp;
+! if (rule.type != TypeRule::STRING && rule.type != TypeRule::ASCII
+! && rule.type != TypeRule::ASCIIESC) {
+ // numeric value
+ switch (*vp) {
+ case '=': rule.op = TypeRule::EQ; cp++; break;
+*** util/TypeRules.h.orig Sun Apr 20 23:22:28 1997
+--- util/TypeRules.h Sun Apr 20 23:21:11 1997
+***************
+*** 130,135 ****
+--- 130,136 ----
+ fxBool cont; // continuation
+ enum {
+ ASCII, // ascii-only string
++ ASCIIESC, // ascii-only string + escape char (iso-2022 variants)
+ STRING, // byte string
+ ADDR, // address of match
+ BYTE, // 8 bits
+*** util/typerules.orig Sun Apr 20 23:22:49 1997
+--- util/typerules Sun Apr 20 23:24:45 1997
+***************
+*** 128,133 ****
+--- 128,138 ----
+ >15 string ascii ps %F/textfmt -B -f Courier-Bold\
+ -p 11 -s %s >%o <%i
+ #
++ # Japanization (should help other iso-2022 variants too)
++ #
++ #>15 string asciiesc ps a2ps-j -l '' -p -ns -nt <%i >%o
++ #0 asciiesc x ps a2ps-j -l '' -p -ns -nt <%i >%o
++ #
+ # This causes anything else with ascii-only data to be treated as text.
+ #
+ 0 ascii x ps %F/textfmt -B -f Courier-Bold\