Article View: comp.bugs.4bsd
Article #420fortune may loop endlessly +FIX
From: Jeff Gilliam
Date: Fri, 21 Nov 1986 11:07
Date: Fri, 21 Nov 1986 11:07
42 lines
1520 bytes
1520 bytes
Index: games/fortune/fortune.c 4.3BSD
Description:
If given *both* the -s (short fortunes only) and -l (long fortunes
only) flags fortune will loop endlessly. This can be annoying
when people call fortune from their .logout.
Repeat-By:
/usr/games/fortune -sl
Fix:
Index: fortune.c
diff -c -r1.1 -r1.2
*** /tmp/,RCSt1019296 Fri Nov 21 03:05:20 1986
--- /tmp/,RCSt2019296 Fri Nov 21 03:05:21 1986
***************
*** 1,4 ****
! /* $Header: fortune.c,v 1.1 86/11/04 17:47:50 root Exp $ */
# include <sys/types.h>
# include <stdio.h>
--- 1,4 ----
! /* $Header: fortune.c,v 1.2 86/11/04 17:48:21 root Exp $ */
# include <sys/types.h>
# include <stdio.h>
***************
*** 167,175 ****
--- 167,177 ----
break;
case 's': /* short ones only */
Sflag++;
+ Lflag = 0;
break;
case 'l': /* long ones only */
Lflag++;
+ Sflag = 0;
break;
case 'o': /* offensive ones only */
Oflag++;
--
Jeff Gilliam {ucbvax,pyramid,nsc}!voder!jeff
Technical Details
Message-ID:
<2744@voder.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!voder!jeffShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!voder!jeff From: jeff@voder.UUCP (Jeff Gilliam) Newsgroups: comp.bugs.4bsd Subject: fortune may loop endlessly +FIX Message-ID: <2744@voder.UUCP> Date: Fri, 21-Nov-86 06:07:53 EST Article-I.D.: voder.2744 Posted: Fri Nov 21 06:07:53 1986 Date-Received: Fri, 21-Nov-86 20:05:30 EST Organization: National Semiconductor, Santa Clara Lines: 42