Source code of Windows XP (NT5)
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.

72 lines
1.4 KiB

  1. /**************************************************************************
  2. *hctl - enable/disable retrieval of control lines
  3. *
  4. * Copyright <C> 1989, Microsoft Corporation
  5. *
  6. * Purpose:
  7. *
  8. * Revision History:
  9. *
  10. * 10-Oct-1990 RJSA Translated to C
  11. * 13-May-1990 LN Unlock topic text when through with it.
  12. * [] 22-Feb-1989 LN Created
  13. *
  14. **************************************************************************/
  15. #include <stdio.h>
  16. #if defined (OS2)
  17. #define INCL_BASE
  18. #include <os2.h>
  19. #else
  20. #include <windows.h>
  21. #endif
  22. #include <help.h>
  23. #include <helpfile.h>
  24. #include <helpsys.h>
  25. /**** helpctl - enable/disable retrieval of control lines
  26. * void far pascal helpctl(
  27. * uchar far *pTopic,
  28. * f fEnable
  29. * )
  30. *
  31. * Purpose:
  32. * Enables or disables retrieval of embedded help control lines
  33. *
  34. * Entry:
  35. * pTopic = Topic text
  36. * fEnable = TRUE=> allow lookups of control lines, else disable
  37. *
  38. * Exit:
  39. * returns nothing
  40. *
  41. **************************************************************************/
  42. void pascal
  43. HelpCtl (
  44. PB pTopic,
  45. f fEnable
  46. ) {
  47. struct topichdr UNALIGNED *pT;
  48. pT = PBLOCK(pTopic);
  49. if (pT) {
  50. pT->lnCur = 1;
  51. pT->lnOff = sizeof(struct topichdr);
  52. pT->linChar = pT->appChar;
  53. if (fEnable) {
  54. pT->linChar = 0xFF;
  55. }
  56. PBUNLOCK(pTopic);
  57. }
  58. }