diff options
Diffstat (limited to 'comms/hylafax/patches/patch-ap')
-rw-r--r-- | comms/hylafax/patches/patch-ap | 104 |
1 files changed, 82 insertions, 22 deletions
diff --git a/comms/hylafax/patches/patch-ap b/comms/hylafax/patches/patch-ap index fe16c605e38..c1db832b070 100644 --- a/comms/hylafax/patches/patch-ap +++ b/comms/hylafax/patches/patch-ap @@ -1,24 +1,84 @@ -$NetBSD: patch-ap,v 1.2 1999/08/30 08:16:51 rh Exp $ +$NetBSD: patch-ap,v 1.3 2000/08/29 17:08:38 abs Exp $ ---- etc/Makefile.in.orig Thu Aug 5 13:11:42 1999 -+++ etc/Makefile.in Mon Aug 30 08:53:10 1999 -@@ -78,14 +78,15 @@ - -src ${SRCDIR}/faxsetup.$$i -O faxsetup.$$i; \ - done - ${PUTSERVER} -F ${SBIN} -m 755 -src probemodem.sh -O probemodem -- ${PUTSAMPLE} -F ${SPOOL}/etc -m 644 -o xferfaxlog -- ${PUTSAMPLE} -F ${SPOOL}/etc -m 600 -o hosts.hfaxd -+ -${MKDIR} -m 755 ${PREFIX}/etc/hylafax -+ ${PUTSAMPLE} -F ${PREFIX}/etc/hylafax -m 644 -o xferfaxlog -+ ${PUTSAMPLE} -F ${PREFIX}/etc/hylafax -m 600 -o hosts.hfaxd - for i in ${DIALRULES}; do \ -- ${PUTSERVER} -F ${SPOOL}/etc -m 444 -src ${SRCDIR}/$$i \ -+ ${PUTSERVER} -F ${PREFIX}/etc/hylafax -m 444 -src ${SRCDIR}/$$i \ - -idb "config(update)" -O $$i; \ - done - ${PUTSERVER} -F ${LIBEXEC} -m 755 -O lockname ondelay -- ${PUTSAMPLE} -F ${SPOOL}/etc -m 644 -idb nostrip \ -+ ${PUTSAMPLE} -F ${PREFIX}/etc/hylafax -m 644 -idb nostrip \ - -src ${SRCDIR}/lutRS18.pcf -O lutRS18.pcf +--- util/TypeRules.c++.orig Sun Jun 13 08:41:26 1999 ++++ util/TypeRules.c++ +@@ -36,6 +36,14 @@ + #include <netinet/in.h> + } - # ++#ifndef TRUE ++#define TRUE 1 ++#endif ++ ++#ifndef FALSE ++#define FALSE 0 ++#endif ++ + TypeRule::TypeRule() {} + TypeRule::~TypeRule() {} + TypeRule::TypeRule(const TypeRule& other) +@@ -51,7 +59,7 @@ + } + + static const char* typeNames[] = +- { "ascii", "string", "address", "byte", "short", "long" }; ++ { "ascii", "asciiesc", "string", "address", "byte", "short", "long" }; + static const char* opNames[] = + { "<any>", "=", "!=", "<", "<=", ">", ">=", "&", "^", "!" }; + static const char* resultNames[] = { "tiff", "postscript", "error" }; +@@ -68,7 +76,7 @@ + ); + if (type == STRING) + printf(" \"%s\"", value.s); +- else if (type != ASCII) { ++ else if (type != ASCII && type != ASCIIESC) { + if (op == ANY) + printf(" <any value>"); + else +@@ -86,6 +94,7 @@ + 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])) { +@@ -95,6 +104,19 @@ + } + 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); +@@ -311,6 +333,8 @@ + 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 { +@@ -321,7 +345,8 @@ + cp++; + rule.op = TypeRule::EQ; // default is '=' + const char* vp = cp; +- if (rule.type != TypeRule::STRING && rule.type != TypeRule::ASCII) { ++ if (rule.type != TypeRule::STRING && rule.type != TypeRule::ASCII ++ && rule.type != TypeRule::ASCIIESC) { + // numeric value + switch (*vp) { + case '=': rule.op = TypeRule::EQ; cp++; break; |