home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume16 / less5 / part04 / less.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-09-22  |  1.7 KB  |  75 lines

  1. /*
  2.  * Standard include file for "less".
  3.  */
  4.  
  5. /*
  6.  * Include the file of compile-time options.
  7.  */
  8. #include "defines.h"
  9.  
  10. /*
  11.  * Language details.
  12.  */
  13. #if !VOID
  14. #define    void  int
  15. #endif
  16. #define    public        /* PUBLIC FUNCTION */
  17.  
  18. /*
  19.  * Special types and constants.
  20.  */
  21. typedef long        POSITION;
  22. /*
  23.  * {{ Warning: if POSITION is changed to other than "long",
  24.  *    you may have to change some of the printfs which use "%ld"
  25.  *    to print a variable of type POSITION. }}
  26.  */
  27.  
  28. #define    NULL_POSITION    ((POSITION)(-1))
  29.  
  30. /*
  31.  * The type of signal handler functions.
  32.  * Usually int, although it should be void.
  33.  */
  34. typedef    int        HANDLER;
  35.  
  36.  
  37. #define    FILENAME    128    /* Max size of a filename */
  38.  
  39. #define    EOI        (0)
  40. #ifndef NULL
  41. #define    NULL        (0)
  42. #endif
  43.  
  44. #define    READ_INTR    (-2)
  45.  
  46. /* How quiet should we be? */
  47. #define    NOT_QUIET    0    /* Ring bell at eof and for errors */
  48. #define    LITTLE_QUIET    1    /* Ring bell only for errors */
  49. #define    VERY_QUIET    2    /* Never ring bell */
  50.  
  51. /* How should we prompt? */
  52. #define    PR_SHORT    0    /* Prompt with colon */
  53. #define    PR_MEDIUM    1    /* Prompt with message */
  54. #define    PR_LONG        2    /* Prompt with longer message */
  55.  
  56. /* How should we handle backspaces? */
  57. #define    BS_SPECIAL    0    /* Do special things for underlining and bold */
  58. #define    BS_NORMAL    1    /* \b treated as normal char; actually output */
  59. #define    BS_CONTROL    2    /* \b treated as control char; prints as ^H */
  60.  
  61. /* Special chars used to tell put_line() to do something special */
  62. #define    UL_CHAR        '\201'    /* Enter underline mode */
  63. #define    UE_CHAR        '\202'    /* Exit underline mode */
  64. #define    BO_CHAR        '\203'    /* Enter boldface mode */
  65. #define    BE_CHAR        '\204'    /* Exit boldface mode */
  66.  
  67. #define    CONTROL(c)        ((c)&037)
  68. #define    SIGNAL(sig,func)    signal(sig,func)
  69.  
  70. /* Library function declarations */
  71. offset_t lseek();
  72. char *calloc();
  73.  
  74. #include "funcs.h"
  75.