2000-01-24 Ulrich Drepper <drepper@cygnus.com>
+ * locale/programs/ld-collate.c (collate_output): Also handle
+ IGNOREd characters in the simple way when generating the multibyte
+ table.
+
+ * locale/programs/ld-ctype.c (allocate_arrays): Move codeset_name
+ handling to ...
+ (ctype_finish): ...here. Check for missing codeset name.
+
* sysdeps/unix/sysv/linux/Dist: Add ipc_priv.h.
* sysdeps/unix/sysv/linux/alpha/Dist: Likewise.
for (ch = 1; ch < 256; ++ch)
if (collate->mbheads[ch]->mbnext == NULL
- && collate->mbheads[ch]->nmbs == 1)
+ && collate->mbheads[ch]->nmbs <= 1)
{
tablemb[ch] = output_weight (&weightpool, collate,
collate->mbheads[ch]);
struct element_t *runp = collate->mbheads[ch];
struct element_t *lastp;
+ assert ((obstack_object_size (&extrapool)
+ & (__alignof__ (int32_t) - 1)) == 0);
+
tablemb[ch] = -obstack_object_size (&extrapool);
do
/* Now walk backward from here to the beginning. */
curp = runp;
+ assert (runp->nmbs <= 256);
obstack_1grow_fast (&extrapool, curp->nmbs - 1);
for (i = 1; i < curp->nmbs; ++i)
obstack_1grow_fast (&extrapool, curp->mbs[i]);
added = ((sizeof (int32_t) + 1 + runp->nmbs - 1
+ __alignof__ (int32_t) - 1)
& ~(__alignof__ (int32_t) - 1));
+ assert ((obstack_object_size (&extrapool)
+ & (__alignof__ (int32_t) - 1)) == 0);
obstack_make_room (&extrapool, added);
if (sizeof (int32_t) == sizeof (int))
obstack_int_grow_fast (&extrapool, weightidx);
else
obstack_grow (&extrapool, &weightidx, sizeof (int32_t));
+ assert (runp->nmbs <= 256);
obstack_1grow_fast (&extrapool, runp->nmbs - 1);
+
for (i = 1; i < runp->nmbs; ++i)
obstack_1grow_fast (&extrapool, runp->mbs[i]);
}
}
while (runp != NULL);
+ assert ((obstack_object_size (&extrapool)
+ & (__alignof__ (int32_t) - 1)) == 0);
+
/* If the final entry in the list is not a single character we
add an UNDEFINED entry here. */
if (lastp->nmbs != 1)
{
- int added = ((sizeof (int32_t) + 1 + 1 + __alignof__ (int32_t))
+ int added = ((sizeof (int32_t) + 1 + 1 + __alignof__ (int32_t) - 1)
& ~(__alignof__ (int32_t) - 1));
obstack_make_room (&extrapool, added);
ctype->repertoire = repertoire_read (repertoire_name);
}
+ /* We need the name of the currently used 8-bit character set to
+ make correct conversion between this 8-bit representation and the
+ ISO 10646 character set used internally for wide characters. */
+ ctype->codeset_name = charmap->code_set_name;
+ if (ctype->codeset_name == NULL)
+ {
+ if (! be_quiet)
+ error (0, 0, "no character set name specified in charmap");
+ ctype->codeset_name = "//UNKNOWN//";
+ }
+
/* Set default value for classes not specified. */
set_class_defaults (ctype, charmap, ctype->repertoire);
/* Set MB_CUR_MAX. */
ctype->mb_cur_max = charmap->mb_cur_max;
- /* We need the name of the currently used 8-bit character set to
- make correct conversion between this 8-bit representation and the
- ISO 10646 character set used internally for wide characters. */
- ctype->codeset_name = charmap->code_set_name;
-
/* Now determine the table for the transliteration information.
XXX It is not yet clear to me whether it is worth implementing a