Update to 0.9.

This commit is contained in:
downsj 1999-08-19 20:52:28 +00:00
parent 42ad8af2d5
commit 69e25e0fdc
6 changed files with 162 additions and 134 deletions

View File

@ -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 DISTNAME= efax-0.9
PKGNAME= efax-0.8a PKGNAME= efax-0.9
CATEGORIES= comm CATEGORIES= comm
MAINTAINER= ian@OpenBSD.ORG MAINTAINER= ian@OpenBSD.ORG

View File

@ -1,3 +1,3 @@
MD5 (efax08a.tar.gz) = d78d0ddf412af53dcc8e19b5a09496eb SHA1 (efax-0.9.tar.gz) = 8965407996737e6ec2c8a198ba34811f5134b5d1
RMD160 (efax08a.tar.gz) = 31b88362d72d977efac8b9633b198d869a0c122b RMD160 (efax-0.9.tar.gz) = 471112ab87cfcf11521a5ea7c0cb203a44e958c3
SHA1 (efax08a.tar.gz) = 22c4779ac84bf52c90971eacbb98c75c454f3652 MD5 (efax-0.9.tar.gz) = 23bd3767f87c455c58ccae7f88bce725

View File

@ -1,7 +1,19 @@
*** Makefile.orig Sun Sep 15 12:30:13 1996 *** Makefile.orig Thu Mar 11 17:00:34 1999
--- Makefile Sat Sep 5 14:42:55 1998 --- 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 # binaries and man pages. Probably /usr/bin and /usr/man on
# Linux, /usr/local/{bin,man} on other systems. # Linux, /usr/local/{bin,man} on other systems.
@ -10,7 +22,19 @@
.c.o: .c.o:
$(CC) $(CFLAGS) -c $< $(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 # binaries and man pages. Probably /usr/bin and /usr/man on
# Linux, /usr/local/{bin,man} on other systems. # Linux, /usr/local/{bin,man} on other systems.
@ -20,7 +44,7 @@
.c.o: .c.o:
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
*************** ***************
*** 27,33 **** *** 25,31 ****
efax: efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o 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 $(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 efix: efix.o efaxlib.o efaxmsg.o
$(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o $(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o
--- 27,32 ---- --- 25,30 ----

View File

@ -1,7 +1,7 @@
*** efax.c.orig Sat Sep 5 14:33:25 1998 *** efax.c.orig Sat Mar 27 06:24:10 1999
--- efax.c Sat Sep 5 14:40:41 1998 --- efax.c Thu Aug 19 13:33:41 1999
*************** ***************
*** 565,571 **** *** 606,612 ****
if ( ckfmt ( header, 6 ) ) if ( ckfmt ( header, 6 ) )
msg ( "W too many %%d escapes in header format string \"%s\"", header ) ; msg ( "W too many %%d escapes in header format string \"%s\"", header ) ;
else else
@ -9,7 +9,7 @@
msg ("I header:[%s]", headerbuf ) ; msg ("I header:[%s]", headerbuf ) ;
done = err = ttymode ( mf, SEND ) ; done = err = ttymode ( mf, SEND ) ;
--- 565,571 ---- --- 606,612 ----
if ( ckfmt ( header, 6 ) ) if ( ckfmt ( header, 6 ) )
msg ( "W too many %%d escapes in header format string \"%s\"", header ) ; msg ( "W too many %%d escapes in header format string \"%s\"", header ) ;
else else
@ -18,41 +18,42 @@
done = err = ttymode ( mf, SEND ) ; done = err = ttymode ( mf, SEND ) ;
*************** ***************
*** 1552,1558 **** *** 1658,1664 ****
if ( done ) continue ; 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", ! sprintf ( buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d",
local[0], local[1], local[2], local[3] ) ; local[0], local[1], local[2], local[3] ) ;
ckcmd ( mf, 0, buf, TO_FT, OK ) ; ckcmd ( mf, 0, buf, TO_FT, OK ) ;
if ( gethsc ( &hsc, &err ) ) continue ; if ( gethsc ( &hsc, &err ) ) {
--- 1552,1558 ---- --- 1658,1665 ----
if ( done ) continue ; err = rdpage ( inf, dp, &ppm, local, &changed ) ;
if ( changed ) { if ( ! err && changed ) {
! snprintf ( buf, sizeof buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d", ! snprintf ( buf, sizeof buf,
! c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d",
local[0], local[1], local[2], local[3] ) ; local[0], local[1], local[2], local[3] ) ;
ckcmd ( mf, 0, buf, TO_FT, OK ) ; 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 ; int err=0, hsc=-1 ;
char c, dsbuf [ 128 ] ; char c, dsbuf [ 128 ], *p ;
! sprintf ( dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ; ! sprintf ( dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ;
msg ( "Idialing %s", dsbuf+1 ) ; msg ( "Idialing %s", dsbuf+1 ) ;
c = cmd ( f, dsbuf, TO_A ) ; c = cmd ( f, dsbuf, TO_A ) ;
--- 1697,1703 ---- --- 1817,1823 ----
int err=0, hsc=-1 ; int err=0, hsc=-1 ;
char c, dsbuf [ 128 ] ; char c, dsbuf [ 128 ], *p ;
! snprintf ( dsbuf, sizeof dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ; ! snprintf ( dsbuf, sizeof dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ;
msg ( "Idialing %s", dsbuf+1 ) ; msg ( "Idialing %s", dsbuf+1 ) ;
c = cmd ( f, dsbuf, TO_A ) ; c = cmd ( f, dsbuf, TO_A ) ;
*************** ***************
*** 1820,1826 **** *** 1944,1950 ****
if ( ckfmt ( getty, 6 ) ) { if ( ckfmt ( getty, 6 ) ) {
err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ; err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ;
} else { } else {
@ -60,7 +61,7 @@
msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ; msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ;
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
err = msg ( "ES2exec failed:" ) ; err = msg ( "ES2exec failed:" ) ;
--- 1820,1826 ---- --- 1945,1951 ----
if ( ckfmt ( getty, 6 ) ) { if ( ckfmt ( getty, 6 ) ) {
err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ; err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ;
} else { } else {
@ -69,7 +70,7 @@
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
err = msg ( "ES2exec failed:" ) ; err = msg ( "ES2exec failed:" ) ;
*************** ***************
*** 1839,1845 **** *** 1963,1969 ****
char buf [ MAXGETTY ] ; char buf [ MAXGETTY ] ;
if ( ckfmt ( vcmd, 6 ) ) { if ( ckfmt ( vcmd, 6 ) ) {
} else { } else {
@ -77,7 +78,7 @@
msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ; msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ;
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
err = msg ( "ES2exec failed:" ) ; err = msg ( "ES2exec failed:" ) ;
--- 1839,1845 ---- --- 1964,1970 ----
char buf [ MAXGETTY ] ; char buf [ MAXGETTY ] ;
if ( ckfmt ( vcmd, 6 ) ) { if ( ckfmt ( vcmd, 6 ) ) {
} else { } else {
@ -86,34 +87,36 @@
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ; execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
err = msg ( "ES2exec failed:" ) ; err = msg ( "ES2exec failed:" ) ;
*************** ***************
*** 1894,1905 **** *** 2090,2102 ****
}
ckcmd ( mf, &err, "+FCR=1", t, OK ) ; if ( capsset ) {
! sprintf ( buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" :
! sprintf ( buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : "+FDCC=%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] ) ;
c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; ckcmd ( mf, 0, buf, -t, OK ) ;
ckcmd ( mf, 0, buf, -t, OK ) ; }
! sprintf ( buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" , ! sprintf ( buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" ,
CMDBUFSIZE-9, id ) ; CMDBUFSIZE-9, id ) ;
ckcmd ( mf, 0, buf, -t, OK ) ; ckcmd ( mf, 0, buf, -t, OK ) ;
--- 1894,1905 ---- --- 2091,2103 ----
}
ckcmd ( mf, &err, "+FCR=1", t, OK ) ; if ( capsset ) {
! snprintf ( buf, sizeof buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" :
! snprintf ( buf, sizeof buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" : "+FDCC=%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] ) ;
c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ; ckcmd ( mf, 0, buf, -t, OK ) ;
ckcmd ( mf, 0, buf, -t, OK ) ; }
! snprintf ( buf, sizeof buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" , ! snprintf ( buf, sizeof buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" ,
CMDBUFSIZE-9, id ) ; CMDBUFSIZE-9, id ) ;
ckcmd ( mf, 0, buf, -t, OK ) ; ckcmd ( mf, 0, buf, -t, OK ) ;
*************** ***************
*** 1907,1913 **** *** 2104,2110 ****
ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ; ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ;
@ -121,7 +124,7 @@
CMDBUFSIZE-9, id ) ; CMDBUFSIZE-9, id ) ;
ckcmd ( mf, 0, buf, -t, OK ) ; ckcmd ( mf, 0, buf, -t, OK ) ;
--- 1907,1913 ---- --- 2105,2111 ----
ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ; ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ;
@ -130,7 +133,7 @@
ckcmd ( mf, 0, buf, -t, OK ) ; ckcmd ( mf, 0, buf, -t, OK ) ;
*************** ***************
*** 1989,1995 **** *** 2209,2215 ****
msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ; msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ;
if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) ) if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) )
msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ; msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ;
@ -138,7 +141,7 @@
break ; break ;
case 'i': case 'i':
if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ; if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ;
--- 1989,1995 ---- --- 2210,2216 ----
msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ; msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ;
if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) ) if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) )
msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ; msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ;
@ -147,19 +150,19 @@
case 'i': case 'i':
if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ; if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ;
*************** ***************
*** 2089,2095 **** *** 2307,2313 ****
char tmp [ MAXLINELEN ] ; char tmp [ MAXLINELEN ] ;
now = time ( 0 ) ; now = time ( 0 ) ;
strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ; strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ;
! sprintf ( header = headerbuf, tmp, localid ) ; ! sprintf ( header = headerbuf, tmp, localid ) ;
} }
sigf = &faxdev ; /* make global so can clean up on signal */ if ( ! err ) {
--- 2089,2095 ---- --- 2308,2314 ----
char tmp [ MAXLINELEN ] ; char tmp [ MAXLINELEN ] ;
now = time ( 0 ) ; now = time ( 0 ) ;
strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ; strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ;
! snprintf ( header = headerbuf, sizeof headerbuf, tmp, localid ) ; ! snprintf ( header = headerbuf, sizeof headerbuf, tmp, localid ) ;
} }
sigf = &faxdev ; /* make global so can clean up on signal */ if ( ! err ) {

View File

@ -1,19 +1,19 @@
*** efaxio.c.orig Sat Sep 5 14:33:45 1998 *** efaxio.c.orig Mon Mar 1 22:15:44 1999
--- efaxio.c Sat Sep 5 14:42:17 1998 --- efaxio.c Thu Aug 19 13:36:30 1999
*************** ***************
*** 147,153 **** *** 246,252 ****
if ( strlen(s) >= CMDBUFSIZE-4 ) { if ( strlen(s) >= CMDBUFSIZE-4 ) {
msg ( "E modem command \"%s\" too long", s ) ; msg ( "E modem command \"%s\" too long", s ) ;
} else { } else {
! sprintf ( buf, "AT%s\r", s ) ; ! sprintf ( buf, "AT%s\r", s ) ;
tputs ( f, buf, t ) ; tput ( f, buf, strlen(buf) ) ;
} }
} }
--- 147,153 ---- --- 246,252 ----
if ( strlen(s) >= CMDBUFSIZE-4 ) { if ( strlen(s) >= CMDBUFSIZE-4 ) {
msg ( "E modem command \"%s\" too long", s ) ; msg ( "E modem command \"%s\" too long", s ) ;
} else { } else {
! snprintf ( buf, sizeof buf, "AT%s\r", s ) ; ! snprintf ( buf, sizeof buf, "AT%s\r", s ) ;
tputs ( f, buf, t ) ; tput ( f, buf, strlen(buf) ) ;
} }
} }

View File

@ -1,73 +1,74 @@
--- fax.orig Mon Aug 26 03:41:29 1996 *** fax.orig Wed Mar 24 00:07:28 1999
+++ fax Sat Sep 12 19:47:12 1998 --- fax Thu Aug 19 13:41:12 1999
@@ -22,23 +22,23 @@ ***************
# /dev/modem is a link to /dev/cua1, then getty, uucp, kermit, *** 28,43 ****
# pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1. # /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 ! DEV=cua1
# The type of fax modem commands to use. Un-comment one of the # Your fax number in international format, 20 characters maximum.
# following lines depending on your modem. # Use only digits, spaces, and the "+" character.
-# CLASS=1 ! FROM="+1 800 555 5555"
-CLASS=2
+CLASS=1 # Your name as it should appear on the page header.
+# CLASS=2
# CLASS=2.0 ! NAME="Put Your Name Here"
# Your fax number in international format, 20 characters maximum. # The preferred page size for creating and printing faxes.
# Use only digits, spaces, and the "+" character. # Allowed values are "letter", "legal", and "a4".
--- 28,43 ----
-FROM="+1 800 555 5555" # /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
+FROM="" # pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
# Your name as it should appear on the page header. ! DEV=cua01
-NAME="Put Your Name Here" # Your fax number in international format, 20 characters maximum.
+NAME="" # Use only digits, spaces, and the "+" character.
# The preferred page size for creating and printing faxes. ! FROM=""
# Allowed values are "letter", "legal", and "a4".
@@ -50,8 +50,8 @@ # Your name as it should appear on the page header.
# The type of printer. Use 'pcl' for HP-PCL or 'ps' for
# Postscript. See definition of PRINT (below) for more options. ! NAME=""
-PRTYPE=pcl # HP-PCL (e.g. HP LaserJet) # The preferred page size for creating and printing faxes.
-# PRTYPE=ps # Postscript (e.g. Apple LaserWriter) # Allowed values are "letter", "legal", and "a4".
+# PRTYPE=pcl # HP-PCL (e.g. HP LaserJet) ***************
+PRTYPE=ps # Postscript (e.g. Apple LaserWriter) *** 81,87 ****
# conventions. Protect with single quotes for delayed evaluation.
# The command to print image files from standard input. Typically # Add a leading '#' to the file name to use binary format.
# this is "lpr" or "lp".
@@ -82,11 +82,12 @@ ! LOCK='-x /var/lock/LCK..$DEV' # modern systems
# conventions. Protect with single quotes for delayed evaluation. # LOCK='-x /usr/spool/uucp/LCK..$DEV' # older systems
# Add a leading '#' to the file name to use HDB (ASCII) format. # LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both
# LOCK='-x #/usr/spool/uucp/LCK..$DEV' # binary format
-LOCK='-x /usr/spool/uucp/LCK..$DEV' # "normal" systems --- 81,88 ----
+# LOCK='-x /usr/spool/uucp/LCK..$DEV' # "normal" systems # conventions. Protect with single quotes for delayed evaluation.
# LOCK='' # no lock file # Add a leading '#' to the file name to use binary format.
# 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 /var/spool/lock/LCK..$DEV" # OpenBSD cu et al
# LOCK='-x /usr/spool/uucp/LCK/LCK..$DEV' # NeXT ! # LOCK='-x /var/lock/LCK..$DEV' # modern systems
+LOCK="-x /var/spool/lock/LCK..$DEV" # OpenBSD cu et al # LOCK='-x /usr/spool/uucp/LCK..$DEV' # older systems
# LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both
# Uncomment one of the following lines to force xon/xoff flow # LOCK='-x #/usr/spool/uucp/LCK..$DEV' # binary format
# control if you have one of the types of modems listed. ***************
@@ -99,6 +100,16 @@ *** 100,105 ****
# **************************************************************** --- 101,116 ----
# The remaining options probably won't need to be changed. # ****************************************************************
# **************************************************************** # The remaining options probably won't need to be changed.
+ # ****************************************************************
+# Test what user did +
+case "$NAME" in + # Test what user did
+ "") echo "You have not configured $0 to set NAME=\"your name\"." + case "$NAME" in
+ exit 1;; + "") echo "You have not configured $0 to set NAME=\"your name\"."
+esac + exit 1;;
+case "$FROM" in + esac
+ "") echo "You have not configured $0 to set FROM=\"your faxnum\"." + case "$FROM" in
+ exit 1;; + "") echo "You have not configured $0 to set FROM=\"your faxnum\"."
+esac + 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 # Configuration files that are sourced if they exist. Comment
# out if you don't need to use config files. Warning: any type of