Avoid printf_filtered limit.
This commit is contained in:
parent
fb29d68161
commit
631f7a9f7c
2 changed files with 21 additions and 9 deletions
|
@ -2,6 +2,7 @@ Tue Dec 15 02:01:00 1992 John Gilmore (gnu@cygnus.com)
|
||||||
|
|
||||||
* remote.c: Avoid printf_filtered line limit. Suggested by
|
* remote.c: Avoid printf_filtered line limit. Suggested by
|
||||||
Robert R. Henry, <rrh@tera.com>.
|
Robert R. Henry, <rrh@tera.com>.
|
||||||
|
* infcmd.c (environment_info): Ditto, but it was my idea.
|
||||||
|
|
||||||
* main.c (main): Accept --silent as well as --quiet. Change +help
|
* main.c (main): Accept --silent as well as --quiet. Change +help
|
||||||
to --help. Suggested by Karl Berry, <karl@cs.umb.edu>.
|
to --help. Suggested by Karl Berry, <karl@cs.umb.edu>.
|
||||||
|
|
29
gdb/infcmd.c
29
gdb/infcmd.c
|
@ -740,15 +740,27 @@ environment_info (var, from_tty)
|
||||||
{
|
{
|
||||||
register char *val = get_in_environ (inferior_environ, var);
|
register char *val = get_in_environ (inferior_environ, var);
|
||||||
if (val)
|
if (val)
|
||||||
printf_filtered ("%s = %s\n", var, val);
|
{
|
||||||
|
puts_filtered (var);
|
||||||
|
puts_filtered (" = ");
|
||||||
|
puts_filtered (val);
|
||||||
|
puts_filtered ("\n");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
printf_filtered ("Environment variable \"%s\" not defined.\n", var);
|
{
|
||||||
|
puts_filtered ("Environment variable \"");
|
||||||
|
puts_filtered (var);
|
||||||
|
puts_filtered ("\" not defined.\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
register char **vector = environ_vector (inferior_environ);
|
register char **vector = environ_vector (inferior_environ);
|
||||||
while (*vector)
|
while (*vector)
|
||||||
printf_filtered ("%s\n", *vector++);
|
{
|
||||||
|
puts_filtered (*vector++);
|
||||||
|
puts_filtered ("\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,16 +782,15 @@ set_environment_command (arg, from_tty)
|
||||||
if (p != 0 && val != 0)
|
if (p != 0 && val != 0)
|
||||||
{
|
{
|
||||||
/* We have both a space and an equals. If the space is before the
|
/* We have both a space and an equals. If the space is before the
|
||||||
equals and the only thing between the two is more space, use
|
equals, walk forward over the spaces til we see a nonspace
|
||||||
the equals */
|
(possibly the equals). */
|
||||||
if (p > val)
|
if (p > val)
|
||||||
while (*val == ' ')
|
while (*val == ' ')
|
||||||
val++;
|
val++;
|
||||||
|
|
||||||
/* Take the smaller of the two. If there was space before the
|
/* Now if the = is after the char following the spaces,
|
||||||
"=", they will be the same right now. */
|
take the char following the spaces. */
|
||||||
|
if (p > val)
|
||||||
if (val < p)
|
|
||||||
p = val - 1;
|
p = val - 1;
|
||||||
}
|
}
|
||||||
else if (val != 0 && p == 0)
|
else if (val != 0 && p == 0)
|
||||||
|
|
Loading…
Reference in a new issue