diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-04 16:36:27 +0100 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-04 17:04:38 +0100 |
| commit | 92ecbd5fb8a7c8e939b1b4dde82cc6c9ba9d41af (patch) | |
| tree | 5e187e031ab8648e2c2c58502f167abc72ec606c /utils/nwztools/upgtools/misc.h | |
| parent | 5cfd4a5b8e551c23600c93838180487e91698814 (diff) | |
| download | rockbox-92ecbd5fb8a7c8e939b1b4dde82cc6c9ba9d41af.zip rockbox-92ecbd5fb8a7c8e939b1b4dde82cc6c9ba9d41af.tar.gz rockbox-92ecbd5fb8a7c8e939b1b4dde82cc6c9ba9d41af.tar.bz2 rockbox-92ecbd5fb8a7c8e939b1b4dde82cc6c9ba9d41af.tar.xz | |
nwztools/upg: move upg handling to its own file, completely rework kas handling
This was a huge mess, the new is much cleaner hopefully.
Change-Id: I43663d021dc8bc31662d3923e1c3da22d987ebf9
Diffstat (limited to 'utils/nwztools/upgtools/misc.h')
| -rw-r--r-- | utils/nwztools/upgtools/misc.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/utils/nwztools/upgtools/misc.h b/utils/nwztools/upgtools/misc.h index 96666a2..e493cc2 100644 --- a/utils/nwztools/upgtools/misc.h +++ b/utils/nwztools/upgtools/misc.h @@ -27,20 +27,16 @@ #define _STR(a) #a #define STR(a) _STR(a) -#define bug(...) do { fprintf(stderr,"["__FILE__":"STR(__LINE__)"]ERROR: "__VA_ARGS__); exit(1); } while(0) -#define bugp(...) do { fprintf(stderr, __VA_ARGS__); perror(" "); exit(1); } while(0) - #define ROUND_UP(val, round) ((((val) + (round) - 1) / (round)) * (round)) -typedef char color_t[]; +typedef const char color_t[]; extern color_t OFF, GREY, RED, GREEN, YELLOW, BLUE; -void *xmalloc(size_t s); void color(color_t c); void enable_color(bool enable); -#define cprintf(col, ...) do {color(col); printf(__VA_ARGS__); }while(0) +typedef void (*generic_printf_t)(void *u, bool err, color_t c, const char *f, ...); -#define cprintf_field(str1, ...) do{ cprintf(GREEN, str1); cprintf(YELLOW, __VA_ARGS__); }while(0) +void generic_std_printf(void *u, bool err, color_t c, const char *f, ...); #endif /* __MISC_H__ */ |