#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"
{
#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
{
#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). */
}
/* 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)
{
#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));
}