summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strxfrm.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-08-13 17:03:18 +0000
committerache <ache@FreeBSD.org>1996-08-13 17:03:18 +0000
commit3ba537ecfe2ab1290c1a9710fd0766979614ce7a (patch)
treeac378725cfdd0263fb218296c9c0d68e408c1e7a /lib/libc/string/strxfrm.c
parent5353c9c28576d84c8560a7c6a4bdedead2448d47 (diff)
downloadFreeBSD-src-3ba537ecfe2ab1290c1a9710fd0766979614ce7a.zip
FreeBSD-src-3ba537ecfe2ab1290c1a9710fd0766979614ce7a.tar.gz
Back out fallback approximation changes, they are not so right to live
Diffstat (limited to 'lib/libc/string/strxfrm.c')
-rw-r--r--lib/libc/string/strxfrm.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c
index 236c3ac..6031674 100644
--- a/lib/libc/string/strxfrm.c
+++ b/lib/libc/string/strxfrm.c
@@ -29,7 +29,6 @@
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
#include "collate.h"
size_t
@@ -51,25 +50,14 @@ strxfrm(dest, src, len)
if (__collate_load_error) {
size_t slen = strlen(src);
- u_char *us;
- if (slen < len)
+ if (slen < len) {
strcpy(d, src);
- else {
- slen = len - 1;
- strncpy(d, src, slen);
- d[slen] = '\0';
+ return slen;
}
- for (us = d; *us; us++) {
- if (isupper(*us)) {
- if (tolower(*us) < *us)
- *us = tolower(*us) - 1;
- /* assume it not started from 0 */
- else
- *us = tolower(*us);
- }
- }
- return slen;
+ strncpy(d, src, len - 1);
+ d[len - 1] = '\0';
+ return len - 1;
}
ss = s = __collate_substitute(src);
OpenPOWER on IntegriCloud