home *** CD-ROM | disk | FTP | other *** search
- #ifndef DEFINES_H
- #define DEFINES_H
-
-
- /* define all possibe AND useful results. Some are still given by
- Commodore and the other we are defining by our self. */
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
- #ifndef LIBRARIES_DOS_H
- #include <libraries/dos.h>
- #endif
-
- #define OK TRUE
- #define BAD FALSE
-
- #define ON TRUE
- #define OFF FALSE
-
- #define SUCCESS RETURN_OK
- #define WARN RETURN_WARN
- #define ERROR RETURN_ERROR
- #define FAIL RETURN_FAIL
-
- #define DOSRC_SUCCESS RETURN_OK
- #define DOSRC_WARN RETURN_WARN
- #define DOSRC_ERROR RETURN_ERROR
- #define DOSRC_FAIL RETURN_FAIL
-
- #define NONE NULL
-
- #define YES 1
- #define ERR 0
- #define NO -1
-
-
- /* Standard sizes for declarations and allocations of memory chunks,
- local stack arrays and structures, etc. */
-
- #define RANGE_1BIT 2
- #define RANGE_2BIT 4
- #define RANGE_3BIT 8
- #define RANGE_4BIT 16
- #define RANGE_5BIT 32
- #define RANGE_6BIT 64
- #define RANGE_7BIT 128
- #define RANGE_8BIT 256
- #define RANGE_9BIT 512
- #define RANGE_10BIT 1024
- #define RANGE_11BIT 2048
- #define RANGE_12BIT 4096
- #define RANGE_13BIT 8192
- #define RANGE_14BIT 16384
- #define RANGE_15BIT 32486
- #define RANGE_16BIT 65535
-
- #define MAXSIZEOF_FILENAME 30+2
- #define MAXSIZEOF_CMNDLINE 256+2
- #define MAXSIZEOF_TEXTLINE 80+2
-
-
- /* Yeah, here it comes...all ASCII control codes.
- Defined as their correct acronyms. */
-
- #define NUL '\x00'
- #define SOH '\x01'
- #define STX '\x02'
- #define ETX '\x03'
- #define EOT '\x04'
- #define ENQ '\x05'
- #define ACK '\x06'
- #define BEL '\x07'
- #define BS '\x08'
- #define HT '\x09'
- #define LF '\x0a'
- #define VT '\x0b'
- #define FF '\x0c'
- #define CR '\x0d'
- #define SO '\x0e'
- #define SI '\x0f'
- #define DLE '\x10'
- #define DC1 '\x11'
- #define DC2 '\x12'
- #define DC3 '\x13'
- #define DC4 '\x14'
- #define NAK '\x15'
- #define SYN '\x16'
- #define ETB '\x17'
- #define CAN '\x18'
- #define EM '\x19'
- #define SUB '\x1a'
- #define ESC '\x1b'
- #define FS '\x1c'
- #define GS '\x1d'
- #define RS '\x1e'
- #define US '\x1f'
- #define SP '\x20'
- #define DEL '\x7f'
-
- #define QUOTE '\x22' /* exception: no ASCII name */
- #define NL LF /* exception: AMIGA specific */
-
-
- /* some ANSI escape sequences */
-
- #define ANSICTL_NORMAL_DISPLAY "\x1b" "0" "m"
- #define ANSICTL_BOLD_ON "\x1b" "1" "m"
- #define ANSICTL_UNDERLINE "\x1b" "4" "m"
- #define ANSICTL_BLINK_ON "\x1b" "5" "m"
- #define ANSICTL_REVERSE_VIDEO_ON "\x1b" "7" "m"
- #define ANSICTL_NONDISPLAYED "\x1b" "8" "m"
-
- #define ANSICTL_BLACK_FOREGROUND "\x1b" "30" "m"
- #define ANSICTL_RED_FOREGROUND "\x1b" "31" "m"
- #define ANSICTL_GREEN_FOREGROUND "\x1b" "32" "m"
- #define ANSICTL_YELLOW_FOREGROUND "\x1b" "33" "m"
- #define ANSICTL_BLUE_FOREGROUND "\x1b" "34" "m"
- #define ANSICTL_MAGENTA_FOREGROUND "\x1b" "35" "m"
- #define ANSICTL_CYAN_FOREGROUND "\x1b" "36" "m"
- #define ANSICTL_WHITE_FOREGROUND "\x1b" "37" "m"
-
- #define ANSICTL_BLACK_BACKGROUND "\x1b" "40" "m"
- #define ANSICTL_RED_BACKGROUND "\x1b" "41" "m"
- #define ANSICTL_GREEN_BACKGROUND "\x1b" "42" "m"
- #define ANSICTL_YELLOW_BACKGROUND "\x1b" "43" "m"
- #define ANSICTL_BLUE_BACKGROUND "\x1b" "44" "m"
- #define ANSICTL_MAGENTA_BACKGROUND "\x1b" "45" "m"
- #define ANSICTL_CYAN_BACKGROUND "\x1b" "46" "m"
- #define ANSICTL_WHITE_BACKGROUND "\x1b" "47" "m"
-
-
- /* Because our <stdio.h> headerfile didn't include the original
- ANSI definitions for file seek we define it now... */
-
- #ifndef SEEK_SET
- #define SEEK_SET 0
- #endif
- #ifndef SEEK_CUR
- #define SEEK_CUR 1
- #endif
- #ifndef SEEK_END
- #define SEEK_END 2
- #endif
-
- #endif /* DEFINES_H */
-