home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d902 / less.lha / Less / Source / source.lha / less.h < prev    next >
C/C++ Source or Header  |  1993-01-24  |  3KB  |  89 lines

  1. #define ANSIGR
  2. #define EIGHTBIT
  3.  
  4. #ifdef AMIGA
  5. #include <stdlib.h>
  6. #include <string.h>
  7. #include <ctype.h>
  8. #include <proto/all.h>
  9. #endif
  10. /*
  11.  * Standard include file for "less".
  12.  */
  13.  
  14. /*
  15.  * Language details.
  16.  */
  17. #define public          /* PUBLIC FUNCTION */
  18.  
  19. /*
  20.  * Special types and constants.
  21.  */
  22. typedef long            POSITION;
  23. /*
  24.  * {{ Warning: if POSITION is changed to other than "long",
  25.  *    you may have to change some of the printfs which use "%ld"
  26.  *    to print a variable of type POSITION. }}
  27.  */
  28.  
  29. #define NULL_POSITION   ((POSITION)(-1))
  30.  
  31. #define FILENAME        128     /* Max size of a filename */
  32.  
  33. #define EOF             (0)
  34. #ifndef NULL
  35. #define NULL            (0)
  36. #endif
  37.  
  38. /* How quiet should we be? */
  39. #define NOT_QUIET       0       /* Ring bell at eof and for errors */
  40. #define LITTLE_QUIET    1       /* Ring bell only for errors */
  41. #define VERY_QUIET      2       /* Never ring bell */
  42.  
  43. /* How should we prompt? */
  44. #define PR_SHORT        0       /* Prompt with colon */
  45. #define PR_MEDIUM       1       /* Prompt with message */
  46. #define PR_LONG         2       /* Prompt with longer message */
  47.  
  48. /* How should we handle backspaces? */
  49. #define BS_SPECIAL      0       /* Do special things for underlining and bold */
  50. #define BS_NORMAL       1       /* \b treated as normal char; actually output */
  51. #define BS_CONTROL      2       /* \b treated as control char; prints as ^H */
  52.  
  53. /* Special chars used to tell put_line() to do something special */
  54. #define UL_CHAR         0x81  /* Enter underline mode */
  55. #define UE_CHAR         0x82  /* Exit underline mode */
  56. #define BO_CHAR         0x83  /* Enter boldface mode */
  57. #define BE_CHAR         0x84  /* Exit boldface mode */
  58. #define IT_CHAR         0x85  /* Enter italic mode */
  59. #define IE_CHAR         0x86  /* Exit italic mode */
  60. #define NV_CHAR         0x87  /* Enter inverse video mode */
  61. #define NE_CHAR         0x88  /* Exit inverse video mode */
  62.  
  63. #define CONTROL(c)              ((c)&037)
  64. #define SIGNAL(sig,func)        signal(sig,func)
  65.  
  66. /* Library function declarations */
  67. #ifdef AMIGA
  68. #include <fcntl.h>
  69. typedef long offset_t;
  70. #else
  71. offset_t lseek();
  72. #endif
  73.  
  74. #include "funcs.h"
  75.  
  76. #ifdef AMIGA
  77. /* version is recognizable by AmigaDos 'version' command, because it
  78.    begins with $VER:.  Ver is the same thing, but without the $VER:.
  79. */
  80. extern char version[];
  81. #define Ver (version + 6)
  82.  
  83. #define S_INTERRUPT     01
  84.  
  85. extern int called_from_WB;
  86. extern int IsV2; /* Non-zero if AmigaDos 2.00 or more */
  87. extern BOOL UseCLI; /* 0 = Open new window; 1 = use CLI window */
  88. #endif
  89.