This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
print_doc_line ignores stream arg
- From: Doug Evans <dje at transmeta dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 9 Apr 2003 15:16:52 -0700
- Subject: print_doc_line ignores stream arg
What _should_ print_doc_line be doing here (<<<)?
Should all callers be passing in a ui_out instead of a ui_file?
/* Print only the first line of STR on STREAM. */
void
print_doc_line (struct ui_file *stream, char *str)
{
static char *line_buffer = 0;
static int line_size;
register char *p;
if (!line_buffer)
{
line_size = 80;
line_buffer = (char *) xmalloc (line_size);
}
p = str;
while (*p && *p != '\n' && *p != '.' && *p != ',')
p++;
if (p - str > line_size - 1)
{
line_size = p - str + 1;
xfree (line_buffer);
line_buffer = (char *) xmalloc (line_size);
}
strncpy (line_buffer, str, p - str);
line_buffer[p - str] = '\0';
if (islower (line_buffer[0]))
line_buffer[0] = toupper (line_buffer[0]);
ui_out_text (uiout, line_buffer); <<<
}