summaryrefslogtreecommitdiff
path: root/src/tr.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-07-30 21:08:48 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-07-30 21:08:48 +0000
commit7eb95094d3ea4867da8c28c9bfe4cc40a1959d22 (patch)
treeb1c23b132c16986a9bd6500955cc3616f4a78217 /src/tr.c
parent67bfd37c8bacb521eda7db7253b7da3e8932a36a (diff)
downloadcoreutils-7eb95094d3ea4867da8c28c9bfe4cc40a1959d22.tar.xz
(to_uchar): Remove; now in system.h.
(is_char_class_member): Use bool when appropriate.
Diffstat (limited to 'src/tr.c')
-rw-r--r--src/tr.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/tr.c b/src/tr.c
index 45aad1a93..4e2fb152f 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -37,11 +37,6 @@
enum { N_CHARS = UCHAR_MAX + 1 };
-/* Convert a possibly-signed character to an unsigned character. This is
- a bit safer than casting to unsigned char, since it catches some type
- errors that the cast doesn't. */
-static inline unsigned char to_uchar (char ch) { return ch; }
-
/* An unsigned integer type big enough to hold a repeat count or an
unsigned character. POSIX requires support for repeat counts as
high as 2**31 - 1. Since repeat counts might need to expand to
@@ -375,13 +370,13 @@ is_equiv_class_member (unsigned char equiv_class, unsigned char c)
return (equiv_class == c);
}
-/* Return nonzero if the character C is a member of the
+/* Return true if the character C is a member of the
character class CHAR_CLASS. */
-static int
+static bool
is_char_class_member (enum Char_class char_class, unsigned char c)
{
- int result;
+ bool result;
switch (char_class)
{