Pcomm v1.2 (2 of 8)
egray at fthood.UUCP
egray at fthood.UUCP
Sat Feb 4 03:35:00 AEST 1989
This is part 2 (of 8) to the Pcomm v1.2 distribution package.
Emmet P. Gray US Army, HQ III Corps & Fort Hood
...!uunet!uiucuxc!fthood!egray Attn: AFZF-DE-ENV
Directorate of Engineering & Housing
Environmental Management Office
Fort Hood, TX 76544-5057
-------------------------------------------------------------------------------
#! /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:
# Makefile
# Matches.1
# Modem_break.1
# Pcomm.1
# Pcomm.dial_dir
# Pcomm.extrnl
# Pcomm.modem
# Pcomm.param
# Readme
# Release.notes
# Sample
# Unixpc.shar
# Waitfor.1
# This archive created: Fri Feb 3 07:35:17 1989
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'Makefile'" '(5364 characters)'
if test -f 'Makefile'
then
echo shar: "will not over-write existing file 'Makefile'"
else
sed 's/^X//' << \SHAR_EOF > 'Makefile'
X# PCOMM
X# for a generic Unix box
X
X#for 80286 versions of SCO Xenix
X#CFLAGS = -Od -DM_TERMINFO -Mle2 -LARGE
X#LDFLAGS = -SEG 1000 -F 5000 -Mle2
X#CURSES = -ltinfo -lx
X#TERMLIB = -ltinfo -lx
X
XCFLAGS = -O
XLDFLAGS = -s
XSHAR = shar -a
XBIN = /usr/local/bin
X
X#for old curses(3) or Berkeley systems
X#CURSES = -lcurses -ltermcap
X#TERMLIB = -ltermcap
XCURSES = -lcurses
XTERMLIB = -lcurses
X
X#for systems without getcwd(3) or getopt(3)
X#GETCWD = getcwd.o
X#GETOPT = getopt.o
X
X#for System V or Berkeley worlds
X#BSD = -DBSD
X#TTY = tty_ucb.o
XBSD =
XTTY = tty_att.o
X
XPCOMM = $(GETCWD) $(GETOPT) $(TTY) admin.o chg_dir.o curses.o d_delete.o \
X d_lib.o d_manual.o d_menu.o d_print.o d_prompt.o d_revise.o \
X data_log.o di_delay.o di_win.o dial.o e_lib.o expand.o help.o \
X info.o init.o list_dir.o ls_menu.o m_lib.o macro.o main.o \
X n_shell.o p_lib.o passthru.o pexit.o port.o redial.o s_axfer.o \
X s_extrnl.o s_gen.o s_menu.o s_modem.o s_prompt.o s_term.o \
X s_tty.o screen.o script.o st_line.o strings.o terminal.o x_ascii.o \
X x_batch.o x_extrnl.o x_menu.o x_rcv.o x_send.o x_win.o xmodem.o
X
XINPUT = input.o vcs.o
X
Xall: pcomm pcomm_input waitfor matches modem_break
X
Xpcomm: $(PCOMM)
X $(CC) $(LDFLAGS) $(PCOMM) -o pcomm $(CURSES)
X
Xpcomm_input: $(INPUT)
X $(CC) $(LDFLAGS) $(INPUT) -o pcomm_input $(TERMLIB)
X
Xwaitfor:
X $(CC) $(CFLAGS) $(BSD) $(LDFLAGS) waitfor.c -o waitfor
X
Xmatches:
X $(CC) $(CFLAGS) $(LDFLAGS) matches.c -o matches
X
Xmodem_break:
X $(CC) $(CFLAGS) $(BSD) $(LDFLAGS) modem_break.c -o modem_break
X
Xinstall:
X cp pcomm $(BIN)
X cp pcomm_input $(BIN)
X cp waitfor $(BIN)
X cp matches $(BIN)
X cp modem_break $(BIN)
X# rm pcomm
X# rm pcomm_input
X# rm waitfor
X# rm matches
X# rm modem_break
X
Xlint:
X lint -p -Dlint admin.c chg_dir.c curses.c d_delete.c d_lib.c \
X d_manual.c d_menu.c d_print.c d_prompt.c d_revise.c data_log.c \
X di_delay.c di_win.c dial.c e_lib.c expand.c getcwd.c getopt.c \
X help.c info.c init.c list_dir.c ls_menu.c m_lib.c macro.c main.c \
X n_shell.c p_lib.c passthru.c pexit.c port.c redial.c s_axfer.c \
X s_extrnl.c s_gen.c s_menu.c s_modem.c s_prompt.c s_term.c s_tty.c \
X screen.c script.c st_line.c strings.c terminal.c tty_att.c \
X x_ascii.c x_batch.c x_extrnl.c x_menu.c x_rcv.c x_send.c x_win.c \
X xmodem.c
X lint -p -Dlint input.c vcs.c
X lint -p -Dlint $(BSD) waitfor.c
X lint -p -Dlint matches.c
X lint -p -Dlint $(BSD) modem_break.c
X
Xshar:
X $(SHAR) Doc > pcomm_sh.1
X $(SHAR) Makefile Matches.1 Modem_break.1 Pcomm.1 Pcomm.dial_dir \
X Pcomm.extrnl Pcomm.modem Pcomm.param Readme Release.notes Sample \
X Unixpc.shar Waitfor.1 > pcomm_sh.2
X $(SHAR) admin.c chg_dir.c config.h curses.c d_delete.c d_lib.c \
X d_manual.c d_menu.c d_print.c d_prompt.c d_revise.c data_log.c \
X di_delay.c > pcomm_sh.3
X $(SHAR) di_win.c dial.c dial_dir.h e_lib.c expand.c extrnl.h \
X getcwd.c getopt.c help.c info.c init.c input.c list_dir.c \
X ls_menu.c > pcomm_sh.4
X $(SHAR) m_lib.c macro.c main.c matches.c misc.h modem.h \
X modem_break.c n_shell.c p_lib.c param.h passthru.c pexit.c \
X port.c > pcomm_sh.5
X $(SHAR) redial.c s_axfer.c s_extrnl.c s_gen.c s_menu.c s_modem.c \
X s_prompt.c s_term.c s_tty.c screen.c script.c st_line.c status.h \
X strings.c > pcomm_sh.6
X $(SHAR) terminal.c tty_att.c tty_ucb.c vcs.c vcs.h waitfor.c \
X x_ascii.c x_batch.c x_extrnl.c > pcomm_sh.7
X $(SHAR) x_menu.c x_rcv.c x_send.c x_win.c xmodem.c xmodem.h \
X > pcomm_sh.8
X
Xadmin.o: config.h dial_dir.h param.h
Xchg_dir.o: config.h misc.h
Xcurses.o: config.h misc.h
Xd_delete.o: config.h dial_dir.h misc.h param.h
Xd_lib.o: dial_dir.h param.h
Xd_manual.o: config.h dial_dir.h misc.h
Xd_menu.o: config.h dial_dir.h misc.h param.h
Xd_print.o: config.h dial_dir.h misc.h
Xd_prompt.o: config.h dial_dir.h misc.h
Xd_revise.o: config.h dial_dir.h misc.h param.h
Xdata_log.o: config.h misc.h param.h status.h
Xdi_delay.o: config.h misc.h param.h
Xdi_win.o: config.h dial_dir.h misc.h modem.h param.h
Xdial.o: config.h dial_dir.h misc.h modem.h param.h
Xe_lib.o: extrnl.h
Xexpand.o: config.h
Xhelp.o: config.h misc.h
Xinit.o: config.h misc.h status.h
Xinput.o: config.h misc.h status.h vcs.h
Xls_menu.o: config.h dial_dir.h misc.h param.h
Xm_lib.o: modem.h
Xmacro.o: config.h misc.h param.h
Xmain.o: config.h dial_dir.h extrnl.h misc.h modem.h param.h status.h
Xn_shell.o: config.h
Xp_lib.o: param.h
Xpassthru.o: config.h misc.h
Xpexit.o: config.h dial_dir.h misc.h param.h status.h
Xport.o: config.h dial_dir.h modem.h
Xredial.o: config.h dial_dir.h misc.h
Xs_axfer.o: config.h misc.h param.h
Xs_extrnl.o: config.h extrnl.h misc.h
Xs_gen.o: config.h misc.h param.h
Xs_menu.o: config.h misc.h
Xs_modem.o: config.h misc.h modem.h
Xs_prompt.o: config.h misc.h
Xs_term.o: config.h misc.h param.h status.h
Xs_tty.o: config.h misc.h modem.h
Xscreen.o: config.h param.h status.h
Xscript.o: config.h dial_dir.h status.h
Xst_line.o: config.h dial_dir.h misc.h modem.h param.h status.h
Xstrings.o: config.h
Xterminal.o: config.h dial_dir.h misc.h modem.h param.h status.h xmodem.h
Xtty_att.o: dial_dir.h param.h
Xtty_ucb.o: dial_dir.h param.h
Xvcs.o: config.h vcs.h
Xx_ascii.o: config.h misc.h param.h
Xx_batch.o: config.h misc.h xmodem.h
Xx_extrnl.o: config.h
Xx_menu.o: config.h extrnl.h misc.h xmodem.h
Xx_rcv.o: config.h dial_dir.h misc.h xmodem.h
Xx_send.o: config.h dial_dir.h misc.h xmodem.h
Xx_win.o: config.h dial_dir.h misc.h xmodem.h
Xxmodem.o: config.h misc.h param.h xmodem.h
X
Xwaitfor: waitfor.c
Xmatches: matches.c
Xmodem_break: modem_break.c
SHAR_EOF
if test 5364 -ne "`wc -c < 'Makefile'`"
then
echo shar: "error transmitting 'Makefile'" '(should have been 5364 characters)'
fi
fi
echo shar: "extracting 'Matches.1'" '(635 characters)'
if test -f 'Matches.1'
then
echo shar: "will not over-write existing file 'Matches.1'"
else
sed 's/^X//' << \SHAR_EOF > 'Matches.1'
X.TH MATCHES 1 local
X.SH NAME
Xmatches \- test if string2 is contained in string1
X.SH SYNOPSIS
X.B matches string1 string2
X.SH DESCRIPTION
X.I Matches
Xreturns a 0 if string2 is contained in string1, otherwise it returns a 1.
X.PP
X.I Matches
Xis designed to be used by
X.I Pcomm
Xin a shell script for automatically logging a user onto a remote system.
X.PP
X.SH EXAMPLE
X.nf
X # read some input
X read junk
X # test to see the string matches 'login failed'
X matches $junk 'login failed'
X # test the exit code of the matches command
X if [ $? \-eq 0 ]
X then
X exit 1
X fi
X.fi
X.SH "SEE ALSO"
Xpcomm(1), waitfor(1), modem_break(1), Pcomm Reference Manual
SHAR_EOF
if test 635 -ne "`wc -c < 'Matches.1'`"
then
echo shar: "error transmitting 'Matches.1'" '(should have been 635 characters)'
fi
fi
echo shar: "extracting 'Modem_break.1'" '(836 characters)'
if test -f 'Modem_break.1'
then
echo shar: "will not over-write existing file 'Modem_break.1'"
else
sed 's/^X//' << \SHAR_EOF > 'Modem_break.1'
X.TH MODEM_BREAK 1 local
X.SH NAME
Xmodem_break \- send a modem break
X.SH SYNOPSIS
X.B modem_break
X.SH DESCRIPTION
X.I Modem_break
Xcreates a ``modem break'' on the stdout. Modem break is a condition of
Xa communications line when the line is held ``low'' for 200 ms. It is
Xtypically used to tell the remote system to switch to a different
Xbaud rate.
X.PP
X.I Modem_break
Xis designed to be used by
X.I Pcomm
Xin a shell script for automatically logging a user onto a remote system.
X.PP
X.SH EXAMPLE
X.nf
X while true
X do
X # wait 5 seconds for the login prompt
X waitfor \-5 login:
X # test the exit code of the waitfor command
X if [ $? \-eq 0 ]
X then
X # send my user ID and break out of the loop
X echo egray
X break
X fi
X # send a modem break
X modem_break
X done
X.fi
X.SH "SEE ALSO"
Xpcomm(1), waitfor(1), matches(1), Pcomm Reference Manual
SHAR_EOF
if test 836 -ne "`wc -c < 'Modem_break.1'`"
then
echo shar: "error transmitting 'Modem_break.1'" '(should have been 836 characters)'
fi
fi
echo shar: "extracting 'Pcomm.1'" '(8648 characters)'
if test -f 'Pcomm.1'
then
echo shar: "will not over-write existing file 'Pcomm.1'"
else
sed 's/^X//' << \SHAR_EOF > 'Pcomm.1'
X.TH PCOMM 1 local
X.SH NAME
Xpcomm \- a telecommunication program
X.SH SYNOPSIS
X.B pcomm
X[
X.B \-d
Xdirectory ] [
X.B \-f
Xsystem name
X]
X.SH DESCRIPTION
X.I Pcomm
Xis a public domain telecommunication program for Unix that is designed
Xto operate similar to the MSDOS program, ProComm. ProComm (TM) is
Xcopyrighted by Datastorm Technologies, Inc.
X.PP
XThe
X.I \-d
Xoption is used to specify an additional path to search for the Pcomm
Xsupport files.
X.PP
XThe
X.I \-f
Xoption is used to specify automatic dialing of an entry in the dialing
Xdirectory. The
X.I name
Xfield in the dialing directory is checked against the string given on
Xthe command line. If a match is found, that entry is automatically
Xdialed.
X.PP
XWhenever
X.I Pcomm
Xis in the command mode, a status line is displayed at the bottom of the
Xscreen. The eight fields of the status line are:
X.PP
X.RS 5
X.nf
X\(bu help screen command (or a temporary message)
X\(bu name of the TTY device in use
X\(bu duplex mode (FDX = full duplex, HDX = half duplex)
X\(bu current line settings
X\(bu status of data logging option
X\(bu status of printer logging option
X\(bu incoming CR translation
X\(bu outgoing CR translation
X.fi
X.RE
X.SH COMMANDS
XThe following commands are accessible by pressing a user definable ``hot
Xkey'' followed by a letter, number, or arrow key. The default ``hot
Xkey'' is control-A. The notation ``^A-X'' means control-A followed by
Xthe letter X. The dash (-) is for clarity, and is not a part of the
Xcommand sequence.
X.TP
X.B ^A-0
XHelp Screen. Display a brief review of the available commands. Uses
Xthe number zero ``0'' not the letter ``O''.
X.TP
X.B ^A-D
XDialing Directory. The dialing directory screen is used to display and
Xmaintain the database of phone number entries, and to select an entry
Xfor dialing. To dialan entry, just enter the entry number at the
Xprompt. If the ``script'' field contains valid Unix shell script, that
Xfile is used to automatically log the user on to the remote system. See
Xthe Pcomm Reference Manual for the format and use of the script files.
XThe following commands are available from the dialing directory:
X.RS 5
X.TP
X.B R
XRevise (or add) a dialing directory entry or a long distance dialing
Xcode.
X.TP
X.B P
XPrint (display) the long distance dialing codes.
X.TP
X.B up/down
XScroll the dialing directory up or down 10 lines. Uses the up and down
Xarrow keys.
X.TP
X.B M
XManual dial. Prompts for a phone number rather than using a number
Xalready in the dialing directory.
X.TP
X.B D
XDelete an entry or a range of entries.
X.TP
X.B L
XPrint. Send the dialing directory to the printer or a file of your
Xchoice.
X.RE
X.TP
X.B ^A-R
XAutomatic redial of selected dialing directory entries. Prompts the
Xuser for a list of directory entries to be placed in the queue.
X.I Pcomm
Xwill dial the numbers in a cycle until one of them answers.
X.TP
X.B ^A-M
XAllows the user to maintain a list of keyboard macros assigned to the
Xshifted number keys. When pressed, the string assigned to that key is
Xsent to the remote system.
X.TP
X.B ^A-P
XAdjust the current communication line settings. Display a menu of baud
Xrate, parity, data bit, and stop bit choices. Allows the new choice to
Xbe saved and become the default. After dialing a remote, the line
Xsettings in the dialing directory entry are automatically used. The
Xcurrent line settings are shown in the status line.
X.TP
X.B ^A-X
XExit from
X.I Pcomm.
X.TP
X.B ^A-4
XSpawn a Unix shell while still communicating with the remote system.
XUses the ``native'' shell as described in the SHELL environmental
Xvariable.
X.TP
X.B ^A-I
XDisplay the program information screen.
X.TP
X.B ^A-S
XDisplay a choice of setup screens. The following sub-menus are
Xavailable:
X.RS 5
X.TP
X.B 1
XTTY Setup. This setup assigns the TTY ports that
X.I Pcomm
Xis allowed to use, and what is attached to each port.
X.TP
X.B 2
XModem Setup. The modem setup contains the commands to make the modem
Xdial, hang up the phone, etc.
X.TP
X.B 3
XTerminal Setup. The terminal setup contains the definition of the ``hot
Xkey'' and the mapping of the end-of-line characters.
X.TP
X.B 4
XGeneral Setup. The general setup contains the default log file name,
Xand the set of character synonyms.
X.TP
X.B 5
XASCII Transfer Setup. This setup screen contains additional character
Xtranslations allowed during ASCII file transfers.
X.TP
X.B 6
XExternal Protocol Setup. This setup screen allows the user to imbed the
Xnames of external file transfer programs into the list of available
Xprotocols.
X.TP
X.B S
XSave the changes to disk.
X.RE
X.TP
X.B ^A-B
XChange the current working directory.
X.TP
X.B ^A-C
XClear the local screen and home the cursor.
X.TP
X.B ^A-E
XToggle the duplex mode from full to half, or from half to full. The
Xstatus line shows the current duplex mode.
X.TP
X.B ^A-H
XHang up the phone. Disconnect the phone, but remain in
X.I Pcomm.
X.TP
X.B ^A-L
XToggle the printer on and off. Since the printer is accessed through
Xthe normal Unix spool program, the output is not sent to the printer
Xuntil
X.B after
Xthis feature is turned off.
X.TP
X.B ^A-3
XToggle the incoming line termination characters between the carriage
Xreturn and the carriage return line feed pair. This affects the
Xterminal session only, not the file transfers. The current settings are
Xshown in the status line.
X.TP
X.B ^A-7
XSend a modem break. This is
X.B not
Xthe same as the break key on the keyboard.
X.TP
X.B ^A-up
XDisplay a menu of file transfer protocols to be used to send files to a
Xremote system. Uses the up arrow key.
X.TP
X.B ^A-down
XDisplay file transfer protocols to be used to receive files from a
Xremote system. Uses the down arrow key.
X.TP
X.B ^A-F
XDisplay the contents of a Unix directory.
X.TP
X.B ^A-G
XDump the contents of the screen to a specified file. Special graphics
Xcharacters may not be represented accurately in the file.
X.TP
X.B ^A-1
XBegin data logging. Prompts the user for the name of the file that will
Xbe used to collect a complete record of the terminal session.
X.TP
X.B ^A-2
XToggle the data logging option without prompting for a new file name.
XThe status line shows the current data logging mode.
X.SH "FILE TRANSFERS"
X.I Pcomm
Xunderstands the following file transfer protocols:
X.PP
X.RS 5
X.nf
X.if n .ta 1.5i +1.5i +1.5i +1.5i +1.5i
X.if t .ta 1i +1i +1i +1i +1i
Xprotocol packet error multiple
Xname size method files?
X--------- -------- ------------ --------
Xxmodem 128 checksum/CRC no
Xxmodem-1k 128/1024 checksum/CRC no
Xmodem7 128 checksum yes
Xymodem 128/1024 CRC yes
Xymodem-g 128/1024 none yes
XASCII none none no
Xzmodem 128/1024 CRC yes
X(external) ? ? ?
X.fi
X.RE
X.PP
X.I Pcomm
Xcan use an external program, such as Kermit or a proprietary program, to
Xtransfer files. Commonly used external programs (such as zmodem in the
Xexample above) can have their names imbedded into the list of available
Xprotocols.
X.PP
X.SH CONFIGURATION
X.I Pcomm
Xmust have access to the terminfo or termcap data for the terminal being
Xused. The minimum capabilities include a screen size of at least 80
Xcolumns by 24 lines and cursor movement capabilities. Running
X.I Pcomm
Xfrom terminals at relatively slow speeds (i.e. 1200 baud) will cause
Xthe windows to appear sluggish.
X.PP
XTerminals that don't have arrow keys or systems without the newer
Xversions of curses(3) will require the user to substitute the letter ``U''
Xfor ``up arrow'' and ``N'' for ``down arrow''.
X.PP
XThere are four Pcomm support files that contain the dialing directory,
Xthe external file transfer programs, the modem/TTY database, and the
Xstart-up default parameters. Users may maintain private versions of
Xthese files in a directory of their choice.
X.I Pcomm
Xalso uses normal Unix shell scripts to perform the ``chat'' sequences
Xnecessary to automatically log a user onto a remote system.
X.I Pcomm
Xuses the environmental variable PCOMM to search for the ``private''
Xsupport file and the auto-login shell scripts. The following directories
Xare searched to find the files:
X.PP
X.RS 5
X.nf
X\(bu directory given with the \fI\-d\fP option
X\(bu directory in the PCOMM environmental variable
X\(bu current directory
X\(bu default directory (compiled into Pcomm)
X.fi
X.RE
X.PP
XThe ``script'' field in the dialing directory serves two purposes. The
Xfirst use is to identify the shell script to use for auto-login. The
Xsecond use is to specify a TTY name for a given entry. If the
X``script'' is a valid device name, that device is used instead of
Xsearching the TTY database for a free port.
X.SH FILES
X.nf
Xpcomm.dial_dir the dialing directory
Xpcomm.extrnl the external file transfer programs
Xpcomm.modem the modem/TTY database
Xpcomm.param the start-up default parameters
X.fi
X.SH "SEE ALSO"
XPcomm Reference Manual, xmodem(1), mdm(1)
SHAR_EOF
if test 8648 -ne "`wc -c < 'Pcomm.1'`"
then
echo shar: "error transmitting 'Pcomm.1'" '(should have been 8648 characters)'
fi
fi
echo shar: "extracting 'Pcomm.dial_dir'" '(321 characters)'
if test -f 'Pcomm.dial_dir'
then
echo shar: "will not over-write existing file 'Pcomm.dial_dir'"
else
sed 's/^X//' << \SHAR_EOF > 'Pcomm.dial_dir'
XDIR_1=Abbey Road;1 (512) 590-6036;2400-N-8-1;F;
XDIR_2=Tel-Med-Com;555-8686;9600-E-7-1;F;
XDIR_3=C Board;1 (619) 722-8724;2400-N-8-1;F;
XDIR_4=Crest;1 (213) 471-2518;2400-N-8-1;F;Sample
XDIR_5=Last Chance;1 (219) 762-8411;2400-E-7-1;F;
XDIR_6=Killer;1 (214) 827-1994;1200-E-7-1;F;
XDIR_7=System A (direct);;19200-E-7-1;F;tty12
SHAR_EOF
if test 321 -ne "`wc -c < 'Pcomm.dial_dir'`"
then
echo shar: "error transmitting 'Pcomm.dial_dir'" '(should have been 321 characters)'
fi
fi
echo shar: "extracting 'Pcomm.extrnl'" '(79 characters)'
if test -f 'Pcomm.extrnl'
then
echo shar: "will not over-write existing file 'Pcomm.extrnl'"
else
sed 's/^X//' << \SHAR_EOF > 'Pcomm.extrnl'
XSEND_1=zmodem;sz;Y
XSEND_2=;;N
XSEND_3=;;N
XRCV_1=zmodem;rz;N
XRCV_2=;;N
XRCV_3=;;N
SHAR_EOF
if test 79 -ne "`wc -c < 'Pcomm.extrnl'`"
then
echo shar: "error transmitting 'Pcomm.extrnl'" '(should have been 79 characters)'
fi
fi
echo shar: "extracting 'Pcomm.modem'" '(598 characters)'
if test -f 'Pcomm.modem'
then
echo shar: "will not over-write existing file 'Pcomm.modem'"
else
sed 's/^X//' << \SHAR_EOF > 'Pcomm.modem'
XTTY_1=tty10;HAYES;0
XTTY_2=tty11;HAYES;0
XTTY_3=tty12;DIRECT;0
XTTY_4=tty13;TELEBIT;0
XTTY_5=tty13;FAST_TELEBIT;0
XMODEM_1a=HAYES;ATS7=45S11=70E0Q0V1X4&D2!;ATDT;!;~~+++~~ATH0!
XMODEM_1b=Y;CONNECT!;CONNECT 1200;CONNECT 2400;;;
XMODEM_1c=BUSY;VOICE;NO CARRIER;
XMODEM_2a=DIRECT;;;;
XMODEM_2b=N;;;;;;
XMODEM_2c=;;;
XMODEM_3a=TELEBIT;%AAAAAATS50=0S2=43S95=0M1!;%AAAAAATDTW;!;~~+++~~ATH0!
XMODEM_3b=Y;CONNECT 300;CONNECT 1200;CONNECT 2400;;;
XMODEM_3c=BUSY;ERROR;NO CARRIER;
XMODEM_4a=FAST_TELEBIT;%AAAAAATS50=255S2=43S95=0M1!;%AAAAAATDTW;!;~~+++~~ATH0!
XMODEM_4b=N;;;;;CONNECT;CONNECT
XMODEM_4c=BUSY;ERROR;NO CARRIER;
SHAR_EOF
if test 598 -ne "`wc -c < 'Pcomm.modem'`"
then
echo shar: "error transmitting 'Pcomm.modem'" '(should have been 598 characters)'
fi
fi
echo shar: "extracting 'Pcomm.param'" '(453 characters)'
if test -f 'Pcomm.param'
then
echo shar: "will not over-write existing file 'Pcomm.param'"
else
sed 's/^X//' << \SHAR_EOF > 'Pcomm.param'
XD_BAUD=1200
XD_PARITY=E
XD_DBITS=7
XD_SBITS=1
XHOT=1
XASCII_HOT=^A
XD_DUPLEX=FULL
XFLOW=XON/XOFF
XCR_IN=CR
XCR_OUT=CR
XLOGFILE=pcomm.log
XDUMPFILE=pcomm.dump
XSTRIP=YES
XPAUSE_CHAR=~
XCR_CHAR=!
XCTRL_CHAR=^
XESC_CHAR=|
XBRK_CHAR=%
XABORT=KEEP
XC_DELAY=35
XR_DELAY=5
XLECHO=NO
XEXPAND=NO
XCR_DELAY=0
XPACE=NO
XCR_UP=NONE
XLF_UP=ADD CR
XTIMER=5
XCR_DN=STRIP
XLF_DN=NONE
XLD_PLUS=
XLD_MINUS=
XLD_AT=8,
XLD_POUND=9
XMAC_1=hello
XMAC_2=
XMAC_3=
XMAC_4=
XMAC_5=
XMAC_6=
XMAC_7=
XMAC_8=
XMAC_9=
XMAC_0=
SHAR_EOF
if test 453 -ne "`wc -c < 'Pcomm.param'`"
then
echo shar: "error transmitting 'Pcomm.param'" '(should have been 453 characters)'
fi
fi
echo shar: "extracting 'Readme'" '(7963 characters)'
if test -f 'Readme'
then
echo shar: "will not over-write existing file 'Readme'"
else
sed 's/^X//' << \SHAR_EOF > 'Readme'
X
X Pcomm
X A Unix Telecommunication Program
X
XThings to do first:
X
X 1) Figure out what files you need. There is a shell archive
X called "Unixpc.shar" that contains additional (and replacement)
X files for users of the AT&T Unix PC 7300/3b1.
X
X 2) Create a default directory where the Pcomm support files will
X go. A good location might be /usr/local/lib/pcomm.
X
X 3) Copy the sample support files Pcomm.dial_dir, Pcomm.extrnl,
X Pcomm.modem, and Pcomm.param to the default directory and rename
X them to change the upper case "P" to a lower case "p". The files
X should *not* have write permission to all.
X
X 4) Copy (and rename as appropriate) the Pcomm.1, Waitfor.1,
X Matches.1, and Modem_break.1 nroff manuals to the proper /usr/man
X directory.
X
X 5) Print the Doc file by piping the output of the Unix "pr"
X command with the title separated by lots of white space (to help
X center it), for example:
X
X pr -h " Pcomm Reference Manual " Doc | lp
X
XHow to configure Pcomm:
X
X 1) Edit the "config.h" file to suit your system's needs and your
X personal taste. Sites running HoneyDanBer (HDB) UUCP should pay
X particular attention to the LOCK_DIR, ASCII_PID, and SETUGID
X definitions. The definitions in config.h are:
X
X BSD Define if you're using a Berkeley flavor of Unix.
X You will have to edit the Makefile in several
X places.
X
X UNIXPC If defined, use the dial(3) routines specific
X to the AT&T Unix PC 7300/3b1. Useful only if
X the On Board Modem (OBM) is to be used.
X
X OLDCURSES If defined, use the older version of curses(3).
X (uses termcap in lieu of terminfo).
X
X SHAREDMEM If defined, keeps the virtual screen area in
X shared memory rather than in a file.
X
X NOPROMOTE If defined, do not promote missing video
X attributes to standout. Normally, curses(3)
X attempts to compensate for missing attributes.
X
X SETUGID If defined, extra precautions are taken before
X opening files or doing a shell escape to restore
X the real UID/GID. Useful if Pcomm is installed
X as a set-user-id or get-group-id program. HDB
X programs often are set-user-id to uucp.
X
X LOG_CALLS If defined, Pcomm will keep an administrative log
X of all calls. The log contains the name of the
X person making the call, the phone number, and a
X date/time stamp. Useful for verifying long
X distance phone bills.
X
X LOGFILE The path to the log file (if LOG_CALLS is
X defined). It should have write permission to
X all or be writeable under set-user/group-id
X conditions.
X
X LIMIT_LD If defined, Pcomm will limit long distance
X (toll) calls to a privileged group. The file
X "admin.c" may require tweaking to detect long
X distance numbers.
X
X GROUP_NAME The name of the group that is allowed to make
X long distance calls (if LIMIT_LD is defined).
X
X LPR The path to the line printer program (this is
X not the name of the device).
X
X LPRINT The path to the "pretty" line printer program.
X Typically a program that performs a "pr | lp"
X function. If none exist, use "pr | lp".
X
X DEFAULT_DIR The path to the directory that contains the
X default Pcomm support files.
X
X LOCK_DIR The path to the directory where the UUCP lock
X files are found. On HDB systems this could
X be /usr/spool/locks or /usr/spool/uucp.
X
X ASCII_PID If defined, the lock files will contain an ASCII
X encoded process id (PID). On HDB systems this
X is the default.
X
X XENIX_LOCKS If defined, the last letter of the device name
X is folded to lower case when creating the lock
X file. Newer version of XENIX may require this.
X
X KEEP_PORT If defined, the port will be kept open between
X dialing attempts to save time. Some systems
X may require the modem to be closed and reopened
X every time.
X
X XMC_BROKE Does the status line scroll up when using "magic
X cookie" terminals? Some Pyramid and AT&T
X systems may require this to be defined. Find a
X magic cookie terminal (a Wyse 50 for example),
X and see what happens.
X
X WGETCH_BROKE Does the alarm() system call work correctly with
X the wgetch() function? Some Masscomp systems
X will require this to be defined. Symptom: the
X initial screen doesn't go away by itself after 5
X seconds.
X
X CLIST_SIZ The size of the serial port character buffer.
X The default is 64.
X
X INPUT_BUF The size of the input buffer (should be about the
X same size as CLIST_SIZ). The default is 64.
X
X OUTPUT_BUF The size of the output buffer (should be about
X one half INPUT_BUF). The default is 32. Systems
X without dedicated I/O processors may require a
X very small INPUT_BUF value to avoid the problem
X of a "choppy" display.
X
X MEMMOVE The name of the memory copy routine (if none,
X then use "#undef MEMMOVE"). The default is
X "memmove", although quite a few versions of
X "memcpy" will work (if they correctly handle
X target and source overlap).
X
X SETUID_BROKE Does your version of Unix allow you to flip-flop
X back and forth between the real and effective
X user (or group) ID? Some Masscomp systems will
X require this to be set.
X
X 2) Edit the Makefile. There are provisions in the Makefile to
X include getcwd(3) and getopt(3) routines if they are missing
X from your system. You may want to customize the CFLAGS,
X LDFLAGS, and BIN assignments to suit your needs.
X
X If compiling under Berkeley Unix, you will have to edit the
X Makefile on the following lines:
X
X #for old curses(3) or Berkeley systems
X CURSES = -lcurses -ltermcap
X TERMLIB = -ltermcap
X #CURSES = -lcurses
X #TERMLIB = -lcurses
X
X #for System V or Berkeley worlds
X BSD = -DBSD
X TTY = tty_ucb.o
X #BSD =
X #TTY = tty_att.o
X
X All the defaults in config.h assume a AT&T flavor of Unix, sorry
X about that...
X
X 3) Compile pcomm and pcomm_input. Type "make". The "make
X install" option will attempt to copy "pcomm" and "pcomm_input"
X into the BIN directory given in the Makefile. However, those
X sites running HDB UUCP software may require that you to change
X the mode of "pcomm" to be set-user-id to uucp. DO NOT CHANGE
X THE SET-UID/GID BITS ON THE "pcomm_input" PROGRAM.
X
X Three external programs (waitfor, matches, and modem_break) are
X included in the distribution to help in creating auto-login
X shell scripts.
X
X 4) Update the sample modem/TTY database. I know I'm asking the
X impossible, but... Read section 3 and the Appendices of the Doc
X file first, then run Pcomm to update the modem/TTY database by
X using the TTY Setup and the Modem Setup menues. You will need
X to know:
X
X o The types and number of modems available for dial out
X o The TTY ports attached to the modems
X o The range of baud rates at which the modems operate
X o How to initialize the modems to suit Pcomm's needs
X o How to make the modems dial
X
X During this step, you will need write permission on the support
X files in the default directory. RESIST THE TEMPTATION TO EDIT
X THE SUPPORT FILES DIRECTLY.
X
XPortability considerations:
X
X 1) Pcomm makes use of the bold, blinking and standout video
X attributes. My concept of "standout" and "reverse" might be
X different than yours (I like "standout" to be a brighter version
X of "reverse"). Some very old versions of curses will ignore the
X standout mode if you're on a magic cookie terminal.
X
X 2) The "port.c" file has a place where you can include your own
X routine to toggle the getty process on a port (if required).
X
X 3) If you compile Pcomm with LOG_CALLS defined, you'll have to
X look at the code in "admin.c" to see if the long distance
X detection routine is correct for your site.
X
X 4) Compilers that adhere to the ANSI C Standard will complain at
X the declarations of perror(), malloc(), fread(), fwrite(), etc.
X There is a "typedef SIG_TYPE" in the config.h file to help
X silence the compiler's warning messages about the signal()
X return value.
X
XEmmet P. Gray US Army, HQ III Corps & Fort Hood
X...!uunet!uiucuxc!fthood!egray Attn: AFZF-DE-ENV
X Directorate of Engineering & Housing
X Environmental Management Office
X Fort Hood, TX 76544-5057
SHAR_EOF
if test 7963 -ne "`wc -c < 'Readme'`"
then
echo shar: "error transmitting 'Readme'" '(should have been 7963 characters)'
fi
fi
echo shar: "extracting 'Release.notes'" '(8624 characters)'
if test -f 'Release.notes'
then
echo shar: "will not over-write existing file 'Release.notes'"
else
sed 's/^X//' << \SHAR_EOF > 'Release.notes'
X
X Pcomm version 1.2
X 4 Feb 89
X
XCompatibilities with v1.1:
X
X The support files used with the v1.1 release are compatible with
X the v1.2 release. However, the use of the "index" field (now
X called the "script" field) in the pcomm.dial_dir file has
X changed dramatically (see below).
X
XThings that have changed:
X
X Berkeley flavors of Unix are now supported. There are files
X called tty_att.c and tty_ucb.c that contain the code specific
X to the AT&T and Berkeley worlds. See the config.h file for
X the BSD pre-processor definition.
X
X Auto-login scripts are now supported. If the script field of
X the dialing directory contains the name of a valid Unix shell
X script, that shell script is "played" after the connection is
X made to perform the auto-login "chat" sequences. A example of a
X auto-login Bourne shell script (called Sample) is included in
X the distribution.
X
X Three new external programs. In order to assist in the creation
X of the auto-login shell scripts, three external programs are
X included in the distribution.
X
X waitfor - wait for a string, return a 1 if timed out
X matches - test if string2 is contained in string1
X modem_break - send a modem break
X
X There is a new support file called "pcomm.extrnl" that allows
X the user to imbed the names of external file transfer programs
X into the list of available protocols. (The default file
X "Pcomm.extrnl", supplied with the distribution package, contains
X definitions for zmodem).
X
X The pcomm.input program has been changed to use multiple
X character buffered writes to the screen. Both the input and
X output buffer sizes are tunable parameters in config.h
X
X Newer versions of Xenix have changed the rules for creating UUCP
X lock files. See the config.h file for the description of
X XENIX_LOCKS.
X
X The -f option now looks at the name field of the dialing
X directory (rather than the index field). A match is found when
X the argument to the -f is contained in a name field (an exact
X match is not required). The match does not consider upper and
X lower case differences as significant.
X
XKnown limitations:
X
X The detection of VCS (video command sequences) is still limited
X to a very small subset of possible commands.
X
X For the VCS emulation to work, the terminfo entries on the host
X machine must match the entries on the remote. (Don't assume
X your vt100 terminfo data is identical to someone else's).
X
X The disp_tty() routine in s_tty.c currently does not support a
X NUM_TTY definition of greater than 10.
X
XFuture directions:
X
X That's about it folks...
X
X If Pcomm grows any more, I'll break the setup routines out as a
X separate program.
X
XMany thanks to the following people (and many others) for bug reports
Xand suggested improvements to the code.
X
X Andy Fyfe ...ames!elroy!cit-vax!andy
X Brian Antoine ...iscuva!tau-ceti!briana
X Chad R. Larson ...ncar!noao!nud!anasaz!dcfinc!chad
X David MacKenzie ...uunet!rocky2.rockefeller.edu!edf
X Gary S. Trujillo ...{linus,bbn,m2c}!spdcc!gnosys!gst
X George Pontis ...uunet!moldev!geo
X J. Eric Townsend ...uunet!nuchat!flatline!erict
X Jim Pickering ...csun!polyslo!rducky!jrp
X Jim Sanchez ...uunet!mcvax!syteke!jim
X Jonathan Bayer ...uunet!ispi!jbayer
X MAJ Dave Dockstader ...twsc4sac at mater1.arpa
X Michael Brady ...sun!portal!cup.portal.com!michealnc
X
X-------------------------------------------------------------------------------
X
X Pcomm version 1.1
X 21 Aug 88
X
XIncompatibilities with v1.0:
X
X I've added a few more fields to the pcomm.param and pcomm.modem
X files. This means that those files created under previous
X releases will not be compatible with the v1.1 release. It might
X be a good idea to abandon the older files and start over with
X the sample files in this release.
X
XThings that have changed:
X
X An awful lot of sloppy programming on my part has now been
X cleaned up. This means that porting Pcomm to different versions
X of Unix will be considerably less painful than before.
X
X All of the tunable parameters are now in "config.h".
X
X Pcomm now uses buffered I/O routines. This yields higher
X performance I/O at large baud rates.
X
X File transfers now use high performance CRC calculations.
X
X If a UUCP lockfile does exist, Pcomm now attempts to determine
X if the process is still active.
X
X An external file transfer program can be invoked from the file
X transfer menu.
X
X The keyboard macro feature is now supported (although it is
X rather crude).
X
X The virtual screen routine now understands a limited subset of
X escape sequences.
X
X The virtual screen can now be held in shared memory or in a file.
X
X The input routine is now contained in a separate program called
X pcomm_input.
X
X You can now include a "modem break" in a dial or initialization
X string.
X
X A separate "initialization speed" feature was added to support
X 9600 baud modems such as the Telebit Trailblazer. See Appendix
X C of the Doc file for more info on the use of this feature.
X
X I've added a transparent pass through mode to be used in a
X communications daisy chain.
X
XKnown limitations:
X
X Whenever Pcomm makes the transition from the terminal mode to
X the command mode, the true screen contents are lost. Pcomm
X tries to keep track of what the true screen looks like in an
X internal "virtual screen". This means that the escape sequences
X known to the hardware have to be emulated in the virtual screen.
X Unfortunately, the number of escape sequences that are emulated
X is quite small, so the representation of the true screen is
X sometimes wrong.
X
X For the VCS (video command sequence) emulation to work, the
X terminfo entries on the host machine must match the entries on
X the remote.
X
X The disp_tty() routine in s_tty.c currently does not support a
X NUM_TTY definition of greater than 10.
X
XFuture directions:
X
X Continue work on the virtual screen routines.
X
X Add dial back support.
X
X Use shared memory to overcome the current limitation of outgoing
X characters in the half duplex mode not appearing in the virtual
X screen, log files, and print logs.
X
XMany thanks to the following people for bug reports and ideas for
Ximproving the code:
X
X Andy Pitts ...{mtune,pacbell,kd4nc}!gladys!rbdc!andy
X Chris Wiener ...ihnp4!{killer,attnssc}!crlabs!cwiener
X David Brierley ...{sun,decuac,cbosgd,gatech,necntc,ukma}!rayssd!dhb
X Karl Fox ...cbosgd!mstar!karl
X Michael Young ...panda!genrad!mrst!sdti!mjy
X Mark Mendel ...ihnp4!umn-cs!hyper!mark
X Viet Hoang ...ihnp4!drutx!vgh
X
X--------------------------------------------------------------------------------
X
X Pcomm version 1.0
X 12 Mar 88
X
XIncompatibilities with the beta release:
X
X I've added a bunch of new parameters to the pcomm.param and
X pcomm.modem files, so the files used with the beta release won't
X work with the v1.0 release.
X
XThings that have changed:
X
X Pcomm will attempt to determine if the modem has synchronized at
X a baud rate different than what is expected, and make changes to
X the line settings as appropriate.
X
X The quit and interrupt signals are now ignored.
X
X All of the file transfer protocols are now functional.
X
X The directory search order used to find the support files has
X been changed slightly.
X
XKnown limitations:
X
X The keyboard macro feature is not implemented at this time.
X
X The true screen contents are lost when the "hot key" is pressed.
X Pcomm attempts to compensate (rather poorly) by repainting a
X virtual screen of what it thinks the true screen should look
X like. Escape sequences in the virtual screen image will be
X ignored when the background is repainted. For example, if
X you're on a vt100 and you receive a ^[[2J to clear the screen,
X the screen *will* be cleared... but when the screen is
X repainted, it will contain the characters ^[, [, 2, J (instead
X of performing the function).
X
X The disp_tty() routine in s_tty.c currently does not support a
X NUM_TTY definition of greater than 10.
X
X For some strange reason, the first keystroke is "lost" after a
X file transfer is complete or after starting data logging.
X
XFuture directions:
X
X The virtual screen routines need a lot of work. The most
X commonly used escape sequences (known to terminfo) will be
X processed.
X
X I plan to have an option at compile time to have the virtual
X screen buffer held on disk [] or in shared memory [].
X
X The input routine is designed so it could be a standalone
X program that gets called from Pcomm. []
X
X-------------------------------------------------------------------------------
X
XHave fun...
X
XEmmet P. Gray US Army, HQ III Corps & Fort Hood
X...!uunet!uiucuxc!fthood!egray Attn: AFZF-DE-ENV
X Directorate of Engineering & Housing
X Environmental Management Office
X Fort Hood, TX 76544-5057
SHAR_EOF
if test 8624 -ne "`wc -c < 'Release.notes'`"
then
echo shar: "error transmitting 'Release.notes'" '(should have been 8624 characters)'
fi
fi
echo shar: "extracting 'Sample'" '(994 characters)'
if test -f 'Sample'
then
echo shar: "will not over-write existing file 'Sample'"
else
sed 's/^X//' << \SHAR_EOF > 'Sample'
X:
X#
X# This is a sample Bourne shell script to log a user onto a remote system.
X# Things to remember:
X# 1) Script files should have permissions of 700, to prevent others
X# from gaining access to your passwords to remote systems.
X# 2) The return codes for waitfor are: 0=success, 1=timed out, and
X# -1=error.
X#
Xecho ""
Xtry=0
X# loop until done
Xwhile true
Xdo
X # wait 5 seconds for the login prompt
X waitfor -5 ogin:
X # test the exit code of the waitfor command
X if [ "$?" -eq 0 ]
X then
X # send my user ID and exit the loop
X echo "egray"
X break
X fi
X
X # increment the number of attempts
X try=`expr $try + 1`
X # test to see if we should give up
X if [ "$try" -eq 5 ]
X then
X exit 1
X fi
X
X # send a modem break and loop again
X modem_break
X echo ""
Xdone
X# wait 5 seconds for the password prompt
Xwaitfor -5 assword:
X# test the return code from waifor
Xif [ "$?" -eq 0 ]
Xthen
X # send my password (you're crazy if you think that's my real password)
X echo "abcdefg"
Xelse
X exit 1
Xfi
X# return to Pcomm
Xexit 0
SHAR_EOF
if test 994 -ne "`wc -c < 'Sample'`"
then
echo shar: "error transmitting 'Sample'" '(should have been 994 characters)'
fi
fi
echo shar: "extracting 'Unixpc.shar'" '(17190 characters)'
if test -f 'Unixpc.shar'
then
echo shar: "will not over-write existing file 'Unixpc.shar'"
else
sed 's/^X//' << \SHAR_EOF > 'Unixpc.shar'
X#! /bin/sh
X# This is a shell archive, meaning:
X# 1. Remove everything above the #! /bin/sh line.
X# 2. Save the resulting text in a file.
X# 3. Execute the file with /bin/sh (not csh) to create:
X# Ifile.sh
X# Ifile30.sh
X# Makefile
X# Pcomm.modem
X# Readme.7300
X# config.h
X# This archive created: Tue Jan 31 09:03:21 1989
Xexport PATH; PATH=/bin:/usr/bin:$PATH
Xecho shar: "extracting 'Ifile.sh'" '(705 characters)'
Xif test -f 'Ifile.sh'
Xthen
X echo shar: "will not over-write existing file 'Ifile.sh'"
Xelse
Xsed 's/^X//' << \SHAR_EOF > 'Ifile.sh'
XXex - $1 << EOF
XX1,\$s/^PC/xPC/
XX1,\$s/^BC/xBC/
XX1,\$s/^UP/xUP/
XX1,\$s/^ospeed/xospeed/
XX1,\$s/^LINES/xLINES/
XX1,\$s/^COLS/xCOLS/
XX1,\$s/^tgetflag/xtgetflag/
XX1,\$s/^tgetent/xtgetent/
XX1,\$s/^tgetstr/xtgetstr/
XX1,\$s/^tgetnum/xtgetnum/
XX1,\$s/^tgoto/xtgoto/
XX1,\$s/^tputs/xtputs/
XX1,\$s/^wrefresh/xwrefresh/
XX1,\$s/^initscr/xinitscr/
XX1,\$s/^cbreak/xcbreak/
XX1,\$s/^nl/xnl/
XX1,\$s/^flushinp/xflushinp/
XX1,\$s/^noecho/xnoecho/
XX1,\$s/^savetty/xsavetty/
XX1,\$s/^resetty/xresetty/
XX1,\$s/^echo/xecho/
XX1,\$s/^nocbreak/xnocbreak/
XX1,\$s/^nonl/xnonl/
XX1,\$s/^keypad/xkeypad/
XX1,\$s/^endwin/xendwin/
XX1,\$s/^printw/xprintw/
XX1,\$s/^fixterm/xfixterm/
XX1,\$s/^resetterm/xresetterm/
XX1,\$s/^setterm/xsetterm/
XX1,\$s/^baudrate/xbaudrate/
XXw
XXq
XXEOF
XSHAR_EOF
Xif test 705 -ne "`wc -c < 'Ifile.sh'`"
Xthen
X echo shar: "error transmitting 'Ifile.sh'" '(should have been 705 characters)'
Xfi
Xfi
Xecho shar: "extracting 'Ifile30.sh'" '(254 characters)'
Xif test -f 'Ifile30.sh'
Xthen
X echo shar: "will not over-write existing file 'Ifile30.sh'"
Xelse
Xsed 's/^X//' << \SHAR_EOF > 'Ifile30.sh'
XXex - $1 << EOF
XX1,\$s/^PC/xPC/
XX1,\$s/^BC/xBC/
XX1,\$s/^UP/xUP/
XX1,\$s/^ospeed/xospeed/
XX1,\$s/^LINES/xLINES/
XX1,\$s/^COLS/xCOLS/
XX1,\$s/^wrefresh/xwrefresh/
XX1,\$s/^initscr/xinitscr/
XX1,\$s/^endwin/xendwin/
XX1,\$s/^printw/xprintw/
XX1,\$s/^setterm/xsetterm/
XXw
XXq
XXEOF
XSHAR_EOF
Xif test 254 -ne "`wc -c < 'Ifile30.sh'`"
Xthen
X echo shar: "error transmitting 'Ifile30.sh'" '(should have been 254 characters)'
Xfi
Xfi
Xecho shar: "extracting 'Makefile'" '(5239 characters)'
Xif test -f 'Makefile'
Xthen
X echo shar: "will not over-write existing file 'Makefile'"
Xelse
Xsed 's/^X//' << \SHAR_EOF > 'Makefile'
XX# Pcomm
XX# for AT&T Unix PC 7300/3b1
XX
XXCFLAGS = -O
XXLD = ld -s
XXSHAR = shar -a
XXBIN = /usr/local/bin
XXSHAREDLIB = shlib_c.ifile
XXCURSES = -lcurses
XX
XX#for Unix 3.0
XX#OTHERS = doprnt.o
XX#IFILE = Ifile30.sh
XXOTHERS = setvbuf.o doprnt.o
XXIFILE = Ifile.sh
XX
XXPCOMM = $(OTHERS) tty_att.o admin.o chg_dir.o curses.o d_delete.o \
XX d_lib.o d_manual.o d_menu.o d_print.o d_prompt.o d_revise.o \
XX data_log.o di_delay.o di_win.o dial.o e_lib.o expand.o help.o \
XX info.o init.o list_dir.o ls_menu.o m_lib.o macro.o main.o \
XX n_shell.o p_lib.o passthru.o pexit.o port.o redial.o s_axfer.o \
XX s_extrnl.o s_gen.o s_menu.o s_modem.o s_prompt.o s_term.o \
XX s_tty.o screen.o script.o st_line.o strings.o terminal.o x_ascii.o \
XX x_batch.o x_extrnl.o x_menu.o x_rcv.o x_send.o x_win.o xmodem.o
XX
XXINPUT = $(OTHERS) input.o vcs.o
XX
XXall: pcomm pcomm_input waitfor matches modem_break
XX
XXpcomm: $(PCOMM) $(SHAREDLIB)
XX $(LD) $(PCOMM) $(CURSES) /lib/crt0s.o $(SHAREDLIB) -o pcomm
XX
XXpcomm_input: $(INPUT) $(SHAREDLIB)
XX $(LD) $(INPUT) $(CURSES) /lib/crt0s.o $(SHAREDLIB) -o pcomm_input
XX
XXwaitfor: waitfor.o
XX $(LD) waitfor.o /lib/crt0s.o /lib/shlib.ifile -o waitfor
XX
XXmatches: matches.o
XX $(LD) matches.o /lib/crt0s.o /lib/shlib.ifile -o matches
XX
XXmodem_break: modem_break.o
XX $(LD) modem_break.o /lib/crt0s.o /lib/shlib.ifile -o modem_break
XX
XXsetvbuf.o:
XX ar x /lib/libc.a setvbuf.o
XX
XXdoprnt.o:
XX ar x /lib/libc.a doprnt.o
XX
XXshlib_c.ifile:
XX cp /lib/shlib.ifile shlib_c.ifile
XX sh $(IFILE) shlib_c.ifile
XX
XXinstall:
XX cp pcomm $(BIN)
XX cp pcomm_input $(BIN)
XX cp waitfor $(BIN)
XX cp matches $(BIN)
XX cp modem_break $(BIN)
XX# rm pcomm
XX# rm pcomm_input
XX# rm waitfor
XX# rm matches
XX# rm modem_break
XX
XXlint:
XX lint -p -Dlint admin.c chg_dir.c curses.c d_delete.c d_lib.c \
XX d_manual.c d_menu.c d_print.c d_prompt.c d_revise.c data_log.c \
XX di_delay.c di_win.c dial.c e_lib.c expand.c getcwd.c getopt.c \
XX help.c info.c init.c list_dir.c ls_menu.c m_lib.c macro.c main.c \
XX n_shell.c p_lib.c passthru.c pexit.c port.c redial.c s_axfer.c \
XX s_extrnl.c s_gen.c s_menu.c s_modem.c s_prompt.c s_term.c s_tty.c \
XX screen.c script.c st_line.c strings.c terminal.c tty_att.c \
XX x_ascii.c x_batch.c x_extrnl.c x_menu.c x_rcv.c x_send.c x_win.c \
XX xmodem.c
XX lint -p -Dlint input.c vcs.c
XX lint -p -Dlint waitfor.c
XX lint -p -Dlint matches.c
XX lint -p -Dlint modem_break.c
XX
XXshar:
XX $(SHAR) Doc > pcomm_sh.1
XX $(SHAR) Makefile Matches.1 Modem_break.1 Pcomm.1 Pcomm.dial_dir \
XX Pcomm.extrnl Pcomm.modem Pcomm.param Readme Release.notes Sample \
XX Unixpc.shar Waitfor.1 > pcomm_sh.2
XX $(SHAR) admin.c chg_dir.c config.h curses.c d_delete.c d_lib.c \
XX d_manual.c d_menu.c d_print.c d_prompt.c d_revise.c data_log.c \
XX di_delay.c > pcomm_sh.3
XX $(SHAR) di_win.c dial.c dial_dir.h e_lib.c expand.c extrnl.h \
XX getcwd.c getopt.c help.c info.c init.c input.c list_dir.c \
XX ls_menu.c > pcomm_sh.4
XX $(SHAR) m_lib.c macro.c main.c matches.c misc.h modem.h \
XX modem_break.c n_shell.c p_lib.c param.h passthru.c pexit.c \
XX port.c > pcomm_sh.5
XX $(SHAR) redial.c s_axfer.c s_extrnl.c s_gen.c s_menu.c s_modem.c \
XX s_prompt.c s_term.c s_tty.c screen.c script.c st_line.c status.h \
XX strings.c > pcomm_sh.6
XX $(SHAR) terminal.c tty_att.c tty_ucb.c vcs.c vcs.h waitfor.c \
XX x_ascii.c x_batch.c x_extrnl.c > pcomm_sh.7
XX $(SHAR) x_menu.c x_rcv.c x_send.c x_win.c xmodem.c xmodem.h \
XX > pcomm_sh.8
XX
XXadmin.o: config.h dial_dir.h param.h
XXchg_dir.o: config.h misc.h
XXcurses.o: config.h misc.h
XXd_delete.o: config.h dial_dir.h misc.h param.h
XXd_lib.o: dial_dir.h param.h
XXd_manual.o: config.h dial_dir.h misc.h
XXd_menu.o: config.h dial_dir.h misc.h param.h
XXd_print.o: config.h dial_dir.h misc.h
XXd_prompt.o: config.h dial_dir.h misc.h
XXd_revise.o: config.h dial_dir.h misc.h param.h
XXdata_log.o: config.h misc.h param.h status.h
XXdi_delay.o: config.h misc.h param.h
XXdi_win.o: config.h dial_dir.h misc.h modem.h param.h
XXdial.o: config.h dial_dir.h misc.h modem.h param.h
XXe_lib.o: extrnl.h
XXexpand.o: config.h
XXhelp.o: config.h misc.h
XXinit.o: config.h misc.h status.h
XXinput.o: config.h misc.h status.h vcs.h
XXls_menu.o: config.h dial_dir.h misc.h param.h
XXm_lib.o: modem.h
XXmacro.o: config.h misc.h param.h
XXmain.o: config.h dial_dir.h extrnl.h misc.h modem.h param.h status.h
XXn_shell.o: config.h
XXp_lib.o: param.h
XXpassthru.o: config.h misc.h
XXpexit.o: config.h dial_dir.h misc.h param.h status.h
XXport.o: config.h dial_dir.h modem.h
XXredial.o: config.h dial_dir.h misc.h
XXs_axfer.o: config.h misc.h param.h
XXs_extrnl.o: config.h extrnl.h misc.h
XXs_gen.o: config.h misc.h param.h
XXs_menu.o: config.h misc.h
XXs_modem.o: config.h misc.h modem.h
XXs_prompt.o: config.h misc.h
XXs_term.o: config.h misc.h param.h status.h
XXs_tty.o: config.h misc.h modem.h
XXscreen.o: config.h param.h status.h
XXscript.o: config.h dial_dir.h status.h
XXst_line.o: config.h dial_dir.h misc.h modem.h param.h status.h
XXstrings.o: config.h
XXterminal.o: config.h dial_dir.h misc.h modem.h param.h status.h xmodem.h
XXtty_att.o: dial_dir.h param.h
XXtty_ucb.o: dial_dir.h param.h
XXvcs.o: config.h vcs.h
XXx_ascii.o: config.h misc.h param.h
XXx_batch.o: config.h misc.h xmodem.h
XXx_extrnl.o: config.h
XXx_menu.o: config.h extrnl.h misc.h xmodem.h
XXx_rcv.o: config.h dial_dir.h misc.h xmodem.h
XXx_send.o: config.h dial_dir.h misc.h xmodem.h
XXx_win.o: config.h dial_dir.h misc.h xmodem.h
XXxmodem.o: config.h misc.h param.h xmodem.h
XSHAR_EOF
Xif test 5239 -ne "`wc -c < 'Makefile'`"
Xthen
X echo shar: "error transmitting 'Makefile'" '(should have been 5239 characters)'
Xfi
Xfi
Xecho shar: "extracting 'Pcomm.modem'" '(151 characters)'
Xif test -f 'Pcomm.modem'
Xthen
X echo shar: "will not over-write existing file 'Pcomm.modem'"
Xelse
Xsed 's/^X//' << \SHAR_EOF > 'Pcomm.modem'
XXTTY_1=ph1;OBM;0
XXTTY_2=tty000;DIRECT;0
XXMODEM_1a=OBM;;%;@;
XXMODEM_1b=N;CONNECT;CONNECT;;;;
XXMODEM_1c=;;;
XXMODEM_2a=DIRECT;;;;
XXMODEM_2b=N;;;;;;
XXMODEM_2c=;;;
XSHAR_EOF
Xif test 151 -ne "`wc -c < 'Pcomm.modem'`"
Xthen
X echo shar: "error transmitting 'Pcomm.modem'" '(should have been 151 characters)'
Xfi
Xfi
Xecho shar: "extracting 'Readme.7300'" '(5740 characters)'
Xif test -f 'Readme.7300'
Xthen
X echo shar: "will not over-write existing file 'Readme.7300'"
Xelse
Xsed 's/^X//' << \SHAR_EOF > 'Readme.7300'
XX Pcomm v1.2
XX Additional Notes for users of
XX AT&T Unix PC 7300/3b1
XX
XX 1) The shared libraries on your system contain Terminal Access
XX Method (TAM) routines in lieu of curses(3) routines. However,
XX many of the routines have the same names! This means that
XX curses library is not compatible with the shared library. So,
XX to circumvent the problem, an alternate shared library "link
XX directive file" is needed.
XX
XX The Ifile.sh file (or Ifile30.sh file if using the 3.0 version
XX of Unix) is a shell script that is run by the Makefile to create
XX this alternate file. The alternate file has the references to
XX the TAM routines removed (actually, they just have an "x" placed
XX in the names). The actual shared library binaries are NOT
XX altered. We just fool the linker into believing that the TAM
XX routines aren't there.
XX
XX 2) Before Pcomm can be compiled, the curses library routines
XX must be installed on your system. The diskette labeled
XX "Curses/Terminfo Programmer's Package" is a part of the "Unix
XX Development Set". Likewise, before Pcomm can be used, the
XX terminfo database must be installed. The diskettes labeled
XX "Curses/Terminfo End User Package" and "Terminfo Database" are
XX a part of the "Unix Foundation Set"
XX
XX 3) If you are running Unix version 3.0 or older, you must edit
XX the "config.h" file to change the OLDCURSES definition from
XX "#undef" to "#define". Also, you must edit the Makefile on
XX the following lines:
XX
XX #for Unix 3.0
XX OTHERS = doprnt.o
XX IFILE = Ifile30.sh
XX #OTHERS = setvbuf.o doprnt.o
XX #IFILE = Ifile.sh
XX
XX 4) Did you know that your system can use DEC vt100 style line
XX drawing character? Curses automatically uses the "alternate"
XX character set (if found) to draw the boxes and lines rather than
XX using the "-" and "|" characters. To allow your system to use
XX this feature, there are two things you must do:
XX
XX 1) Load the line drawing font in slot 1 prior to running
XX a program requiring them. This can be done by typing:
XX
XX setf /usr/lib/wfont/BLD.ft 1
XX
XX ...or permanently install this font in slot 1 by adding
XX the following two lines to the end of the /etc/rc file:
XX
XX sfont /usr/lib/wfont/BLD.ft 1
XX setf /usr/lib/wfont/BLD.ft 1
XX
XX 2) Tell curses(3) about the alternate character set by
XX editing the terminfo database.
XX
XX To get a copy of the terminfo entry to play with,
XX you type:
XX
XX infocmp -I s4 > s4.ti
XX
XX now add the following line (with a leading tab) to the
XX "s4.ti" file:
XX
XX acsc=+h\,g.e-fjjkkllmmnnqqttuuvvwwxx,
XX
XX recompile the new entry:
XX
XX tic s4.ti
XX
XX There is one disadvantage... Sometimes line noise will switch
XX you to the line drawing character set while you're communicating
XX with a remote!
XX
XX 5) The "tset" command is broken on every version of Unix this
XX box has ever seen (it is commented out of /etc/profile for a
XX good reason). One of tset's functions was to send a string to
XX initialize the settings of the terminal and to set the tab
XX stops. The fact that this program isn't used is often
XX overlooked because the console (as well as a lot of other
XX terminals) doesn't require any initialization. However, if you
XX call into your system from a remote terminal that *does* require
XX initialization, you've got trouble.
XX
XX For example, curses(3) looks at the terminfo database to see if
XX your terminal has "hardware tabs", if so, it expects the tab
XX stops to be set. Ignoring tabs by using "stty -tabs" (to
XX convert tabs to spaces) won't work, in fact, curses(3) RESETS
XX things as if you had typed "stty tabs"!
XX
XX Likewise, my terminfo entry for PCPLUS v1.1's emulation of a
XX vt102 has "^[)0" in the initialization string to load the line
XX drawing character set. It needs to be sent to the terminal
XX before running Pcomm.
XX
XX Some versions of Unix have a "init" option to the "tput" command
XX to perform all the initialization. If so, you should edit the
XX /etc/profile to add the following commands at the bottom:
XX
XX tput init
XX tabs
XX
XX If your version of tput doesn't recognize the "init" option, a
XX somewhat longer solution is to edit /etc/profile and add the
XX following commands at the bottom:
XX
XX eval `tput iprog`
XX tput is1
XX tput is2
XX if [ -n "`tput hts`" ] ;then
XX stty tabs
XX else
XX stty -tabs
XX fi
XX tabs
XX cat -s "`tput if`"
XX tput is3
XX echo "\r\c"
XX
XX
XX 6) Pcomm makes (an arrogant) assumption that the phone line for
XX the OBM is already configured in the DATA mode. Users with only
XX one phone line attached to ph0 will have to manually switch the
XX line to the DATA mode before using Pcomm and then switch it back
XX to VOICE afterwards. To aid in this task, the following shell
XX script could be used:
XX
XX phtoggle
XX sleep 1
XX /usr/local/bin/pcomm $*
XX phtoggle
XX
XX Users with one phone line attached to ph0 will have to change
XX the TTY setup since the default Pcomm.modem file assumes that
XX ph1 is being used.
XX
XX If you only have one phone line but *always* use it in the DATA
XX mode, there is another solution. Did you know that you can fool
XX your machine into having a one-line system in the DATA mode?
XX All you have to do is re-configure the Telephone Setup and tell
XX the machine that you've got two lines (one line to be shared
XX between VOICE and DATA on ph0, and one line to be DATA only on
XX ph1). Then you just never plug the phone line into ph0, you use
XX ph1 instead. The Telephone Setup menu is reached through the
XX Office of install, Administration, Hardware Setup menues.
XX
XX 7. The SETUID_BROKE pre-processor variable was designed to take
XX care of systems that aren't able to switch back and forth
XX between the real and effective user id. On the Unix PC, this
XX problem only exists if the program is set-group-id. So, if
XX you're running HDB UUCP and have Pcomm set-user-id to uucp, you
XX don't need to have SETUID_BROKE defined.
XSHAR_EOF
Xif test 5740 -ne "`wc -c < 'Readme.7300'`"
Xthen
X echo shar: "error transmitting 'Readme.7300'" '(should have been 5740 characters)'
Xfi
Xfi
Xecho shar: "extracting 'config.h'" '(2273 characters)'
Xif test -f 'config.h'
Xthen
X echo shar: "will not over-write existing file 'config.h'"
Xelse
Xsed 's/^X//' << \SHAR_EOF > 'config.h'
XX/*
XX * Various tunable parameters. This should appear before any other local
XX * header file.
XX */
XX
XX/* Are you using a Berkeley flavor of Unix? */
XX#undef BSD
XX
XX/* Use the dialing routines specific to the AT&T Unix PC 7300/3b1 */
XX#define UNIXPC
XX
XX/* Older versions of curses(3) use termcap in lieu of terminfo */
XX#undef OLDCURSES
XX
XX/* Use shared memory in lieu of a file for the virtual screen */
XX#define SHAREDMEM
XX
XX/* Should a missing video attribute be promoted to standout? */
XX#define NOPROMOTE
XX
XX/* Use extra precautions if Pcomm is set-user-id or set-group-id */
XX#undef SETUGID
XX
XX/* Should Pcomm make a log of all phone calls? */
XX#define LOG_CALLS
XX
XX/* The name of the log file (if used). */
XX#define LOGFILE "/usr/adm/phone.calls"
XX
XX/* Should long distance (toll) calls be limited to a specific group? */
XX#undef LIMIT_LD
XX
XX/* The name of the privileged group for limiting long distance calls */
XX#define GROUP_NAME "uucp"
XX
XX/* The path to the line printer program */
XX#define LPR "/usr/bin/lp"
XX
XX/* The path to the "pretty" printer program (if none, use same as LPR) */
XX#define LPRINT "/usr/bin/lp"
XX
XX/* The path to the default directory containing the Pcomm support files */
XX#define DEFAULT_DIR "/usr/local/lib/pcomm"
XX
XX/* The path to the directory where UUCP locks are found */
XX#define LOCK_DIR "/usr/spool/uucp"
XX
XX/* Do the lock files use ASCII encoded PID's? */
XX#undef ASCII_PID
XX
XX/* Fold the last character of the lock file to lower case? */
XX#undef XENIX_LOCKS
XX
XX/* Should Pcomm optimize redialing by keeping the TTY port open */
XX#define KEEP_PORT
XX
XX/* Does the status line scroll up on "magic cookie" terminals? */
XX#define XMC_BROKE
XX
XX/* Does the alarm() system call work correctly with the wgetch() function? */
XX#undef WGETCH_BROKE
XX
XX/* The size of the serial port character buffer */
XX#define CLIST_SIZ 64
XX
XX/* The size of the input buffer (should be about the same as CLIST_SIZ) */
XX#define INPUT_BUF 16
XX
XX/* The size of the output buffer (should be about one half INPUT_BUF) */
XX#define OUTPUT_BUF 1
XX
XX/* Does memmove() exist or is memcpy() well behaved when overlapping? */
XX#define MEMMOVE memcpy
XX
XX/* Does your Unix allow flip-flop between real and effective user IDs? */
XX#define SETUID_BROKE
XX
XXtypedef int SIG_TYPE;
XX
XX#ifdef OLDCURSES
XX#define fixterm xfixterm
XX#endif /* OLDCURSES */
XSHAR_EOF
Xif test 2273 -ne "`wc -c < 'config.h'`"
Xthen
X echo shar: "error transmitting 'config.h'" '(should have been 2273 characters)'
Xfi
Xfi
Xexit 0
X# End of shell archive
SHAR_EOF
if test 17190 -ne "`wc -c < 'Unixpc.shar'`"
then
echo shar: "error transmitting 'Unixpc.shar'" '(should have been 17190 characters)'
fi
fi
echo shar: "extracting 'Waitfor.1'" '(871 characters)'
if test -f 'Waitfor.1'
then
echo shar: "will not over-write existing file 'Waitfor.1'"
else
sed 's/^X//' << \SHAR_EOF > 'Waitfor.1'
X.TH WAITFOR 1 local
X.SH NAME
Xwaitfor \- wait for a string to appear on the stdin
X.SH SYNOPSIS
X.B waitfor
X[
X.B \-n
X]
X.B string
X.SH DESCRIPTION
X.I Waitfor
Xreads the standard input and returns a 0 if the string argument is
Xfound, returns a 1 if the strings did not appear within the allotted
Xtime, or returns a \-1 on error. If the string is found,
X.I waitfor
Xreturns immediately.
X.PP
X.I Waitfor
Xis designed to be used by
X.I Pcomm
Xin a shell script for automatically logging a user onto a remote system.
X.PP
XThe
X.I \-n
Xoption is used to specify the length of time in seconds to wait. The
Xdefault is 10 seconds.
X.SH EXAMPLE
X.nf
X # wait 5 seconds for the login prompt
X waitfor \-5 login:
X # test the exit code of the waitfor command
X if [ $? \-eq 0 ]
X then
X # send my user ID
X echo egray
X fi
X.fi
X.SH "SEE ALSO"
Xpcomm(1), matches(1), modem_break(1), Pcomm Reference Manual
SHAR_EOF
if test 871 -ne "`wc -c < 'Waitfor.1'`"
then
echo shar: "error transmitting 'Waitfor.1'" '(should have been 871 characters)'
fi
fi
exit 0
# End of shell archive
More information about the Unix-pc.sources
mailing list