diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-09-13 12:24:14 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-09-13 12:24:14 +0000 |
commit | 541dd6fda5ae93073a0b9c499f62af2cf46f3529 (patch) | |
tree | 2c14fe844b52f7a5c20f4fe1cb28ca8dd72cb6f4 /apps/gui | |
parent | 894c8091088f7554bc89bf0e1dca38acbdfde4d5 (diff) |
Remove some trailing whitespaces in in the skin engine files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22694 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/skin_engine/skin_buffer.c | 16 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 66 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 114 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 6 | ||||
-rw-r--r-- | apps/gui/skin_engine/wps_debug.c | 22 |
5 files changed, 112 insertions, 112 deletions
diff --git a/apps/gui/skin_engine/skin_buffer.c b/apps/gui/skin_engine/skin_buffer.c index 1a81f55ea8..3ad2efc634 100644 --- a/apps/gui/skin_engine/skin_buffer.c +++ b/apps/gui/skin_engine/skin_buffer.c @@ -34,14 +34,14 @@ /* skin buffer management. * This module is used to allocate space in a single global skin buffer for * tokens for both/all screens. - * + * * This is mostly just copy/paste from firmware/buffer.c * * * MAIN_ and REMOTE_BUFFER are just for reasonable size calibration, * both screens can use the whole buffer as they need; it's not split * between screens - * + * * Buffer can be allocated from either "end" of the global buffer. * items with unknown sizes get allocated from the start (0->) (data) * items with known sizes get allocated from the end (<-buf_size) (tokens) @@ -49,7 +49,7 @@ * |tokens skin1|images skin2|---SPACE---|data skin2|data skin1| * Make sure to never start allocating from the beginning before letting us know * how much was used. and RESPECT THE buf_free RETURN VALUES! - * + * */ @@ -71,7 +71,7 @@ #ifdef HAVE_LCD_CHARCELLS #define SKIN_BUFFER_SIZE (LCD_HEIGHT * LCD_WIDTH) * 64 + \ - (WPS_MAX_TOKENS * sizeof(struct wps_token)) + (WPS_MAX_TOKENS * sizeof(struct wps_token)) #endif static unsigned char buffer[SKIN_BUFFER_SIZE]; @@ -87,7 +87,7 @@ void skin_buffer_init(void) if (buffer == NULL) { buf_size = SKIN_BUFFER_SIZE;/* global_settings.skin_buf_size */ - + buffer = buffer_alloc(buf_size); buffer_front = buffer; buffer_back = bufer + buf_size; @@ -124,16 +124,16 @@ void* skin_buffer_alloc(size_t size) buffer_back -= size; /* 32-bit aligned */ buffer_back = (void *)(((unsigned long)buffer_back) & ~3); - + memset(buffer_back, 0, size); return buffer_back; } /* Get a pointer to the skin buffer and the count of how much is free - * used to do your own buffer management. + * used to do your own buffer management. * Any memory used will be overwritten next time wps_buffer_alloc() * is called unless skin_buffer_increment() is called first - * + * * This is from the start of the buffer, it is YOUR responsility to make * sure you dont ever use more then *freespace, and bear in mind this will only * be valid untill skin_buffer_alloc() is next called... diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 14e0bce0a9..e24ab66393 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c @@ -120,14 +120,14 @@ bool gui_wps_display(struct gui_wps *gwps) bool skin_update(struct gui_wps *gwps, unsigned int update_type) { bool retval; - /* This maybe shouldnt be here, but while the skin is only used to + /* This maybe shouldnt be here, but while the skin is only used to * display the music screen this is better than whereever we are being * called from. This is also safe for skined screen which dont use the id3 */ struct mp3entry *id3 = gwps->state->id3; bool cuesheet_update = (id3 != NULL ? cuesheet_subtrack_changed(id3) : false); gwps->state->do_full_update = cuesheet_update || gwps->state->do_full_update; - - retval = skin_redraw(gwps, gwps->state->do_full_update ? + + retval = skin_redraw(gwps, gwps->state->do_full_update ? WPS_REFRESH_ALL : update_type); return retval; } @@ -161,7 +161,7 @@ void skin_statusbar_changed(struct gui_wps *skin) } } - + } static void draw_progressbar(struct gui_wps *gwps, @@ -226,7 +226,7 @@ static void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subima #if LCD_DEPTH > 1 if(img->bm.format == FORMAT_MONO) { #endif - display->mono_bitmap_part(img->bm.data, + display->mono_bitmap_part(img->bm.data, 0, img->subimage_height * subimage, img->bm.width, img->x, img->y, img->bm.width, @@ -235,8 +235,8 @@ static void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subima } else { display->transparent_bitmap_part((fb_data *)img->bm.data, 0, img->subimage_height * subimage, - STRIDE(display->screen_type, - img->bm.width, img->bm.height), + STRIDE(display->screen_type, + img->bm.width, img->bm.height), img->x, img->y, img->bm.width, img->subimage_height); } @@ -268,14 +268,14 @@ static void wps_display_images(struct gui_wps *gwps, struct viewport* vp) } list = list->next; } -#ifdef HAVE_ALBUMART +#ifdef HAVE_ALBUMART /* now draw the AA */ if (data->albumart && data->albumart->vp == vp && data->albumart->draw) { draw_album_art(gwps, audio_current_aa_hid(), false); } #endif - + display->set_drawmode(DRMODE_SOLID); } @@ -352,14 +352,14 @@ static void draw_player_fullbar(struct gui_wps *gwps, char* buf, int buf_size) { softchar = false; memset(progress_pattern, 0, sizeof(progress_pattern)); - + if ((digit = timestr[time_idx])) { softchar = true; digit -= '0'; if (timestr[time_idx + 1] == ':') /* ones, left aligned */ - { + { memcpy(progress_pattern, numbers[digit], 4); time_idx += 2; } @@ -498,8 +498,8 @@ struct gui_img* find_image(char label, struct wps_data *data) list = list->next; } return NULL; -} -#endif +} +#endif struct skin_viewport* find_viewport(char label, struct wps_data *data) { @@ -512,9 +512,9 @@ struct skin_viewport* find_viewport(char label, struct wps_data *data) list = list->next; } return NULL; -} - - +} + + /* Read a (sub)line to the given alignment format buffer. linebuf is the buffer where the data is actually stored. align is the alignment format that'll be used to display the text. @@ -617,7 +617,7 @@ static bool get_line(struct gui_wps *gwps, struct skin_token_list *list = data->viewports; while (list) { - struct skin_viewport *vp = + struct skin_viewport *vp = (struct skin_viewport *)list->token->value.data; if (vp->label == label) { @@ -859,7 +859,7 @@ static void write_line(struct screen *display, ypos = (line * string_height); - if (scroll && ((left_width > scroll_width) || + if (scroll && ((left_width > scroll_width) || (center_width > scroll_width) || (right_width > scroll_width))) { @@ -911,7 +911,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) if (!id3) return false; - + unsigned flags; char linebuf[MAX_PATH]; @@ -919,8 +919,8 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) align.left = NULL; align.center = NULL; align.right = NULL; - - + + struct skin_token_list *viewport_list; bool update_line, new_subline_refresh; @@ -942,14 +942,14 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) if (refresh_mode == WPS_REFRESH_ALL) { struct skin_line *line; - + display->set_viewport(&find_viewport(VP_DEFAULT_LABEL, data)->vp); display->clear_viewport(); - - for (viewport_list = data->viewports; + + for (viewport_list = data->viewports; viewport_list; viewport_list = viewport_list->next) { - struct skin_viewport *skin_viewport = + struct skin_viewport *skin_viewport = (struct skin_viewport *)viewport_list->token->value.data; for(line = skin_viewport->lines; line; line = line->next) { @@ -968,10 +968,10 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) #endif /* disable any viewports which are conditionally displayed */ - for (viewport_list = data->viewports; + for (viewport_list = data->viewports; viewport_list; viewport_list = viewport_list->next) { - struct skin_viewport *skin_viewport = + struct skin_viewport *skin_viewport = (struct skin_viewport *)viewport_list->token->value.data; if (skin_viewport->hidden_flags&VP_DRAW_HIDEABLE) { @@ -982,10 +982,10 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) } } int viewport_count = 0; - for (viewport_list = data->viewports; + for (viewport_list = data->viewports; viewport_list; viewport_list = viewport_list->next, viewport_count++) { - struct skin_viewport *skin_viewport = + struct skin_viewport *skin_viewport = (struct skin_viewport *)viewport_list->token->value.data; unsigned vp_refresh_mode = refresh_mode; display->set_viewport(&skin_viewport->vp); @@ -995,7 +995,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) struct skin_token_list *imglist = data->images; while (imglist) { - struct gui_img *img = (struct gui_img *)imglist->token->value.data; + struct gui_img *img = (struct gui_img *)imglist->token->value.data; img->display = -1; imglist = imglist->next; } @@ -1019,11 +1019,11 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) { display->clear_viewport(); } - + /* loop over the lines for this viewport */ struct skin_line *line; int line_count = 0; - + for (line = skin_viewport->lines; line; line = line->next, line_count++) { struct skin_subline *subline; @@ -1082,7 +1082,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) } #endif - if (update_line && + if (update_line && /* conditionals clear the line which means if the %Vd is put into the default viewport there will be a blank line. To get around this we dont allow any actual drawing to happen in the diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 5f5128533f..7d37e1972c 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -134,7 +134,7 @@ static int parse_dir_level(const char *wps_bufptr, struct wps_token *token, struct wps_data *wps_data); static int parse_setting(const char *wps_bufptr, struct wps_token *token, struct wps_data *wps_data); - + #ifdef HAVE_LCD_BITMAP static int parse_viewport_display(const char *wps_bufptr, struct wps_token *token, struct wps_data *wps_data); @@ -170,7 +170,7 @@ static int fulline_tag_not_supported(const char *wps_bufptr, return skip_end_of_line(wps_bufptr); } #define parse_touchregion fulline_tag_not_supported -#endif +#endif #ifdef CONFIG_RTC #define WPS_RTC_REFRESH WPS_REFRESH_DYNAMIC #else @@ -287,7 +287,7 @@ static const struct wps_tag all_tags[] = { { WPS_TOKEN_REPEAT_MODE, "mm", WPS_REFRESH_DYNAMIC, NULL }, { WPS_TOKEN_PLAYBACK_STATUS, "mp", WPS_REFRESH_DYNAMIC, NULL }, - { WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC, + { WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC, parse_timeout }, #ifdef HAVE_LCD_BITMAP @@ -340,7 +340,7 @@ static const struct wps_tag all_tags[] = { { WPS_TOKEN_ALBUMART_DISPLAY, "C", WPS_REFRESH_STATIC, parse_albumart_display }, #endif - { WPS_VIEWPORT_ENABLE, "Vd", WPS_REFRESH_DYNAMIC, + { WPS_VIEWPORT_ENABLE, "Vd", WPS_REFRESH_DYNAMIC, parse_viewport_display }, { WPS_NO_TOKEN, "V", 0, parse_viewport }, @@ -350,16 +350,16 @@ static const struct wps_tag all_tags[] = { #endif { WPS_TOKEN_SETTING, "St", WPS_REFRESH_DYNAMIC, parse_setting }, - + { WPS_TOKEN_LASTTOUCH, "Tl", WPS_REFRESH_DYNAMIC, parse_timeout }, { WPS_NO_TOKEN, "T", 0, parse_touchregion }, - + { WPS_TOKEN_UNKNOWN, "", 0, NULL } /* the array MUST end with an empty string (first char is \0) */ }; -/* add a skin_token_list item to the list chain. ALWAYS appended because some of the +/* add a skin_token_list item to the list chain. ALWAYS appended because some of the * chains require the order to be kept. */ static void add_to_ll_chain(struct skin_token_list **list, struct skin_token_list *item) @@ -371,9 +371,9 @@ static void add_to_ll_chain(struct skin_token_list **list, struct skin_token_lis struct skin_token_list *t = *list; while (t->next) t = t->next; - t->next = item; + t->next = item; } -} +} /* create and init a new wpsll item. * passing NULL to token will alloc a new one. * You should only pass NULL for the token when the token type (table above) @@ -392,7 +392,7 @@ static struct skin_token_list *new_skin_token_list_item(struct wps_token *token, if (token_data) llitem->token->value.data = token_data; return llitem; -} +} /* Returns the number of chars that should be skipped to jump immediately after the first eol, i.e. to the start of the next line */ @@ -414,10 +414,10 @@ static bool skin_start_new_subline(struct skin_line *line, int curr_token) subline->first_token_idx = curr_token; subline->next = NULL; - + subline->line_type = 0; subline->time_mult = 0; - + line->curr_subline->last_token_idx = curr_token-1; line->curr_subline->next = subline; line->curr_subline = subline; @@ -430,19 +430,19 @@ static bool skin_start_new_line(struct skin_viewport *vp, int curr_token) struct skin_subline *subline = NULL; if (!line) return false; - - /* init the subline */ + + /* init the subline */ subline = &line->sublines; subline->first_token_idx = curr_token; - subline->next = NULL; + subline->next = NULL; subline->line_type = 0; subline->time_mult = 0; - + /* init the new line */ - line->curr_subline = &line->sublines; + line->curr_subline = &line->sublines; line->next = NULL; line->subline_expire_time = 0; - + /* connect to curr_line and vp pointers. * 1) close the previous lines subline * 2) connect to vp pointer @@ -567,9 +567,9 @@ static int parse_image_load(const char *wps_bufptr, const char *newline; int x,y; struct gui_img *img; - + /* format: %x|n|filename.bmp|x|y| - or %xl|n|filename.bmp|x|y| + or %xl|n|filename.bmp|x|y| or %xl|n|filename.bmp|x|y|num_subimages| */ @@ -653,14 +653,14 @@ static int parse_viewport(const char *wps_bufptr, (void)token; /* Kill warnings */ const char *ptr = wps_bufptr; - const int screen = + const int screen = #ifdef HAVE_REMOTE_LCD wps_data->remote_wps ? SCREEN_REMOTE : #endif SCREEN_MAIN; struct skin_viewport *skin_vp = skin_buffer_alloc(sizeof(struct skin_viewport)); - + /* check for the optional letter to signify its a hideable viewport */ /* %Vl|<label>|<rest of tags>| */ skin_vp->hidden_flags = 0; @@ -694,7 +694,7 @@ static int parse_viewport(const char *wps_bufptr, } if (*ptr != '|') return WPS_ERROR_INVALID_PARAM; - + ptr++; struct viewport *vp = &skin_vp->vp; /* format: %V|x|y|width|height|font|fg_pattern|bg_pattern| */ @@ -711,7 +711,7 @@ static int parse_viewport(const char *wps_bufptr, if (!list) return WPS_ERROR_INVALID_PARAM; add_to_ll_chain(&wps_data->viewports, list); - curr_vp = skin_vp; + curr_vp = skin_vp; /* Skip the rest of the line */ return skip_end_of_line(wps_bufptr); } @@ -863,14 +863,14 @@ static int parse_progressbar(const char *wps_bufptr, const char *ptr = wps_bufptr; struct progressbar *pb = skin_buffer_alloc(sizeof(struct progressbar)); struct skin_token_list *item = new_skin_token_list_item(token, pb); - + if (!pb || !item) return WPS_ERROR_INVALID_PARAM; - + struct viewport *vp = &curr_vp->vp; #ifndef __PCTOOL__ int font_height = font_get(vp->font)->height; -#else +#else int font_height = 8; #endif /* we need to know what line number (viewport relative) this pb is, @@ -884,7 +884,7 @@ static int parse_progressbar(const char *wps_bufptr, } pb->have_bitmap_pb = false; pb->bm.data = NULL; /* no bitmap specified */ - + if (*wps_bufptr != '|') /* regular old style */ { pb->x = 0; @@ -897,7 +897,7 @@ static int parse_progressbar(const char *wps_bufptr, return 0; } ptr = wps_bufptr + 1; - + if (!(ptr = parse_list("sdddd", &set, '|', ptr, &filename, &x, &y, &width, &height))) return WPS_ERROR_INVALID_PARAM; @@ -1136,7 +1136,7 @@ static int parse_albumart_display(const char *wps_bufptr, #endif /* HAVE_ALBUMART */ #ifdef HAVE_TOUCHSCREEN - + struct touchaction {char* s; int action;}; static struct touchaction touchactions[] = { {"play", ACTION_WPS_PLAY }, {"stop", ACTION_WPS_STOP }, @@ -1158,7 +1158,7 @@ static int parse_touchregion(const char *wps_bufptr, const char pb_string[] = "progressbar"; const char vol_string[] = "volume"; int x,y,w,h; - + /* format: %T|x|y|width|height|action| * if action starts with & the area must be held to happen * action is one of: @@ -1189,11 +1189,11 @@ static int parse_touchregion(const char *wps_bufptr, /* Check there is a terminating | */ if (*ptr != '|') return WPS_ERROR_INVALID_PARAM; - + region = skin_buffer_alloc(sizeof(struct touchregion)); if (!region) return WPS_ERROR_INVALID_PARAM; - + /* should probably do some bounds checking here with the viewport... but later */ region->action = ACTION_NONE; region->x = x; @@ -1201,7 +1201,7 @@ static int parse_touchregion(const char *wps_bufptr, region->width = w; region->height = h; region->wvp = curr_vp; - + if(!strncmp(pb_string, action, sizeof(pb_string)-1) && *(action + sizeof(pb_string)-1) == '|') region->type = WPS_TOUCHREGION_SCROLLBAR; @@ -1222,7 +1222,7 @@ static int parse_touchregion(const char *wps_bufptr, i = 0; imax = ARRAYLEN(touchactions); - while ((region->action == ACTION_NONE) && + while ((region->action == ACTION_NONE) && (i < imax)) { /* try to match with one of our touchregion screens */ @@ -1239,9 +1239,9 @@ static int parse_touchregion(const char *wps_bufptr, if (!item) return WPS_ERROR_INVALID_PARAM; add_to_ll_chain(&wps_data->touchregions, item); - return skip_end_of_line(wps_bufptr); -} -#endif + return skip_end_of_line(wps_bufptr); +} +#endif /* Parse a generic token from the given string. Return the length read */ static int parse_token(const char *wps_bufptr, struct wps_data *wps_data) @@ -1318,7 +1318,7 @@ static int parse_token(const char *wps_bufptr, struct wps_data *wps_data) data is the pointer to the structure where the parsed WPS should be stored. It is initialised. wps_bufptr points to the string containing the WPS tags */ -#define TOKEN_BLOCK_SIZE 128 +#define TOKEN_BLOCK_SIZE 128 static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) { if (!data || !wps_bufptr || !*wps_bufptr) @@ -1329,8 +1329,8 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) size_t buf_free = 0; line_number = 1; level = -1; - - /* allocate enough RAM for a reasonable skin, grow as needed. + + /* allocate enough RAM for a reasonable skin, grow as needed. * Free any used RAM before loading the images to be 100% RAM efficient */ data->tokens = (struct wps_token *)skin_buffer_grab(&buf_free); if (sizeof(struct wps_token)*max_tokens >= buf_free) @@ -1354,7 +1354,7 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) skin_buffer_increment(needed, false); max_tokens += extra_tokens; } - + switch(*wps_bufptr++) { @@ -1468,7 +1468,7 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) data->num_tokens++; if (!skin_start_new_line(curr_vp, data->num_tokens)) - { + { fail = PARSE_FAIL_LIMITS_EXCEEDED; break; } @@ -1500,7 +1500,7 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) str = (char*)list->token->value.data; found = (strlen(str) == len && strncmp(string_start, str, len) == 0); - if (found) + if (found) break; /* break here because the list item is used if its found */ list = list->next; @@ -1518,7 +1518,7 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) break; } strlcpy(str, string_start, len+1); - struct skin_token_list *item = + struct skin_token_list *item = new_skin_token_list_item(&data->tokens[data->num_tokens], str); if(!item) { @@ -1541,7 +1541,7 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) if (!fail && level >= 0) /* there are unclosed conditionals */ fail = PARSE_FAIL_UNCLOSED_COND; - + if (*wps_bufptr && !fail) /* one of the limits of the while loop was exceeded */ fail = PARSE_FAIL_LIMITS_EXCEEDED; @@ -1550,9 +1550,9 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug) curr_line->curr_subline->last_token_idx = data->num_tokens; data->tokens[data->num_tokens++].type = WPS_NO_TOKEN; /* freeup unused tokens */ - skin_buffer_free_from_front(sizeof(struct wps_token) + skin_buffer_free_from_front(sizeof(struct wps_token) * (max_tokens - data->num_tokens)); - + #if defined(DEBUG) || defined(SIMULATOR) if (debug) print_debug_info(data, fail, line_number); @@ -1583,7 +1583,7 @@ static bool load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char char img_path[MAX_PATH]; get_image_filename(bitmap->data, bmpdir, img_path, sizeof(img_path)); - + /* load the image */ int format; #ifdef HAVE_REMOTE_LCD @@ -1592,7 +1592,7 @@ static bool load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char else #endif format = FORMAT_ANY|FORMAT_TRANSPARENT; - + size_t max_buf; char* imgbuf = (char*)skin_buffer_grab(&max_buf); bitmap->data = imgbuf; @@ -1625,7 +1625,7 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir) pb->have_bitmap_pb = load_skin_bmp(wps_data, &pb->bm, bmpdir); } list = list->next; - } + } /* regular images */ list = wps_data->images; while (list) @@ -1669,7 +1669,7 @@ bool skin_data_load(struct wps_data *wps_data, const char *buf, bool isfile) { - + if (!wps_data || !buf) return false; #ifdef HAVE_ALBUMART @@ -1686,7 +1686,7 @@ bool skin_data_load(struct wps_data *wps_data, #endif wps_reset(wps_data); - + curr_vp = skin_buffer_alloc(sizeof(struct skin_viewport)); if (!curr_vp) return false; @@ -1694,7 +1694,7 @@ bool skin_data_load(struct wps_data *wps_data, if (!list) return false; add_to_ll_chain(&wps_data->viewports, list); - + /* Initialise the first (default) viewport */ curr_vp->label = VP_DEFAULT_LABEL; @@ -1704,17 +1704,17 @@ bool skin_data_load(struct wps_data *wps_data, curr_vp->pb = NULL; curr_vp->hidden_flags = 0; curr_vp->lines = NULL; - + curr_line = NULL; if (!skin_start_new_line(curr_vp, 0)) return false; - + switch (statusbar_position(display->screen_type)) { case STATUSBAR_OFF: curr_vp->vp.y = 0; break; - case STATUSBAR_TOP: + case STATUSBAR_TOP: curr_vp->vp.y = STATUSBAR_HEIGHT; curr_vp->vp.height -= STATUSBAR_HEIGHT; break; diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index deab0eaf60..7f83da0451 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -465,7 +465,7 @@ const char *get_token_value(struct gui_wps *gwps, int mode = 1; if (status == AUDIO_STATUS_PLAY) mode = 2; - if (is_wps_fading() || + if (is_wps_fading() || (status & AUDIO_STATUS_PAUSE && !status_get_ffmode())) mode = 3; if (status_get_ffmode() == STATUS_FASTFORWARD) @@ -486,7 +486,7 @@ const char *get_token_value(struct gui_wps *gwps, *intval = global_settings.repeat_mode + 1; snprintf(buf, buf_size, "%d", global_settings.repeat_mode); return buf; - + case WPS_TOKEN_RTC_PRESENT: #if CONFIG_RTC return "c"; @@ -744,7 +744,7 @@ const char *get_token_value(struct gui_wps *gwps, return NULL; #endif case WPS_TOKEN_BUTTON_VOLUME: - if (data->button_time_volume && + if (data->button_time_volume && TIME_BEFORE(current_tick, data->button_time_volume + token->value.i * TIMEOUT_UNIT)) return "v"; diff --git a/apps/gui/skin_engine/wps_debug.c b/apps/gui/skin_engine/wps_debug.c index e27d276302..f23dd692f8 100644 --- a/apps/gui/skin_engine/wps_debug.c +++ b/apps/gui/skin_engine/wps_debug.c @@ -48,7 +48,7 @@ static char *next_str(bool next) { static char *get_token_desc(struct wps_token *token, char *buf, int bufsize, struct wps_data *data) { -#ifndef HAVE_LCD_BITMAP +#ifndef HAVE_LCD_BITMAP (void)data; /* kill charcell warning */ #endif bool next = token->next; @@ -66,7 +66,7 @@ static char *get_token_desc(struct wps_token *token, char *buf, case WPS_TOKEN_CHARACTER: if (token->value.c == '\n') snprintf(buf, bufsize, "Character '\\n'"); - else + else snprintf(buf, bufsize, "Character '%c'", token->value.c); break; @@ -471,16 +471,16 @@ static void dump_skin(struct wps_data *data) int indent = 0; char buf[64]; int i, j; - + struct skin_token_list *viewport_list; - for (viewport_list = data->viewports; + for (viewport_list = data->viewports; viewport_list; viewport_list = viewport_list->next) { - struct skin_viewport *skin_viewport = + struct skin_viewport *skin_viewport = (struct skin_viewport *)viewport_list->token->value.data; indent = 0; - DEBUGF("Viewport: '%c'\n", skin_viewport->label); - struct skin_line *line; + DEBUGF("Viewport: '%c'\n", skin_viewport->label); + struct skin_line *line; for (line = skin_viewport->lines; line; line = line->next) { struct skin_subline *subline; @@ -529,7 +529,7 @@ static void dump_skin(struct wps_data *data) } } } -} +} #endif void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line) @@ -555,7 +555,7 @@ void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line { case PARSE_OK: break; - + case PARSE_FAIL_UNCLOSED_COND: DEBUGF("ERR: Unclosed conditional"); break; @@ -580,7 +580,7 @@ void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line get_token_desc(&data->tokens[data->num_tokens], buf, sizeof(buf), data) ); break; - + case PARSE_FAIL_LIMITS_EXCEEDED: DEBUGF("ERR: Limits exceeded"); break; @@ -595,6 +595,6 @@ void debug_skin_usage(void) DEBUGF("Skin buffer usage: %lu/%lu\n", (unsigned long)skin_buffer_usage(), (unsigned long)(skin_buffer_usage() + skin_buffer_freespace())); } - + #endif /* DEBUG || SIMULATOR */ |