summaryrefslogtreecommitdiff
path: root/libdb
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-02-05 00:43:55 +0000
committerColin Watson <cjwatson@debian.org>2019-02-05 00:43:55 +0000
commit0a0bf0b040ea92afa15a01004094f2e480abd869 (patch)
tree4f0d06b083c29f23589bc814afe027e0941ca726 /libdb
parent1bd019e2bb9507e732dafe3a68c9d59f68c0dd3f (diff)
Inline lower into name_to_key
With only one remaining user, it wasn't pulling its weight. * libdb/db_lookup.c (name_to_key): Inline the implementation of lower. * lib/Makefile.am (libman_la_SOURCES): Remove lower.c and lower.h. * lib/README: Remove lower.*. * lib/lower.c, lib/lower.h: Remove.
Diffstat (limited to 'libdb')
-rw-r--r--libdb/db_lookup.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libdb/db_lookup.c b/libdb/db_lookup.c
index ff5e2310..28cd90e2 100644
--- a/libdb/db_lookup.c
+++ b/libdb/db_lookup.c
@@ -47,7 +47,6 @@
#include "manconfig.h"
#include "glcontainers.h"
-#include "lower.h"
#include "wordfnmatch.h"
#include "xregcomp.h"
@@ -162,7 +161,13 @@ void free_mandata_struct (struct mandata *pinfo)
*/
char *name_to_key (const char *name)
{
- return lower (name);
+ char *low, *p;
+
+ p = low = xmalloc (strlen (name) + 1);
+ while (*name)
+ *p++ = CTYPE (tolower, *name++);
+ *p = *name;
+ return low;
}
/* return char ptr array to the data's fields */