From 895e375cb3d77ca26903ee1904c3952e3ae33e2d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 3 Feb 2005 23:05:18 +0000 Subject: [PATCH] Start pulling SERGEEV dependencies out of sst.c. --- io.c | 16 ++++++++++++++++ sst.c | 15 --------------- 2 files changed, 16 insertions(+), 15 deletions(-) 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; -- 2.31.1