[patch] add Copyright to seq.c and shrink it a tiny bit

Bernhard Fischer rep.nop at aon.at
Thu Feb 23 16:00:06 UTC 2006


Hi,

Glenn, is seq.c yours? It looks like from the svn log..
Please clarify.

$ size coreutils/seq.o*
   text    data     bss     dec     hex filename
    377       0       0     377     179 coreutils/seq.o
    379       0       0     379     17b coreutils/seq.o.oorig

-------------- next part --------------
Index: coreutils/seq.c
===================================================================
--- coreutils/seq.c	(revision 14228)
+++ coreutils/seq.c	(working copy)
@@ -2,18 +2,9 @@
 /*
  * seq implementation for busybox
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of version 2 of the GNU General Public License as
- *  published by the Free Software Foundation.
+ * Copyright (C) 2004, Glenn McGrath
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Licensed under the GPL v2, see the file LICENSE in this tarball.
  */
 
 #include <stdio.h>
@@ -38,14 +29,13 @@
 	last = atof(argv[argc - 1]);
 
 	/* You should note that this is pos-5.0.91 semantics, -- FK. */
-	if ((first > last) && (increment > 0)) {
-		return EXIT_SUCCESS;
+	if (!((first > last) && (increment > 0))) {
+		for (i = first;
+			 ((first <= last) ? (i <= last) : (i >= last));
+			 i += increment) {
+				printf("%g\n", i);
+		}
 	}
 
-	for (i = first; ((first <= last) ? (i <= last) : (i >= last));
-	     i += increment) {
-		printf("%g\n", i);
-	}
-
 	return EXIT_SUCCESS;
 }


More information about the busybox mailing list