This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | ATTR_BLINK 5 |
#define | ATTR_BRIGHT 1 |
#define | ATTR_DIM 2 |
#define | ATTR_HIDDEN 8 |
#define | ATTR_RESET 0 |
#define | ATTR_REVER 7 |
#define | ATTR_UNDER 4 |
#define | COLOR_BLACK 30 |
#define | COLOR_BLUE 34 |
#define | COLOR_BRBLUE 34 | 128 |
#define | COLOR_BRCYAN 36 | 128 |
#define | COLOR_BRGREEN 32 | 128 |
#define | COLOR_BRMAGENTA 35 | 128 |
#define | COLOR_BROWN 33 |
#define | COLOR_BRRED 31 | 128 |
#define | COLOR_BRWHITE 37 | 128 |
#define | COLOR_CYAN 36 |
#define | COLOR_GRAY 30 | 128 |
#define | COLOR_GREEN 32 |
#define | COLOR_MAGENTA 35 |
#define | COLOR_RED 31 |
#define | COLOR_WHITE 37 |
#define | COLOR_YELLOW 33 | 128 |
#define | ESC 0x1b |
Functions | |
char * | term_color (char *outbuf, const char *inbuf, int fgcolor, int bgcolor, int maxout) |
char * | term_color_code (char *outbuf, int fgcolor, int bgcolor, int maxout) |
char * | term_end (void) |
char * | term_prep (void) |
char * | term_prompt (char *outbuf, const char *inbuf, int maxout) |
char * | term_quit (void) |
char * | term_strip (char *outbuf, char *inbuf, int maxout) |
Definition in file term.h.
|
|
|
Definition at line 32 of file term.h. Referenced by term_color(), term_color_code(), term_init(), and term_prompt(). |
|
|
|
|
|
Definition at line 31 of file term.h. Referenced by term_init(). |
|
|
|
|
|
Definition at line 39 of file term.h. Referenced by __load_resource(), ast_frame_dump(), ast_register_translator(), ast_unregister_translator(), cli_prompt(), handle_zap_show_cadences(), main(), term_color(), term_color_code(), term_init(), and term_prompt(). |
|
Definition at line 47 of file term.h. Referenced by term_prompt(). |
|
|
|
Definition at line 52 of file term.h. Referenced by ast_frame_dump(), ast_register_application(), pbx_extension_helper(), and realtime_exec(). |
|
Definition at line 44 of file term.h. Referenced by ast_frame_dump(). |
|
Definition at line 50 of file term.h. Referenced by ast_frame_dump(), pbx_extension_helper(), and realtime_exec(). |
|
Definition at line 45 of file term.h. Referenced by __load_resource(), and term_init(). |
|
Definition at line 42 of file term.h. Referenced by ast_frame_dump(). |
|
Definition at line 54 of file term.h. Referenced by ast_log(), load_modules(), and main(). |
|
Definition at line 51 of file term.h. Referenced by handle_show_application(), and handle_show_function(). |
|
Definition at line 40 of file term.h. Referenced by fix_header(). |
|
Definition at line 43 of file term.h. Referenced by handle_zap_show_cadences(). |
|
Definition at line 49 of file term.h. Referenced by ast_register_translator(), ast_unregister_translator(), handle_show_application(), handle_show_function(), and handle_zap_show_cadences(). |
|
|
|
Definition at line 53 of file term.h. Referenced by cli_prompt(), term_color(), term_init(), and term_prompt(). |
|
Definition at line 46 of file term.h. Referenced by ast_frame_dump(). |
|
Definition at line 30 of file term.h. Referenced by term_color(), term_color_code(), term_init(), term_prompt(), and term_strip(). |
|
Definition at line 149 of file term.c. References ATTR_BRIGHT, COLOR_BLACK, COLOR_WHITE, ESC, and vt100compat. Referenced by __load_resource(), ast_frame_dump(), ast_log(), ast_register_application(), ast_register_translator(), ast_unregister_translator(), fix_header(), handle_show_application(), handle_show_function(), handle_zap_show_cadences(), load_modules(), main(), pbx_extension_helper(), and realtime_exec(). 00150 { 00151 int attr=0; 00152 char tmp[40]; 00153 if (!vt100compat) { 00154 ast_copy_string(outbuf, inbuf, maxout); 00155 return outbuf; 00156 } 00157 if (!fgcolor && !bgcolor) { 00158 ast_copy_string(outbuf, inbuf, maxout); 00159 return outbuf; 00160 } 00161 if ((fgcolor & 128) && (bgcolor & 128)) { 00162 /* Can't both be highlighted */ 00163 ast_copy_string(outbuf, inbuf, maxout); 00164 return outbuf; 00165 } 00166 if (!bgcolor) 00167 bgcolor = COLOR_BLACK; 00168 00169 if (bgcolor) { 00170 bgcolor &= ~128; 00171 bgcolor += 10; 00172 } 00173 if (fgcolor & 128) { 00174 attr = ATTR_BRIGHT; 00175 fgcolor &= ~128; 00176 } 00177 if (fgcolor && bgcolor) { 00178 snprintf(tmp, sizeof(tmp), "%d;%d", fgcolor, bgcolor); 00179 } else if (bgcolor) { 00180 snprintf(tmp, sizeof(tmp), "%d", bgcolor); 00181 } else if (fgcolor) { 00182 snprintf(tmp, sizeof(tmp), "%d", fgcolor); 00183 } 00184 if (attr) { 00185 snprintf(outbuf, maxout, "%c[%d;%sm%s%c[0;%d;%dm", ESC, attr, tmp, inbuf, ESC, COLOR_WHITE, COLOR_BLACK + 10); 00186 } else { 00187 snprintf(outbuf, maxout, "%c[%sm%s%c[0;%d;%dm", ESC, tmp, inbuf, ESC, COLOR_WHITE, COLOR_BLACK + 10); 00188 } 00189 return outbuf; 00190 }
|
|
Definition at line 192 of file term.c. References ATTR_BRIGHT, COLOR_BLACK, ESC, and vt100compat. Referenced by cli_prompt(). 00193 { 00194 int attr=0; 00195 char tmp[40]; 00196 if ((!vt100compat) || (!fgcolor && !bgcolor)) { 00197 *outbuf = '\0'; 00198 return outbuf; 00199 } 00200 if ((fgcolor & 128) && (bgcolor & 128)) { 00201 /* Can't both be highlighted */ 00202 *outbuf = '\0'; 00203 return outbuf; 00204 } 00205 if (!bgcolor) 00206 bgcolor = COLOR_BLACK; 00207 00208 if (bgcolor) { 00209 bgcolor &= ~128; 00210 bgcolor += 10; 00211 } 00212 if (fgcolor & 128) { 00213 attr = ATTR_BRIGHT; 00214 fgcolor &= ~128; 00215 } 00216 if (fgcolor && bgcolor) { 00217 snprintf(tmp, sizeof(tmp), "%d;%d", fgcolor, bgcolor); 00218 } else if (bgcolor) { 00219 snprintf(tmp, sizeof(tmp), "%d", bgcolor); 00220 } else if (fgcolor) { 00221 snprintf(tmp, sizeof(tmp), "%d", fgcolor); 00222 } 00223 if (attr) { 00224 snprintf(outbuf, maxout, "%c[%d;%sm", ESC, attr, tmp); 00225 } else { 00226 snprintf(outbuf, maxout, "%c[%sm", ESC, tmp); 00227 } 00228 return outbuf; 00229 }
|
|
Definition at line 271 of file term.c. References enddata. Referenced by consolehandler(), and main(). 00272 { 00273 return enddata; 00274 }
|
|
Definition at line 266 of file term.c. References prepdata. 00267 { 00268 return prepdata; 00269 }
|
|
Definition at line 252 of file term.c. References ATTR_BRIGHT, COLOR_BLACK, COLOR_BLUE, COLOR_WHITE, ESC, and vt100compat. 00253 { 00254 if (!vt100compat) { 00255 ast_copy_string(outbuf, inbuf, maxout); 00256 return outbuf; 00257 } 00258 snprintf(outbuf, maxout, "%c[%d;%d;%dm%c%c[%d;%d;%dm%s", 00259 ESC, ATTR_BRIGHT, COLOR_BLUE, COLOR_BLACK + 10, 00260 inbuf[0], 00261 ESC, 0, COLOR_WHITE, COLOR_BLACK + 10, 00262 inbuf + 1); 00263 return outbuf; 00264 }
|
|
Definition at line 276 of file term.c. References quitdata. Referenced by ast_el_read_char(), main(), and quit_handler(). 00277 { 00278 return quitdata; 00279 }
|
|
Definition at line 231 of file term.c. References ESC. Referenced by ast_log(), and ast_log_vsyslog(). 00232 { 00233 char *outbuf_ptr = outbuf, *inbuf_ptr = inbuf; 00234 00235 while (outbuf_ptr < outbuf + maxout) { 00236 switch (*inbuf_ptr) { 00237 case ESC: 00238 while (*inbuf_ptr && (*inbuf_ptr != 'm')) 00239 inbuf_ptr++; 00240 break; 00241 default: 00242 *outbuf_ptr = *inbuf_ptr; 00243 outbuf_ptr++; 00244 } 00245 if (! *inbuf_ptr) 00246 break; 00247 inbuf_ptr++; 00248 } 00249 return outbuf; 00250 }
|