1999-12-26  Ulrich Drepper  <drepper@cygnus.com>

	* tst-trans.sh: Use correct name for dynamic loader.
This commit is contained in:
Ulrich Drepper 1999-12-26 08:47:27 +00:00
parent 5358d026c7
commit f6ada7adcb
14 changed files with 82 additions and 30 deletions

View File

@ -127,7 +127,9 @@ address_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -1376,6 +1376,14 @@ collate_finish (struct localedef_t *locale, struct charmap_t *charmap)
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);
@ -1624,10 +1632,6 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
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;
@ -1645,6 +1649,28 @@ collate_output (struct localedef_t *locale, struct charmap_t *charmap,
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)

View File

@ -346,7 +346,8 @@ ctype_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;
}
@ -1217,7 +1218,7 @@ charclass_symbolic_ellipsis (struct linereader *ldfile,
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;
}

View File

@ -128,8 +128,9 @@ identification_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -89,8 +89,9 @@ measurement_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -94,8 +94,9 @@ messages_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -187,8 +187,9 @@ monetary_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;
@ -196,9 +197,9 @@ monetary_finish (struct localedef_t *locale, struct charmap_t *charmap)
}
#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 = ""; \
@ -234,7 +235,14 @@ not correspond to a valid name in ISO 4217"),
/* 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"),
@ -253,12 +261,15 @@ not correspond to a valid name in ISO 4217"),
#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)

View File

@ -90,7 +90,8 @@ name_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -97,7 +97,9 @@ numeric_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -87,7 +87,8 @@ paper_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -90,8 +90,9 @@ telephone_finish (struct localedef_t *locale, struct charmap_t *charmap)
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;

View File

@ -329,7 +329,7 @@ write_locale_data (const char *output_path, const char *category,
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"));

View File

@ -1,3 +1,7 @@
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.

View File

@ -22,7 +22,7 @@ common_objpfx=$1
# 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 ||
@ -30,7 +30,7 @@ exit 1
# 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 $?