⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rzsz.sh

📁 Linux下基于Z-MODEM的串口通讯程序源码
💻 SH
📖 第 1 页 / 共 5 页
字号:
---- Cut Here and feed the following to sh ----#!/bin/sh# This is a shell archive (produced by GNU sharutils 4.2.1).# To extract the files from this archive, save it to some FILE, remove# everything before the `!/bin/sh' line above, then type `sh FILE'.## Made on 2003-01-30 15:57 PST by <caf@omen.com>.# Source directory was `/u/caf/src/modem/3'.## Existing files will *not* be overwritten unless `-c' is specified.## This shar contains:# length mode       name# ------ ---------- ------------------------------------------#    891 -rw-rw-r-- COPYING#   4769 -rw-r--r-- README#   8650 -rw-r--r-- Makefile#   6513 -rw-r--r-- zmodem.h#  17715 -rw-r--r-- zm.c#   7626 -rw-r--r-- undos.c#   4351 -rw-r--r-- zmr.c#  38424 -rw-r--r-- sz.c#  30340 -rw-r--r-- rz.c#   8764 -rw-r--r-- crctab.c#   3657 -rw-rw-r-- mailer.rz#   8824 -rw-r--r-- crc.c#  10014 -rw-r--r-- rbsb.c#   2868 -rw-r--r-- minirb.c#   1492 -rw-r--r-- crc.doc#   2727 -rw-r--r-- minirb.doc#  19632 -rw-rw-r-- rz.doc#  26418 -rw-rw-r-- sz.doc#   4282 -rw-rw-r-- undos.doc#     22 -rw-r--r-- gz#    738 -rw-r--r-- zupl.t#save_IFS="${IFS}"IFS="${IFS}:"gettext_dir=FAILEDlocale_dir=FAILEDfirst_param="$1"for dir in $PATHdo  if test "$gettext_dir" = FAILED && test -f $dir/gettext \     && ($dir/gettext --version >/dev/null 2>&1)  then    set `$dir/gettext --version 2>&1`    if test "$3" = GNU    then      gettext_dir=$dir    fi  fi  if test "$locale_dir" = FAILED && test -f $dir/shar \     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)  then    locale_dir=`$dir/shar --print-text-domain-dir`  fidoneIFS="$save_IFS"if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILEDthen  echo=echoelse  TEXTDOMAINDIR=$locale_dir  export TEXTDOMAINDIR  TEXTDOMAIN=sharutils  export TEXTDOMAIN  echo="$gettext_dir/gettext -s"fiif touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then  shar_touch='touch -am $3$4$5$6$2 "$8"'else  shar_touch=:  echo  $echo 'WARNING: not restoring timestamps.  Consider getting and'  $echo "installing GNU \`touch', distributed in GNU File Utilities..."  echofirm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch#if mkdir _sh04808; then  $echo 'x -' 'creating lock directory'else  $echo 'failed to create lock directory'  exit 1fi# ============= COPYING ==============if test -f 'COPYING' && test "$first_param" != -c; then  $echo 'x -' SKIPPING 'COPYING' '(file already exists)'else  $echo 'x -' extracting 'COPYING' '(text)'  sed 's/^X//' << 'SHAR_EOF' > 'COPYING' &&Rz ans Sz are Copyrighted shareware programs.  Commercial Use ofthese programs is subject to licensing conditions detailed inthe sz.c source code.  "Commercial Use" includes use of thisprogram to transfer files to/from any commercial or sharewareprogram not published by Omen Technology INC.  Please print the"mailer.rz" file, fill out the form and return it with yourregistration.XIt is a violation of this program's Copyright to distributebinaries without the accompanying *.doc, README, and COPYINGfiles.XThis software may be freely used to support file transferoperations to or from duly licensed Omen Technology products.This includes DSZ, GSZ, ZCOMM, Professional-YAM and PowerCom.Those desiring to use rz/sz this way must add thefollowing to the sz compile line: -DCOMPLXUse with other commercial or shareware programs(Crosstalk, Procomm, etc.) REQUIRES REGISTRATION.SHAR_EOF  (set 19 96 01 12 06 02 14 'COPYING'; eval "$shar_touch") &&  chmod 0664 'COPYING' ||  $echo 'restore of' 'COPYING' 'failed'  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then    md5sum -c << SHAR_EOF >/dev/null 2>&1 \    || $echo 'COPYING:' 'MD5 check failed'3a4a206ee9b76dd6ed1ad22f3035a287  COPYINGSHAR_EOF  else    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'COPYING'`"    test 891 -eq "$shar_count" ||    $echo 'COPYING:' 'original size' '891,' 'current size' "$shar_count!"  fifi# ============= README ==============if test -f 'README' && test "$first_param" != -c; then  $echo 'x -' SKIPPING 'README' '(file already exists)'else  $echo 'x -' extracting 'README' '(text)'  sed 's/^X//' << 'SHAR_EOF' > 'README' &&Unix Rz and sz support XMODEM, YMODEM, and ZMODEM transfers viathe dial-in controlling TTY (or PTY) port.  Client rz/szprograms in crzsz.zip should be used for dial-out applications.XAlso included is the "undos" program which converts betweenUnix, MSDOS, CP/M, and Macintosh text file end of line conventions.XThe contents of this archive can be uploaded to a remote Unix orXXenix system by ZCOMM or Professional-YAM using the suppliedzupl.t script.  Connect to your Unix/Xenix system, select anempty directory, and then give the YAM/ZCOMM command: "sourcezupl.t".  This will upload minirb.c, compile it, and then useminirb to bootstrap upload the rz/sz files.XOnce these files are on your Unix system, you can type "make".The Makefile will list the various systems it knows how tocompile the programs for, and the command to do so (e.g.,"make bsd").XThe Makefile is self explanatory; just say "make".XUnregistered users can obtain support on a consulting basis.Please call 503-614-0430 to arrange consulting support.XRegistered users with support options can obtain support forproblems not involving terminal servers or third party softwareusing email or the regular Omen Technology phone number.XRz and sz work best with comm programs that properly supportZMODEM command and file AutoDownload (Pro-YAM and ZCOMM).XThe "GSZ" shareware program allows ZMODEM file transfers withDOS comm programs.  GSZ provides a "mini term function" thatsupports ZMODEM AutoDownload.  GSZ (part of GSZ.ZIP) and ZCOMM(ZCOMMEXE.ZIP, ZCOMMDOC.ZIP, ZCOMMHLP.ZIP) are available onTeleGodzilla and other fine bulletin boards.XThis software may be freely used to support file transferoperations to or from duly licensed Omen Technology products.This includes DSZ, GSZ, ZCOMM, Professional-YAM and PowerCom.Institutions desiring to use rz/sz this way should add thefollowing to the sz compile line: -DCOMPLPrograms based on stolen or public domain ZMODEM materials arenot included.  Use with other commercial or shareware programs(Crosstalk, Procomm, etc.) REQUIRES REGISTRATION.XUnregistered copies of rz and sz mail messages indicatingtheir use after successful file transfers.  Registrationeliminates this code.XRz ans Sz are Copyrighted shareware programs.  Commercial Use ofthese programs is subject to licensing conditions detailed inthe sz.c source code.  "Commercial Use" includes use of thisprogram to transfer files to/from any commercial or sharewareprogram not published by Omen Technology INC.  Please print the"mailer.rz" file, fill out the form and return same with yourregistration.X1.xx and 2.xx versions of rz and sz (April 1988) are Public Domain,but lack recent enhancements and bug fixes.XThe Man pages are formatted for those without Unix nroff.  Forbest results, use less(1) (available on comp.sources.misc) asyour manual page reader.  The troff sources for the rz/sz man pagesare included with copies of Unix Professional-YAM, and are providedto registered sites as described in the mailer.rz file.XPlease check our web page www.omen.com for the latest updates.XFTP access is available at ftp.cs.pdx.edu pub/zmodemdirectory.  This account has the latest and greatest selectionof OMEN files available for FTP.  The files in this direcotryare uploaded with ZMODEM directly from the Omen home system,preserving modification dates and file contents.XVMS systems are now supported with native VMS versions inRZSZ.TLB.  The rz and sz in RZSZ.TLB support wild cards andVMS record types.XIn order for us to handle problem reports, we must have theexact error messages displayed by Professional-YAM.  Iftransfers do not work at all, we must have complete results ofthe sz -T test procedure!  If you are not using an OmenTechnology product to talk to rz/sz and have not registeredrz/sz, contact the author of the communications program you havepurchased for support.  Some heavily marketed programs do notproperly support the XMODEM, YMODEM, and/or ZMODEM protocols.XThe Omen Technology Code in unmodified copies of rz/sz 3.54is Y2K Compliant.  When compiled by a Y2K compliantcompiler, linked with a Y2K compliant library, executed on aY2K compliant system, and used with Y2K compliant clients,rz/sz 3.54 is Y2K compliant.  Consulting is available toinvestigate Y2K issues with third party software.  OmenTechnology cannot accept liability for Y2K problems causedby third party software.XXChuck Forsberg WA7KGX     caf@omen.COM     http://www.omen.comX   Omen Technology Inc      "The High Reliability Software"Author of YMODEM, ZMODEM, Professional-YAM, ZCOMM, GSZ and DSZTeleGodzilla BBS: 503-617-1698  FTP: ftp.cs.pdx.edu pub/zmodemPOB 4681 Portland OR 97208     503-614-0430   FAX:503-629-0665XSHAR_EOF  (set 20 00 11 27 12 02 52 'README'; eval "$shar_touch") &&  chmod 0644 'README' ||  $echo 'restore of' 'README' 'failed'  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then    md5sum -c << SHAR_EOF >/dev/null 2>&1 \    || $echo 'README:' 'MD5 check failed'e7816546bec0104e26e037d8c90a5734  READMESHAR_EOF  else    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'README'`"    test 4769 -eq "$shar_count" ||    $echo 'README:' 'original size' '4769,' 'current size' "$shar_count!"  fifi# ============= Makefile ==============if test -f 'Makefile' && test "$first_param" != -c; then  $echo 'x -' SKIPPING 'Makefile' '(file already exists)'else  $echo 'x -' extracting 'Makefile' '(text)'  sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&# Makefile for Unix/Xenix rz and sz programs# Some targets may not be up to dateCC=ccOFLAG= -OXXnothing:X	@echoX	@echo "Please study the #ifdef's in crctab.c, rbsb.c, rz.c and sz.c,"X	@echo "make any necessary hacks for oddball or merged SYSV/BSD systems,"X	@echo "then type 'make SYSTEM' where SYSTEM is one of:"X	@echoX	@echo "	posix	POSIX compliant systems (Linux, FBSD, etc.)"X	@echo "	aix	AIX systems"X	@echo "	next	NeXtstep v3.x (POSIX)"X	@echo "	odt	SCO Open Desktop"X	@echo "	everest	SCO Open Desktop (elf, strict)"X	@echo "	sysvr4	SYSTEM 5.4 Unix"X	@echo "	sysvr3	SYSTEM 5.3 Unix with mkdir(2), COHERENT 4.2"X	@echo "	sysv	SYSTEM 3/5 Unix"X	@echo "	sysiii  SYS III/V  Older Unix or Xenix compilers"X	@echo "	xenix	Xenix"X	@echo "	x386	386 Xenix"X	@echo "	bsd	Berkeley 4.x BSD, Ultrix, V7"X	@echo "	tandy	Tandy 6000 Xenix"X	@echo "	dnix	DIAB Dnix 5.2"X	@echo "	dnix5r3	DIAB Dnix 5.3"X	@echo "	amiga	3000UX running SVR4"X	@echo "	POSIX	POSIX compliant systems (SCO Open Desktop, strict)"X	@echoX	@echo "	undos	Make the undos, todos, etc. program."X	@echo "	doc	Format the man pages with nroff"X	@echoXall:doc usenet unixforum sshar shar zip zooXusenet:docX	shar -c -a -n rzsz -o /tmp/rzsz -l64 \X	  COPYING README Makefile undos.c zmodem.h zm.c rz.c rbsb.c \X	 crc.c crctab.c minirb.c mailer.rz zmr.c *.doc gz sz.c *.t Xsshar:docX	shar -c -a -n rzsz -o /tmp/rzsz -l64 \X	  COPYING README Makefile undos.c zmodem.h zm.c rz.c rbsb.c \X	 crc.c crctab.c mailer.rz zmr.c *.doc gz sz.cXshar:docX	shar -c COPYING README Makefile zmodem.h zm.c \X	 undos.c zmr.c sz.c rz.c crctab.c \X	 mailer.rz crc.c rbsb.c minirb.c *.doc gz *.t >/tmp/rzsz.shX	 cp /tmp/rzsz.sh /u/t/yamXunixforum: sharX	rm -f /tmp/rzsz.sh.gzX	gzip -9 /tmp/rzsz.shX	cp /tmp/rzsz.sh.gz /u/t/yamXdoc:rz.doc sz.doc crc.doc minirb.doc undos.docXclean:X	rm -f *.o *.out sz sb sx zcommand zcommandi rz rb rx rcX	rm -f undos tounix todos unmac tomac tocpm unparityXminirb.doc:minirb.1X	nroff -man minirb.1 | col  >minirb.docXrz.doc:rz.1 servers.miX	nroff -man rz.1 | col  >rz.docXsz.doc:sz.1 servers.miX	nroff -man sz.1 | col  >sz.docXcrc.doc:crc.1X	nroff -man crc.1 | col  >crc.docXundos.doc:undos.1X	nroff -man undos.1 | col  >undos.docXzoo: docX	-rm -f /tmp/rzsz.zooX	zoo ah /tmp/rzsz COPYING README Makefile zmodem.h zm.c sz.c rz.c \X	 undos.c mailer.rz crctab.c rbsb.c *.doc \X	 zmr.c crc.c gz *.t minirb.cX	touch /tmp/rzsz.zooX	chmod og-w /tmp/rzsz.zooX	mv /tmp/rzsz.zoo /u/t/yamXzip:docX	-rm -f rzsz.zipX	zip rzsz readme mailer.rz makefile zmodem.h zm.c sz.c rz.c undos.c \X	crctab.c rbsb.c *.doc file_id.diz zmr.c crc.c gz *.t minirb.c X	mv rzsz.zip /u/t/yamXtag: doc  xenixX	-rm -f /tmp/rzszX	tar cvf /tmp/rzsz COPYING README Makefile zmodem.h zm.c sz.c rz.c \X	 mailer.rz crctab.c rbsb.c *.doc \X	 undos.c zmr.c crc.c gz *.t minirb.c rz sz crc undosX	gzip -9 /tmp/rzszX	mv /tmp/rzsz.gz /u/t/yam/rzsz.tagXtar:docX	tar cvf /tmp/rzsz.tar COPYING README Makefile zmodem.h zm.c sz.c rz.c \X	 undos.c mailer.rz crctab.c rbsb.c \X	 zmr.c crc.c *.1 gz *.t minirb.cXtags:X	ctags sz.c rz.c zm.c zmr.c rbsb.cXX.PRECIOUS:rz szXxenix:X	/usr/ods30/bin/cc \X	-I/usr/ods30/usr/include -I/usr/ods30/usr/include/sys \X	-M2l $(CFLAGS) $(RFLAGS) $(OFLAG) -s -DUSG -DNFGVMIN -DREADCHECK sz.c -lx -o szX	size sz; file szX	-rm -f sb sx zcommand zcommandiX	ln sz sbX	ln sz sxX	ln sz zcommandX	ln sz zcommandiX	/usr/ods30/bin/cc \X	 -I/usr/ods30/usr/include -I/usr/ods30/usr/include/sys \X	-M2 $(CFLAGS) $(RFLAGS) $(OFLAG) -s -DUSG -DMD rz.c -o rzX	size rz; file rzX	-rm -f rb rx rcX	ln rz rbX	ln rz rxX	ln rz rcX	/usr/ods30/bin/cc \X	 -I/usr/ods30/usr/include -I/usr/ods30/usr/include/sys \X	-M2 $(CFLAGS) $(OFLAG) -s undos.c -o undosX	size undos; file undosX	-rm -f tounix todos unmac tomac tocpm unparityX	ln undos tounixX	ln undos todosX	ln undos unmacX	ln undos tomacX	ln undos tocpmX	ln undos unparityXx386:X	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DUSG -DMD rz.c -o rzX	size rzX	-rm -f rb rx rcX	ln rz rbX	ln rz rxX	ln rz rcX	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DUSG -DNFGVMIN -DREADCHECK sz.c -lx -o szX	size szX	-rm -f sb sx zcommand zcommandiX	ln sz sbX	ln sz sxX	ln sz zcommandX	ln sz zcommandiXsysv:X	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DUSG -DMD -DOLD rz.c -o rzX	size rzX	-rm -f rb rx rcX	ln rz rbX	ln rz rxX	ln rz rcX	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DUSG -DSV -DNFGVMIN -DOLD sz.c -o szX	size szX	-rm -f sb sx zcommand zcommandiX	ln sz sbX	ln sz sxX	ln sz zcommandX	ln sz zcommandiXsysiii:X	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DUSG -DOLD rz.c -o rzX	size rzX	-rm -f rb rx rcX	ln rz rbX	ln rz rxX	ln rz rcX	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DSV -DUSG -DNFGVMIN -DOLD sz.c -o szX	size szX	-rm -f sb sx zcommand zcommandiX	ln sz sbX	ln sz sxX	ln sz zcommandX	ln sz zcommandiXsysvr3:X	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DUSG -DMD=2 rz.c -o rzX	size rzX	-rm -f rb rx rcX	ln rz rbX	ln rz rxX	ln rz rcX	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DSV -DUSG -DNFGVMIN sz.c -o szX	size szX	-rm -f sb sx zcommand zcommandiX	ln sz sbX	ln sz sxX	ln sz zcommandX	ln sz zcommandiXsysvr4:X	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DUSG -DMD=2 rz.c -o rzX	size rzX	-rm -f rb rx rcX	ln rz rbX	ln rz rxX	ln rz rcX	$(CC) $(CFLAGS) $(RFLAGS) $(OFLAG) -DSV -DUSG sz.c -o szX	size szX	-rm -f sb sx zcommand zcommandiX	ln sz sbX	ln sz sxX	ln sz zcommandX	ln sz zcommandiXodt:X	cc -O -n $(RFLAGS) -DUSG -DMD=2 rz.c -o rzX	size rzX	-rm -f rb rx rcX	ln rz rbX	ln rz rxX	ln rz rcX	cc -O -n $(RFLAGS) -DUSG -DREADCHECK sz.c -lx -o szX	size sz

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -