From 69e25e0fdcb6c8c2d2dde6e44728813b6cdb7094 Mon Sep 17 00:00:00 2001 From: downsj Date: Thu, 19 Aug 1999 20:52:28 +0000 Subject: [PATCH] Update to 0.9. --- comms/efax/Makefile | 6 +- comms/efax/files/md5 | 6 +- comms/efax/patches/patch-aa | 36 +++++++-- comms/efax/patches/patch-ab | 89 +++++++++++----------- comms/efax/patches/patch-ac | 12 +-- comms/efax/patches/patch-ad | 147 ++++++++++++++++++------------------ 6 files changed, 162 insertions(+), 134 deletions(-) diff --git a/comms/efax/Makefile b/comms/efax/Makefile index eac7d464916..213ac17c4d2 100644 --- a/comms/efax/Makefile +++ b/comms/efax/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.3 1998/10/07 18:28:50 marc Exp $ +# $OpenBSD: Makefile,v 1.4 1999/08/19 20:52:28 downsj Exp $ -DISTNAME= efax08a -PKGNAME= efax-0.8a +DISTNAME= efax-0.9 +PKGNAME= efax-0.9 CATEGORIES= comm MAINTAINER= ian@OpenBSD.ORG diff --git a/comms/efax/files/md5 b/comms/efax/files/md5 index f37e807fa5a..8828b7c8559 100644 --- a/comms/efax/files/md5 +++ b/comms/efax/files/md5 @@ -1,3 +1,3 @@ -MD5 (efax08a.tar.gz) = d78d0ddf412af53dcc8e19b5a09496eb -RMD160 (efax08a.tar.gz) = 31b88362d72d977efac8b9633b198d869a0c122b -SHA1 (efax08a.tar.gz) = 22c4779ac84bf52c90971eacbb98c75c454f3652 +SHA1 (efax-0.9.tar.gz) = 8965407996737e6ec2c8a198ba34811f5134b5d1 +RMD160 (efax-0.9.tar.gz) = 471112ab87cfcf11521a5ea7c0cb203a44e958c3 +MD5 (efax-0.9.tar.gz) = 23bd3767f87c455c58ccae7f88bce725 diff --git a/comms/efax/patches/patch-aa b/comms/efax/patches/patch-aa index 6a6f37c5e50..23d8555709f 100644 --- a/comms/efax/patches/patch-aa +++ b/comms/efax/patches/patch-aa @@ -1,7 +1,19 @@ -*** Makefile.orig Sun Sep 15 12:30:13 1996 ---- Makefile Sat Sep 5 14:42:55 1998 +*** Makefile.orig Thu Mar 11 17:00:34 1999 +--- Makefile Thu Aug 19 13:44:03 1999 *************** -*** 17,24 **** +*** 3,22 **** + # Change the following to the name of your ANSI C compiler + # (normally gcc). + +! CC=gcc + + # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror + # is undefined + +! CFLAGS= + LDFLAGS= + + # Change the following to the destination directories for # binaries and man pages. Probably /usr/bin and /usr/man on # Linux, /usr/local/{bin,man} on other systems. @@ -10,7 +22,19 @@ .c.o: $(CC) $(CFLAGS) -c $< ---- 17,24 ---- +--- 3,22 ---- + # Change the following to the name of your ANSI C compiler + # (normally gcc). + +! CC=cc + + # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror + # is undefined + +! CFLAGS=-O2 + LDFLAGS= + + # Change the following to the destination directories for # binaries and man pages. Probably /usr/bin and /usr/man on # Linux, /usr/local/{bin,man} on other systems. @@ -20,7 +44,7 @@ .c.o: $(CC) $(CFLAGS) -c $< *************** -*** 27,33 **** +*** 25,31 **** efax: efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o $(CC) -o efax $(LDFLAGS) efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o @@ -28,4 +52,4 @@ efix: efix.o efaxlib.o efaxmsg.o $(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o ---- 27,32 ---- +--- 25,30 ---- diff --git a/comms/efax/patches/patch-ab b/comms/efax/patches/patch-ab index 1d15be3260b..9028e011a00 100644 --- a/comms/efax/patches/patch-ab +++ b/comms/efax/patches/patch-ab @@ -1,7 +1,7 @@ -*** efax.c.orig Sat Sep 5 14:33:25 1998 ---- efax.c Sat Sep 5 14:40:41 1998 +*** efax.c.orig Sat Mar 27 06:24:10 1999 +--- efax.c Thu Aug 19 13:33:41 1999 *************** -*** 565,571 **** +*** 606,612 **** if ( ckfmt ( header, 6 ) ) msg ( "W too many %%d escapes in header format string \"%s\"", header ) ; else @@ -9,7 +9,7 @@ msg ("I header:[%s]", headerbuf ) ; done = err = ttymode ( mf, SEND ) ; ---- 565,571 ---- +--- 606,612 ---- if ( ckfmt ( header, 6 ) ) msg ( "W too many %%d escapes in header format string \"%s\"", header ) ; else @@ -18,41 +18,42 @@ done = err = ttymode ( mf, SEND ) ; *************** -*** 1552,1558 **** - if ( done ) continue ; +*** 1658,1664 **** + err = rdpage ( inf, dp, &ppm, local, &changed ) ; - if ( changed ) { + if ( ! err && changed ) { ! sprintf ( buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d", local[0], local[1], local[2], local[3] ) ; ckcmd ( mf, 0, buf, TO_FT, OK ) ; - if ( gethsc ( &hsc, &err ) ) continue ; ---- 1552,1558 ---- - if ( done ) continue ; + if ( gethsc ( &hsc, &err ) ) { +--- 1658,1665 ---- + err = rdpage ( inf, dp, &ppm, local, &changed ) ; - if ( changed ) { -! snprintf ( buf, sizeof buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d", + if ( ! err && changed ) { +! snprintf ( buf, sizeof buf, +! c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d", local[0], local[1], local[2], local[3] ) ; ckcmd ( mf, 0, buf, TO_FT, OK ) ; - if ( gethsc ( &hsc, &err ) ) continue ; + if ( gethsc ( &hsc, &err ) ) { *************** -*** 1697,1703 **** +*** 1816,1822 **** int err=0, hsc=-1 ; - char c, dsbuf [ 128 ] ; + char c, dsbuf [ 128 ], *p ; ! sprintf ( dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ; msg ( "Idialing %s", dsbuf+1 ) ; c = cmd ( f, dsbuf, TO_A ) ; ---- 1697,1703 ---- +--- 1817,1823 ---- int err=0, hsc=-1 ; - char c, dsbuf [ 128 ] ; + char c, dsbuf [ 128 ], *p ; ! snprintf ( dsbuf, sizeof dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ; msg ( "Idialing %s", dsbuf+1 ) ; c = cmd ( f, dsbuf, TO_A ) ; *************** -*** 1820,1826 **** +*** 1944,1950 **** if ( ckfmt ( getty, 6 ) ) { err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ; } else { @@ -60,7 +61,7 @@ msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2exec failed:" ) ; ---- 1820,1826 ---- +--- 1945,1951 ---- if ( ckfmt ( getty, 6 ) ) { err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ; } else { @@ -69,7 +70,7 @@ execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2exec failed:" ) ; *************** -*** 1839,1845 **** +*** 1963,1969 **** char buf [ MAXGETTY ] ; if ( ckfmt ( vcmd, 6 ) ) { } else { @@ -77,7 +78,7 @@ msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2exec failed:" ) ; ---- 1839,1845 ---- +--- 1964,1970 ---- char buf [ MAXGETTY ] ; if ( ckfmt ( vcmd, 6 ) ) { } else { @@ -86,34 +87,36 @@ execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; err = msg ( "ES2exec failed:" ) ; *************** -*** 1894,1905 **** +*** 2090,2102 **** + } - ckcmd ( mf, &err, "+FCR=1", t, OK ) ; - -! sprintf ( buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : - "+FDCC=%d,%d,%d,%d,%d,%d,%d,%d", - c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; - ckcmd ( mf, 0, buf, -t, OK ) ; + if ( capsset ) { +! sprintf ( buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : + "+FDCC=%d,%d,%d,%d,%d,%d,%d,%d", + c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; + ckcmd ( mf, 0, buf, -t, OK ) ; + } ! sprintf ( buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" , CMDBUFSIZE-9, id ) ; ckcmd ( mf, 0, buf, -t, OK ) ; ---- 1894,1905 ---- +--- 2091,2103 ---- + } - ckcmd ( mf, &err, "+FCR=1", t, OK ) ; - -! snprintf ( buf, sizeof buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : - "+FDCC=%d,%d,%d,%d,%d,%d,%d,%d", - c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; - ckcmd ( mf, 0, buf, -t, OK ) ; + if ( capsset ) { +! snprintf ( buf, sizeof buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : + "+FDCC=%d,%d,%d,%d,%d,%d,%d,%d", + c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; + ckcmd ( mf, 0, buf, -t, OK ) ; + } ! snprintf ( buf, sizeof buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" , CMDBUFSIZE-9, id ) ; ckcmd ( mf, 0, buf, -t, OK ) ; *************** -*** 1907,1913 **** +*** 2104,2110 **** ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ; @@ -121,7 +124,7 @@ CMDBUFSIZE-9, id ) ; ckcmd ( mf, 0, buf, -t, OK ) ; ---- 1907,1913 ---- +--- 2105,2111 ---- ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ; @@ -130,7 +133,7 @@ ckcmd ( mf, 0, buf, -t, OK ) ; *************** -*** 1989,1995 **** +*** 2209,2215 **** msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ; if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) ) msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ; @@ -138,7 +141,7 @@ break ; case 'i': if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ; ---- 1989,1995 ---- +--- 2210,2216 ---- msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ; if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) ) msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ; @@ -147,19 +150,19 @@ case 'i': if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ; *************** -*** 2089,2095 **** +*** 2307,2313 **** char tmp [ MAXLINELEN ] ; now = time ( 0 ) ; strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ; ! sprintf ( header = headerbuf, tmp, localid ) ; } - sigf = &faxdev ; /* make global so can clean up on signal */ ---- 2089,2095 ---- + if ( ! err ) { +--- 2308,2314 ---- char tmp [ MAXLINELEN ] ; now = time ( 0 ) ; strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ; ! snprintf ( header = headerbuf, sizeof headerbuf, tmp, localid ) ; } - sigf = &faxdev ; /* make global so can clean up on signal */ + if ( ! err ) { diff --git a/comms/efax/patches/patch-ac b/comms/efax/patches/patch-ac index 92ea3209f3e..4587675f62e 100644 --- a/comms/efax/patches/patch-ac +++ b/comms/efax/patches/patch-ac @@ -1,19 +1,19 @@ -*** efaxio.c.orig Sat Sep 5 14:33:45 1998 ---- efaxio.c Sat Sep 5 14:42:17 1998 +*** efaxio.c.orig Mon Mar 1 22:15:44 1999 +--- efaxio.c Thu Aug 19 13:36:30 1999 *************** -*** 147,153 **** +*** 246,252 **** if ( strlen(s) >= CMDBUFSIZE-4 ) { msg ( "E modem command \"%s\" too long", s ) ; } else { ! sprintf ( buf, "AT%s\r", s ) ; - tputs ( f, buf, t ) ; + tput ( f, buf, strlen(buf) ) ; } } ---- 147,153 ---- +--- 246,252 ---- if ( strlen(s) >= CMDBUFSIZE-4 ) { msg ( "E modem command \"%s\" too long", s ) ; } else { ! snprintf ( buf, sizeof buf, "AT%s\r", s ) ; - tputs ( f, buf, t ) ; + tput ( f, buf, strlen(buf) ) ; } } diff --git a/comms/efax/patches/patch-ad b/comms/efax/patches/patch-ad index b58be734d74..d1d2fe0a774 100644 --- a/comms/efax/patches/patch-ad +++ b/comms/efax/patches/patch-ad @@ -1,73 +1,74 @@ ---- fax.orig Mon Aug 26 03:41:29 1996 -+++ fax Sat Sep 12 19:47:12 1998 -@@ -22,23 +22,23 @@ - # /dev/modem is a link to /dev/cua1, then getty, uucp, kermit, - # pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1. - --DEV=cua1 -+DEV=cua01 - - # The type of fax modem commands to use. Un-comment one of the - # following lines depending on your modem. - --# CLASS=1 --CLASS=2 -+CLASS=1 -+# CLASS=2 - # CLASS=2.0 - - # Your fax number in international format, 20 characters maximum. - # Use only digits, spaces, and the "+" character. - --FROM="+1 800 555 5555" -+FROM="" - - # Your name as it should appear on the page header. - --NAME="Put Your Name Here" -+NAME="" - - # The preferred page size for creating and printing faxes. - # Allowed values are "letter", "legal", and "a4". -@@ -50,8 +50,8 @@ - # The type of printer. Use 'pcl' for HP-PCL or 'ps' for - # Postscript. See definition of PRINT (below) for more options. - --PRTYPE=pcl # HP-PCL (e.g. HP LaserJet) --# PRTYPE=ps # Postscript (e.g. Apple LaserWriter) -+# PRTYPE=pcl # HP-PCL (e.g. HP LaserJet) -+PRTYPE=ps # Postscript (e.g. Apple LaserWriter) - - # The command to print image files from standard input. Typically - # this is "lpr" or "lp". -@@ -82,11 +82,12 @@ - # conventions. Protect with single quotes for delayed evaluation. - # Add a leading '#' to the file name to use HDB (ASCII) format. - --LOCK='-x /usr/spool/uucp/LCK..$DEV' # "normal" systems -+# LOCK='-x /usr/spool/uucp/LCK..$DEV' # "normal" systems - # LOCK='' # no lock file - # LOCK='-x /usr/spool/locks/LK.047.040.011' # SysV style names - # LOCK='-x #/usr/spool/uucp/LCK..$DEV' # HDB format (ASCII pid) - # LOCK='-x /usr/spool/uucp/LCK/LCK..$DEV' # NeXT -+LOCK="-x /var/spool/lock/LCK..$DEV" # OpenBSD cu et al - - # Uncomment one of the following lines to force xon/xoff flow - # control if you have one of the types of modems listed. -@@ -99,6 +100,16 @@ - # **************************************************************** - # The remaining options probably won't need to be changed. - # **************************************************************** -+ -+# Test what user did -+case "$NAME" in -+ "") echo "You have not configured $0 to set NAME=\"your name\"." -+ exit 1;; -+esac -+case "$FROM" in -+ "") echo "You have not configured $0 to set FROM=\"your faxnum\"." -+ exit 1;; -+esac - - # Configuration files that are sourced if they exist. Comment - # out if you don't need to use config files. Warning: any type of +*** fax.orig Wed Mar 24 00:07:28 1999 +--- fax Thu Aug 19 13:41:12 1999 +*************** +*** 28,43 **** + # /dev/modem is a link to /dev/cua1, then getty, uucp, kermit, + # pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1. + +! DEV=cua1 + + # Your fax number in international format, 20 characters maximum. + # Use only digits, spaces, and the "+" character. + +! FROM="+1 800 555 5555" + + # Your name as it should appear on the page header. + +! NAME="Put Your Name Here" + + # The preferred page size for creating and printing faxes. + # Allowed values are "letter", "legal", and "a4". +--- 28,43 ---- + # /dev/modem is a link to /dev/cua1, then getty, uucp, kermit, + # pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1. + +! DEV=cua01 + + # Your fax number in international format, 20 characters maximum. + # Use only digits, spaces, and the "+" character. + +! FROM="" + + # Your name as it should appear on the page header. + +! NAME="" + + # The preferred page size for creating and printing faxes. + # Allowed values are "letter", "legal", and "a4". +*************** +*** 81,87 **** + # conventions. Protect with single quotes for delayed evaluation. + # Add a leading '#' to the file name to use binary format. + +! LOCK='-x /var/lock/LCK..$DEV' # modern systems + # LOCK='-x /usr/spool/uucp/LCK..$DEV' # older systems + # LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both + # LOCK='-x #/usr/spool/uucp/LCK..$DEV' # binary format +--- 81,88 ---- + # conventions. Protect with single quotes for delayed evaluation. + # Add a leading '#' to the file name to use binary format. + +! LOCK="-x /var/spool/lock/LCK..$DEV" # OpenBSD cu et al +! # LOCK='-x /var/lock/LCK..$DEV' # modern systems + # LOCK='-x /usr/spool/uucp/LCK..$DEV' # older systems + # LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both + # LOCK='-x #/usr/spool/uucp/LCK..$DEV' # binary format +*************** +*** 100,105 **** +--- 101,116 ---- + # **************************************************************** + # The remaining options probably won't need to be changed. + # **************************************************************** ++ ++ # Test what user did ++ case "$NAME" in ++ "") echo "You have not configured $0 to set NAME=\"your name\"." ++ exit 1;; ++ esac ++ case "$FROM" in ++ "") echo "You have not configured $0 to set FROM=\"your faxnum\"." ++ exit 1;; ++ esac + + # Configuration files that are sourced if they exist. Comment + # out if you don't need to use config files. Warning: any type of