Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1.chuqui 4/7/84; site voder.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!tektronix!hplabs!nsc!voder!jeff From: jeff@voder.UUCP (Jeff Gilliam) Newsgroups: net.news.b Subject: Correction to 4.2 vnews fixes Message-ID: <283@voder.UUCP> Date: Wed, 11-Jul-84 04:29:31 EDT Article-I.D.: voder.283 Posted: Wed Jul 11 04:29:31 1984 Date-Received: Fri, 13-Jul-84 03:26:45 EDT Organization: National Semiconductor, Santa Clara Lines: 87 OOPS! It seems I made a *minor* mistake in my previous posting of vnews fixes for 4.2 BSD. Actually, there were two errors which, taken together, actually work! (Two wrongs make a right!?) Anyway, the corrected (really!) fix is included. Sorry for any confusion. *** old.visual.c Mon Jul 9 23:04:32 1984 --- visual.c Wed Jul 11 01:15:06 1984 *************** *** 1802,1803 i = 60 - t->tm_sec; alarm(i > 30? 30 : i); /* reset alarm */ --- 1802,1808 ----- i = 60 - t->tm_sec; + #ifdef BSD4_2 + alarm((unsigned) i); /* reset alarm */ + #else alarm(i > 30? 30 : i); /* reset alarm */ + #endif hour = t->tm_hour % 12; *************** *** 1882,1883 int readfds, exceptfds; #endif --- 1886,1888 ----- int readfds, exceptfds; + int nfound; #endif *************** *** 1902,1904 #ifdef BSD4_2 ! /* use a read because it can be interrupted */ readfds = 1; exceptfds = 1; --- 1907,1909 ----- #ifdef BSD4_2 ! /* use a select because it can be interrupted */ readfds = 1; exceptfds = 1; *************** *** 1904,1907 readfds = 1; exceptfds = 1; ! select(1,&readfds,0,&exceptfds,0); ! if (readfds & 1) { /* got a key, go ahead and get it */ innleft = read(0,inbuf,INBUFSIZ); --- 1909,1912 ----- readfds = 1; exceptfds = 1; ! nfound = select(1,&readfds,0,&exceptfds,0); ! if (nfound > 0) { /* got a key, go ahead and get it */ innleft = read(0,inbuf,INBUFSIZ); *************** *** 2041,2042 register int i; unsigned oldalarm; --- 2046,2049 ----- register int i; + #ifndef BSD4_2 unsigned oldalarm; + #endif *************** *** 2047,2048 */ oldalarm = alarm((unsigned)0); /* suspend interrupts while writing */ --- 2054,2058 ----- */ + #ifndef BSD4_2 oldalarm = alarm((unsigned)0); /* suspend interrupts while writing */ + #endif for (p = outbuf; p < outnext ; p += i) *************** *** 2059,2060 outnext = outbuf; alarm(oldalarm); /* reset the timer */ --- 2068,2072 ----- outnext = outbuf; + #ifndef BSD4_2 alarm(oldalarm); /* reset the timer */ + #endif } Jeff Gilliam