diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-05-14 16:46:31 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-05-14 16:46:31 +0000 |
| commit | 5bb707258a44bd8fbb46eac951d091a9fa5d0c90 (patch) | |
| tree | 36d8a44d1e6eb4da2494ce642a642cdfdadbe900 /apps/plugins/viewer.c | |
| parent | eec2b7ed2b886ab58a4c4739a4abb9460342ea22 (diff) | |
| download | rockbox-5bb707258a44bd8fbb46eac951d091a9fa5d0c90.zip rockbox-5bb707258a44bd8fbb46eac951d091a9fa5d0c90.tar.gz rockbox-5bb707258a44bd8fbb46eac951d091a9fa5d0c90.tar.bz2 rockbox-5bb707258a44bd8fbb46eac951d091a9fa5d0c90.tar.xz | |
Disable reflow mode for the player as it makes no sense. Cosmetic indentation fixes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6470 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/viewer.c')
| -rw-r--r-- | apps/plugins/viewer.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index f58abde..514854d 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c @@ -128,11 +128,20 @@ static unsigned char *word_mode_str[] = {"wrap", "chop", "words"}; enum { NORMAL=0, JOIN, - REFLOW, +#ifdef HAVE_LCD_BITMAP + REFLOW, /* Makes no sense for the player */ +#endif EXPAND, - LINE_MODES + LINE_MODES, +#ifndef HAVE_LCD_BITMAP + REFLOW /* Sorting it behind LINE_MODES effectively disables it. */ +#endif } line_mode = 0; -static unsigned char *line_mode_str[] = {"normal", "join", "reflow", "expand", "lines"}; + +static unsigned char *line_mode_str[] = { + [NORMAL] = "normal", [JOIN] = "join", [REFLOW] = "reflow", + [EXPAND] = "expand", [LINE_MODES] = "lines" +}; enum { NARROW=0, @@ -254,8 +263,8 @@ static unsigned char* find_next_line(const unsigned char* cur_line, bool *is_sho next_line = NULL; first_chars=true; for (j=k=width=spaces=newlines=0; ; j++) { - if (BUFFER_OOB(cur_line+j)) - return NULL; + if (BUFFER_OOB(cur_line+j)) + return NULL; if (LINE_IS_FULL) { size = search_len = j; break; @@ -296,16 +305,16 @@ static unsigned char* find_next_line(const unsigned char* cur_line, bool *is_sho default: if (line_mode==JOIN || newlines>0) { - while (spaces) { - spaces--; + while (spaces) { + spaces--; ADVANCE_COUNTERS(' '); if (LINE_IS_FULL) { size = search_len = j; - break; - } + break; + } } newlines=0; - } else if (spaces) { + } else if (spaces) { /* REFLOW, multiple spaces between words: count only * one. If more are needed, they will be added * while drawing. */ |