From: Eric S. Raymond Date: Thu, 3 Feb 2005 23:05:18 +0000 (+0000) Subject: Start pulling SERGEEV dependencies out of sst.c. X-Git-Tag: 2.0~395 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=895e375cb3d77ca26903ee1904c3952e3ae33e2d;p=super-star-trek.git Start pulling SERGEEV dependencies out of sst.c. --- diff --git a/io.c b/io.c index bce39c2..4ca069f 100644 --- 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 346bb4c..c8824af 100644 --- 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;