50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
Reply-To: obz@sisd.sisd.Kodak.COM
|
|
Date: Tue, 28 Jan 1992 15:54:57 +0200
|
|
From: obz@sisd.sisd.Kodak.COM (Orest Zborowski COMP)
|
|
Sender: linux-activists-request@joker.cs.hut.fi
|
|
To: linux-activists@joker.cs.hut.fi
|
|
Subject: libcurses patch
|
|
|
|
|
|
hi-
|
|
we don't have news posting working quite right (or at all) at our
|
|
site but i couldn't wait any longer. i have a fun yahtzee program (good as
|
|
a short break between hacking) which makes pretty good use of the libcurses
|
|
library on tsx-11. the problem with that library is that it was missing
|
|
the fwopen() call, which apparently creates a special FILE which does
|
|
output through the curses window vectors. i made the small change to
|
|
make it use vsprintf instead and avoid the non-portable FILE creation
|
|
code.
|
|
|
|
zorst (orest zborowski)
|
|
obz@sisd.kodak.com
|
|
|
|
---cut here---
|
|
*** printw.c.ORIG Sat Jan 25 06:19:45 1992
|
|
--- printw.c Sat Jan 25 06:26:19 1992
|
|
***************
|
|
*** 131,141 ****
|
|
#endif
|
|
va_list ap;
|
|
{
|
|
! FILE *f;
|
|
! extern FILE *fwopen();
|
|
|
|
! if ((f = fwopen((void *)win, _winwrite)) == NULL)
|
|
return ERR;
|
|
! (void) vfprintf(f, fmt, ap);
|
|
! return fclose(f) ? ERR : OK;
|
|
}
|
|
--- 131,140 ----
|
|
#endif
|
|
va_list ap;
|
|
{
|
|
! char buf[1024];
|
|
|
|
! vsprintf(buf, fmt, ap);
|
|
! if (_winwrite(win, buf, strlen(buf)))
|
|
return ERR;
|
|
! return OK;
|
|
}
|
|
---cut here---
|