From: Jeff Lenk Date: Tue, 27 Sep 2011 02:41:35 +0000 (-0500) Subject: another windows fix for fs_cli changes X-Git-Tag: v1.2-rc1~51^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16a0a2ed6de4288a806cda8026a9776788366de7;p=thirdparty%2Ffreeswitch.git another windows fix for fs_cli changes --- diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c index 3d66a17adf..4233700b4f 100644 --- a/libs/esl/fs_cli.c +++ b/libs/esl/fs_cli.c @@ -575,6 +575,7 @@ static int stdout_writable(void) #endif } +#ifndef WIN32 static int write_str(const char *s) { int n, left = strlen(s); while (1) { @@ -590,7 +591,17 @@ static int write_char(int c) { char s[2] = { c, 0 }; return write_str(s); } +#endif +#ifdef WIN32 +static void clear_line(void) +{ + putchar('\r'); + printf("\033[K"); + fflush(stdout); + return; +} +#else static void clear_line(void) { if (!(write_char('\r'))) goto done; @@ -598,6 +609,7 @@ static void clear_line(void) done: return; } +#endif static void redisplay(void) {