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.tar.gz rockbox-66dce4b7304c976bd8dca27d934eaac9e6f4fdb9.zip |
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 f1b7ffd77e..cfb1a692fa 100644 --- a/utils/sbtools/dbparser.h +++ b/utils/sbtools/dbparser.h | |||
@@ -43,7 +43,11 @@ struct bin_param_t | |||
43 | struct cmd_source_t | 43 | struct cmd_source_t |
44 | { | 44 | { |
45 | char *identifier; | 45 | char *identifier; |
46 | bool is_extern; | ||
47 | // <union> | ||
48 | int extern_nr; | ||
46 | char *filename; | 49 | char *filename; |
50 | // </union> | ||
47 | struct cmd_source_t *next; | 51 | struct cmd_source_t *next; |
48 | /* for later use */ | 52 | /* for later use */ |
49 | enum cmd_source_type_t type; | 53 | enum cmd_source_type_t type; |
@@ -72,23 +76,41 @@ struct cmd_inst_t | |||
72 | struct cmd_inst_t *next; | 76 | struct cmd_inst_t *next; |
73 | }; | 77 | }; |
74 | 78 | ||
79 | struct cmd_option_t | ||
80 | { | ||
81 | char *name; | ||
82 | bool is_string; | ||
83 | /* <union> */ | ||
84 | uint32_t val; | ||
85 | char *str; | ||
86 | /* </union> */ | ||
87 | struct cmd_option_t *next; | ||
88 | }; | ||
89 | |||
75 | struct cmd_section_t | 90 | struct cmd_section_t |
76 | { | 91 | { |
77 | uint32_t identifier; | 92 | uint32_t identifier; |
78 | struct cmd_inst_t *inst_list; | 93 | bool is_data; |
94 | // <union> | ||
95 | struct cmd_inst_t *inst_list; | ||
96 | char *source_id; | ||
97 | // </union> | ||
79 | struct cmd_section_t *next; | 98 | struct cmd_section_t *next; |
99 | struct cmd_option_t *opt_list; | ||
80 | }; | 100 | }; |
81 | 101 | ||
82 | struct cmd_file_t | 102 | struct cmd_file_t |
83 | { | 103 | { |
84 | struct sb_version_t product_ver; | 104 | struct cmd_option_t *opt_list; |
85 | struct sb_version_t component_ver; | 105 | struct cmd_option_t *constant_list; /* constant all always integers */ |
86 | struct cmd_source_t *source_list; | 106 | struct cmd_source_t *source_list; |
87 | struct cmd_section_t *section_list; | 107 | struct cmd_section_t *section_list; |
88 | }; | 108 | }; |
89 | 109 | ||
90 | struct cmd_source_t *db_find_source_by_id(struct cmd_file_t *cmd_file, const char *id); | 110 | struct cmd_source_t *db_find_source_by_id(struct cmd_file_t *cmd_file, const char *id); |
111 | struct cmd_option_t *db_find_option_by_id(struct cmd_option_t *opt, const char *name); | ||
91 | bool db_parse_sb_version(struct sb_version_t *ver, char *str); | 112 | bool db_parse_sb_version(struct sb_version_t *ver, char *str); |
113 | void db_generate_default_sb_version(struct sb_version_t *ver); | ||
92 | struct cmd_file_t *db_parse_file(const char *file); | 114 | struct cmd_file_t *db_parse_file(const char *file); |
93 | 115 | ||
94 | #endif /* __DBPARSER__ */ | 116 | #endif /* __DBPARSER__ */ |