diff options
author | Jim Meyering <jim@meyering.net> | 1997-10-13 03:52:35 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-10-13 03:52:35 +0000 |
commit | b01df13c39c35a867889adb980b4172edf0b8f0d (patch) | |
tree | b63e2271998221be9b4988d992e60340f7a072f5 /src | |
parent | 3616231d94c493b739af86f677d2d8a25db6a3cc (diff) | |
download | coreutils-b01df13c39c35a867889adb980b4172edf0b8f0d.tar.xz |
(NLS_MAP): Remove unused definitions.
Replace with uses of UCHAR.
(nls_locale_map): Remove dcl of unused file-scope array.
Diffstat (limited to 'src')
-rw-r--r-- | src/sort.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/sort.c b/src/sort.c index 927a93aea..dd605bf8d 100644 --- a/src/sort.c +++ b/src/sort.c @@ -133,19 +133,6 @@ static int nls_month_found = 1; /* A string with one character, to enforce char collation */ # define NLS_ONE_CHARACTER_STRING " " -/* Map the characters in the "C" locale 1 - 1 to the locale view of - character order. */ -static unsigned char nls_locale_map[UCHAR_LIM]; - -/* A definition to map each character through the above translation - table, during sort. */ -/* FIXME: WRONG! use nls_locale_map? */ -# define NLS_MAP(c) UCHAR(c) - -#else - -/* No NLS the character value itself, represents the sorting order */ -# define NLS_MAP(c) UCHAR(c) #endif /* The kind of blanks for '-b' to skip in various options. */ @@ -1675,7 +1662,7 @@ keycompare (const struct line *a, const struct line *b) { \ if ((A) != (B)) \ { \ - diff = NLS_MAP(A) - NLS_MAP(B); \ + diff = UCHAR (A) - UCHAR (B); \ break; \ } \ ++texta; \ @@ -1717,8 +1704,8 @@ keycompare (const struct line *a, const struct line *b) { if (translate[UCHAR (*texta++)] != translate[UCHAR (*textb++)]) { - diff = (NLS_MAP (translate[UCHAR (*--texta)]) - - NLS_MAP (translate[UCHAR (*--textb)])); + diff = (UCHAR (translate[UCHAR (*--texta)]) + - UCHAR (translate[UCHAR (*--textb)])); break; } } @@ -1773,7 +1760,7 @@ compare (register const struct line *a, register const struct line *b) return reverse ? -diff : diff; } #endif - diff = NLS_MAP (*ap) - NLS_MAP (*bp); + diff = UCHAR (*ap) - UCHAR (*bp); if (diff == 0) { diff = NLS_MEMCMP (ap, bp, mini); |