Start pulling SERGEEV dependencies out of sst.c.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 3 Feb 2005 23:05:18 +0000 (23:05 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 3 Feb 2005 23:05:18 +0000 (23:05 +0000)
io.c
sst.c

diff --git a/io.c b/io.c
index bce39c2c8c7f010ac06c73f3b6fd987ca6b6316c..4ca069ff8f7844a16648b5b6fb07bc7e3521923a 100644 (file)
--- a/io.c
+++ b/io.c
@@ -341,5 +341,21 @@ void getline(char *line, int max) {
     }
 }
 
+void setwnd(short wndnum){
+/* change windows -- OK for this to be a no-op in tty mode */
+#ifdef SERGEEV
+     int cury;
+     cury=wherey()+wnds[curwnd].wndtop-wnds[wndnum].wndtop;
+     if ((curwnd==0)&&(wndnum!=0)) clrscr();
+     window(wnds[wndnum].wndleft, wnds[wndnum].wndtop, wnds[wndnum].wndright, wnds[wndnum].wndbottom);
+     if ((curwnd==wndnum)&&(cury>wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1)){
+        gotoxy(wnds[wndnum].wndright-wnds[wndnum].wndleft+1,wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1);
+       skip(1);
+     }
+     curwnd=wndnum;
+     gotoxy(1,cury);
+#endif /* SERGEEV */
+}
+
 void commandhook(char *cmd, int before) {
 }
diff --git a/sst.c b/sst.c
index 346bb4c740c4a697ed76451183eadf6375f923b9..c8824af5c8d48fc514cb7e5f129635d2bd2490e4 100644 (file)
--- a/sst.c
+++ b/sst.c
@@ -170,21 +170,6 @@ static void listCommands(int x) {
        if (x) prout("   HELP");
 }
 
-#ifdef SERGEEV
-void setwnd(short wndnum){
-     int cury;
-     cury=wherey()+wnds[curwnd].wndtop-wnds[wndnum].wndtop;
-     if ((curwnd==0)&&(wndnum!=0)) clrscr();
-     window(wnds[wndnum].wndleft, wnds[wndnum].wndtop, wnds[wndnum].wndright, wnds[wndnum].wndbottom);
-     if ((curwnd==wndnum)&&(cury>wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1)){
-        gotoxy(wnds[wndnum].wndright-wnds[wndnum].wndleft+1,wnds[wndnum].wndbottom-wnds[wndnum].wndtop+1);
-       skip(1);
-     }
-     curwnd=wndnum;
-     gotoxy(1,cury);
-}
-#endif /* SERGEEV */
-
 static void helpme(void) {
        int i, j;
        char cmdbuf[32], *cp;