🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #332

Patch #1 to Pcomm v2.0

#332
From: Emmet P. Gray
Date: Sun, 06 Sep 1992 18:01
1250 lines
39503 bytes
This is patch #1 to the Pcomm v2.0 distribution package.  This patch
will correct a minor bug with the external protocol option (when running
under SVR3.2) that prevented Pcomm from detecting the death of the child
process.

The rather large size of this patch is do to the numerous changes to the
Doc.me file.

Pcomm v2.0.0 was sent to the moderator of comp.sources.unix on 20 Jul 92.

Emmet P. Gray				US Army, HQ III Corps & Fort Hood
...!uunet!uiucuxc!fthood!egray		Attn: AFZF-DE-ENV
fthood!egray@uxc.cso.uiuc.edu		Directorate of Engineering & Housing
					Environmental Management Office
					Fort Hood, TX 76544-5057

------------------------------------------------------------------------------
Prereq: "2.0.0"
*** old/patchlevel.h	Mon Jul 20 17:02:59 1992
--- patchlevel.h	Sun Sep  6 10:19:25 1992
***************
*** 1,2 ****
! #define VERSION "2.0.0"
! #define DATE "18 Jul 92"
--- 1,2 ----
! #define VERSION "2.0.1"
! #define DATE "6 Sep 92"
*** old/Configure.sh	Mon Jul 20 17:02:53 1992
--- Configure.sh	Mon Aug 31 10:32:16 1992
***************
*** 108,111 ****
--- 108,118 ----
  		fi
  	fi
+ 	if [ `grep -c "^truncate.o" /tmp/config.$$` -eq 1 ] ;then
+ 		echo "You've got the truncate() function"
+ 		echo "Therefore you need:	#define HAVE_TRUNCATE"
+ 	else
+ 		echo "You don't have the truncate() function"
+ 		echo "Therefore you need:	#undef HAVE_TRUNCATE"
+ 	fi
  	rm /tmp/config.$$
  else
*** old/Convert.sh	Mon Jul 20 17:02:53 1992
--- Convert.sh	Wed Jul 22 21:33:04 1992
***************
*** 18,22 ****
  1,$s/D_DBITS=/D_DATA_BITS=/
  1,$s/D_SBITS=/D_STOP_BITS=/
! 1,$s/HOT=/HOT_KEY=/
  1,$s/FLOW=/FLOW_CTRL=/
  1,$s/LECHO=/LOCAL_ECHO=/
--- 18,22 ----
  1,$s/D_DBITS=/D_DATA_BITS=/
  1,$s/D_SBITS=/D_STOP_BITS=/
! 1,$s/^HOT=/HOT_KEY=/
  1,$s/FLOW=/FLOW_CTRL=/
  1,$s/LECHO=/LOCAL_ECHO=/
*** old/Doc.me	Mon Jul 20 17:02:54 1992
--- Doc.me	Mon Aug 31 10:31:31 1992
***************
*** 6,12 ****
  .nr sf 3				\" section font is bold
  .nr tf 1				\" title font is roman
- .oh ''Pcomm Reference Manual'Page %'
- .eh 'Page %'Pcomm Reference Manual''
  .\" this macro is used to change the proportional font to 12 pitch
  .de CS
  .cs R 22
--- 6,11 ----
  .nr sf 3				\" section font is bold
  .nr tf 1				\" title font is roman
  .\" this macro is used to change the proportional font to 12 pitch
+ .\" some folks may need ".cs CW" in lieu of ".cs R 22"
  .de CS
  .cs R 22
***************
*** 13,17 ****
  ..
  .\" and this one puts things back
! .ds Cs
  .cs R
  ..
--- 12,16 ----
  ..
  .\" and this one puts things back
! .de Cs
  .cs R
  ..
***************
*** 47,51 ****
--- 46,54 ----
  program and contains no ProComm source code.  This is not a Datastorm
  product.
+ .bp
+ .oh ''Pcomm Reference Manual'Page %'
+ .eh 'Page %'Pcomm Reference Manual''
  .pn 1
+ .ep
  .bp
  .sh 1 INTRODUCTION 
***************
*** 201,205 ****
  The \*(lq\-a\*(rq option is used to specify a script file to be
  \*(lqplayed\*(rq prior to dialing, to specify the TTY to be use, or to
! specify the mdoem to be used.  This feature can be used to customize
  Pcomm options or perform unattended operations.
  .lp
--- 204,208 ----
  The \*(lq\-a\*(rq option is used to specify a script file to be
  \*(lqplayed\*(rq prior to dialing, to specify the TTY to be use, or to
! specify the modem to be used.  This feature can be used to customize
  Pcomm options or perform unattended operations.
  .lp
***************
*** 214,217 ****
--- 217,221 ----
  \-o	Set the parity to odd
  \-n	Set the parity to none
+ \-w	Set the word length (number of data bits)
  \-b	Set the baud rate
  \-p	Dial this number
***************
*** 249,252 ****
--- 253,257 ----
  .if n .ll 8.5i
  .CS
+ .(b L
  .TS
  box center;
***************
*** 254,257 ****
--- 259,263 ----
  ^A-0 HELP 	No TTY 	FDX 	1200 E71 	LOG OFF 	PTR OFF 	CR  	CR  
  .TE
+ .)b
  .Cs
  .if n .po 1.0i
***************
*** 274,279 ****
  .lp
  .ft I
! NOTE:\ \ If the DTE interface speed is locked, the status line will show
! the "connected" speed rather than the speed of the serial port.
  .ft
  .sh 2 "Help screen"
--- 280,286 ----
  .lp
  .ft I
! NOTE:\ \ If the DTE (Data Terminal Equipment) interface speed is locked,
! the status line will show the \*(lqconnected\*(rq speed rather than the
! speed of the serial port.
  .ft
  .sh 2 "Help screen"
***************
*** 469,473 ****
  3) Locked speed.  Normally Pcomm will use the baud rate in the dialing
  directory when talking to the modem.  If the locked speed is non-zero,
! then the baud rate specified is only one that will ever be use.  The
  baud rate is selected from a \*(lqmenu prompt\*(rq.  See Appendix C for
  more information about the use of this feature.
--- 476,480 ----
  3) Locked speed.  Normally Pcomm will use the baud rate in the dialing
  directory when talking to the modem.  If the locked speed is non-zero,
! then the baud rate specified is the only one that will ever be use.  The
  baud rate is selected from a \*(lqmenu prompt\*(rq.  See Appendix C for
  more information about the use of this feature.
***************
*** 491,495 ****
  -------------------------- Modem Setup --------------------------
  .sp
!            1) Modem name (1 of 4) ... HAYES
             2) Modem init string ..... ATS7=60S11=70E0Q0V1X4&D2!
             3) Dialing command ....... ATDT
--- 498,502 ----
  -------------------------- Modem Setup --------------------------
  .sp
!            1) Modem name (1 of 5) ... HAYES
             2) Modem init string ..... ATS7=60S11=70E0Q0V1X4&D2!
             3) Dialing command ....... ATDT
***************
*** 519,523 ****
  1) Modem name.  This is the key word that links the modem database with
  the TTY database.  A menu prompt is used to select the modem name (and
! the remaining parameters that go with it).  The \*(lq(1 of 4)\*(rq field
  indicates there are additional modems in the database.
  .lp
--- 526,530 ----
  1) Modem name.  This is the key word that links the modem database with
  the TTY database.  A menu prompt is used to select the modem name (and
! the remaining parameters that go with it).  The \*(lq(1 of 5)\*(rq field
  indicates there are additional modems in the database.
  .lp
***************
*** 546,550 ****
  6) Auto baud detect.  Should Pcomm attempt to change the baud rate of
  the TTY to the baud rate matching the connect string?  This feature
! requires the connect strings to be unique.
  .lp
  7\-13) Connect strings.  The return messages when the modem has connected
--- 553,558 ----
  6) Auto baud detect.  Should Pcomm attempt to change the baud rate of
  the TTY to the baud rate matching the connect string?  This feature
! requires the connect strings to be unique.  This does not override the
! locked speed feature (discussed in section 3.2).
  .lp
  7\-13) Connect strings.  The return messages when the modem has connected
***************
*** 612,617 ****
  .lp
  4) Flow control.  A menu prompt is shown to select between XON/XOFF flow
! control and NONE.  Pcomm often temporarily disables flow control during
! file transfers.
  .lp
  .ft I
--- 620,625 ----
  .lp
  4) Flow control.  A menu prompt is shown to select between XON/XOFF flow
! control and NONE.  A value of NONE assumes that the hardware (not Pcomm)
! will perform the flow control.
  .lp
  .ft I
***************
*** 957,969 ****
  \*(lqH\*(rq for half.
  .lp
! Auxiliary) This field has one of three uses:
! .br
  .in +0.5i
! 1) Name of the shell script to be used during the auto-login \*(lqchat\*(rq
  sequence.
  .br
! 2) Name of the TTY to be used.
  .br
! 3) Name of the Modem to be used.
  .in
  .lp
--- 965,978 ----
  \*(lqH\*(rq for half.
  .lp
! Auxiliary) This field contains the name of a file which has one of three
! uses:
! .lp
  .in +0.5i
! 1) A shell script to be used during the auto-login \*(lqchat\*(rq
  sequence.
  .br
! 2) A particular TTY to be used for hard-wired ports.
  .br
! 3) A customized modem configuration to be used for the entry.
  .in
  .lp
***************
*** 976,981 ****
  .lp
  .ft I
! NOTE:\ \ The ability to specify a modem allows you to customize each
! dialing directory entry to use its own peculiar modem initization string.
  .ft
  .ba
--- 985,992 ----
  .lp
  .ft I
! NOTE:\ \ The ability to specify a customized modem configuration allows
! you to tailor each dialing directory entry to meet the peculiar needs of
! the modem at the other end of the connection.  See Appendix C for more
! details.
  .ft
  .ba
***************
*** 1074,1081 ****
  the remote system with only a few keystrokes.  The characters used to
  identify the macros are the shifted number keys.  For example, if the
! string \*(lqls -alRF \e\| more!\*(rq was assigned to the \*(lq!\*(rq key
  (the shifted number 1 key), then when you press ^A-!, the string
  \*(lqls -alRF | more\*(rq is sent to the remote (followed by a <CR>
! because of the \*(lq!\*(rq character synonym).
  .lp
  To review or edit the keyboard macros, you type ^A-M.  The following
--- 1085,1094 ----
  the remote system with only a few keystrokes.  The characters used to
  identify the macros are the shifted number keys.  For example, if the
! string \*(lqls -alRF \e| more!\*(rq was assigned to the \*(lq!\*(rq key
  (the shifted number 1 key), then when you press ^A-!, the string
  \*(lqls -alRF | more\*(rq is sent to the remote (followed by a <CR>
! because of the \*(lq!\*(rq character synonym).  Notice the use of the
! \*(lq\e\*(rq character to remove the special meaning of the \*(lg|\*(rq
! character synonym.
  .lp
  To review or edit the keyboard macros, you type ^A-M.  The following
***************
*** 1093,1097 ****
  .sp
  .\"                                                   spaces out to here
!   ^A-! ls -alRF \e\| more!                              
    ^A-@ 
    ^A-# 
--- 1106,1110 ----
  .sp
  .\"                                                   spaces out to here
!   ^A-! ls -alRF \e| more!                             
    ^A-@ 
    ^A-# 
***************
*** 1206,1210 ****
  .)x
  .lp
! Command files (shell scripts) can be envoked by typing ^A-5 to automate
  keyboard input and to perform Pcomm command sequences.  The following window
  will prompt for the file name.
--- 1219,1223 ----
  .)x
  .lp
! Command files (shell scripts) can be invoked by typing ^A-5 to automate
  keyboard input and to perform Pcomm command sequences.  The following window
  will prompt for the file name.
***************
*** 1224,1228 ****
  .Cs
  .lp
! The use of shell scripts is discussed in Section 8.
  .bp
  .if e \{
--- 1237,1241 ----
  .Cs
  .lp
! The use of shell scripts is discussed in section 8.
  .bp
  .if e \{
***************
*** 1406,1410 ****
  .lp
  .ft I
! NOTE:\ \ The external protocol feature can also be used (misused?) to pipe
  the output of a Unix command to the remote.
  .ft
--- 1419,1423 ----
  .lp
  .ft I
! NOTE:\ \ The external protocol feature can also be used to pipe
  the output of a Unix command to the remote.
  .ft
***************
*** 1710,1714 ****
  .if n .ll 6.5i
  .lp
! Items in the window are continously updated to show the progress of the
  dialing attempt.
  .lp
--- 1723,1727 ----
  .if n .ll 6.5i
  .lp
! Items in the window are continuously updated to show the progress of the
  dialing attempt.
  .lp
***************
*** 1767,1774 ****
  \*(lqpcomm_cmd\*(rq program is used to transmit command sequences to
  Pcomm.  For example, a script can contain a line such as \*(lqpcomm_cmd
! data_log on\*(rq to turn on the data logging feature.  The shell scripts
! specified in the dialing directory are run \fBafter\fP the connection to
! the remote system has been made.
  .lp
  You may hit the <ESC> key at any time to abort an auto-login script
  before it has completed.
--- 1780,1792 ----
  \*(lqpcomm_cmd\*(rq program is used to transmit command sequences to
  Pcomm.  For example, a script can contain a line such as \*(lqpcomm_cmd
! data_log on\*(rq to turn on the data logging feature.
  .lp
+ Shell scripts specified in the dialing directory are run \fBafter\fP the
+ connection to the remote system, while script specified on the command
+ line (with the \-a option) are run \fBbefore\fP the connection is made.
+ You can make a shell script work under both situations by using the
+ \*(lqpcomm_cmd is connected\*(rq command.  See the third example in
+ section 8.4.
+ .lp
  You may hit the <ESC> key at any time to abort an auto-login script
  before it has completed.
***************
*** 1953,1957 ****
  .br
  Dial an entry from the dialing directory.  The MANUAL option is used to
! optionaly dial a phone number without the use of the dialing directory.
  DIAL returns after 1 attempt.  A return code of 1 means a connection
  was made.
--- 1971,1975 ----
  .br
  Dial an entry from the dialing directory.  The MANUAL option is used to
! optionally dial a phone number without the use of the dialing directory.
  DIAL returns after 1 attempt.  A return code of 1 means a connection
  was made.
***************
*** 2185,2189 ****
  .lp
  .(b L
! The following is an example fo a shell script that will dial a system,
  log a user on, transfer a file called junk using xmodem, log out, and
  exit Pcomm.
--- 2203,2207 ----
  .lp
  .(b L
! The following is an example of a shell script that will dial a system,
  log a user on, transfer a file called junk using xmodem, log out, and
  exit Pcomm.
***************
*** 2191,2195 ****
  .in +0.5i
  .CS
! # are we allready connected?
  answer=`pcomm_cmd if connected`
  if [ "$answer" -eq 0 ]
--- 2209,2213 ----
  .in +0.5i
  .CS
! # are we already connected?
  answer=`pcomm_cmd if connected`
  if [ "$answer" -eq 0 ]
***************
*** 2206,2210 ****
  # wait for the password prompt
  waitfor assword:
! # send my passwd
  echo abcdefg
  # wait for a Unix prompt
--- 2224,2228 ----
  # wait for the password prompt
  waitfor assword:
! # send my password
  echo abcdefg
  # wait for a Unix prompt
***************
*** 2264,2268 ****
  setup, is ignored.
  .lp
! 8) Systems running older versions of uugetty (the bi-directional version
  of getty that comes with HDB uucp) may require extra commands in the
  initialization string to assure that uugetty switches to its dial out
--- 2282,2286 ----
  setup, is ignored.
  .lp
! 7) Systems running older versions of uugetty (the bi-directional version
  of getty that comes with HDB uucp) may require extra commands in the
  initialization string to assure that uugetty switches to its dial out
***************
*** 2306,2310 ****
  .lp
  The dialing codes used by the OBM (On Board Modem) are not
! straight-forward.  The modem setup, as distributed, looks like this:
  .br
  .CS
--- 2324,2329 ----
  .lp
  The dialing codes used by the OBM (On Board Modem) are not
! straight-forward.  The modem setup, as included in the Unixpc.shar file,
! looks like this:
  .br
  .CS
***************
*** 2406,2411 ****
  .ba
  .lp
! The features and complexities of newer high speed intelligent modems
! avialable today warrants a more detailed discussion.
  .lp
  1) Locked interface speed
--- 2425,2430 ----
  .ba
  .lp
! The features and complexities of the newer high speed intelligent modems
! available today warrants a more detailed discussion.
  .lp
  1) Locked interface speed
***************
*** 2418,2422 ****
  .lp
  The \*(lqlocked speed\*(rq field of the TTY database was created to
! solve this problem.  If this value is non-zero, Pcomm wll only use this
  baud rate when talking to the modem.  The true connected baud rate
  (14400 for example) will continue to be displayed in the status line.
--- 2437,2441 ----
  .lp
  The \*(lqlocked speed\*(rq field of the TTY database was created to
! solve this problem.  If this value is non-zero, Pcomm will only use this
  baud rate when talking to the modem.  The true connected baud rate
  (14400 for example) will continue to be displayed in the status line.
***************
*** 2435,2440 ****
  database.  For example, you could have an entry called \*(lqTELEBIT\*(rq
  for normal connections, one called \*(lqTELEBIT_V.32\*(rq for connecting
! ot older V.32 modems, and another called \*(lqTELEBIT_PEP\*(rq for 
! connections to othe PEP modems.
  .lp
  Pcomm uses the connect strings to determine if the modem can handle the
--- 2454,2459 ----
  database.  For example, you could have an entry called \*(lqTELEBIT\*(rq
  for normal connections, one called \*(lqTELEBIT_V.32\*(rq for connecting
! to older V.32 modems, and another called \*(lqTELEBIT_PEP\*(rq for 
! connections to other PEP modems.
  .lp
  Pcomm uses the connect strings to determine if the modem can handle the
***************
*** 2445,2449 ****
  specific modem for each dialing directory that my require one.
  .lp
! You choices are virtually unlimited...  you can have a separte modem
  setup to control modem features such as error control, compression,
  protocol spoofing, etc.
--- 2464,2473 ----
  specific modem for each dialing directory that my require one.
  .lp
! .ft I
! NOTE:\ \ The default modem configuration (in a multiple setup situation)
! must appear first in the modem database.
! .ft
! .lp
! Your choices are virtually unlimited...  you can have a separate modem
  setup to control modem features such as error control, compression,
  protocol spoofing, etc.
***************
*** 2463,2467 ****
  L1	Low speaker volume
  Q2	Use result codes only when dialing out
! X2	Use the most detailed result codes
  &C1	Set DCD to follow the carrier
  &D3	Hard reset on loss of DTR
--- 2487,2491 ----
  L1	Low speaker volume
  Q2	Use result codes only when dialing out
! X2	Use detailed result codes (connect speeds)
  &C1	Set DCD to follow the carrier
  &D3	Hard reset on loss of DTR
***************
*** 2469,2473 ****
  S7=60	Wait at least 60 seconds for a carrier
  S51=6	Set interface speed to 38400 baud
! S58=2	Rull duplex RTS/CTS flow control
  S59=15	Use result code extensions
  S61=0	Pass modem breaks to the other end
--- 2493,2497 ----
  S7=60	Wait at least 60 seconds for a carrier
  S51=6	Set interface speed to 38400 baud
! S58=2	Full duplex RTS/CTS flow control
  S59=15	Use result code extensions
  S61=0	Pass modem breaks to the other end
***************
*** 2487,2491 ****
  l l c
  l l l.
! TTY name	Modem name	Init speed
  .sp
  1) tty10	HAYES	0
--- 2511,2515 ----
  l l c
  l l l.
! TTY name	Modem name	Locked speed
  .sp
  1) tty10	HAYES	0
***************
*** 2499,2503 ****
  .in
  .lp
! Notice that the last three entries share the same TTY.
  .ba
  .lp
--- 2523,2528 ----
  .in
  .lp
! Notice that the last three entries share the same TTY and are physically
! the same modem.
  .ba
  .lp
***************
*** 2607,2612 ****
  .)b
  .sp 3
! .\" Not all versions of nroff can handle a 2 column index
  .2c
! .nr xu 2
  .xp
--- 2632,2637 ----
  .)b
  .sp 3
! .\" Not all versions of {t,n}roff can handle a 2 column index
  .2c
! .nr xu 0.2i
  .xp
*** old/Makefile	Mon Jul 20 17:02:55 1992
--- Makefile	Mon Aug 17 16:30:23 1992
***************
*** 21,24 ****
--- 21,28 ----
  #LD = /usr/5bin/cc
  
+ #for SVR3.2
+ #SHLIB = -lc_s
+ #OTHER = -lpt
+ 
  LD = cc
  SHLIB =
*** old/Matches.1	Mon Jul 20 17:02:55 1992
--- Matches.1	Sat Aug 22 16:05:44 1992
***************
*** 1,3 ****
! .TH MATCHES 1 local
  .SH NAME
  matches \- test if string2 is contained in string1
--- 1,3 ----
! .TH matches L
  .SH NAME
  matches \- test if string2 is contained in string1
*** old/Pcomm.1	Mon Jul 20 17:02:55 1992
--- Pcomm.1	Sat Aug 22 16:05:44 1992
***************
*** 4,8 ****
  .if n .ds lq ""
  .el .ds lq ``
! .TH PCOMM 1 local
  .SH NAME
  pcomm \- a telecommunication program
--- 4,8 ----
  .if n .ds lq ""
  .el .ds lq ``
! .TH pcomm L 
  .SH NAME
  pcomm \- a telecommunication program
***************
*** 56,78 ****
  and telephone number from the command line.  The normal method of
  dialing is from the dialing directory.
  .RS 5
- .TP
  .B \-e
! Set the parity to even.
! .TP
  .B \-o
! Set the parity to odd.
! .TP
  .B \-n
! Set the parity to none.
! .TP
  .B \-w
! Set the word length (number of data bits).
! .TP
  .B \-b
! Set the baud rate.
! .TP
  .B \-p
! Dial this phone number.
  .RE
  .PP
--- 56,78 ----
  and telephone number from the command line.  The normal method of
  dialing is from the dialing directory.
+ .PP
  .RS 5
  .B \-e
! 	Set the parity to even.
! .br
  .B \-o
! 	Set the parity to odd.
! .br
  .B \-n
! 	Set the parity to none.
! .br
  .B \-w
! 	Set the word length (number of data bits).
! .br
  .B \-b
! 	Set the baud rate.
! .br
  .B \-p
! 	Dial this phone number.
  .RE
  .PP
*** old/Pcomm_cmd.1	Mon Jul 20 17:02:56 1992
--- Pcomm_cmd.1	Sat Aug 22 16:05:44 1992
***************
*** 3,7 ****
  .if n .ds lq ""
  .el .ds lq ``
! .TH PCOMM_CMD 1 local
  .SH NAME
  pcomm_cmd \- send a command to Pcomm
--- 3,7 ----
  .if n .ds lq ""
  .el .ds lq ``
! .TH pcomm_cmd L
  .SH NAME
  pcomm_cmd \- send a command to Pcomm
***************
*** 122,129 ****
  DIAL returns after 1 attempt.  A return code of 1 means a connection
  was made.
! .I
  The dial function will not be allowed to switch TTY ports.  If the current
  TTY is not suitable (i.e. not attached to the correct modem), the script
  will be terminated.
  .TP
  REDIAL entry_number
--- 122,130 ----
  DIAL returns after 1 attempt.  A return code of 1 means a connection
  was made.
! .ft I
  The dial function will not be allowed to switch TTY ports.  If the current
  TTY is not suitable (i.e. not attached to the correct modem), the script
  will be terminated.
+ .ft
  .TP
  REDIAL entry_number
*** old/Readme	Mon Jul 20 17:02:56 1992
--- Readme	Sun Sep  6 10:16:01 1992
***************
*** 154,157 ****
--- 154,160 ----
  			#undef.
  
+ 	HAVE_TRUNCATE	Does your system have the truncate() system call?
+ 			Most modern systems do.
+ 
  	3) Edit the Makefile.  There are provisions in the Makefile to
  	include getcwd(3) and getopt(3) routines if they are missing
***************
*** 216,223 ****
  		&F 	Restores factory settings
  		L1	Low speaker volume
! 		X2	Detailed result codes
  		Q2	Turns on result codes only when dialing out
! 		&C1	Hard reset on loss of DTR
! 		&D3	DCD follows the carrier
  		S0=1	Answer on first ring
  		S7=60	60 second wait for carrier
--- 219,226 ----
  		&F 	Restores factory settings
  		L1	Low speaker volume
! 		X2	Detailed result codes (connect speeds)
  		Q2	Turns on result codes only when dialing out
! 		&C1	DCD follows the carrier
! 		&D3	Hard reset on loss of DTR
  		S0=1	Answer on first ring
  		S7=60	60 second wait for carrier
*** old/Release.notes	Mon Jul 20 17:02:56 1992
--- Release.notes	Sun Sep  6 11:00:40 1992
***************
*** 1,2 ****
--- 1,12 ----
+ Patch #1, 6 Sep 92
+ 
+ This patch will correct a minor bug with the external protocol option
+ (when running under SVR3.2) that prevented Pcomm from detecting the
+ death of the child process.
+ 
+ The rather large size of this patch is do to the numerous changes to the
+ Doc.me file.
+ 
+ ------------------------------------------------------------------------------
  			     Pcomm version 2.0
  				 18 Jul 92
***************
*** 51,299 ****
  
  	xpcomm - a version of Pcomm using the X window toolkits.
- 
- -------------------------------------------------------------------------------
- 
- 			     Pcomm version 1.2
- 				 4 Feb 89
- 
- Compatibilities with v1.1:
- 
- 	The support files used with the v1.1 release are compatible with
- 	the v1.2 release.  However, the use of the "index" field (now
- 	called the "script" field) in the pcomm.dial_dir file has
- 	changed dramatically (see below).
- 
- Things that have changed:
- 
- 	Berkeley flavors of Unix are now supported.  There are files
- 	called tty_att.c and tty_ucb.c that contain the code specific
- 	to the AT&T and Berkeley worlds.  See the config.h file for
- 	the BSD pre-processor definition.
- 
- 	Auto-login scripts are now supported.  If the script field of
- 	the dialing directory contains the name of a valid Unix shell
- 	script, that shell script is "played" after the connection is
- 	made to perform the auto-login "chat" sequences.  A example of a
- 	auto-login Bourne shell script (called Sample) is included in
- 	the distribution.
- 
- 	Three new external programs.  In order to assist in the creation
- 	of the auto-login shell scripts, three external programs are
- 	included in the distribution.
- 
- 		waitfor - wait for a string, return a 1 if timed out
- 		matches - test if string2 is contained in string1
- 		modem_break - send a modem break
- 
- 	There is a new support file called "pcomm.extrnl" that allows
- 	the user to embed the names of external file transfer programs
- 	into the list of available protocols.  (The default file
- 	"Pcomm.extrnl", supplied with the distribution package, contains
- 	definitions for zmodem).
- 
- 	The pcomm_input program has been changed to use multiple
- 	character buffered writes to the screen.  Both the input and
- 	output buffer sizes are tunable parameters in config.h
- 
- 	Newer versions of Xenix have changed the rules for creating UUCP
- 	lock files.  See the config.h file for the description of
- 	XENIX_LOCKS.
- 
- 	The -f option now looks at the name field of the dialing
- 	directory (rather than the index field).  A match is found when
- 	the argument to the -f is contained in a name field (an exact
- 	match is not required).  The match does not consider upper and
- 	lower case differences as significant.
- 
- Known limitations:
- 
- 	The detection of VCS (video command sequences) is still limited
- 	to a very small subset of possible commands.
- 
- 	For the VCS emulation to work, the terminfo entries on the host
- 	machine must match the entries on the remote.  (Don't assume 
- 	your vt100 terminfo data is identical to someone else's).
- 
- 	The disp_tty() routine in s_tty.c currently does not support a
- 	NUM_TTY definition of greater than 10.
- 
- Future directions:
- 	
- 	That's about it folks...
- 
- 	If Pcomm grows any more, I'll break the setup routines out as a
- 	separate program.
- 
- Many thanks to the following people (and many others) for bug reports
- and suggested improvements to the code.
- 
- 	Andy Fyfe		...ames!elroy!cit-vax!andy
- 	Brian Antoine		...iscuva!tau-ceti!briana
- 	Chad R. Larson		...ncar!noao!nud!anasaz!dcfinc!chad
- 	David MacKenzie		...uunet!rocky2.rockefeller.edu!edf
- 	Gary S. Trujillo	...{linus,bbn,m2c}!spdcc!gnosys!gst
- 	George Pontis		...uunet!moldev!geo
- 	J. Eric Townsend	...uunet!nuchat!flatline!erict
- 	Jim Pickering		...csun!polyslo!rducky!jrp
- 	Jim Sanchez		...uunet!mcvax!syteke!jim
- 	Jonathan Bayer		...uunet!ispi!jbayer
- 	MAJ Dave Dockstader	...twsc4sac@mater1.arpa
- 	Michael Brady		...sun!portal!cup.portal.com!michealnc
- 
- -------------------------------------------------------------------------------
- 
- 			     Pcomm version 1.1
- 				21 Aug 88
- 
- Incompatibilities with v1.0:
- 
- 	I've added a few more fields to the pcomm.param and pcomm.modem
- 	files.  This means that those files created under previous
- 	releases will not be compatible with the v1.1 release.  It might
- 	be a good idea to abandon the older files and start over with
- 	the sample files in this release.
- 
- Things that have changed:
- 
- 	An awful lot of sloppy programming on my part has now been
- 	cleaned up.  This means that porting Pcomm to different versions
- 	of Unix will be considerably less painful than before.
- 
- 	All of the tunable parameters are now in "config.h".
- 
- 	Pcomm now uses buffered I/O routines.  This yields higher
- 	performance I/O at large baud rates.
- 
- 	File transfers now use high performance CRC calculations.
- 
- 	If a UUCP lockfile does exist, Pcomm now attempts to determine
- 	if the process is still active.
- 
- 	An external file transfer program can be invoked from the file
- 	transfer menu.
- 
- 	The keyboard macro feature is now supported (although it is
- 	rather crude).
- 
- 	The virtual screen routine now understands a limited subset of
- 	escape sequences.
- 
- 	The virtual screen can now be held in shared memory or in a file.
- 
- 	The input routine is now contained in a separate program called
- 	pcomm_input.
- 
- 	You can now include a "modem break" in a dial or initialization
- 	string.
- 
- 	A separate "initialization speed" feature was added to support
- 	9600 baud modems such as the Telebit Trailblazer.  See Appendix
- 	C of the Doc file for more info on the use of this feature.
- 
- 	I've added a transparent pass through mode to be used in a
- 	communications daisy chain.
- 
- Known limitations:
- 
- 	Whenever Pcomm makes the transition from the terminal mode to
- 	the command mode, the true screen contents are lost.  Pcomm
- 	tries to keep track of what the true screen looks like in an
- 	internal "virtual screen".  This means that the escape sequences
- 	known to the hardware have to be emulated in the virtual screen.
- 	Unfortunately, the number of escape sequences that are emulated
- 	is quite small, so the representation of the true screen is
- 	sometimes wrong.
- 
- 	For the VCS (video command sequence) emulation to work, the
- 	terminfo entries on the host machine must match the entries on
- 	the remote.
- 
- 	The disp_tty() routine in s_tty.c currently does not support a
- 	NUM_TTY definition of greater than 10.
- 
- Future directions:
- 
- 	Continue work on the virtual screen routines.
- 
- 	Add dial back support.
- 
- 	Use shared memory to overcome the current limitation of outgoing
- 	characters in the half duplex mode not appearing in the virtual
- 	screen, log files, and print logs.
- 
- Many thanks to the following people for bug reports and ideas for
- improving the code:
- 
- 	Andy Pitts	...{mtune,pacbell,kd4nc}!gladys!rbdc!andy
- 	Chris Wiener	...ihnp4!{killer,attnssc}!crlabs!cwiener
- 	David Brierley	...{sun,decuac,cbosgd,gatech,necntc,ukma}!rayssd!dhb
- 	Karl Fox	...cbosgd!mstar!karl
- 	Michael Young	...panda!genrad!mrst!sdti!mjy
- 	Mark Mendel	...ihnp4!umn-cs!hyper!mark
- 	Viet Hoang	...ihnp4!drutx!vgh
- 
- --------------------------------------------------------------------------------
- 
- 			     Pcomm version 1.0
- 				12 Mar 88
- 
- Incompatibilities with the beta release:
- 
- 	I've added a bunch of new parameters to the pcomm.param and
- 	pcomm.modem files, so the files used with the beta release won't
- 	work with the v1.0 release.
- 
- Things that have changed:
- 
- 	Pcomm will attempt to determine if the modem has synchronized at
- 	a baud rate different than what is expected, and make changes to
- 	the line settings as appropriate.
- 
- 	The quit and interrupt signals are now ignored.
- 
- 	All of the file transfer protocols are now functional.
- 
- 	The directory search order used to find the support files has
- 	been changed slightly.
- 
- Known limitations:
- 
- 	The keyboard macro feature is not implemented at this time.
- 
- 	The true screen contents are lost when the "hot key" is pressed.
- 	Pcomm attempts to compensate (rather poorly) by repainting a
- 	virtual screen of what it thinks the true screen should look
- 	like.  Escape sequences in the virtual screen image will be
- 	ignored when the background is repainted.  For example, if
- 	you're on a vt100 and you receive a ^[[2J to clear the screen,
- 	the screen *will* be cleared...  but when the screen is
- 	repainted, it will contain the characters ^[, [, 2, J (instead
- 	of performing the function).
- 
- 	The disp_tty() routine in s_tty.c currently does not support a
- 	NUM_TTY definition of greater than 10.
- 
- 	For some strange reason, the first keystroke is "lost" after a
- 	file transfer is complete or after starting data logging.
- 
- Future directions:
- 
- 	The virtual screen routines need a lot of work.  The most
- 	commonly used escape sequences (known to terminfo) will be
- 	processed.
- 
- 	I plan to have an option at compile time to have the virtual
- 	screen buffer held on disk [] or in shared memory [].
- 
- 	The input routine is designed so it could be a standalone
- 	program that gets called from Pcomm. []
- 
- -------------------------------------------------------------------------------
- 
- Have fun...
- 
- Emmet P. Gray				US Army, HQ III Corps & Fort Hood
- ...!uunet!uiucuxc!fthood!egray		Attn: AFZF-DE-ENV
- fthood!egray@uxc.cso.uiuc.edu		Directorate of Engineering & Housing
- 					Environmental Management Office
- 					Fort Hood, TX 76544-5057
--- 61,62 ----
*** old/Waitfor.1	Mon Jul 20 17:02:57 1992
--- Waitfor.1	Sat Aug 22 16:05:44 1992
***************
*** 1,3 ****
! .TH WAITFOR 1 local
  .SH NAME
  waitfor \- wait for a string to appear on the stdin
--- 1,3 ----
! .TH waitfor L
  .SH NAME
  waitfor \- wait for a string to appear on the stdin
*** old/config.h	Mon Jul 20 17:02:57 1992
--- config.h	Mon Aug 31 10:33:41 1992
***************
*** 81,84 ****
--- 81,87 ----
  #undef	HAVE_USLEEP
  
+ /* Does your system have the truncate() system call? */
+ #define	HAVE_TRUNCATE
+ 
  typedef void SIG_TYPE;
  /* typedef int SIG_TYPE; */
*** old/dial.c	Mon Jul 20 17:02:58 1992
--- dial.c	Sat Aug  1 12:24:21 1992
***************
*** 333,337 ****
  		/*
  		 * OK.. this is the tricky part.  What if the modem returns
! 		 * the modulation rate (in lieu of the DTE rate)?  For
  		 * example, the message is "CONNECT 14400", but the DTE
  		 * is locked at 38400.
--- 333,337 ----
  		/*
  		 * OK.. this is the tricky part.  What if the modem returns
! 		 * the connected rate (in lieu of the DTE rate)?  For
  		 * example, the message is "CONNECT 14400", but the DTE
  		 * is locked at 38400.
*** old/input.c	Mon Jul 20 17:02:58 1992
--- input.c	Sat Jul 25 08:29:30 1992
***************
*** 161,164 ****
--- 161,173 ----
  				status->col--;
  			}
+ 					/* sanity check... */
+ 			if (status->row < 0)
+ 				status->row = 0;
+ 			if (status->col < 0)
+ 				status->col = 0;
+ 			if (status->row >= status->max_row)
+ 				status->row = status->max_row -1;
+ 			if (status->col >= status->max_col)
+ 				status->col = status->max_col -1;
  			break;
  		case 0:
*** old/ipc_att.c	Mon Jul 20 17:02:58 1992
--- ipc_att.c	Mon Aug 10 18:26:53 1992
***************
*** 4,7 ****
--- 4,8 ----
  
  #include <stdio.h>
+ #ifndef MAIN
  #include <stropts.h>
  #include <poll.h>
***************
*** 10,14 ****
  #include "ipc.h"
  
- #ifndef MAIN
  #define PSEUDO_TTY	"/dev/ptmx"
  
--- 11,14 ----
*** old/ipc_ucb.c	Mon Jul 20 17:02:59 1992
--- ipc_ucb.c	Mon Aug 10 18:27:12 1992
***************
*** 4,7 ****
--- 4,8 ----
  
  #include <stdio.h>
+ #ifndef MAIN
  #include <fcntl.h>
  #include <sys/time.h>
***************
*** 11,15 ****
  #include "ipc.h"
  
- #ifndef MAIN
  static char pty_name[12];
  static int fdin_mask, num_fds;
--- 12,15 ----
*** old/m_lib.c	Mon Jul 20 17:02:59 1992
--- m_lib.c	Mon Aug 31 08:09:56 1992
***************
*** 41,45 ****
  	while (fgets(buf, 200, fp) != NULL) {
  		line++;
! 		if (tty >= NUM_TTY || mod >= NUM_MODEM)
  			break;
  					/* get the token */
--- 41,45 ----
  	while (fgets(buf, 200, fp) != NULL) {
  		line++;
! 		if (tty > NUM_TTY || mod > NUM_MODEM)
  			break;
  					/* get the token */
*** old/script.c	Mon Jul 20 17:02:59 1992
--- script.c	Mon Aug 17 16:32:24 1992
***************
*** 129,133 ****
--- 129,137 ----
  	void ipc_update();
  
+ #ifdef BSD
  	if ((kill(epid, 0) == -1) && errno == ESRCH) {
+ #else /* BSD */
+ 	if ((kill(-epid, 0) == -1) && errno == ESRCH) {
+ #endif /* BSD */
  					/* shut down the duplication of input */
  		close(dup_pipe[0]);
*** old/tty_ucb.c	Mon Jul 20 17:02:59 1992
--- tty_ucb.c	Sun Sep  6 10:29:27 1992
***************
*** 42,46 ****
  	 * the speed.
  	 */
! 	baud = modem->init_sp[modem->t_cur];
  	if (baud == 0)
  		baud = dir->baud[0];
--- 42,46 ----
  	 * the speed.
  	 */
! 	baud = modem->lock_sp[modem->t_cur];
  	if (baud == 0)
  		baud = dir->baud[0];
*** old/x_extrnl.c	Mon Jul 20 17:03:00 1992
--- x_extrnl.c	Sun Sep  6 10:10:52 1992
***************
*** 25,29 ****
  	extern int fd, errno;
  	WINDOW *xt_win, *newwin();
! 	int epid, want_out;
  	unsigned int sleep();
  	void _exit(), line_set();
--- 25,29 ----
  	extern int fd, errno;
  	WINDOW *xt_win, *newwin();
! 	int epid, want_out, dummy;
  	unsigned int sleep();
  	void _exit(), line_set();
***************
*** 81,87 ****
--- 81,93 ----
  			break;
  					/* see if the process it still active */
+ #ifdef BSD
  		if ((kill(epid, 0) == -1) && errno == ESRCH) 
+ #else /* BSD */
+ 		if ((kill(-epid, 0) == -1) && errno == ESRCH) 
+ #endif /* BSD */
  			break;
  	}
+ 					/* no zombies please */
+ 	wait(&dummy);
  					/* the tty may have been clobbered */
  	sleep(1);
*** old/xmodem.c	Mon Jul 20 17:03:00 1992
--- xmodem.c	Sun Jul 26 10:19:31 1992
***************
*** 257,260 ****
--- 257,264 ----
  		return(0);
  
+ #ifdef HAVE_TRUNCATE
+ 	return(uid_truncate(file, len));
+ #else /* HAVE_TRUNCATE */
+ 
  	if (!(fp = uid_fopen(file, "r")))
  		return(1);
***************
*** 304,307 ****
--- 308,312 ----
  
  	return(0);
+ #endif /* HAVE_TRUNCATE */
  }
  
***************
*** 389,390 ****
--- 394,440 ----
  	return(ret);
  }
+ 
+ #ifdef HAVE_TRUNCATE
+ static int
+ uid_truncate(path, len)
+ char *path;
+ long len;
+ {
+ 	int ret;
+ 
+ #ifdef SETUID_BROKE
+ 	int status;
+ 	void _exit();
+ 
+ 	switch(fork()) {
+ 		case 0:
+ 			setuid(getuid());
+ 			setgid(getgid());
+ 			_exit(truncate(path, len));
+ 		case -1:
+ 			fprintf(stderr, "uid_truncate: Can't fork\n");
+ 			return(-1);
+ 		default:
+ 			if (wait(&status) == -1) {
+ 				fprintf(stderr, "uid_truncate: wait failed\n");
+ 				return(-1);
+ 			}
+ 			ret = status >> 8;
+ 	}
+ #else /* SETUID_BROKE */
+ 	int euid, egid;
+ 
+ 	euid = geteuid();
+ 	egid = getegid();
+ 
+ 	setuid(getuid());
+ 	setgid(getgid());
+ 
+ 	ret = truncate(path, len);
+ 
+ 	setuid(euid);
+ 	setgid(egid);
+ #endif /* SETUID_BROKE */
+ 	return(ret);
+ }
+ #endif /* HAVE_TRUNCATE */
End of Patch
Technical Details
Message-ID: <Bu64r8.IoK@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!osiris.cso.uiuc.edu!egray

Show Full Headers
Complete Article Headers
Newsgroups: comp.sources.bugs
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!osiris.cso.uiuc.edu!egray
From: egray@osiris.cso.uiuc.edu (Emmet P. Gray)
Subject: Patch #1 to Pcomm v2.0
Message-ID: <Bu64r8.IoK@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: US Army Corps of Engineers - Construction Eng Research Lab
Date: Sun, 6 Sep 1992 18:01:54 GMT
Lines: 1250