#! /bin/sh # patch script for converting a36 to a41 TOP=. Patch() { echo "Patch $1:"; patch -s $TOP/$1 } NewFile() { echo "New file $1"; cat >$TOP/$1 } NewDir() { echo "New directory $1"; mkdir $TOP/$1 } RmFile() { echo "Remove $1"; rm -f $TOP/$1.orig; mv $TOP/$1 $TOP/$1.orig } Patch CHANGES-v2.2<<'EOF-EOF-EOF' 1c1 < $Header: /usr/people/sam/fax/RCS/CHANGES-v2.2,v 1.8 93/07/27 16:00:53 sam Exp $ --- > $Header: /usr/people/sam/fax/RCS/CHANGES-v2.2,v 1.9 93/08/16 08:05:35 sam Exp $ 15a16,17 > o most missing function declarations are automatically recognized and > handled by the configure script EOF-EOF-EOF Patch README<<'EOF-EOF-EOF' 1c1 < $Header: /usr/people/sam/fax/RCS/README,v 1.61 93/07/29 17:40:22 sam Exp $ --- > $Header: /usr/people/sam/fax/RCS/README,v 1.63 93/08/15 18:45:33 sam Exp $ 54,55c54 < be built from the GNU sources and the files in the gs and libtiff < directories. --- > be built from the GNU sources. 247,250c246,249 < for use by the facsimile server. I have successfully used Ghostscript < 2.5.2 with the fax server. Version 2.6 should also work; though < 2.6.1 is known to a bug in the clipping code that is fixed by a later < patch (apply the official patches 1-4). --- > for use by the facsimile server. Version 2.6.1 is known work, though > you should be certain to apply patches 1-4. If you do not apply the > patches you will run into a bug in the clipping code that is tickled > by the faxcover program. 368c367 < Building Ghostscript 2.5.2 with the TIFF Driver --- > Building Ghostscript 2.6.x with the TIFF Driver 371,377c370,373 < build a version of Ghostscript that includes the TIFF driver provided in < the gs directory. To do this you need to copy the appropriate source < files into your gs directory, configure Ghostscript to include the < "tiffg3" driver, and then build a new binary that includes the driver. < The file gs/Makefile.sgi is a Makefile for building Ghostscript 2.5.2 < on a Silicon Graphics machine with the TIFF driver. If you are on an < SGI machine, you can just do the following: --- > build a version of Ghostscript that includes the tiffg3 driver provided > with Ghostscript. (Actually, you may find that gs/gdevtiff.c is a newer > version of this driver. If so, you should be able to just replace the > distributed gdevtiff.c with the newer one in the gs directory.) 379,382c375,382 < % GS= < % cp gs/Makefile.sgi gs/gdevtiff.c libtiff/tiff.h $GS < % cd $GS < % make --- > To setup Ghostscript you need to create a Makefile (follow the > Ghostscript documentation), add "tiffg3.dev" to the list of configured > devices, and then build a new binary that includes the driver. Don't > forget to install Ghostscript and it's associated materials. Beware > that on machines with dynamic shared libraries (e.g. SunOS), if you > link ghostscript with the X11 device driver and use shared X11 > libraries that are not in a standard location, then you may need to > augment the util/ps2fax.gs.sh script with something of the form: 384,405d383 < Otherwise you will need to construct a makefile from the Ghostscript < .mak pieces and configure the TIFF driver. For example, < < % cp gs/devs.mak gs/gdevtiff.c libtiff/tiff.h $GS < % cd $GS < % sh tar_cat < % cp unix-ansi.mak Makefile < < % make < < Ghostscript 2.6 comes with the TIFF driver included in the distribution. < Note however that version 2.6.1 has at least one bug that is visible < when used with the fax software; look for the official patch files for < the sources in the directory that you obtain the distribution. < < Don't forget to install Ghostscript and it's associated materials. < < Beware that on machines with dynamic shared libraries (e.g. SunOS), < if you link ghostscript with the X11 device driver and use shared < X11 libraries that are not in a standard location, then you may need < to augment the util/ps2fax.gs.sh script with something of the form: < 416c394 < % zcat /v2.1.src.tar.Z | tar xf - --- > % zcat /v2.2.src.tar.Z | tar xf - 440c418 < % tar xf /v2.1.inst.tar --- > % tar xf /v2.2.inst.tar 452c430 < % tar xf ../v2.1.inst.tar --- > % tar xf ../v2.2.inst.tar 845c823 < page. faxd tracing information is controlled by two con figuration --- > page. faxd tracing information is controlled by two configuration 897a876,885 > Contributed Software > -------------------- > You should be able to find contributions from FlexFAX users in the > contrib subdirectory of the public ftp area where you found this > software (or look in sgi/fax/contrib on the host sgi.com). New > contributions are welcome, so long as their author's identity is > clearly marked (so that folks don't ask me questions about stuff > that I know nothing). > > 1035,1040c1023,1025 < Ghostscript version 2.5.2 or later can be used to do the PostScript < imaging needed by the server when built with the TIFF facsimile device < driver in the gs directory (or supplied in the distribution in versions < 2.6 and later). Ghostscript and its fonts can be found at many public < ftp sites around the Internet. One good location for obtaining the < 2.6 version is ftp.cs.wisc.edu:/pub/X/ghostscript*2.6*. --- > Ghostscript and its fonts can be found at many public ftp sites around > the Internet. One good location for obtaining the 2.6 version is > ftp.cs.wisc.edu:/pub/X/ghostscript*2.6*. EOF-EOF-EOF Patch configure<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/RCS/configure,v 1.74 93/07/29 11:14:04 sam Exp $ --- > # $Header: /usr/people/sam/fax/RCS/configure,v 1.80 93/08/16 08:05:17 sam Exp $ 47,48c47 < (for i < do --- > (for i do 96a96 > @HP-UX) TARGET=hpux;; 155a156,159 > hpux|hpux-gcc) > TARGET=hpux COMPILER=gcc > warnUnfinished $TARGET > ;; 340,341c344 < for i < do --- > for i do 355,387d357 < sgi-cc) < # < # Patch C++ options to remove -v2 option that forces < # the CC frontend to use the old 2.1 compiler. < # < VERS=`versions 'c++.sw' | \ < grep 'c++' | sed -e 's/.*C++,[ ]*//;q'` < case "$VERS" in < 3.0|2.*) < ;; < *) VERS=`versions 'maint_c++.c++_sw' | \ < grep 'c++' | sed -e 's/.*C++,[ ]*//;q'` < ;; < esac < if [ -z "$VERS" ]; then < VERS="2.1" < fi < case "$VERS" in < 3.0) < echo "You look to have a $VERS C++ compiler; using" < echo "the -v2 option to get the 2.1 version compiler." < ;; < 2.*) < echo "You've got a $VERS compiler; removing the -v2" < echo "option used with the 3.0 compiler system." < editFile defs '/^GC++OPTS=/s/[ ]*-v2//' < ;; < *) < echo "I can't figure out what version of the compiler you have!" < exit 1 < ;; < esac < ;; 395,398c365,368 < # supported and modify defs accordingly. This whole part < # of the configuration process needs lots of work. At the < # very least, it should be done dynamically rather than < # according to the target system. --- > # supported. We craft a port.h file that has external > # declarations for missing routines that are required by > # the system and modify defs to reflect which optional > # interfaces are supported. 399a370,386 > > # > # Look for a function in one of the standard libraries. > # > CheckFunc() > { > echo "extern int $1(); main(){$1();exit(0);}" >t.c > (echo DEPTH=.; cat defs; echo 't:; ${CCF} t.c') | \ > make -f - t 2>&1 >/dev/null && > echo "Configuring use of $1()." > return > } > > $RM port.h a.out t.c t.c++ > HasFchown= ; CheckFunc fchown && HasFchown="yes" > HasFchmod= ; CheckFunc fchmod && HasFchmod="yes" > 401,406c388,393 < case $TARGET in < sco*) sysopts="-DSYS_FCHOWN=0 -DSYS_FCHMOD=0";; < *) sysopts="-DSYS_FCHOWN=1 -DSYS_FCHMOD=1";; < esac < echo "Patching defs to reflect system support." < editFile defs "/^GC++DEFS=/s/\$/ $sysopts/" "/^GCDEFS=/s/\$/ $sysopts/" --- > test "$HasFchmod" && sysopts="$sysopts -DHAS_FCHMOD=1" > test "$HasFchown" && sysopts="$sysopts -DHAS_FCHOWN=1" > if [ "$sysopts" ]; then > echo "Patching defs to reflect system support." > editFile defs "/^GC++DEFS=/s/\$/ $sysopts/" "/^GCDEFS=/s/\$/ $sysopts/" > fi 408a396,482 > # Look for a function declaration in system include files. > # > CheckDecl() > { > f=$1; shift > (for i do > echo "#include \"$i\"" > done)>t.c++ > (echo DEPTH=.; cat defs; echo 't:; ${C++F} ${C++FILE} -E t.c++') |\ > make -f - t 2>&1 |\ > grep "$f[ ]*(.*)" >/dev/null > return > } > > # > # Look for a #define in system include files. > # > CheckDefine() > { > def=$1; shift > (for i do > echo "#include \"$i\"" > done > for i in "#ifdef $def" "FOUND $def" "#endif"; do > echo "$i" > done > )>t.c > (echo DEPTH=.; cat defs; echo 't:; ${CCF} -E t.c') |\ > make -f - t 2>&1 |\ > grep "FOUND[ ]*$def" >/dev/null > return > } > > echo "Creating port.h with missing function declarations." > (cat<<'EOF' > /* warning, this file was automatically created by the configure script */ > #ifdef __cplusplus > extern "C" { > #endif > EOF > CheckDecl mkstemp stdio.h || echo 'extern int mkstemp(char *);' > CheckDecl strerror string.h || echo 'extern char* strerror(int);' > CheckDecl strncasecmp string.h || > echo 'extern int strncasecmp(const char*, const char*, size_t);' > CheckDecl waitpid sys/wait.h || echo 'extern pid_t waitpid(pid_t, int *, int);' > CheckDefine howmany sys/types.h || { > echo '#ifndef howmany' > echo '#define howmany(x, y) (((x)+((y)-1))/(y))' > echo '#endif' > } > CheckDecl close unistd.h || echo 'extern int close(int);' > CheckDecl seteuid unistd.h || echo 'extern int seteuid(uid_t);' > CheckDecl setegid unistd.h || echo 'extern int setegid(gid_t);' > if [ "$HasFchown" ]; then > CheckDecl fchown unistd.h || echo 'extern int fchown(int, uid_t, int);' > fi > CheckDecl gethostname osfcn.h || echo 'extern int gethostname(char*, int);' > CheckDecl malloc stdlib.h || echo 'extern void* malloc(size_t);' > CheckDecl realloc stdlib.h || echo 'extern void* realloc(void*, size_t);' > CheckDecl free stdlib.h || echo 'extern void free(void*);' > CheckDecl strtoul stdlib.h || > echo 'extern unsigned long strtoul(const char*, char**, int);' > CheckDecl getopt stdlib.h || { > echo 'extern char* optarg;' > echo 'extern int opterr, optind, optopt;' > echo 'extern int getopt(int, char **, char *);' > } > CheckDecl syslog syslog.h || echo 'extern void syslog(int, const char*, ...);' > CheckDecl vsyslog syslog.h || { > echo '#include ' > echo 'extern void vsyslog(int, const char*, va_list);' > } > CheckDecl closelog syslog.h || echo 'extern void closelog(void);' > CheckDecl openlog syslog.h || echo 'extern void openlog(const char*, int, int);' > if [ "$HasFchmod" ]; then > CheckDecl fchmod unistd.h libc.h osfcn.h || > echo 'extern int fchmod(int, int);' > fi > cat<<'EOF' > #ifdef __cplusplus > } > #endif > EOF > )>port.h; chmod 444 port.h > $RM a.out t.c t.c++ > > # 532c606 < y=`sed -e '/^#/d' $1 | grep -i "$x" | sed -e 's/ .*//;q` --- > y=`sed -e '/^#/d' $1 | grep -i "$x" | sed -e 's/ .*//;q'` EOF-EOF-EOF Patch distrules<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/RCS/distrules,v 1.69 93/08/01 11:30:40 sam Exp $ --- > # $Header: /usr/people/sam/fax/RCS/distrules,v 1.73 93/08/16 08:05:04 sam Exp $ 43d42 < port/sun/sys/types.h \ 55d53 < port/sgi/getopt.h \ 57d54 < port/sgi/sys/types.h \ 68d64 < port/bsdi/malloc.h \ 101a98 > port/freebsd/signal.h \ 126d122 < port/4.4bsd/malloc.h \ 138d133 < port/linux/sys/types.h \ 142d136 < port/generic/getopt.h \ 227d220 < gs/Makefile.sgi \ 229d221 < gs/devs.mak \ 348c340,341 < faxmail/mailfax.sh \ --- > faxmail/mailfax.sh-sendmail \ > faxmail/mailfax.sh-smail \ 448c441,452 < libtiff/machdep.h \ --- > libtiff/Makefile.aix \ > libtiff/Makefile.apollo \ > libtiff/Makefile.gcc \ > libtiff/Makefile.hpux \ > libtiff/Makefile.mips \ > libtiff/Makefile.mpw \ > libtiff/Makefile.next \ > libtiff/Makefile.sco \ > libtiff/Makefile.sgi \ > libtiff/Makefile.sun \ > libtiff/Makefile.tahoe \ > libtiff/Makefile.vax \ 449a454,458 > libtiff/tiff.h \ > libtiff/tiffcomp.h \ > libtiff/tiffconf.h \ > libtiff/tiffio.h \ > libtiff/tiffiop.h \ 451,454c460,494 < libtiff/tiff*.h \ < libtiff/mk*.c \ < libtiff/tif_*.c \ < libtiff/Makefile.* \ --- > libtiff/mkg3states.c \ > libtiff/mkspans.c \ > libtiff/tif_apple.c \ > libtiff/tif_aux.c \ > libtiff/tif_ccittrle.c \ > libtiff/tif_close.c \ > libtiff/tif_compress.c \ > libtiff/tif_dir.c \ > libtiff/tif_dirinfo.c \ > libtiff/tif_dirread.c \ > libtiff/tif_dirwrite.c \ > libtiff/tif_dumpmode.c \ > libtiff/tif_error.c \ > libtiff/tif_fax3.c \ > libtiff/tif_fax4.c \ > libtiff/tif_flush.c \ > libtiff/tif_getimage.c \ > libtiff/tif_jpeg.c \ > libtiff/tif_lzw.c \ > libtiff/tif_machdep.c \ > libtiff/tif_msdos.c \ > libtiff/tif_next.c \ > libtiff/tif_open.c \ > libtiff/tif_packbits.c \ > libtiff/tif_print.c \ > libtiff/tif_read.c \ > libtiff/tif_strip.c \ > libtiff/tif_swab.c \ > libtiff/tif_thunder.c \ > libtiff/tif_tile.c \ > libtiff/tif_unix.c \ > libtiff/tif_version.c \ > libtiff/tif_vms.c \ > libtiff/tif_warning.c \ > libtiff/tif_write.c \ 466,471d505 < # Contributed stuff. < # < CONTRIBFILES=\ < contrib/dirk \ < ${NULL} < # 479d512 < ${CONTRIBFILES} \ EOF-EOF-EOF Patch dist/flexfax.alpha<<'EOF-EOF-EOF' 1c1 < define ALPHA 036 --- > define ALPHA 041 EOF-EOF-EOF Patch etc/faxaddmodem.sh<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/etc/RCS/faxaddmodem.sh,v 1.60 93/07/29 13:21:28 sam Exp $ --- > # $Header: /usr/people/sam/fax/etc/RCS/faxaddmodem.sh,v 1.62 93/08/12 08:44:44 sam Exp $ 147c147 < elif [ -f /etc/useradd ]; then --- > elif [ -f /etc/useradd -o -f /usr/sbin/useradd ]; then 423,434c423,446 < x=`ypcat services 2>/dev/null | grep '^fax[ ]'` 2>/dev/null < if [ -z "$x" -a -f $SERVICES ]; then < x=`grep '^fax[ ]' $SERVICES` < fi < if [ -z "$x" ]; then < echo "" < echo "There does not appear to be an entry for the fax service either in" < echo "the yellow pages database or in the $SERVICES file;" < prompt "should an entry be added to $SERVICES [yes]?" < read x < if [ "$x" = "" -o "$x" = "y" -o "$x" = "yes" ]; then < echo "fax 4557/tcp # FAX transmission service" >>$SERVICES --- > hasYP=`ypcat services 2>/dev/null | tail -1'` 2>/dev/null > x= > if [ "$hasYP" ]; then > x=`ypcat services 2>/dev/null | grep '^fax[ ]'` 2>/dev/null > if [ -z "$x" ]; then > echo "" > echo "There does not appear to be an entry for the fax service in the YP database;" > echo "the software will not work properly without one. Contact your administrator" > echo "to get the folllowing entry added:" > echo "" > echo "fax 4557/tcp # FAX transmission service" > echo "" > exit 1 > fi > else > x=`grep '^fax[ ]' $SERVICES 2>/dev/null` 2>/dev/null > if [ -z "$x" ]; then > echo "" > echo "There does not appear to be an entry for the fax service in the $SERVICES file;" > prompt "should an entry be added to $SERVICES [yes]?" > read x > if [ "$x" = "" -o "$x" = "y" -o "$x" = "yes" ]; then > echo "fax 4557/tcp # FAX transmission service" >>$SERVICES > fi EOF-EOF-EOF Patch etc/probemodem.sh<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/etc/RCS/probemodem.sh,v 1.3 93/07/29 18:58:53 sam Exp $ --- > # $Header: /usr/people/sam/fax/etc/RCS/probemodem.sh,v 1.4 93/08/09 09:14:16 sam Exp $ 151c151 < SunOS) --- > SunOS|Linux) 159,161c159,161 < PORT=`expr $TTY : 'tty\(.*\)'` echo "Serial port: $PORT" < LOCKX="$LOCKDIR/LCK..$TTY" echo "UUCP lock file: $LOCKX" < DEVS=/dev/$TTY tdev=/dev/$TTY echo "TTY device: $DEVS" --- > PORT=`expr $TTY : 'tty\(.*\)'`; echo "Serial port: $PORT" > LOCKX="$LOCKDIR/LCK..$TTY"; echo "UUCP lock file: $LOCKX" > DEVS=/dev/$TTY; tdev=/dev/$TTY; echo "TTY device: $DEVS" 260c260 < pat=`echo "$i"|sed -e 's/[+*&$\\]/\\\\&/g'` # escape regex metacharacters --- > pat=`echo "$i"|sed -e 's/[*&$\\]/\\\\&/g'` # escape regex metacharacters 305c305 < pat=`echo "$i"|sed -e 's/[+*&$\\]/\\\\&/g'` # escape regex metacharacters --- > pat=`echo "$i"|sed -e 's/[*&$\\]/\\\\&/g'` # escape regex metacharacters EOF-EOF-EOF Patch faxalter/faxalter.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxalter/RCS/faxalter.c++,v 1.6 93/07/26 10:59:42 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxalter/RCS/faxalter.c++,v 1.9 93/08/16 08:21:23 sam Exp $ 29c29 < #include --- > #include 32,35d31 < #ifdef __GNUC__ < extern "C" char* strerror(int); // XXX should be in < #endif < 63c59 < int c; --- > int c, n; 100c96 < int n = atoi(optarg); --- > n = atoi(optarg); EOF-EOF-EOF Patch faxcover/faxcover.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxcover/RCS/faxcover.c++,v 1.23 93/06/23 14:03:43 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxcover/RCS/faxcover.c++,v 1.25 93/08/15 11:23:02 sam Exp $ 30d29 < #include EOF-EOF-EOF Patch faxd/Class1.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Class1.c++,v 1.43 93/05/10 17:47:22 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Class1.c++,v 1.45 93/08/16 08:20:43 sam Exp $ 99c99 < class1Cmd("CLASS", 1, AT_OK); --- > atCmd(conf.class1Cmd); 185c185 < class1Cmd("CLASS", 1, AT_OK); --- > atCmd(conf.class1Cmd); 620c620 < if (FaxModem::atResponse(buf, ms) == AT_OTHER && streq(buf, "+FCERROR", 8)) --- > if (FaxModem::atResponse(buf, ms) == AT_OTHER && strneq(buf, "+FCERROR", 8)) EOF-EOF-EOF Patch faxd/Class1Recv.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Class1Recv.c++,v 1.38 93/07/09 17:30:51 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Class1Recv.c++,v 1.40 93/08/16 08:21:01 sam Exp $ 65,67c65,70 < static const AnswerMsg answer = < { "CONNECT", 7, FaxModem::OK, FaxModem::CALLTYPE_UNKNOWN }; < return streq(s, answer.msg, answer.len) ? &answer : FaxModem::findAnswer(s); --- > static const AnswerMsg answer = { > "CONNECT", 7, > FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_UNKNOWN > }; > return strneq(s, answer.msg, answer.len) ? > &answer : FaxModem::findAnswer(s); EOF-EOF-EOF Patch faxd/Class1Send.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Class1Send.c++,v 1.44 93/07/09 14:50:59 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Class1Send.c++,v 1.45 93/08/16 08:20:26 sam Exp $ 448c448 < u_int nsf = frame.getDataWord(); --- > { u_int nsf = frame.getDataWord(); } 465,466c465,466 < u_int newDIS = frame.getDIS(); < if (newDIS != dis) { --- > { u_int newDIS = frame.getDIS(); > if (newDIS != dis) { 469a470 > } EOF-EOF-EOF Patch faxd/Class2.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Class2.c++,v 1.62 93/07/20 16:11:19 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Class2.c++,v 1.64 93/08/16 08:21:02 sam Exp $ 64c64 < class2Cmd("CLASS", 2); --- > atCmd(conf.class2Cmd); 163c163 < class2Cmd("CLASS", 2); --- > atCmd(conf.class2Cmd); 385c385 < if (streq(buf, "+FHNG:", 6)) { --- > if (strneq(buf, "+FHNG:", 6)) { 388c388 < } else if (streq(buf, "+FCON", 5)) --- > } else if (strneq(buf, "+FCON", 5)) 390c390 < else if (streq(buf, "+FPOLL", 6)) --- > else if (strneq(buf, "+FPOLL", 6)) 392c392 < else if (streq(buf, "+FDIS:", 6)) --- > else if (strneq(buf, "+FDIS:", 6)) 394c394 < else if (streq(buf, "+FNSF:", 6)) --- > else if (strneq(buf, "+FNSF:", 6)) 396c396 < else if (streq(buf, "+FCSI:", 6)) --- > else if (strneq(buf, "+FCSI:", 6)) 398c398 < else if (streq(buf, "+FPTS:", 6)) --- > else if (strneq(buf, "+FPTS:", 6)) 400c400 < else if (streq(buf, "+FDCS:", 6)) --- > else if (strneq(buf, "+FDCS:", 6)) 402c402 < else if (streq(buf, "+FNSS:", 6)) --- > else if (strneq(buf, "+FNSS:", 6)) 404c404 < else if (streq(buf, "+FTSI:", 6)) --- > else if (strneq(buf, "+FTSI:", 6)) 406c406 < else if (streq(buf, "+FET:", 5)) --- > else if (strneq(buf, "+FET:", 5)) EOF-EOF-EOF Patch faxd/Class2Recv.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Class2Recv.c++,v 1.51 93/03/30 21:51:22 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Class2Recv.c++,v 1.53 93/08/16 08:21:03 sam Exp $ 38,41c38,45 < { "+FCON", 5, FaxModem::OK, FaxModem::CALLTYPE_FAX }, < { "+FDM", 4, FaxModem::OK, FaxModem::CALLTYPE_DATA }, < { "+FHNG:", 6, FaxModem::NOCARRIER, FaxModem::CALLTYPE_ERROR }, < { "VCON", 4, FaxModem::OK, FaxModem::CALLTYPE_VOICE }, --- > { "+FCON", 5, > FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_FAX }, > { "+FDM", 4, > FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_DATA }, > { "+FHNG:", 6, > FaxModem::AT_NOTHING, FaxModem::NOCARRIER,FaxModem::CALLTYPE_ERROR }, > { "VCON", 4, > FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_VOICE }, 49c53 < if (streq(s, answerMsgs[i].msg, answerMsgs[i].len)) --- > if (strneq(s, answerMsgs[i].msg, answerMsgs[i].len)) EOF-EOF-EOF Patch faxd/Class2Send.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Class2Send.c++,v 1.57 93/07/13 11:45:12 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Class2Send.c++,v 1.58 93/08/16 08:21:04 sam Exp $ 57c57 < if (streq(rbuf, "CED", 3)) // hack for busted modems --- > if (strneq(rbuf, "CED", 3)) // hack for busted modems 92,94c92,95 < char* cp = rbuf+6; < nsf = fromHex(cp, strlen(cp)); // extract NSF information < protoTrace("REMOTE NSF \"%s\"", cp); --- > { char* cp = rbuf+6; > nsf = fromHex(cp, strlen(cp)); // extract NSF information > protoTrace("REMOTE NSF \"%s\"", cp); > } EOF-EOF-EOF Patch faxd/DialRules.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/DialRules.c++,v 1.8 93/06/20 19:14:05 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/DialRules.c++,v 1.9 93/08/08 17:13:31 sam Exp $ 346c346,347 < while (rule.pat->Search(result, len, 0, len) >= 0) { --- > u_int start = 0; > while (rule.pat->Search(result, len, start, len) >= 0) { 373a375 > start = ix + replace.length(); // skip replace when searching EOF-EOF-EOF Patch faxd/Everex.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Everex.c++,v 1.35 93/03/25 16:15:42 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Everex.c++,v 1.37 93/08/16 08:21:05 sam Exp $ 201c201 < return (setupFrame(f, (char*) toHex(v, 8))); --- > return (atCmd("#FT" | toHex(f, 2) | "=" | toHex(v, 8))); 213c213 < return (getModemLine(buf, ms) > 2 && streq(buf, "R ", 2)); --- > return (getModemLine(buf, ms) > 2 && strneq(buf, "R ", 2)); EOF-EOF-EOF Patch faxd/Everex.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Everex.h,v 1.38 93/07/09 14:51:01 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Everex.h,v 1.39 93/08/14 12:38:08 sam Exp $ 107d106 < CallType answerResponse(fxStr& emsg); EOF-EOF-EOF Patch faxd/EverexRecv.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/EverexRecv.c++,v 1.45 93/05/10 09:26:46 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/EverexRecv.c++,v 1.47 93/08/16 08:21:06 sam Exp $ 41c41 < EverexModem::answerCall(AnswerType, fxStr& emsg) --- > EverexModem::answerCall(AnswerType atype, fxStr& emsg) 43,56c43,59 < if (!atCmd("#A#S8=8#S9=45V1&E1S0=0X4")) < goto bad; < if (!modemFaxConfigure(FAX_RECVMODE|S2_RESET)) < goto bad; < if (!setupFrame(FCF_DIS|FCF_RCVR, modemDIS())) < goto bad; < if (!setupFrame(FCF_CSI|FCF_RCVR, (char*) lid)) < goto bad; < if (!atCmd("#T2100=30")) < goto bad; < return (answerResponse(emsg)); < bad: < emsg = "Unspecified Receive Phase B error"; < return (CALLTYPE_ERROR); --- > if (atype == FaxModem::ANSTYPE_FAX || atype == FaxModem::ANSTYPE_ANY) { > if (!atCmd("#A#S8=8#S9=45V1&E1S0=0X4")) > goto bad; > if (!modemFaxConfigure(FAX_RECVMODE|S2_RESET)) > goto bad; > if (!setupFrame(FCF_DIS|FCF_RCVR, modemDIS())) > goto bad; > if (!setupFrame(FCF_CSI|FCF_RCVR, (char*) lid)) > goto bad; > if (!atCmd("#T2100=30")) { > bad: > emsg = "Unspecified Receive Phase B error"; > return (CALLTYPE_ERROR); > } else > return (CALLTYPE_FAX); > } > return (FaxModem::answerCall(atype, emsg)); 59,64d61 < CallType < EverexModem::answerResponse(fxStr&) < { < return (CALLTYPE_FAX); // XXX can't deduce, assume fax < } < 157c154 < while (getModemLine(buf) > 2 && !streq(buf, "M ", 2)) --- > while (getModemLine(buf) > 2 && !strneq(buf, "M ", 2)) 161c158 < fxBool ok = (!wasTimeout() && streq(buf, "M 3", 3)); --- > fxBool ok = (!wasTimeout() && strneq(buf, "M 3", 3)); 271c268 < if (streq(rbuf, "M 1", 3)) { // message carrier received --- > if (strneq(rbuf, "M 1", 3)) { // message carrier received 302c299 < } else if (streq(rbuf, "R ", 2)) { // HDLC frames received --- > } else if (strneq(rbuf, "R ", 2)) { // HDLC frames received EOF-EOF-EOF Patch faxd/EverexSend.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/EverexSend.c++,v 1.48 93/07/09 14:51:02 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/EverexSend.c++,v 1.49 93/08/16 08:21:07 sam Exp $ 49c49 < if (streq(rbuf, "FAX", 3)) --- > if (strneq(rbuf, "FAX", 3)) 284c284 < if (getModemLine(buf, conf.t4Timer) > 2 && streq(buf, "R ", 2)) --- > if (getModemLine(buf, conf.t4Timer) > 2 && strneq(buf, "R ", 2)) 443c443 < if (getModemLine(rbuf, conf.t4Timer) > 2 && streq(rbuf, "R ", 2)) --- > if (getModemLine(rbuf, conf.t4Timer) > 2 && strneq(rbuf, "R ", 2)) EOF-EOF-EOF Patch faxd/FaxMachineInfo.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxMachineInfo.c++,v 1.17 93/07/21 11:27:15 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxMachineInfo.c++,v 1.19 93/08/15 11:23:20 sam Exp $ 36d35 < extern "C" void syslog(int priority, const char *message, ...); // XXX EOF-EOF-EOF Patch faxd/FaxMachineLog.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxMachineLog.c++,v 1.10 93/07/15 10:25:15 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxMachineLog.c++,v 1.12 93/08/15 11:23:22 sam Exp $ 37,38d36 < extern "C" void syslog(int priority, const char *message, ...); // XXX < 76,79d73 < < #ifdef __GNUC__ < extern "C" char* strerror(int); // XXX should be in < #endif EOF-EOF-EOF Patch faxd/FaxModem.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxModem.c++,v 1.76 93/07/13 17:28:06 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxModem.c++,v 1.79 93/08/16 08:21:08 sam Exp $ 236,243c236,251 < { "FAX", 3, FaxModem::OK, FaxModem::CALLTYPE_FAX }, < { "DATA", 4, FaxModem::OK, FaxModem::CALLTYPE_DATA }, < { "CONNECT FAX",11, FaxModem::OK, FaxModem::CALLTYPE_FAX }, < { "CONNECT", 7, FaxModem::OK, FaxModem::CALLTYPE_DATA }, < { "NO ANSWER", 9, FaxModem::NOANSWER, FaxModem::CALLTYPE_ERROR }, < { "NO CARRIER", 10, FaxModem::NOCARRIER, FaxModem::CALLTYPE_ERROR }, < { "NO DIALTONE",11, FaxModem::NODIALTONE, FaxModem::CALLTYPE_ERROR }, < { "ERROR", 5, FaxModem::ERROR, FaxModem::CALLTYPE_ERROR }, --- > { "CONNECT FAX",11, > FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_FAX }, > { "CONNECT", 7, > FaxModem::AT_NOTHING, FaxModem::OK, FaxModem::CALLTYPE_DATA }, > { "NO ANSWER", 9, > FaxModem::AT_NOTHING, FaxModem::NOANSWER, FaxModem::CALLTYPE_ERROR }, > { "NO CARRIER", 10, > FaxModem::AT_NOTHING, FaxModem::NOCARRIER, FaxModem::CALLTYPE_ERROR }, > { "NO DIALTONE",11, > FaxModem::AT_NOTHING, FaxModem::NODIALTONE,FaxModem::CALLTYPE_ERROR }, > { "ERROR", 5, > FaxModem::AT_NOTHING, FaxModem::ERROR, FaxModem::CALLTYPE_ERROR }, > { "FAX", 3, > FaxModem::AT_CONNECT, FaxModem::OK, FaxModem::CALLTYPE_FAX }, > { "DATA", 4, > FaxModem::AT_CONNECT, FaxModem::OK, FaxModem::CALLTYPE_DATA }, 251c259 < if (streq(s, answerMsgs[i].msg, answerMsgs[i].len)) --- > if (strneq(s, answerMsgs[i].msg, answerMsgs[i].len)) 265a274 > again: 271a281,298 > if (am->expect != AT_NOTHING && conf.waitForConnect) { > /* > * Response string is an intermediate result that > * is only meaningful if followed by AT response > * am->next. Read the next response from the modem > * and if it's the expected one, use the message > * to intuit the call type. Otherwise, discard > * the intermediate response string and process the > * call according to the newly read response. > * This is intended to deal with modems that send > * > * CONNECT > * (such as the Boca 14.4). > */ > r = atResponse(rbuf, conf.answerResponseTimeout); > if (r != am->expect) > goto again; > } 1173c1200 < else if (streq(buf, "OK", 2)) --- > else if (strneq(buf, "OK", 2)) 1175c1202 < else if (streq(buf, "NO CARRIER", 10)) --- > else if (strneq(buf, "NO CARRIER", 10)) 1177c1204 < else if (streq(buf, "NO DIAL", 7)) // NO DIALTONE or NO DIAL TONE --- > else if (strneq(buf, "NO DIAL", 7)) // NO DIALTONE or NO DIAL TONE 1179c1206 < else if (streq(buf, "NO ANSWER", 9)) --- > else if (strneq(buf, "NO ANSWER", 9)) 1181c1208 < else if (streq(buf, "ERROR", 5)) --- > else if (strneq(buf, "ERROR", 5)) 1183c1210 < else if (streq(buf, "CONNECT", 7)) --- > else if (strneq(buf, "CONNECT", 7)) 1185c1212 < else if (streq(buf, "RING", 4)) --- > else if (strneq(buf, "RING", 4)) 1187c1214 < else if (streq(buf, "BUSY", 4)) --- > else if (strneq(buf, "BUSY", 4)) 1189c1216 < else if (streq(buf, "PHONE OFF-HOOK", 14)) --- > else if (strneq(buf, "PHONE OFF-HOOK", 14)) 1202,1203c1229,1235 < if (r != AT_NOTHING && !waitFor(r, ms)) < return (FALSE); --- > if (r != AT_NOTHING) { > if (!waitFor(r, ms)) > return (FALSE); > } else if (pos != cmd.length()) { > if (!waitFor(AT_OK, ms)) > return (FALSE); > } EOF-EOF-EOF Patch faxd/FaxModem.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxModem.h,v 1.67 93/07/13 17:27:43 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxModem.h,v 1.69 93/08/16 08:21:09 sam Exp $ 48,51c48,52 < const char* msg; < u_int len; < CallStatus status; < CallType type; --- > const char* msg; // string to match > u_short len; // string length > ATResponse expect; // next AT response to expect > CallStatus status; // resultant call status > CallType type; // resultant call type 124a126,141 > > enum { // ATResponse > AT_NOTHING = 0, // for passing as a parameter > AT_OK = 1, // "OK" response > AT_CONNECT = 2, // "CONNECT" response > AT_NOANSWER = 3, // "NO ANSWER" response > AT_NOCARRIER = 4, // "NO CARRIER" response > AT_NODIALTONE = 5, // "NO DIALTONE" response > AT_BUSY = 6, // "BUSY" response > AT_OFFHOOK = 7, // "PHONE OFF-HOOK" response > AT_RING = 8, // "RING" response > AT_ERROR = 9, // "ERROR" response > AT_EMPTYLINE = 10, // empty line (0 characters received) > AT_TIMEOUT = 11, // timeout waiting for response > AT_OTHER = 12, // unknown response (not one of above) > }; 207,221d223 < enum { // ATResponse < AT_NOTHING = 0, // for passing as a parameter < AT_OK = 1, // "OK" response < AT_CONNECT = 2, // "CONNECT" response < AT_NOANSWER = 3, // "NO ANSWER" response < AT_NOCARRIER = 4, // "NO CARRIER" response < AT_NODIALTONE = 5, // "NO DIALTONE" response < AT_BUSY = 6, // "BUSY" response < AT_OFFHOOK = 7, // "PHONE OFF-HOOK" response < AT_RING = 8, // "RING" response < AT_ERROR = 9, // "ERROR" response < AT_EMPTYLINE = 10, // empty line (0 characters received) < AT_TIMEOUT = 11, // timeout waiting for response < AT_OTHER = 12, // unknown response (not one of above) < }; 385,388c387,388 < inline fxBool streq(const char* a, const char* b) < { return (strcmp(a,b) == 0); } < inline fxBool streq(const char* a, const char* b, int n) < { return (strncmp(a,b,n) == 0); } --- > #define streq(a, b) (strcmp(a,b) == 0) > #define strneq(a, b, n) (strncmp(a,b,n) == 0) EOF-EOF-EOF Patch faxd/FaxRequest.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxRequest.c++,v 1.33 93/07/27 11:31:48 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxRequest.c++,v 1.35 93/08/15 11:23:23 sam Exp $ 29,30d28 < < extern "C" void syslog(int priority, const char *message, ...); EOF-EOF-EOF Patch faxd/FaxServer.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxServer.c++,v 1.119 93/07/31 17:23:09 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxServer.c++,v 1.121 93/08/15 11:23:23 sam Exp $ 31c31 < #include --- > #include 62,64d61 < #if SYS_FCHMOD && !defined(__bsdi__) && !defined(svr4) && !defined(BSD4_4) && !defined(__linux__) < extern "C" int fchmod(int, int); < #endif 198c195 < #if SYS_FCHMOD --- > #if HAS_FCHMOD 486c483 < #if SYS_FCHOWN --- > #if HAS_FCHOWN 492c489 < #if SYS_FCHMOD --- > #if HAS_FCHMOD EOF-EOF-EOF Patch faxd/Getty.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/Getty.c++,v 1.18 93/07/29 13:20:34 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/Getty.c++,v 1.20 93/08/15 11:23:24 sam Exp $ 35,44d34 < < #ifdef __GNUC__ < extern "C" { < void closelog(void); < void openlog(const char* ident, int lgopt, int facility); < }; < #endif < < #include < extern "C" void vsyslog(int, const char*, va_list ap); // XXX EOF-EOF-EOF Patch faxd/GettyBSD.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/GettyBSD.c++,v 1.20 93/07/29 13:21:13 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/GettyBSD.c++,v 1.22 93/08/15 11:23:25 sam Exp $ 206,207d205 < < extern "C" pid_t waitpid(pid_t, int *, int); EOF-EOF-EOF Patch faxd/GettySysV.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/GettySysV.c++,v 1.21 93/07/29 13:21:14 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/GettySysV.c++,v 1.23 93/08/15 11:23:26 sam Exp $ EOF-EOF-EOF Patch faxd/HDLCFrame.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/HDLCFrame.c++,v 1.7 93/05/10 16:24:50 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/HDLCFrame.c++,v 1.9 93/08/15 11:23:26 sam Exp $ 30,31c30,31 < #include "libc.h" < #include "malloc.h" --- > #include > #include EOF-EOF-EOF Patch faxd/ModemConfig.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/ModemConfig.c++,v 1.18 93/06/22 18:20:16 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/ModemConfig.c++,v 1.21 93/08/16 08:21:10 sam Exp $ 58a59,60 > , class1Cmd("+FCLASS=1") // set class 1 (fax) > , class2Cmd("+FCLASS=2") // set class 2 (fax) 100a103 > waitForConnect = FALSE; // unique answer response from modem 106a110,112 > #ifdef streq > #undef streq > #endif 205a212,213 > else if (streq(tag, "ModemWaitForConnect")) > waitForConnect = getBoolean(value); 218a227,228 > // Class 1-specific configuration controls > else if (streq(tag, "Class1Cmd")) class1Cmd = value; 234a245 > else if (streq(tag, "Class2Cmd")) class2Cmd = value; EOF-EOF-EOF Patch faxd/ModemConfig.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/ModemConfig.h,v 1.16 93/06/22 18:19:57 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/ModemConfig.h,v 1.18 93/08/14 11:36:08 sam Exp $ 63a64 > fxStr class1Cmd; // cmd for setting Class 1 71a73 > fxStr class2Cmd; // cmd for setting Class 2 89a92 > fxBool waitForConnect; // modem sends multiple answer responses EOF-EOF-EOF Patch faxd/UUCPLock.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/UUCPLock.c++,v 1.19 93/07/08 16:51:51 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/UUCPLock.c++,v 1.21 93/08/15 11:23:27 sam Exp $ 49,51d48 < #if SYS_FCHMOD && !defined(__bsdi__) && !defined(svr4) && !defined(BSD4_4) && !defined(__linux__) < extern "C" int fchmod(int, int); < #endif 110c107 < #if SYS_FCHMOD --- > #if HAS_FCHMOD 115c112 < #if SYS_FCHOWN --- > #if HAS_FCHOWN EOF-EOF-EOF Patch faxd/everex.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/everex.h,v 1.7 93/01/13 18:50:03 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/everex.h,v 1.8 93/08/14 12:21:38 sam Exp $ 30c30 < #define EVEREX_CMDBRATE BR1200 // command interface is fixed at 1200 baud --- > #define EVEREX_CMDBRATE BR2400 // cmd interface is fixed at 2400 baud EOF-EOF-EOF Patch faxd/faxServerApp.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxd/RCS/faxServerApp.c++,v 1.116 93/07/27 11:28:02 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxd/RCS/faxServerApp.c++,v 1.120 93/08/16 08:19:57 sam Exp $ 25d24 < #include 39a39,40 > #include > #include 63,65d63 < extern "C" void closelog(void); < extern "C" void openlog(const char* ident, int lgopt, int facility); < 553c551 < (void) TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); --- > TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); 559c557 < (void) TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); --- > TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); 564c562 < short compression; --- > short compression = 0; 583c581,584 < (void) TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); --- > if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w)) { > emsg = "Malformed document (no image width)"; > return (FALSE); > } 635c636,639 < (void) TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); --- > if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h)) { > emsg = "Malformed document (no image length)"; > return (FALSE); > } 1250,1251d1253 < extern "C" int waitpid(pid_t, int *, int); < 1290,1292c1292,1294 < int status = 0; < (void) waitpid(pid, &status, 0); < if (status != 0) --- > { int status = 0; > (void) waitpid(pid, &status, 0); > if (status != 0) 1293a1296 > } 1462,1463d1464 < < extern "C" void vsyslog(int, const char*, va_list); EOF-EOF-EOF Patch faxmail/README<<'EOF-EOF-EOF' 1c1 < $Header: /usr/people/sam/fax/faxmail/RCS/README,v 1.6 93/05/20 15:49:58 sam Exp $ --- > $Header: /usr/people/sam/fax/faxmail/RCS/README,v 1.7 93/08/15 18:21:32 sam Exp $ 5c5 < Step 1. Setup the FlexFAX software as usual. --- > 1. Setup the FlexFAX software as usual. 7,8c7,10 < Step 2. Edit your sendmail configuration. Include the following < mailer definition (or similar): --- > 2. If your system uses sendmail to deliver mail, then follow the > instructions in mailfax.sh-sendmail. > 3. If your system uses smail (e.g. Linux users), then follow the > instructions in mailfax.sh-smail. 10,11c12,14 < Mfax, P=/usr/local/lib/fax/mailfax, F=DFMhu, M=100000, < A=mailfax $u $h $f --- > 4. Restart your mail software, refreeze your configuration or > whatever is necessary to cause the configuration changes to be > seen by the system. 13,32d15 < and add the following address rewriting rule to rule set 0: < < # forward FAX messages to FlexFAX software < R$+<@$+.FAX> $#fax $@ $2 $: $1 user@host.FAX < < Step 3. Create a mailfax shell script that formats the mail and < submits the result for transmission. A simple one is: < < #! /bin/sh < /usr/local/bin/faxmail | /usr/local/bin/sendfax -n -d "$1@$2" -f "$3" < < Note that the mailfax script must be invoked as either root, daemon, or < uucp if the from address is to be changed with the -f option to sendfax. < This is typically the case when sendmail invokes a mailer program and < the from address identity is different that of the real uid. < < Step 4. Restart sendmail, refreeze your configuration, or whatever is < necessary to cause the configuration changes to be seen by the system. < < 45d27 < 49a32,33 > Dirk Husemann's more elaborate scheme is included in the contributed > software; check out ../contrib/dirk. 51,52c35,38 < Dirk Husemann's more elaborate scheme is also included in the directory < ../contrib/dirk. --- > There is also the "Remote Printing Experiment" being conducted by folks > on the Internet. This provides a distributed fax delivery service that > uses email to relay facsimile to a local site for delivery. For info > about that stuff send mail to tpc-faq@town.hall.org. EOF-EOF-EOF Patch faxmail/faxmail.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxmail/RCS/faxmail.c++,v 1.18 93/05/17 16:59:15 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxmail/RCS/faxmail.c++,v 1.20 93/08/15 11:23:37 sam Exp $ 30c30 < #include --- > #include EOF-EOF-EOF RmFile faxmail/mailfax.sh NewFile faxmail/mailfax.sh-sendmail<<'EOF-EOF-EOF' #! /bin/sh # # mailfax - email to fax gateway for sendmail # # This file should be installed as /usr/local/bin/mailfax # # Edit your sendmail configuration. Include the following # mailer definition (or similar): # # Mfax, P=/usr/local/lib/fax/mailfax, F=DFMhu, M=100000, # A=mailfax $u $h $f # # and add the following address rewriting rule to rule set 0: # # # forward FAX messages to FlexFAX software # R$+<@$+.FAX> $#fax $@ $2 $: $1 user@host.FAX # # Note that the mailfax script must be invoked as either root, daemon, or # uucp if the from address is to be changed with the -f option to sendfax. # This is typically the case when sendmail invokes a mailer program and # the from address identity is different that of the real uid. # /usr/local/bin/faxmail | /usr/local/bin/sendfax -n -d "$1@$2" -f "$3" EOF-EOF-EOF NewFile faxmail/mailfax.sh-smail<<'EOF-EOF-EOF' #!/bin/sh # # mailfax - email to fax gateway for smail3.1. # # This file should be installed as /usr/local/bin/mailfax, and the # following changes made to the smail configuration: # # Add the following to /usr/local/lib/smail/transports: # fax: driver=pipe, local; # pipe_as_sender, cmd="/usr/local/bin/mailfax" # # Add the following to /usr/local/lib/smail/routers: # fax: driver=queryprogram, transport=fax; # cmd="/usr/bin/expr ${lc:host} : '.*\.fax$'" # # If you do not already have a routers file, you *must* create one # with the default routing info, included below: # inet_addrs: driver=gethostbyaddr, transport=smtp; # fail_if_error, check_for_local, # inet_hosts: driver=gethostbyname, transport=smtp; # -required, -domain, -only_local_domain, # paths: driver=pathalias, transport=uux; # file=paths, proto=bsearch, optional, -required, domain=uucp, # uucp_neighbors: driver=uuname, transport=uux; # cmd=/usr/bin/uuname, domain=uucp, # smart_host: driver=smarthost, transport=uux; # -path, # # Note: I'm not a smail expert; this file is the result of a couple # of hours of experimentation. Rick Lyons. /usr/local/bin/faxmail | /usr/local/bin/sendfax -n -d \ "`/usr/bin/expr \"$ADDR\" : '\(.*\)\.fax$'`" -f "$SENDER@$PRIMARY_NAME" EOF-EOF-EOF Patch faxrm/faxrm.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxrm/RCS/faxrm.c++,v 1.13 93/02/28 23:10:57 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxrm/RCS/faxrm.c++,v 1.15 93/08/15 11:23:45 sam Exp $ 25c25 < #include --- > #include 31,34d30 < < #ifdef __GNUC__ < extern "C" char* strerror(int); // XXX should be in < #endif EOF-EOF-EOF Patch faxstat/FaxStatClient.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxstat/RCS/FaxStatClient.c++,v 1.5 93/01/26 22:33:58 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxstat/RCS/FaxStatClient.c++,v 1.7 93/08/15 11:23:56 sam Exp $ 25a26 > #include 31,34d31 < < #ifdef __GNUC__ < extern "C" char* strerror(int); // XXX should be in < #endif EOF-EOF-EOF Patch faxstat/faxstat.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/faxstat/RCS/faxstat.c++,v 1.19 93/04/13 16:14:04 sam Exp $ --- > /* $Header: /usr/people/sam/fax/faxstat/RCS/faxstat.c++,v 1.20 93/08/13 15:10:25 sam Exp $ 25c25 < #include --- > #include EOF-EOF-EOF RmFile gs/Makefile.sgi Patch gs/README<<'EOF-EOF-EOF' 1c1 < Sat Mar 20 11:46:40 PST 1993 --- > $Header: /usr/people/sam/fax/gs/RCS/README,v 1.4 93/08/15 16:46:50 sam Exp $ 3,10c3,4 < This directory holds a fax device driver for version 2.52 of < Ghostscript. If you want to use Ghostscript to convert PostScript to < facsimile in the server, you should configure the tiffg3 device into < your copy of Ghostscript. gdevtiff.c is the device driver. devs.mak < is the makefile rules for the device drivers; updated to include the < rules for the tiffg3 device. You will also need to copy or link the < file ../libtiff/tiff.h to the Ghostscript directory, or modify the < Makefile to search for it in the apppropriate location. --- > Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993 Sam Leffler > Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. 12,15c6,12 < Note that if you use Ghostscript to image, you must setup the symbolic < link bin/ps2fax in the spooling area to point to bin/ps2fax.gs. This < is usually done during the software configuration process (i.e. when < the configure script is run). --- > 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. 17c14,16 < The files included in this directory: --- > 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. 19,21c18,23 < Makefile.sgi Ghostscript makefile for SGI machines (configured w/ tiff*) < gdevtiff.c TIFF G3-encoded image device driver < devs.mak makefile rules for device drivers including gdevtiff.c --- > 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. 23c25,31 < Sam --- > This directory holds a device driver for version 2.6.1 of Ghostscript > that write TIFF Class F format files. It's possible to convert this to > work with earlier versions of Ghostscript, but there's little > point--just update to a newer version. The driver included in this > distribution is either identical to the version provided with Ghoscript > or slightly newer. You can use either driver, though you are likely to > find that the version in this directory has some bugs fixed. 25,27c33,46 < PS. The Ghostscript driver does not support 2D encoding. This is known < by the ps2fax.gs.sh script that invokes it (it strips out the 1-D/2-D < options supplied by the fax server). --- > Configure the tiffg3 device by following the directions supplied with > the Ghostscript distribution; this basically requires that you add > "tiffg3.dev" to the list of configured devices and then rebuild > Ghostscript. > > Note that if you use Ghostscript to image PostScript in the fax server > then you must specify "gs" for the PostScript imager when you run the > configure script. > > Beware that the Ghostscript driver does not support 2D encoding. This > is known by the ps2fax.gs.sh script that invokes it (it strips out the > 1-D/2-D options supplied by the fax server). > > Sam EOF-EOF-EOF RmFile gs/devs.mak Patch gs/gdevtiff.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/gs/RCS/gdevtiff.c,v 1.6 93/07/19 08:20:44 sam Exp $ */ --- > /* $Header: /usr/people/sam/fax/gs/RCS/gdevtiff.c,v 1.7 93/08/15 16:33:19 sam Exp $ */ 30c30 < #include "tiff.h" --- > #include "gdevtiff.h" 51,52c51 < private TIFFOUT *faxout_open PROTO_ARGS((char *)); < private TIFFOUT *faxout_open_fp PROTO_ARGS((FILE *)); --- > private void faxout_open_fp PROTO_ARGS((FILE *, TIFFOUT*)); 56d54 < private int faxout_close PROTO_ARGS((TIFFOUT *)); 72c70 < TIFFOUT* fax; --- > TIFFOUT fax; 76,102d73 < /* < * Too bad the prn_device() macro doesn't let you specify the < * size of the gx_device structure -- we have to repeat it here < */ < #define generic_prn_device(Struct, procs, dev_name, width_10ths, height_10ths, x_dpi, y_dpi, l_margin, b_margin, r_margin, t_margin, color_bits, print_page) {\ < sizeof (Struct), \ < &procs, \ < dev_name, \ < (int)((long)width_10ths * x_dpi / 10), /* width */ \ < (int)((long)height_10ths * y_dpi / 10), /* height */ \ < x_dpi, y_dpi, \ < l_margin, b_margin, r_margin, t_margin, \ < { (color_bits > 1 ? 3 : 1), /* num_components */ \ < ((color_bits > 1) & (color_bits < 8) ? 8 : color_bits), /* depth */\ < (color_bits >= 8 ? 255 : 1), /* max_gray */ \ < (color_bits >= 8 ? 255 : color_bits > 1 ? 1 : 0), /* max_rgb */\ < (color_bits >= 8 ? 5 : 2), /* dither_gray */\ < (color_bits >= 8 ? 5 : color_bits > 1 ? 2 : 0), /* dither_rgb */\ < }, \ < 0, /* not initialized yet */\ < { 0 }, /* skip */ \ < print_page, \ < PRN_MAX_BITMAP, \ < PRN_BUFFER_SPACE, \ < { 0 } /* fname */ \ < } < 115,116c86,87 < gx_device_tiff gs_tiffg3_device = < generic_prn_device( --- > gx_device_tiff far_data gs_tiffg3_device = > { prn_device_std_body( 126c97,98 < ); --- > ) > }; 170,171c142,143 < ddev->fax = faxout_open_fp(ddev->file); < ddev->fax->iwidth = pi->iw; --- > faxout_open_fp(ddev->file, &ddev->fax); > ddev->fax.iwidth = pi->iw; 182c154 < TIFFOUT* fax = ddev->fax; --- > TIFFOUT* fax = &ddev->fax; 200c172 < TIFFOUT* fax = ddev->fax; --- > TIFFOUT* fax = &ddev->fax; 210,211c182,183 < private TIFFOUT * < faxout_open_fp(FILE *fp) --- > private void > faxout_open_fp(FILE *fp, register TIFFOUT* faxp) 213,216d184 < register TIFFOUT *faxp; < < faxp = (TIFFOUT*) malloc(sizeof (*faxp)); < 220c188 < { int one = 1; char* cp = (char*)&one; faxp->bigendian = (*cp == 0); } --- > faxp->bigendian = arch_is_big_endian; 222,223c190 < faxp->fax_weight = 0x80; < return (faxp); --- > faxp->fax_weight = 0x01; 226,238d192 < private TIFFOUT * < faxout_open(char *filename) < { < register FILE *fp; < register TIFFOUT *faxp; < < if (filename) < fp = fopen(filename, "wb"); < else < fp = stdout; < return (fp ? faxout_open_fp(fp) : NULL); < } < 276c230 < { TIFFTAG_FILLORDER, TIFF_SHORT, 1, FILLORDER_MSB2LSB }, --- > { TIFFTAG_FILLORDER, TIFF_SHORT, 1, FILLORDER_LSB2MSB }, 375,383c329 < private int < faxout_close(TIFFOUT *faxp) < { < fclose(faxp->fp); < free(faxp); < return (0); < } < < private unsigned char b_run_tbl[8][256] = { --- > private const byte far_data b_run_tbl[8][256] = { 530c476 < private unsigned char w_run_tbl[8][256] = { --- > private const byte far_data w_run_tbl[8][256] = { 803c749 < faxp->fax_weight = faxp->fax_weight>>1; --- > faxp->fax_weight = faxp->fax_weight<<1; 807c753 < faxp->fax_weight = 0x80; --- > faxp->fax_weight = 0x01; 814c760 < if (faxp->fax_weight != 0x80) { --- > if (faxp->fax_weight != 0x01) { 817c763 < faxp->fax_weight = 0x80; --- > faxp->fax_weight = 0x01; EOF-EOF-EOF Patch iv/Dispatch/dispatcher.c++<<'EOF-EOF-EOF' 591c591 < void Dispatcher::sigCLD() --- > void Dispatcher::sigCLD(int) 629c629 < sv.sv_handler = fxSIGHANDLER(&Dispatcher::sigCLD); --- > sv.sv_handler = fxSIGVECHANDLER(&Dispatcher::sigCLD); 634c634 < sa.sa_handler = fxSIGHANDLER(&Dispatcher::sigCLD); --- > sa.sa_handler = fxSIGACTIONHANDLER(&Dispatcher::sigCLD); EOF-EOF-EOF Patch iv/Dispatch/dispatcher.h<<'EOF-EOF-EOF' 94c94 < static void sigCLD(); --- > static void sigCLD(int); EOF-EOF-EOF Patch iv/InterViews/regexp.c++<<'EOF-EOF-EOF' 553c553,557 < while (*regparse != '\0' && *regparse != '|' && *regparse != ')') { --- > while (*regparse != '\0' && *regparse != '|') { > if (*regparse == '\\' && regparse[1] == ')') { > regparse++; > break; > } 694,699d697 < case '(': < ret = reg(1, &flags); < if (ret == nil) < return(nil); < *flagp |= flags&(HASWIDTH|SPSTART); < break; 702d699 < case ')': 713,716c710,721 < ret = regnode(EXACTLY); < regc(*regparse++); < regc('\0'); < *flagp |= HASWIDTH|SIMPLE; --- > if (*regparse == '(') { > regparse++; > ret = reg(1, &flags); > if (ret == nil) > return(nil); > *flagp |= flags&(HASWIDTH|SPSTART); > } else { > ret = regnode(EXACTLY); > regc(*regparse++); > regc('\0'); > *flagp |= HASWIDTH|SIMPLE; > } EOF-EOF-EOF Patch port/386bsd/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/386bsd/RCS/Makefile.flexfax,v 1.7 93/07/09 14:49:19 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/386bsd/RCS/Makefile.flexfax,v 1.8 93/08/15 18:23:14 sam Exp $ 78a79 > rm -f port.h EOF-EOF-EOF Patch port/386bsd/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/386bsd/RCS/defs,v 1.19 93/07/30 11:51:41 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/386bsd/RCS/defs,v 1.20 93/08/13 15:15:53 sam Exp $ 229c229 < GCINCS= -I- -I. -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I- -I. -I${DEPTH} -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} -I${TIFF} 244c244,245 < GC++INCS=-I. -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} \ > -I${IV} -I${TIFF} EOF-EOF-EOF Patch port/4.4bsd/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/4.4bsd/RCS/Makefile.flexfax,v 1.4 93/07/09 14:49:27 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/4.4bsd/RCS/Makefile.flexfax,v 1.5 93/08/15 18:23:22 sam Exp $ 79a80 > rm -f port.h EOF-EOF-EOF Patch port/4.4bsd/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/4.4bsd/RCS/defs,v 1.4 93/07/27 12:22:30 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/4.4bsd/RCS/defs,v 1.5 93/08/13 15:16:07 sam Exp $ 227c227 < GCINCS= -I- -I. -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I- -I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} EOF-EOF-EOF RmFile port/4.4bsd/malloc.h Patch port/bsdi/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/bsdi/RCS/Makefile.flexfax,v 1.14 93/07/09 14:49:28 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/bsdi/RCS/Makefile.flexfax,v 1.15 93/08/15 18:23:25 sam Exp $ 79a80 > rm -f port.h EOF-EOF-EOF Patch port/bsdi/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/bsdi/RCS/defs,v 1.23 93/07/27 12:22:31 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/bsdi/RCS/defs,v 1.24 93/08/13 15:16:09 sam Exp $ 227c227 < GCINCS= -I- -I. -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I- -I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} 242c242 < GC++INCS=-I. -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} EOF-EOF-EOF RmFile port/bsdi/malloc.h Patch port/freebsd/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/freebsd/RCS/Makefile.flexfax,v 1.1 93/07/29 17:01:34 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/freebsd/RCS/Makefile.flexfax,v 1.2 93/08/15 18:23:27 sam Exp $ 78a79 > rm -f port.h EOF-EOF-EOF Patch port/freebsd/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/freebsd/RCS/defs,v 1.1 93/07/29 17:01:36 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/freebsd/RCS/defs,v 1.2 93/08/13 15:16:10 sam Exp $ 229c229 < GCINCS= -I- -I. -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I- -I. -I${DEPTH} -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} -I${TIFF} 244c244,245 < GC++INCS=-I. -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${BSDI} -I${GENERIC} -I${UTIL} \ > -I${IV} -I${TIFF} EOF-EOF-EOF Patch port/freebsd/paths.h<<'EOF-EOF-EOF' 4a5 > #ifndef _PATH_GETTY 5a7 > #endif EOF-EOF-EOF NewFile port/freebsd/signal.h<<'EOF-EOF-EOF' #include_next #ifndef SIGCLD #define SIGCLD SIGCHLD #endif EOF-EOF-EOF RmFile port/generic/getopt.h Patch port/linux/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/linux/RCS/Makefile.flexfax,v 1.2 93/07/09 14:49:28 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/linux/RCS/Makefile.flexfax,v 1.3 93/08/15 18:23:28 sam Exp $ 78a79 > rm -f port.h EOF-EOF-EOF Patch port/linux/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/linux/RCS/defs,v 1.2 93/07/27 12:22:32 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/linux/RCS/defs,v 1.3 93/08/13 15:16:17 sam Exp $ 230c230 < GCINCS= -I- -I. -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I- -I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} 245c245 < GC++INCS=-I. -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} EOF-EOF-EOF RmFile port/linux/sys Patch port/sco/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/sco/RCS/Makefile.flexfax,v 1.6 93/07/09 14:49:29 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/sco/RCS/Makefile.flexfax,v 1.7 93/08/15 18:23:31 sam Exp $ 79a80 > rm -f port.h EOF-EOF-EOF Patch port/sco/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/sco/RCS/defs,v 1.6 93/07/27 12:22:32 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/sco/RCS/defs,v 1.7 93/08/13 15:16:20 sam Exp $ 229c229 < GCINCS= -I. -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} 244c244 < GC++INCS=-I. -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} EOF-EOF-EOF Patch port/sgi/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/sgi/RCS/Makefile.flexfax,v 1.56 93/08/02 09:37:21 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/sgi/RCS/Makefile.flexfax,v 1.57 93/08/15 18:23:32 sam Exp $ 79a80 > rm -f port.h EOF-EOF-EOF Patch port/sgi/defs.cc<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/sgi/RCS/defs.cc,v 1.36 93/06/18 11:46:20 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/sgi/RCS/defs.cc,v 1.38 93/08/15 23:35:17 sam Exp $ 236c236 < GCINCS=-I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS=-I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} 250,251c250,251 < GC++OPTS=+a1 +w +p -v2 -float ${OPTIMIZER} < GC++INCS=-I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} \ --- > GC++OPTS=+a1 +w +p -float ${OPTIMIZER} > GC++INCS=-I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} \ EOF-EOF-EOF Patch port/sgi/defs.gcc<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/sgi/RCS/defs.gcc,v 1.10 93/06/18 11:46:21 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/sgi/RCS/defs.gcc,v 1.11 93/08/13 15:16:22 sam Exp $ 236c236 < GCINCS = -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS = -I ${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} 251c251 < GC++INCS= -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS= -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} EOF-EOF-EOF RmFile port/sgi/getopt.h RmFile port/sgi/sys Patch port/solaris2/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/solaris2/RCS/Makefile.flexfax,v 1.6 93/07/09 14:49:31 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/solaris2/RCS/Makefile.flexfax,v 1.7 93/08/15 18:23:33 sam Exp $ 78a79 > rm -f port.h EOF-EOF-EOF Patch port/solaris2/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/solaris2/RCS/defs,v 1.8 93/07/27 12:22:33 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/solaris2/RCS/defs,v 1.9 93/08/13 15:16:23 sam Exp $ 231c231 < GCINCS= -I. -I${PORT} -I${PORTSVR4} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I. -I${DEPTH} -I${PORT} -I${PORTSVR4} -I${GENERIC} -I${UTIL} -I${TIFF} 246c246,247 < GC++INCS=-I. -I${PORT} -I${PORTSVR4} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${PORTSVR4} -I${GENERIC} -I${UTIL} \ > -I${IV} -I${TIFF} EOF-EOF-EOF Patch port/sun/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/sun/RCS/Makefile.flexfax,v 1.29 93/07/09 14:49:31 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/sun/RCS/Makefile.flexfax,v 1.30 93/08/15 18:23:34 sam Exp $ 78a79 > rm -f port.h EOF-EOF-EOF Patch port/sun/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/sun/RCS/defs,v 1.29 93/07/27 12:22:34 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/sun/RCS/defs,v 1.30 93/08/13 15:16:24 sam Exp $ 222c222 < GCINCS= -I. -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} 237c237 < GC++INCS=-I. -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} EOF-EOF-EOF RmFile port/sun/sys Patch port/svr4/Makefile.flexfax<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/port/svr4/RCS/Makefile.flexfax,v 1.8 93/07/09 14:49:32 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/svr4/RCS/Makefile.flexfax,v 1.9 93/08/15 18:23:35 sam Exp $ 78a79 > rm -f port.h EOF-EOF-EOF Patch port/svr4/defs<<'EOF-EOF-EOF' 1c1 < # $Header: /usr/people/sam/fax/port/svr4/RCS/defs,v 1.13 93/07/27 12:22:35 sam Exp $ --- > # $Header: /usr/people/sam/fax/port/svr4/RCS/defs,v 1.14 93/08/13 15:16:25 sam Exp $ 230c230 < GCINCS= -I. -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} --- > GCINCS= -I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${TIFF} 245c245 < GC++INCS=-I. -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} --- > GC++INCS=-I. -I${DEPTH} -I${PORT} -I${GENERIC} -I${UTIL} -I${IV} -I${TIFF} EOF-EOF-EOF Patch recvfax/alter.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/recvfax/RCS/alter.c,v 1.9 93/07/26 10:58:49 sam Exp $ --- > /* $Header: /usr/people/sam/fax/recvfax/RCS/alter.c,v 1.10 93/08/14 19:51:02 sam Exp $ 27d26 < #include EOF-EOF-EOF Patch recvfax/auth.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/recvfax/RCS/auth.c,v 1.8 93/03/31 15:01:14 sam Exp $ --- > /* $Header: /usr/people/sam/fax/recvfax/RCS/auth.c,v 1.9 93/08/14 19:51:29 sam Exp $ 27d26 < #include EOF-EOF-EOF Patch recvfax/defs.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/recvfax/RCS/defs.h,v 1.14 93/07/26 10:59:27 sam Exp $ --- > /* $Header: /usr/people/sam/fax/recvfax/RCS/defs.h,v 1.16 93/08/14 19:51:30 sam Exp $ 29a30 > #include 35a37,38 > > #include "port.h" EOF-EOF-EOF Patch recvfax/jobs.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/recvfax/RCS/jobs.c,v 1.20 93/07/26 10:59:28 sam Exp $ --- > /* $Header: /usr/people/sam/fax/recvfax/RCS/jobs.c,v 1.21 93/08/14 19:51:31 sam Exp $ 27d26 < #include 31c30 < #include --- > #include EOF-EOF-EOF Patch recvfax/remove.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/recvfax/RCS/remove.c,v 1.11 93/07/26 10:59:30 sam Exp $ --- > /* $Header: /usr/people/sam/fax/recvfax/RCS/remove.c,v 1.12 93/08/14 19:51:32 sam Exp $ 27d26 < #include EOF-EOF-EOF Patch recvfax/status.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/recvfax/RCS/status.c,v 1.20 93/07/26 10:59:31 sam Exp $ --- > /* $Header: /usr/people/sam/fax/recvfax/RCS/status.c,v 1.21 93/08/12 17:15:28 sam Exp $ 273c273 < #ifdef svr4 --- > #if defined(svr4) || defined(hpux) EOF-EOF-EOF Patch recvfax/submit.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/recvfax/RCS/submit.c,v 1.19 93/07/26 10:59:32 sam Exp $ --- > /* $Header: /usr/people/sam/fax/recvfax/RCS/submit.c,v 1.20 93/08/14 19:51:32 sam Exp $ 30c30 < #include --- > #include EOF-EOF-EOF Patch sendfax/sendfax.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/sendfax/RCS/sendfax.c++,v 1.53 93/07/27 12:22:54 sam Exp $ --- > /* $Header: /usr/people/sam/fax/sendfax/RCS/sendfax.c++,v 1.56 93/08/15 11:24:09 sam Exp $ 32c32 < #include --- > #include 36d35 < 41,42d39 < < int close(int); 217a215,223 > if (db && dest.length() > 0) { > fxStr name; > FaxDBRecord* r = db->find(dest, &name); > if (r) { > if (recipient == "") > recipient = name; > dest = r->find(FaxDB::numberKey); > } > } 244,245d249 < < extern "C" int mkstemp(char*); EOF-EOF-EOF Patch util/Array.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/Array.c++,v 1.6 93/01/13 18:54:13 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/Array.c++,v 1.8 93/08/15 11:22:29 sam Exp $ 26,27c26 < #include "malloc.h" < #include "libc.h" --- > #include EOF-EOF-EOF Patch util/Array.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/Array.h,v 1.4 93/03/11 11:52:26 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/Array.h,v 1.5 93/08/12 16:45:53 sam Exp $ 27,28c27,28 < // $Revision: 1.4 $ < // $Date: 93/03/11 11:52:26 $ --- > // $Revision: 1.5 $ > // $Date: 93/08/12 16:45:53 $ 321c321 < bzero(start,numbytes); \ --- > memset(start,0,numbytes); \ EOF-EOF-EOF Patch util/AtSyntax.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/AtSyntax.c++,v 1.2 93/07/25 12:50:10 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/AtSyntax.c++,v 1.4 93/08/15 11:22:36 sam Exp $ EOF-EOF-EOF Patch util/FaxClient.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/FaxClient.c++,v 1.28 93/07/16 10:29:53 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/FaxClient.c++,v 1.30 93/08/16 08:19:05 sam Exp $ 232a233,238 > FaxClient::sendLine(const char* cmd, const fxStr& s) > { > sendLine(cmd, (char*) s); > } > > void 315a322 > prevcc = 0; EOF-EOF-EOF Patch util/FaxClient.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/FaxClient.h,v 1.13 93/01/24 17:15:22 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/FaxClient.h,v 1.14 93/08/16 08:18:53 sam Exp $ 96,97c96 < virtual void sendLine(const char* cmd, const fxStr& s) < { sendLine(cmd, (char*) s); } --- > virtual void sendLine(const char* cmd, const fxStr& s); EOF-EOF-EOF Patch util/Obj.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/Obj.c++,v 1.2 93/01/13 18:54:20 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/Obj.c++,v 1.3 93/08/16 08:19:19 sam Exp $ 28a29 > fxObj::~fxObj() { } EOF-EOF-EOF Patch util/Obj.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/Obj.h,v 1.2 93/01/13 18:54:20 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/Obj.h,v 1.3 93/08/16 08:19:11 sam Exp $ 28,29c28,29 < // $Revision: 1.2 $ < // $Date: 93/01/13 18:54:20 $ --- > // $Revision: 1.3 $ > // $Date: 93/08/16 08:19:11 $ 52d51 < inline fxObj::~fxObj() { } EOF-EOF-EOF Patch util/PageSize.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/PageSize.c++,v 1.8 93/06/28 16:59:40 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/PageSize.c++,v 1.10 93/08/15 11:22:37 sam Exp $ 36,40d35 < < #ifdef __GNUC__ < extern "C" int strncasecmp(const char *, const char *, size_t); < extern "C" unsigned long int strtoul(const char *, char **, int); < #endif EOF-EOF-EOF Patch util/SendFaxClient.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/SendFaxClient.c++,v 1.11 93/07/27 12:22:08 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/SendFaxClient.c++,v 1.13 93/08/15 11:22:38 sam Exp $ 34a35 > #include 39,45d39 < < #ifndef __linux__ < int gethostname(char*, int); < #endif < #ifdef __GNUC__ < char* strerror(int); < #endif 54,55d47 < < extern "C" int mkstemp(char*); EOF-EOF-EOF Patch util/StackBuffer.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/StackBuffer.c++,v 1.3 93/01/13 18:54:22 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/StackBuffer.c++,v 1.5 93/08/15 11:22:39 sam Exp $ 26,27c26 < #include "libc.h" < #include "malloc.h" --- > #include EOF-EOF-EOF Patch util/Str.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/Str.c++,v 1.13 93/05/03 17:15:02 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/Str.c++,v 1.15 93/08/15 11:22:39 sam Exp $ 26,28c26,27 < #include "malloc.h" < #include "ctype.h" < #include "libc.h" --- > #include > #include EOF-EOF-EOF Patch util/TypeRules.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/TypeRules.c++,v 1.12 93/06/18 11:44:20 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/TypeRules.c++,v 1.15 93/08/16 08:19:24 sam Exp $ 32,35c32,33 < #ifdef __GNUC__ < extern "C" int strncasecmp(const char *, const char *, size_t); < extern "C" unsigned long int strtoul(const char *, char **, int); < #endif --- > #include > #include 81c79,80 < for (u_int i = 0; i < size; i++) --- > u_int i; > for (i = 0; i < size; i++) EOF-EOF-EOF Patch util/Types.h<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/Types.h,v 1.10 93/02/21 17:56:58 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/Types.h,v 1.11 93/08/15 10:45:28 sam Exp $ 32a33 > #include "port.h" EOF-EOF-EOF Patch util/faxanswer.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/faxanswer.c,v 1.12 93/05/10 09:27:22 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/faxanswer.c,v 1.13 93/08/13 15:15:22 sam Exp $ 32a33 > #include "port.h" EOF-EOF-EOF Patch util/faxquit.c<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/faxquit.c,v 1.11 93/03/31 14:59:04 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/faxquit.c,v 1.12 93/08/13 15:15:24 sam Exp $ 32a33 > #include "port.h" EOF-EOF-EOF Patch util/notify.sh<<'EOF-EOF-EOF' 2c2 < # $Header: /usr/people/sam/fax/util/RCS/notify.sh,v 1.4 93/07/31 18:20:33 sam Exp $ --- > # $Header: /usr/people/sam/fax/util/RCS/notify.sh,v 1.5 93/08/07 19:37:04 sam Exp $ 160c160 < print "Additional information:\n " status; --- > print " Additional information:\n " status; EOF-EOF-EOF Patch util/textfmt.c++<<'EOF-EOF-EOF' 1c1 < /* $Header: /usr/people/sam/fax/util/RCS/textfmt.c++,v 1.17 93/07/29 14:01:58 sam Exp $ --- > /* $Header: /usr/people/sam/fax/util/RCS/textfmt.c++,v 1.20 93/08/15 11:22:41 sam Exp $ 41d40 < #include 45a45,47 > extern "C" { > #include > } 47,50d48 < #ifdef __GNUC__ < extern "C" int strncasecmp(const char *, const char *, size_t); < #endif < 126a125,127 > #ifdef LC_CTYPE > setlocale(LC_CTYPE, ""); > #endif EOF-EOF-EOF