empty one. */
if (address == NULL)
{
- error (0, 0, _("No definition for %s category found"), "LC_ADDRESS");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"),
+ "LC_ADDRESS");
address_startup (NULL, locale, 0);
address = locale->categories[LC_ADDRESS].address;
nothing = 1;
struct section_list *sect;
int ruleidx;
+ if (collate == NULL)
+ {
+ /* No data, no check. */
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"), "LC_COLLATE");
+ return;
+ }
+
/* If this assertion is hit change the type in `element_t'. */
assert (nrules <= sizeof (runp->used_in_level) * 8);
struct section_list *sect;
int i;
- obstack_init (&weightpool);
- obstack_init (&extrapool);
- obstack_init (&indirectpool);
-
data.magic = LIMAGIC (LC_COLLATE);
data.n = nelems;
iov[0].iov_base = (void *) &data;
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
++cnt;
+ /* If we have no LC_COLLATE data emit only the number of rules as zero. */
+ if (collate == NULL)
+ {
+ while (cnt < _NL_ITEM_INDEX (_NL_NUM_LC_COLLATE))
+ {
+ iov[2 + cnt].iov_base = (char *) "";
+ iov[2 + cnt].iov_len = 0;
+ idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
+ ++cnt;
+ }
+
+ assert (cnt == _NL_ITEM_INDEX (_NL_NUM_LC_COLLATE));
+
+ write_locale_data (output_path, "LC_COLLATE", 2 + cnt, iov);
+
+ return;
+ }
+
+ obstack_init (&weightpool);
+ obstack_init (&extrapool);
+ obstack_init (&indirectpool);
+
/* Prepare the ruleset table. */
for (sect = collate->sections, i = 0; sect != NULL; sect = sect->next)
if (sect->ruleidx == i)
empty one. */
if (ctype == NULL)
{
- error (0, 0, _("No definition for %s category found"), "LC_CTYPE");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"), "LC_CTYPE");
ctype_startup (NULL, locale, charmap, 0);
ctype = locale->categories[LC_CTYPE].ctype;
}
invalid_range:
lr_error (ldfile,
_("`%s' and `%.*s' are no valid names for symbolic range"),
- last_str, now->val.str.lenmb, nowstr);
+ last_str, (int) now->val.str.lenmb, nowstr);
return;
}
empty one. */
if (identification == NULL)
{
- error (0, 0, _("No definition for %s category found"),
- "LC_IDENTIFICATION");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"),
+ "LC_IDENTIFICATION");
identification_startup (NULL, locale, 0);
identification
= locale->categories[LC_IDENTIFICATION].identification;
empty one. */
if (measurement == NULL)
{
- error (0, 0, _("No definition for %s category found"),
- "LC_MEASUREMENT");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"),
+ "LC_MEASUREMENT");
measurement_startup (NULL, locale, 0);
measurement = locale->categories[LC_MEASUREMENT].measurement;
nothing = 1;
empty one. */
if (messages == NULL)
{
- error (0, 0, _("No definition for %s category found"),
- "LC_MESSAGES");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"),
+ "LC_MESSAGES");
messages_startup (NULL, locale, 0);
messages = locale->categories[LC_MESSAGES].messages;
nothing = 1;
empty one. */
if (monetary == NULL)
{
- error (0, 0, _("No definition for %s category found"),
- "LC_MONETARY");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"),
+ "LC_MONETARY");
monetary_startup (NULL, locale, 0);
monetary = locale->categories[LC_MONETARY].monetary;
nothing = 1;
}
#define TEST_ELEM(cat) \
- if (monetary->cat == NULL && !be_quiet) \
+ if (monetary->cat == NULL) \
{ \
- if (! nothing) \
+ if (! be_quiet && ! nothing) \
error (0, 0, _("%s: field `%s' not defined"), \
"LC_MONETARY", #cat); \
monetary->cat = ""; \
/* The decimal point must not be empty. This is not said explicitly
in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
!= "". */
- if (monetary->mon_decimal_point[0] == '\0' && ! be_quiet && ! nothing)
+ if (monetary->mon_decimal_point == NULL)
+ {
+ if (! be_quiet && ! nothing)
+ error (0, 0, _("%s: field `%s' not defined"),
+ "LC_MONETARY", "mon_decimal_point");
+ monetary->mon_decimal_point = "";
+ }
+ else if (monetary->mon_decimal_point[0] == '\0' && ! be_quiet && ! nothing)
{
error (0, 0, _("\
%s: value for field `%s' must not be the empty string"),
#undef TEST_ELEM
#define TEST_ELEM(cat, min, max) \
- if (monetary->cat == -2 && ! be_quiet && ! nothing) \
- error (0, 0, _("%s: field `%s' not defined"), \
- "LC_MONETARY", #cat); \
+ if (monetary->cat == -2) \
+ { \
+ if (! be_quiet && ! nothing) \
+ error (0, 0, _("%s: field `%s' not defined"), \
+ "LC_MONETARY", #cat); \
+ } \
else if ((monetary->cat < min || monetary->cat > max) && !be_quiet \
&& !nothing) \
- error (0, 0, _("\
+ error (0, 0, _(" \
%s: value for field `%s' must be in range %d...%d"), \
"LC_MONETARY", #cat, min, max)
empty one. */
if (name == NULL)
{
- error (0, 0, _("No definition for %s category found"), "LC_NAME");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"), "LC_NAME");
name_startup (NULL, locale, 0);
name = locale->categories[LC_NAME].name;
nothing = 1;
empty one. */
if (numeric == NULL)
{
- error (0, 0, _("No definition for %s category found"), "LC_NUMERIC");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"),
+ "LC_NUMERIC");
numeric_startup (NULL, locale, 0);
numeric = locale->categories[LC_NUMERIC].numeric;
nothing = 1;
empty one. */
if (paper == NULL)
{
- error (0, 0, _("No definition for %s category found"), "LC_PAPER");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"), "LC_PAPER");
paper_startup (NULL, locale, 0);
paper = locale->categories[LC_PAPER].paper;
nothing = 1;
empty one. */
if (telephone == NULL)
{
- error (0, 0, _("No definition for %s category found"),
- "LC_TELEPHONE");
+ if (! be_quiet)
+ error (0, 0, _("No definition for %s category found"),
+ "LC_TELEPHONE");
telephone_startup (NULL, locale, 0);
telephone = locale->categories[LC_TELEPHONE].telephone;
nothing = 1;
int fd;
char *fname;
- fname = malloc (strlen (output_path) + 2 * strlen (category) + 6);
+ fname = malloc (strlen (output_path) + 2 * strlen (category) + 7);
if (fname == NULL)
error (5, errno, _("memory exhausted"));
+1999-12-26 Ulrich Drepper <drepper@cygnus.com>
+
+ * tst-trans.sh: Use correct name for dynamic loader.
+
1999-12-23 Ulrich Drepper <drepper@cygnus.com>
* SUPPORTED: Add af_ZA, en_BW, and en_ZW.
# Generate the necessary locale data.
I18NPATH=. \
-${common_objpfx}elf/ld-linux --library-path $common_objpfx \
+${common_objpfx}elf/ld.so --library-path $common_objpfx \
${common_objpfx}locale/localedef --quiet \
-i tests/trans.def -f ISO-8859-1 -u mnemonic.ds \
${common_objpfx}localedata/tt_TT ||
# Run the test program.
LOCPATH=${common_objpfx}localedata LC_ALL=tt_TT \
-${common_objpfx}elf/ld-linux --library-path $common_objpfx \
+${common_objpfx}elf/ld.so --library-path $common_objpfx \
${common_objpfx}localedata/tst-trans
exit $?