Pull SERGEEV dependencies out of reports.c.
[super-star-trek.git] / io.c
diff --git a/io.c b/io.c
index 309069318356ed571d6bd5f7c8f31280b9ba6590..bce39c2c8c7f010ac06c73f3b6fd987ca6b6316c 100644 (file)
--- a/io.c
+++ b/io.c
@@ -277,6 +277,20 @@ void prouts(char *fmt, ...) {
 #endif /* SERGEEV */
 }
 
+void 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);
+#ifdef SERGEEV
+    waddstr(conio_scr,buffer);
+#else
+    proutn(buffer);
+#endif /* SERGEEV */
+}
+
 void warble(void)
 /* sound and visual effects for teleportation */
 {