Path: utzoo!hoptoad!amdcad!apple!bloom-beacon!tut.cis.ohio-state.edu!triceratops.cis.ohio-state.edu!karl
From: karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste)
Newsgroups: alt.sources
Subject: xcomm 2.2, part 1 of 3 (docs)
Message-ID: <22714@tut.cis.ohio-state.edu>
Date: 27 Sep 88 21:24:31 GMT
Sender: news@tut.cis.ohio-state.edu
Lines: 954

This is xcomm 2.2, which I mentioned in alt.bbs a few days ago.  It
was written originally to do Xmodem transfers by one Eric Coe about 3
years ago.  larry gensch got a hold of it and more or less took it
over last year, and added numerous features to it, most importantly
CompuServe's B Protocol, including Quick B support.  It now supports
numerous configuration parameters, supports a small scripting
language, is capable of automatic response to CServe-ish ENQ xfer
requests, creates and respects HDB UUCP-style LCK files.  It can be
installed setuid-UUCP because the entry module now includes a
setuid(getuid()) call before anything more than outbound line
initialization takes place.

Suggestions, improvements, bug fixes -> to me and I'll relay them to
the author.  Note that there is a file doc/script.future which
describes the author's intended improvements.  The next version (2.3
or 2.4, not sure which) is anticipated around the first of the year.

--Karl

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	doc
# This archive created: Tue Sep 27 17:13:20 1988
# By:	Karl Kleinpaste (OSU)
export PATH; PATH=/bin:$PATH
if test ! -d 'doc'
then
	echo shar: creating directory "'doc'"
	mkdir 'doc'
fi
echo shar: entering directory "'doc'"
cd 'doc'
echo shar: extracting "'historical.doc'" '(1432 characters)'
if test -f 'historical.doc'
then
	echo shar: will not over-write existing file "'historical.doc'"
else
sed 's/^X//' << \SHAR_EOF > 'historical.doc'
X
X	    X C O M M     R E V I S I O N     H I S T O R Y
X
X
XVersion 2.2	larry gensch	14 Dec 87	Major code restructure
X    Reduced program and command options
X    Added SET command for setting various parameters
X    Added HANGUP command for disconnecting modem
X    Modified xccisb.c code to support CIS "Quick B" Protocol
X    Added xcscrpt.c code for processing script files
X    Added SCRIPT= parameter to phonebook processing (auto-logon scripts)
X    Added CIS parameter for CIS  auto transfers
X    Added NL parameter for newline translation
X    Added HANGUP command from terminal mode
X    Added SCRIPT command from terminal mode
X
XVersion 2.1b	larry gensch	11 Nov 87	Bug Fix release
X    (no bugs in the code, just some portability fixes)
X    Changed "sigset" in xccisb to "signal"
X    Removed #include  from xcxmdm
X
XVersion 2.1a	larry gensch	28 Oct 87	General Update
X    Added CIS "B" Protocol (c, ct commands)
X    Added BAUD= & BITS= parameters to phonelist file.
X    Switched some command letters
X    Revised command line parsing to use getopt()
X
XVersion 2.0	larry gensch	19 Oct 87	Revisions for System V.3
X    Changed  references to  (modified ioctl(2) calls)
X    Changed terminal mode function keys to  sequences; added getconchr()
X
XVersion 1.1	Eric E Coe	21 Jul 85
X    Autodial for Hayes-compatible modem.
X    General rearranging of the code
X
XVersion 1.0	Eric E Coe	12 Apr 85
X    Program created
SHAR_EOF
if test 1432 -ne "`wc -c < 'historical.doc'`"
then
	echo shar: error transmitting "'historical.doc'" '(should have been 1432 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phonelist.doc'" '(1475 characters)'
if test -f 'phonelist.doc'
then
	echo shar: will not over-write existing file "'phonelist.doc'"
else
sed 's/^X//' << \SHAR_EOF > 'phonelist.doc'
XFormat of the .phonelist file:
X
X1.  The .phonelist must exist with the file name ".phonelist" either in the
X    current directory, or your home directory as defined by the $HOME
X    environment variable.  The name of the phonelist file can be changed
X    using the SET PFILE command.
X
X2.  The .phonelist file is ASCII text (lines of text separated by newlines).
X    It can be created and maintained using emacs, vi, or even ed.
X
X3.  The first field of data in each line (after any whitespace and up to the
X    next occurance of whitespace) is assumed to be a phone number in a valid
X    format for the modem being dialed.
X
X4.  Any text may follow the phone number.
X
X5.  Special strings within each line:
X
X    BITS=x	(x=7|8) - Set the terminal mode mask to 7/8 bits.
X    BAUD=nnnn	(n=300|1200|2400|4800|9600) - Set the baud rate to the
X		specified value
X    SCRIPT=file	Immediately after sending the autodial string, execute the
X		script file specified. (Note that the specified filename is
X		CASE SENSITIVE!)
X
X6.  A sample entry is shown below:
X
X     687-0374	CompuServe		BITS=7	BAUD=1200, SCRIPT=cis.cmd
X
X    The above entry indicates that the number to be dialed is 687-0374; the
X    bit mask is to be set to seven bits (ignore high bits), the baud rate is
X    to be set to 1200 baud, and commands are to be taken from the file
X    "compusrv.cmd" in either the current or home directory.
X
X    A sample .phonelist file is included in the XCOMM source code
X    distribution.
SHAR_EOF
if test 1475 -ne "`wc -c < 'phonelist.doc'`"
then
	echo shar: error transmitting "'phonelist.doc'" '(should have been 1475 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'read.me'" '(1528 characters)'
if test -f 'read.me'
then
	echo shar: will not over-write existing file "'read.me'"
else
sed 's/^X//' << \SHAR_EOF > 'read.me'
XXCOMM 2.2:
X
XNew in this release...
X
X*   Modified XCOMM command line interface
X*   CIS "Quick B" Protocol support for faster up/downloads
X*   Brand new script processor with integration into the phonebook
X*   Some code cleanup
X*   Better "vanilla" Unix support (thanks to bug reports)
X
XRefer to "historical.doc" for a list of ALL new features.
X
XXCOMM is a PUBLIC DOMAIN (not shareware) communication program that works on 
XUnix System V.3.  It probably works on other Unix systems with no 
Xmodification, since no machine specific coding was done.  
X
XXCOMM is distributed in two bundles:
X
XXCM22DOC.SH	All documentation for XCOMM
XXCM22SRC.SH	All source code, header files, and makefile.
X
XThis README manifest file is included in both packages.
X
XContents of XCM22DOC.SH:
X
Xreadme		This manifest file
Xscript.doc	Quick reference to the XCOMM script language
Xxcomm.doc	Latest documentation for the XCOMM program
Xhistorical.doc	Historical information about versions 1.0 and 1.1
Xphonelist.doc	Documentation on using XCOMM's phonelist
X
X
XContents of XCM22SRC.SH:
X
Xreadme		This manifest file
Xinstall.doc	Quick installation notes
XMakefile	Make file for compiling XCOMM
Xxcomm.h		XCOMM's header file
Xxcomm.c		XCOMM main program
Xxccisb.c	XCOMM CIS-B/QuickB protocol module
Xxcport.c	XCOMM Terminal I/O module
Xxcscrpt.c	XCOMM Script processor
Xxcsubs.c	XCOMM's subroutines
Xxcterm.c	XCOMM Terminal mode module
Xxcxmdm.c	XCOMM XMODEM protocol module
Xcis.cmd		A sample XCOMM script file for logging onto CompuServe.
X.phonelist	A sample Phone List file
SHAR_EOF
if test 1528 -ne "`wc -c < 'read.me'`"
then
	echo shar: error transmitting "'read.me'" '(should have been 1528 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'script.doc'" '(7145 characters)'
if test -f 'script.doc'
then
	echo shar: will not over-write existing file "'script.doc'"
else
sed 's/^X//' << \SHAR_EOF > 'script.doc'
X
X		    XCOMM SCRIPT QUICK REFERENCE
X			XCOMM Release 2.2
X
X
X
XIntroduction
X
X    Script files can automate some tedious tasks such as logging into a
X    system.  A script file is an Ascii text file and may be entered or
X    edited using any standard Unix text editor.
X
X    The script file is read line by line.  Empty lines (consisting of white
X    space only) are ignored.  Comments are lines whose first non-space
X    character is a pound sign (#).
X
X    The script processor reads each script line, ignoring leading white
X    space, into "words".  A word is defined as either:
X
X    - A sequence of characters delimited by white space; or
X    - A sequence of characters enclosed in single or double quotes.
X
X    The first word of a script file is considered the "command word."
X    If the last character of the command word is a colon (:), the line is
X    considered to be a LABEL (the object of a GOTO statement).  Otherwise,
X    it is assumed to be a script command and is interpreted as such.
X    Command words are case insensative.
X
X    Some commands take one or more arguments.  Each argument is parsed as a
X    single word as defined above.  If blanks are required in an argument,
X    the argument MUST be quoted using single or double quotes.
X
X    Enclosed in the XCOMM distribution is the file "compusrv.cmd".  This is
X    an example script file (No, that is not really my user ID or my
X    password in that file!), and shows the use of most of the available
X    script commands.  The script commands are self explanatory for the most
X    part.
X
X
XStartup Scripts
X
X    When XCOMM is started up, it looks for the file ".xcomm" in the current
X    or $HOME directory.  If it is found, it is executed.  This is useful for
X    setting your "basic" parameters without having to recompile XCOMM.  For
X    example, your startup file may turn CIS  mode off, set your baud
X    rate to 9600, and set 7BIT translation.
X
X
XScript Command List
X
X    Below is the description of all commands that may be used in the XCOMM
X    script language:
X
X
XCAPTURE ON|OFF
X
X    The command CAPTURE ON will open the capture command; all characters
X    received during WAITFOR processing will be appended to the capture file.
X    The command CAPTURE OFF will close the capture file.
X
X    This setting does NOT currently extend to terminal mode.  This may be
X    offered in a later release (probably through the SET command).
X
X
XDIAL 
X
X    Dial the specified number.  XCOMM supports generic "Hayes" compatible
X    modems for dialing.  Note that this command requires an actual phone
X    number; the phonebook is not used for this function.
X
X
XECHO ON|OFF
X
X    If the argument to the ECHO command is ON, all subsequent command lines
X    that are processed will be displayed on the local screen.  The exception
X    to this is lines containing a TRANSMIT command.  These lines will just
X    print "TRANSMIT ...", so that passwords, etc. can be protected.
X
X    If the argument to the ECHO command is OFF, scripts will execute
X    quietly (this is the default setting).
X
X
XEXIT
X
X    Terminate the script file prior to the end of file.  Returns to terminal
X    mode.
X
X
XGOTO