home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / uupoll068.lha / misc / uupoll067.lha / src / defines.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-16  |  3.5 KB  |  147 lines

  1. #ifndef DEFINES_H
  2. #define DEFINES_H
  3.  
  4.  
  5. /*    define all possibe AND useful results. Some are still given by
  6.     Commodore and the other we are defining by our self.                */
  7.  
  8. #ifndef EXEC_TYPES_H
  9. #include <exec/types.h>
  10. #endif
  11. #ifndef LIBRARIES_DOS_H
  12. #include <libraries/dos.h>
  13. #endif
  14.  
  15. #define OK TRUE
  16. #define BAD FALSE
  17.  
  18. #define ON TRUE
  19. #define OFF FALSE
  20.  
  21. #define SUCCESS RETURN_OK
  22. #define WARN RETURN_WARN
  23. #define ERROR RETURN_ERROR
  24. #define FAIL RETURN_FAIL
  25.  
  26. #define DOSRC_SUCCESS RETURN_OK
  27. #define DOSRC_WARN RETURN_WARN
  28. #define DOSRC_ERROR RETURN_ERROR
  29. #define DOSRC_FAIL RETURN_FAIL
  30.  
  31. #define NONE NULL
  32.  
  33. #define YES 1
  34. #define ERR 0
  35. #define NO -1
  36.  
  37.  
  38. /*    Standard sizes for declarations and allocations    of memory chunks,
  39.     local stack arrays and structures, etc.                                */
  40.  
  41. #define RANGE_1BIT 2
  42. #define RANGE_2BIT 4
  43. #define RANGE_3BIT 8
  44. #define RANGE_4BIT 16
  45. #define RANGE_5BIT 32
  46. #define RANGE_6BIT 64
  47. #define RANGE_7BIT 128
  48. #define RANGE_8BIT 256
  49. #define RANGE_9BIT 512
  50. #define RANGE_10BIT 1024
  51. #define RANGE_11BIT 2048
  52. #define RANGE_12BIT 4096
  53. #define RANGE_13BIT 8192
  54. #define RANGE_14BIT 16384
  55. #define RANGE_15BIT 32486
  56. #define RANGE_16BIT 65535
  57.  
  58. #define MAXSIZEOF_FILENAME 30+2
  59. #define MAXSIZEOF_CMNDLINE 256+2
  60. #define MAXSIZEOF_TEXTLINE 80+2
  61.  
  62.  
  63. /*    Yeah, here it comes...all ASCII control codes.
  64.     Defined as their correct acronyms.                    */
  65.  
  66. #define NUL '\x00'
  67. #define SOH '\x01'
  68. #define STX '\x02'
  69. #define ETX '\x03'
  70. #define EOT '\x04'
  71. #define ENQ '\x05'
  72. #define ACK '\x06'
  73. #define BEL '\x07'
  74. #define BS  '\x08'
  75. #define HT  '\x09'
  76. #define LF  '\x0a'
  77. #define VT  '\x0b'
  78. #define FF  '\x0c'
  79. #define CR  '\x0d'
  80. #define SO  '\x0e'
  81. #define SI  '\x0f'
  82. #define DLE '\x10'
  83. #define DC1 '\x11'
  84. #define DC2 '\x12'
  85. #define DC3 '\x13'
  86. #define DC4 '\x14'
  87. #define NAK '\x15'
  88. #define SYN '\x16'
  89. #define ETB '\x17'
  90. #define CAN '\x18'
  91. #define EM  '\x19'
  92. #define SUB '\x1a'
  93. #define ESC '\x1b'
  94. #define FS  '\x1c'
  95. #define GS  '\x1d'
  96. #define RS  '\x1e'
  97. #define US  '\x1f'
  98. #define SP  '\x20'
  99. #define DEL '\x7f'
  100.  
  101. #define QUOTE '\x22' /* exception: no ASCII name */
  102. #define NL LF        /* exception: AMIGA specific */
  103.  
  104.  
  105. /* some ANSI escape sequences */
  106.  
  107. #define ANSICTL_NORMAL_DISPLAY      "\x1b" "0" "m"
  108. #define ANSICTL_BOLD_ON             "\x1b" "1" "m"
  109. #define ANSICTL_UNDERLINE           "\x1b" "4" "m"
  110. #define ANSICTL_BLINK_ON            "\x1b" "5" "m"
  111. #define ANSICTL_REVERSE_VIDEO_ON    "\x1b" "7" "m"
  112. #define ANSICTL_NONDISPLAYED        "\x1b" "8" "m"
  113.  
  114. #define ANSICTL_BLACK_FOREGROUND    "\x1b" "30" "m"
  115. #define ANSICTL_RED_FOREGROUND      "\x1b" "31" "m"
  116. #define ANSICTL_GREEN_FOREGROUND    "\x1b" "32" "m"
  117. #define ANSICTL_YELLOW_FOREGROUND   "\x1b" "33" "m"
  118. #define ANSICTL_BLUE_FOREGROUND     "\x1b" "34" "m"
  119. #define ANSICTL_MAGENTA_FOREGROUND  "\x1b" "35" "m"
  120. #define ANSICTL_CYAN_FOREGROUND     "\x1b" "36" "m"
  121. #define ANSICTL_WHITE_FOREGROUND    "\x1b" "37" "m"
  122.  
  123. #define ANSICTL_BLACK_BACKGROUND    "\x1b" "40" "m"
  124. #define ANSICTL_RED_BACKGROUND      "\x1b" "41" "m"
  125. #define ANSICTL_GREEN_BACKGROUND    "\x1b" "42" "m"
  126. #define ANSICTL_YELLOW_BACKGROUND   "\x1b" "43" "m"
  127. #define ANSICTL_BLUE_BACKGROUND     "\x1b" "44" "m"
  128. #define ANSICTL_MAGENTA_BACKGROUND  "\x1b" "45" "m"
  129. #define ANSICTL_CYAN_BACKGROUND     "\x1b" "46" "m"
  130. #define ANSICTL_WHITE_BACKGROUND    "\x1b" "47" "m"
  131.  
  132.  
  133. /*    Because our <stdio.h> headerfile didn't include the original
  134.     ANSI definitions for file seek we define it now...                */
  135.  
  136. #ifndef SEEK_SET
  137. #define SEEK_SET 0
  138. #endif
  139. #ifndef SEEK_CUR
  140. #define SEEK_CUR 1
  141. #endif
  142. #ifndef SEEK_END
  143. #define SEEK_END 2
  144. #endif
  145.  
  146. #endif /* DEFINES_H */
  147.