forked from len0rd/rockbox
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
This commit is contained in:
parent
eec2b7ed2b
commit
5bb707258a
1 changed files with 19 additions and 10 deletions
|
@ -128,11 +128,20 @@ static unsigned char *word_mode_str[] = {"wrap", "chop", "words"};
|
||||||
enum {
|
enum {
|
||||||
NORMAL=0,
|
NORMAL=0,
|
||||||
JOIN,
|
JOIN,
|
||||||
REFLOW,
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
REFLOW, /* Makes no sense for the player */
|
||||||
|
#endif
|
||||||
EXPAND,
|
EXPAND,
|
||||||
LINE_MODES
|
LINE_MODES,
|
||||||
|
#ifndef HAVE_LCD_BITMAP
|
||||||
|
REFLOW /* Sorting it behind LINE_MODES effectively disables it. */
|
||||||
|
#endif
|
||||||
} line_mode = 0;
|
} 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 {
|
enum {
|
||||||
NARROW=0,
|
NARROW=0,
|
||||||
|
@ -254,8 +263,8 @@ static unsigned char* find_next_line(const unsigned char* cur_line, bool *is_sho
|
||||||
next_line = NULL;
|
next_line = NULL;
|
||||||
first_chars=true;
|
first_chars=true;
|
||||||
for (j=k=width=spaces=newlines=0; ; j++) {
|
for (j=k=width=spaces=newlines=0; ; j++) {
|
||||||
if (BUFFER_OOB(cur_line+j))
|
if (BUFFER_OOB(cur_line+j))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (LINE_IS_FULL) {
|
if (LINE_IS_FULL) {
|
||||||
size = search_len = j;
|
size = search_len = j;
|
||||||
break;
|
break;
|
||||||
|
@ -296,16 +305,16 @@ static unsigned char* find_next_line(const unsigned char* cur_line, bool *is_sho
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (line_mode==JOIN || newlines>0) {
|
if (line_mode==JOIN || newlines>0) {
|
||||||
while (spaces) {
|
while (spaces) {
|
||||||
spaces--;
|
spaces--;
|
||||||
ADVANCE_COUNTERS(' ');
|
ADVANCE_COUNTERS(' ');
|
||||||
if (LINE_IS_FULL) {
|
if (LINE_IS_FULL) {
|
||||||
size = search_len = j;
|
size = search_len = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newlines=0;
|
newlines=0;
|
||||||
} else if (spaces) {
|
} else if (spaces) {
|
||||||
/* REFLOW, multiple spaces between words: count only
|
/* REFLOW, multiple spaces between words: count only
|
||||||
* one. If more are needed, they will be added
|
* one. If more are needed, they will be added
|
||||||
* while drawing. */
|
* while drawing. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue