00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ASTERISK_TERM_H
00024 #define _ASTERISK_TERM_H
00025
00026 #if defined(__cplusplus) || defined(c_plusplus)
00027 extern "C" {
00028 #endif
00029
00030 #define ESC 0x1b
00031 #define ATTR_RESET 0
00032 #define ATTR_BRIGHT 1
00033 #define ATTR_DIM 2
00034 #define ATTR_UNDER 4
00035 #define ATTR_BLINK 5
00036 #define ATTR_REVER 7
00037 #define ATTR_HIDDEN 8
00038
00039 #define COLOR_BLACK 30
00040 #define COLOR_GRAY (30 | 128)
00041 #define COLOR_RED 31
00042 #define COLOR_BRRED (31 | 128)
00043 #define COLOR_GREEN 32
00044 #define COLOR_BRGREEN (32 | 128)
00045 #define COLOR_BROWN 33
00046 #define COLOR_YELLOW (33 | 128)
00047 #define COLOR_BLUE 34
00048 #define COLOR_BRBLUE (34 | 128)
00049 #define COLOR_MAGENTA 35
00050 #define COLOR_BRMAGENTA (35 | 128)
00051 #define COLOR_CYAN 36
00052 #define COLOR_BRCYAN (36 | 128)
00053 #define COLOR_WHITE 37
00054 #define COLOR_BRWHITE (37 | 128)
00055
00056 char *term_color(char *outbuf, const char *inbuf, int fgcolor, int bgcolor, int maxout);
00057
00058 char *term_color_code(char *outbuf, int fgcolor, int bgcolor, int maxout);
00059
00060 char *term_strip(char *outbuf, char *inbuf, int maxout);
00061
00062 void term_filter_escapes(char *line);
00063
00064 char *term_prompt(char *outbuf, const char *inbuf, int maxout);
00065
00066 char *term_prep(void);
00067
00068 char *term_end(void);
00069
00070 char *term_quit(void);
00071
00072 #if defined(__cplusplus) || defined(c_plusplus)
00073 }
00074 #endif
00075
00076 #endif