diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2007-03-06 07:59:25 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2007-03-06 07:59:25 +0000 |
| commit | 82b26d2e5d5de861b58cd523276453c57580fd29 (patch) | |
| tree | 15666dadd0de91dc848c243b1731dff96546eb6b | |
| parent | 00af7c7b74da0305ac3ec458fbc67c35d3032ed7 (diff) | |
| download | rockbox-82b26d2e5d5de861b58cd523276453c57580fd29.zip rockbox-82b26d2e5d5de861b58cd523276453c57580fd29.tar.gz rockbox-82b26d2e5d5de861b58cd523276453c57580fd29.tar.bz2 rockbox-82b26d2e5d5de861b58cd523276453c57580fd29.tar.xz | |
Add a stupid hack that seems to help size on everything. We'll see shortly for sure.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12636 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/recorder/keyboard.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index cb27c38..5d6679e 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c @@ -74,7 +74,8 @@ #define KBD_MORSE_INPUT #endif -struct keyboard_parameters { +struct keyboard_parameters +{ const unsigned char* default_kbd; int DEFAULT_LINES; unsigned short kbd_buf[KBD_BUF_SIZE]; @@ -103,7 +104,7 @@ struct keyboard_parameters { unsigned short hlead, hvowel, htail; }; -static struct keyboard_parameters param[NB_SCREENS]; +static struct keyboard_parameters kbd_param[NB_SCREENS]; static bool kbd_loaded = false; #ifdef KBD_MORSE_INPUT @@ -160,10 +161,10 @@ int load_kbd(unsigned char* filename) } FOR_NB_SCREENS(l) - utf8decode(buf, ¶m[l].kbd_buf[i]); + utf8decode(buf, &kbd_param[l].kbd_buf[i]); - if (param[0].kbd_buf[i] != 0xFEFF && - param[0].kbd_buf[i] != '\r') /*skip BOM & carriage returns */ + if (kbd_param[0].kbd_buf[i] != 0xFEFF && + kbd_param[0].kbd_buf[i] != '\r') /*skip BOM & carriage returns */ { i++; } @@ -173,7 +174,7 @@ int load_kbd(unsigned char* filename) kbd_loaded = true; FOR_NB_SCREENS(l) - param[l].nchars = i; + kbd_param[l].nchars = i; return 0; } @@ -254,6 +255,8 @@ static int get_param_k(const struct keyboard_parameters *pm) int kbd_input(char* text, int buflen) { bool done = false; + /* This seems to keep the sizes of everything down */ + struct keyboard_parameters * volatile param = kbd_param; int l; /* screen loop variable */ int text_w = 0; int editpos; /* Edit position on all screens */ @@ -401,7 +404,7 @@ int kbd_input(char* text, int buflen) for (j = i; j < pm->nchars; j++) { - pm->kbd_buf[j] = pm->kbd_buf[j+1]; + pm->kbd_buf[j] = pm->kbd_buf[j + 1]; } } else |