DragonFly BSD
DragonFly commits List (threaded) for 2004-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/usr.bin/soelim


From: Andreas Hauser <andy@xxxxxxxxxxxxxxx>
Date: 29 Sep 2004 22:32:27 -0000

joerg wrote @ Sun, 26 Sep 2004 08:56:13 -0700 (PDT):
> joerg       2004/09/26 08:56:13 PDT
> 
> DragonFly src repository
> 
>   Modified files:
>     usr.bin/soelim       Makefile soelim.c 
>   Log:
>   - make process() static and take const arguments
>   - use the exit code to indicate a problem while processing any of the input
>   - mark as WARNS=6 clean
>   
>   Submitted-by: Liam J. Foy
>   
>   - reduce the special casing of argc == 1 and switch to a while loop
>   
>   Revision  Changes    Path
>   1.2       +2 -0      src/usr.bin/soelim/Makefile
>   1.4       +15 -16    src/usr.bin/soelim/soelim.c
> 
> 
> http://www.dragonflybsd.org/cvsweb/src/usr.bin/soelim/Makefile.diff?r1=1.1&r2=1.2&f=u
> http://www.dragonflybsd.org/cvsweb/src/usr.bin/soelim/soelim.c.diff?r1=1.3&r2=1.4&f=u

this breaks for argc == 2


Index: usr.bin/soelim/soelim.c
===================================================================
RCS file: /home/dcvs/src/usr.bin/soelim/soelim.c,v
retrieving revision 1.4
diff -u -r1.4 soelim.c
--- usr.bin/soelim/soelim.c	26 Sep 2004 15:56:13 -0000	1.4
+++ usr.bin/soelim/soelim.c	30 Sep 2004 00:28:41 -0000
@@ -67,9 +67,12 @@
 	int errs = 0;
 
 	if (argc == 1)
+	{
 		argv[1] = STDIN_NAME;
+		argc++;
+	}
 
-	while (argc > 0) {
+	while (argc > 1) {
 		errs += process(argv[1]);
 		argv++;
 		argc--;



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]