mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
1999-04-15 Ulrich Drepper <drepper@cygnus.com> * catgets/gencat.c (read_input_file): Don't drop white spaces between number/identifier and string. Patch by Dima Barsky <dima@pwd.hp.com>. If no white space at all follows number/identifier remove existing message with the number/ientifier.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
1999-04-15 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* catgets/gencat.c (read_input_file): Don't drop white spaces
|
||||||
|
between number/identifier and string.
|
||||||
|
Patch by Dima Barsky <dima@pwd.hp.com>.
|
||||||
|
If no white space at all follows number/identifier remove existing
|
||||||
|
message with the number/ientifier.
|
||||||
|
|
||||||
1999-04-14 H.J. Lu <hjl@gnu.org>
|
1999-04-14 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* sunrpc/clnt_udp.c (is_network_up): New function.
|
* sunrpc/clnt_udp.c (is_network_up): New function.
|
||||||
|
@ -492,38 +492,54 @@ this is the first definition"));
|
|||||||
{
|
{
|
||||||
const char *ident = this_line;
|
const char *ident = this_line;
|
||||||
int message_number;
|
int message_number;
|
||||||
|
int any_space;
|
||||||
|
|
||||||
do
|
do
|
||||||
++this_line;
|
++this_line;
|
||||||
while (this_line[0] != '\0' && !isspace (this_line[0]));;
|
while (this_line[0] != '\0' && !isspace (this_line[0]));
|
||||||
this_line[0] = '\0'; /* Terminate the identifier. */
|
any_space = isspace (*this_line);
|
||||||
|
*this_line++ = '\0'; /* Terminate the identifier. */
|
||||||
|
|
||||||
do
|
|
||||||
++this_line;
|
|
||||||
while (isspace (this_line[0]));
|
|
||||||
/* Now we found the beginning of the message itself. */
|
/* Now we found the beginning of the message itself. */
|
||||||
|
|
||||||
if (isdigit (ident[0]))
|
if (isdigit (ident[0]))
|
||||||
{
|
{
|
||||||
struct message_list *runp;
|
struct message_list *runp;
|
||||||
|
struct message_list *lastp;
|
||||||
|
|
||||||
message_number = atoi (ident);
|
message_number = atoi (ident);
|
||||||
|
|
||||||
/* Find location to insert the new message. */
|
/* Find location to insert the new message. */
|
||||||
runp = current->current_set->messages;
|
runp = current->current_set->messages;
|
||||||
|
lastp = NULL;
|
||||||
while (runp != NULL)
|
while (runp != NULL)
|
||||||
if (runp->number == message_number)
|
if (runp->number == message_number)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
runp = runp->next;
|
{
|
||||||
|
lastp = runp;
|
||||||
|
runp = runp->next;
|
||||||
|
}
|
||||||
if (runp != NULL)
|
if (runp != NULL)
|
||||||
{
|
{
|
||||||
/* Oh, oh. There is already a message with this
|
if (any_space)
|
||||||
number is the message set. */
|
{
|
||||||
error_at_line (0, 0, fname, start_line,
|
/* Oh, oh. There is already a message with this
|
||||||
gettext ("duplicated message number"));
|
number in the message set. */
|
||||||
error_at_line (0, 0, runp->fname, runp->line,
|
error_at_line (0, 0, fname, start_line,
|
||||||
gettext ("this is the first definition"));
|
gettext ("duplicated message number"));
|
||||||
|
error_at_line (0, 0, runp->fname, runp->line,
|
||||||
|
gettext ("this is the first definition"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We have to remove this message. */
|
||||||
|
if (lastp != NULL)
|
||||||
|
lastp->next = runp->next;
|
||||||
|
else
|
||||||
|
current->current_set->messages = runp->next;
|
||||||
|
free (runp);
|
||||||
|
}
|
||||||
message_number = 0;
|
message_number = 0;
|
||||||
}
|
}
|
||||||
ident = NULL; /* We don't have a symbol. */
|
ident = NULL; /* We don't have a symbol. */
|
||||||
@ -535,10 +551,12 @@ this is the first definition"));
|
|||||||
else if (ident[0] != '\0')
|
else if (ident[0] != '\0')
|
||||||
{
|
{
|
||||||
struct message_list *runp;
|
struct message_list *runp;
|
||||||
runp = current->current_set->messages;
|
struct message_list *lastp;
|
||||||
|
|
||||||
/* Test whether the symbolic name was not used for
|
/* Test whether the symbolic name was not used for
|
||||||
another message in this message set. */
|
another message in this message set. */
|
||||||
|
runp = current->current_set->messages;
|
||||||
|
lastp = NULL;
|
||||||
while (runp != NULL)
|
while (runp != NULL)
|
||||||
if (runp->symbol != NULL && strcmp (ident, runp->symbol) == 0)
|
if (runp->symbol != NULL && strcmp (ident, runp->symbol) == 0)
|
||||||
break;
|
break;
|
||||||
@ -546,11 +564,24 @@ this is the first definition"));
|
|||||||
runp = runp->next;
|
runp = runp->next;
|
||||||
if (runp != NULL)
|
if (runp != NULL)
|
||||||
{
|
{
|
||||||
/* The name is already used. */
|
if (any_space)
|
||||||
error_at_line (0, 0, fname, start_line,
|
{
|
||||||
gettext ("duplicated message identifier"));
|
/* The name is already used. */
|
||||||
error_at_line (0, 0, runp->fname, runp->line,
|
error_at_line (0, 0, fname, start_line,
|
||||||
gettext ("this is the first definition"));
|
gettext ("\
|
||||||
|
duplicated message identifier"));
|
||||||
|
error_at_line (0, 0, runp->fname, runp->line,
|
||||||
|
gettext ("this is the first definition"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We have to remove this message. */
|
||||||
|
if (lastp != NULL)
|
||||||
|
lastp->next = runp->next;
|
||||||
|
else
|
||||||
|
current->current_set->messages = runp->next;
|
||||||
|
free (runp);
|
||||||
|
}
|
||||||
message_number = 0;
|
message_number = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user