summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/dbparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/sbtools/dbparser.h')
-rw-r--r--utils/imxtools/sbtools/dbparser.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/imxtools/sbtools/dbparser.h b/utils/imxtools/sbtools/dbparser.h
index 4a36861583..b99eae9a2b 100644
--- a/utils/imxtools/sbtools/dbparser.h
+++ b/utils/imxtools/sbtools/dbparser.h
@@ -107,12 +107,29 @@ struct cmd_file_t
107 struct cmd_section_t *section_list; 107 struct cmd_section_t *section_list;
108}; 108};
109 109
110typedef void (*db_color_printf)(void *u, bool err, color_t c, const char *f, ...);
111
110struct cmd_source_t *db_find_source_by_id(struct cmd_file_t *cmd_file, const char *id); 112struct cmd_source_t *db_find_source_by_id(struct cmd_file_t *cmd_file, const char *id);
111struct cmd_option_t *db_find_option_by_id(struct cmd_option_t *opt, const char *name); 113struct cmd_option_t *db_find_option_by_id(struct cmd_option_t *opt, const char *name);
112bool db_parse_sb_version(struct sb_version_t *ver, char *str); 114bool db_parse_sb_version(struct sb_version_t *ver, char *str);
115bool db_generate_sb_version(struct sb_version_t *ver, char *str, int size);
113void db_generate_default_sb_version(struct sb_version_t *ver); 116void db_generate_default_sb_version(struct sb_version_t *ver);
114struct cmd_file_t *db_parse_file(const char *file); 117struct cmd_file_t *db_parse_file(const char *file);
118/* NOTE: db_add_{str_opt,int_opt,source,extern_source} add at the beginning of the list */
119void db_add_str_opt(struct cmd_option_t **opt, const char *name, const char *str);
120void db_add_int_opt(struct cmd_option_t **opt, const char *name, uint32_t value);
121void db_add_source(struct cmd_file_t *cmd_file, const char *identifier, const char *filename);
122void db_add_inst_id(struct cmd_section_t *cmd_section, enum cmd_inst_type_t type,
123 const char *identifier, uint32_t argument);
124void db_add_inst_addr(struct cmd_section_t *cmd_section, enum cmd_inst_type_t type,
125 uint32_t addr, uint32_t argument);
126struct cmd_section_t *db_add_section(struct cmd_file_t *cmd_file, uint32_t identifier, bool data);
127void db_add_extern_source(struct cmd_file_t *cmd_file, const char *identifier, int extern_nr);
128bool db_generate_file(struct cmd_file_t *file, const char *filename, void *user, db_color_printf printf);
115void db_free_option_list(struct cmd_option_t *opt_list); 129void db_free_option_list(struct cmd_option_t *opt_list);
116void db_free(struct cmd_file_t *file); 130void db_free(struct cmd_file_t *file);
117 131
132/* standard implementation: user is unused*/
133void db_std_printf(void *user, bool error, color_t c, const char *fmt, ...);
134
118#endif /* __DBPARSER__ */ 135#endif /* __DBPARSER__ */