diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-01-29 20:49:43 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-01-29 20:49:43 +0000 |
commit | 36c71a60ca82f9777fbdd239f63f62ccf68cf3f5 (patch) | |
tree | 06518f1485a9899da1015445623256721435323e /tools/checkwps/checkwps.c | |
parent | d4b99fdfe06bf5f30f4c3a68f08aedaaa6f432f9 (diff) | |
download | rockbox-36c71a60ca82f9777fbdd239f63f62ccf68cf3f5.tar.gz rockbox-36c71a60ca82f9777fbdd239f63f62ccf68cf3f5.zip |
Get checkwps working again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19880 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/checkwps/checkwps.c')
-rw-r--r-- | tools/checkwps/checkwps.c | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 2981303701..17098d2b06 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c | |||
@@ -25,14 +25,16 @@ | |||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include "gwps.h" | 26 | #include "gwps.h" |
27 | #include "checkwps.h" | 27 | #include "checkwps.h" |
28 | 28 | #include "resize.h" | |
29 | #define MIN(x,y) ((x) > (y) ? (y) : (x)) | ||
30 | 29 | ||
31 | bool debug_wps = true; | 30 | bool debug_wps = true; |
32 | int wps_verbose_level = 0; | 31 | int wps_verbose_level = 0; |
33 | 32 | ||
34 | int errno; | 33 | int errno; |
35 | 34 | ||
35 | const struct settings_list *settings; | ||
36 | const int nb_settings = 0; | ||
37 | |||
36 | /* static endianness conversion */ | 38 | /* static endianness conversion */ |
37 | #define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \ | 39 | #define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \ |
38 | ((unsigned short)(x) << 8))) | 40 | ((unsigned short)(x) << 8))) |
@@ -55,6 +57,20 @@ unsigned short letoh16(unsigned short x) | |||
55 | } | 57 | } |
56 | } | 58 | } |
57 | 59 | ||
60 | unsigned short letoh32(unsigned short x) | ||
61 | { | ||
62 | unsigned short n = 0x1234; | ||
63 | unsigned char* ch = (unsigned char*)&n; | ||
64 | |||
65 | if (*ch == 0x34) | ||
66 | { | ||
67 | /* Little-endian */ | ||
68 | return x; | ||
69 | } else { | ||
70 | return SWAP_32(x); | ||
71 | } | ||
72 | } | ||
73 | |||
58 | unsigned int htole32(unsigned int x) | 74 | unsigned int htole32(unsigned int x) |
59 | { | 75 | { |
60 | unsigned short n = 0x1234; | 76 | unsigned short n = 0x1234; |
@@ -109,6 +125,38 @@ bool load_remote_wps_backdrop(const char* filename) | |||
109 | return true; | 125 | return true; |
110 | } | 126 | } |
111 | 127 | ||
128 | int recalc_dimension(struct dim *dst, struct dim *src) | ||
129 | { | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, | ||
134 | struct rowset *rset, unsigned char *buf, unsigned int len, | ||
135 | const struct custom_format *format, | ||
136 | struct img_part* (*store_part)(void *args), | ||
137 | void *args) | ||
138 | { | ||
139 | return 0; | ||
140 | } | ||
141 | |||
142 | int audio_status(void) | ||
143 | { | ||
144 | return 0; | ||
145 | } | ||
146 | |||
147 | struct mp3entry* audio_current_track(void) | ||
148 | { | ||
149 | return NULL; | ||
150 | } | ||
151 | |||
152 | void audio_stop(void) | ||
153 | { | ||
154 | } | ||
155 | |||
156 | void audio_play(long offset) | ||
157 | { | ||
158 | } | ||
159 | |||
112 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; | 160 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; |
113 | 161 | ||
114 | static unsigned dummy_func2(void) | 162 | static unsigned dummy_func2(void) |