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.

92 lines
2.1 KiB

  1. /*
  2. ** helpsys.h - Help system internal definitions
  3. **
  4. ** Copyright <C> 1987, Microsoft Corporation
  5. **
  6. ** Purpose:
  7. ** Contains definitions used within the help system.
  8. **
  9. ** Revision History:
  10. **
  11. ** 12-Mar-1990 CloseFile -> HelpCloseFile
  12. ** 22-Jan-1990 MAXFILES from 50 to 100
  13. ** [] 14-Dec-1987 Created
  14. **
  15. */
  16. /*
  17. ** definitions
  18. */
  19. #ifndef NULL
  20. #define NULL 0
  21. #endif
  22. #ifndef TRUE
  23. #define TRUE 1
  24. #define FALSE 0
  25. #endif
  26. #define ASCII 1 /* build with ASCII support */
  27. #define MAXBACK 20 /* max number of back-up's */
  28. #define MAXFILES 100 /* max number of open helpfiles */
  29. #define FTCOMPRESSED 0x01 /* 1=compressed, 0=ascii */
  30. #define FTFORMATTED 0x02 /* 1=formatted, 0=unformatted */
  31. #define FTMERGED 0x04 /* 1=merged index, 0=normal */
  32. #define REGISTER register
  33. #define HIGHONLY(l) ((ulong)l & 0xffff0000)
  34. #define HIGH(l) ((ushort)(HIGHONLY(l) >> 16))
  35. #define LOW(l) ((ushort)((ulong)l & 0xffff))
  36. /*
  37. ** Forward declarations for client application call-back routines
  38. */
  39. #if rjsa
  40. #define HelpDealloc(sel) DosFreeSeg(sel)
  41. #define HelpLock(sel) ((void *)((ulong)sel << 16))
  42. #define HelpUnlock(sel)
  43. #else
  44. #define HelpDealloc(x) free(x)
  45. #define HelpLock(x) (x)
  46. #define HelpUnlock(x)
  47. #endif
  48. void pascal HelpCloseFile(FILE *);
  49. mh pascal HelpAlloc(ushort);
  50. FILE * pascal OpenFileOnPath(char *, int);
  51. ulong pascal ReadHelpFile(FILE *, ulong, char *, ushort);
  52. /*
  53. ** intlineattr
  54. ** internal representation of lineattributes
  55. */
  56. typedef struct intlineattr { /* ILA */
  57. uchar attr; /* attribute index */
  58. uchar cb; /* count of bytes */
  59. } intlineattr;
  60. /******************************************************************************
  61. **
  62. ** PB maniputalors
  63. ** Macros for locking and unlocking handle:offsets, as appropriate.
  64. */
  65. #ifdef HOFFSET
  66. #define PBLOCK(ho) (((char *)HelpLock(HIGH(ho))) + LOW(ho))
  67. #define PBUNLOCK(ho) HelpUnlock(HIGH(ho))
  68. #else
  69. #define PBLOCK(ho) ((void *)ho)
  70. #define PBUNLOCK(ho)
  71. #endif
  72. PCHAR pascal hlp_locate (SHORT ln, PCHAR pTopic);
  73. FILE *pathopen (char *name, char *buf, char *mode);