Include xmemcoll.h, not memcoll.h.
authorJim Meyering <jim@meyering.net>
Tue, 22 Jan 2002 08:11:04 +0000 (08:11 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 22 Jan 2002 08:11:04 +0000 (08:11 +0000)
Use xmemcoll instead of memcoll.

src/comm.c
src/join.c

index 568968f..51d4462 100644 (file)
@@ -27,7 +27,7 @@
 #include "linebuffer.h"
 #include "error.h"
 #include "hard-locale.h"
-#include "memcoll.h"
+#include "xmemcoll.h"
 
 /* The official name of this program (e.g., no `g' prefix).  */
 #define PROGRAM_NAME "comm"
@@ -178,8 +178,8 @@ compare_files (char **infiles)
        {
 #ifdef ENABLE_NLS
          if (hard_LC_COLLATE)
-           order = memcoll (thisline[0]->buffer, thisline[0]->length - 1,
-                            thisline[1]->buffer, thisline[1]->length - 1);
+           order = xmemcoll (thisline[0]->buffer, thisline[0]->length - 1,
+                             thisline[1]->buffer, thisline[1]->length - 1);
          else
 #endif
            {
index 1ad6496..0a5399b 100644 (file)
@@ -30,7 +30,7 @@
 #include "hard-locale.h"
 #include "linebuffer.h"
 #include "memcasecmp.h"
-#include "memcoll.h"
+#include "xmemcoll.h"
 #include "xstrtol.h"
 
 /* The official name of this program (e.g., no `g' prefix).  */
@@ -322,7 +322,8 @@ delseq (struct seq *seq)
 }
 
 /* Return <0 if the join field in LINE1 compares less than the one in LINE2;
-   >0 if it compares greater; 0 if it compares equal.  */
+   >0 if it compares greater; 0 if it compares equal.
+   Report an error and exit if the comparison fails.  */
 
 static int
 keycmp (struct line *line1, struct line *line2)
@@ -373,7 +374,7 @@ keycmp (struct line *line1, struct line *line2)
     {
 #ifdef ENABLE_NLS
       if (hard_LC_COLLATE)
-       return memcoll ((char *) beg1, len1, (char *) beg2, len2);
+       return xmemcoll ((char *) beg1, len1, (char *) beg2, len2);
 #endif
       diff = memcmp (beg1, beg2, min (len1, len2));
     }