ecufkey.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. /*+-----------------------------------------------------------------
  2. ecufkey.c -- function key definition
  3. wht@wht.net
  4. Defined functions:
  5. ffso(str)
  6. ikde_to_xf(ikde)
  7. kde_fgets(buf, bufsize, fp)
  8. kde_name_to_ikde(keystr)
  9. kde_text(ikde)
  10. keyset_define_key(bufptr)
  11. keyset_display()
  12. keyset_idstr(ikde)
  13. keyset_init()
  14. keyset_read(name)
  15. xf_text(xf)
  16. xf_to_ikde(xf)
  17. ------------------------------------------------------------------*/
  18. /*+:EDITS:*/
  19. /*:04-26-2000-11:15-wht@bob-RELEASE 4.42 */
  20. /*:01-24-1997-02:37-wht@yuriatin-SOURCE RELEASE 4.00 */
  21. /*:09-11-1996-20:00-wht@yuriatin-3.48-major telnet,curses,structural overhaul */
  22. /*:11-23-1995-11:20-wht@kepler-source control 3.37 for tsx-11 */
  23. /*:11-14-1995-10:23-wht@kepler-3.37.80-source control point: SOCKETS */
  24. /*:03-12-1995-03:27-wht@kepler-use ECU_MAXPN */
  25. /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  26. /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  27. /*:01-30-1993-12:17-wht@n4hgf-remove gcc < 1.40 bug workaround */
  28. /*:01-11-1993-15:42-wht@n4hgf-declare skip_ld_break */
  29. /*:01-01-1993-12:52-wht@n4hgf-add procedure binding for function keys */
  30. /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  31. /*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
  32. /*:04-17-1992-16:29-wht@n4hgf-initialize keyset to SCO "ANSI" send strings */
  33. /*:09-01-1991-05:16-wht@n4hgf2-allow comments and whitespace after names */
  34. /*:08-31-1991-13:21-wht@n4hgf2-look for keys file in CFG_EcuLibDir */
  35. /*:08-16-1991-00:11-wht@n4hgf-keyset_init loads default keyset if found */
  36. /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
  37. /*:07-12-1991-13:57-wht@n4hgf-GCC140 fix update */
  38. /*:05-21-1991-00:45-wht@n4hgf-added -3 error code to keyset_read */
  39. /*:05-21-1991-00:37-wht@n4hgf-improve fkey load error detection */
  40. /*:05-16-1991-15:05-wht@n4hgf-gcc binary exploded in keyset_display */
  41. /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  42. #include "ecu.h"
  43. #include "ecukey.h"
  44. #include "ecufkey.h"
  45. #include "ecuxkey.h"
  46. #include "ecufork.h"
  47. char *str_token();
  48. char *skip_ld_break();
  49. extern char kbdintr; /* current input INTR */
  50. extern char curr_dir[ECU_MAXPN]; /* current working key defns */
  51. KDE keyset_table[KDE_COUNT];
  52. char keyset_name[256] = "";
  53. KDEMAP kdemap[] =
  54. {
  55. {XFcurup, IKDE_CUU, "CUU", "\033[A"},
  56. {XFcurdn, IKDE_CUD, "CUD", "\033[B"},
  57. {XFcurrt, IKDE_CUR, "CUR", "\033[C"},
  58. {XFcurlf, IKDE_CUL, "CUL", "\033[D"},
  59. {XFcur5, IKDE_CU5, "CU5", "\033[E"},
  60. {XFend, IKDE_END, "End", "\033[F"},
  61. {XFpgdn, IKDE_PGDN, "PgDn", "\033[G"},
  62. {XFhome, IKDE_HOME, "Home", "\033[H"},
  63. {XFpgup, IKDE_PGUP, "PgUp", "\033[I"},
  64. {XFins, IKDE_INS, "Ins", "\033[L"},
  65. {XF1, IKDE_F1, "F1", "\033[M"},
  66. {XF2, IKDE_F2, "F2", "\033[N"},
  67. {XF3, IKDE_F3, "F3", "\033[O"},
  68. {XF4, IKDE_F4, "F4", "\033[P"},
  69. {XF5, IKDE_F5, "F5", "\033[Q"},
  70. {XF6, IKDE_F6, "F6", "\033[R"},
  71. {XF7, IKDE_F7, "F7", "\033[S"},
  72. {XF8, IKDE_F8, "F8", "\033[T"},
  73. {XF9, IKDE_F9, "F9", "\033[U"},
  74. {XF10, IKDE_F10, "F10", "\033[V"},
  75. {XF11, IKDE_F11, "F11", "\033[W"},
  76. {XF12, IKDE_F12, "F12", "\033[X"},
  77. {XFbktab, IKDE_BKTAB, "BkTab", "\033[Z"},
  78. {XF_not_yet, IKDE_InitStr, "IS", ""},
  79. {0, 0, "", ""}
  80. };
  81. /*+-------------------------------------------------------------------------
  82. keyset_init()
  83. --------------------------------------------------------------------------*/
  84. void
  85. keyset_init()
  86. {
  87. int itmp;
  88. KDE *tkde;
  89. KDEMAP *kmap;
  90. for (itmp = 0; itmp < KDE_COUNT; itmp++)
  91. {
  92. tkde = &keyset_table[itmp];
  93. tkde->logical[0] = 0;
  94. tkde->ikde = (uchar) itmp;
  95. }
  96. kmap = kdemap;
  97. while (kmap->xf)
  98. {
  99. if (kmap->ikde <= IKDE_lastKey)
  100. {
  101. tkde = &keyset_table[kmap->ikde];
  102. sprintf(tkde->logical, "SCO %s", kmap->name);
  103. strcpy(tkde->str, kmap->init);
  104. tkde->count = strlen(tkde->str);
  105. }
  106. kmap++;
  107. }
  108. keyset_name[0] = 0;
  109. tkde = &keyset_table[IKDE_BKTAB];
  110. strcpy(tkde->logical, "redisplay");
  111. tkde->count = KACT_REDISPLAY;
  112. tkde = &keyset_table[IKDE_HOME];
  113. strcpy(tkde->logical, "ecu cmd");
  114. tkde->count = KACT_COMMAND;
  115. tkde = &keyset_table[IKDE_INS];
  116. strcpy(tkde->logical, "local shell");
  117. tkde->count = KACT_LOCAL_SHELL;
  118. tkde = &keyset_table[IKDE_CU5];
  119. strcpy(tkde->logical, "screen dump");
  120. tkde->str[0] = 0x7F; /* this key is intercepted by kbd read
  121. * routine */
  122. tkde->count = 0;
  123. } /* end of keyset_init */
  124. /*+-------------------------------------------------------------------------
  125. kde_fgets(buf,bufsize,fp) - read and evaluate key file line
  126. Returns:
  127. KDETYPE_COMMENT comment or blank line (null, all blank or "#"
  128. as non-blank)
  129. KDETYPE_NAME "name" (non "#\t " in column 1)
  130. KDETYPE_ENTRY "entry" ("\t " in column 1)
  131. KDETYPE_EOF end of file
  132. --------------------------------------------------------------------------*/
  133. int
  134. kde_fgets(buf, bufsize, fp)
  135. char *buf;
  136. int bufsize;
  137. FILE *fp;
  138. {
  139. int itmp;
  140. char *cp;
  141. if (!fgets(buf, bufsize, fp))
  142. {
  143. return (KDETYPE_EOF);
  144. }
  145. if (!(itmp = strlen(buf)))
  146. return (KDETYPE_COMMENT);
  147. if (buf[itmp - 1] == NL)
  148. {
  149. buf[itmp - 1] = 0;
  150. itmp--;
  151. }
  152. if (!itmp)
  153. return (KDETYPE_COMMENT);
  154. cp = buf;
  155. itmp = (strchr(" \t", *cp)) ? KDETYPE_ENTRY : KDETYPE_NAME;
  156. while (*cp && ((*cp == SPACE) || (*cp == TAB)))
  157. cp++;
  158. if (!*cp || (*cp == '#'))
  159. return (KDETYPE_COMMENT);
  160. return (itmp);
  161. } /* end of kde_fgets */
  162. /*+-------------------------------------------------------------------------
  163. kde_name_to_ikde(keystr)
  164. --------------------------------------------------------------------------*/
  165. int
  166. kde_name_to_ikde(keystr)
  167. char *keystr;
  168. {
  169. KDEMAP *kmap = kdemap;
  170. while (kmap->xf != 0)
  171. {
  172. if (!strcmpi(kmap->name, keystr))
  173. return ((int)kmap->ikde);
  174. kmap++;
  175. }
  176. return (-1);
  177. } /* end of kde_name_to_ikde */
  178. /*+-------------------------------------------------------------------------
  179. keyset_idstr(ikde)
  180. --------------------------------------------------------------------------*/
  181. char *
  182. keyset_idstr(ikde)
  183. int ikde;
  184. {
  185. KDEMAP *kmap = kdemap;
  186. while (kmap->xf)
  187. {
  188. if ((int)kmap->ikde == ikde)
  189. return (kmap->name);
  190. kmap++;
  191. }
  192. return ((char *)0);
  193. } /* end of keyset_idstr */
  194. /*+-------------------------------------------------------------------------
  195. xf_to_ikde(xf)
  196. --------------------------------------------------------------------------*/
  197. int
  198. xf_to_ikde(xf)
  199. UINT xf;
  200. {
  201. KDEMAP *kmap = kdemap;
  202. while (kmap->xf)
  203. {
  204. if (kmap->xf == xf)
  205. return ((int)kmap->ikde & 0xFF);
  206. kmap++;
  207. }
  208. return (-1);
  209. } /* end of xf_to_ikde */
  210. /*+-------------------------------------------------------------------------
  211. ikde_to_xf(ikde)
  212. --------------------------------------------------------------------------*/
  213. int
  214. ikde_to_xf(ikde)
  215. char ikde;
  216. {
  217. KDEMAP *kmap = kdemap;
  218. while (kmap->xf)
  219. {
  220. if (kmap->ikde == ikde)
  221. return (kmap->xf);
  222. kmap++;
  223. }
  224. return (-1);
  225. } /* end of ikde_to_xf */
  226. /*+-------------------------------------------------------------------------
  227. kde_text(ikde) - ikde value to text
  228. --------------------------------------------------------------------------*/
  229. char *
  230. kde_text(ikde)
  231. int ikde;
  232. {
  233. KDEMAP *kmap = kdemap;
  234. while (kmap->xf)
  235. {
  236. if (kmap->ikde == (char)ikde)
  237. return (kmap->name);
  238. kmap++;
  239. }
  240. return ("??");
  241. } /* end of xf_to_ikde */
  242. /*+-------------------------------------------------------------------------
  243. xf_text(xf) - XFkey to text
  244. --------------------------------------------------------------------------*/
  245. char *
  246. xf_text(xf)
  247. UINT xf;
  248. {
  249. static char sc8[8];
  250. switch (xf)
  251. {
  252. case XFcurup:
  253. return ("CUU");
  254. case XFcurdn:
  255. return ("CUD");
  256. case XFcurrt:
  257. return ("CUR");
  258. case XFcurlf:
  259. return ("CUL");
  260. case XFcur5:
  261. return ("CU5");
  262. case XFend:
  263. return ("End");
  264. case XFpgdn:
  265. return ("PgDn");
  266. case XFhome:
  267. return ("Home");
  268. case XFpgup:
  269. return ("PgUp");
  270. case XFins:
  271. return ("Ins");
  272. case XF1:
  273. return ("F1");
  274. case XF2:
  275. return ("F2");
  276. case XF3:
  277. return ("F3");
  278. case XF4:
  279. return ("F4");
  280. case XF5:
  281. return ("F5");
  282. case XF6:
  283. return ("F6");
  284. case XF7:
  285. return ("F7");
  286. case XF8:
  287. return ("F8");
  288. case XF9:
  289. return ("F9");
  290. case XF10:
  291. return ("F10");
  292. case XF11:
  293. return ("F11");
  294. case XF12:
  295. return ("F12");
  296. case XFbktab:
  297. return ("BkTab");
  298. }
  299. if ((xf >= XF_ALTA) && (xf <= XF_ALTZ))
  300. {
  301. sprintf(sc8, "Alt-%c", 'a' + xf - XF_ALTA);
  302. return (sc8);
  303. }
  304. sprintf(sc8, "XF_%02x\n", xf);
  305. return (sc8);
  306. } /* end of xf_text */
  307. /*+-------------------------------------------------------------------------
  308. keyset_define_key(bufptr)
  309. return 0 if no error, -1 if error
  310. --------------------------------------------------------------------------*/
  311. int
  312. keyset_define_key(bufptr)
  313. char *bufptr;
  314. {
  315. int itmp;
  316. int token_number;
  317. KDE *tkde = (KDE *) 0;
  318. int ikde = 0;
  319. char token_separator[8];
  320. char *token;
  321. char *syntax = "syntax error in key definition: %s\n";
  322. if ((itmp = strlen(bufptr)) && (bufptr[itmp - 1] == NL))
  323. bufptr[--itmp] = 0; /* strip trailing NL */
  324. if (!itmp)
  325. return (0);
  326. if ((*bufptr != SPACE) && (*bufptr != TAB)) /* if no leading space */
  327. return (0);
  328. while ((*bufptr == SPACE) || (*bufptr == TAB)) /* strip lding sp/tab */
  329. bufptr++;
  330. token_number = 0;
  331. strcpy(token_separator, ":");
  332. while (token = str_token(bufptr, token_separator))
  333. {
  334. bufptr = (char *)0; /* further calls to str_token need NULL */
  335. switch (token_number)
  336. {
  337. case 0: /* first field is key identifier */
  338. if ((ikde = kde_name_to_ikde(token)) < 0)
  339. {
  340. pprintf(syntax, keyset_name);
  341. pprintf(" %s is not a legal key identifier\n", token);
  342. return (-1);
  343. }
  344. if (ikde == IKDE_HOME)
  345. {
  346. pprintf(syntax, keyset_name);
  347. pprintf(" HOME cannot be redefined!\n");
  348. return (-1);
  349. }
  350. if (ikde == IKDE_CU5)
  351. {
  352. pprintf(syntax, keyset_name);
  353. pprintf(" CUR5 cannot be redefined!\n");
  354. return (-1);
  355. }
  356. if (ikde == IKDE_BKTAB)
  357. {
  358. pprintf(syntax, keyset_name);
  359. pprintf(" BkTab cannot be redefined!\n");
  360. return (-1);
  361. }
  362. tkde = &keyset_table[ikde];
  363. tkde->logical[0] = 0;
  364. tkde->count = 0;
  365. break;
  366. case 1: /* second field is logical key name */
  367. strncpy(tkde->logical, token, sizeof(tkde->logical));
  368. tkde->logical[sizeof(tkde->logical) - 1] = 0;
  369. strcpy(token_separator, " \t"); /* whitespace is tok sep
  370. * now */
  371. break;
  372. case 2:
  373. if (!strcmp(token, "proc"))
  374. {
  375. token = skip_ld_break(token + 5);
  376. strncpy(tkde->str, token, sizeof(tkde->str));
  377. tkde->str[sizeof(tkde->str) - 1] = 0;
  378. tkde->count = KACT_PROC;
  379. return (0); /* <<=========================== */
  380. }
  381. default: /* third and subsequent to define key */
  382. if (!strlen(token))
  383. continue;
  384. if (tkde->count == sizeof(tkde->str))
  385. {
  386. pprintf(syntax, keyset_name);
  387. pprintf(" %s: output count too long",
  388. keyset_idstr(ikde));
  389. return (-1);
  390. }
  391. if ((itmp = ascii_to_hex(token)) < 0)
  392. {
  393. pprintf(syntax, keyset_name);
  394. pprintf(" %s: '%s' invalid code\n",
  395. keyset_idstr(ikde), token);
  396. return (0);
  397. }
  398. tkde->str[tkde->count] = itmp;
  399. tkde->count++;
  400. break;
  401. } /* end of switch(token_number) */
  402. token_number++;
  403. } /* end while not end of record */
  404. return (0);
  405. } /* end of keyset_define_key */
  406. /*+-------------------------------------------------------------------------
  407. keyset_read(name)
  408. returns 0 on success, -1 if no .ecu/keys, -2 if no 'name', -3 if error
  409. --------------------------------------------------------------------------*/
  410. int
  411. keyset_read(name)
  412. char *name;
  413. {
  414. int itmp;
  415. int ikde;
  416. char ecukeys_name[128];
  417. char s128[128];
  418. FILE *fp_keys;
  419. get_home_dir(ecukeys_name);
  420. strcat(ecukeys_name, "/.ecu/keys"); /* someone may core dump here one
  421. * day */
  422. if (!(fp_keys = fopen(ecukeys_name, "r")))
  423. {
  424. strcpy(ecukeys_name, eculibdir);
  425. strcat(ecukeys_name, "/keys");
  426. if (!(fp_keys = fopen(ecukeys_name, "r")))
  427. return (-1);
  428. }
  429. /* find keyset name */
  430. itmp = 0;
  431. while ((ikde = kde_fgets(s128, sizeof(s128), fp_keys)) != KDETYPE_EOF)
  432. {
  433. if ((ikde == KDETYPE_NAME) && !strcmp(s128, name))
  434. {
  435. itmp = 1; /* success */
  436. break;
  437. }
  438. }
  439. if (!itmp) /* find match? */
  440. {
  441. fclose(fp_keys); /* nope */
  442. return (-2);
  443. }
  444. /*
  445. * read past any other keyset names matching this set
  446. * process 1st line of definition when found
  447. */
  448. memset(s128, 0, sizeof(s128));
  449. while ((ikde = kde_fgets(s128, sizeof(s128), fp_keys)) != KDETYPE_EOF)
  450. {
  451. if (ikde == KDETYPE_ENTRY)
  452. {
  453. if (keyset_define_key(s128) < 0)
  454. {
  455. fclose(fp_keys);
  456. keyset_init();
  457. return (-3);
  458. }
  459. break;
  460. }
  461. memset(s128, 0, sizeof(s128));
  462. }
  463. /*
  464. * read rest of definition
  465. */
  466. while ((ikde = kde_fgets(s128, sizeof(s128), fp_keys)) != KDETYPE_EOF)
  467. {
  468. switch (ikde)
  469. {
  470. case KDETYPE_COMMENT:
  471. continue;
  472. case KDETYPE_ENTRY:
  473. if (keyset_define_key(s128) < 0)
  474. {
  475. fclose(fp_keys);
  476. keyset_init();
  477. return (-3);
  478. }
  479. break;
  480. default:
  481. goto DONE;
  482. }
  483. }
  484. DONE:
  485. strncpy(keyset_name, name, sizeof(keyset_name));
  486. keyset_name[sizeof(keyset_name) - 1] = 0;
  487. fclose(fp_keys);
  488. return (0);
  489. } /* end of keyset_read */
  490. /*+-------------------------------------------------------------------------
  491. ffso(str)
  492. --------------------------------------------------------------------------*/
  493. void
  494. ffso(str)
  495. char *str;
  496. {
  497. tcap_stand_out();
  498. fputs(str, se);
  499. tcap_stand_end();
  500. } /* end of ffso */
  501. /*+-------------------------------------------------------------------------
  502. keyset_display()
  503. F1 xxxxx F2 xxxxx HOME xxxxx PGUP xxxxx
  504. F3 xxxxx F4 xxxxx END xxxxx PGDN xxxxx
  505. F5 xxxxx F6 xxxxx INS xxxxx CUR5 xxxxx
  506. F7 xxxxx F8 xxxxx BkTab xxxxx
  507. F9 xxxxx F10 xxxxx CUR^ xxxxx CUR> xxxxx
  508. F11 xxxxx F12 xxxxx CUR< xxxxx CURv xxxxx
  509. --------------------------------------------------------------------------*/
  510. void
  511. keyset_display()
  512. {
  513. int itmp;
  514. int itmp2;
  515. int clen1 = 0;
  516. char cfmt1[32];
  517. int clen2 = 0;
  518. char cfmt2[32];
  519. int clen3 = 0;
  520. char cfmt3[32];
  521. char cfmt4[32];
  522. KDE *tkde;
  523. if (!keyset_name[0])
  524. keyset_init();
  525. for (itmp = 0; itmp < KDE_COUNT; itmp++)
  526. {
  527. tkde = &keyset_table[itmp];
  528. itmp2 = strlen(tkde->logical);
  529. switch (itmp)
  530. {
  531. case IKDE_F1:
  532. case IKDE_F3:
  533. case IKDE_F5:
  534. case IKDE_F7:
  535. case IKDE_F9:
  536. case IKDE_F11:
  537. if (clen1 < itmp2)
  538. clen1 = itmp2;
  539. break;
  540. case IKDE_F2:
  541. case IKDE_F4:
  542. case IKDE_F6:
  543. case IKDE_F8:
  544. case IKDE_F10:
  545. case IKDE_F12:
  546. if (clen2 < itmp2)
  547. clen2 = itmp2;
  548. break;
  549. case IKDE_HOME:
  550. case IKDE_END:
  551. case IKDE_INS:
  552. case IKDE_CUU:
  553. case IKDE_CUL:
  554. if (clen3 < itmp2)
  555. clen3 = itmp2;
  556. break;
  557. case IKDE_InitStr: /* initialization string excluded */
  558. break;
  559. }
  560. }
  561. sprintf(cfmt1, " %%-%d.%ds", clen1, clen1);
  562. sprintf(cfmt2, " %%-%d.%ds", clen2, clen2);
  563. sprintf(cfmt3, " %%-%d.%ds", clen3, clen3);
  564. strcpy(cfmt4, " %s");
  565. ff(se, " key definition: %s\r\n\r\n", keyset_name);
  566. ffso(" F1 ");
  567. ff(se, cfmt1, keyset_table[IKDE_F1].logical);
  568. fputs(" ", se);
  569. ffso(" F2 ");
  570. ff(se, cfmt2, keyset_table[IKDE_F2].logical);
  571. fputs(" ", se);
  572. ffso(" Home ");
  573. ff(se, cfmt3, keyset_table[IKDE_HOME].logical);
  574. fputs(" ", se);
  575. ffso(" PgUp ");
  576. ff(se, cfmt4, keyset_table[IKDE_PGUP].logical);
  577. fputs("\r\n", se);
  578. ffso(" F3 ");
  579. ff(se, cfmt1, keyset_table[IKDE_F3].logical);
  580. fputs(" ", se);
  581. ffso(" F4 ");
  582. ff(se, cfmt2, keyset_table[IKDE_F4].logical);
  583. fputs(" ", se);
  584. ffso(" End ");
  585. ff(se, cfmt3, keyset_table[IKDE_END].logical);
  586. fputs(" ", se);
  587. ffso(" PgDn ");
  588. ff(se, cfmt4, keyset_table[IKDE_PGDN].logical);
  589. fputs("\r\n", se);
  590. ffso(" F5 ");
  591. ff(se, cfmt1, keyset_table[IKDE_F5].logical);
  592. fputs(" ", se);
  593. ffso(" F6 ");
  594. ff(se, cfmt2, keyset_table[IKDE_F6].logical);
  595. fputs(" ", se);
  596. ffso(" Ins ");
  597. ff(se, cfmt3, keyset_table[IKDE_INS].logical);
  598. fputs(" ", se);
  599. ffso(" CUR5 ");
  600. ff(se, cfmt4, keyset_table[IKDE_CU5].logical);
  601. fputs("\r\n", se);
  602. ffso(" F7 ");
  603. ff(se, cfmt1, keyset_table[IKDE_F7].logical);
  604. fputs(" ", se);
  605. ffso(" F8 ");
  606. ff(se, cfmt2, keyset_table[IKDE_F8].logical);
  607. fputs(" ", se);
  608. ffso(" BkTab");
  609. ff(se, cfmt3, keyset_table[IKDE_BKTAB].logical);
  610. fputs("\r\n", se);
  611. ffso(" F9 ");
  612. ff(se, cfmt1, keyset_table[IKDE_F9].logical);
  613. fputs(" ", se);
  614. ffso(" F10 ");
  615. ff(se, cfmt2, keyset_table[IKDE_F10].logical);
  616. fputs(" ", se);
  617. ffso(" CUR^ ");
  618. ff(se, cfmt3, keyset_table[IKDE_CUU].logical);
  619. fputs(" ", se);
  620. ffso(" CUR> ");
  621. ff(se, cfmt4, keyset_table[IKDE_CUR].logical);
  622. fputs("\r\n", se);
  623. ffso(" F11 ");
  624. ff(se, cfmt1, keyset_table[IKDE_F11].logical);
  625. fputs(" ", se);
  626. ffso(" F12 ");
  627. ff(se, cfmt2, keyset_table[IKDE_F12].logical);
  628. fputs(" ", se);
  629. ffso(" CUR< ");
  630. ff(se, cfmt3, keyset_table[IKDE_CUL].logical);
  631. fputs(" ", se);
  632. ffso(" CURv ");
  633. ff(se, cfmt4, keyset_table[IKDE_CUD].logical);
  634. fputs("\r\n\r\n", se);
  635. } /* end of keyset_display */
  636. /* end of ecufkey.c */
  637. /* vi: set tabstop=4 shiftwidth=4: */