Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

781 lines
21 KiB

  1. /*** mhcore - help extension for the Microsoft Editor
  2. *
  3. * Copyright <C> 1988, Microsoft Corporation
  4. *
  5. * This file contains the core, top-level entrypoints for the help extension.
  6. *
  7. * Revision History (most recent first):
  8. *
  9. * 16-Apr-1989 ln Increment ref count for psuedo file.
  10. * 12-Mar-1989 ln Various modifications for multiple context lookup.
  11. * 21-Feb-1989 ln Ensure that fPopUp initialized.
  12. * 14-Feb-1989 ln Enable BOXSTR
  13. * 26-Jan-1989 ln Correct key assignments
  14. * 13-Jan-1989 ln PWIN->PWND
  15. * 01-Dec-1988 ln Cleanup & dialog help
  16. * 03-Oct-1988 ln Change xref lookup to call HelpNc first (for xref in same
  17. * file), then SearchHelp (possibly in other files).
  18. * 28-Sep-1988 ln Changes for CW color and event support
  19. * 14-Sep-1988 ln Change event arg definition.
  20. * 12-Sep-1988 mz Made WhenLoaded match declaration
  21. * 31-Aug-1988 Added additional checks for null pointers
  22. * 01-Aug-1988 Add editor exit event, and detection of hot-keys which
  23. * aren't.
  24. * 28-Jul-1988 Change to "h." conventions.
  25. * 12-Jul-1988 Reverse SHIFT+F1 and F1.
  26. * 16-May-1988 Split out from mehelp.c
  27. * 18-Feb-1988 Made to work, in protect mode
  28. * 15-Dec-1987 Created, as test harness for the help engine.
  29. *
  30. *************************************************************************/
  31. #include <string.h> /* string functions */
  32. #include <malloc.h>
  33. #ifdef DEBUG
  34. #include <stdlib.h> /* for ltoa def */
  35. #endif
  36. #include "mh.h" /* help extension include file */
  37. #include "version.h" /* version file */
  38. /*
  39. * use double macro level to force rup to be turned into string representation
  40. */
  41. #define VER(x,y,z) VER2(x,y,z)
  42. #if defined(PWB)
  43. #define VER2(x,y,z) "Microsoft Editor Help Version v"###x##"."###y##"."###z##" - "##__DATE__" "##__TIME__
  44. #else
  45. #define VER2(x,y,z) "Microsoft Editor Help Version v1.02."###z##" - "##__DATE__" "##__TIME__
  46. #endif
  47. #define EXT_ID VER(rmj,rmm,rup)
  48. /*************************************************************************
  49. **
  50. ** Initialization of Global data in MH.H that needs it.
  51. */
  52. helpfile files[MAXFILES] = {{{0}}}; /* help file structs */
  53. flagType fInOpen = FALSE; /* TRUE=> currently opening win */
  54. #if defined(PWB)
  55. flagType fList = TRUE; /* TRUE=> search for and list dups*/
  56. #else
  57. flagType fList = FALSE; /* TRUE=> search for and list dups*/
  58. #endif
  59. flagType fPopUp = FALSE; /* current item is popup */
  60. flagType fCreateWindow = TRUE; /* create window? */
  61. int ifileCur = 0; /* Current index into files */
  62. nc ncCur = {0,0}; /* most recently accessed */
  63. nc ncLast = {0,0}; /* last topic displayed */
  64. PWND pWinHelp = 0; /* handle to window w/ help in */
  65. uchar far *pTopic = 0; /* mem for topic */
  66. uchar far *pTopicC = 0; /* mem for compressed topic */
  67. fl flIdle = {-1, -1}; /* last position of idle check */
  68. int hlColor = 0x07; /* normal: white on black */
  69. int blColor = 0x0f; /* bold: high white on black */
  70. int itColor = 0x0a; /* italics: high green on black */
  71. int ulColor = 0x0c; /* underline: high red on black */
  72. int wrColor = 0x70; /* warning: black on white */
  73. #ifdef DEBUG
  74. int delay = 0; /* message delay */
  75. #endif
  76. int cArg; /* number of <args> hit */
  77. flagType fInPopUp; /* TRUE=> currently in popup */
  78. flagType fSplit; /* TRUE=> window was split open */
  79. buffer fnCur; /* Current file being editted */
  80. char * fnExtCur; /* ptr to it's extension */
  81. buffer buf;
  82. nc ncInitLast; /* ncInit of most recent topic */
  83. nc ncInitLastFile; /* ncInit of most recent, our files*/
  84. char * pArgText; /* ptr to any single line text */
  85. char * pArgWord; /* ptr to context-sens word */
  86. PFILE pFileCur; /* file handle of user file */
  87. rn rnArg; /* range of argument */
  88. PFILE pHelp; /* help PFILE */
  89. PWND pWinUser; /* User's most recent window */
  90. buffer szLastFound; /* last context string found */
  91. flagType ExtensionLoaded = TRUE;
  92. /*
  93. ** assignments
  94. ** table of strings of macro definitions & key assignments
  95. */
  96. char *assignments[] = {
  97. #if !defined(PWB)
  98. "mhcontext:=arg mhelp.mhelp",
  99. "mhback:=meta mhelp.mhelpnext",
  100. "mhcontext:F1",
  101. "mhelp.mhelp:shift+F1",
  102. "mhelp.mhelpnext:ctrl+F1",
  103. "mhback:alt+F1",
  104. "mhelp.sethelp:alt+s",
  105. #else
  106. "pwbhelpcontext:=arg pwbhelp.pwbhelp",
  107. "pwbhelpback:=meta pwbhelp.pwbhelpnext",
  108. "pwbhelpindex:=arg \\\"h.index\\\" pwbhelp.pwbhelp",
  109. "pwbhelpcontents:=arg \\\"h.contents\\\" pwbhelp.pwbhelp",
  110. "pwbhelpagain:=arg pwbhelp.pwbhelpnext",
  111. "pwbhelpcontext:F1",
  112. "pwbhelp.pwbhelp:shift+F1",
  113. "pwbhelp.pwbhelpnext:ctrl+F1",
  114. "pwbhelpback:alt+F1",
  115. "pwbhelp.sethelp:shift+ctrl+s",
  116. #endif
  117. NULL
  118. };
  119. #if defined (OS2)
  120. char * szEntryName[NUM_ENTRYPOINTS] = {
  121. "_HelpcLines",
  122. "_HelpClose",
  123. "_HelpCtl",
  124. "_HelpDecomp",
  125. "_HelpGetCells",
  126. "_HelpGetInfo",
  127. "_HelpGetLine",
  128. "_HelpGetLineAttr",
  129. "_HelpHlNext",
  130. "_HelpLook",
  131. "_HelpNc",
  132. "_HelpNcBack",
  133. "_HelpNcCb",
  134. "_HelpNcCmp",
  135. "_HelpNcNext",
  136. "_HelpNcPrev",
  137. "_HelpNcRecord",
  138. "_HelpNcUniq",
  139. "_HelpOpen",
  140. "_HelpShrink",
  141. "_HelpSzContext",
  142. "_HelpXRef",
  143. "_LoadFdb",
  144. "_LoadPortion",
  145. };
  146. #else
  147. char * szEntryName[NUM_ENTRYPOINTS] = {
  148. "HelpcLines",
  149. "HelpClose",
  150. "HelpCtl",
  151. "HelpDecomp",
  152. "HelpGetCells",
  153. "HelpGetInfo",
  154. "HelpGetLine",
  155. "HelpGetLineAttr",
  156. "HelpHlNext",
  157. "HelpLook",
  158. "HelpNc",
  159. "HelpNcBack",
  160. "HelpNcCb",
  161. "HelpNcCmp",
  162. "HelpNcNext",
  163. "HelpNcPrev",
  164. "HelpNcRecord",
  165. "HelpNcUniq",
  166. "HelpOpen",
  167. "HelpShrink",
  168. "HelpSzContext",
  169. "HelpXRef",
  170. "LoadFdb",
  171. "LoadPortion",
  172. };
  173. #endif
  174. flagType LoadEngineDll(void);
  175. flagType pascal EXTERNAL mhelp (unsigned int argData, ARG far *pArg, flagType fMeta );
  176. flagType pascal EXTERNAL mhelpnext (unsigned int argData, ARG far *pArg, flagType fMeta );
  177. flagType pascal EXTERNAL sethelp (unsigned int argData, ARG far *pArg, flagType fMeta );
  178. /*** WhenLoaded - Routine called by Z when the extension is loaded
  179. *
  180. * This routine is called when Z loads the extension. We identify ourselves
  181. * and assign the default keystroke.
  182. *
  183. * Entry:
  184. * None
  185. *
  186. * Exit:
  187. * None
  188. *
  189. * Exceptions:
  190. * None
  191. *
  192. *************************************************************************/
  193. void EXTERNAL WhenLoaded () {
  194. char **pAsg;
  195. static char *szHelpName = "<mhelp>";
  196. #if !defined(PWB)
  197. PSWI fgcolor;
  198. #endif
  199. int ref; // reference count
  200. #if 0
  201. //
  202. // BUGBUG Delete when proved superfluous.
  203. //
  204. // Initialize global variables
  205. //
  206. cArg = 0;
  207. pArgText = NULL;
  208. pArgWord = NULL;
  209. pFileCur = NULL;
  210. fInOpen = FALSE;
  211. fInPopUp = FALSE;
  212. fSplit = FALSE;
  213. fCreateWindow = FALSE;
  214. fnExtCur = NULL;
  215. ifileCur = 0;
  216. pHelp = NULL;
  217. pWinHelp = NULL;
  218. pWinUser = NULL;
  219. pTopic = NULL;
  220. fList = FALSE;
  221. #endif
  222. if (!LoadEngineDll() ) {
  223. DoMessage( "mhelp: Cannot load help engine" );
  224. ExtensionLoaded = FALSE;
  225. return;
  226. }
  227. DoMessage (EXT_ID); /* display signon */
  228. /*
  229. ** Make default key assignments, & create default macros.
  230. */
  231. strcpy (buf, "arg \"");
  232. for (pAsg = assignments; *pAsg; pAsg++) {
  233. strcpy (buf+5, *pAsg);
  234. strcat (buf, "\" assign");
  235. fExecute (buf);
  236. }
  237. /*
  238. ** CW: Init CW specifics & set up the colors that we will use.
  239. */
  240. #if defined(PWB)
  241. mhcwinit ();
  242. hlColor = rgsa[FGCOLOR*2 +1];
  243. blColor |= hlColor & 0xf0;
  244. itColor |= hlColor & 0xf0;
  245. ulColor |= hlColor & 0xf0;
  246. wrColor |= (hlColor & 0x70) >> 8;
  247. fInPopUp = FALSE;
  248. #else
  249. /*
  250. * make semi-intellgent guesses on users colors.
  251. */
  252. if (fgcolor = FindSwitch("fgcolor")) {
  253. hlColor = *fgcolor->act.ival;
  254. blColor |= hlColor & 0xf0;
  255. itColor |= hlColor & 0xf0;
  256. ulColor |= hlColor & 0xf0;
  257. wrColor |= (hlColor & 0x70) >> 8;
  258. }
  259. #endif
  260. /*
  261. * create the psuedo file we'll be using for on-line help.
  262. */
  263. if (pHelp = FileNameToHandle(szHelpName,NULL)) {
  264. DelFile (pHelp);
  265. } else {
  266. pHelp = AddFile (szHelpName);
  267. FileRead (szHelpName, pHelp);
  268. }
  269. //
  270. // Increment the file's reference count so it can't be discarded
  271. //
  272. GetEditorObject (RQ_FILE_REFCNT | 0xff, pHelp, &ref);
  273. ref++;
  274. SetEditorObject (RQ_FILE_REFCNT | 0xff, pHelp, &ref);
  275. mhevtinit ();
  276. }
  277. /*****************************************************************
  278. *
  279. * LoadEngineDll
  280. *
  281. * Loads the help engine and initialize the table of function
  282. * pointers to the engine's entry points (pHelpEntry).
  283. *
  284. * Entry:
  285. * none
  286. *
  287. * Exit:
  288. * none
  289. *
  290. *******************************************************************/
  291. flagType
  292. LoadEngineDll (
  293. void
  294. ) {
  295. #if defined (OS2)
  296. USHORT rc;
  297. #endif
  298. CHAR szFullName[256];
  299. CHAR szErrorName[256];
  300. USHORT i;
  301. // Initialize pointers to NULL in case something goes wrong.
  302. for (i=0; i<LASTENTRYPOINT; i++) {
  303. pHelpEntry[i] = 0;
  304. }
  305. strcpy(szFullName, HELPDLL_BASE);
  306. strcpy(szErrorName, HELPDLL_NAME);
  307. #if defined (OS2)
  308. rc = DosLoadModule(szErrorName,
  309. 256,
  310. szFullName,
  311. &hModule);
  312. for (i=0; i<LASTENTRYPOINT; i++) {
  313. rc = DosQueryProcAddr(hModule,
  314. 0,
  315. szEntryName[i],
  316. (PFN *)&(pHelpEntry[i]));
  317. }
  318. #else
  319. hModule = LoadLibrary(szFullName);
  320. if ( !hModule ) {
  321. return FALSE;
  322. }
  323. for (i=0; i<LASTENTRYPOINT; i++) {
  324. pHelpEntry[i] = (PHF)GetProcAddress(hModule, szEntryName[i]);
  325. }
  326. return TRUE;
  327. #endif // OS2
  328. }
  329. /*** mhelp - editor help function
  330. *
  331. * main entry point for editor help functions.
  332. *
  333. * NOARG: - Get help on "Default"; change focus to help window.
  334. * META NOARG - prompt for keystroke and get help on that function; change
  335. * focus to help window.
  336. * NULLARG: - Get help on word at cursor position; change focus to help
  337. * window.
  338. * STREAMARG: - Get help on text argument; change focus to help window.
  339. * TEXTARG: - Get help on typed in word; change focus to help window.
  340. *
  341. * Entry:
  342. * Standard Z extension
  343. *
  344. * Exit:
  345. * Returns TRUE on successfull ability to get help on selected topic.
  346. *
  347. * Exceptions:
  348. * None
  349. *
  350. *************************************************************************/
  351. flagType pascal EXTERNAL mhelp (
  352. unsigned int argData, /* keystroke invoked with */
  353. ARG far *pArg, /* argument data */
  354. flagType fMeta /* indicates preceded by meta */
  355. ) {
  356. buffer tbuf; /* buf to put ctxt string into */
  357. char *pText = NULL; /* pointer to the lookup text */
  358. COL Col; /* Current cursor position */
  359. LINE Line;
  360. flagType RetVal; /* Return Value */
  361. UNREFERENCED_PARAMETER( argData );
  362. if ( !ExtensionLoaded ) {
  363. return FALSE;
  364. }
  365. GetTextCursor(&Col, &Line);
  366. switch (procArgs (pArg)) {
  367. //
  368. // null arg: context sensitive help. First, is we're looking at a help
  369. // topic, check for any cross references that apply to the current location.
  370. // If none do, then if a word was found when processing args, look that up.
  371. //
  372. case NULLARG:
  373. //
  374. // context-sensitive
  375. //
  376. if ((pFileCur == pHelp) && (pTopic)) {
  377. //
  378. // hot spot definition
  379. //
  380. hotspot hsCur;
  381. hsCur.line = (ushort)(rnArg.flFirst.lin+1);
  382. hsCur.col = (ushort)rnArg.flFirst.col+(ushort)1;
  383. if (pText = HelpXRef(pTopic, &hsCur)) {
  384. debmsg ("Xref=>");
  385. debmsg (pText);
  386. break;
  387. }
  388. }
  389. if (pArgText) {
  390. if (*pArgText && (pText = pArgWord)) {
  391. debmsg ("Ctxt=>");
  392. debmsg (pText);
  393. break;
  394. }
  395. }
  396. //
  397. // for stream and textarg types, the argument, if any, is that entered of
  398. // highlighted by the user.
  399. //
  400. case STREAMARG: /* context sensitive */
  401. case TEXTARG: /* user entered context */
  402. if (pArgText) {
  403. if (*pArgText) {
  404. pText = pArgText;
  405. }
  406. }
  407. case NOARG: /* default context */
  408. //
  409. // meta: prompt user for keystroke, get the name of the function assigned
  410. // to whatever he presses, and display help on that.
  411. //
  412. if (fMeta) {
  413. stat("Press Keystroke:");
  414. pText = ReadCmd()->name;
  415. }
  416. break;
  417. }
  418. //
  419. // If after everything above we still have no text, then use the default
  420. // context.
  421. //
  422. if (pText == NULL) {
  423. //
  424. // Default context
  425. //
  426. pText = "h.default";
  427. }
  428. debmsg (" Looking up:");
  429. debmsg (pText);
  430. debend (TRUE);
  431. RetVal = fHelpCmd ( xrefCopy(tbuf,pText) /* command */
  432. , (flagType)(pArg->argType != NOARG) /* change focus?*/
  433. , FALSE /* not pop-up */
  434. );
  435. return RetVal;
  436. }
  437. /*** mhelpnext - editor help traversal function
  438. *
  439. * Handles next and previous help access.
  440. *
  441. * mhelpnext - next physical
  442. * arg mhelpnext - next ocurrance
  443. * meta mhelpnext - previous viewed
  444. *
  445. * Entry:
  446. * Standard Z extension
  447. *
  448. * Exit:
  449. * Returns TRUE on successfull ability to get help on selected topic.
  450. *
  451. * Exceptions:
  452. * None
  453. *
  454. *************************************************************************/
  455. flagType pascal EXTERNAL mhelpnext (
  456. unsigned int argData, /* keystroke invoked with */
  457. ARG far *pArg, /* argument data */
  458. flagType fMeta /* indicates preceded by meta */
  459. ) {
  460. UNREFERENCED_PARAMETER( argData );
  461. //
  462. // Ensure that help files are open, and then process the arguments and a few
  463. // other init type things
  464. //
  465. procArgs (pArg);
  466. //
  467. // if there was no help context to start with, then we can't go either way,
  468. // so inform the user
  469. //
  470. if (!ncLast.mh && !ncLast.cn) {
  471. return errstat("No previously viewed help", NULL);
  472. }
  473. if (fMeta) {
  474. //
  475. // meta: attempt to get the most recently viewed help context. If a help
  476. // window is currently up, then if the one we just found is the same as that
  477. // in the window, go back once more. If no back trace, then say so.
  478. //
  479. ncCur = HelpNcBack();
  480. if (FindHelpWin(FALSE)) {
  481. if ((ncCur.mh == ncLast.mh) &&
  482. (ncCur.cn == ncLast.cn)) {
  483. ncCur = HelpNcBack();
  484. }
  485. }
  486. if ((ncCur.mh == 0) && (ncCur.cn == 0)) {
  487. return errstat ("No more backtrace", NULL);
  488. }
  489. } else if (pArg->arg.nullarg.cArg) {
  490. //
  491. // not meta, and args. Try to look again
  492. //
  493. ncCur = ncSearch ( szLastFound /* search for last string again */
  494. , NULL /* no extension restriction */
  495. , ncInitLastFile /* file where we found it last */
  496. , TRUE /* skip all until then */
  497. , FALSE /* don;t look at all files */
  498. );
  499. } else {
  500. //
  501. // not meta, no args, Just get the next help context.
  502. //
  503. ncCur = HelpNcNext(ncLast);
  504. }
  505. if (!ncCur.mh && !ncCur.cn) {
  506. return FALSE;
  507. }
  508. return fDisplayNc ( ncCur /* nc to display */
  509. , TRUE /* add to backtrace list */
  510. , TRUE /* keep focus in current win */
  511. , FALSE); /* Not as a pop-up, though */
  512. }
  513. /*** sethelp - editor help file list manipulation
  514. *
  515. * Function which allows the user to add to, delete from or examine the
  516. * list of help files used by the extension
  517. *
  518. * Input:
  519. * Standard editing function.
  520. *
  521. * Output:
  522. * Returns TRUE if file succefully added or deleted, or the list displayed.
  523. *
  524. *************************************************************************/
  525. flagType pascal EXTERNAL sethelp (
  526. unsigned int argData, /* keystroke invoked with */
  527. ARG far *pArg, /* argument data */
  528. flagType fMeta /* indicates preceded by meta */
  529. ) {
  530. int i = 0;
  531. int j;
  532. int iHelpNew; /* file table index */
  533. nc ncNext; /* nc for next file */
  534. char *pT; /* temp pointer */
  535. EVTargs dummy;
  536. int fFile; /* file's flags */
  537. UNREFERENCED_PARAMETER( argData );
  538. procArgs(pArg);
  539. if ( !pArgText ) {
  540. return FALSE;
  541. }
  542. //
  543. // The special request to <sethelp> to "?" displays a list of all open
  544. // help files.
  545. //
  546. // We do this by first clearing the help psudeo file and ensuring that the
  547. // topic text is also gone. Then for each file we output the help engine's
  548. // physical filename, along with any extensions that the user associated
  549. // with it. We also walk the list of appended files, and print the original
  550. // filename and helpfile title for each.
  551. //
  552. // We walk the list in the same way that it is searched, so that the
  553. // displayed list also reflects the default search order.
  554. //
  555. if ( pArgText && (*(ushort UNALIGNED *)pArgText == (ushort)'?') ) {
  556. fInOpen = TRUE;
  557. CloseWin (&dummy);
  558. fInOpen = FALSE;
  559. OpenWin (0);
  560. //
  561. // Ensure that the help pseudo file is marked readonly, and clean
  562. //
  563. GetEditorObject (RQ_FILE_FLAGS | 0xff, pHelp, &fFile);
  564. fFile |= READONLY;
  565. fFile &= ~DIRTY;
  566. SetEditorObject (RQ_FILE_FLAGS | 0xff, pHelp, &fFile);
  567. SetEditorObject (RQ_WIN_CUR | 0xff, pWinHelp, 0);
  568. // asserte(pFileToTop (pHelp)); /* display psuedo file */
  569. MoveCur((COL)0,(LINE)0); /* and go to upper left */
  570. DelFile (pHelp);
  571. if (pTopic) {
  572. free(pTopic);
  573. pTopic = NULL;
  574. }
  575. iHelpNew = ifileCur;
  576. do {
  577. ncNext = files[iHelpNew].ncInit;
  578. while (ncNext.mh && ncNext.cn && !HelpGetInfo (ncNext, &hInfoCur, sizeof(hInfoCur))) {
  579. if ((ncNext.mh == files[iHelpNew].ncInit.mh) &&
  580. (ncNext.cn == files[iHelpNew].ncInit.cn)) {
  581. memset (buf, ' ', 20);
  582. buf[20] = 0;
  583. strncpy (buf, FNAME(&hInfoCur), strlen(FNAME(&hInfoCur)));
  584. pT = &buf[20];
  585. for (j=0; j<MAXEXT; j++) {
  586. if (files[iHelpNew].exts[j][0]) {
  587. buf[19] = '>';
  588. strcat (pT," .");
  589. strcat (pT,files[iHelpNew].exts[j]);
  590. }
  591. }
  592. PutLine((LINE)i++,buf,pHelp);
  593. }
  594. memset (buf, ' ', 15);
  595. strncpy (&buf[2], HFNAME(&hInfoCur), strlen(HFNAME(&hInfoCur)));
  596. strcpy (&buf[15], ": ");
  597. appTitle (buf, ncNext);
  598. PutLine((LINE)i++,buf,pHelp);
  599. ncNext = NCLINK(&hInfoCur);
  600. }
  601. iHelpNew += iHelpNew ? -1 : MAXFILES-1;
  602. } while (iHelpNew != ifileCur);
  603. #ifdef DEBUG
  604. PutLine((LINE)i++," ",pHelp);
  605. strcpy(buf,"ncLast: 0x");
  606. strcat(buf,_ltoa(ncLast,&buf[128],16));
  607. PutLine((LINE)i++,buf,pHelp);
  608. strcpy(buf,"ncCur: 0x");
  609. strcat(buf,_ltoa(ncCur,&buf[128],16));
  610. PutLine((LINE)i++,buf,pHelp);
  611. #endif
  612. DoMessage (NULL);
  613. return TRUE;
  614. }
  615. //
  616. // Not a special request, just the user adding or removing a file from the
  617. // list of files to search.
  618. //
  619. if (fMeta)
  620. return closehelp(pArgText);
  621. {
  622. flagType Status;
  623. openhelp(pArgText, NULL, &Status);
  624. return Status;
  625. }
  626. }
  627. /*************************************************************************
  628. **
  629. ** Z communication tables
  630. **
  631. ** switch communication table to Z
  632. */
  633. struct swiDesc swiTable[] = {
  634. {"helpfiles", prochelpfiles, SWI_SPECIAL },
  635. {"helpwindow", toPIF(fCreateWindow), SWI_BOOLEAN },
  636. #if defined(PWB)
  637. {"helplist", toPIF(fList), SWI_BOOLEAN },
  638. #endif
  639. {"helpcolor", toPIF(hlColor), SWI_NUMERIC | RADIX16 },
  640. {"helpboldcolor", toPIF(blColor), SWI_NUMERIC | RADIX16 },
  641. {"helpitalcolor", toPIF(itColor), SWI_NUMERIC | RADIX16 },
  642. {"helpundrcolor", toPIF(ulColor), SWI_NUMERIC | RADIX16 },
  643. {"helpwarncolor", toPIF(wrColor), SWI_NUMERIC | RADIX16 },
  644. #ifdef DEBUG
  645. {"helpdelay", toPIF(delay), SWI_NUMERIC | RADIX10 },
  646. #endif
  647. {0, 0, 0}
  648. };
  649. /*
  650. ** command communication table to Z
  651. */
  652. struct cmdDesc cmdTable[] = {
  653. #if defined(PWB)
  654. { "pwbhelpnext", mhelpnext, 0, NOARG | NULLARG },
  655. { "pwbhelp", mhelp, 0, NOARG | NULLARG | STREAMARG | TEXTARG | BOXSTR},
  656. #else
  657. { "mhelpnext", (funcCmd)mhelpnext, 0, NOARG | NULLARG },
  658. { "mhelp", (funcCmd)mhelp, 0, NOARG | NULLARG | STREAMARG | TEXTARG | BOXSTR},
  659. #endif
  660. { "sethelp", (funcCmd)sethelp, 0, NULLARG | STREAMARG | TEXTARG | BOXSTR},
  661. {0, 0, 0}
  662. };