home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume32 / ecu / part22 < prev    next >
Text File  |  1992-09-14  |  58KB  |  1,852 lines

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