summaryrefslogtreecommitdiff
path: root/lib/libc/string/strxfrm.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1998-06-05 09:49:51 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1998-06-05 09:49:51 +0000
commit0ea569ff6f490556dea024906b3ac69dcde61aac (patch)
tree3219cc09f701d73a10aff444d96c8cad03f80453 /lib/libc/string/strxfrm.c
parent5239c0a5dd6709e6b7d6e21b3a0bdafb7b150921 (diff)
Notes
Diffstat (limited to 'lib/libc/string/strxfrm.c')
-rw-r--r--lib/libc/string/strxfrm.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c
index 64b0bcfed50d..ecb6d38b5ce7 100644
--- a/lib/libc/string/strxfrm.c
+++ b/lib/libc/string/strxfrm.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: strxfrm.c,v 1.8 1997/02/22 15:03:31 peter Exp $
*/
#include <stdlib.h>
@@ -60,8 +60,8 @@ strxfrm(dest, src, len)
return len - 1;
}
- ss = s = __collate_substitute(src);
prim = sec = 0;
+ ss = s = __collate_substitute(src);
while (*s && len > 1) {
while (*s && !prim) {
__collate_lookup(s, &l, &prim, &sec);
@@ -70,23 +70,11 @@ strxfrm(dest, src, len)
if (prim) {
*d++ = (char)prim;
len--;
+ prim = 0;
}
}
-#if 0
- s = ss;
- while (*s && len > 1) {
- while (*s && !prim) {
- lookup(s, &l, &prim, &sec);
- s += l;
- }
- if (prim && sec) {
- *d++ = (char)sec;
- len--;
- }
- }
-#endif /* 0 */
- *d = '\0';
free(ss);
+ *d = '\0';
return d - dest;
}