home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sources / bugs / 225 next >
Encoding:
Text File  |  1992-09-07  |  37.3 KB  |  1,261 lines

  1. Newsgroups: comp.sources.bugs
  2. Path: sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!osiris.cso.uiuc.edu!egray
  3. From: egray@osiris.cso.uiuc.edu (Emmet P. Gray)
  4. Subject: Patch #1 to Pcomm v2.0
  5. Message-ID: <Bu64r8.IoK@news.cso.uiuc.edu>
  6. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  7. Organization: US Army Corps of Engineers - Construction Eng Research Lab
  8. Date: Sun, 6 Sep 1992 18:01:54 GMT
  9. Lines: 1250
  10.  
  11.  
  12. This is patch #1 to the Pcomm v2.0 distribution package.  This patch
  13. will correct a minor bug with the external protocol option (when running
  14. under SVR3.2) that prevented Pcomm from detecting the death of the child
  15. process.
  16.  
  17. The rather large size of this patch is do to the numerous changes to the
  18. Doc.me file.
  19.  
  20. Pcomm v2.0.0 was sent to the moderator of comp.sources.unix on 20 Jul 92.
  21.  
  22. Emmet P. Gray                US Army, HQ III Corps & Fort Hood
  23. ...!uunet!uiucuxc!fthood!egray        Attn: AFZF-DE-ENV
  24. fthood!egray@uxc.cso.uiuc.edu        Directorate of Engineering & Housing
  25.                     Environmental Management Office
  26.                     Fort Hood, TX 76544-5057
  27.  
  28. ------------------------------------------------------------------------------
  29. Prereq: "2.0.0"
  30. *** old/patchlevel.h    Mon Jul 20 17:02:59 1992
  31. --- patchlevel.h    Sun Sep  6 10:19:25 1992
  32. ***************
  33. *** 1,2 ****
  34. ! #define VERSION "2.0.0"
  35. ! #define DATE "18 Jul 92"
  36. --- 1,2 ----
  37. ! #define VERSION "2.0.1"
  38. ! #define DATE "6 Sep 92"
  39. *** old/Configure.sh    Mon Jul 20 17:02:53 1992
  40. --- Configure.sh    Mon Aug 31 10:32:16 1992
  41. ***************
  42. *** 108,111 ****
  43. --- 108,118 ----
  44.           fi
  45.       fi
  46. +     if [ `grep -c "^truncate.o" /tmp/config.$$` -eq 1 ] ;then
  47. +         echo "You've got the truncate() function"
  48. +         echo "Therefore you need:    #define HAVE_TRUNCATE"
  49. +     else
  50. +         echo "You don't have the truncate() function"
  51. +         echo "Therefore you need:    #undef HAVE_TRUNCATE"
  52. +     fi
  53.       rm /tmp/config.$$
  54.   else
  55. *** old/Convert.sh    Mon Jul 20 17:02:53 1992
  56. --- Convert.sh    Wed Jul 22 21:33:04 1992
  57. ***************
  58. *** 18,22 ****
  59.   1,$s/D_DBITS=/D_DATA_BITS=/
  60.   1,$s/D_SBITS=/D_STOP_BITS=/
  61. ! 1,$s/HOT=/HOT_KEY=/
  62.   1,$s/FLOW=/FLOW_CTRL=/
  63.   1,$s/LECHO=/LOCAL_ECHO=/
  64. --- 18,22 ----
  65.   1,$s/D_DBITS=/D_DATA_BITS=/
  66.   1,$s/D_SBITS=/D_STOP_BITS=/
  67. ! 1,$s/^HOT=/HOT_KEY=/
  68.   1,$s/FLOW=/FLOW_CTRL=/
  69.   1,$s/LECHO=/LOCAL_ECHO=/
  70. *** old/Doc.me    Mon Jul 20 17:02:54 1992
  71. --- Doc.me    Mon Aug 31 10:31:31 1992
  72. ***************
  73. *** 6,12 ****
  74.   .nr sf 3                \" section font is bold
  75.   .nr tf 1                \" title font is roman
  76. - .oh ''Pcomm Reference Manual'Page %'
  77. - .eh 'Page %'Pcomm Reference Manual''
  78.   .\" this macro is used to change the proportional font to 12 pitch
  79.   .de CS
  80.   .cs R 22
  81. --- 6,11 ----
  82.   .nr sf 3                \" section font is bold
  83.   .nr tf 1                \" title font is roman
  84.   .\" this macro is used to change the proportional font to 12 pitch
  85. + .\" some folks may need ".cs CW" in lieu of ".cs R 22"
  86.   .de CS
  87.   .cs R 22
  88. ***************
  89. *** 13,17 ****
  90.   ..
  91.   .\" and this one puts things back
  92. ! .ds Cs
  93.   .cs R
  94.   ..
  95. --- 12,16 ----
  96.   ..
  97.   .\" and this one puts things back
  98. ! .de Cs
  99.   .cs R
  100.   ..
  101. ***************
  102. *** 47,51 ****
  103. --- 46,54 ----
  104.   program and contains no ProComm source code.  This is not a Datastorm
  105.   product.
  106. + .bp
  107. + .oh ''Pcomm Reference Manual'Page %'
  108. + .eh 'Page %'Pcomm Reference Manual''
  109.   .pn 1
  110. + .ep
  111.   .bp
  112.   .sh 1 INTRODUCTION 
  113. ***************
  114. *** 201,205 ****
  115.   The \*(lq\-a\*(rq option is used to specify a script file to be
  116.   \*(lqplayed\*(rq prior to dialing, to specify the TTY to be use, or to
  117. ! specify the mdoem to be used.  This feature can be used to customize
  118.   Pcomm options or perform unattended operations.
  119.   .lp
  120. --- 204,208 ----
  121.   The \*(lq\-a\*(rq option is used to specify a script file to be
  122.   \*(lqplayed\*(rq prior to dialing, to specify the TTY to be use, or to
  123. ! specify the modem to be used.  This feature can be used to customize
  124.   Pcomm options or perform unattended operations.
  125.   .lp
  126. ***************
  127. *** 214,217 ****
  128. --- 217,221 ----
  129.   \-o    Set the parity to odd
  130.   \-n    Set the parity to none
  131. + \-w    Set the word length (number of data bits)
  132.   \-b    Set the baud rate
  133.   \-p    Dial this number
  134. ***************
  135. *** 249,252 ****
  136. --- 253,257 ----
  137.   .if n .ll 8.5i
  138.   .CS
  139. + .(b L
  140.   .TS
  141.   box center;
  142. ***************
  143. *** 254,257 ****
  144. --- 259,263 ----
  145.   ^A-0 HELP     No TTY     FDX     1200 E71     LOG OFF     PTR OFF     CR      CR  
  146.   .TE
  147. + .)b
  148.   .Cs
  149.   .if n .po 1.0i
  150. ***************
  151. *** 274,279 ****
  152.   .lp
  153.   .ft I
  154. ! NOTE:\ \ If the DTE interface speed is locked, the status line will show
  155. ! the "connected" speed rather than the speed of the serial port.
  156.   .ft
  157.   .sh 2 "Help screen"
  158. --- 280,286 ----
  159.   .lp
  160.   .ft I
  161. ! NOTE:\ \ If the DTE (Data Terminal Equipment) interface speed is locked,
  162. ! the status line will show the \*(lqconnected\*(rq speed rather than the
  163. ! speed of the serial port.
  164.   .ft
  165.   .sh 2 "Help screen"
  166. ***************
  167. *** 469,473 ****
  168.   3) Locked speed.  Normally Pcomm will use the baud rate in the dialing
  169.   directory when talking to the modem.  If the locked speed is non-zero,
  170. ! then the baud rate specified is only one that will ever be use.  The
  171.   baud rate is selected from a \*(lqmenu prompt\*(rq.  See Appendix C for
  172.   more information about the use of this feature.
  173. --- 476,480 ----
  174.   3) Locked speed.  Normally Pcomm will use the baud rate in the dialing
  175.   directory when talking to the modem.  If the locked speed is non-zero,
  176. ! then the baud rate specified is the only one that will ever be use.  The
  177.   baud rate is selected from a \*(lqmenu prompt\*(rq.  See Appendix C for
  178.   more information about the use of this feature.
  179. ***************
  180. *** 491,495 ****
  181.   -------------------------- Modem Setup --------------------------
  182.   .sp
  183. !            1) Modem name (1 of 4) ... HAYES
  184.              2) Modem init string ..... ATS7=60S11=70E0Q0V1X4&D2!
  185.              3) Dialing command ....... ATDT
  186. --- 498,502 ----
  187.   -------------------------- Modem Setup --------------------------
  188.   .sp
  189. !            1) Modem name (1 of 5) ... HAYES
  190.              2) Modem init string ..... ATS7=60S11=70E0Q0V1X4&D2!
  191.              3) Dialing command ....... ATDT
  192. ***************
  193. *** 519,523 ****
  194.   1) Modem name.  This is the key word that links the modem database with
  195.   the TTY database.  A menu prompt is used to select the modem name (and
  196. ! the remaining parameters that go with it).  The \*(lq(1 of 4)\*(rq field
  197.   indicates there are additional modems in the database.
  198.   .lp
  199. --- 526,530 ----
  200.   1) Modem name.  This is the key word that links the modem database with
  201.   the TTY database.  A menu prompt is used to select the modem name (and
  202. ! the remaining parameters that go with it).  The \*(lq(1 of 5)\*(rq field
  203.   indicates there are additional modems in the database.
  204.   .lp
  205. ***************
  206. *** 546,550 ****
  207.   6) Auto baud detect.  Should Pcomm attempt to change the baud rate of
  208.   the TTY to the baud rate matching the connect string?  This feature
  209. ! requires the connect strings to be unique.
  210.   .lp
  211.   7\-13) Connect strings.  The return messages when the modem has connected
  212. --- 553,558 ----
  213.   6) Auto baud detect.  Should Pcomm attempt to change the baud rate of
  214.   the TTY to the baud rate matching the connect string?  This feature
  215. ! requires the connect strings to be unique.  This does not override the
  216. ! locked speed feature (discussed in section 3.2).
  217.   .lp
  218.   7\-13) Connect strings.  The return messages when the modem has connected
  219. ***************
  220. *** 612,617 ****
  221.   .lp
  222.   4) Flow control.  A menu prompt is shown to select between XON/XOFF flow
  223. ! control and NONE.  Pcomm often temporarily disables flow control during
  224. ! file transfers.
  225.   .lp
  226.   .ft I
  227. --- 620,625 ----
  228.   .lp
  229.   4) Flow control.  A menu prompt is shown to select between XON/XOFF flow
  230. ! control and NONE.  A value of NONE assumes that the hardware (not Pcomm)
  231. ! will perform the flow control.
  232.   .lp
  233.   .ft I
  234. ***************
  235. *** 957,969 ****
  236.   \*(lqH\*(rq for half.
  237.   .lp
  238. ! Auxiliary) This field has one of three uses:
  239. ! .br
  240.   .in +0.5i
  241. ! 1) Name of the shell script to be used during the auto-login \*(lqchat\*(rq
  242.   sequence.
  243.   .br
  244. ! 2) Name of the TTY to be used.
  245.   .br
  246. ! 3) Name of the Modem to be used.
  247.   .in
  248.   .lp
  249. --- 965,978 ----
  250.   \*(lqH\*(rq for half.
  251.   .lp
  252. ! Auxiliary) This field contains the name of a file which has one of three
  253. ! uses:
  254. ! .lp
  255.   .in +0.5i
  256. ! 1) A shell script to be used during the auto-login \*(lqchat\*(rq
  257.   sequence.
  258.   .br
  259. ! 2) A particular TTY to be used for hard-wired ports.
  260.   .br
  261. ! 3) A customized modem configuration to be used for the entry.
  262.   .in
  263.   .lp
  264. ***************
  265. *** 976,981 ****
  266.   .lp
  267.   .ft I
  268. ! NOTE:\ \ The ability to specify a modem allows you to customize each
  269. ! dialing directory entry to use its own peculiar modem initization string.
  270.   .ft
  271.   .ba
  272. --- 985,992 ----
  273.   .lp
  274.   .ft I
  275. ! NOTE:\ \ The ability to specify a customized modem configuration allows
  276. ! you to tailor each dialing directory entry to meet the peculiar needs of
  277. ! the modem at the other end of the connection.  See Appendix C for more
  278. ! details.
  279.   .ft
  280.   .ba
  281. ***************
  282. *** 1074,1081 ****
  283.   the remote system with only a few keystrokes.  The characters used to
  284.   identify the macros are the shifted number keys.  For example, if the
  285. ! string \*(lqls -alRF \e\| more!\*(rq was assigned to the \*(lq!\*(rq key
  286.   (the shifted number 1 key), then when you press ^A-!, the string
  287.   \*(lqls -alRF | more\*(rq is sent to the remote (followed by a <CR>
  288. ! because of the \*(lq!\*(rq character synonym).
  289.   .lp
  290.   To review or edit the keyboard macros, you type ^A-M.  The following
  291. --- 1085,1094 ----
  292.   the remote system with only a few keystrokes.  The characters used to
  293.   identify the macros are the shifted number keys.  For example, if the
  294. ! string \*(lqls -alRF \e| more!\*(rq was assigned to the \*(lq!\*(rq key
  295.   (the shifted number 1 key), then when you press ^A-!, the string
  296.   \*(lqls -alRF | more\*(rq is sent to the remote (followed by a <CR>
  297. ! because of the \*(lq!\*(rq character synonym).  Notice the use of the
  298. ! \*(lq\e\*(rq character to remove the special meaning of the \*(lg|\*(rq
  299. ! character synonym.
  300.   .lp
  301.   To review or edit the keyboard macros, you type ^A-M.  The following
  302. ***************
  303. *** 1093,1097 ****
  304.   .sp
  305.   .\"                                                   spaces out to here
  306. !   ^A-! ls -alRF \e\| more!                              
  307.     ^A-@ 
  308.     ^A-# 
  309. --- 1106,1110 ----
  310.   .sp
  311.   .\"                                                   spaces out to here
  312. !   ^A-! ls -alRF \e| more!                             
  313.     ^A-@ 
  314.     ^A-# 
  315. ***************
  316. *** 1206,1210 ****
  317.   .)x
  318.   .lp
  319. ! Command files (shell scripts) can be envoked by typing ^A-5 to automate
  320.   keyboard input and to perform Pcomm command sequences.  The following window
  321.   will prompt for the file name.
  322. --- 1219,1223 ----
  323.   .)x
  324.   .lp
  325. ! Command files (shell scripts) can be invoked by typing ^A-5 to automate
  326.   keyboard input and to perform Pcomm command sequences.  The following window
  327.   will prompt for the file name.
  328. ***************
  329. *** 1224,1228 ****
  330.   .Cs
  331.   .lp
  332. ! The use of shell scripts is discussed in Section 8.
  333.   .bp
  334.   .if e \{
  335. --- 1237,1241 ----
  336.   .Cs
  337.   .lp
  338. ! The use of shell scripts is discussed in section 8.
  339.   .bp
  340.   .if e \{
  341. ***************
  342. *** 1406,1410 ****
  343.   .lp
  344.   .ft I
  345. ! NOTE:\ \ The external protocol feature can also be used (misused?) to pipe
  346.   the output of a Unix command to the remote.
  347.   .ft
  348. --- 1419,1423 ----
  349.   .lp
  350.   .ft I
  351. ! NOTE:\ \ The external protocol feature can also be used to pipe
  352.   the output of a Unix command to the remote.
  353.   .ft
  354. ***************
  355. *** 1710,1714 ****
  356.   .if n .ll 6.5i
  357.   .lp
  358. ! Items in the window are continously updated to show the progress of the
  359.   dialing attempt.
  360.   .lp
  361. --- 1723,1727 ----
  362.   .if n .ll 6.5i
  363.   .lp
  364. ! Items in the window are continuously updated to show the progress of the
  365.   dialing attempt.
  366.   .lp
  367. ***************
  368. *** 1767,1774 ****
  369.   \*(lqpcomm_cmd\*(rq program is used to transmit command sequences to
  370.   Pcomm.  For example, a script can contain a line such as \*(lqpcomm_cmd
  371. ! data_log on\*(rq to turn on the data logging feature.  The shell scripts
  372. ! specified in the dialing directory are run \fBafter\fP the connection to
  373. ! the remote system has been made.
  374.   .lp
  375.   You may hit the <ESC> key at any time to abort an auto-login script
  376.   before it has completed.
  377. --- 1780,1792 ----
  378.   \*(lqpcomm_cmd\*(rq program is used to transmit command sequences to
  379.   Pcomm.  For example, a script can contain a line such as \*(lqpcomm_cmd
  380. ! data_log on\*(rq to turn on the data logging feature.
  381.   .lp
  382. + Shell scripts specified in the dialing directory are run \fBafter\fP the
  383. + connection to the remote system, while script specified on the command
  384. + line (with the \-a option) are run \fBbefore\fP the connection is made.
  385. + You can make a shell script work under both situations by using the
  386. + \*(lqpcomm_cmd is connected\*(rq command.  See the third example in
  387. + section 8.4.
  388. + .lp
  389.   You may hit the <ESC> key at any time to abort an auto-login script
  390.   before it has completed.
  391. ***************
  392. *** 1953,1957 ****
  393.   .br
  394.   Dial an entry from the dialing directory.  The MANUAL option is used to
  395. ! optionaly dial a phone number without the use of the dialing directory.
  396.   DIAL returns after 1 attempt.  A return code of 1 means a connection
  397.   was made.
  398. --- 1971,1975 ----
  399.   .br
  400.   Dial an entry from the dialing directory.  The MANUAL option is used to
  401. ! optionally dial a phone number without the use of the dialing directory.
  402.   DIAL returns after 1 attempt.  A return code of 1 means a connection
  403.   was made.
  404. ***************
  405. *** 2185,2189 ****
  406.   .lp
  407.   .(b L
  408. ! The following is an example fo a shell script that will dial a system,
  409.   log a user on, transfer a file called junk using xmodem, log out, and
  410.   exit Pcomm.
  411. --- 2203,2207 ----
  412.   .lp
  413.   .(b L
  414. ! The following is an example of a shell script that will dial a system,
  415.   log a user on, transfer a file called junk using xmodem, log out, and
  416.   exit Pcomm.
  417. ***************
  418. *** 2191,2195 ****
  419.   .in +0.5i
  420.   .CS
  421. ! # are we allready connected?
  422.   answer=`pcomm_cmd if connected`
  423.   if [ "$answer" -eq 0 ]
  424. --- 2209,2213 ----
  425.   .in +0.5i
  426.   .CS
  427. ! # are we already connected?
  428.   answer=`pcomm_cmd if connected`
  429.   if [ "$answer" -eq 0 ]
  430. ***************
  431. *** 2206,2210 ****
  432.   # wait for the password prompt
  433.   waitfor assword:
  434. ! # send my passwd
  435.   echo abcdefg
  436.   # wait for a Unix prompt
  437. --- 2224,2228 ----
  438.   # wait for the password prompt
  439.   waitfor assword:
  440. ! # send my password
  441.   echo abcdefg
  442.   # wait for a Unix prompt
  443. ***************
  444. *** 2264,2268 ****
  445.   setup, is ignored.
  446.   .lp
  447. ! 8) Systems running older versions of uugetty (the bi-directional version
  448.   of getty that comes with HDB uucp) may require extra commands in the
  449.   initialization string to assure that uugetty switches to its dial out
  450. --- 2282,2286 ----
  451.   setup, is ignored.
  452.   .lp
  453. ! 7) Systems running older versions of uugetty (the bi-directional version
  454.   of getty that comes with HDB uucp) may require extra commands in the
  455.   initialization string to assure that uugetty switches to its dial out
  456. ***************
  457. *** 2306,2310 ****
  458.   .lp
  459.   The dialing codes used by the OBM (On Board Modem) are not
  460. ! straight-forward.  The modem setup, as distributed, looks like this:
  461.   .br
  462.   .CS
  463. --- 2324,2329 ----
  464.   .lp
  465.   The dialing codes used by the OBM (On Board Modem) are not
  466. ! straight-forward.  The modem setup, as included in the Unixpc.shar file,
  467. ! looks like this:
  468.   .br
  469.   .CS
  470. ***************
  471. *** 2406,2411 ****
  472.   .ba
  473.   .lp
  474. ! The features and complexities of newer high speed intelligent modems
  475. ! avialable today warrants a more detailed discussion.
  476.   .lp
  477.   1) Locked interface speed
  478. --- 2425,2430 ----
  479.   .ba
  480.   .lp
  481. ! The features and complexities of the newer high speed intelligent modems
  482. ! available today warrants a more detailed discussion.
  483.   .lp
  484.   1) Locked interface speed
  485. ***************
  486. *** 2418,2422 ****
  487.   .lp
  488.   The \*(lqlocked speed\*(rq field of the TTY database was created to
  489. ! solve this problem.  If this value is non-zero, Pcomm wll only use this
  490.   baud rate when talking to the modem.  The true connected baud rate
  491.   (14400 for example) will continue to be displayed in the status line.
  492. --- 2437,2441 ----
  493.   .lp
  494.   The \*(lqlocked speed\*(rq field of the TTY database was created to
  495. ! solve this problem.  If this value is non-zero, Pcomm will only use this
  496.   baud rate when talking to the modem.  The true connected baud rate
  497.   (14400 for example) will continue to be displayed in the status line.
  498. ***************
  499. *** 2435,2440 ****
  500.   database.  For example, you could have an entry called \*(lqTELEBIT\*(rq
  501.   for normal connections, one called \*(lqTELEBIT_V.32\*(rq for connecting
  502. ! ot older V.32 modems, and another called \*(lqTELEBIT_PEP\*(rq for 
  503. ! connections to othe PEP modems.
  504.   .lp
  505.   Pcomm uses the connect strings to determine if the modem can handle the
  506. --- 2454,2459 ----
  507.   database.  For example, you could have an entry called \*(lqTELEBIT\*(rq
  508.   for normal connections, one called \*(lqTELEBIT_V.32\*(rq for connecting
  509. ! to older V.32 modems, and another called \*(lqTELEBIT_PEP\*(rq for 
  510. ! connections to other PEP modems.
  511.   .lp
  512.   Pcomm uses the connect strings to determine if the modem can handle the
  513. ***************
  514. *** 2445,2449 ****
  515.   specific modem for each dialing directory that my require one.
  516.   .lp
  517. ! You choices are virtually unlimited...  you can have a separte modem
  518.   setup to control modem features such as error control, compression,
  519.   protocol spoofing, etc.
  520. --- 2464,2473 ----
  521.   specific modem for each dialing directory that my require one.
  522.   .lp
  523. ! .ft I
  524. ! NOTE:\ \ The default modem configuration (in a multiple setup situation)
  525. ! must appear first in the modem database.
  526. ! .ft
  527. ! .lp
  528. ! Your choices are virtually unlimited...  you can have a separate modem
  529.   setup to control modem features such as error control, compression,
  530.   protocol spoofing, etc.
  531. ***************
  532. *** 2463,2467 ****
  533.   L1    Low speaker volume
  534.   Q2    Use result codes only when dialing out
  535. ! X2    Use the most detailed result codes
  536.   &C1    Set DCD to follow the carrier
  537.   &D3    Hard reset on loss of DTR
  538. --- 2487,2491 ----
  539.   L1    Low speaker volume
  540.   Q2    Use result codes only when dialing out
  541. ! X2    Use detailed result codes (connect speeds)
  542.   &C1    Set DCD to follow the carrier
  543.   &D3    Hard reset on loss of DTR
  544. ***************
  545. *** 2469,2473 ****
  546.   S7=60    Wait at least 60 seconds for a carrier
  547.   S51=6    Set interface speed to 38400 baud
  548. ! S58=2    Rull duplex RTS/CTS flow control
  549.   S59=15    Use result code extensions
  550.   S61=0    Pass modem breaks to the other end
  551. --- 2493,2497 ----
  552.   S7=60    Wait at least 60 seconds for a carrier
  553.   S51=6    Set interface speed to 38400 baud
  554. ! S58=2    Full duplex RTS/CTS flow control
  555.   S59=15    Use result code extensions
  556.   S61=0    Pass modem breaks to the other end
  557. ***************
  558. *** 2487,2491 ****
  559.   l l c
  560.   l l l.
  561. ! TTY name    Modem name    Init speed
  562.   .sp
  563.   1) tty10    HAYES    0
  564. --- 2511,2515 ----
  565.   l l c
  566.   l l l.
  567. ! TTY name    Modem name    Locked speed
  568.   .sp
  569.   1) tty10    HAYES    0
  570. ***************
  571. *** 2499,2503 ****
  572.   .in
  573.   .lp
  574. ! Notice that the last three entries share the same TTY.
  575.   .ba
  576.   .lp
  577. --- 2523,2528 ----
  578.   .in
  579.   .lp
  580. ! Notice that the last three entries share the same TTY and are physically
  581. ! the same modem.
  582.   .ba
  583.   .lp
  584. ***************
  585. *** 2607,2612 ****
  586.   .)b
  587.   .sp 3
  588. ! .\" Not all versions of nroff can handle a 2 column index
  589.   .2c
  590. ! .nr xu 2
  591.   .xp
  592. --- 2632,2637 ----
  593.   .)b
  594.   .sp 3
  595. ! .\" Not all versions of {t,n}roff can handle a 2 column index
  596.   .2c
  597. ! .nr xu 0.2i
  598.   .xp
  599. *** old/Makefile    Mon Jul 20 17:02:55 1992
  600. --- Makefile    Mon Aug 17 16:30:23 1992
  601. ***************
  602. *** 21,24 ****
  603. --- 21,28 ----
  604.   #LD = /usr/5bin/cc
  605.   
  606. + #for SVR3.2
  607. + #SHLIB = -lc_s
  608. + #OTHER = -lpt
  609.   LD = cc
  610.   SHLIB =
  611. *** old/Matches.1    Mon Jul 20 17:02:55 1992
  612. --- Matches.1    Sat Aug 22 16:05:44 1992
  613. ***************
  614. *** 1,3 ****
  615. ! .TH MATCHES 1 local
  616.   .SH NAME
  617.   matches \- test if string2 is contained in string1
  618. --- 1,3 ----
  619. ! .TH matches L
  620.   .SH NAME
  621.   matches \- test if string2 is contained in string1
  622. *** old/Pcomm.1    Mon Jul 20 17:02:55 1992
  623. --- Pcomm.1    Sat Aug 22 16:05:44 1992
  624. ***************
  625. *** 4,8 ****
  626.   .if n .ds lq ""
  627.   .el .ds lq ``
  628. ! .TH PCOMM 1 local
  629.   .SH NAME
  630.   pcomm \- a telecommunication program
  631. --- 4,8 ----
  632.   .if n .ds lq ""
  633.   .el .ds lq ``
  634. ! .TH pcomm L 
  635.   .SH NAME
  636.   pcomm \- a telecommunication program
  637. ***************
  638. *** 56,78 ****
  639.   and telephone number from the command line.  The normal method of
  640.   dialing is from the dialing directory.
  641.   .RS 5
  642. - .TP
  643.   .B \-e
  644. ! Set the parity to even.
  645. ! .TP
  646.   .B \-o
  647. ! Set the parity to odd.
  648. ! .TP
  649.   .B \-n
  650. ! Set the parity to none.
  651. ! .TP
  652.   .B \-w
  653. ! Set the word length (number of data bits).
  654. ! .TP
  655.   .B \-b
  656. ! Set the baud rate.
  657. ! .TP
  658.   .B \-p
  659. ! Dial this phone number.
  660.   .RE
  661.   .PP
  662. --- 56,78 ----
  663.   and telephone number from the command line.  The normal method of
  664.   dialing is from the dialing directory.
  665. + .PP
  666.   .RS 5
  667.   .B \-e
  668. !     Set the parity to even.
  669. ! .br
  670.   .B \-o
  671. !     Set the parity to odd.
  672. ! .br
  673.   .B \-n
  674. !     Set the parity to none.
  675. ! .br
  676.   .B \-w
  677. !     Set the word length (number of data bits).
  678. ! .br
  679.   .B \-b
  680. !     Set the baud rate.
  681. ! .br
  682.   .B \-p
  683. !     Dial this phone number.
  684.   .RE
  685.   .PP
  686. *** old/Pcomm_cmd.1    Mon Jul 20 17:02:56 1992
  687. --- Pcomm_cmd.1    Sat Aug 22 16:05:44 1992
  688. ***************
  689. *** 3,7 ****
  690.   .if n .ds lq ""
  691.   .el .ds lq ``
  692. ! .TH PCOMM_CMD 1 local
  693.   .SH NAME
  694.   pcomm_cmd \- send a command to Pcomm
  695. --- 3,7 ----
  696.   .if n .ds lq ""
  697.   .el .ds lq ``
  698. ! .TH pcomm_cmd L
  699.   .SH NAME
  700.   pcomm_cmd \- send a command to Pcomm
  701. ***************
  702. *** 122,129 ****
  703.   DIAL returns after 1 attempt.  A return code of 1 means a connection
  704.   was made.
  705. ! .I
  706.   The dial function will not be allowed to switch TTY ports.  If the current
  707.   TTY is not suitable (i.e. not attached to the correct modem), the script
  708.   will be terminated.
  709.   .TP
  710.   REDIAL entry_number
  711. --- 122,130 ----
  712.   DIAL returns after 1 attempt.  A return code of 1 means a connection
  713.   was made.
  714. ! .ft I
  715.   The dial function will not be allowed to switch TTY ports.  If the current
  716.   TTY is not suitable (i.e. not attached to the correct modem), the script
  717.   will be terminated.
  718. + .ft
  719.   .TP
  720.   REDIAL entry_number
  721. *** old/Readme    Mon Jul 20 17:02:56 1992
  722. --- Readme    Sun Sep  6 10:16:01 1992
  723. ***************
  724. *** 154,157 ****
  725. --- 154,160 ----
  726.               #undef.
  727.   
  728. +     HAVE_TRUNCATE    Does your system have the truncate() system call?
  729. +             Most modern systems do.
  730.       3) Edit the Makefile.  There are provisions in the Makefile to
  731.       include getcwd(3) and getopt(3) routines if they are missing
  732. ***************
  733. *** 216,223 ****
  734.           &F     Restores factory settings
  735.           L1    Low speaker volume
  736. !         X2    Detailed result codes
  737.           Q2    Turns on result codes only when dialing out
  738. !         &C1    Hard reset on loss of DTR
  739. !         &D3    DCD follows the carrier
  740.           S0=1    Answer on first ring
  741.           S7=60    60 second wait for carrier
  742. --- 219,226 ----
  743.           &F     Restores factory settings
  744.           L1    Low speaker volume
  745. !         X2    Detailed result codes (connect speeds)
  746.           Q2    Turns on result codes only when dialing out
  747. !         &C1    DCD follows the carrier
  748. !         &D3    Hard reset on loss of DTR
  749.           S0=1    Answer on first ring
  750.           S7=60    60 second wait for carrier
  751. *** old/Release.notes    Mon Jul 20 17:02:56 1992
  752. --- Release.notes    Sun Sep  6 11:00:40 1992
  753. ***************
  754. *** 1,2 ****
  755. --- 1,12 ----
  756. + Patch #1, 6 Sep 92
  757. + This patch will correct a minor bug with the external protocol option
  758. + (when running under SVR3.2) that prevented Pcomm from detecting the
  759. + death of the child process.
  760. + The rather large size of this patch is do to the numerous changes to the
  761. + Doc.me file.
  762. + ------------------------------------------------------------------------------
  763.                    Pcomm version 2.0
  764.                    18 Jul 92
  765. ***************
  766. *** 51,299 ****
  767.   
  768.       xpcomm - a version of Pcomm using the X window toolkits.
  769. - -------------------------------------------------------------------------------
  770. -                  Pcomm version 1.2
  771. -                  4 Feb 89
  772. - Compatibilities with v1.1:
  773. -     The support files used with the v1.1 release are compatible with
  774. -     the v1.2 release.  However, the use of the "index" field (now
  775. -     called the "script" field) in the pcomm.dial_dir file has
  776. -     changed dramatically (see below).
  777. - Things that have changed:
  778. -     Berkeley flavors of Unix are now supported.  There are files
  779. -     called tty_att.c and tty_ucb.c that contain the code specific
  780. -     to the AT&T and Berkeley worlds.  See the config.h file for
  781. -     the BSD pre-processor definition.
  782. -     Auto-login scripts are now supported.  If the script field of
  783. -     the dialing directory contains the name of a valid Unix shell
  784. -     script, that shell script is "played" after the connection is
  785. -     made to perform the auto-login "chat" sequences.  A example of a
  786. -     auto-login Bourne shell script (called Sample) is included in
  787. -     the distribution.
  788. -     Three new external programs.  In order to assist in the creation
  789. -     of the auto-login shell scripts, three external programs are
  790. -     included in the distribution.
  791. -         waitfor - wait for a string, return a 1 if timed out
  792. -         matches - test if string2 is contained in string1
  793. -         modem_break - send a modem break
  794. -     There is a new support file called "pcomm.extrnl" that allows
  795. -     the user to embed the names of external file transfer programs
  796. -     into the list of available protocols.  (The default file
  797. -     "Pcomm.extrnl", supplied with the distribution package, contains
  798. -     definitions for zmodem).
  799. -     The pcomm_input program has been changed to use multiple
  800. -     character buffered writes to the screen.  Both the input and
  801. -     output buffer sizes are tunable parameters in config.h
  802. -     Newer versions of Xenix have changed the rules for creating UUCP
  803. -     lock files.  See the config.h file for the description of
  804. -     XENIX_LOCKS.
  805. -     The -f option now looks at the name field of the dialing
  806. -     directory (rather than the index field).  A match is found when
  807. -     the argument to the -f is contained in a name field (an exact
  808. -     match is not required).  The match does not consider upper and
  809. -     lower case differences as significant.
  810. - Known limitations:
  811. -     The detection of VCS (video command sequences) is still limited
  812. -     to a very small subset of possible commands.
  813. -     For the VCS emulation to work, the terminfo entries on the host
  814. -     machine must match the entries on the remote.  (Don't assume 
  815. -     your vt100 terminfo data is identical to someone else's).
  816. -     The disp_tty() routine in s_tty.c currently does not support a
  817. -     NUM_TTY definition of greater than 10.
  818. - Future directions:
  819. -     
  820. -     That's about it folks...
  821. -     If Pcomm grows any more, I'll break the setup routines out as a
  822. -     separate program.
  823. - Many thanks to the following people (and many others) for bug reports
  824. - and suggested improvements to the code.
  825. -     Andy Fyfe        ...ames!elroy!cit-vax!andy
  826. -     Brian Antoine        ...iscuva!tau-ceti!briana
  827. -     Chad R. Larson        ...ncar!noao!nud!anasaz!dcfinc!chad
  828. -     David MacKenzie        ...uunet!rocky2.rockefeller.edu!edf
  829. -     Gary S. Trujillo    ...{linus,bbn,m2c}!spdcc!gnosys!gst
  830. -     George Pontis        ...uunet!moldev!geo
  831. -     J. Eric Townsend    ...uunet!nuchat!flatline!erict
  832. -     Jim Pickering        ...csun!polyslo!rducky!jrp
  833. -     Jim Sanchez        ...uunet!mcvax!syteke!jim
  834. -     Jonathan Bayer        ...uunet!ispi!jbayer
  835. -     MAJ Dave Dockstader    ...twsc4sac@mater1.arpa
  836. -     Michael Brady        ...sun!portal!cup.portal.com!michealnc
  837. - -------------------------------------------------------------------------------
  838. -                  Pcomm version 1.1
  839. -                 21 Aug 88
  840. - Incompatibilities with v1.0:
  841. -     I've added a few more fields to the pcomm.param and pcomm.modem
  842. -     files.  This means that those files created under previous
  843. -     releases will not be compatible with the v1.1 release.  It might
  844. -     be a good idea to abandon the older files and start over with
  845. -     the sample files in this release.
  846. - Things that have changed:
  847. -     An awful lot of sloppy programming on my part has now been
  848. -     cleaned up.  This means that porting Pcomm to different versions
  849. -     of Unix will be considerably less painful than before.
  850. -     All of the tunable parameters are now in "config.h".
  851. -     Pcomm now uses buffered I/O routines.  This yields higher
  852. -     performance I/O at large baud rates.
  853. -     File transfers now use high performance CRC calculations.
  854. -     If a UUCP lockfile does exist, Pcomm now attempts to determine
  855. -     if the process is still active.
  856. -     An external file transfer program can be invoked from the file
  857. -     transfer menu.
  858. -     The keyboard macro feature is now supported (although it is
  859. -     rather crude).
  860. -     The virtual screen routine now understands a limited subset of
  861. -     escape sequences.
  862. -     The virtual screen can now be held in shared memory or in a file.
  863. -     The input routine is now contained in a separate program called
  864. -     pcomm_input.
  865. -     You can now include a "modem break" in a dial or initialization
  866. -     string.
  867. -     A separate "initialization speed" feature was added to support
  868. -     9600 baud modems such as the Telebit Trailblazer.  See Appendix
  869. -     C of the Doc file for more info on the use of this feature.
  870. -     I've added a transparent pass through mode to be used in a
  871. -     communications daisy chain.
  872. - Known limitations:
  873. -     Whenever Pcomm makes the transition from the terminal mode to
  874. -     the command mode, the true screen contents are lost.  Pcomm
  875. -     tries to keep track of what the true screen looks like in an
  876. -     internal "virtual screen".  This means that the escape sequences
  877. -     known to the hardware have to be emulated in the virtual screen.
  878. -     Unfortunately, the number of escape sequences that are emulated
  879. -     is quite small, so the representation of the true screen is
  880. -     sometimes wrong.
  881. -     For the VCS (video command sequence) emulation to work, the
  882. -     terminfo entries on the host machine must match the entries on
  883. -     the remote.
  884. -     The disp_tty() routine in s_tty.c currently does not support a
  885. -     NUM_TTY definition of greater than 10.
  886. - Future directions:
  887. -     Continue work on the virtual screen routines.
  888. -     Add dial back support.
  889. -     Use shared memory to overcome the current limitation of outgoing
  890. -     characters in the half duplex mode not appearing in the virtual
  891. -     screen, log files, and print logs.
  892. - Many thanks to the following people for bug reports and ideas for
  893. - improving the code:
  894. -     Andy Pitts    ...{mtune,pacbell,kd4nc}!gladys!rbdc!andy
  895. -     Chris Wiener    ...ihnp4!{killer,attnssc}!crlabs!cwiener
  896. -     David Brierley    ...{sun,decuac,cbosgd,gatech,necntc,ukma}!rayssd!dhb
  897. -     Karl Fox    ...cbosgd!mstar!karl
  898. -     Michael Young    ...panda!genrad!mrst!sdti!mjy
  899. -     Mark Mendel    ...ihnp4!umn-cs!hyper!mark
  900. -     Viet Hoang    ...ihnp4!drutx!vgh
  901. - --------------------------------------------------------------------------------
  902. -                  Pcomm version 1.0
  903. -                 12 Mar 88
  904. - Incompatibilities with the beta release:
  905. -     I've added a bunch of new parameters to the pcomm.param and
  906. -     pcomm.modem files, so the files used with the beta release won't
  907. -     work with the v1.0 release.
  908. - Things that have changed:
  909. -     Pcomm will attempt to determine if the modem has synchronized at
  910. -     a baud rate different than what is expected, and make changes to
  911. -     the line settings as appropriate.
  912. -     The quit and interrupt signals are now ignored.
  913. -     All of the file transfer protocols are now functional.
  914. -     The directory search order used to find the support files has
  915. -     been changed slightly.
  916. - Known limitations:
  917. -     The keyboard macro feature is not implemented at this time.
  918. -     The true screen contents are lost when the "hot key" is pressed.
  919. -     Pcomm attempts to compensate (rather poorly) by repainting a
  920. -     virtual screen of what it thinks the true screen should look
  921. -     like.  Escape sequences in the virtual screen image will be
  922. -     ignored when the background is repainted.  For example, if
  923. -     you're on a vt100 and you receive a ^[[2J to clear the screen,
  924. -     the screen *will* be cleared...  but when the screen is
  925. -     repainted, it will contain the characters ^[, [, 2, J (instead
  926. -     of performing the function).
  927. -     The disp_tty() routine in s_tty.c currently does not support a
  928. -     NUM_TTY definition of greater than 10.
  929. -     For some strange reason, the first keystroke is "lost" after a
  930. -     file transfer is complete or after starting data logging.
  931. - Future directions:
  932. -     The virtual screen routines need a lot of work.  The most
  933. -     commonly used escape sequences (known to terminfo) will be
  934. -     processed.
  935. -     I plan to have an option at compile time to have the virtual
  936. -     screen buffer held on disk [] or in shared memory [].
  937. -     The input routine is designed so it could be a standalone
  938. -     program that gets called from Pcomm. []
  939. - -------------------------------------------------------------------------------
  940. - Have fun...
  941. - Emmet P. Gray                US Army, HQ III Corps & Fort Hood
  942. - ...!uunet!uiucuxc!fthood!egray        Attn: AFZF-DE-ENV
  943. - fthood!egray@uxc.cso.uiuc.edu        Directorate of Engineering & Housing
  944. -                     Environmental Management Office
  945. -                     Fort Hood, TX 76544-5057
  946. --- 61,62 ----
  947. *** old/Waitfor.1    Mon Jul 20 17:02:57 1992
  948. --- Waitfor.1    Sat Aug 22 16:05:44 1992
  949. ***************
  950. *** 1,3 ****
  951. ! .TH WAITFOR 1 local
  952.   .SH NAME
  953.   waitfor \- wait for a string to appear on the stdin
  954. --- 1,3 ----
  955. ! .TH waitfor L
  956.   .SH NAME
  957.   waitfor \- wait for a string to appear on the stdin
  958. *** old/config.h    Mon Jul 20 17:02:57 1992
  959. --- config.h    Mon Aug 31 10:33:41 1992
  960. ***************
  961. *** 81,84 ****
  962. --- 81,87 ----
  963.   #undef    HAVE_USLEEP
  964.   
  965. + /* Does your system have the truncate() system call? */
  966. + #define    HAVE_TRUNCATE
  967.   typedef void SIG_TYPE;
  968.   /* typedef int SIG_TYPE; */
  969. *** old/dial.c    Mon Jul 20 17:02:58 1992
  970. --- dial.c    Sat Aug  1 12:24:21 1992
  971. ***************
  972. *** 333,337 ****
  973.           /*
  974.            * OK.. this is the tricky part.  What if the modem returns
  975. !          * the modulation rate (in lieu of the DTE rate)?  For
  976.            * example, the message is "CONNECT 14400", but the DTE
  977.            * is locked at 38400.
  978. --- 333,337 ----
  979.           /*
  980.            * OK.. this is the tricky part.  What if the modem returns
  981. !          * the connected rate (in lieu of the DTE rate)?  For
  982.            * example, the message is "CONNECT 14400", but the DTE
  983.            * is locked at 38400.
  984. *** old/input.c    Mon Jul 20 17:02:58 1992
  985. --- input.c    Sat Jul 25 08:29:30 1992
  986. ***************
  987. *** 161,164 ****
  988. --- 161,173 ----
  989.                   status->col--;
  990.               }
  991. +                     /* sanity check... */
  992. +             if (status->row < 0)
  993. +                 status->row = 0;
  994. +             if (status->col < 0)
  995. +                 status->col = 0;
  996. +             if (status->row >= status->max_row)
  997. +                 status->row = status->max_row -1;
  998. +             if (status->col >= status->max_col)
  999. +                 status->col = status->max_col -1;
  1000.               break;
  1001.           case 0:
  1002. *** old/ipc_att.c    Mon Jul 20 17:02:58 1992
  1003. --- ipc_att.c    Mon Aug 10 18:26:53 1992
  1004. ***************
  1005. *** 4,7 ****
  1006. --- 4,8 ----
  1007.   
  1008.   #include <stdio.h>
  1009. + #ifndef MAIN
  1010.   #include <stropts.h>
  1011.   #include <poll.h>
  1012. ***************
  1013. *** 10,14 ****
  1014.   #include "ipc.h"
  1015.   
  1016. - #ifndef MAIN
  1017.   #define PSEUDO_TTY    "/dev/ptmx"
  1018.   
  1019. --- 11,14 ----
  1020. *** old/ipc_ucb.c    Mon Jul 20 17:02:59 1992
  1021. --- ipc_ucb.c    Mon Aug 10 18:27:12 1992
  1022. ***************
  1023. *** 4,7 ****
  1024. --- 4,8 ----
  1025.   
  1026.   #include <stdio.h>
  1027. + #ifndef MAIN
  1028.   #include <fcntl.h>
  1029.   #include <sys/time.h>
  1030. ***************
  1031. *** 11,15 ****
  1032.   #include "ipc.h"
  1033.   
  1034. - #ifndef MAIN
  1035.   static char pty_name[12];
  1036.   static int fdin_mask, num_fds;
  1037. --- 12,15 ----
  1038. *** old/m_lib.c    Mon Jul 20 17:02:59 1992
  1039. --- m_lib.c    Mon Aug 31 08:09:56 1992
  1040. ***************
  1041. *** 41,45 ****
  1042.       while (fgets(buf, 200, fp) != NULL) {
  1043.           line++;
  1044. !         if (tty >= NUM_TTY || mod >= NUM_MODEM)
  1045.               break;
  1046.                       /* get the token */
  1047. --- 41,45 ----
  1048.       while (fgets(buf, 200, fp) != NULL) {
  1049.           line++;
  1050. !         if (tty > NUM_TTY || mod > NUM_MODEM)
  1051.               break;
  1052.                       /* get the token */
  1053. *** old/script.c    Mon Jul 20 17:02:59 1992
  1054. --- script.c    Mon Aug 17 16:32:24 1992
  1055. ***************
  1056. *** 129,133 ****
  1057. --- 129,137 ----
  1058.       void ipc_update();
  1059.   
  1060. + #ifdef BSD
  1061.       if ((kill(epid, 0) == -1) && errno == ESRCH) {
  1062. + #else /* BSD */
  1063. +     if ((kill(-epid, 0) == -1) && errno == ESRCH) {
  1064. + #endif /* BSD */
  1065.                       /* shut down the duplication of input */
  1066.           close(dup_pipe[0]);
  1067. *** old/tty_ucb.c    Mon Jul 20 17:02:59 1992
  1068. --- tty_ucb.c    Sun Sep  6 10:29:27 1992
  1069. ***************
  1070. *** 42,46 ****
  1071.        * the speed.
  1072.        */
  1073. !     baud = modem->init_sp[modem->t_cur];
  1074.       if (baud == 0)
  1075.           baud = dir->baud[0];
  1076. --- 42,46 ----
  1077.        * the speed.
  1078.        */
  1079. !     baud = modem->lock_sp[modem->t_cur];
  1080.       if (baud == 0)
  1081.           baud = dir->baud[0];
  1082. *** old/x_extrnl.c    Mon Jul 20 17:03:00 1992
  1083. --- x_extrnl.c    Sun Sep  6 10:10:52 1992
  1084. ***************
  1085. *** 25,29 ****
  1086.       extern int fd, errno;
  1087.       WINDOW *xt_win, *newwin();
  1088. !     int epid, want_out;
  1089.       unsigned int sleep();
  1090.       void _exit(), line_set();
  1091. --- 25,29 ----
  1092.       extern int fd, errno;
  1093.       WINDOW *xt_win, *newwin();
  1094. !     int epid, want_out, dummy;
  1095.       unsigned int sleep();
  1096.       void _exit(), line_set();
  1097. ***************
  1098. *** 81,87 ****
  1099. --- 81,93 ----
  1100.               break;
  1101.                       /* see if the process it still active */
  1102. + #ifdef BSD
  1103.           if ((kill(epid, 0) == -1) && errno == ESRCH) 
  1104. + #else /* BSD */
  1105. +         if ((kill(-epid, 0) == -1) && errno == ESRCH) 
  1106. + #endif /* BSD */
  1107.               break;
  1108.       }
  1109. +                     /* no zombies please */
  1110. +     wait(&dummy);
  1111.                       /* the tty may have been clobbered */
  1112.       sleep(1);
  1113. *** old/xmodem.c    Mon Jul 20 17:03:00 1992
  1114. --- xmodem.c    Sun Jul 26 10:19:31 1992
  1115. ***************
  1116. *** 257,260 ****
  1117. --- 257,264 ----
  1118.           return(0);
  1119.   
  1120. + #ifdef HAVE_TRUNCATE
  1121. +     return(uid_truncate(file, len));
  1122. + #else /* HAVE_TRUNCATE */
  1123.       if (!(fp = uid_fopen(file, "r")))
  1124.           return(1);
  1125. ***************
  1126. *** 304,307 ****
  1127. --- 308,312 ----
  1128.   
  1129.       return(0);
  1130. + #endif /* HAVE_TRUNCATE */
  1131.   }
  1132.   
  1133. ***************
  1134. *** 389,390 ****
  1135. --- 394,440 ----
  1136.       return(ret);
  1137.   }
  1138. + #ifdef HAVE_TRUNCATE
  1139. + static int
  1140. + uid_truncate(path, len)
  1141. + char *path;
  1142. + long len;
  1143. + {
  1144. +     int ret;
  1145. + #ifdef SETUID_BROKE
  1146. +     int status;
  1147. +     void _exit();
  1148. +     switch(fork()) {
  1149. +         case 0:
  1150. +             setuid(getuid());
  1151. +             setgid(getgid());
  1152. +             _exit(truncate(path, len));
  1153. +         case -1:
  1154. +             fprintf(stderr, "uid_truncate: Can't fork\n");
  1155. +             return(-1);
  1156. +         default:
  1157. +             if (wait(&status) == -1) {
  1158. +                 fprintf(stderr, "uid_truncate: wait failed\n");
  1159. +                 return(-1);
  1160. +             }
  1161. +             ret = status >> 8;
  1162. +     }
  1163. + #else /* SETUID_BROKE */
  1164. +     int euid, egid;
  1165. +     euid = geteuid();
  1166. +     egid = getegid();
  1167. +     setuid(getuid());
  1168. +     setgid(getgid());
  1169. +     ret = truncate(path, len);
  1170. +     setuid(euid);
  1171. +     setgid(egid);
  1172. + #endif /* SETUID_BROKE */
  1173. +     return(ret);
  1174. + }
  1175. + #endif /* HAVE_TRUNCATE */
  1176. End of Patch
  1177.