home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sources / misc / 3949 < prev    next >
Encoding:
Text File  |  1992-09-14  |  57.2 KB  |  1,858 lines

  1. Newsgroups: comp.sources.misc
  2. Path: sparky!kent
  3. From: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  4. Subject:  v32i057:  ecu - ECU Asynchronous Communications v3.20, Part22/40
  5. Message-ID: <1992Sep14.143731.20634@sparky.imd.sterling.com>
  6. Followup-To: comp.sources.d
  7. X-Md4-Signature: 94159be11d312a0b5e6e929766b8fd8c
  8. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  9. Organization: Sterling Software
  10. References: <csm-v32i036=ecu.141245@sparky.IMD.Sterling.COM>
  11. Date: Mon, 14 Sep 1992 14:37:31 GMT
  12. Approved: kent@sparky.imd.sterling.com
  13. Lines: 1843
  14.  
  15. Submitted-by: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  16. Posting-number: Volume 32, Issue 57
  17. Archive-name: ecu/part22
  18. Environment: SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses
  19. Supersedes: ecu: Volume 21, Issue 53-89
  20.  
  21. ---- Cut Here and feed the following to sh ----
  22. #!/bin/sh
  23. # this is ecu320.22 (part 22 of ecu320)
  24. # do not concatenate these parts, unpack them in order with /bin/sh
  25. # file var.c continued
  26. #
  27. if test ! -r _shar_seq_.tmp; then
  28.     echo 'Please unpack part 1 first!'
  29.     exit 1
  30. fi
  31. (read Scheck
  32.  if test "$Scheck" != 22; then
  33.     echo Please unpack part "$Scheck" next!
  34.     exit 1
  35.  else
  36.     exit 0
  37.  fi
  38. ) < _shar_seq_.tmp || exit 1
  39. if test ! -f _shar_wnt_.tmp; then
  40.     echo 'x - still skipping var.c'
  41. else
  42. echo 'x - continuing file var.c'
  43. sed 's/^X//' << 'SHAR_EOF' >> 'var.c' &&
  44. X
  45. Xtypedef union mkvu_type
  46. X{
  47. X    ESD    *sv;
  48. X    long iv;
  49. X} MKVU;
  50. X
  51. Xtypedef struct mkv_type
  52. X{
  53. X    MKVU item;                /* pointer to esd if sv or long if iv */
  54. X    struct mkv_type *next;    /* next MKV in chain; if NULL, no more in chain */
  55. X    struct mkv_type *prev;    /* previous MKV in chain; if NULL, top of chain */
  56. X    char *name;                /* name of variable */
  57. X} MKV;
  58. X
  59. XMKV *mkvi_last = (MKV *)0;
  60. XMKV *mkvs_last = (MKV *)0;
  61. X
  62. X/*+-------------------------------------------------------------------------
  63. X    var_init()
  64. X--------------------------------------------------------------------------*/
  65. Xvoid
  66. Xvar_init()
  67. X{
  68. Xregister itmp;
  69. X
  70. X    for(itmp = 0; itmp < SVQUAN; itmp++)
  71. X    {
  72. X        if((sv[itmp] = esdalloc(SVLEN)) == (ESD *)0)
  73. X        {
  74. X            pputs("out of memory during variable initialization\n");
  75. X            termecu(TERMECU_MALLOC);
  76. X        }
  77. X    }
  78. X
  79. X    for(itmp = 0; itmp < IVQUAN; itmp++)
  80. X        iv[itmp] = 0;
  81. X
  82. X}    /* end of var_init */
  83. X
  84. X/*+-------------------------------------------------------------------------
  85. X    alloc_MKV(name)
  86. X--------------------------------------------------------------------------*/
  87. XMKV *
  88. Xalloc_MKV(name)
  89. Xchar *name;
  90. X{
  91. XMKV *mkv;
  92. X    if(!(mkv = (MKV *)malloc(sizeof(MKV))))
  93. X        return((MKV *)0);
  94. X    if(!(mkv->name = malloc(strlen(name) + 1)))
  95. X    {
  96. X        free((char *)mkv);
  97. X        return((MKV *)0);
  98. X    }
  99. X    strcpy(mkv->name,name);
  100. X    mkv->item.iv = 0;
  101. X    return(mkv);
  102. X}    /* end of alloc_MKV */
  103. X
  104. X/*+-------------------------------------------------------------------------
  105. X    build_mkvi_primitive(name)
  106. X--------------------------------------------------------------------------*/
  107. Xbuild_mkvi_primitive(name)
  108. Xchar *name;
  109. X{
  110. XMKV *mkv;
  111. X
  112. X    if((mkv = alloc_MKV(name)) == (MKV *)0)
  113. X        return(eNoMemory);
  114. X    if(mkvi_last)
  115. X        mkvi_last->next = mkv;
  116. X    mkv->prev = mkvi_last;
  117. X    mkv->next = (MKV *)0;
  118. X    mkvi_last = mkv;
  119. X    return(0);
  120. X}    /* end of build_mkvi_primitive */
  121. X
  122. X/*+-------------------------------------------------------------------------
  123. X    build_mkvi(param)
  124. X--------------------------------------------------------------------------*/
  125. Xbuild_mkvi(param)
  126. XESD *param;
  127. X{
  128. Xregister erc;
  129. Xchar name[16];
  130. X
  131. X    if(erc = get_alphanum_zstr(param,name,sizeof(name)))
  132. X        return(erc);
  133. X    return(build_mkvi_primitive(name));
  134. X
  135. X}    /* end of build_mkvi */
  136. X
  137. X/*+-------------------------------------------------------------------------
  138. X    build_mkvs_primitive(name,length)
  139. X
  140. Xtrusts caller not to exceed ESD_MAXSIZE
  141. X--------------------------------------------------------------------------*/
  142. Xbuild_mkvs_primitive(name,length)
  143. Xchar *name;
  144. Xint length;
  145. X{
  146. XMKV *mkv;
  147. XESD *text;
  148. X
  149. X    if((text = esdalloc((int)length)) == (ESD *)0)
  150. X        return(eNoMemory);
  151. X
  152. X    if((mkv = alloc_MKV(name)) == (MKV *)0)
  153. X    {
  154. X        esdfree(text);
  155. X        return(eNoMemory);
  156. X    }
  157. X
  158. X    mkv->item.sv = text;
  159. X
  160. X    if(mkvs_last)
  161. X        mkvs_last->next = mkv;
  162. X    mkv->prev = mkvs_last;
  163. X    mkv->next = (MKV *)0;
  164. X    mkvs_last = mkv;
  165. X    return(0);
  166. X
  167. X}    /* end of build_mkvs_primitive */
  168. X
  169. X/*+-------------------------------------------------------------------------
  170. X    build_mkvs(param)
  171. X--------------------------------------------------------------------------*/
  172. Xbuild_mkvs(param)
  173. XESD *param;
  174. X{
  175. Xregister erc;
  176. Xchar name[16];
  177. Xulong length;
  178. X
  179. X    if(erc = get_alphanum_zstr(param,name,sizeof(name)))
  180. X        return(erc);
  181. X
  182. X    if(erc = skip_paren(param,1))
  183. X        return(erc);
  184. X    if(erc = gint(param,&length))
  185. X        return(erc);
  186. X    if(length > ESD_MAXSIZE)
  187. X    {
  188. X        pprintf("max string size is %d ... cannot make %lu byte string\n",
  189. X            ESD_MAXSIZE,length);
  190. X        return(eFATAL_ALREADY);
  191. X    }
  192. X    if(erc = skip_paren(param,0))
  193. X        return(erc);
  194. X
  195. X    return(build_mkvs_primitive(name,(int)length));
  196. X
  197. X}    /* end of build_mkvs */
  198. X
  199. X/*+-------------------------------------------------------------------------
  200. X    pcmd_mkvar(param)
  201. X
  202. Xmkvar i<name>
  203. Xmkvar s<name>(<size-int>)
  204. X--------------------------------------------------------------------------*/
  205. Xint
  206. Xpcmd_mkvar(param)
  207. XESD *param;
  208. X{
  209. Xregister erc;
  210. Xchar vartype;
  211. X
  212. X    if(!proc_level)
  213. X        return(eNotExecutingProc);
  214. X
  215. X    do {
  216. X        if(erc = get_cmd_char(param,&vartype))
  217. X            return(erc);
  218. X        if(vartype == '$')
  219. X        {
  220. X            if(erc = get_cmd_char(param,&vartype))
  221. X                return(erc);
  222. X        }
  223. X        vartype = to_lower(vartype);
  224. X        switch(vartype)
  225. X        {
  226. X            case 'i':
  227. X                erc = build_mkvi(param);
  228. X                break;
  229. X            case 's':
  230. X                erc = build_mkvs(param);
  231. X                break;
  232. X            default:
  233. X                return(eIllegalVarType);
  234. X        }
  235. X        if(erc)
  236. X            return(erc);
  237. X    } while(!skip_comma(param));
  238. X
  239. X    if(!end_of_cmd(param))
  240. X        return(eSyntaxError);
  241. X
  242. X    return(0);
  243. X
  244. X}    /* end of pcmd_mkvar */
  245. X
  246. X/*+-------------------------------------------------------------------------
  247. X    free_mkvi(mkv)
  248. X--------------------------------------------------------------------------*/
  249. Xvoid
  250. Xfree_mkvi(mkv)
  251. XMKV *mkv;
  252. X{
  253. X    free(mkv->name);
  254. X    free((char *)mkv);
  255. X}    /* end of free_mkvi */
  256. X
  257. X/*+-------------------------------------------------------------------------
  258. X    free_mkvs(mkv)
  259. X--------------------------------------------------------------------------*/
  260. Xvoid
  261. Xfree_mkvs(mkv)
  262. XMKV *mkv;
  263. X{
  264. X    esdfree(mkv->item.sv);
  265. X    free(mkv->name);
  266. X    free((char *)mkv);
  267. X}    /* end of free_mkvs */
  268. X
  269. X/*+-------------------------------------------------------------------------
  270. X    mkv_proc_starting(pcb)
  271. X--------------------------------------------------------------------------*/
  272. Xvoid
  273. Xmkv_proc_starting(pcb)
  274. XPCB *pcb;
  275. X{
  276. X    pcb->mkvs_last = (char *)mkvs_last;
  277. X    pcb->mkvi_last = (char *)mkvi_last;
  278. X}    /* end of mkv_proc_starting */
  279. X
  280. X/*+-------------------------------------------------------------------------
  281. X    mkv_proc_terminating(pcb)
  282. X--------------------------------------------------------------------------*/
  283. Xvoid
  284. Xmkv_proc_terminating(pcb)
  285. XPCB *pcb;
  286. X{
  287. XMKV *pmkv;
  288. X
  289. X    while(mkvi_last != (MKV *)pcb->mkvi_last)
  290. X    {
  291. X        pmkv = mkvi_last->prev;
  292. X        free_mkvi(mkvi_last);
  293. X        mkvi_last = pmkv;
  294. X    }
  295. X    while(mkvs_last != (MKV *)pcb->mkvs_last)
  296. X    {
  297. X        pmkv = mkvs_last->prev;
  298. X        free_mkvs(mkvs_last);
  299. X        mkvs_last = pmkv;
  300. X    }
  301. X
  302. X}    /* end of mkv_proc_terminating */
  303. X
  304. X/*+-------------------------------------------------------------------------
  305. X    find_mkvs(name,ppesd,auto_create)
  306. X--------------------------------------------------------------------------*/
  307. Xint
  308. Xfind_mkvs(name,ppesd,auto_create)
  309. Xchar *name;
  310. XESD **ppesd;
  311. Xint auto_create;
  312. X{
  313. Xint erc;
  314. XMKV *mkv = mkvs_last;
  315. X
  316. X    while(mkv)
  317. X    {
  318. X        if(!strcmp(name,mkv->name))
  319. X        {
  320. X            *ppesd = mkv->item.sv;
  321. X            return(0);
  322. X        }
  323. X        mkv = mkv->prev;
  324. X    }
  325. X
  326. X    if(auto_create)
  327. X    {
  328. X        if(proctrace)
  329. X            pprintf("automatic creation $s%s(256)\n",name);
  330. X        if(erc = build_mkvs_primitive(name,256))
  331. X            return(erc);
  332. X        *ppesd = mkvs_last->item.sv;
  333. X        return(0);
  334. X    }
  335. X
  336. X    return(eNoSuchVariable);
  337. X
  338. X}    /* end of find_mkvs */
  339. X
  340. X/*+-------------------------------------------------------------------------
  341. X    find_mkvi(name,pplong,auto_create)
  342. X--------------------------------------------------------------------------*/
  343. Xint
  344. Xfind_mkvi(name,pplong,auto_create)
  345. Xchar *name;
  346. Xlong **pplong;
  347. Xint auto_create;
  348. X{
  349. Xint erc;
  350. XMKV *mkv = mkvi_last;
  351. X
  352. X    while(mkv)
  353. X    {
  354. X        if(!strcmp(name,mkv->name))
  355. X        {
  356. X            *pplong = &mkv->item.iv;
  357. X            return(0);
  358. X        }
  359. X        mkv = mkv->prev;
  360. X    }
  361. X
  362. X    if(auto_create)
  363. X    {
  364. X        if(proctrace)
  365. X            pprintf("creating $i%s\n",name);
  366. X        if(erc = build_mkvi_primitive(name))
  367. X            return(erc);
  368. X        *pplong = &mkvi_last->item.iv;
  369. X        return(0);
  370. X    }
  371. X
  372. X    return(eNoSuchVariable);
  373. X
  374. X}    /* end of find_mkvi */
  375. X
  376. X/*+-------------------------------------------------------------------------
  377. X    get_subscript(param,psubscript)
  378. Xonly called when '[' at pb + index
  379. X--------------------------------------------------------------------------*/
  380. Xget_subscript(param,psubscript)
  381. XESD *param;
  382. Xulong *psubscript;
  383. X{
  384. Xregister erc;
  385. X
  386. X    param->index++;
  387. X    if(erc = gint(param,psubscript))
  388. X        return(erc);
  389. X    if(skip_cmd_char(param,']'))
  390. X        return(eSyntaxError);
  391. X    return(0);
  392. X}    /* end of get_subscript */
  393. X
  394. X/*+-------------------------------------------------------------------------
  395. X    get_ivptr(param,ppiv,auto_create)
  396. Xcalled with index set to $i.....
  397. X                           ^
  398. X--------------------------------------------------------------------------*/
  399. Xget_ivptr(param,ppiv,auto_create)
  400. XESD *param;
  401. Xlong **ppiv;
  402. Xint auto_create;
  403. X{
  404. Xregister erc;
  405. Xulong varnum;
  406. Xchar name[16];
  407. X
  408. X    if(end_of_cmd(param))
  409. X        return(eSyntaxError);
  410. X    else if(!get_numeric_value(param,&varnum))
  411. X        goto TEST_VARNUM;
  412. X    else if(*(param->pb + param->index) == '[')
  413. X    {
  414. X        if(erc = get_subscript(param,&varnum))
  415. X            return(erc);
  416. XTEST_VARNUM:
  417. X        if(varnum >= IVQUAN)
  418. X            return(eIllegalVarNumber);
  419. X        *ppiv = &iv[(int)varnum];
  420. X        return(0);
  421. X    }
  422. X    else if(get_alphanum_zstr(param,name,sizeof(name)))
  423. X        return(eInvalidVarName);
  424. X
  425. X    return(find_mkvi(name,ppiv,auto_create));
  426. X
  427. X}    /* end of get_ivptr */
  428. X
  429. X/*+-------------------------------------------------------------------------
  430. X    get_svptr(param,ppsv,auto_create)
  431. Xcalled with index set to $s.....
  432. X--------------------------------------------------------------------------*/
  433. Xint
  434. Xget_svptr(param,ppsv,auto_create)
  435. XESD *param;
  436. XESD **ppsv;
  437. Xint auto_create;
  438. X{
  439. Xregister erc;
  440. Xulong varnum;
  441. Xchar name[16];
  442. X
  443. X    if(end_of_cmd(param))
  444. X        return(eSyntaxError);
  445. X    else if(!get_numeric_value(param,&varnum))
  446. X        goto TEST_VARNUM;
  447. X    else if(*(param->pb + param->index) == '[')
  448. X    {
  449. X        if(erc = get_subscript(param,&varnum))
  450. X            return(erc);
  451. XTEST_VARNUM:
  452. X        if(varnum >= SVQUAN)
  453. X            return(eIllegalVarNumber);
  454. X        *ppsv = sv[(int)varnum];
  455. X        return(0);
  456. X    }
  457. X    if(get_alphanum_zstr(param,name,sizeof(name)))
  458. X        return(eInvalidVarName);
  459. X    return(find_mkvs(name,ppsv,auto_create));
  460. X
  461. X}    /* end of get_svptr */
  462. X
  463. X/* vi: set tabstop=4 shiftwidth=4: */
  464. X/* end of var.c */
  465. SHAR_EOF
  466. echo 'File var.c is complete' &&
  467. chmod 0644 var.c ||
  468. echo 'restore of var.c failed'
  469. Wc_c="`wc -c < 'var.c'`"
  470. test 10234 -eq "$Wc_c" ||
  471.     echo 'var.c: original size 10234, current size' "$Wc_c"
  472. rm -f _shar_wnt_.tmp
  473. fi
  474. # ============= var.h ==============
  475. if test -f 'var.h' -a X"$1" != X"-c"; then
  476.     echo 'x - skipping var.h (File already exists)'
  477.     rm -f _shar_wnt_.tmp
  478. else
  479. > _shar_wnt_.tmp
  480. echo 'x - extracting var.h (Text)'
  481. sed 's/^X//' << 'SHAR_EOF' > 'var.h' &&
  482. X/*+-------------------------------------------------------------------------
  483. X    var.h - ecu user variable declarations
  484. X    wht@n4hgf.Mt-Park.GA.US
  485. X--------------------------------------------------------------------------*/
  486. X/*+:EDITS:*/
  487. X/*:09-10-1992-14:00-wht@n4hgf-ECU release 3.20 */
  488. X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
  489. X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
  490. X/*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  491. X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  492. X
  493. X#ifndef _var_h
  494. X#define _var_h
  495. X
  496. X#if !defined(VDECL)
  497. X#define VDECL extern
  498. X#endif
  499. X
  500. X#define SVLEN    256
  501. X#define SVQUAN    50
  502. X#define IVQUAN    50
  503. X
  504. XVDECL ESD *sv[SVQUAN];
  505. XVDECL long iv[SVQUAN];
  506. X
  507. X#endif /* _var_h */
  508. X
  509. X/* vi: set tabstop=4 shiftwidth=4: */
  510. X/* end of var.h */
  511. SHAR_EOF
  512. chmod 0644 var.h ||
  513. echo 'restore of var.h failed'
  514. Wc_c="`wc -c < 'var.h'`"
  515. test 784 -eq "$Wc_c" ||
  516.     echo 'var.h: original size 784, current size' "$Wc_c"
  517. rm -f _shar_wnt_.tmp
  518. fi
  519. # ============= bperr/bperr.c ==============
  520. if test ! -d 'bperr'; then
  521.     echo 'x - creating directory bperr'
  522.     mkdir 'bperr'
  523. fi
  524. if test -f 'bperr/bperr.c' -a X"$1" != X"-c"; then
  525.     echo 'x - skipping bperr/bperr.c (File already exists)'
  526.     rm -f _shar_wnt_.tmp
  527. else
  528. > _shar_wnt_.tmp
  529. echo 'x - extracting bperr/bperr.c (Text)'
  530. sed 's/^X//' << 'SHAR_EOF' > 'bperr/bperr.c' &&
  531. X/*+-------------------------------------------------------------------------
  532. X    bperr.c - build proc_error .c from ecuerror.h
  533. X    wht@n4hgf.Mt-Park.GA.US
  534. X--------------------------------------------------------------------------*/
  535. X/*+:EDITS:*/
  536. X/*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  537. X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
  538. X/*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
  539. X/*:08-14-1990-20:39-wht@n4hgf-ecu3.00-flush old edit history */
  540. X
  541. X#include <stdio.h>
  542. X#include <time.h>
  543. X
  544. X#define MAXLINE 256
  545. X#define MAXFLDS 50
  546. X
  547. Xchar *strchr();
  548. X
  549. Xchar line[MAXLINE];
  550. Xchar copy[MAXLINE];
  551. Xchar *fields[MAXFLDS + 1];
  552. X
  553. Xchar *bc = 
  554. X"/*+-------------------------------------------------------------------------";
  555. Xchar *ec = 
  556. X"--------------------------------------------------------------------------*/";
  557. X/*+-------------------------------------------------------------------------
  558. X    splitter(sep)
  559. X--------------------------------------------------------------------------*/
  560. Xsplitter(sep)
  561. Xchar *sep;
  562. X{
  563. Xchar *tmp = copy;
  564. Xregister int fld;
  565. X
  566. X    for (fld = 1; fld <= MAXFLDS; fld++)
  567. X        fields[fld] = NULL;
  568. X    if (!strlen(sep) || !strlen(line))
  569. X        return(0);
  570. X    fld = 1;
  571. X    sprintf(copy, "%s", line);
  572. X    while (fld < MAXFLDS)
  573. X    {
  574. X        while (strchr(sep, *tmp))
  575. X            if (!*++tmp) return fld;
  576. X        fields[fld++] = tmp++;
  577. X        while (!strchr(sep, *tmp))
  578. X            if (!*++tmp) return fld;
  579. X        *tmp++ = '\0';
  580. X    }
  581. X    return(fld);
  582. X}    /* end of splitter */
  583. X
  584. X/*+-------------------------------------------------------------------------
  585. X    main(argc,argv)
  586. X--------------------------------------------------------------------------*/
  587. Xmain(argc,argv)
  588. Xint argc;
  589. Xchar **argv;
  590. X{
  591. Xregister field_count;
  592. Xregister itmp;
  593. Xlong time();
  594. Xstruct tm *localtime();
  595. Xlong cur_time;
  596. Xstruct tm *ltime;
  597. XFILE *fp;
  598. Xchar cmd[256];
  599. X
  600. X    freopen("proc_error.c","w",stdout);
  601. X
  602. X    puts(bc);
  603. X    puts("\tproc_error.c - print ecu procedure error");
  604. X    puts(ec);
  605. X    puts("/*+:EDITS:*/");
  606. X
  607. X    cur_time = time((long *)0);
  608. X    ltime = localtime(&cur_time);
  609. X    printf(
  610. X    "/*:%02d-%02d-%04d-%02d:%02d-build_err-creation from ecuerror.h */\n",
  611. X        ltime->tm_mon+1,ltime->tm_mday,ltime->tm_year + 1900,
  612. X        ltime->tm_hour,ltime->tm_min);
  613. X    puts("");
  614. X    puts("#include \"ecu.h\"");
  615. X    puts("#include \"ecuerror.h\"");
  616. X    puts("");
  617. X    puts(bc);
  618. X    puts("\tproc_error(erc) - print error message");
  619. X    puts(ec);
  620. X    puts("void");
  621. X    puts("proc_error(erc)");
  622. X    puts("int erc;");
  623. X    puts("{");
  624. X    puts("\tswitch(erc)");
  625. X    puts("\t{");
  626. X
  627. X    for(itmp = 0; itmp <= MAXFLDS; itmp++)
  628. X        fields[itmp] = NULL;
  629. X
  630. X    fp = fopen("ecuerror.h","r");
  631. X
  632. X    while(fgets(line,sizeof(line),fp))
  633. X    {
  634. X        line[strlen(line) - 1] = 0;
  635. X        fields[0] = line;
  636. X        field_count = splitter(" \t");
  637. X        if(!field_count || (strcmp(fields[1],"#define")))
  638. X            continue;
  639. X        if((!strcmp(fields[2],"eFATAL_ALREADY")) ||
  640. X            (!strcmp(fields[2],"eWARNING_ALREADY")) ||
  641. X            (!strncmp(fields[2],"_e",2)) ||
  642. X            (!strncmp(fields[2],"e_",2)))
  643. X            continue;
  644. X        printf("\t\tcase %s:\n",fields[2]);
  645. X        fputs("\t\t\tpputs(\"",stdout);
  646. X
  647. X        for(itmp = 1; itmp < field_count - 1; itmp++)
  648. X            if(!strcmp(fields[itmp],"/*"))
  649. X                break;
  650. X        itmp++;
  651. X
  652. X        for(; itmp < field_count - 1; itmp++)
  653. X        {
  654. X            fputs(fields[itmp],stdout);
  655. X            if(itmp != field_count - 2)
  656. X                fputc(' ',stdout);
  657. X        }
  658. X        fputs("\\n\");\n",stdout);
  659. X        puts("\t\t\tbreak;");
  660. X    }
  661. X    puts("\t\tcase eFATAL_ALREADY:");
  662. X    puts("\t\tcase eWARNING_ALREADY:");
  663. X    puts("\t\t\tbreak;");
  664. X    puts("\t\tdefault:");
  665. X    puts("\t\t\tpprintf(\"unknown error %x\\n\",erc);");
  666. X    puts("\t\t\tbreak;");
  667. X
  668. X    puts("\t}");
  669. X    puts("} /* end of proc_error */\n");
  670. X    puts("/* vi: set tabstop=4 shiftwidth=4: */");
  671. X    puts("/* end of proc_error.c */");
  672. X    freopen("/dev/tty","a",stdout);
  673. X    sprintf(cmd,"fcrc -u proc_error.c");
  674. X    system(cmd);
  675. X    exit(0);
  676. X}    /* end of main */
  677. X
  678. X/* vi: set tabstop=4 shiftwidth=4: */
  679. X/* end of bperr.c */
  680. SHAR_EOF
  681. chmod 0644 bperr/bperr.c ||
  682. echo 'restore of bperr/bperr.c failed'
  683. Wc_c="`wc -c < 'bperr/bperr.c'`"
  684. test 3724 -eq "$Wc_c" ||
  685.     echo 'bperr/bperr.c: original size 3724, current size' "$Wc_c"
  686. rm -f _shar_wnt_.tmp
  687. fi
  688. # ============= help/helpgen.c ==============
  689. if test -f 'help/helpgen.c' -a X"$1" != X"-c"; then
  690.     echo 'x - skipping help/helpgen.c (File already exists)'
  691.     rm -f _shar_wnt_.tmp
  692. else
  693. > _shar_wnt_.tmp
  694. echo 'x - extracting help/helpgen.c (Text)'
  695. sed 's/^X//' << 'SHAR_EOF' > 'help/helpgen.c' &&
  696. X/*+-------------------------------------------------------------------------
  697. X    helpgen.c -- ecu command help file maker
  698. X    wht@n4hgf.Mt-Park.GA.US
  699. X
  700. X  Defined functions:
  701. X    build_ecudoc()
  702. X    build_ecuhelp()
  703. X    main(argc,argv,envp)
  704. X    search_cmd_list(cmd)
  705. X    show_cmds()
  706. X    test_help()
  707. X    usage()
  708. X
  709. X--------------------------------------------------------------------------*/
  710. X/*+:EDITS:*/
  711. X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
  712. X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
  713. X/*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  714. X/*:07-12-1991-14:50-wht@n4hgf-remove obsolete ecuhelp.txt generator */
  715. X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  716. X
  717. X#include <stdio.h>
  718. X#include <ctype.h>
  719. X
  720. X#if defined(M_SYSV)
  721. X#if !defined(LINT_ARGS)
  722. X#define LINT_ARGS
  723. X#endif
  724. X#endif
  725. X#include "../ecu_types.h"
  726. X#include <termio.h>
  727. X
  728. X#define DECLARE_P_CMD
  729. X#define HELPGEN
  730. Xtypedef int(*PFI)();    /* pointer to function returning integer */
  731. X#include "../ecucmd.h"
  732. X
  733. X#include "../esd.h"
  734. X
  735. X#define PSRC    "ecuhelp.src"
  736. X#define PDAT    "ecuhelp.data"
  737. X#define PDOC    "ecuhelp.doc"
  738. X
  739. Xlong start_pos[TOKEN_QUAN];
  740. Xint token_line[TOKEN_QUAN];
  741. XFILE    *fpsrc;        /* help source file */
  742. XFILE    *fpdat;        /* help data file */
  743. XFILE    *fpdoc;        /* help doc file */
  744. XFILE    *fptxt;        /* help nroff file */
  745. XP_CMD    *pcmd;
  746. Xint src_line = 0;
  747. Xchar buf[128];
  748. X
  749. X/*+-------------------------------------------------------------------------
  750. X    usage()
  751. X--------------------------------------------------------------------------*/
  752. Xusage()
  753. X{
  754. X    fprintf(stderr,"usage: helpgen [-b] [-d] [-s] [-t]\n");
  755. X    fprintf(stderr," -b build %s from %s\n",PDAT,PSRC);
  756. X    fprintf(stderr," -d build %s from %s\n",PDOC,PDAT);
  757. X    fprintf(stderr," -s show list of commands\n");
  758. X    fprintf(stderr," -t test help\n");
  759. X    fprintf(stderr,"At least one switch must be issued.  They are executed\n");
  760. X    fprintf(stderr,"in the order shown on the usage line.\n");
  761. X    exit(1);
  762. X}    /* end of usage */
  763. X
  764. X/*+-------------------------------------------------------------------------
  765. X    search_cmd_list(cmd)
  766. X--------------------------------------------------------------------------*/
  767. XP_CMD *
  768. Xsearch_cmd_list(cmd)
  769. Xregister char *cmd;
  770. X{
  771. Xregister P_CMD    *cmd_list = icmd_cmds;
  772. X
  773. X    while(cmd_list->token != -1)
  774. X    {
  775. X        if(strcmp(cmd_list->cmd,cmd) == 0)
  776. X            break;
  777. X        cmd_list++;
  778. X    }
  779. X    if(cmd_list->token == -1)
  780. X        return((P_CMD *)0);
  781. X    else
  782. X        return(cmd_list);
  783. X
  784. X}    /* end of search_cmd_list */
  785. X
  786. X/*+-------------------------------------------------------------------------
  787. X    show_cmds()
  788. Xcommands with null descriptions are "undocumented"
  789. X--------------------------------------------------------------------------*/
  790. Xvoid
  791. Xshow_cmds()
  792. X{
  793. Xregister int itmp;
  794. Xregister P_CMD *this = icmd_cmds;
  795. Xregister int longest_cmd = 0;
  796. Xregister int longest_descr = 0;
  797. Xregister int nl_flag = 0;
  798. Xchar s80[80];
  799. XP_CMD *longest_cmd_p = 0;
  800. XP_CMD *longest_descr_p = 0;
  801. X
  802. X    while(this->token != -1)
  803. X    {
  804. X        if(!*this->descr)
  805. X        {
  806. X            this++;
  807. X            continue;
  808. X        }
  809. X        itmp = strlen(this->cmd);
  810. X        if(itmp > longest_cmd)
  811. X        {
  812. X            longest_cmd = itmp;
  813. X            longest_cmd_p = this;
  814. X        }
  815. X        itmp = strlen(this->descr);
  816. X        if(itmp > longest_descr)
  817. X        {
  818. X            longest_descr = itmp;
  819. X            longest_descr_p = this;
  820. X        }
  821. X        this++;
  822. X    }
  823. X    this = icmd_cmds;
  824. X    while(this->token != -1)
  825. X    {
  826. X        if((!this->min_ch) || (!*this->descr))
  827. X        {
  828. X            this++;
  829. X            continue;
  830. X        }
  831. X        strcpy(s80,this->cmd);
  832. X        pad_zstr_to_len(s80,longest_cmd + 2);
  833. X        for(itmp = 0; itmp < this->min_ch; itmp++)
  834. X            s80[itmp] = to_upper(s80[itmp]);
  835. X        fputs(s80,stderr);
  836. X
  837. X        strcpy(s80,this->descr);
  838. X        pad_zstr_to_len(s80,longest_descr + 1);
  839. X        fputs(s80,stderr);
  840. X
  841. X        if(nl_flag)
  842. X            fputs("\r\n",stderr);
  843. X        else
  844. X            fputs("| ",stderr);
  845. X        nl_flag = (nl_flag) ? 0 : 1;
  846. X
  847. X        this++;
  848. X    }
  849. X    if(nl_flag)
  850. X        fputs("\r\n",stderr);
  851. X
  852. X    itmp = longest_cmd + longest_descr + 5;
  853. X    sprintf(s80,"recwidth = %d\r\n",itmp);
  854. X    fprintf(stderr,s80);
  855. X    this = longest_cmd_p;
  856. X    sprintf(s80,"longest cmd: %s: %s\r\n",this->cmd,this->descr);
  857. X    fprintf(stderr,s80);
  858. X    this = longest_descr_p;
  859. X    sprintf(s80,"longest dsc: %s: %s\r\n",this->cmd,this->descr);
  860. X    fprintf(stderr,s80);
  861. X
  862. X}    /* end of show_cmds */
  863. X
  864. X/*+-------------------------------------------------------------------------
  865. X    build_ecuhelp()
  866. X--------------------------------------------------------------------------*/
  867. Xvoid
  868. Xbuild_ecuhelp()
  869. X{
  870. Xregister int itmp;
  871. Xregister char *cptr;
  872. XP_CMD *this;
  873. X
  874. X    printf("\nBuilding %s\n",PDAT);
  875. X
  876. X/* use proc cmd entry for flag */
  877. X    this = icmd_cmds;
  878. X    while(this->token != -1)
  879. X    {
  880. X        this->proc = (PFI)0;
  881. X        this++;
  882. X    }
  883. X
  884. X    for(itmp = 0; itmp < TOKEN_QUAN; itmp++)
  885. X    {
  886. X        start_pos[itmp] = 0L;
  887. X        token_line[itmp] = 0;
  888. X    }
  889. X
  890. X    if((fpsrc = fopen(PSRC,"r")) == NULL)
  891. X    {
  892. X        perror(PSRC);
  893. X        exit(1);
  894. X    }
  895. X
  896. X    if((fpdat = fopen(PDAT,"w")) == NULL)
  897. X    {
  898. X        perror(PDAT);
  899. X        exit(1);
  900. X    }
  901. X
  902. X    fwrite((char *)start_pos,sizeof(long),    /* write null table */
  903. X            TOKEN_QUAN,fpdat);
  904. X
  905. X    while(fgets(buf,sizeof(buf),fpsrc) != NULL)
  906. X    {
  907. X        src_line++;
  908. X        itmp = strlen(buf);
  909. X        buf[--itmp] = 0;        /* kill trailing nl */
  910. X        if(buf[0] == '#')        /* ignore comments */
  911. X            continue;
  912. X        if(buf[0] == '%')        /* command indication */
  913. X        {
  914. XSEARCH_CMD_LIST:
  915. X            if(!(this = search_cmd_list(&buf[1])))
  916. X            {
  917. X#ifdef notdef    /* primarily because of 'eto' and 'fasi' */
  918. X                printf("line %d: '%s' not in command table\n",
  919. X                        src_line,&buf[1]);
  920. X#endif
  921. X                while(fgets(buf,sizeof(buf),fpsrc) != NULL)
  922. X                {
  923. X                    src_line++;
  924. X                    itmp = strlen(buf);
  925. X                    buf[--itmp] = 0;                    /* kill trailing nl */
  926. X                    if(buf[0] == '%')        /* command indication */
  927. X                        goto SEARCH_CMD_LIST;
  928. X                }
  929. X                break;
  930. X            }
  931. X            if(start_pos[this->token])
  932. X            {
  933. X                printf("line %d: '%s' already found on line %d\n",
  934. X                        src_line,&buf[1],token_line[this->token]);
  935. X                exit(1);
  936. X            }
  937. X            fputs("\n",fpdat);    /* terminate previous command description */
  938. X            start_pos[this->token] = ftell(fpdat);
  939. X            token_line[this->token] = src_line;
  940. X            fputs("   ",fpdat);
  941. X            cptr = &buf[1];    /* command text */
  942. X            itmp = 0;
  943. X            this->proc = (PFI)1;    /* indicate we save command info */
  944. X            while(*cptr)        /* show cmd and min chars required */
  945. X            {
  946. X                if(itmp < this->min_ch)
  947. X                    fputc(to_upper(*cptr++),fpdat);
  948. X                else
  949. X                    fputc(to_lower(*cptr++),fpdat);
  950. X                itmp++;
  951. X            }
  952. X            if(*this->descr)        /* if description present */
  953. X                fprintf(fpdat," : %s\n \n",this->descr);
  954. X            else
  955. X                fputs("\n \n",fpdat);
  956. X            continue;
  957. X        }
  958. X        fprintf(fpdat," %s\n",buf);
  959. X    }
  960. X
  961. X    fseek(fpdat,0L,0);    /* back to position table */
  962. X    fwrite((char *)start_pos,sizeof(long),    /* write actual table */
  963. X        TOKEN_QUAN,fpdat);
  964. X    fclose(fpsrc);
  965. X    fputs("\n",fpdat);    /* terminate last command */
  966. X    fclose(fpdat);
  967. X
  968. X/* say which commands weren't in the help source */
  969. X    this = icmd_cmds;
  970. X    while(this->token != -1)
  971. X    {
  972. X        if(this->min_ch && !this->proc)
  973. X            fprintf(stderr,"'%s' not in help source\n",this->cmd);
  974. X        this++;
  975. X    }
  976. X
  977. X
  978. X}    /* end of build_ecuhelp */
  979. X
  980. X/*+-------------------------------------------------------------------------
  981. X    build_ecudoc()
  982. X--------------------------------------------------------------------------*/
  983. Xvoid
  984. Xbuild_ecudoc()
  985. X{
  986. Xregister int itmp;
  987. X
  988. X    printf("\nBuilding %s\n",PDOC);
  989. X    if((fpdat = fopen(PDAT,"r")) == NULL)
  990. X    {
  991. X        perror(PDAT);
  992. X        exit(1);
  993. X    }
  994. X    if((fpdoc = fopen(PDOC,"w")) == NULL)
  995. X    {
  996. X        perror(PDOC);
  997. X        exit(1);
  998. X    }
  999. X    fprintf(fpdoc,
  1000. X        "\n     ECU  Command  Help  Documentation  (PRELIMINARY)\n\n");
  1001. X    fprintf(fpdoc,
  1002. X        "Commands are accessed by pressing the HOME key followed by one\n");
  1003. X    fprintf(fpdoc,
  1004. X        "of the following commands (capitalized portions are sufficient\n");
  1005. X    fprintf(fpdoc,
  1006. X        "to invoke the command):\n");
  1007. X    fprintf(fpdoc,"\n");
  1008. X    fprintf(fpdoc,
  1009. X"---------------------------------------------------------------------\n");
  1010. X    fread((char *)start_pos,sizeof(long),TOKEN_QUAN,fpdat);
  1011. X    pcmd = icmd_cmds;
  1012. X    while(pcmd->token != -1)
  1013. X    {
  1014. X        if(!pcmd->token)
  1015. X        {
  1016. X            pcmd++;
  1017. X            continue;
  1018. X        }
  1019. X        if(pcmd->min_ch && !start_pos[pcmd->token])
  1020. X        {
  1021. X            printf("no help available for '%s'\n",pcmd->cmd);
  1022. X            pcmd++;
  1023. X            continue;
  1024. X        }
  1025. X        fseek(fpdat,start_pos[pcmd->token],0);
  1026. X        while(fgets(buf,sizeof(buf),fpdat) != NULL)
  1027. X        {
  1028. X            itmp = strlen(buf);
  1029. X            buf[--itmp] = 0;
  1030. X            if(itmp == 0)
  1031. X                break;
  1032. X            fprintf(fpdoc,"%s\n",buf);
  1033. X        }
  1034. X        fprintf(fpdoc,
  1035. X"---------------------------------------------------------------------\n");
  1036. X        pcmd++;
  1037. X    }
  1038. X    fclose(fpdat);
  1039. X    fclose(fpdoc);
  1040. X}    /* end of build_ecudoc */
  1041. X
  1042. X/*+-------------------------------------------------------------------------
  1043. X    test_help()
  1044. X--------------------------------------------------------------------------*/
  1045. Xvoid
  1046. Xtest_help()
  1047. X{
  1048. Xregister int itmp;
  1049. X
  1050. X/* test code */
  1051. X    printf("\nNow to test\n");
  1052. X    if((fpdat = fopen(PDAT,"r")) == NULL)
  1053. X    {
  1054. X        perror(PDAT);
  1055. X        exit(1);
  1056. X    }
  1057. X    fread((char *)start_pos,sizeof(long),TOKEN_QUAN,fpdat);
  1058. X    while(1)
  1059. X    {
  1060. X        printf("\ncommand: ");
  1061. X        fgets(buf,sizeof(buf),stdin);
  1062. X        itmp = strlen(buf);
  1063. X        buf[--itmp] = 0;
  1064. X        if(itmp == 0)
  1065. X            break;
  1066. X        if(!(pcmd = search_cmd_list(buf)))
  1067. X        {
  1068. X            printf("'%s' not found in ecu cmd table\n",buf);
  1069. X            continue;
  1070. X        }
  1071. X        if(pcmd->min_ch && !start_pos[pcmd->token])
  1072. X        {
  1073. X            printf("no help available for '%s'\n",buf);
  1074. X            continue;
  1075. X        }
  1076. X        fseek(fpdat,start_pos[pcmd->token],0);
  1077. X        while(fgets(buf,sizeof(buf),fpdat) != NULL)
  1078. X        {
  1079. X            itmp = strlen(buf);
  1080. X            buf[--itmp] = 0;
  1081. X            if(itmp == 0)
  1082. X                break;
  1083. X            printf("%s\n",buf);
  1084. X        }
  1085. X    }
  1086. X}    /* end of test_help */
  1087. X
  1088. X/*+-------------------------------------------------------------------------
  1089. X    main(argc,argv,envp)
  1090. X--------------------------------------------------------------------------*/
  1091. Xmain(argc,argv,envp)
  1092. Xint argc;
  1093. Xchar **argv;
  1094. Xchar **envp;
  1095. X{
  1096. Xregister int itmp;
  1097. Xint iargv;
  1098. Xint b_flag = 0;
  1099. Xint s_flag = 0;
  1100. Xint t_flag = 0;
  1101. Xint f_flag = 0;
  1102. Xint d_flag = 0;
  1103. X
  1104. X    setbuf(stdout,NULL);
  1105. X    setbuf(stderr,NULL);
  1106. X
  1107. X    if(argc < 1)
  1108. X        usage();
  1109. X    for(iargv = 1; iargv < argc; iargv++)
  1110. X    {
  1111. X        if(argv[iargv][0] == '-')
  1112. X        {
  1113. X            switch(itmp = (argv[iargv][1]))
  1114. X            {
  1115. X                case 'b': b_flag = 1; break;
  1116. X                case 's': s_flag = 1; break;
  1117. X                case 't': t_flag = 1; break;
  1118. X                case 'd': d_flag = 1; break;
  1119. X                default:
  1120. X                    usage();
  1121. X                    break;
  1122. X            }
  1123. X        }
  1124. X        else
  1125. X            usage();
  1126. X    }
  1127. X    if(!b_flag && !s_flag && !t_flag && !d_flag && !f_flag)
  1128. X        usage();
  1129. X
  1130. X    if(b_flag)
  1131. X        build_ecuhelp();
  1132. X    if(d_flag)
  1133. X        build_ecudoc();
  1134. X    if(s_flag)
  1135. X        show_cmds();
  1136. X    if(t_flag)
  1137. X        test_help();
  1138. X
  1139. X    exit(0);
  1140. X}    /* end of main */
  1141. X/* end of helpgen.c */
  1142. X/* vi: set tabstop=4 shiftwidth=4: */
  1143. SHAR_EOF
  1144. chmod 0644 help/helpgen.c ||
  1145. echo 'restore of help/helpgen.c failed'
  1146. Wc_c="`wc -c < 'help/helpgen.c'`"
  1147. test 10101 -eq "$Wc_c" ||
  1148.     echo 'help/helpgen.c: original size 10101, current size' "$Wc_c"
  1149. rm -f _shar_wnt_.tmp
  1150. fi
  1151. # ============= help/util.c ==============
  1152. if test -f 'help/util.c' -a X"$1" != X"-c"; then
  1153.     echo 'x - skipping help/util.c (File already exists)'
  1154.     rm -f _shar_wnt_.tmp
  1155. else
  1156. > _shar_wnt_.tmp
  1157. echo 'x - extracting help/util.c (Text)'
  1158. sed 's/^X//' << 'SHAR_EOF' > 'help/util.c' &&
  1159. X/*+-------------------------------------------------------------------------
  1160. X    util.c
  1161. X    wht@n4hgf.Mt-Park.GA.US
  1162. X--------------------------------------------------------------------------*/
  1163. X/*+:EDITS:*/
  1164. X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
  1165. X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
  1166. X/*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
  1167. X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  1168. X
  1169. X/*+-------------------------------------------------------------------------
  1170. X    all touuper/tolower not created equally, so this works!
  1171. X--------------------------------------------------------------------------*/
  1172. Xchar to_upper(ch)
  1173. Xregister int    ch;
  1174. X{ return( ((ch >= 'a') && (ch <= 'z')) ? ch - 0x20 : ch);
  1175. X}   /* end of to_upper() */
  1176. X
  1177. Xchar to_lower(ch)
  1178. Xregister int ch;
  1179. X{ return( ((ch >= 'A') && (ch <= 'Z')) ? ch + 0x20 : ch);
  1180. X}   /* end of to_lower() */
  1181. X
  1182. X
  1183. X/*+-----------------------------------------------------------------------
  1184. X    pad_zstr_to_len(zstr,len)
  1185. X
  1186. X  pads with spaces to specified length, unless already longer than
  1187. X  len in which case the string is truncated to 'len' characters.
  1188. X------------------------------------------------------------------------*/
  1189. Xvoid
  1190. Xpad_zstr_to_len(zstr,len)
  1191. Xchar    *zstr;
  1192. Xint        len;
  1193. X{
  1194. Xregister int    izstr;
  1195. X
  1196. X    izstr = strlen(zstr);
  1197. X    if(izstr >= len)
  1198. X        zstr[len] = 0;
  1199. X    else
  1200. X    {
  1201. X        while(izstr < len)
  1202. X            zstr[izstr++] = 0x20;
  1203. X        zstr[izstr] = 0;
  1204. X    }
  1205. X}    /* end of pad_zstr_to_len */
  1206. X
  1207. SHAR_EOF
  1208. chmod 0644 help/util.c ||
  1209. echo 'restore of help/util.c failed'
  1210. Wc_c="`wc -c < 'help/util.c'`"
  1211. test 1432 -eq "$Wc_c" ||
  1212.     echo 'help/util.c: original size 1432, current size' "$Wc_c"
  1213. rm -f _shar_wnt_.tmp
  1214. fi
  1215. # ============= help/ecuhelp.src ==============
  1216. if test -f 'help/ecuhelp.src' -a X"$1" != X"-c"; then
  1217.     echo 'x - skipping help/ecuhelp.src (File already exists)'
  1218.     rm -f _shar_wnt_.tmp
  1219. else
  1220. > _shar_wnt_.tmp
  1221. echo 'x - extracting help/ecuhelp.src (Text)'
  1222. sed 's/^X//' << 'SHAR_EOF' > 'help/ecuhelp.src' &&
  1223. X# ecu help source file
  1224. X#+:EDITS:*/
  1225. X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
  1226. X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
  1227. X#:04-19-1992-20:41-wht@n4hgf-upgrade kbdtest entry
  1228. X#:04-28-1991-04:45-wht@n4hgf-add eto and nice
  1229. X#:11-03-1989-16:21-wht------ unet2 -----
  1230. X#:06-17-1988-11:10-wht-add 'exit' command
  1231. X#:06-13-1988-15:38-wht-creation
  1232. X#--------------------------------------------------------------------
  1233. X%ax
  1234. XUsage: ax [<param>]
  1235. X
  1236. X<param> may be a single ASCII character, a standard ASCII identifier
  1237. X(such as ETX), or a two-character control character identifier (such as
  1238. X^C, typed as a caret followed by a C).
  1239. X
  1240. XIf no parameter is supplied, a table of control characters is printed
  1241. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  1242. Xcontrol character identifier.
  1243. X#--------------------------------------------------------------------
  1244. X%xa
  1245. XUsage: xa [<hex-val>]
  1246. X
  1247. X<hex-val> is a hexadecimal value between 0 and FF; the parity (sign) bit
  1248. Xis stripped and the equivalent ASCII character value is displayed.
  1249. X
  1250. XIf no parameter is supplied, a table of control characters is printed
  1251. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  1252. Xcontrol character identifier.
  1253. X#--------------------------------------------------------------------
  1254. X%oa
  1255. XUsage: oa [<octal-val>]
  1256. X
  1257. X<octal-val> is a octal value between 0 and 0377; the parity (sign) bit
  1258. Xis stripped and the equivalent ASCII character value is displayed.
  1259. X
  1260. XIf no parameter is supplied, a table of control characters is printed
  1261. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  1262. Xcontrol character identifier.
  1263. X#--------------------------------------------------------------------
  1264. X%da
  1265. XUsage: da [<decimal-val>]
  1266. X
  1267. X<decimal-val> is a decimal value between 0 and 0377; the parity (sign)
  1268. Xbit is stripped and the equivalent ASCII character value is displayed.
  1269. X
  1270. XIf no parameter is supplied, a table of control characters is printed
  1271. Xcontaining decimal, octal, hex, ASCII identifiers and two-character
  1272. Xcontrol character identifier.
  1273. X#--------------------------------------------------------------------
  1274. X%autorz
  1275. XUsage: autorz [off | on | ]
  1276. X
  1277. XECU in the interactive mode (no procedure executing) can interpret a
  1278. XSUB, 'B', '0', '0' receive data sequence as a ZMODEM ZRQINIT frame and
  1279. Xautomatically begin a ZMODEM receive operation.  This command controls
  1280. Xor displays this feature.  By default, this feature is turned on.
  1281. X#--------------------------------------------------------------------
  1282. X%baud
  1283. XUsage: baud [<baud-rate>]
  1284. X
  1285. X<baud-rate>, if specified, must be taken from the values 110, 300, 600,
  1286. X1200, 2400, 4800, 9600, 19200 and 38400.  On some systems, 19200 and
  1287. X38400 may not be supported.  If a baud rate less than 300 is selected, 2
  1288. Xstop bits are automatically specified; other baud rates set 1 stop bit.
  1289. XIf <baud-rate> is not supplied, the current baud rate is displayed.
  1290. X
  1291. XThe setting may be automatically changed as the result of a 'dial'
  1292. Xcommand.  See also the 'dial' and 'parity' command descriptions.
  1293. X#--------------------------------------------------------------------
  1294. X%bn
  1295. XUsage: bn [ off | on | alert ]
  1296. X       bn [ 0 | 1 | 2 ]
  1297. X
  1298. X"bell notify": If no parameter is supplied, the current setting is
  1299. Xdisplayed.  Specifying 0 or off disables the facility; 1 or on causes
  1300. Xan audible alarm to be sounded upon receipt of a bell (0x07)
  1301. Xcharacter from the remote system; 2 or alert causes an audible alarm
  1302. Xupon receipt of ANY characters.  This command may not be functional
  1303. Xin the version for your system.
  1304. X#--------------------------------------------------------------------
  1305. X%break
  1306. XUsage: break
  1307. X
  1308. XThis command sends a break signal to the remote system.
  1309. X#--------------------------------------------------------------------
  1310. X%cd
  1311. XUsage: cd [<dir-path>]
  1312. X
  1313. XThis command allows you to change the working directory of the ecu
  1314. Xprocess.  If <dir-path> is supplied, the previous working directory is
  1315. Xdisplayed, and <dir-path> is made the new working directory.  A history
  1316. Xof previous directory changes is maintained.  Entering the 'cd' command
  1317. Xshows the numbered history list and allows you to select a new directory
  1318. Xby entering the number.  Other commands allow deletion of directories
  1319. Xfrom the list or saving the list to file ~/.ecu/dir.  This file is
  1320. Xautomatically read at ecu startup, providing a convenient list of
  1321. Xdirectories available for quick selection.
  1322. X#--------------------------------------------------------------------
  1323. X%dcdwatch
  1324. XUsage: dcdwatch [<dcdwatch-param>]
  1325. X
  1326. XThis command controls the DCD watcher.  The optional parameter may be:
  1327. X   y  yes - enable DCD watcher
  1328. X   n  no - disable DCD watcher
  1329. X   t  terminate - terminate ECU on loss of DCD
  1330. XEntering the command without an argument shows the current status.
  1331. X
  1332. XThe DCD watcher when enabled causes ECU to monitor the DCD line (within
  1333. Xthe limits imposed by the OS with its CLOCAL=0 functionality).  When the
  1334. Xwatcher is on and DCD drops, ecu automatically performs the action of
  1335. Xthe interactive or procedure hangup command.  If the 't'erminate option
  1336. Xis chosen, then after hangup processing is complete, the ECU program
  1337. Xwill terminate.
  1338. X
  1339. XThe state of the watcher may be changed by the use of the dial command
  1340. Xwhich uses a directory entry that changes the DCD watcher status.  See
  1341. Xthe manual sections on the interactive commands 'dcdwatch' and 'dial'.
  1342. X#--------------------------------------------------------------------
  1343. X%dial
  1344. XUsage: dial [<dial-param>]
  1345. X
  1346. X<dial-param> may take one of two forms, a telephone number to dial or a
  1347. Xlogical name which can be found in the user phone directory (in file
  1348. X~/.ecu/phone).
  1349. X
  1350. XIf a telephone number is supplied, the phone number is dialed; you must
  1351. Xfirst have set the desired baud rate and parity using the 'baud' and
  1352. X'parity' commands.  If a logical name is entered, the phone directory is
  1353. Xsearched; if the entry is found, the baud rate and parity is
  1354. Xautomatically set and the number dialed.
  1355. X
  1356. XIf <dial-param> is not supplied, then a screen-oriented self-documenting
  1357. Xdirectory manager is executed; you may scan the the directory to select
  1358. Xa number to dial, as well as add, remove and edit entries.  See also
  1359. X'baud' and 'parity'.
  1360. X#--------------------------------------------------------------------
  1361. X%do
  1362. XUsage: do <procname> [<arg> ... ]
  1363. X
  1364. XPerform ecu procedure.  Ecu searches for <procname>.ep in the current
  1365. Xdirectory.  If the file is not found, the program looks for the file in
  1366. Xthe ~/.ecu directory.  One or more arguments may be passed to the
  1367. Xprocedure.
  1368. X#--------------------------------------------------------------------
  1369. X%duplex
  1370. XUsage: duplex [ Full | Half ]
  1371. X
  1372. XThis command specifies whether or not ecu is to locally echo characters
  1373. Xtyped by you at the keyboard.  The overwhelming majority of remote
  1374. Xsystems provide the echo function, in which case full duplex must be
  1375. Xused.  For the rare occasions when the remote system does not echo your
  1376. Xkeyboard input, setting half duplex will allow you to see what you are
  1377. Xtyping.
  1378. X
  1379. XWhen communicating with another terminal in a "teletype conver- sation",
  1380. Xsetting half duplex is generally required.  In such cases, use of the
  1381. X'nl', 'nlin' and 'nlout' commands may also be required.
  1382. X
  1383. XThe default setting for duplex is full.
  1384. X#--------------------------------------------------------------------
  1385. X#%esc
  1386. X#Usage esc <hex-constant>
  1387. X#"command escape ": This command is used only on non-XENIX systems.
  1388. X#It specifies the equivalent character for the HOME key used
  1389. X#by XENIX versions of ecu to enter the commands being described
  1390. X#by this help function.  The default setting for this command escape
  1391. X#s '%'.  To change the value, you must enter the hexadecimal value
  1392. X#of the desired character; it must be in the range 01 through 7F.
  1393. X#You may use the 'ax' command to aid in converting an ASCII
  1394. X#character to the appropriate hexadecimal value.
  1395. X#--------------------------------------------------------------------
  1396. X%fasi
  1397. XUsage: fasi [reset]
  1398. X
  1399. XThis command displays or resets the FAS/i tty driver statistics.
  1400. XThe command is found only in versions compiled for FAS/i support.
  1401. X#--------------------------------------------------------------------
  1402. X%fi
  1403. XUsage: fi [<filename>]
  1404. X
  1405. X"file insert": This command causes file characters to be inserted into
  1406. Xthe transmit data stream as though they had been entered at the
  1407. Xkeyboard.  If <filename> is not entered on the command line, a prompt
  1408. Xfor the filename is made.  Once the filename has been entered and file
  1409. Xhas been opened, you are asked whether the file should be transmitted at
  1410. Xfull speed, by "echo pacing" or by a single line at a time.  You may
  1411. Xalso append an 'f', 'e' or 's' argument to the command line.  If your
  1412. Xremote can tolerate it, full speed transmission is the fastest.
  1413. XPressing the interrupt key (DEL) stops a full speed transmission.  By
  1414. Xspecifying echo pacing, it is possible to increase the likelihood of
  1415. Xproper receipt.  Pressing the interrupt key (DEL) stops an echo paced
  1416. Xtransmission.  As a last resort, if echo pacing is not working for you,
  1417. X(i.e., you are using the command in an environment where the remote does
  1418. Xnot echo your characters), use single line at a time transmission.  You
  1419. Xmust press the space key to initiate sending each line.  Pressing 'ESC'
  1420. Xor 's' stops the transfer.
  1421. X#--------------------------------------------------------------------
  1422. X%fkey
  1423. XUsage: fkey [<keyset_name>]
  1424. X
  1425. XThis command allows the mapping of function keys F1-F12, PgUp, PgDn, End
  1426. Xand Ins and the cursor up, down, left and right keys to emit a desired
  1427. Xsequence of characters when a function key is pressed.  <keyset_name>
  1428. Xspecifies which key set in ~/.ecu/keys is to be selected: Sample entry
  1429. Xin ~/.ecu/keys:
  1430. X
  1431. Xhayes
  1432. X    F1:escape:+ + +
  1433. X    F2:autoans:A T S 0 = 1 cr
  1434. X    F3:dial:A T D T
  1435. Xbbs
  1436. X    F1:cancel:^K
  1437. X    F2:yes:y cr
  1438. X
  1439. XIf a keyset_name matches a logical dial directory name, it is loaded
  1440. Xwhen the number is dialed.
  1441. X#--------------------------------------------------------------------
  1442. X%fkmap
  1443. XUsage: fkmap                           display current mapping
  1444. X       fkmap <keyname>                 display single key mapping
  1445. X       fkmap <keyname> <keylist>       modify a key's mapping
  1446. X       fkmap -r                        reset to original mapping
  1447. X       fkmap -s <file>                 append current to file
  1448. X
  1449. XThis command manages the mechanism ECU uses to recognize function keys
  1450. Xwhen they are entered at the console.  If supplied, the first argument to
  1451. Xthe command must be the recognized name of a function key from the list:
  1452. X
  1453. XF1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Home End PgUp PgDn CUP CUL CU5 CUR CUD
  1454. X
  1455. XIf only one argument is supplied, the mapping for the specified key is
  1456. Xdisplayed.  If more than one argument is supplied, the keyboard mapping is
  1457. Xchanged.  Arguments 2-n are character code specifiers in the format used
  1458. Xto define a funckeymap entry.
  1459. X
  1460. XWARNING: If found to be syntactically correct, a mapping change is
  1461. Xinstalled immediately.  If incorrect mapping of the HOME key is requested,
  1462. Xyou may lose control of ECU.
  1463. X#--------------------------------------------------------------------
  1464. X%hangup
  1465. XUsage: hangup
  1466. X
  1467. XThis causes DTR to be momentarily interrupted, terminating any
  1468. Xoutstanding connection.  Your DCE (modem) must be able to drop carrier
  1469. Xupon loss of DTR.
  1470. X#--------------------------------------------------------------------
  1471. X%help
  1472. XUsage: help [<cmd-name>]
  1473. X
  1474. XIssuing this command with no argument displays a list of commands
  1475. Xfollowed by a request for a command for further information.
  1476. X#--------------------------------------------------------------------
  1477. X%kbdtest
  1478. XUsage: kbdtest
  1479. X
  1480. XThis command runs a keyboard test which asks you to press function keys
  1481. X(e.g., F1).  For each key pressed, ECU gives you the actual character
  1482. Xsequence generated by the key.  It also tells you which function key it
  1483. Xrecognizes (if any).  mapping of keyboard generated character sequences
  1484. Xto ECU internal key codes.  The command is useful for verifying and
  1485. Xdebugging a "funckeymap" entry.  To exit the test at any time, press the
  1486. Xescape key.
  1487. X#--------------------------------------------------------------------
  1488. X%llp
  1489. XUsage: llp
  1490. X
  1491. XThis command is a shorthand version of 'log /dev/lp'.
  1492. X/dev/lp must not be under the control of a print spooler.
  1493. X#--------------------------------------------------------------------
  1494. X%loff
  1495. XUsage: loff
  1496. X
  1497. XThis command is shorthand for 'log off'.  If session logging
  1498. Xis active, it is turned off.
  1499. X#--------------------------------------------------------------------
  1500. X%log
  1501. XUsage: log [-s] [-r] [ | off | filename ]
  1502. X       -s "scratch" previous file contents; otherwise append
  1503. X       -r "raw" logging; otherwise non-printable characters
  1504. X          other than tab and newline are omitted from the log
  1505. X
  1506. XThis command controls session logging; issuing the command with no
  1507. Xargument causes the status of session logging to be displayed.  The
  1508. Xspecial argument 'off' causes active logging to be terminated.  Other
  1509. Xargument values cause logging to start using the argument as a filename.
  1510. XIssuing a 'log filename' command when logging is already active causes
  1511. Xthe previous file to be closed and the new file to be opened.  Switches
  1512. Xare meaningful only when used in conjunction with a filename to start
  1513. Xlogging.
  1514. X#--------------------------------------------------------------------
  1515. X%memstat
  1516. XUsage: memstat
  1517. X
  1518. XExperimental malloc display.  -lmalloc bug may report erroneous data.
  1519. X#--------------------------------------------------------------------
  1520. X%nl
  1521. XUsage: nl
  1522. X
  1523. XDisplay the current setting of CR/LF mapping.  For more information,
  1524. Xrefer to the 'nlin' and 'nlout' command descriptions.
  1525. X#--------------------------------------------------------------------
  1526. X%nlin
  1527. XUsage: nlin [<y-n>]
  1528. X
  1529. XThis command controls whether or not a newline (NL/LF) character is sent
  1530. Xto the screen upon receipt of a carriage return (CR) from the remote
  1531. Xsystem.  Most remote computers supply a NL after CR.  When communicating
  1532. Xwith another terminal in a "teletype conversation", this is generally
  1533. Xnot the case (see also the 'duplex' command).
  1534. X
  1535. XIssuing the command without <y-n> causes the current setting to be
  1536. Xdisplayed.  The format of <y-n> is flexible: 'y' or '1' enables
  1537. Xappending NL to CR, 'n' or '0' causes the feature to be disabled.
  1538. X#--------------------------------------------------------------------
  1539. X%nlout
  1540. XUsage: nlout [<y-n>]
  1541. X
  1542. XThis command controls whether or not a newline (NL/LF) character is sent
  1543. Xto the remote system upon transmission of a carriage return (CR) entered
  1544. Xby the keyboard.  Most remote computers do not require (indeed
  1545. X"dislike") a NL after CR.  When communicating with another terminal in a
  1546. X"teletype conversation", this is generally not the case (see also the
  1547. X'duplex' command).
  1548. X
  1549. XIssuing the command without <y-n> causes the current setting to be
  1550. Xdisplayed.  The format of <y-n> is flexible: 'y' or '1' enables
  1551. Xappending NL to CR, 'n' or '0' causes the feature to be disabled.
  1552. X#--------------------------------------------------------------------
  1553. X%parity
  1554. XUsage: parity [ None | Even | Odd ]
  1555. X
  1556. XThis command controls the parity of characters transmitted by the
  1557. Xkeyboard.  Issuing the command with no parameter displays the current
  1558. Xsetting.  When the parameter is supplied, only the first character is
  1559. Xrequired.  Even or odd parity implies seven data bits; no parity implies
  1560. Xeight data bits.  Parity of incoming characters is not checked.
  1561. X
  1562. XThe setting may be automatically changed as the result of a 'dial'
  1563. Xcommand.  See also the 'baud' and 'dial' command descriptions.
  1564. X#--------------------------------------------------------------------
  1565. X%pid
  1566. XUsage: pid
  1567. X
  1568. XThis command displays the process id of the ecu transmitter process, the
  1569. Xecu receiver process and the process ids of ecu's parent and group.
  1570. X#--------------------------------------------------------------------
  1571. X%ptrace
  1572. XUsage: ptrace [ 0 | 1 | on | off]
  1573. X
  1574. XThis command controls whether or not procedure execution is to be
  1575. Xtraced.
  1576. X#--------------------------------------------------------------------
  1577. X%pwd
  1578. XUsage: pwd
  1579. X
  1580. XThis command prints the current working directory of the ecu process.
  1581. X#--------------------------------------------------------------------
  1582. X%rk
  1583. XUsage: rk
  1584. X
  1585. XThis command searches the PATH list for 'ckermit' (Columbia University
  1586. XC-Kermit) and invokes it to receive files.  See the ecu documentation
  1587. Xfor modifications necessary to ckermit for ecu operation.  The file
  1588. X~/.kermrc must be set up to have any desired initialization parameters
  1589. Xyou desire.  Refer to C-Kermit documentation for more information.
  1590. X#--------------------------------------------------------------------
  1591. X%rs
  1592. XUsage: rs
  1593. X
  1594. XThis command invokes a SEAlink receive protocol.
  1595. X#--------------------------------------------------------------------
  1596. X%redial
  1597. XUsage: redial [<retry-count> [<pause-interval>]]
  1598. X
  1599. XThis command redials a number previously dialed with the 'dial' command.
  1600. XModem status is tested and multiple retries may be made.  <retry-count>
  1601. Xspecifies how many retries are to be made.  <pause-interval> specifies
  1602. Xhow many seconds the program pauses after a failure to connect.  You
  1603. Xmust specify <retry-count> in order to specify <pause-interval>.  The
  1604. Xdefault value for <retry-count> is 10, for <pause-interval> is 60.
  1605. X
  1606. XYou should know that in some jurisdictions, it is ILLEGAL to dial the
  1607. Xsame telephone number more than a specified number of times during some
  1608. Xinterval of time.  In any case, specifying <pause-interval> less than 15
  1609. Xseconds is silently changed to 15 seconds.
  1610. X#--------------------------------------------------------------------
  1611. X%rev
  1612. XUsage: rev
  1613. X
  1614. XThis command displays ecu's revision, the transmitter process id and the
  1615. Xdate and time ecu was made.
  1616. X#--------------------------------------------------------------------
  1617. X%rx
  1618. XUsage: rx
  1619. X
  1620. XThis command invokes a modified version of Chuck Forsberg's rz program
  1621. X(version 1.31) to receive files from the remote system using XMODEM/CRC.
  1622. X
  1623. XAfter entering the command, you are prompted as to whether or not file
  1624. XCR/LF characters are to be converted to newlines.  If you are
  1625. Xtransferring text files from a system which contain CR/LF line
  1626. Xterminators, you must answer yes to this question.  You should answer no
  1627. Xwhen transferring binary files, such as executables, .arc files and the
  1628. Xlike.  File transfer progress is presented on a visual display.  To
  1629. Xabort the transfer, press your interrupt key (usually DEL unless reset
  1630. Xwith stty(C)).
  1631. X#--------------------------------------------------------------------
  1632. X%ry
  1633. XUsage: ry
  1634. X
  1635. XThis command invokes a modified version of Chuck Forsberg's rz program
  1636. X(version 1.31) to receive files from the remote system using YMODEM
  1637. Xbatch with CRC-16 error correction.  The YMODEM is "true YMODEM", not
  1638. XXMODEM-1k.  File transfer progress is presented on a visual display.  To
  1639. Xabort the transfer, press your interrupt key (usually DEL unless reset
  1640. Xwith stty(C)).
  1641. X#--------------------------------------------------------------------
  1642. X%rz
  1643. XUsage: rz
  1644. X
  1645. XThis command invokes a modified version of Chuck Forsberg's rz program
  1646. X(version 1.44) to receive files from the remote system using
  1647. XZMODEM/CRC32.  File transfer progress is presented on a visual display.
  1648. XTo abort the transfer, press your interrupt key (usually DEL unless
  1649. Xreset with stty(C)).
  1650. X#--------------------------------------------------------------------
  1651. X%sk
  1652. XUsage: sk [<file-list>]
  1653. X
  1654. XThis command searches the PATH list for 'ckermit' (Columbia University
  1655. XC-Kermit) and invokes it to send files.  The file ~/.kermrc must be set
  1656. Xup to have any desired initialization paraeters you desire.  See the ecu
  1657. Xdocumentation for modifications necessary to ckermit for ecu operation.
  1658. X
  1659. XAfter entering the command, you are prompted as to whether or not file
  1660. Xnewline characters are to be converted to CR/LF.  If you are
  1661. Xtransferring text files to a system which requires CR/LF line
  1662. Xterminators, you must answer yes to this question.  You should answer no
  1663. Xwhen transferring binary files, such as executables, .arc files and the
  1664. Xlike.  You are prompted to enter a list of files to send, which may
  1665. Xcontain one or more wildcard specifications.
  1666. X
  1667. XThe file ~/.kermrc must be set up to have any desired initialization
  1668. Xparameters you desire.  Refer to C-Kermit documentation for more
  1669. Xinformation.
  1670. X#--------------------------------------------------------------------
  1671. X%ss
  1672. XUsage: ss [<file-list>]
  1673. X
  1674. XThis command invokes a SEAlink file transmission protocol.
  1675. X#--------------------------------------------------------------------
  1676. X%stat
  1677. XUsage: stat
  1678. X
  1679. XThis command displays statistics about ecu usage.
  1680. X
  1681. XExample display when not connected to a remote system:
  1682. XDate/time: 06-14-1988 11:40:35 (UTC 15:40)
  1683. XTotal chars transmitted: 178
  1684. XTotal chars received:    3681
  1685. X
  1686. XDate/time: 06-14-1988 14:41:24 (UTC 18:41)
  1687. XConnected to CompuHost (555-1234) at 14:40:57
  1688. XParameters: 2400-N-1 Connect time: 00:01:27
  1689. XTotal chars transmitted: 234 (since CONNECT 142)
  1690. XTotal chars received:    2278 (since CONNECT 1478)
  1691. X#--------------------------------------------------------------------
  1692. X%sx
  1693. XUsage: sx [<file-name>]
  1694. X
  1695. XThis command invokes a modified version of Chuck Forsberg's sz program
  1696. X(version 1.44) to send a file to the remote system using XMODEM/CRC.
  1697. X
  1698. XAfter entering the command, you are prompted as to whether or not file
  1699. XCR/LF characters are to be converted to newlines.  If you are
  1700. Xtransferring text files from a system which contain CR/LF line termi-
  1701. Xnators, you must answer yes to this question.  You should answer no when
  1702. Xtransferring binary files, such as executables, .arc files and the like.
  1703. X
  1704. XYou are prompted to enter a filename to send.  File transfer progress is
  1705. Xpresented on a visual display.  To abort the transfer, press your
  1706. Xinterrupt key (usually DEL unless reset with stty(C)).
  1707. X#--------------------------------------------------------------------
  1708. X%sy
  1709. XUsage: sy [<file-list>]
  1710. X
  1711. XThis command invokes a modified version of Chuck Forsberg's sz program
  1712. X(version 1.44) to send file(s) to the remote system using YMODEM/CRC.
  1713. X
  1714. XYou are prompted to enter filename(s) to send, which may consist of one
  1715. Xor more wildcard specifications.  File transfer progress is presented on
  1716. Xa visual display.  To abort the transfer, press your interrupt key
  1717. X(usually DEL unless reset with stty(C)).
  1718. X#--------------------------------------------------------------------
  1719. X%sz
  1720. XUsage: sz [<file-list>]
  1721. X
  1722. XThis command invokes a modified version of Chuck Forsberg's sz program
  1723. X(version 1.44) to send file(s) to the remote system using ZMODEM/CRC32.
  1724. X
  1725. XYou are prompted to enter filename(s) to send, which may consist of one
  1726. Xor more wildcard specifications.  File transfer progress is presented on
  1727. Xa visual display.  To abort the transfer, press your interrupt key
  1728. X(usually DEL unless reset with stty(C)).
  1729. X
  1730. XNote: if you specify sending only newer files and the remote receiver
  1731. Xdoes not support the feature, it may skip (reject) all your files.
  1732. XRetry the transfer specifying 'N' to 'Transfer only newer files'.
  1733. X#--------------------------------------------------------------------
  1734. X%time
  1735. XUsage: time
  1736. X
  1737. XThis command displays the local date and time as well as the current UTC.
  1738. X#--------------------------------------------------------------------
  1739. X%tty
  1740. XUsage: tty
  1741. X
  1742. XThis command displays the current console tty name.
  1743. X#--------------------------------------------------------------------
  1744. X%exit
  1745. XUsage: exit
  1746. X
  1747. XThis command terminates ecu promptly.  If your modem does not drop
  1748. Xcarrier upon loss of Data Terminal Ready (DTR), you must use the
  1749. X'hangup' command prior to issuing the 'exit' command.  It is strongly
  1750. Xrecommended that you configure your modem to hang up the phone line when
  1751. XDTR drops.  A shorthand version of this command exists: '.' is
  1752. Xequivalent to 'exit'.
  1753. X#--------------------------------------------------------------------
  1754. X%xon
  1755. XUsage: xon [<arg>]
  1756. Xwhere <arg> is on    input and output flow control
  1757. X               off   no flow control
  1758. X               in    input flow control
  1759. X               out   output flow control
  1760. X
  1761. XThis command enables or disables xon/xoff flow control.  If the
  1762. Xargument is omitted, the current flow control state is displayed.
  1763. X#--------------------------------------------------------------------
  1764. X%!
  1765. XUsage: !
  1766. X       !<command>
  1767. X
  1768. XThe '!' command is a shell escape.  The environment variable SHELL is
  1769. Xread to determine what shell program to execute (e.g., /bin/sh, etc).
  1770. XIf '!' is entered by itself, an interactive shell is started; press ^D
  1771. Xto exit back to ecu.  If <command> is supplied, it is executed by the
  1772. Xshell with an immediate return to ecu.
  1773. X
  1774. XSimilarly,
  1775. X  '$' causes the communications line to be stdin and stdout
  1776. X      for the spawned shell
  1777. X  '-' is similar to '>', except the command is executed directly
  1778. X      without going through a shell.
  1779. X#--------------------------------------------------------------------
  1780. X%$
  1781. XUsage: $
  1782. X       $<command>
  1783. X
  1784. XThe '$' command is a shell escape causing the communications line to be
  1785. Xthe stand input and output.  The environment variable SHELL is read to
  1786. Xdetermine what shell program to execute (e.g., /bin/sh, etc).  If '$' is
  1787. Xentered by itself, an interactive shell is started; a ^D received from
  1788. Xthe communications line causes the shell to terminate and control to be
  1789. Xpassed back to ecu.  If <command> is supplied, it is executed by the
  1790. Xshell with an immediate return to ecu.
  1791. X#--------------------------------------------------------------------
  1792. X%-
  1793. XUsage: -<command>
  1794. X
  1795. XThe '-' command causes <command> to be executed directly without
  1796. Xpassing through a shell (no wildcard expansion or other shell
  1797. Xprocessing occurs).  Standard input, output and error all are
  1798. Xopened to the console.  In addition, all other files (including
  1799. Xthe communications line) opened by ecu remain open.
  1800. X#--------------------------------------------------------------------
  1801. X%?
  1802. XUsage: ?
  1803. X
  1804. XThis is an alias for the help command.
  1805. X#--------------------------------------------------------------------
  1806. X%clrx
  1807. XUsage: clrx
  1808. X
  1809. XThe 'clrx' command simulates receipt of an XON by ECU.  It is useful
  1810. Xin the rare circumstances that an XOFF is received by ECU from a 
  1811. Xremote system and no later XON is received.
  1812. X#--------------------------------------------------------------------
  1813. X%pcmd
  1814. XUsage: pcmd <procedure command>
  1815. X
  1816. XThe 'pcmd' command allows a procedure command to be issued from the
  1817. Xinteractive command prompt.  It is primarily intended for debugging
  1818. Xprocedure commands, but it is available for any use.
  1819. X#--------------------------------------------------------------------
  1820. X%plog
  1821. XUsage: plog [<filename> | off | ]
  1822. X
  1823. XThe 'plog' command turns on or off procedure logging.  If the
  1824. Xargument to the command is 'off', logging is turned off, otherwise
  1825. Xlogging is started on the specified file.  If no argument is specified,
  1826. Xthe status of procedure logging is displayed.
  1827. X#--------------------------------------------------------------------
  1828. X%rtscts
  1829. Xusage: rtscts [ off | on | no | yes | 0..7 ]
  1830. X
  1831. XThis command turns on or off the driver RTS and CTS flow control if
  1832. Xsupport is provided by the OS. This is a complex subject
  1833. Xand you should refer to the manual and the UNIX oral/net
  1834. Xtradition if you are confused.
  1835. X
  1836. XFor SCO:
  1837. Xargument | RTSFLOW | CTSFLOW   argument | RTSFLOW | CTSFLOW | CRTSFL
  1838. X---------+---------+---------  ---------+---------+---------+--------
  1839. X  off    |   0     |   0         0      |   0     |   0     |
  1840. X  on     |   0     |   1         1      |   0     |   1     |
  1841. X  no     |   0     |   0         2      |   1     |   0     |
  1842. X  yes    |   0     |   1         3      |   1     |   1     |
  1843. X                                 4      |   0     |   0     |   1
  1844. X
  1845. XChoice 4 only works on SCO 3.2v4 and ODT 2.0.  As you can see, numeric
  1846. Xvalues are masks.  If the 4 bit is present in the numeric value, it
  1847. Xoverrides the lower-order bits: Specifying 7 as an argument specifies
  1848. XCRTSFL is to be used if it is supported, otherwise RTSFLOW and CTSFLOW.
  1849. SHAR_EOF
  1850. true || echo 'restore of help/ecuhelp.src failed'
  1851. fi
  1852. echo 'End of ecu320 part 22'
  1853. echo 'File help/ecuhelp.src is continued in part 23'
  1854. echo 23 > _shar_seq_.tmp
  1855. exit 0
  1856.  
  1857. exit 0 # Just in case...
  1858.