summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-09-09 14:42:27 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-09-09 14:42:27 +0000
commitd2aa7116d21637fcc0804a545426906f50f48b7e (patch)
tree06d8fc6e0ff2f8392b80bb039d8be19dca963b5d /tools
parentecca123dd2e5ded619ad0a0285df7358619eee1d (diff)
downloadrockbox-d2aa7116d21637fcc0804a545426906f50f48b7e.zip
rockbox-d2aa7116d21637fcc0804a545426906f50f48b7e.tar.gz
rockbox-d2aa7116d21637fcc0804a545426906f50f48b7e.tar.bz2
rockbox-d2aa7116d21637fcc0804a545426906f50f48b7e.tar.xz
support -v for verbose (debug) output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2240 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/bdf2ajf.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/tools/bdf2ajf.c b/tools/bdf2ajf.c
index 6733f00..4d47c5a 100644
--- a/tools/bdf2ajf.c
+++ b/tools/bdf2ajf.c
@@ -66,14 +66,15 @@ void write_short(unsigned short s, unsigned char* buf)
void usage()
{
- printf("bdf2ajf - compile BDF font for use with Rockbox\n");
- printf("Usage: bdf2ajf -f <font> -o <outfile>\n");
- printf("Options:\n");
- printf(" -f - input BDF file\n");
- printf(" -o - output AJF file\n");
- printf(" -h - print help\n");
- printf(" -t <string> - print string as bitmap\n");
- printf(" -t2 <string> - print string as Archos bitmap (must be the same result as -t)\n");
+ printf("bdf2ajf - compile BDF font for use with Rockbox\n"
+ "Usage: bdf2ajf -f <font> -o <outfile>\n"
+ "Options:\n"
+ " -f - input BDF file\n"
+ " -o - output AJF file\n"
+ " -v - verbose debug output\n"
+ " -h - print help\n"
+ " -t <string> - print string as bitmap\n"
+ " -t2 <string> - print string as Archos bitmap (must be the same result as -t)\n");
exit(0);
}
@@ -81,6 +82,8 @@ void usage()
int do_test1 = 0;
int do_test2 = 0;
+int verbose;
+
int main(int argc, char** argv)
{
FILE *outfd = 0;
@@ -113,6 +116,11 @@ int main(int argc, char** argv)
if (i==argc) usage();
strcpy(out_file, argv[i]);
}
+ else if (!strcmp(argv[i], "-v"))
+ {
+ i++;
+ verbose = 1;
+ }
else if (!strcmp(argv[i], "-t"))
{
i++;
@@ -229,6 +237,13 @@ void writeAJF(BDF* bdf, const char* out_file)
{
bmp_bytes = rows*glyph->dwidth_x;
getBitmap(glyph, &outbuf[idx]);
+ if(verbose) {
+ int i;
+ printf("char %c (%02x) width %d\n", c, c, glyph->dwidth_x);
+ for(i=0; i< bmp_bytes;i++)
+ printf("%02x, ", outbuf[idx+i]);
+ printf("\n");
+ }
}
else
{