home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume12 / ecu2.80 / part17 < prev    next >
Encoding:
Text File  |  1990-05-11  |  54.2 KB  |  1,640 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v12i070: ECU 2.80 part 17/29
  3. from: wht%n4hgf@gatech.edu (Warren Tucker)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 12, Issue 70
  7. Submitted-by: wht%n4hgf@gatech.edu (Warren Tucker)
  8. Archive-name: ecu2.80/part17
  9.  
  10. ---- Cut Here and unpack ----
  11. #!/bin/sh
  12. # This is part 17 of ecu280
  13. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  14.  then TOUCH=touch
  15.  else TOUCH=true
  16. fi
  17. # ============= help/ecuhelp.src ==============
  18. echo "x - extracting help/ecuhelp.src (Text)"
  19. sed 's/^X//' << 'SHAR_EOF' > help/ecuhelp.src &&
  20. X# ecu help ,source file
  21. X/*+:EDITS:*/
  22. X/*:11-03-1989-16:21-wht------ unet2 ----- */
  23. X/*:06-17-1988-11:10-wht-add 'exit' command */
  24. X/*:06-13-1988-15:38-wht-creation */
  25. X#--------------------------------------------------------------------
  26. X%ax
  27. XUsage: ax [<param>]
  28. X
  29. X<param> may be a single ASCII character, a standard ASCII identifier
  30. X(such as ETX), or a two-character control character identifier (such as
  31. X^C, typed as a caret followed by a C).
  32. X
  33. XIf no parameter is supplied, a table of control characters is printed
  34. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  35. Xcontrol character identifier.
  36. X#--------------------------------------------------------------------
  37. X%xa
  38. XUsage: xa [<hex-val>]
  39. X
  40. X<hex-val> is a hexadecimal value between 0 and FF; the parity (sign) bit
  41. Xis stripped and the equivalent ASCII character value is displayed.
  42. X
  43. XIf no parameter is supplied, a table of control characters is printed
  44. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  45. Xcontrol character identifier.
  46. X#--------------------------------------------------------------------
  47. X%oa
  48. XUsage: oa [<octal-val>]
  49. X
  50. X<octal-val> is a octal value between 0 and 0377; the parity (sign) bit
  51. Xis stripped and the equivalent ASCII character value is displayed.
  52. X
  53. XIf no parameter is supplied, a table of control characters is printed
  54. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  55. Xcontrol character identifier.
  56. X#--------------------------------------------------------------------
  57. X%da
  58. XUsage: da [<decimal-val>]
  59. X
  60. X<decimal-val> is a decimal value between 0 and 0377; the parity (sign)
  61. Xbit is stripped and the equivalent ASCII character value is displayed.
  62. X
  63. XIf no parameter is supplied, a table of control characters is printed
  64. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  65. Xcontrol character identifier.
  66. X#--------------------------------------------------------------------
  67. X%baud
  68. XUsage: baud [<baud-rate>]
  69. X
  70. X<baud-rate>, if specified, must be taken from the values 110, 300, 600,
  71. X1200, 2400, 4800, 9600, 19200 and 38400.  On some systems, 19200 and
  72. X38400 may not be supported.  If baud rate 110 is selected, 2 stop bits
  73. Xare automatically specified; other baud rates set 1 stop bit.  If
  74. X<baud-rate> is not supplied, the current baud rate is displayed.
  75. X
  76. XThe setting may be automatically changed as the result of a 'dial'
  77. Xcommand.  See also the 'dial' and 'parity' command descriptions.
  78. X#--------------------------------------------------------------------
  79. X%bn
  80. XUsage: bn [ 0 | 1 | 2 ]
  81. X
  82. X"bell notify": This command is only available under XENIX.  If no
  83. Xparameter is supplied, the current setting is displayed.  Specifying 0
  84. Xdisables the facility; 1 causes an audible alarm to be sounded on all of
  85. Xthe XENIX virtual consoles upon receipt of a bell (0x07) character from
  86. Xthe remote system; 2 causes an audible alarm to be sent to all consoles
  87. Xupon receipt of ANY characters from the remote system.  A non-zero value
  88. Xalso causes an audible alarm to be sent to all console upon the
  89. Xsuccessful completion of a 'redial' command which must retry more than
  90. Xone redial attempt or upon completion of a file transfer operation.
  91. X
  92. XDifferent alarms are sent depending upon the the type of event causing
  93. Xthe alarms.
  94. X#--------------------------------------------------------------------
  95. X%break
  96. XUsage: break
  97. X
  98. XThis command sends a break signal to the remote system.
  99. X#--------------------------------------------------------------------
  100. X%cd
  101. XUsage: cd [<dir-path>]
  102. X
  103. XThis command allows you to change the working directory of the ecu
  104. Xprocess.  If <dir-path> is supplied, the previous working directory is
  105. Xdisplayed, and <dir-path> is made the new working directory.  A history
  106. Xof previous directory changes is maintained.  Entering the 'cd' command
  107. Xshows the numbered history list and allows you to select a new directory
  108. Xby entering the number.  Other commands allow deletion of directories
  109. Xfrom the list or saving the list to file ~/.ecu/phone.  This file is
  110. Xautomatically read at ecu startup, providing a convenient list of
  111. Xdirectories available for quick selection.
  112. X#--------------------------------------------------------------------
  113. X%dial
  114. XUsage: dial [<dial-param>]
  115. X
  116. X<dial-param> may take one of two forms, a telephone number to dial or a
  117. Xlogical name which can be found in the user phone directory (in file
  118. X~/.ecu/phone).
  119. X
  120. XIf a telephone number is supplied, the phone number is dialed; you must
  121. Xfirst have set the desired baud rate and parity using the 'baud' and
  122. X'parity' commands.  If a logical name is entered, the phone directory is
  123. Xsearched; if the entry is found, the baud rate and parity is
  124. Xautomatically set and the number dialed.
  125. X
  126. XIf <dial-param> is not supplied, then a screen-oriented self-documenting
  127. Xdirectory manager is executed; you may scan the the directory to select
  128. Xa number to dial, as well as add, remove and edit entries.  See also
  129. X'baud' and 'parity'.
  130. X#--------------------------------------------------------------------
  131. X%do
  132. XUsage: do <procname> [<arg> ... ]
  133. X
  134. XPerform ecu procedure.  Ecu searches for <procname>.ep in the current
  135. Xdirectory.  If the file is not found, the program looks for the file in
  136. Xthe ~/.ecu directory.  One or more arguments may be passed to the
  137. Xprocedure.
  138. X#--------------------------------------------------------------------
  139. X%duplex
  140. XUsage: duplex [ Full | Half ]
  141. X
  142. XThis command specifies whether or not ecu is to locally echo characters
  143. Xtyped by you at the keyboard.  The overwhelming majority of remote
  144. Xsystems provide the echo function, in which case full duplex must be
  145. Xused.  For the rare occasions when the remote system does not echo your
  146. Xkeyboard input, setting half duplex will allow you to see what you are
  147. Xtyping.
  148. X
  149. XWhen communicating with another terminal in a "teletype conver- sation",
  150. Xsetting half duplex is generally required.  In such cases, use of the
  151. X'nl', 'nlin' and 'nlout' commands may also be required.
  152. X
  153. XThe default setting for duplex is full.
  154. X#--------------------------------------------------------------------
  155. X#%esc
  156. X#Usage esc <hex-constant>
  157. X#"command escape ": This command is used only on non-XENIX systems.
  158. X#It specifies the equivalent character for the HOME key used
  159. X#by XENIX versions of ecu to enter the commands being described
  160. X#by this help function.  The default setting for this command escape
  161. X#s '%'.  To change the value, you must enter the hexadecimal value
  162. X#of the desired character; it must be in the range 01 through 7F.
  163. X#You may use the 'ax' command to aid in converting an ASCII
  164. X#character to the appropriate hexadecimal value.
  165. X#--------------------------------------------------------------------
  166. X%fi
  167. XUsage: fi [<filename>]
  168. X
  169. X"file insert": This command causes file characters to be inserted into
  170. Xthe transmit data stream as though they had been entered at the
  171. Xkeyboard.  If <filename> is not entered on the command line, a prompt
  172. Xfor the filename is made.  Once the filename has been entered and file
  173. Xhas been opened, you are asked whether the file should be transmitted at
  174. Xfull speed, by "echo pacing" or by a single line at a time.  You may
  175. Xalso append an 'f', 'e' or 's' argument to the command line.  If your
  176. Xremote can tolerate it, full speed transmission is the fastest.
  177. XPressing the interrupt key (DEL) stops a full speed transmission.  By
  178. Xspecifying echo pacing, it is possible to increase the likelihood of
  179. Xproper receipt.  Pressing the interrupt key (DEL) stops an echo paced
  180. Xtransmission.  As a last resort, if echo pacing is not working for you,
  181. X(i.e., you are using the command in an environment where the remote does
  182. Xnot echo your characters), use single line at a time transmission.  You
  183. Xmust press the space key to initiate sending each line.  Pressing 'ESC'
  184. Xor 's' stops the transfer.
  185. X#--------------------------------------------------------------------
  186. X%fkey
  187. XUsage: fkey [<keyset_name>]
  188. X
  189. XThis command allows the mapping of function keys F1-F12, PgUp, PgDn, End
  190. Xand Ins and the cursor up, down, left and right keys to emit a desired
  191. Xsequence of characters when a function key is pressed.  <keyset_name>
  192. Xspecifies which key set in ~/.ecu/keys is to be selected: Sample entry
  193. Xin ~/.ecu/keys:
  194. X
  195. Xhayes
  196. X    F1:escape:+ + +
  197. X    F2:autoans:A T S 0 = 1 cr
  198. X    F3:dial:A T D T
  199. Xbbs
  200. X    F1:cancel:^K
  201. X    F2:yes:y cr
  202. X
  203. XIf a keyset_name matches a logical dial directory name, it is loaded
  204. Xwhen the number is dialed.
  205. X#--------------------------------------------------------------------
  206. X%hangup
  207. XUsage: hangup
  208. X
  209. XThis causes DTR to be momentarily interrupted, terminating any
  210. Xoutstanding connection.  Your DCE (modem) must be able to drop carrier
  211. Xupon loss of DTR.
  212. X#--------------------------------------------------------------------
  213. X%help
  214. XUsage: help [<cmd-name>]
  215. X
  216. XIssuing this command with no argument displays a list of commands
  217. Xfollowed by a request for a command for further information.
  218. X#--------------------------------------------------------------------
  219. X%llp
  220. XUsage: llp
  221. X
  222. XThis command is a shorthand version of 'log /dev/lp'.
  223. X/dev/lp must not be under the control of a print spooler.
  224. X#--------------------------------------------------------------------
  225. X%loff
  226. XUsage: loff
  227. X
  228. XThis command is shorthand for 'log off'.  If session logging
  229. Xis active, it is turned off.
  230. X#--------------------------------------------------------------------
  231. X%log
  232. XUsage: log [-s] [-r] [ | off | filename ]
  233. X       -s "scratch" previous file contents; otherwise append
  234. X       -r "raw" logging; otherwise non-printable characters
  235. X          other than tab and newline are omitted from the log
  236. X
  237. XThis command controls session logging; issuing the command with no
  238. Xargument causes the status of session logging to be displayed.  The
  239. Xspecial argument 'off' causes active logging to be terminated.  Other
  240. Xargument values cause logging to start using the argument as a filename.
  241. XIssuing a 'log filename' command when logging is already active causes
  242. Xthe previous file to be closed and the new file to be opened.  Switches
  243. Xare meaningful only when used in conjunction with a filename to start
  244. Xlogging.
  245. X#--------------------------------------------------------------------
  246. X%nl
  247. XUsage: nl
  248. X
  249. XDisplay the current setting of CR/LF mapping.  For more information,
  250. Xrefer to the 'nlin' and 'nlout' command descriptions.
  251. X#--------------------------------------------------------------------
  252. X%nlin
  253. XUsage: nlin [<y-n>]
  254. X
  255. XThis command controls whether or not a newline (NL/LF) character is sent
  256. Xto the screen upon receipt of a carriage return (CR) from the remote
  257. Xsystem.  Most remote computers supply a NL after CR.  When communicating
  258. Xwith another terminal in a "teletype conversation", this is generally
  259. Xnot the case (see also the 'duplex' command).
  260. X
  261. XIssuing the command without <y-n> causes the current setting to be
  262. Xdisplayed.  The format of <y-n> is flexible: 'y' or '1' enables
  263. Xappending NL to CR, 'n' or '0' causes the feature to be disabled.
  264. X#--------------------------------------------------------------------
  265. X%nlout
  266. XUsage: nlout [<y-n>]
  267. X
  268. XThis command controls whether or not a newline (NL/LF) character is sent
  269. Xto the remote system upon transmission of a carriage return (CR) entered
  270. Xby the keyboard.  Most remote computers do not require (indeed
  271. X"dislike") a NL after CR.  When communicating with another terminal in a
  272. X"teletype conversation", this is generally not the case (see also the
  273. X'duplex' command).
  274. X
  275. XIssuing the command without <y-n> causes the current setting to be
  276. Xdisplayed.  The format of <y-n> is flexible: 'y' or '1' enables
  277. Xappending NL to CR, 'n' or '0' causes the feature to be disabled.
  278. X#--------------------------------------------------------------------
  279. X%parity
  280. XUsage: parity [ None | Even | Odd ]
  281. X
  282. XThis command controls the parity of characters transmitted by the
  283. Xkeyboard.  Issuing the command with no parameter displays the current
  284. Xsetting.  When the parameter is supplied, only the first character is
  285. Xrequired.  Even or odd parity implies seven data bits; no parity implies
  286. Xeight data bits.  Parity of incoming characters is not checked.
  287. X
  288. XThe setting may be automatically changed as the result of a 'dial'
  289. Xcommand.  See also the 'baud' and 'dial' command descriptions.
  290. X#--------------------------------------------------------------------
  291. X%pid
  292. XUsage: pid
  293. X
  294. XThis command displays the process id of the ecu transmitter process, the
  295. Xecu receiver process and the process ids of ecu's parent and group.
  296. X#--------------------------------------------------------------------
  297. X%ptrace
  298. XUsage: ptrace [ 0 | 1 | on | off]
  299. X
  300. XThis command controls whether or not procedure execution is to be
  301. Xtraced.
  302. X#--------------------------------------------------------------------
  303. X%pwd
  304. XUsage: pwd
  305. X
  306. XThis command prints the current working directory of the ecu process.
  307. X#--------------------------------------------------------------------
  308. X%rk
  309. XUsage: rk
  310. X
  311. XThis command searches the PATH list for 'ckermit' (Columbia University
  312. XC-Kermit) and invokes it to receive files.  See the ecu documentation
  313. Xfor modifications necessary to ckermit for ecu operation.  The file
  314. X~/.kermrc must be set up to have any desired initialization paraeters
  315. Xyou desire.  Refer to C-Kermit documentation for more information.
  316. X#--------------------------------------------------------------------
  317. X%rs
  318. XUsage: rs
  319. X
  320. XThis command invokes a SEAlink receive protocol.
  321. X#--------------------------------------------------------------------
  322. X%redial
  323. XUsage: redial [<retry-count> [<pause-interval>]]
  324. X
  325. XThis command redials a number previously dialed with the 'dial' command.
  326. XModem status is tested and multiple retries may be made.  <retry-count>
  327. Xspecifies how many retries are to be made.  <pause-interval> specifies
  328. Xhow many seconds the program pauses after a failure to connect.  You
  329. Xmust specify <retry-count> in order to specify <pause-interval>.  The
  330. Xdefault value for <retry-count> is 10, for <pause-interval> is 60.
  331. X
  332. XYou should know that in some jurisdictions, it is ILLEGAL to dial the
  333. Xsame telephone number more than a specified number of times during some
  334. Xinterval of time.  In any case, specifying <pause-interval> less than 15
  335. Xseconds is silently changed to 15 seconds.
  336. X#--------------------------------------------------------------------
  337. X%rev
  338. XUsage: rev
  339. X
  340. XThis command displays ecu's revision, the transmitter process id and the
  341. Xdate and time ecu was made.
  342. X#--------------------------------------------------------------------
  343. X%rx
  344. XUsage: rx
  345. X
  346. XThis command invokes a modified version of Chuck Forsberg's rz program
  347. X(version 1.31) to receive files from the remote system using XMODEM/CRC.
  348. X
  349. XAfter entering the command, you are prompted as to whether or not file
  350. XCR/LF characters are to be converted to newlines.  If you are
  351. Xtransferring text files from a system which contain CR/LF line
  352. Xterminators, you must answer yes to this question.  You should answer no
  353. Xwhen transferring binary files, such as executables, .arc files and the
  354. Xlike.  File transfer progress is presented on a visual display.  To
  355. Xabort the transfer, press your interrupt key (usually DEL unless reset
  356. Xwith stty(C)).
  357. X#--------------------------------------------------------------------
  358. X%ry
  359. XUsage: ry
  360. X
  361. XThis command invokes a modified version of Chuck Forsberg's rz program
  362. X(version 1.31) to receive files from the remote system using YMODEM
  363. Xbatch with CRC-16 error correction.  The YMODEM is "true YMODEM", not
  364. XXMODEM-1k.  File transfer progress is presented on a visual display.  To
  365. Xabort the transfer, press your interrupt key (usually DEL unless reset
  366. Xwith stty(C)).
  367. X#--------------------------------------------------------------------
  368. X%rz
  369. XUsage: rz
  370. X
  371. XThis command invokes a modified version of Chuck Forsberg's rz program
  372. X(version 1.44) to receive files from the remote system using
  373. XZMODEM/CRC32.  File transfer progress is presented on a visual display.
  374. XTo abort the transfer, press your interrupt key (usually DEL unless
  375. Xreset with stty(C)).
  376. X#--------------------------------------------------------------------
  377. X%sk
  378. XUsage: sk [<file-list>]
  379. X
  380. XThis command searches the PATH list for 'ckermit' (Columbia University
  381. XC-Kermit) and invokes it to send files.  The file ~/.kermrc must be set
  382. Xup to have any desired initialization paraeters you desire.  See the ecu
  383. Xdocumentation for modifications necessary to ckermit for ecu operation.
  384. X
  385. XAfter entering the command, you are prompted as to whether or not file
  386. Xnewline characters are to be converted to CR/LF.  If you are
  387. Xtransferring text files to a system which requires CR/LF line
  388. Xterminators, you must answer yes to this question.  You should answer no
  389. Xwhen transferring binary files, such as executables, .arc files and the
  390. Xlike.  You are prompted to enter a list of files to send, which may
  391. Xcontain one or more wildcard specifications.
  392. X
  393. XThe file ~/.kermrc must be set up to have any desired initialization
  394. Xparameters you desire.  Refer to C-Kermit documentation for more
  395. Xinformation.
  396. X#--------------------------------------------------------------------
  397. X%ss
  398. XUsage: ss [<file-list>]
  399. X
  400. XThis command invokes a SEAlink file transmission protocol.
  401. X#--------------------------------------------------------------------
  402. X%stat
  403. XUsage: stat
  404. X
  405. XThis command displays statistics about ecu usage.
  406. X
  407. XExample display when not connected to a remote system:
  408. XDate/time: 06-14-1988 11:40:35 (UTC 15:40)
  409. XTotal chars transmitted: 178
  410. XTotal chars received:    3681
  411. X
  412. XDate/time: 06-14-1988 14:41:24 (UTC 18:41)
  413. XConnected to CompuHost (555-1234) at 14:40:57
  414. XParameters: 2400-N-1 Connect time: 00:01:27
  415. XTotal chars transmitted: 234 (since CONNECT 142)
  416. XTotal chars received:    2278 (since CONNECT 1478)
  417. X#--------------------------------------------------------------------
  418. X%sx
  419. XUsage: sx [<file-name>]
  420. X
  421. XThis command invokes a modified version of Chuck Forsberg's sz program
  422. X(version 1.44) to send a file to the remote system using XMODEM/CRC.
  423. X
  424. XAfter entering the command, you are prompted as to whether or not file
  425. XCR/LF characters are to be converted to newlines.  If you are
  426. Xtransferring text files from a system which contain CR/LF line termi-
  427. Xnators, you must answer yes to this question.  You should answer no when
  428. Xtransferring binary files, such as executables, .arc files and the like.
  429. X
  430. XYou are prompted to enter a filename to send.  File transfer progress is
  431. Xpresented on a visual display.  To abort the transfer, press your
  432. Xinterrupt key (usually DEL unless reset with stty(C)).
  433. X#--------------------------------------------------------------------
  434. X%sy
  435. XUsage: sy [<file-list>]
  436. X
  437. XThis command invokes a modified version of Chuck Forsberg's sz program
  438. X(version 1.44) to send file(s) to the remote system using YMODEM/CRC.
  439. X
  440. XYou are prompted to enter filename(s) to send, which may consist of one
  441. Xor more wildcard specifications.  File transfer progress is presented on
  442. Xa visual display.  To abort the transfer, press your interrupt key
  443. X(usually DEL unless reset with stty(C)).
  444. X#--------------------------------------------------------------------
  445. X%sz
  446. XUsage: sz [<file-list>]
  447. X
  448. XThis command invokes a modified version of Chuck Forsberg's sz program
  449. X(version 1.44) to send file(s) to the remote system using ZMODEM/CRC32.
  450. X
  451. XYou are prompted to enter filename(s) to send, which may consist of one
  452. Xor more wildcard specifications.  File transfer progress is presented on
  453. Xa visual display.  To abort the transfer, press your interrupt key
  454. X(usually DEL unless reset with stty(C)).
  455. X
  456. XNote: if you specify sending only newer files and the remote receiver
  457. Xdoes not support the feature, it may skip (reject) all your files.
  458. XRetry the transfer specifying 'N' to 'Transfer only newer files'.
  459. X#--------------------------------------------------------------------
  460. X%time
  461. XUsage: time
  462. X
  463. XThis command displays the local date and time as well as the current UTC.
  464. X#--------------------------------------------------------------------
  465. X%tty
  466. XUsage: tty
  467. X
  468. XThis command displays the current console tty name.
  469. X#--------------------------------------------------------------------
  470. X%exit
  471. XUsage: exit
  472. X
  473. XThis command terminates ecu promptly.  If your modem does not drop
  474. Xcarrier upon loss of Data Terminal Ready (DTR), you must use the
  475. X'hangup' command prior to issuing the 'exit' command.  It is strongly
  476. Xrecommended that you configure your modem to hang up the phone line when
  477. XDTR drops.  A shorthand version of this command exists: '.' is
  478. Xequivalent to 'exit'.
  479. X#--------------------------------------------------------------------
  480. X%!
  481. XUsage: !
  482. X       !<command>
  483. X
  484. XThe '!' command is a shell escape.  The environment variable SHELL is
  485. Xread to determine what shell program to execute (e.g., /bin/sh, etc).
  486. XIf '!' is entered by itself, an interactive shell is started; press ^D
  487. Xto exit back to ecu.  If <command> is supplied, it is executed by the
  488. Xshell with an immediate return to ecu.
  489. X
  490. XSimilarly,
  491. X  '$' causes the communications line to be stdin and stdout
  492. X      for the spawned shell
  493. X  '>' causes spawned shell to receive exactly sames files as ecu
  494. X#--------------------------------------------------------------------
  495. SHAR_EOF
  496. $TOUCH -am 1205170689 help/ecuhelp.src &&
  497. chmod 0644 help/ecuhelp.src ||
  498. echo "restore of help/ecuhelp.src failed"
  499. set `wc -c help/ecuhelp.src`;Wc_c=$1
  500. if test "$Wc_c" != "20801"; then
  501.     echo original size 20801, current size $Wc_c
  502. fi
  503. # ============= help/helpgen.c ==============
  504. echo "x - extracting help/helpgen.c (Text)"
  505. sed 's/^X//' << 'SHAR_EOF' > help/helpgen.c &&
  506. X/* CHK=0x84E5 */
  507. X/*+-------------------------------------------------------------------------
  508. X    helpgen.c -- ecu command help file maker
  509. X    wht%n4hgf@gatech.edu
  510. X
  511. X  Defined functions:
  512. X    build_ecudoc()
  513. X    build_ecuhelp()
  514. X    main(argc,argv,envp)
  515. X    search_cmd_list(cmd)
  516. X    show_cmds()
  517. X    test_help()
  518. X    to_lower(ch)
  519. X    to_upper(ch)
  520. X    usage()
  521. X
  522. X--------------------------------------------------------------------------*/
  523. X/*+:EDITS:*/
  524. X/*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
  525. X/*:03-25-1990-14:12-wht@n4hgf------- ecu x2.70 -------- */
  526. X/*:07-03-1989-22:58-wht------ x2.00 ----- */
  527. X/*:11-07-1988-13:58-wht-source control point 1.30 */
  528. X/*:10-24-1988-16:50-wht-works under BSD4 again (mostly)!  */
  529. X/*:06-14-1988-16:06-wht-program now multi-purpose */
  530. X/*:06-13-1988-13:46-wht-creation */
  531. X
  532. X#include <stdio.h>
  533. X#include <ctype.h>
  534. X#include "lint_args.h"
  535. X
  536. X#if defined(M_XENIX)
  537. X#if !defined(LINT_ARGS)
  538. X#define LINT_ARGS
  539. X#endif
  540. X#endif
  541. X
  542. X#define DECLARE_P_CMD
  543. X#define HELPGEN
  544. X#include "../ecucmd.h"
  545. X
  546. X#include "../esd.h"
  547. X#include "../stdio_lint.h"
  548. X
  549. X#define PSRC    "ecuhelp.src"
  550. X#define PDAT    "ecuhelp.data"
  551. X#define PDOC    "ecuhelp.doc"
  552. X#define PTXT    "ecuhelp.txt"
  553. X#define PFITXT    "../doc/ecufi.txt"
  554. X#define PFSTXT    "../doc/ecufs.txt"
  555. X
  556. Xlong    start_pos[TOKEN_QUAN];
  557. Xint        token_line[TOKEN_QUAN];
  558. XFILE    *fpsrc;        /* help source file */
  559. XFILE    *fpdat;        /* help data file */
  560. XFILE    *fpdoc;        /* help doc file */
  561. XFILE    *fptxt;        /* help nroff file */
  562. XP_CMD    *pcmd;
  563. Xint        src_line = 0;
  564. Xchar    buf[128];
  565. X
  566. X/*+-------------------------------------------------------------------------
  567. X    usage()
  568. X--------------------------------------------------------------------------*/
  569. Xusage()
  570. X{
  571. X    fprintf(stderr,"usage: helpgen [-b] [-d] [-s] [-t]\n");
  572. X    fprintf(stderr," -b build %s from %s\n",PDAT,PSRC);
  573. X    fprintf(stderr," -d build %s from %s\n",PDOC,PDAT);
  574. X    fprintf(stderr," -n build nroff %s from %s\n",PTXT,PDAT);
  575. X    fprintf(stderr," -s show list of commands\n");
  576. X    fprintf(stderr," -t test help\n");
  577. X    fprintf(stderr,"At least one switch must be issued.  They are executed\n");
  578. X    fprintf(stderr,"in the order shown on the usage line.\n");
  579. X    exit(1);
  580. X}    /* end of usage */
  581. X
  582. X/*+-------------------------------------------------------------------------
  583. X    search_cmd_list(cmd)
  584. X--------------------------------------------------------------------------*/
  585. XP_CMD *
  586. Xsearch_cmd_list(cmd)
  587. Xregister char    *cmd;
  588. X{
  589. Xregister P_CMD    *cmd_list = icmd_cmds;
  590. X
  591. X    while(cmd_list->token != -1)
  592. X    {
  593. X        if(strcmp(cmd_list->cmd,cmd) == 0)
  594. X            break;
  595. X        cmd_list++;
  596. X    }
  597. X    if(cmd_list->token == -1)
  598. X        return((P_CMD *)0);
  599. X    else
  600. X        return(cmd_list);
  601. X
  602. X}    /* end of search_cmd_list */
  603. X
  604. X/*+-------------------------------------------------------------------------
  605. X    show_cmds()
  606. Xcommands with null descriptions are "undocumented"
  607. X--------------------------------------------------------------------------*/
  608. Xvoid
  609. Xshow_cmds()
  610. X{
  611. Xregister int itmp;
  612. Xregister P_CMD *pcmd = icmd_cmds;
  613. Xregister int longest_cmd = 0;
  614. Xregister int longest_descr = 0;
  615. Xregister int cmd_count = 0;
  616. Xregister int nl_flag = 0;
  617. Xchar    s80[80];
  618. XP_CMD *longest_cmd_p = 0;
  619. XP_CMD *longest_descr_p = 0;
  620. X
  621. X    while(pcmd->token != -1)
  622. X    {
  623. X        if(!*pcmd->descr)
  624. X        {
  625. X            pcmd++;
  626. X            continue;
  627. X        }
  628. X        itmp = strlen(pcmd->cmd);
  629. X        if(itmp > longest_cmd)
  630. X        {
  631. X            longest_cmd = itmp;
  632. X            longest_cmd_p = pcmd;
  633. X        }
  634. X        itmp = strlen(pcmd->descr);
  635. X        if(itmp > longest_descr)
  636. X        {
  637. X            longest_descr = itmp;
  638. X            longest_descr_p = pcmd;
  639. X        }
  640. X        pcmd++;
  641. X    }
  642. X    pcmd = icmd_cmds;
  643. X    while(pcmd->token != -1)
  644. X    {
  645. X        if((!pcmd->min) || (!*pcmd->descr))
  646. X        {
  647. X            pcmd++;
  648. X            continue;
  649. X        }
  650. X        strcpy(s80,pcmd->cmd);
  651. X        pad_zstr_to_len(s80,longest_cmd + 2);
  652. X        for(itmp = 0; itmp < pcmd->min; itmp++)
  653. X            s80[itmp] = to_upper(s80[itmp]);
  654. X        fputs(s80,stderr);
  655. X
  656. X        strcpy(s80,pcmd->descr);
  657. X        pad_zstr_to_len(s80,longest_descr + 1);
  658. X        fputs(s80,stderr);
  659. X
  660. X        if(nl_flag)
  661. X            fputs("\r\n",stderr);
  662. X        else
  663. X            fputs("| ",stderr);
  664. X        nl_flag = (nl_flag) ? 0 : 1;
  665. X
  666. X        pcmd++;
  667. X    }
  668. X    if(nl_flag)
  669. X        fputs("\r\n",stderr);
  670. X
  671. X    itmp = longest_cmd + longest_descr + 5;
  672. X    sprintf(s80,"recwidth = %d\r\n",itmp);
  673. X    fprintf(stderr,s80);
  674. X    pcmd = longest_cmd_p;
  675. X    sprintf(s80,"longest cmd: %s: %s\r\n",pcmd->cmd,pcmd->descr);
  676. X    fprintf(stderr,s80);
  677. X    pcmd = longest_descr_p;
  678. X    sprintf(s80,"longest dsc: %s: %s\r\n",pcmd->cmd,pcmd->descr);
  679. X    fprintf(stderr,s80);
  680. X
  681. X}    /* end of show_cmds */
  682. X
  683. X/*+-------------------------------------------------------------------------
  684. X    build_ecuhelp()
  685. X--------------------------------------------------------------------------*/
  686. Xvoid
  687. Xbuild_ecuhelp()
  688. X{
  689. Xregister int itmp;
  690. Xregister char *cptr;
  691. X    printf("\nBuilding %s\n",PDAT);
  692. X    for(itmp = 0; itmp < TOKEN_QUAN; itmp++)
  693. X    {
  694. X        start_pos[itmp] = 0L;
  695. X        token_line[itmp] = 0;
  696. X    }
  697. X
  698. X    if((fpsrc = fopen(PSRC,"r")) == NULL)
  699. X    {
  700. X        perror(PSRC);
  701. X        exit(1);
  702. X    }
  703. X
  704. X    if((fpdat = fopen(PDAT,"w")) == NULL)
  705. X    {
  706. X        perror(PDAT);
  707. X        exit(1);
  708. X    }
  709. X
  710. X    fwrite((char *)start_pos,sizeof(long),    /* write null table */
  711. X            TOKEN_QUAN,fpdat);
  712. X
  713. X    while(fgets(buf,sizeof(buf),fpsrc) != NULL)
  714. X    {
  715. X        src_line++;
  716. X        itmp = strlen(buf);
  717. X        buf[--itmp] = 0;                        /* kill trailing nl */
  718. X        if((buf[0] == '#') || (buf[0] == '/'))    /* ignore comments */
  719. X            continue;
  720. X        if(buf[0] == '%')        /* command indication */
  721. X        {
  722. XSEARCH_CMD_LIST:
  723. X            if(!(pcmd = search_cmd_list(&buf[1])))
  724. X            {
  725. X                printf("line %d: '%s' not in command table\n",
  726. X                        src_line,&buf[1]);
  727. X                while(fgets(buf,sizeof(buf),fpsrc) != NULL)
  728. X                {
  729. X                    src_line++;
  730. X                    itmp = strlen(buf);
  731. X                    buf[--itmp] = 0;                    /* kill trailing nl */
  732. X                    if(buf[0] == '%')        /* command indication */
  733. X                        goto SEARCH_CMD_LIST;
  734. X                }
  735. X                break;
  736. X            }
  737. X            if(start_pos[pcmd->token])
  738. X            {
  739. X                printf("line %d: '%s' already found on line %d\n",
  740. X                        src_line,&buf[1],token_line[pcmd->token]);
  741. X                exit(1);
  742. X            }
  743. X            fputs("\n",fpdat);    /* terminate previous command description */
  744. X            start_pos[pcmd->token] = ftell(fpdat);
  745. X            token_line[pcmd->token] = src_line;
  746. X            fputs("   ",fpdat);
  747. X            cptr = &buf[1];    /* command text */
  748. X            itmp = 0;
  749. X            while(*cptr)        /* show cmd and min chars required */
  750. X            {
  751. X                if(itmp < pcmd->min)
  752. X                    fputc(to_upper(*cptr++),fpdat);
  753. X                else
  754. X                    fputc(to_lower(*cptr++),fpdat);
  755. X                itmp++;
  756. X            }
  757. X            if(*pcmd->descr)        /* if description present */
  758. X                fprintf(fpdat," : %s\n \n",pcmd->descr);
  759. X            else
  760. X                fputs("\n \n",fpdat);
  761. X            continue;
  762. X        }
  763. X        fprintf(fpdat," %s\n",buf);
  764. X    }
  765. X
  766. X    fseek(fpdat,0L,0);    /* back to position table */
  767. X    fwrite((char *)start_pos,sizeof(long),    /* write actual table */
  768. X            TOKEN_QUAN,fpdat);
  769. X    fclose(fpsrc);
  770. X    fputs("\n",fpdat);    /* terminate last command */
  771. X    fclose(fpdat);
  772. X}    /* end of build_ecuhelp */
  773. X
  774. X/*+-------------------------------------------------------------------------
  775. X    build_ecudoc()
  776. X--------------------------------------------------------------------------*/
  777. Xvoid
  778. Xbuild_ecudoc()
  779. X{
  780. Xregister int itmp;
  781. Xregister char *cptr;
  782. X
  783. X    printf("\nBuilding %s\n",PDOC);
  784. X    if((fpdat = fopen(PDAT,"r")) == NULL)
  785. X    {
  786. X        perror(PDAT);
  787. X        exit(1);
  788. X    }
  789. X    if((fpdoc = fopen(PDOC,"w")) == NULL)
  790. X    {
  791. X        perror(PDOC);
  792. X        exit(1);
  793. X    }
  794. X    fprintf(fpdoc,
  795. X        "\n     ECU  Command  Help  Documentation  (PRELIMINARY)\n\n");
  796. X    fprintf(fpdoc,
  797. X        "Commands are accessed by pressing the HOME key followed by one\n");
  798. X    fprintf(fpdoc,
  799. X        "of the following commands (capitalized portions are sufficient\n");
  800. X    fprintf(fpdoc,
  801. X        "to invoke the command):\n");
  802. X    fprintf(fpdoc,"\n");
  803. X    fprintf(fpdoc,
  804. X"---------------------------------------------------------------------\n");
  805. X    fread((char *)start_pos,sizeof(long),TOKEN_QUAN,fpdat);
  806. X    pcmd = icmd_cmds;
  807. X    while(pcmd->token != -1)
  808. X    {
  809. X        if(!pcmd->token)
  810. X        {
  811. X            pcmd++;
  812. X            continue;
  813. X        }
  814. X        if(pcmd->min && !start_pos[pcmd->token])
  815. X        {
  816. X            printf("no help available for '%s'\n",pcmd->cmd);
  817. X            pcmd++;
  818. X            continue;
  819. X        }
  820. X        fseek(fpdat,start_pos[pcmd->token],0);
  821. X        while(fgets(buf,sizeof(buf),fpdat) != NULL)
  822. X        {
  823. X            itmp = strlen(buf);
  824. X            buf[--itmp] = 0;
  825. X            if(itmp == 0)
  826. X                break;
  827. X            fprintf(fpdoc,"%s\n",buf);
  828. X        }
  829. X        fprintf(fpdoc,
  830. X"---------------------------------------------------------------------\n");
  831. X        pcmd++;
  832. X    }
  833. X    fclose(fpdat);
  834. X    fclose(fpdoc);
  835. X}    /* end of build_ecudoc */
  836. X
  837. X/*+-------------------------------------------------------------------------
  838. X    build_ecutxt()
  839. X--------------------------------------------------------------------------*/
  840. Xvoid
  841. Xbuild_ecutxt()
  842. X{
  843. Xregister int itmp;
  844. Xregister char *cptr;
  845. X
  846. X    printf("\nBuilding %s\n",PTXT);
  847. X    if((fpdat = fopen(PDAT,"r")) == NULL)
  848. X    {
  849. X        perror(PDAT);
  850. X        exit(1);
  851. X    }
  852. X    if((fptxt = fopen(PTXT,"w")) == NULL)
  853. X    {
  854. X        perror(PTXT);
  855. X        exit(1);
  856. X    }
  857. X
  858. X    fread((char *)start_pos,sizeof(long),TOKEN_QUAN,fpdat);
  859. X    pcmd = icmd_cmds;
  860. X    while(pcmd->token != -1)
  861. X    {
  862. X        if(!pcmd->token)
  863. X        {
  864. X            pcmd++;
  865. X            continue;
  866. X        }
  867. X        if(pcmd->min && !start_pos[pcmd->token])
  868. X        {
  869. X            printf("no help available for '%s'\n",pcmd->cmd);
  870. X            pcmd++;
  871. X            continue;
  872. X        }
  873. X        fseek(fpdat,start_pos[pcmd->token],0);
  874. X        if(fgets(buf,sizeof(buf),fpdat) != NULL)
  875. X        itmp = strlen(buf);
  876. X        buf[--itmp] = 0;
  877. X        cptr = buf;
  878. X        while(*cptr)
  879. X            if(*cptr == ' ')
  880. X                cptr++;
  881. X            else
  882. X                break;
  883. X        fprintf(fptxt,".*s 2 \"%s\"\n.(b L",cptr);
  884. X        while(fgets(buf,sizeof(buf),fpdat) != NULL)
  885. X        {
  886. X            itmp = strlen(buf);
  887. X            buf[--itmp] = 0;
  888. X            if(itmp == 0)
  889. X                break;
  890. X            fprintf(fptxt,"%s\n",buf);
  891. X        }
  892. X        fprintf(fptxt,"\n.)b\n\n");
  893. X        pcmd++;
  894. X    }
  895. X    fclose(fpdat);
  896. X    fclose(fptxt);
  897. X}    /* end of build_ecutxt */
  898. X
  899. X/*+-------------------------------------------------------------------------
  900. X    test_help()
  901. X--------------------------------------------------------------------------*/
  902. Xvoid
  903. Xtest_help()
  904. X{
  905. Xregister int itmp;
  906. Xregister char *cptr;
  907. X
  908. X/* test code */
  909. X    printf("\nNow to test\n");
  910. X    if((fpdat = fopen(PDAT,"r")) == NULL)
  911. X    {
  912. X        perror(PDAT);
  913. X        exit(1);
  914. X    }
  915. X    fread((char *)start_pos,sizeof(long),TOKEN_QUAN,fpdat);
  916. X    while(1)
  917. X    {
  918. X        printf("\ncommand: ");
  919. X        fgets(buf,sizeof(buf),stdin);
  920. X        itmp = strlen(buf);
  921. X        buf[--itmp] = 0;
  922. X        if(itmp == 0)
  923. X            break;
  924. X        if(!(pcmd = search_cmd_list(buf)))
  925. X        {
  926. X            printf("'%s' not found in ecu cmd table\n",buf);
  927. X            continue;
  928. X        }
  929. X        if(pcmd->min && !start_pos[pcmd->token])
  930. X        {
  931. X            printf("no help available for '%s'\n",buf);
  932. X            continue;
  933. X        }
  934. X        fseek(fpdat,start_pos[pcmd->token],0);
  935. X        while(fgets(buf,sizeof(buf),fpdat) != NULL)
  936. X        {
  937. X            itmp = strlen(buf);
  938. X            buf[--itmp] = 0;
  939. X            if(itmp == 0)
  940. X                break;
  941. X            printf("%s\n",buf);
  942. X        }
  943. X    }
  944. X}    /* end of test_help */
  945. X
  946. X/*+-------------------------------------------------------------------------
  947. X    main(argc,argv,envp)
  948. X--------------------------------------------------------------------------*/
  949. Xmain(argc,argv,envp)
  950. Xint        argc;
  951. Xchar    **argv;
  952. Xchar    **envp;
  953. X{
  954. Xregister int itmp;
  955. Xregister char *cptr;
  956. Xint        iargv;
  957. Xint        b_flag = 0;
  958. Xint        s_flag = 0;
  959. Xint        t_flag = 0;
  960. Xint        f_flag = 0;
  961. Xint        d_flag = 0;
  962. Xint        n_flag = 0;
  963. X
  964. X    setbuf(stdout,NULL);
  965. X    setbuf(stderr,NULL);
  966. X
  967. X    if(argc < 1)
  968. X        usage();
  969. X    for(iargv = 1; iargv < argc; iargv++)
  970. X    {
  971. X        if(argv[iargv][0] == '-')
  972. X        {
  973. X            switch(itmp = (argv[iargv][1]))
  974. X            {
  975. X                case 'b': b_flag = 1; break;
  976. X                case 's': s_flag = 1; break;
  977. X                case 't': t_flag = 1; break;
  978. X                case 'd': d_flag = 1; break;
  979. X                case 'n': n_flag = 1; break;
  980. X                default:
  981. X                    usage();
  982. X                    break;
  983. X            }
  984. X        }
  985. X        else
  986. X            usage();
  987. X    }
  988. X    if(!b_flag && !s_flag && !t_flag && !d_flag && !n_flag && !f_flag)
  989. X        usage();
  990. X
  991. X    if(b_flag)
  992. X        build_ecuhelp();
  993. X    if(d_flag)
  994. X        build_ecudoc();
  995. X    if(n_flag)
  996. X        build_ecutxt();
  997. X    if(s_flag)
  998. X        show_cmds();
  999. X    if(t_flag)
  1000. X        test_help();
  1001. X
  1002. X    exit(0);
  1003. X}    /* end of main */
  1004. X/* end of helpgen.c */
  1005. X/* vi: set tabstop=4 shiftwidth=4: */
  1006. SHAR_EOF
  1007. $TOUCH -am 0507233390 help/helpgen.c &&
  1008. chmod 0644 help/helpgen.c ||
  1009. echo "restore of help/helpgen.c failed"
  1010. set `wc -c help/helpgen.c`;Wc_c=$1
  1011. if test "$Wc_c" != "11238"; then
  1012.     echo original size 11238, current size $Wc_c
  1013. fi
  1014. # ============= help/util.c ==============
  1015. echo "x - extracting help/util.c (Text)"
  1016. sed 's/^X//' << 'SHAR_EOF' > help/util.c &&
  1017. X/* CHK=0x7C8D */
  1018. X/*+-------------------------------------------------------------------------
  1019. X    util.c
  1020. X    wht%n4hgf@gatech.edu
  1021. X--------------------------------------------------------------------------*/
  1022. X/*+:EDITS:*/
  1023. X/*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
  1024. X/*:03-25-1990-14:12-wht@n4hgf------- ecu x2.70 -------- */
  1025. X/*:07-03-1989-22:58-wht------ x2.00 ----- */
  1026. X/*:05-08-1989-15:52-wht-creation */
  1027. X
  1028. X#include "lint_args.h"
  1029. X
  1030. X/*+-------------------------------------------------------------------------
  1031. X    all touuper/tolower not created equally, so this works!
  1032. X--------------------------------------------------------------------------*/
  1033. Xchar to_upper(ch)
  1034. Xregister char    ch;
  1035. X{ return( ((ch >= 'a') && (ch <= 'z')) ? ch - 0x20 : ch);
  1036. X}   /* end of to_upper() */
  1037. X
  1038. Xchar to_lower(ch)
  1039. Xregister char    ch;
  1040. X{ return( ((ch >= 'A') && (ch <= 'Z')) ? ch + 0x20 : ch);
  1041. X}   /* end of to_lower() */
  1042. X
  1043. X
  1044. X/*+-----------------------------------------------------------------------
  1045. X    pad_zstr_to_len(zstr,len)
  1046. X
  1047. X  pads with spaces to specified length, unless already longer than
  1048. X  len in which case the string is truncated to 'len' characters.
  1049. X------------------------------------------------------------------------*/
  1050. Xvoid
  1051. Xpad_zstr_to_len(zstr,len)
  1052. Xchar    *zstr;
  1053. Xint        len;
  1054. X{
  1055. Xregister int    izstr;
  1056. X
  1057. X    izstr = strlen(zstr);
  1058. X    if(izstr >= len)
  1059. X        zstr[len] = 0;
  1060. X    else
  1061. X    {
  1062. X        while(izstr < len)
  1063. X            zstr[izstr++] = 0x20;
  1064. X        zstr[izstr] = 0;
  1065. X    }
  1066. X}    /* end of pad_zstr_to_len */
  1067. X
  1068. SHAR_EOF
  1069. $TOUCH -am 0507233390 help/util.c &&
  1070. chmod 0644 help/util.c ||
  1071. echo "restore of help/util.c failed"
  1072. set `wc -c help/util.c`;Wc_c=$1
  1073. if test "$Wc_c" != "1442"; then
  1074.     echo original size 1442, current size $Wc_c
  1075. fi
  1076. # ============= ecufriend/Makefile ==============
  1077. if test ! -d 'ecufriend'; then
  1078.     echo "x - creating directory ecufriend"
  1079.     mkdir 'ecufriend'
  1080. fi
  1081. echo "x - extracting ecufriend/Makefile (Text)"
  1082. sed 's/^X//' << 'SHAR_EOF' > ecufriend/Makefile &&
  1083. X#  CHK=0x8D0A
  1084. X#----------------------------------------------------------------
  1085. X# Makefile for sample ecufriend
  1086. X# wht%n4hgf@gatech.edu
  1087. X#----------------------------------------------------------------
  1088. X#+:EDITS:*/
  1089. X#:05-07-1990-21:21-wht@n4hgf-omit fcrc usage in release makes
  1090. X#:01-03-1990-15:30-wht-quit using -Ox --- Oi screws up too much
  1091. X#:11-23-1989-02:37-wht-start support for UNIX V/386
  1092. X#:11-19-1989-18:06-wht-creation
  1093. X
  1094. Xecufriend: ecufriend.c
  1095. X    cc -O `sysdep =M_I286 -M2e =M_I386` ecufriend.c -o $@
  1096. SHAR_EOF
  1097. $TOUCH -am 0507233390 ecufriend/Makefile &&
  1098. chmod 0644 ecufriend/Makefile ||
  1099. echo "restore of ecufriend/Makefile failed"
  1100. set `wc -c ecufriend/Makefile`;Wc_c=$1
  1101. if test "$Wc_c" != "502"; then
  1102.     echo original size 502, current size $Wc_c
  1103. fi
  1104. # ============= ecufriend/ecufriend.c ==============
  1105. echo "x - extracting ecufriend/ecufriend.c (Text)"
  1106. sed 's/^X//' << 'SHAR_EOF' > ecufriend/ecufriend.c &&
  1107. X/* CHK=0xE205 */
  1108. X#define DUMP_SCREEN
  1109. X/*+-------------------------------------------------------------------------
  1110. X    ecufriend.c -- example of using ecu shared memory access
  1111. X    wht%n4hgf@gatech.edu
  1112. X
  1113. XExecute by ecu procedure command:  system -s 'ecufriend '+%itos(%shmid)
  1114. XTo manually execute for perusal, do an ipcs command to find the
  1115. Xshared memory id or HOME pc echo 'shmid='+%itos(%shmid)
  1116. XThen HOME >ecufriend # where # is replaced by the shmid
  1117. X--------------------------------------------------------------------------*/
  1118. X/*+:EDITS:*/
  1119. X/*:03-25-1990-14:12-wht@n4hgf------- ecu x2.70 -------- */
  1120. X/*:11-11-1989-18:50-wht-creation */
  1121. X
  1122. X#include <stdio.h>
  1123. X#include <signal.h>
  1124. X#include <termio.h>
  1125. X#include <sys/errno.h>
  1126. X#include <sys/types.h>
  1127. X#include <sys/stat.h>
  1128. X#include <time.h>
  1129. X#include <sys/ipc.h>
  1130. X#include <sys/msg.h>
  1131. X#include <sys/shm.h>
  1132. X#include "../ecushm.h"
  1133. X
  1134. XECU_SDS FAR *shm;        /* shared segment pointer */
  1135. Xint shmid;                /* sharged segment id */
  1136. X
  1137. X/*+-------------------------------------------------------------------------
  1138. X    main(argc,argv,envp)
  1139. X--------------------------------------------------------------------------*/
  1140. Xmain(argc,argv,envp)
  1141. Xint argc;
  1142. Xchar **argv;
  1143. Xchar **envp;
  1144. X{
  1145. Xregister itmp;
  1146. X#ifdef DUMP_SCREEN
  1147. Xint row,col;
  1148. Xunsigned char sch;
  1149. X#endif
  1150. X
  1151. X    if(argc < 2)
  1152. X    {
  1153. X        printf("usage: ecufriend <ecu-shmid>\n");
  1154. X            exit(255);
  1155. X    }
  1156. X    shmid = atoi(argv[1]);
  1157. X
  1158. X    if((shm = (ECU_SDS FAR *)shmat(shmid,(char FAR *)0,SHM_RDONLY))
  1159. X            == (ECU_SDS FAR *)-1)
  1160. X    {
  1161. X        perror("shmat");
  1162. X        exit(1);
  1163. X    }
  1164. X
  1165. X    printf("ecu shm address = %08lx shmid=%d revision=%08lx\n",
  1166. X        shm,shmid,shm->shm_revision);
  1167. X
  1168. X    if(shm->shm_revision != SHM_REV)
  1169. X    {
  1170. X        printf("incompatible shared memory revision (compiled with %08lx)\n",
  1171. X            SHM_REV);
  1172. X        exit(1);
  1173. X    }
  1174. X
  1175. X    printf("xmit chars=%lu rcvd chars=%lu\n",
  1176. X        shm->xmit_chars,shm->rcvd_chars);
  1177. X    printf("The receive cursor position is at column %d row %d\n",
  1178. X        shm->cursor_y,shm->cursor_x);
  1179. X
  1180. X    printf("If this program was not executed by a shell that closed it,\n");
  1181. X    printf("then fd %d is available to us to write and read from the line.\n",
  1182. X        shm->Liofd);
  1183. X
  1184. X    if(isatty(shm->Liofd))
  1185. X        printf("It is available.\n");
  1186. X    else
  1187. X        printf("It is not available. Even so, we could re-open %s here\n",
  1188. X            shm->Lline);
  1189. X
  1190. X    if(shm->Lmodem_off_hook)
  1191. X        printf("Hmmm.. we seem to be connected to %s at %s\n",
  1192. X            shm->Ldescr,shm->Ltelno);
  1193. X
  1194. X#ifdef DUMP_SCREEN
  1195. X    printf("screen dump\n");
  1196. X    printf("-----------\n");
  1197. X    for(row = 0; row < 43; row++)
  1198. X    {
  1199. X        for(col = 0; col < 79; col++)
  1200. X        {
  1201. X            sch = shm->screen[row][col];
  1202. X            if((sch < 0x20) && (sch > 0x7E))
  1203. X                putc('.',stdout);
  1204. X            else
  1205. X                putc(sch,stdout);
  1206. X        }
  1207. X        putc('\n',stdout);
  1208. X    }
  1209. X#endif
  1210. X
  1211. X    exit(0);
  1212. X}    /* end of main */
  1213. X
  1214. X/* vi: set tabstop=4 shiftwidth=4: */
  1215. X/* end of ecufriend.c */
  1216. SHAR_EOF
  1217. $TOUCH -am 0507233390 ecufriend/ecufriend.c &&
  1218. chmod 0644 ecufriend/ecufriend.c ||
  1219. echo "restore of ecufriend/ecufriend.c failed"
  1220. set `wc -c ecufriend/ecufriend.c`;Wc_c=$1
  1221. if test "$Wc_c" != "2713"; then
  1222.     echo original size 2713, current size $Wc_c
  1223. fi
  1224. # ============= ecuungetty/Makefile ==============
  1225. if test ! -d 'ecuungetty'; then
  1226.     echo "x - creating directory ecuungetty"
  1227.     mkdir 'ecuungetty'
  1228. fi
  1229. echo "x - extracting ecuungetty/Makefile (Text)"
  1230. sed 's/^X//' << 'SHAR_EOF' > ecuungetty/Makefile &&
  1231. X#  CHK=0xC221
  1232. X#+---------------------------------------------------------------
  1233. X# makefile for ecuungetty
  1234. X# must be root to run make install
  1235. X# this make file should be run only by the master ecu Makefile,
  1236. X# or else you must define LCRYPT as needed herein
  1237. X#----------------------------------------------------------------
  1238. X#+:EDITS:*/
  1239. X#:05-07-1990-21:21-wht@n4hgf-omit fcrc usage in release makes
  1240. X#:01-03-1990-15:30-wht-quit using -Ox --- Oi screws up too much
  1241. X#:11-23-1989-02:37-wht-start support for UNIX V/386
  1242. X#:11-02-1989-16:00-wht-unet2 release
  1243. X
  1244. XCFLAGS = `sysdep =M_I386 -O =M_I286 -O -M2le`
  1245. X
  1246. XOBJ = \
  1247. X    ../ecuuclc.o\
  1248. X    ../ecuLCK.o\
  1249. X    ../utmpstat.o\
  1250. X    ../bamboozle.o\
  1251. X    ecuungetty.o
  1252. X
  1253. Xall: ecuungetty
  1254. X
  1255. Xecuungetty: $(OBJ)
  1256. X    cc $(CFLAGS) $(OBJ) -o ecuungetty $(LCRYPT) -lx
  1257. X
  1258. Xinstall: ecuungetty
  1259. X    -mkdir /usr/lib/ecu
  1260. X    cp ecuungetty /usr/lib/ecu
  1261. X    chown root /usr/lib/ecu/ecuungetty
  1262. X    chmod u+s /usr/lib/ecu/ecuungetty
  1263. X
  1264. X../bamboozle.o: ../bamboozle.c
  1265. X    cd ..;make bamboozle.o
  1266. X
  1267. X../utmpstat.o: ../utmpstat.c
  1268. X    cd ..;make utmpstat.o
  1269. X
  1270. X../ecuuclc.o: ../ecuuclc.c
  1271. X    cd ..;make ecuuclc.o
  1272. X
  1273. X../ecuLCK.o: ../ecuLCK.c
  1274. X    cd ..;make ecuLCK.o
  1275. X
  1276. SHAR_EOF
  1277. $TOUCH -am 0507232890 ecuungetty/Makefile &&
  1278. chmod 0644 ecuungetty/Makefile ||
  1279. echo "restore of ecuungetty/Makefile failed"
  1280. set `wc -c ecuungetty/Makefile`;Wc_c=$1
  1281. if test "$Wc_c" != "1114"; then
  1282.     echo original size 1114, current size $Wc_c
  1283. fi
  1284. # ============= ecuungetty/ecuungetty.c ==============
  1285. echo "x - extracting ecuungetty/ecuungetty.c (Text)"
  1286. sed 's/^X//' << 'SHAR_EOF' > ecuungetty/ecuungetty.c &&
  1287. X/* CHK=0xDA53 */
  1288. X/*+-------------------------------------------------------------------------
  1289. X    ecuungetty.c - ecu "ungetty" program
  1290. X    wht%n4hgf@gatech.edu
  1291. X
  1292. Xecuungetty /dev/ttyxx <bamboozle-str>
  1293. Xecuungetty -t /dev/ttyxx <bamboozle-str>
  1294. Xecuungetty -r /dev/ttyxx <bamboozle-str>
  1295. X
  1296. X  Defined functions:
  1297. X    ecu_log_event(logstr)
  1298. X    errno_text(errnum)
  1299. X    hangup()
  1300. X    main(argc,argv,envp)
  1301. X
  1302. X--------------------------------------------------------------------------*/
  1303. X/*+:EDITS:*/
  1304. X/*:03-27-1990-14:05-wht@n4hgf-retry kill SIGUSR2 up to five times */
  1305. X/*:03-25-1990-14:12-wht@n4hgf------- ecu x2.70 -------- */
  1306. X/*:11-24-1989-21:18-wht-use common utmpstat.c - UNIX upgrade */
  1307. X/*:07-03-1989-22:58-wht------ x2.00 ----- */
  1308. X/*:06-29-1989-17:19-wht-creation */
  1309. X
  1310. X#include <stdio.h>
  1311. X#include <ctype.h>
  1312. X#include <fcntl.h>
  1313. X#include <errno.h>
  1314. X#include <signal.h>
  1315. X#include <sys/types.h>
  1316. X#include <sys/stat.h>
  1317. X#include <utmp.h>
  1318. X#include "../stdio_lint.h"
  1319. X#include "../ecuungetty.h"
  1320. X#include "../utmpstatus.h"
  1321. X
  1322. Xextern struct utmp last_utmp;
  1323. X
  1324. X/*+-------------------------------------------------------------------------
  1325. X    ecu_log_event(logstr) - dummy procedure for utmpstat.o
  1326. X--------------------------------------------------------------------------*/
  1327. Xvoid
  1328. Xecu_log_event(logstr)
  1329. Xchar *logstr;
  1330. X{
  1331. X    ;
  1332. X}    /* end of ecu_log_event */
  1333. X
  1334. X/*+-------------------------------------------------------------------------
  1335. X    hangup() - "dummy" for utmpstat.c
  1336. XThis particular incantation will only be called if utmp is non-existent
  1337. Xor not readable.......
  1338. X--------------------------------------------------------------------------*/
  1339. Xhangup()
  1340. X{
  1341. X    exit(UGE_NOTROOT);
  1342. X}    /* end of hangup */
  1343. X
  1344. X/*+-------------------------------------------------------------------------
  1345. X    errno_text(errnum)
  1346. X--------------------------------------------------------------------------*/
  1347. Xchar *
  1348. Xerrno_text(errnum)
  1349. Xint errnum;
  1350. X{
  1351. Xstatic char errstr[12];
  1352. X    sprintf(errstr,"E%d\n",errnum);
  1353. X    return(errstr);
  1354. X}    /* end of errno_text */
  1355. X
  1356. X/*+-------------------------------------------------------------------------
  1357. X    main(argc,argv,envp)
  1358. X--------------------------------------------------------------------------*/
  1359. Xmain(argc,argv,envp)
  1360. Xint argc;
  1361. Xchar **argv;
  1362. Xchar **envp;
  1363. X{
  1364. Xint op = 'g';    /* assume "get" operation */
  1365. Xint status;
  1366. Xint itmp;
  1367. Xchar *tty = argv[1];
  1368. Xchar *bamboozlement = argv[2];
  1369. Xchar *bamboozle();
  1370. X
  1371. X    if(geteuid() != 0)
  1372. X        exit(UGE_NOTROOT);
  1373. X
  1374. X    if(*argv[1] == '-')
  1375. X    {
  1376. X        switch(op = *(argv[1] + 1))
  1377. X        {
  1378. X            case 'r':
  1379. X            case 't':
  1380. X                break;
  1381. X            default:
  1382. X                exit(UGE_BADSWITCH);
  1383. X        }
  1384. X        if(argc < 3)
  1385. X            exit(UGE_BADARGC);
  1386. X        tty = argv[2];
  1387. X        bamboozlement = argv[3];
  1388. X    }
  1389. X    else if(argc <= 2)
  1390. X        exit(UGE_BADARGC);
  1391. X
  1392. X    if(getuid() != 0)
  1393. X    {
  1394. X        if(strcmp(bamboozlement,bamboozle(getppid())))
  1395. X            exit(UGE_CALLER);
  1396. X    }
  1397. X
  1398. X    status = utmp_status(tty);
  1399. X
  1400. X    switch(op)
  1401. X    {
  1402. X        case 'g':
  1403. X            switch(status)
  1404. X            {
  1405. X                case US_NOTFOUND:    /* not in utmp, or getty dead */
  1406. X                    exit(UG_NOTENAB);
  1407. X                case US_LOGIN:        /* enabled for login, idle */
  1408. X                    kill(last_utmp.ut_pid,SIGUSR1);
  1409. X                    nap(200L);
  1410. X                    exit(UG_ENAB);
  1411. X                case US_DIALOUT:    /* enabled for login, currently dialout */
  1412. X                case US_LOGGEDIN:    /* enabled for login, in use */
  1413. X                    exit(UG_FAIL);
  1414. X            }
  1415. X            break;
  1416. X
  1417. X        case 't':
  1418. X            switch(status)
  1419. X            {
  1420. X                case US_NOTFOUND:    /* not in utmp, or getty dead */
  1421. X                    exit(UGE_T_NOTFOUND);
  1422. X                case US_LOGIN:        /* enabled for login, idle */
  1423. X                    exit(UGE_T_LOGIN);
  1424. X                case US_LOGGEDIN:    /* enabled for login, in use */
  1425. X                    exit(UGE_T_LOGGEDIN);
  1426. X                case US_DIALOUT:    /* enabled for login, currently dialout */
  1427. X                    exit(UG_RESTART);
  1428. X            }
  1429. X            break;
  1430. X
  1431. X        case 'r':
  1432. X            switch(status)
  1433. X            {
  1434. X                case US_NOTFOUND:    /* not in utmp, or getty dead */
  1435. X                case US_LOGIN:        /* enabled for login, idle */
  1436. X                case US_LOGGEDIN:    /* enabled for login, in use */
  1437. X                    exit(0);
  1438. X                case US_DIALOUT:    /* enabled for login, currently dialout */
  1439. X                    itmp = 5;
  1440. X                    while(itmp--)
  1441. X                    {
  1442. X                        if(kill(last_utmp.ut_pid,SIGUSR2))
  1443. X                            break;
  1444. X                        nap(100L);
  1445. X                    }
  1446. X                    exit(0);
  1447. X            }
  1448. X            break;
  1449. X    }
  1450. X    exit(0);
  1451. X}    /* end of main */
  1452. X
  1453. X/* vi: set tabstop=4 shiftwidth=4: */
  1454. X/* end of ecuungetty.c */
  1455. SHAR_EOF
  1456. $TOUCH -am 0507233390 ecuungetty/ecuungetty.c &&
  1457. chmod 0644 ecuungetty/ecuungetty.c ||
  1458. echo "restore of ecuungetty/ecuungetty.c failed"
  1459. set `wc -c ecuungetty/ecuungetty.c`;Wc_c=$1
  1460. if test "$Wc_c" != "4048"; then
  1461.     echo original size 4048, current size $Wc_c
  1462. fi
  1463. # ============= mapkey/README ==============
  1464. if test ! -d 'mapkey'; then
  1465.     echo "x - creating directory mapkey"
  1466.     mkdir 'mapkey'
  1467. fi
  1468. echo "x - extracting mapkey/README (Text)"
  1469. sed 's/^X//' << 'SHAR_EOF' > mapkey/README &&
  1470. XThis file contains information necessary to map ALT-A through ALT-Z
  1471. Xin accordance with ecuxkey.h to produce unique codes so that
  1472. XALT-[A-Z] can cause ECU to execute procedures with a single keystroke.
  1473. X
  1474. XModify your /usr/lib/keyboard/keys value for the ALT values for
  1475. Xkey codes matching keys [a-z] as follows:
  1476. X
  1477. X                                ALT-unshifted
  1478. X                                     |
  1479. X                                     V
  1480. X
  1481. X    16    'q'    'Q'    dc1    dc1    144    'Q'      dc1     dc1     C
  1482. X    17    'w'    'W'    etb    etb    150       'W'      etb     etb     C
  1483. X    18    'e'    'E'    enq    enq    132       'E'      enq     enq     C
  1484. X    19    'r'    'R'    dc2    dc2    145       'R'      dc2     dc2     C
  1485. X    20    't'    'T'    dc4    dc4    147       'T'      dc4     dc4     C
  1486. X    21    'y'    'Y'    em     em        152       'Y'      em     em     C
  1487. X    22    'u'    'U'    nak    nak    148       'U'      nak     nak     C
  1488. X    23    'i'    'I'    ht     ht        136       'I'      ht     ht     C
  1489. X    24    'o'    'O'    si     si        142       'O'      si     si     C
  1490. X    25    'p'    'P'    dle    dle    143       'P'      dle     dle     C
  1491. X    30    'a'    'A'    soh    soh    128       'A'      soh     soh     C
  1492. X    31    's'    'S'    dc3    dc3    146       'S'      dc3     dc3     C
  1493. X    32    'd'    'D'    eot    eot    131       'D'      eot     eot     C
  1494. X    33    'f'    'F'    ack    ack    133       'F'      ack     ack     C
  1495. X    34    'g'    'G'    bel    bel    134       'G'      bel     bel     C
  1496. X    35    'h'    'H'    bs     bs        135       'H'      bs     bs     C
  1497. X    36    'j'    'J'    nl     nl        137       'J'      nl     nl     C
  1498. X    37    'k'    'K'    vt     vt        138       'K'      vt     vt     C
  1499. X    38    'l'    'L'    np     np        139       'L'      np     np     C
  1500. X    44    'z'    'Z'    sub    sub    153       'Z'      sub     sub     C
  1501. X    45    'x'    'X'    can    can    151       'X'      can     can     C
  1502. X    46    'c'    'C'    etx    etx    130       'C'      etx     etx     C
  1503. X    47    'v'    'V'    syn    syn    149       'V'      syn     syn     C
  1504. X    48    'b'    'B'    stx    stx    129       'B'      stx     stx     C
  1505. X    49    'n'    'N'    so     so        141       'N'      so     so     C
  1506. X    50    'm'    'M'    cr     cr        140       'M'      cr     cr     C
  1507. X
  1508. X
  1509. XA diff file for at.ibm.usa is supplied in keys.usa.ecu.d
  1510. X
  1511. X
  1512. Xvi fodder:
  1513. Xvi:set ts=8:
  1514. SHAR_EOF
  1515. $TOUCH -am 0509094590 mapkey/README &&
  1516. chmod 0644 mapkey/README ||
  1517. echo "restore of mapkey/README failed"
  1518. set `wc -c mapkey/README`;Wc_c=$1
  1519. if test "$Wc_c" != "2060"; then
  1520.     echo original size 2060, current size $Wc_c
  1521. fi
  1522. # ============= mapkey/keys.usa.ecu.d ==============
  1523. echo "x - extracting mapkey/keys.usa.ecu.d (Text)"
  1524. sed 's/^X//' << 'SHAR_EOF' > mapkey/keys.usa.ecu.d &&
  1525. XThe mapkey files are marked Confidential :-/, so diffs are supplied.
  1526. X
  1527. X*** /usr/lib/keyboard/at.ibm.usa    Sat Jun 17 00:23:55 1989
  1528. X--- keys.usa.ecu    Wed May  9 09:42:18 1990
  1529. X***************
  1530. X*** 39,54
  1531. X      13    '='    '+'    nop    nop    '='       '+'      nop     nop     O
  1532. X      14    bs     bs     del    del    bs       bs      del     del     O
  1533. X      15    ht     btab   nop    nop    ht       btab      nop     nop     O
  1534. X!     16    'q'    'Q'    dc1    dc1    'q'       'Q'      dc1     dc1     C
  1535. X!     17    'w'    'W'    etb    etb    'w'       'W'      etb     etb     C
  1536. X!     18    'e'    'E'    enq    enq    'e'       'E'      enq     enq     C
  1537. X!     19    'r'    'R'    dc2    dc2    'r'       'R'      dc2     dc2     C
  1538. X!     20    't'    'T'    dc4    dc4    't'       'T'      dc4     dc4     C
  1539. X!     21    'y'    'Y'    em     em        'y'       'Y'      em     em     C
  1540. X!     22    'u'    'U'    nak    nak    'u'       'U'      nak     nak     C
  1541. X!     23    'i'    'I'    ht     ht        'i'       'I'      ht     ht     C
  1542. X!     24    'o'    'O'    si     si        'o'       'O'      si     si     C
  1543. X!     25    'p'    'P'    dle    dle    'p'       'P'      dle     dle     C
  1544. X      26    '['    '{'    esc    esc    '['       '{'      esc     esc     O
  1545. X      27    ']'    '}'    gs     gs        ']'       '}'      gs     gs     O
  1546. X      28    cr     cr     nl     nl        cr       cr      nl     nl     O
  1547. X
  1548. X--- 39,54 -----
  1549. X      13    '='    '+'    nop    nop    '='       '+'      nop     nop     O
  1550. X      14    bs     bs     del    del    bs       bs      del     del     O
  1551. X      15    ht     btab   nop    nop    ht       btab      nop     nop     O
  1552. X!     16    'q'    'Q'    dc1    dc1    144    'Q'      dc1     dc1     C
  1553. X!     17    'w'    'W'    etb    etb    150       'W'      etb     etb     C
  1554. X!     18    'e'    'E'    enq    enq    132       'E'      enq     enq     C
  1555. X!     19    'r'    'R'    dc2    dc2    145       'R'      dc2     dc2     C
  1556. X!     20    't'    'T'    dc4    dc4    147       'T'      dc4     dc4     C
  1557. X!     21    'y'    'Y'    em     em        152       'Y'      em     em     C
  1558. X!     22    'u'    'U'    nak    nak    148       'U'      nak     nak     C
  1559. X!     23    'i'    'I'    ht     ht        136       'I'      ht     ht     C
  1560. X!     24    'o'    'O'    si     si        142       'O'      si     si     C
  1561. X!     25    'p'    'P'    dle    dle    143       'P'      dle     dle     C
  1562. X      26    '['    '{'    esc    esc    '['       '{'      esc     esc     O
  1563. X      27    ']'    '}'    gs     gs        ']'       '}'      gs     gs     O
  1564. X      28    cr     cr     nl     nl        cr       cr      nl     nl     O
  1565. X***************
  1566. X*** 53,67
  1567. X      27    ']'    '}'    gs     gs        ']'       '}'      gs     gs     O
  1568. X      28    cr     cr     nl     nl        cr       cr      nl     nl     O
  1569. X      29    lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl     lctrl     O
  1570. X!     30    'a'    'A'    soh    soh    'a'       'A'      soh     soh     C
  1571. X!     31    's'    'S'    dc3    dc3    's'       'S'      dc3     dc3     C
  1572. X!     32    'd'    'D'    eot    eot    'd'       'D'      eot     eot     C
  1573. X!     33    'f'    'F'    ack    ack    'f'       'F'      ack     ack     C
  1574. X!     34    'g'    'G'    bel    bel    'g'       'G'      bel     bel     C
  1575. X!     35    'h'    'H'    bs     bs        'h'       'H'      bs     bs     C
  1576. X!     36    'j'    'J'    nl     nl        'j'       'J'      nl     nl     C
  1577. X!     37    'k'    'K'    vt     vt        'k'       'K'      vt     vt     C
  1578. X!     38    'l'    'L'    np     np        'l'       'L'      np     np     C
  1579. X      39    ';'    ':'    nop    nop    ';'       ':'      nop     nop     O
  1580. X      40    '\''   '"'    nop    nop    '\''   '"'      nop     nop     O
  1581. X      41    '`'    '~'    nop    nop    '`'       '~'      nop     nop     O
  1582. X
  1583. X--- 53,67 -----
  1584. X      27    ']'    '}'    gs     gs        ']'       '}'      gs     gs     O
  1585. X      28    cr     cr     nl     nl        cr       cr      nl     nl     O
  1586. X      29    lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl     lctrl     O
  1587. X!     30    'a'    'A'    soh    soh    128       'A'      soh     soh     C
  1588. X!     31    's'    'S'    dc3    dc3    146       'S'      dc3     dc3     C
  1589. X!     32    'd'    'D'    eot    eot    131       'D'      eot     eot     C
  1590. X!     33    'f'    'F'    ack    ack    133       'F'      ack     ack     C
  1591. X!     34    'g'    'G'    bel    bel    134       'G'      bel     bel     C
  1592. X!     35    'h'    'H'    bs     bs        135       'H'      bs     bs     C
  1593. X!     36    'j'    'J'    nl     nl        137       'J'      nl     nl     C
  1594. X!     37    'k'    'K'    vt     vt        138       'K'      vt     vt     C
  1595. X!     38    'l'    'L'    np     np        139       'L'      np     np     C
  1596. X      39    ';'    ':'    nop    nop    ';'       ':'      nop     nop     O
  1597. X      40    '\''   '"'    nop    nop    '\''   '"'      nop     nop     O
  1598. X      41    '`'    '~'    nop    nop    '`'       '~'      nop     nop     O
  1599. X***************
  1600. X*** 67,79
  1601. X      41    '`'    '~'    nop    nop    '`'       '~'      nop     nop     O
  1602. X      42    lshift lshift lshift lshift lshift lshift lshift lshift     O
  1603. X      43    '\\'   '|'    fs     fs        '\\'   '|'      fs     fs     O
  1604. X!     44    'z'    'Z'    sub    sub    'z'       'Z'      sub     sub     C
  1605. X!     45    'x'    'X'    can    can    'x'       'X'      can     can     C
  1606. X!     46    'c'    'C'    etx    etx    'c'       'C'      etx     etx     C
  1607. X!     47    'v'    'V'    syn    syn    'v'       'V'      syn     syn     C
  1608. X!     48    'b'    'B'    stx    stx    'b'       'B'      stx     stx     C
  1609. X!     49    'n'    'N'    so     so        'n'       'N'      so     so     C
  1610. X!     50    'm'    'M'    cr     cr        'm'       'M'      cr     cr     C
  1611. X      51    ','    '<'    nop    nop    ','       '<'      nop     nop     O
  1612. X      52    '.'    '>'    nop    nop    '.'       '>'      nop     nop     O
  1613. X      53    '/'    '?'    nop    nop    '/'       '?'      nop     nop     O
  1614. X
  1615. X--- 67,79 -----
  1616. X      41    '`'    '~'    nop    nop    '`'       '~'      nop     nop     O
  1617. X      42    lshift lshift lshift lshift lshift lshift lshift lshift     O
  1618. X      43    '\\'   '|'    fs     fs        '\\'   '|'      fs     fs     O
  1619. X!     44    'z'    'Z'    sub    sub    153       'Z'      sub     sub     C
  1620. X!     45    'x'    'X'    can    can    151       'X'      can     can     C
  1621. X!     46    'c'    'C'    etx    etx    130       'C'      etx     etx     C
  1622. X!     47    'v'    'V'    syn    syn    149       'V'      syn     syn     C
  1623. X!     48    'b'    'B'    stx    stx    129       'B'      stx     stx     C
  1624. X!     49    'n'    'N'    so     so        141       'N'      so     so     C
  1625. X!     50    'm'    'M'    cr     cr        140       'M'      cr     cr     C
  1626. X      51    ','    '<'    nop    nop    ','       '<'      nop     nop     O
  1627. X      52    '.'    '>'    nop    nop    '.'       '>'      nop     nop     O
  1628. X      53    '/'    '?'    nop    nop    '/'       '?'      nop     nop     O
  1629. SHAR_EOF
  1630. $TOUCH -am 0509094390 mapkey/keys.usa.ecu.d &&
  1631. chmod 0644 mapkey/keys.usa.ecu.d ||
  1632. echo "restore of mapkey/keys.usa.ecu.d failed"
  1633. set `wc -c mapkey/keys.usa.ecu.d`;Wc_c=$1
  1634. if test "$Wc_c" != "5709"; then
  1635.     echo original size 5709, current size $Wc_c
  1636. fi
  1637. echo "End of part 17, continue with part 18"
  1638. exit 0
  1639.  
  1640.