summaryrefslogtreecommitdiffstats
path: root/tools/checkwps
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-01-29 20:49:43 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-01-29 20:49:43 +0000
commit36c71a60ca82f9777fbdd239f63f62ccf68cf3f5 (patch)
tree06518f1485a9899da1015445623256721435323e /tools/checkwps
parentd4b99fdfe06bf5f30f4c3a68f08aedaaa6f432f9 (diff)
downloadrockbox-36c71a60ca82f9777fbdd239f63f62ccf68cf3f5.tar.gz
rockbox-36c71a60ca82f9777fbdd239f63f62ccf68cf3f5.tar.bz2
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')
-rw-r--r--tools/checkwps/Makefile3
-rw-r--r--tools/checkwps/checkwps.c52
-rw-r--r--tools/checkwps/checkwps.h8
3 files changed, 57 insertions, 6 deletions
diff --git a/tools/checkwps/Makefile b/tools/checkwps/Makefile
index cde80b0dde..1bdf3580f9 100644
--- a/tools/checkwps/Makefile
+++ b/tools/checkwps/Makefile
@@ -27,9 +27,10 @@ COMMON=$(ROOT)/apps/gui/wps_parser.c \
INCLUDE=-I $(ROOT)/apps/gui \
-I $(ROOT)/firmware/export \
-I $(ROOT)/apps \
+ -I $(ROOT)/apps/recorder \
-I .
-CFLAGS = -g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\"
+CFLAGS = -g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\"
all:
@echo To build, run the buildall.sh script
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 @@
#include "config.h"
#include "gwps.h"
#include "checkwps.h"
-
-#define MIN(x,y) ((x) > (y) ? (y) : (x))
+#include "resize.h"
bool debug_wps = true;
int wps_verbose_level = 0;
int errno;
+const struct settings_list *settings;
+const int nb_settings = 0;
+
/* static endianness conversion */
#define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \
((unsigned short)(x) << 8)))
@@ -55,6 +57,20 @@ unsigned short letoh16(unsigned short x)
}
}
+unsigned short letoh32(unsigned short x)
+{
+ unsigned short n = 0x1234;
+ unsigned char* ch = (unsigned char*)&n;
+
+ if (*ch == 0x34)
+ {
+ /* Little-endian */
+ return x;
+ } else {
+ return SWAP_32(x);
+ }
+}
+
unsigned int htole32(unsigned int x)
{
unsigned short n = 0x1234;
@@ -109,6 +125,38 @@ bool load_remote_wps_backdrop(const char* filename)
return true;
}
+int recalc_dimension(struct dim *dst, struct dim *src)
+{
+ return 0;
+}
+
+int resize_on_load(struct bitmap *bm, bool dither, struct dim *src,
+ struct rowset *rset, unsigned char *buf, unsigned int len,
+ const struct custom_format *format,
+ struct img_part* (*store_part)(void *args),
+ void *args)
+{
+ return 0;
+}
+
+int audio_status(void)
+{
+ return 0;
+}
+
+struct mp3entry* audio_current_track(void)
+{
+ return NULL;
+}
+
+void audio_stop(void)
+{
+}
+
+void audio_play(long offset)
+{
+}
+
static char pluginbuf[PLUGIN_BUFFER_SIZE];
static unsigned dummy_func2(void)
diff --git a/tools/checkwps/checkwps.h b/tools/checkwps/checkwps.h
index fa3b425500..2ba8f5f59e 100644
--- a/tools/checkwps/checkwps.h
+++ b/tools/checkwps/checkwps.h
@@ -23,20 +23,22 @@
#define _CHECKWPS_H_
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <fcntl.h>
/* subset of global_settings needed to build checkwps. */
struct user_settings {
bool statusbar;
-#ifdef HAVE_LCD_COLOR
int bg_color; /* background color native format */
int fg_color; /* foreground color native format */
-#endif
};
extern struct user_settings global_settings;
+#define FONT_SYSFIXED 0
+#define FONT_UI 1
+#define SYSFONT_HEIGHT 8
-
+#define MIN(x,y) ((x) > (y) ? (y) : (x))
#endif