summaryrefslogtreecommitdiff
path: root/coreutils/head.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2005-12-13 10:48:45 +0000
committerBernhard Reutner-Fischer2005-12-13 10:48:45 +0000
commit5816ccb190e0ffc10d9f4da2f98a2cb0da6f6315 (patch)
tree785f8bc8cd9da5efeb82abd9b0315652164cebb1 /coreutils/head.c
parentec351c32e33517e103315927f694d43478c41f67 (diff)
downloadbusybox-5816ccb190e0ffc10d9f4da2f98a2cb0da6f6315.zip
busybox-5816ccb190e0ffc10d9f4da2f98a2cb0da6f6315.tar.gz
- wrap label GET_COUNT in #if ENABLE_FEATURE_FANCY_applet to avoid warning
about unused label.
Diffstat (limited to 'coreutils/head.c')
-rw-r--r--coreutils/head.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/coreutils/head.c b/coreutils/head.c
index a208733..628dae5 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -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 @@ int head_main(int argc, char **argv)
{
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 head_main(int argc, char **argv)
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 @@ int head_main(int argc, char **argv)
/* 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 @@ int head_main(int argc, char **argv)
#endif
case 'n':
p = optarg;
+#if ENABLE_FEATURE_FANCY_HEAD
GET_COUNT:
+#endif
count = bb_xgetularg10(p);
break;
default:
@@ -99,7 +101,7 @@ int head_main(int argc, char **argv)
}
fmt = header_fmt_str + 1;
-#ifdef CONFIG_FEATURE_FANCY_HEAD
+#if ENABLE_FEATURE_FANCY_HEAD
if (argc - optind <= header_threshhold) {
header_threshhold = 0;
}