svn commit: trunk/busybox/coreutils

aldot at busybox.net aldot at busybox.net
Tue Dec 13 10:48:47 UTC 2005


Author: aldot
Date: 2005-12-13 02:48:45 -0800 (Tue, 13 Dec 2005)
New Revision: 12867

Log:
- wrap label GET_COUNT in #if ENABLE_FEATURE_FANCY_applet to avoid warning
  about unused label.


Modified:
   trunk/busybox/coreutils/head.c
   trunk/busybox/coreutils/tail.c


Changeset:
Modified: trunk/busybox/coreutils/head.c
===================================================================
--- trunk/busybox/coreutils/head.c	2005-12-13 10:41:14 UTC (rev 12866)
+++ trunk/busybox/coreutils/head.c	2005-12-13 10:48:45 UTC (rev 12867)
@@ -33,7 +33,7 @@
 
 static const char head_opts[] =
 	"n:"
-#ifdef CONFIG_FEATURE_FANCY_HEAD
+#if ENABLE_FEATURE_FANCY_HEAD
 	"c:qv"
 #endif
 	;
@@ -44,7 +44,7 @@
 {
 	unsigned long count = 10;
 	unsigned long i;
-#ifdef CONFIG_FEATURE_FANCY_HEAD
+#if ENABLE_FEATURE_FANCY_HEAD
 	int count_bytes = 0;
 	int header_threshhold = 1;
 #endif
@@ -56,7 +56,7 @@
 	int c;
 	int retval = EXIT_SUCCESS;
 
-#if defined CONFIG_FEATURE_SUSv2 || defined CONFIG_FEATURE_FANCY_HEAD
+#if defined CONFIG_FEATURE_SUSv2 || ENABLE_FEATURE_FANCY_HEAD
 	/* Allow legacy syntax of an initial numeric option without -n. */
 	if ((argc > 1) && (argv[1][0] == '-')
 		/* && (isdigit)(argv[1][1]) */
@@ -72,7 +72,7 @@
 	/* No size benefit in converting this to bb_getopt_ulflags */
 	while ((opt = getopt(argc, argv, head_opts)) > 0) {
 		switch(opt) {
-#ifdef CONFIG_FEATURE_FANCY_HEAD
+#if ENABLE_FEATURE_FANCY_HEAD
 			case 'q':
 				header_threshhold = INT_MAX;
 				break;
@@ -85,7 +85,9 @@
 #endif
 			case 'n':
 				p = optarg;
+#if ENABLE_FEATURE_FANCY_HEAD
 			GET_COUNT:
+#endif
 				count = bb_xgetularg10(p);
 				break;
 			default:
@@ -99,7 +101,7 @@
 	}
 
 	fmt = header_fmt_str + 1;
-#ifdef CONFIG_FEATURE_FANCY_HEAD
+#if ENABLE_FEATURE_FANCY_HEAD
 	if (argc - optind <= header_threshhold) {
 		header_threshhold = 0;
 	}

Modified: trunk/busybox/coreutils/tail.c
===================================================================
--- trunk/busybox/coreutils/tail.c	2005-12-13 10:41:14 UTC (rev 12866)
+++ trunk/busybox/coreutils/tail.c	2005-12-13 10:48:45 UTC (rev 12867)
@@ -96,7 +96,7 @@
 
 static const char tail_opts[] =
 	"fn:c:"
-#ifdef CONFIG_FEATURE_FANCY_TAIL
+#if ENABLE_FEATURE_FANCY_TAIL
 	"qs:v"
 #endif
 	;
@@ -142,7 +142,9 @@
 				count_bytes = 1;
 				/* FALLS THROUGH */
 			case 'n':
+#if ENABLE_FEATURE_FANCY_TAIL
 			GET_COUNT:
+#endif
 				count = bb_xgetlarg10_sfx(optarg, tail_suffixes);
 				/* Note: Leading whitespace is an error trapped above. */
 				if (*optarg == '+') {
@@ -154,7 +156,7 @@
 					count = -count;
 				}
 				break;
-#ifdef CONFIG_FEATURE_FANCY_TAIL
+#if ENABLE_FEATURE_FANCY_TAIL
 			case 'q':
 				header_threshhold = INT_MAX;
 				break;




More information about the busybox-cvs mailing list