CR/LF -> LF

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4759 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-03-24 03:32:24 +00:00
parent 010c2f4ee6
commit 25762b3583
1 changed files with 14 additions and 14 deletions

View File

@ -36,19 +36,19 @@ static const uint8_t STATIC_LEVELS[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
static int COLORIZE = 0;
#ifdef WIN32
static HANDLE hStdout;
static WORD wOldColorAttrs;
static CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
static WORD COLORS[] =
{ FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_BLUE | FOREGROUND_INTENSITY,
FOREGROUND_BLUE | FOREGROUND_INTENSITY,
FOREGROUND_GREEN | FOREGROUND_INTENSITY,
FOREGROUND_GREEN | FOREGROUND_INTENSITY,
FOREGROUND_GREEN | FOREGROUND_INTENSITY };
#else
static WORD wOldColorAttrs;
static CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
static WORD COLORS[] =
{ FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_RED | FOREGROUND_INTENSITY,
FOREGROUND_BLUE | FOREGROUND_INTENSITY,
FOREGROUND_BLUE | FOREGROUND_INTENSITY,
FOREGROUND_GREEN | FOREGROUND_INTENSITY,
FOREGROUND_GREEN | FOREGROUND_INTENSITY,
FOREGROUND_GREEN | FOREGROUND_INTENSITY };
#else
static const char *COLORS[] =
{ SWITCH_SEQ_FRED, SWITCH_SEQ_FRED, SWITCH_SEQ_FRED, SWITCH_SEQ_FRED, SWITCH_SEQ_FMAGEN, SWITCH_SEQ_FCYAN, SWITCH_SEQ_FGREEN, SWITCH_SEQ_FYELLOW, "" };
#endif
@ -170,7 +170,7 @@ static switch_status_t switch_console_logger(const switch_log_node_t *node, swit
if (COLORIZE) {
#ifdef WIN32
SetConsoleTextAttribute(hStdout, COLORS[node->level]);
WriteFile(hStdout, node->data, (DWORD)strlen(node->data), NULL, NULL);
WriteFile(hStdout, node->data, (DWORD)strlen(node->data), NULL, NULL);
SetConsoleTextAttribute(hStdout, wOldColorAttrs);
#else
fprintf(handle, "%s%s%s", COLORS[node->level], node->data, SWITCH_SEQ_DEFAULT_COLOR);