Pull SERGEEV dependencies out of sstlinux.c.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 3 Feb 2005 22:31:42 +0000 (22:31 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 3 Feb 2005 22:31:42 +0000 (22:31 +0000)
reports.c
sstlinux.c

index 852094f53429469d23d79fc580cb8cb9256213db..32ee650d8b71c90623e5eadf9c9567b41b711d51 100644 (file)
--- a/reports.c
+++ b/reports.c
@@ -4,7 +4,18 @@
 #include <string.h>
 #include "conio.h"
 #include "sstlinux.h"
-#ifndef SERGEEV
+
+#ifdef SERGEEV
+int c_printf (char *format, ... )
+{
+    char buffer[BUFSIZ]; /* Well, BUFSIZ is from ncurses...  */
+    va_list argp;
+    va_start(argp,format);
+    vsprintf(buffer,format,argp);
+    va_end(argp);
+    return waddstr(conio_scr,buffer);
+}
+#else
 #define c_printf proutn
 #endif /* SERGEEV */
 
index 316d58a90126b9a131207807d395343b4d880351..b93084289fa64fd1d783a1fffde431229450168a 100644 (file)
 
 static int fd = 0;
 
-#ifdef SERGEEV
-int c_printf (char *format, ... )
-{
-    char buffer[BUFSIZ]; /* Well, BUFSIZ is from ncurses...  */
-    va_list argp;
-    va_start(argp,format);
-    vsprintf(buffer,format,argp);
-    va_end(argp);
-    return waddstr(conio_scr,buffer);
-}
-#endif /* SERGEEV */
-
 void sound(unsigned int freq)
 {
     if(fd==0) fd=open("/dev/console", O_RDONLY);