diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-11-22 04:20:49 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-11-22 04:20:49 +0000 |
commit | 4e0bf4c4d00096ac436378edaf7718dafec9ff82 (patch) | |
tree | 9a80850d7051a761dee6c6dd1aed8df337a1f92c /sim/igen/table.h | |
parent | feaee4bdbb06466822e886f5d1d30b9f1e04d985 (diff) | |
download | gdb-4e0bf4c4d00096ac436378edaf7718dafec9ff82.zip gdb-4e0bf4c4d00096ac436378edaf7718dafec9ff82.tar.gz gdb-4e0bf4c4d00096ac436378edaf7718dafec9ff82.tar.bz2 |
2002-11-21 Andrew Cagney <ac131313@redhat.com>
* filter.c: Re-indent.
* filter.h, filter_host.h, gen-engine.c, gen-engine.h: Ditto.
* gen-icache.c, gen-icache.h, gen-idecode.c: Ditto.
* gen-idecode.h, gen-itable.c, gen-itable.h: Ditto.
* gen-model.c, gen-model.h, gen-semantics.c: Ditto.
* gen-semantics.h, gen-support.c, gen-support.h: Ditto.
* gen.c, gen.h, igen.c, igen.h, ld-cache.c, ld-cache.h: Ditto.
* ld-decode.c, ld-decode.h, ld-insn.c, ld-insn.h, lf.c: Ditto.
* lf.h, misc.c, misc.h, table.c, table.h: Ditto.
Diffstat (limited to 'sim/igen/table.h')
-rw-r--r-- | sim/igen/table.h | 55 |
1 files changed, 19 insertions, 36 deletions
diff --git a/sim/igen/table.h b/sim/igen/table.h index 1901274..1a9e42c 100644 --- a/sim/igen/table.h +++ b/sim/igen/table.h @@ -64,14 +64,17 @@ typedef struct _table table; -typedef enum { +typedef enum +{ table_colon_entry, table_code_entry, -} table_entry_type; +} +table_entry_type; typedef struct _table_entry table_entry; -struct _table_entry { +struct _table_entry +{ table *file; line_ref *line; table_entry_type type; @@ -82,7 +85,8 @@ struct _table_entry { /* List of directories to search when opening a pushed file. Current directory is always searched first */ typedef struct _table_include table_include; -struct _table_include { +struct _table_include +{ char *dir; table_include *next; }; @@ -91,68 +95,47 @@ struct _table_include { /* Open/read a table file. Since the file is read once during open (and then closed immediatly) there is no close method. */ -extern table *table_open -(const char *file_name); +extern table *table_open (const char *file_name); -extern table_entry *table_read -(table *file); +extern table_entry *table_read (table *file); /* Push the the state of the current file and open FILE_NAME. When the end of FILE_NAME is reached, return to the pushed file */ extern void table_push -(table *file, - line_ref *line, - table_include *search, - const char *file_name); + (table *file, line_ref *line, table_include *search, const char *file_name); /* Expand the specified field_nr using the internal expansion table. A field is only expanded when explicitly specified. */ -extern void table_expand_field -(table_entry *entry, - int field_nr); +extern void table_expand_field (table_entry *entry, int field_nr); /* Given a code entry, write the code to FILE. Since any leading/trailing braces were striped as part of the read, they are not written. */ -extern void table_print_code -(lf *file, - table_entry *entry); +extern void table_print_code (lf *file, table_entry *entry); /* Debugging */ extern void dump_line_ref -(lf *file, - char *prefix, - const line_ref *line, - char *suffix); + (lf *file, char *prefix, const line_ref *line, char *suffix); extern void dump_table_entry -(lf *file, - char *prefix, - const table_entry *entry, - char *suffix); + (lf *file, char *prefix, const table_entry *entry, char *suffix); /* Utilities for skipping around text */ -extern char *skip_digits -(char *chp); +extern char *skip_digits (char *chp); -extern char *skip_spaces -(char *chp); +extern char *skip_spaces (char *chp); -extern char *skip_to_separator -(char *chp, - char *separators); +extern char *skip_to_separator (char *chp, char *separators); -extern char *back_spaces -(char *start, - char *chp); +extern char *back_spaces (char *start, char *chp); |