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.

54 lines
1.3 KiB

  1. /*** helpcnt.c - HelpcLines routine.
  2. *
  3. * Copyright <C> 1988, Microsoft Corporation
  4. *
  5. * Revision History:
  6. *
  7. * 25-Jan-1990 ln locate -> hlp_locate
  8. * 19-Aug-1988 ln Changed to use new locate routine.
  9. * [] 10-Aug-1988 LN Created
  10. *
  11. *************************************************************************/
  12. #include <stdio.h>
  13. #if defined (OS2)
  14. #else
  15. #include <windows.h>
  16. #endif
  17. #include "help.h"
  18. #include "helpfile.h"
  19. #include "helpsys.h"
  20. /*** HelpcLines - Return number of lines in topic
  21. *
  22. * Purpose:
  23. * Interpret the help files stored format and return the number of lines
  24. * contained therein.
  25. *
  26. * It *is* sensitive to the applications control character, again just like
  27. * HelpGetLine, and will return total number of lines if the header.linChar
  28. * is set to 0xff, or the number of lines that do NOT begin with
  29. * header.linChar.
  30. *
  31. * Input:
  32. * pbTopic = pointer to topic text
  33. *
  34. * Output:
  35. * Returns number of lines in topic.
  36. *
  37. *************************************************************************/
  38. int far pascal LOADDS HelpcLines(
  39. PB pbTopic
  40. ) {
  41. REGISTER ushort cLines; /* count of lines */
  42. uchar far *pTopic; /* pointer to topic */
  43. pTopic = PBLOCK (pbTopic);
  44. cLines = (ushort)hlp_locate (-1,pTopic);
  45. PBUNLOCK (pbTopic);
  46. return cLines;
  47. /* end HelpcLines */}