From 2b49b140cc13cf36ec5ee5acaca5ac7bfeed6366 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 4 Aug 2010 16:10:10 -0700 Subject: sort: -R now uses less memory on long lines with internal NULs * lib/Makefile.am (libcoreutils_a_SOURCES): Remove xmemxfrm.c, xmemxfrm.h. * lib/memxfrm.c, lib/memxfrm.h, lib/xmemxfrm.c, lib/xmemxfrm.h: Remove. * m4/memxfrm.m4: Likewise. * m4/prereq.m4 (gl_PREREQ): Remove gl_MEMXFRM. * po/POTFILES.in: Remove lib/xmemxfrm.c. * src/sort.c: Don't include xmemxfrm.h. (cmp_hashes): Remove. (xstrxfrm): New function. (compare_random): If a line contains NULs, don't create a big buffer that contains the strxfrm output of each string in the line. Instead, accumulate checksums and differences as we go, so that at any one time we have to store at most the output of a single strxfrm call when processing the line. This removes the need for an memxfrm function. --- lib/memxfrm.h | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 lib/memxfrm.h (limited to 'lib/memxfrm.h') diff --git a/lib/memxfrm.h b/lib/memxfrm.h deleted file mode 100644 index 605421dc2..000000000 --- a/lib/memxfrm.h +++ /dev/null @@ -1,2 +0,0 @@ -#include -size_t memxfrm (char *restrict, size_t, char *restrict, size_t); -- cgit v1.2.3-54-g00ecf