]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
another windows fix for fs_cli changes
authorJeff Lenk <jeff@jefflenk.com>
Tue, 27 Sep 2011 02:41:35 +0000 (21:41 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Tue, 27 Sep 2011 02:41:35 +0000 (21:41 -0500)
libs/esl/fs_cli.c

index 3d66a17adfbb8916c6d225e32507f802a67a83d5..4233700b4ff130a0b8f46ffe0b020353fc7a3fed 100644 (file)
@@ -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)\r
+{\r
+       putchar('\r');\r
+       printf("\033[K");\r
+       fflush(stdout);\r
+       return;\r
+}
+#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)
 {