summaryrefslogtreecommitdiff
path: root/src/join.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-04-13 18:11:43 +0000
committerJim Meyering <jim@meyering.net>1996-04-13 18:11:43 +0000
commitb4a20010e6803146a88004438d8b5992a2d90b43 (patch)
tree29614409ae10e451ea0ec6477ebfb91c9cb37592 /src/join.c
parentb8b9306a9aa5e9bd2e5d5143014d9383d07fcf13 (diff)
downloadcoreutils-b4a20010e6803146a88004438d8b5992a2d90b43.tar.xz
(decode_field_spec): Rename local variable `valid'
to invalid (and reverse sense) to avoid conflict with the macro definition in /usr/include/locale.h on SunOS 4.1.3.
Diffstat (limited to 'src/join.c')
-rw-r--r--src/join.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/join.c b/src/join.c
index 8b2b8bbd6..1f6143984 100644
--- a/src/join.c
+++ b/src/join.c
@@ -649,7 +649,7 @@ add_field (int file, int field)
static int
decode_field_spec (const char *s, int *file_index, int *field_index)
{
- int valid = 0;
+ int invalid = 1;
/* The first character must be 0, 1, or 2. */
switch (s[0])
@@ -659,7 +659,7 @@ decode_field_spec (const char *s, int *file_index, int *field_index)
{
*file_index = 0;
/* Leave *field_index undefined. */
- valid = 1;
+ invalid = 0;
}
else
{
@@ -685,7 +685,7 @@ decode_field_spec (const char *s, int *file_index, int *field_index)
*file_index = s[0] - '0';
/* Convert to a zero-based index. */
*field_index = (int) tmp_long - 1;
- valid = 1;
+ invalid = 0;
}
}
break;
@@ -694,7 +694,7 @@ decode_field_spec (const char *s, int *file_index, int *field_index)
error (0, 0, _("invalid file number in field spec: `%s'"), s);
break;
}
- return !valid;
+ return invalid;
}
/* Add the comma or blank separated field spec(s) in STR to `outlist'.