mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Update.
* charmaps/ISO-IR-197: Remove alias "none". 2000-09-30 Bruno Haible <haible@clisp.cons.org>
This commit is contained in:
@@ -504,18 +504,27 @@ const struct
|
|||||||
{
|
{
|
||||||
uint32_t header[5];
|
uint32_t header[5];
|
||||||
uint32_t level1[1];
|
uint32_t level1[1];
|
||||||
uint32_t level2[1];
|
uint32_t level2[8];
|
||||||
uint8_t level3[1];
|
int8_t level3[33];
|
||||||
}
|
}
|
||||||
_nl_C_LC_CTYPE_width =
|
_nl_C_LC_CTYPE_width =
|
||||||
{
|
{
|
||||||
{ 7, 1, 0, 0, 0 },
|
{ 7, 1, 4, 7, 15 },
|
||||||
/* 1st-level table */
|
/* 1st-level table */
|
||||||
{ 6 * sizeof (uint32_t) },
|
{ 6 * sizeof (uint32_t) },
|
||||||
/* 2nd-level table */
|
/* 2nd-level table */
|
||||||
{ 7 * sizeof (uint32_t) },
|
{
|
||||||
|
14 * sizeof (uint32_t) + 0, 0,
|
||||||
|
14 * sizeof (uint32_t) + 16, 14 * sizeof (uint32_t) + 16,
|
||||||
|
14 * sizeof (uint32_t) + 16, 14 * sizeof (uint32_t) + 16,
|
||||||
|
14 * sizeof (uint32_t) + 16, 14 * sizeof (uint32_t) + 17
|
||||||
|
},
|
||||||
/* 3rd-level table */
|
/* 3rd-level table */
|
||||||
{ 1 }
|
{
|
||||||
|
0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
-1
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Number of fields with fixed meanings, starting at 0. */
|
/* Number of fields with fixed meanings, starting at 0. */
|
||||||
|
@@ -120,7 +120,7 @@ charmap_read (const char *filename)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == NULL)
|
if (result == NULL && filename != NULL)
|
||||||
{
|
{
|
||||||
/* OK, one more try. We also accept the names given to the
|
/* OK, one more try. We also accept the names given to the
|
||||||
character sets in the files. Sometimes they differ from the
|
character sets in the files. Sometimes they differ from the
|
||||||
@@ -155,12 +155,9 @@ charmap_read (const char *filename)
|
|||||||
char junk[BUFSIZ];
|
char junk[BUFSIZ];
|
||||||
|
|
||||||
if (fscanf (fp, " <code_set_name> %as", &name) == 1
|
if (fscanf (fp, " <code_set_name> %as", &name) == 1
|
||||||
|| (fscanf (fp, " <code_set_name> \"%as\"", &name)
|
|
||||||
== 1)
|
|
||||||
|| fscanf (fp, "%% alias %as", &name) == 1)
|
|| fscanf (fp, "%% alias %as", &name) == 1)
|
||||||
{
|
{
|
||||||
if (filename != NULL
|
if (strcasecmp (name, filename) == 0)
|
||||||
&& strcasecmp (name, filename) == 0)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
free (name);
|
free (name);
|
||||||
@@ -189,9 +186,6 @@ charmap_read (const char *filename)
|
|||||||
result = (cmfile == NULL
|
result = (cmfile == NULL
|
||||||
? NULL : parse_charmap (cmfile));
|
? NULL : parse_charmap (cmfile));
|
||||||
|
|
||||||
if (result)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/* Configuration for localedef program.
|
/* Configuration for localedef program.
|
||||||
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "../../version.h"
|
#include "../../version.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_CHARMAP "POSIX"
|
#define DEFAULT_CHARMAP "ANSI_X3.4-1968" /* ASCII */
|
||||||
|
|
||||||
#ifndef PARAMS
|
#ifndef PARAMS
|
||||||
# if __STDC__
|
# if __STDC__
|
||||||
|
@@ -1309,6 +1309,10 @@ find_idx (struct locale_ctype_t *ctype, uint32_t **table, size_t *max,
|
|||||||
/* We have done everything we are asked to do. */
|
/* We have done everything we are asked to do. */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (max == NULL)
|
||||||
|
/* The caller does not want to extend the table. */
|
||||||
|
return (cnt >= *act ? NULL : &(*table)[cnt]);
|
||||||
|
|
||||||
if (cnt >= *act)
|
if (cnt >= *act)
|
||||||
{
|
{
|
||||||
if (cnt >= *max)
|
if (cnt >= *max)
|
||||||
@@ -3732,8 +3736,13 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charmap_t *charmap,
|
|||||||
ctype->class_offset = _NL_ITEM_INDEX (_NL_CTYPE_EXTRA_MAP_1);
|
ctype->class_offset = _NL_ITEM_INDEX (_NL_CTYPE_EXTRA_MAP_1);
|
||||||
ctype->map_offset = ctype->class_offset + ctype->nr_charclass;
|
ctype->map_offset = ctype->class_offset + ctype->nr_charclass;
|
||||||
|
|
||||||
/* Array for width information. Because the expected width are very
|
/* Array for width information. Because the expected widths are very
|
||||||
small we use only one single byte. This saves space. */
|
small (never larger than 2) we use only one single byte. This
|
||||||
|
saves space.
|
||||||
|
We put only printable characters in the table. wcwidth is specified
|
||||||
|
to return -1 for non-printable characters. Doing the check here
|
||||||
|
saves a run-time check.
|
||||||
|
But we put L'\0' in the table. This again saves a run-time check. */
|
||||||
{
|
{
|
||||||
struct wcwidth_table t;
|
struct wcwidth_table t;
|
||||||
|
|
||||||
@@ -3741,7 +3750,8 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charmap_t *charmap,
|
|||||||
t.q = 9;
|
t.q = 9;
|
||||||
wcwidth_table_init (&t);
|
wcwidth_table_init (&t);
|
||||||
|
|
||||||
/* First set all the characters of the character set to the default width. */
|
/* First set all the printable characters of the character set to
|
||||||
|
the default width. */
|
||||||
curs = NULL;
|
curs = NULL;
|
||||||
while (iterate_table (&charmap->char_table, &curs, &key, &len, &vdata) == 0)
|
while (iterate_table (&charmap->char_table, &curs, &key, &len, &vdata) == 0)
|
||||||
{
|
{
|
||||||
@@ -3752,7 +3762,14 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charmap_t *charmap,
|
|||||||
data->name, len);
|
data->name, len);
|
||||||
|
|
||||||
if (data->ucs4 != ILLEGAL_CHAR_VALUE)
|
if (data->ucs4 != ILLEGAL_CHAR_VALUE)
|
||||||
wcwidth_table_add (&t, data->ucs4, charmap->width_default);
|
{
|
||||||
|
uint32_t *class_bits =
|
||||||
|
find_idx (ctype, &ctype->class_collection, NULL,
|
||||||
|
&ctype->class_collection_act, data->ucs4);
|
||||||
|
|
||||||
|
if (class_bits != NULL && (*class_bits & BITw (tok_print)))
|
||||||
|
wcwidth_table_add (&t, data->ucs4, charmap->width_default);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now add the explicitly specified widths. */
|
/* Now add the explicitly specified widths. */
|
||||||
@@ -3792,8 +3809,16 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charmap_t *charmap,
|
|||||||
strlen (seq->name));
|
strlen (seq->name));
|
||||||
|
|
||||||
if (wch != ILLEGAL_CHAR_VALUE)
|
if (wch != ILLEGAL_CHAR_VALUE)
|
||||||
/* Store the value. */
|
{
|
||||||
wcwidth_table_add (&t, wch, charmap->width_rules[cnt].width);
|
/* Store the value. */
|
||||||
|
uint32_t *class_bits =
|
||||||
|
find_idx (ctype, &ctype->class_collection, NULL,
|
||||||
|
&ctype->class_collection_act, wch);
|
||||||
|
|
||||||
|
if (class_bits != NULL && (*class_bits & BITw (tok_print)))
|
||||||
|
wcwidth_table_add (&t, wch,
|
||||||
|
charmap->width_rules[cnt].width);
|
||||||
|
}
|
||||||
|
|
||||||
/* "Increment" the bytes sequence. */
|
/* "Increment" the bytes sequence. */
|
||||||
inner = nbytes - 1;
|
inner = nbytes - 1;
|
||||||
@@ -3820,6 +3845,9 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charmap_t *charmap,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the width of L'\0' to 0. */
|
||||||
|
wcwidth_table_add (&t, 0, 0);
|
||||||
|
|
||||||
wcwidth_table_finalize (&t);
|
wcwidth_table_finalize (&t);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
2000-09-30 Bruno Haible <haible@clisp.cons.org>
|
||||||
|
|
||||||
|
* charmaps/ISO-IR-197: Remove alias "none".
|
||||||
|
|
||||||
2000-09-30 Bruno Haible <haible@clisp.cons.org>
|
2000-09-30 Bruno Haible <haible@clisp.cons.org>
|
||||||
|
|
||||||
* charmaps/UTF-8: Add the correct Hangul syllable names. Change the
|
* charmaps/UTF-8: Add the correct Hangul syllable names. Change the
|
||||||
|
@@ -1,12 +1,10 @@
|
|||||||
<code_set_name>ISO-IR-197
|
<code_set_name> ISO-IR-197
|
||||||
<comment_char> %
|
<comment_char> %
|
||||||
<escape_char> /
|
<escape_char> /
|
||||||
% source: http://www.itek.norut.no/project/barent/barsek/ip/197t.html
|
% source: http://www.itek.norut.no/project/barent/barsek/ip/197t.html
|
||||||
% author: Petter Reinholdtsen <pere@td.org.uit.no>
|
% author: Petter Reinholdtsen <pere@td.org.uit.no>
|
||||||
% date: 1998-08-31
|
% date: 1998-08-31
|
||||||
% comment: Proposed nothern sami charset. Superseeded by WS2
|
% comment: Proposed nothern sami charset. Superseded by WS2
|
||||||
|
|
||||||
% alias none
|
|
||||||
|
|
||||||
CHARMAP
|
CHARMAP
|
||||||
<U0000> /x00 NULL (NUL)
|
<U0000> /x00 NULL (NUL)
|
||||||
|
@@ -22,9 +22,6 @@
|
|||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include "../wctype/wchar-lookup.h"
|
#include "../wctype/wchar-lookup.h"
|
||||||
|
|
||||||
/* Tables containing character property information. */
|
|
||||||
extern const char *__ctype32_wctype[12];
|
|
||||||
|
|
||||||
/* Table containing width information. */
|
/* Table containing width information. */
|
||||||
extern const char *__ctype32_width;
|
extern const char *__ctype32_width;
|
||||||
|
|
||||||
@@ -33,12 +30,10 @@ internal_wcwidth (wint_t wc)
|
|||||||
{
|
{
|
||||||
unsigned char res;
|
unsigned char res;
|
||||||
|
|
||||||
if (wc == L'\0')
|
/* The tables have been prepared in such a way that
|
||||||
return 0;
|
1. wc == L'\0' yields res = 0,
|
||||||
|
2. !iswprint (wc) implies res = '\xff'. */
|
||||||
if (wctype_table_lookup (__ctype32_wctype[__ISwprint], wc) == 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
res = wcwidth_table_lookup (__ctype32_width, wc);
|
res = wcwidth_table_lookup (__ctype32_width, wc);
|
||||||
|
|
||||||
return res == (unsigned char) '\xff' ? -1 : (int) res;
|
return res == (unsigned char) '\xff' ? -1 : (int) res;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user