Article View: news.software.nn
Article #966Bug in patch #10
From: Nicky Sandru (langt haar)
Date: Fri, 05 Oct 1990 14:48
Date: Fri, 05 Oct 1990 14:48
69 lines
1980 bytes
1980 bytes
I have sent this to nn-bug (with the :bug command) but it was bouced
back, so I post it in the news.software.nn.
The patch #10 contains an error in term.c. When FREAD is defined and
HAVE_TERMIO is not, the 'arg' variable is allocated after executable
statements in 'flush_input()' and this causes an syntax error. Here
follows the patch.
Long Haired Nicky
News Adm at iddth
E-mail: ns@iddth.id.dk
*** term.c.old Tue Oct 2 16:53:55 1990
--- term.c Fri Oct 5 14:25:46 1990
***************
*** 816,825
static int do_flush_input = 0;
flush_input()
{
BATCH_CHECK;
#ifdef HAVE_TERMIO
ioctl(0, TCFLSH, 0);
do_flush_input = 1;
--- 816,831 -----
static int do_flush_input = 0;
flush_input()
{
+ #ifndef HAVE_TERMIO
+ #ifdef FREAD
+ int arg = FREAD;
+ #endif
+ #endif
+
BATCH_CHECK;
#ifdef HAVE_TERMIO
ioctl(0, TCFLSH, 0);
do_flush_input = 1;
***************
*** 823,833
#ifdef HAVE_TERMIO
ioctl(0, TCFLSH, 0);
do_flush_input = 1;
#else
#ifdef FREAD
- int arg = FREAD;
ioctl(0, TIOCFLUSH, &arg);
#else
ioctl(0, TIOCFLUSH, 0);
#endif
#endif
--- 829,838 -----
#ifdef HAVE_TERMIO
ioctl(0, TCFLSH, 0);
do_flush_input = 1;
#else
#ifdef FREAD
ioctl(0, TIOCFLUSH, &arg);
#else
ioctl(0, TIOCFLUSH, 0);
#endif
#endif
Technical Details
Message-ID:
<1990Oct5.144818.12018@iddth.id.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!iddth.id.dk!nsShow Full Headers
Complete Article Headers
Message-ID: <1990Oct5.144818.12018@iddth.id.dk> Subject: Bug in patch #10 Date: Fri, 05 Oct 1990 14:48:18 +0000 From: ns@iddth.id.dk (Nicky Sandru (langt haar)) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!iddth.id.dk!ns Newsgroups: news.software.nn Organization: Dept. of Comp. Sci., DTH, Denmark Lines: 69 Posted: Fri Oct 5 15:48:18 1990