aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-04-18 21:39:25 +0100
committerPedro Alves <palves@redhat.com>2017-04-18 23:52:05 +0100
commitfdd243b001585c5ca078342608332af77050c867 (patch)
tree11b2cdb05a42d05a22f3c6c5e57ee51cfa8ca03b /gdb
parent4895cde29761f6c39fdb6c319ff4666ee39f5d28 (diff)
downloadgdb-fdd243b001585c5ca078342608332af77050c867.zip
gdb-fdd243b001585c5ca078342608332af77050c867.tar.gz
gdb-fdd243b001585c5ca078342608332af77050c867.tar.bz2
Eliminate obstack_printf
Not used anywhere. gdb/ChangeLog: 2017-04-18 Pedro Alves <palves@redhat.com> * xml-support.c (obstack_xml_printf): Delete. * xml-support.h (obstack_xml_printf): Delete.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/xml-support.c40
-rw-r--r--gdb/xml-support.h7
3 files changed, 5 insertions, 47 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8026977..b99fedf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-04-18 Pedro Alves <palves@redhat.com>
+ * xml-support.c (obstack_xml_printf): Delete.
+ * xml-support.h (obstack_xml_printf): Delete.
+
+2017-04-18 Pedro Alves <palves@redhat.com>
+
* xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
vdebug, verror, body_text, start_element, end_element, name,
user_data, set_is_xinclude, set_error, expat_parser>: New methods.
diff --git a/gdb/xml-support.c b/gdb/xml-support.c
index 76c65c6..fff3997 100644
--- a/gdb/xml-support.c
+++ b/gdb/xml-support.c
@@ -997,46 +997,6 @@ show_debug_xml (struct ui_file *file, int from_tty,
fprintf_filtered (file, _("XML debugging is %s.\n"), value);
}
-void
-obstack_xml_printf (struct obstack *obstack, const char *format, ...)
-{
- va_list ap;
- const char *f;
- const char *prev;
- int percent = 0;
-
- va_start (ap, format);
-
- prev = format;
- for (f = format; *f; f++)
- {
- if (percent)
- {
- switch (*f)
- {
- case 's':
- {
- char *p;
- char *a = va_arg (ap, char *);
-
- obstack_grow (obstack, prev, f - prev - 1);
- p = xml_escape_text (a);
- obstack_grow_str (obstack, p);
- xfree (p);
- prev = f + 1;
- }
- break;
- }
- percent = 0;
- }
- else if (*f == '%')
- percent = 1;
- }
-
- obstack_grow_str (obstack, prev);
- va_end (ap);
-}
-
char *
xml_fetch_content_from_file (const char *filename, void *baton)
{
diff --git a/gdb/xml-support.h b/gdb/xml-support.h
index f9ea64d..1a1b7fd 100644
--- a/gdb/xml-support.h
+++ b/gdb/xml-support.h
@@ -227,13 +227,6 @@ extern gdb_xml_attribute_handler gdb_xml_parse_attr_enum;
ULONGEST gdb_xml_parse_ulongest (struct gdb_xml_parser *parser,
const char *value);
-/* Simple printf to obstack function. Current implemented formatters:
- %s - grow an xml escaped text in OBSTACK. */
-
-extern void obstack_xml_printf (struct obstack *obstack,
- const char *format, ...)
- ATTRIBUTE_PRINTF_2;
-
/* Open FILENAME, read all its text into memory, close it, and return
the text. If something goes wrong, return NULL and warn. */