home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume6 / less2 / part1 / less.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  1.7 KB  |  62 lines

  1. /*
  2.  * Standard include file for "less".
  3.  */
  4.  
  5. /*
  6.  * Language details.
  7.  */
  8. #if !VOID
  9. #define    void  int
  10. #endif
  11. #define    public        /* PUBLIC FUNCTION */
  12.  
  13. /*
  14.  * Special types and constants.
  15.  */
  16. typedef long        POSITION;
  17. /*
  18.  * {{ Warning: if POSITION is changed to other than "long",
  19.  *    you may have to change some of the printfs which use "%ld"
  20.  *    to print a variable of type POSITION. }}
  21.  */
  22.  
  23. #define    END_POSITION    ((POSITION)(-2))
  24. #define    NULL_POSITION    ((POSITION)(-1))
  25.  
  26. #define    EOF        (0)
  27. #define    NULL        (0)
  28.  
  29. /* How quiet should we be? */
  30. #define    NOT_QUIET    0    /* Ring bell at eof and for errors */
  31. #define    LITTLE_QUIET    1    /* Ring bell only for errors */
  32. #define    VERY_QUIET    2    /* Never ring bell */
  33.  
  34. /* How should we prompt? */
  35. #define    PR_SHORT    0    /* Prompt with colon */
  36. #define    PR_MEDIUM    1    /* Prompt with message */
  37. #define    PR_LONG        2    /* Prompt with longer message */
  38.  
  39. /* How should we handle backspaces? */
  40. #define    BS_SPECIAL    0    /* Do special things for underlining and bold */
  41. #define    BS_NORMAL    1    /* \b treated as normal char; actually output */
  42. #define    BS_CONTROL    2    /* \b treated as control char; prints as ^H */
  43.  
  44. /* Flag to eq_message() telling what to put in the message */
  45. #define    MNAME        001    /* File name */
  46. #define    MOF        002    /* "file x of y" */
  47. #define    MBYTE        004    /* "byte x/y" */
  48. #define    MPCT        010    /* Percentage into the file */
  49.  
  50. /* Special chars used to tell put_line() to do something special */
  51. #define    UL_CHAR        '\201'    /* Enter underline mode */
  52. #define    UE_CHAR        '\202'    /* Exit underline mode */
  53. #define    BO_CHAR        '\203'    /* Enter boldface mode */
  54. #define    BE_CHAR        '\204'    /* Exit boldface mode */
  55.  
  56. #define    CONTROL(c)        ((c)&037)
  57. #define    SIGNAL(sig,func)    signal(sig,func)
  58.  
  59. off_t lseek();
  60.  
  61. #include "funcs.h"
  62.