From 66dce4b7304c976bd8dca27d934eaac9e6f4fdb9 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 16 Sep 2011 22:27:16 +0000 Subject: 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 --- utils/sbtools/dbparser.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'utils/sbtools/dbparser.h') diff --git a/utils/sbtools/dbparser.h b/utils/sbtools/dbparser.h index f1b7ffd77e..cfb1a692fa 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; + // + int extern_nr; char *filename; + // 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; + /* */ + uint32_t val; + char *str; + /* */ + struct cmd_option_t *next; +}; + struct cmd_section_t { uint32_t identifier; - struct cmd_inst_t *inst_list; + bool is_data; + // + struct cmd_inst_t *inst_list; + char *source_id; + // 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__ */ -- cgit v1.2.3