diff options
| author | Amaury Pouly <pamaury@rockbox.org> | 2011-09-16 22:27:16 +0000 |
|---|---|---|
| committer | Amaury Pouly <pamaury@rockbox.org> | 2011-09-16 22:27:16 +0000 |
| commit | 66dce4b7304c976bd8dca27d934eaac9e6f4fdb9 (patch) | |
| tree | 5a05d20e7e5cfedfcab54d7cc1d81f6307ec0c6f /utils/sbtools/dbparser.h | |
| parent | d20f803af0283b7a7b247bf72a28a01eff779c93 (diff) | |
| download | rockbox-66dce4b7304c976bd8dca27d934eaac9e6f4fdb9.zip rockbox-66dce4b7304c976bd8dca27d934eaac9e6f4fdb9.tar.gz rockbox-66dce4b7304c976bd8dca27d934eaac9e6f4fdb9.tar.bz2 rockbox-66dce4b7304c976bd8dca27d934eaac9e6f4fdb9.tar.xz | |
sbtools: implement more complicated integer expression in db files, implement data sections, section attributes, file options, rework command line attributes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30562 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/sbtools/dbparser.h')
| -rw-r--r-- | utils/sbtools/dbparser.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/utils/sbtools/dbparser.h b/utils/sbtools/dbparser.h index f1b7ffd..cfb1a69 100644 --- a/utils/sbtools/dbparser.h +++ b/utils/sbtools/dbparser.h @@ -43,7 +43,11 @@ struct bin_param_t struct cmd_source_t { char *identifier; + bool is_extern; + // <union> + int extern_nr; char *filename; + // </union> struct cmd_source_t *next; /* for later use */ enum cmd_source_type_t type; @@ -72,23 +76,41 @@ struct cmd_inst_t struct cmd_inst_t *next; }; +struct cmd_option_t +{ + char *name; + bool is_string; + /* <union> */ + uint32_t val; + char *str; + /* </union> */ + struct cmd_option_t *next; +}; + struct cmd_section_t { uint32_t identifier; - struct cmd_inst_t *inst_list; + bool is_data; + // <union> + struct cmd_inst_t *inst_list; + char *source_id; + // </union> struct cmd_section_t *next; + struct cmd_option_t *opt_list; }; struct cmd_file_t { - struct sb_version_t product_ver; - struct sb_version_t component_ver; + struct cmd_option_t *opt_list; + struct cmd_option_t *constant_list; /* constant all always integers */ struct cmd_source_t *source_list; struct cmd_section_t *section_list; }; struct cmd_source_t *db_find_source_by_id(struct cmd_file_t *cmd_file, const char *id); +struct cmd_option_t *db_find_option_by_id(struct cmd_option_t *opt, const char *name); bool db_parse_sb_version(struct sb_version_t *ver, char *str); +void db_generate_default_sb_version(struct sb_version_t *ver); struct cmd_file_t *db_parse_file(const char *file); #endif /* __DBPARSER__ */ |