34 const char * term = getenv(
"TERM");
35 if(!term) term =
"unavailable";
37 || !strcmp(term,
"rxvt");
41 #define XTERM_COLOR_RED "\e[1;37;41m" 42 #define XTERM_COLOR_RESET "\e[0m" 44 #define XTERM_ERROR XTERM_COLOR_RED 45 #define XTERM_DEBUG "\e[1;35;40m" 61 fputs(
":err: ", stderr);
65 vfprintf(stderr, msg, ap);
81 fputs(
":inf: ", stderr);
85 vfprintf(stderr, msg, ap);
103 fputs(
":dbg: ", stderr);
107 vfprintf(stderr, msg, ap);
114 #define MAX_CONTEXTS 1000 120 char message[1024]; sprintf(message,
" ___ %s \n", cname);
137 fprintf(stderr,
" ");
void sm_log_push(const char *cname)
void sm_set_program_name(const char *name)
void check_for_xterm_color()
const char * sm_log_context_name[MAX_CONTEXTS]
char sm_program_name_temp[256]
#define XTERM_COLOR_RESET
void my_basename_no_suffix(const char *file, char *dest)
const char * sm_program_name
int checked_for_xterm_color
void sm_debug_write(int flag)
int xterm_color_available
void sm_debug(const char *msg,...)
void sm_info(const char *msg,...)
void sm_error(const char *msg,...)