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 | |
parent | eec2b7ed2b886ab58a4c4739a4abb9460342ea22 (diff) | |
download | rockbox-5bb707258a44bd8fbb46eac951d091a9fa5d0c90.tar.gz rockbox-5bb707258a44bd8fbb46eac951d091a9fa5d0c90.zip |
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')
-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 f58abdea53..514854db97 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -128,11 +128,20 @@ static unsigned char *word_mode_str[] = {"wrap", "chop", "words"}; | |||
128 | enum { | 128 | enum { |
129 | NORMAL=0, | 129 | NORMAL=0, |
130 | JOIN, | 130 | JOIN, |
131 | REFLOW, | 131 | #ifdef HAVE_LCD_BITMAP |
132 | REFLOW, /* Makes no sense for the player */ | ||
133 | #endif | ||
132 | EXPAND, | 134 | EXPAND, |
133 | LINE_MODES | 135 | LINE_MODES, |
136 | #ifndef HAVE_LCD_BITMAP | ||
137 | REFLOW /* Sorting it behind LINE_MODES effectively disables it. */ | ||
138 | #endif | ||
134 | } line_mode = 0; | 139 | } line_mode = 0; |
135 | static unsigned char *line_mode_str[] = {"normal", "join", "reflow", "expand", "lines"}; | 140 | |
141 | static unsigned char *line_mode_str[] = { | ||
142 | [NORMAL] = "normal", [JOIN] = "join", [REFLOW] = "reflow", | ||
143 | [EXPAND] = "expand", [LINE_MODES] = "lines" | ||
144 | }; | ||
136 | 145 | ||
137 | enum { | 146 | enum { |
138 | NARROW=0, | 147 | NARROW=0, |
@@ -254,8 +263,8 @@ static unsigned char* find_next_line(const unsigned char* cur_line, bool *is_sho | |||
254 | next_line = NULL; | 263 | next_line = NULL; |
255 | first_chars=true; | 264 | first_chars=true; |
256 | for (j=k=width=spaces=newlines=0; ; j++) { | 265 | for (j=k=width=spaces=newlines=0; ; j++) { |
257 | if (BUFFER_OOB(cur_line+j)) | 266 | if (BUFFER_OOB(cur_line+j)) |
258 | return NULL; | 267 | return NULL; |
259 | if (LINE_IS_FULL) { | 268 | if (LINE_IS_FULL) { |
260 | size = search_len = j; | 269 | size = search_len = j; |
261 | break; | 270 | break; |
@@ -296,16 +305,16 @@ static unsigned char* find_next_line(const unsigned char* cur_line, bool *is_sho | |||
296 | 305 | ||
297 | default: | 306 | default: |
298 | if (line_mode==JOIN || newlines>0) { | 307 | if (line_mode==JOIN || newlines>0) { |
299 | while (spaces) { | 308 | while (spaces) { |
300 | spaces--; | 309 | spaces--; |
301 | ADVANCE_COUNTERS(' '); | 310 | ADVANCE_COUNTERS(' '); |
302 | if (LINE_IS_FULL) { | 311 | if (LINE_IS_FULL) { |
303 | size = search_len = j; | 312 | size = search_len = j; |
304 | break; | 313 | break; |
305 | } | 314 | } |
306 | } | 315 | } |
307 | newlines=0; | 316 | newlines=0; |
308 | } else if (spaces) { | 317 | } else if (spaces) { |
309 | /* REFLOW, multiple spaces between words: count only | 318 | /* REFLOW, multiple spaces between words: count only |
310 | * one. If more are needed, they will be added | 319 | * one. If more are needed, they will be added |
311 | * while drawing. */ | 320 | * while drawing. */ |