diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-05-09 01:33:10 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-05-09 01:33:10 +0000 |
commit | 631ec795c9246b5862348ff41c297ccb978205c2 (patch) | |
tree | e25ced47e342b1b4f17f085e5d400a0e20cfb030 /gdb/ui-out.h | |
parent | 80f49b30cf8b59d9c3c513f399892125ad7bcb53 (diff) | |
download | gdb-631ec795c9246b5862348ff41c297ccb978205c2.zip gdb-631ec795c9246b5862348ff41c297ccb978205c2.tar.gz gdb-631ec795c9246b5862348ff41c297ccb978205c2.tar.bz2 |
Replace ui_out_list_{begin,end}() with ui_out_{begin,end}().
Diffstat (limited to 'gdb/ui-out.h')
-rw-r--r-- | gdb/ui-out.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/gdb/ui-out.h b/gdb/ui-out.h index 33c3308..a537412 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -65,6 +65,25 @@ struct ui_stream /* Prototypes for ui-out API. */ +/* A result is a recursive data structure consisting of lists and + tupples. */ + +enum ui_out_type + { + ui_out_type_tupple, + ui_out_type_list + }; + +extern void ui_out_begin (struct ui_out *uiout, + enum ui_out_type level_type, + const char *id); + +extern void ui_out_end (struct ui_out *uiout, enum ui_out_type type); + +/* A table can be considered a special tupple/list combination with + the implied structure: ``table = { hdr = { header, ... } , body = [ { + field, ... }, ... ] }'' */ + extern void ui_out_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid); @@ -75,6 +94,9 @@ extern void ui_out_table_body (struct ui_out *uiout); extern void ui_out_table_end (struct ui_out *uiout); +/* Compatibility wrappers, new code should use ui_out_begin() and + ui_out_end(). */ + extern void ui_out_list_begin (struct ui_out *uiout, char *lstid); extern void ui_out_list_end (struct ui_out *uiout); @@ -164,9 +186,12 @@ typedef void (table_header_ftype) (struct ui_out * uiout, int width, enum ui_align align, char *colhdr); /* Note: level 0 is the top-level so LEVEL is always greater than zero. */ -typedef void (list_begin_ftype) (struct ui_out * uiout, - int level, char *lstid); -typedef void (list_end_ftype) (struct ui_out * uiout, int level); +typedef void (ui_out_begin_ftype) (struct ui_out *uiout, + enum ui_out_type type, + int level, const char *id); +typedef void (ui_out_end_ftype) (struct ui_out *uiout, + enum ui_out_type type, + int level); typedef void (field_int_ftype) (struct ui_out * uiout, int fldno, int width, enum ui_align align, char *fldname, int value); typedef void (field_skip_ftype) (struct ui_out * uiout, int fldno, int width, @@ -195,8 +220,8 @@ struct ui_out_impl table_body_ftype *table_body; table_end_ftype *table_end; table_header_ftype *table_header; - list_begin_ftype *list_begin; - list_end_ftype *list_end; + ui_out_begin_ftype *begin; + ui_out_end_ftype *end; field_int_ftype *field_int; field_skip_ftype *field_skip; field_string_ftype *field_string; |