Remove CRs.
[super-star-trek.git] / conio.c
diff --git a/conio.c b/conio.c
index 95e8a78c81085bdd1f1aa5483e352c719915e0a6..9f51c31987f2ddd65d2ad7137a7a2bdc6bfdac87 100644 (file)
--- a/conio.c
+++ b/conio.c
@@ -31,7 +31,6 @@ char color_warning=1;
 int directvideo;
 WINDOW *conio_scr;
 
-#ifdef SERGEEV 
 /* Some internals... */
 static int colortab(int a) /* convert LINUX Color code to DOS-standard */
 {
@@ -47,7 +46,6 @@ static int colortab(int a) /* convert LINUX Color code to DOS-standard */
    }
    return COLOR_BLACK;
 } 
-#endif /* SERGEEV */
 
 static void docolor (int color) /* Set DOS-like text mode colors */
 {
@@ -61,9 +59,8 @@ static void docolor (int color) /* Set DOS-like text mode colors */
    wattron(conio_scr,COLOR_PAIR(1+(color&7)+((color&112)>>1))); 
 }
 
-#ifdef SERGEEV
 /* Call this before any call to linux conio - except the port functions ! */
-void __attribute__((constructor)) initconio (void) /* This is needed, because ncurses needs to be initialized */
+void initconio (void)
 {
    int x,y;
    short pair;
@@ -93,7 +90,6 @@ void __attribute__((constructor)) initconio (void) /* This is needed, because nc
    textcolor(7);
    textbackground(0);
 }
-#endif /* SERGEEV */
 
 /* Call this on exiting your program */
 void doneconio (void)
@@ -133,10 +129,13 @@ void clreol (void)
 }
 
 void clrscr (void)
+/* clear screen -- can be a no-op in tty mode */
 {
+#ifdef SERGEEV
    wclear(conio_scr);
    wmove(conio_scr,0,0);
    wrefresh(conio_scr);
+#endif /* SERGEEV */
 }
 
 int cprintf (char *format, ... )
@@ -147,8 +146,13 @@ int cprintf (char *format, ... )
    va_start(argp,format);
    vsprintf(buffer,format,argp);
    va_end(argp);
+
+#ifdef SERGEEV
    i=waddstr(conio_scr,buffer);
    wrefresh(conio_scr);
+#else
+   i=printf(buffer);
+#endif /* SERGEEV */
    return(i);
 }
 
@@ -218,7 +222,7 @@ void gettextinfo(struct text_info *inforec)
 } 
 
 void gotoxy (int x, int y)
-/* address cusor -- OK for this to be a no-op in TTY mode */
+/* address cursor -- OK for this to be a no-op in TTY mode */
 {
 #ifdef SERGEEV
    y--;