refactor: Remove all unwanted whitespace
This commit is contained in:
@@ -33,24 +33,24 @@ const blz_footer *blz_get_footer(const unsigned char *compData, unsigned int com
|
||||
}
|
||||
|
||||
// From https://github.com/SciresM/hactool/blob/master/kip.c which is exactly how kernel does it, thanks SciresM!
|
||||
int blz_uncompress_inplace(unsigned char *dataBuf, unsigned int compSize, const blz_footer *footer)
|
||||
int blz_uncompress_inplace(unsigned char *dataBuf, unsigned int compSize, const blz_footer *footer)
|
||||
{
|
||||
u32 addl_size = footer->addl_size;
|
||||
u32 header_size = footer->header_size;
|
||||
u32 cmp_and_hdr_size = footer->cmp_and_hdr_size;
|
||||
|
||||
|
||||
unsigned char* cmp_start = &dataBuf[compSize] - cmp_and_hdr_size;
|
||||
u32 cmp_ofs = cmp_and_hdr_size - header_size;
|
||||
u32 out_ofs = cmp_and_hdr_size + addl_size;
|
||||
|
||||
while (out_ofs)
|
||||
|
||||
while (out_ofs)
|
||||
{
|
||||
unsigned char control = cmp_start[--cmp_ofs];
|
||||
for (unsigned int i=0; i<8; i++)
|
||||
for (unsigned int i=0; i<8; i++)
|
||||
{
|
||||
if (control & 0x80)
|
||||
if (control & 0x80)
|
||||
{
|
||||
if (cmp_ofs < 2)
|
||||
if (cmp_ofs < 2)
|
||||
return 0; // Out of bounds.
|
||||
|
||||
cmp_ofs -= 2;
|
||||
@@ -65,17 +65,17 @@ int blz_uncompress_inplace(unsigned char *dataBuf, unsigned int compSize, const
|
||||
for (unsigned int j = 0; j < seg_size; j++)
|
||||
cmp_start[out_ofs + j] = cmp_start[out_ofs + j + seg_ofs];
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// Copy directly.
|
||||
if (cmp_ofs < 1)
|
||||
if (cmp_ofs < 1)
|
||||
return 0; //out of bounds
|
||||
|
||||
cmp_start[--out_ofs] = cmp_start[--cmp_ofs];
|
||||
}
|
||||
control <<= 1;
|
||||
if (out_ofs == 0) // Blz works backwards, so if it reaches byte 0, it's done.
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "elfload.h"
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef struct el_ctx
|
||||
// Section Header Str Table
|
||||
Elf_Shdr shstr;
|
||||
Elf_Shdr symtab;
|
||||
|
||||
|
||||
/* Offset of dynamic table (0 if not ET_DYN) */
|
||||
Elf_Off dynoff;
|
||||
/* Size of dynamic table (0 if not ET_DYN) */
|
||||
|
||||
@@ -3953,7 +3953,7 @@ FRESULT f_read_fast (
|
||||
else if (clst == 0xFFFFFFFF) { EFSPRINTF("DSKC"); ABORT(fs, FR_DISK_ERR); }
|
||||
|
||||
fp->clust = clst; /* Set working cluster */
|
||||
|
||||
|
||||
sector_base = clst2sect(fs, fp->clust);
|
||||
count += fs->csize;
|
||||
btr -= csize_bytes;
|
||||
@@ -4182,7 +4182,7 @@ FRESULT f_write_fast (
|
||||
else if (clst == 0xFFFFFFFF) { EFSPRINTF("DERR"); ABORT(fs, FR_DISK_ERR); }
|
||||
|
||||
fp->clust = clst; /* Set working cluster */
|
||||
|
||||
|
||||
sector_base = clst2sect(fs, fp->clust);
|
||||
count += fs->csize;
|
||||
btw -= csize_bytes;
|
||||
|
||||
@@ -67,7 +67,7 @@ void lv_init(void)
|
||||
/* Do nothing if already initialized */
|
||||
if (_lv_initialized)
|
||||
return;
|
||||
|
||||
|
||||
LV_GC_ROOT(_lv_def_scr) = NULL;
|
||||
LV_GC_ROOT(_lv_act_scr) = NULL;
|
||||
LV_GC_ROOT(_lv_top_layer) = NULL;
|
||||
@@ -1938,8 +1938,8 @@ static void delete_children(lv_obj_t * obj)
|
||||
lv_obj_t * i_next;
|
||||
i = lv_ll_get_head(&(obj->child_ll));
|
||||
|
||||
/*Remove from the group; remove before transversing children so that
|
||||
* the object still has access to all children during the
|
||||
/*Remove from the group; remove before transversing children so that
|
||||
* the object still has access to all children during the
|
||||
* LV_SIGNAL_DEFOCUS call*/
|
||||
#if USE_LV_GROUP
|
||||
if(obj->group_p != NULL) lv_group_remove_obj(obj);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
***********************************************************************************/
|
||||
|
||||
/*Store the glyph descriptions*/
|
||||
static const lv_font_glyph_dsc_t hekate_symbol_120_glyph_dsc[] =
|
||||
static const lv_font_glyph_dsc_t hekate_symbol_120_glyph_dsc[] =
|
||||
{
|
||||
#if USE_HEKATE_SYMBOL_120 == 8
|
||||
{.w_px = 103, .glyph_index = 0}, /*Unicode: U+f002 ()*/
|
||||
@@ -35,7 +35,7 @@ static const lv_font_glyph_dsc_t hekate_symbol_120_glyph_dsc[] =
|
||||
#endif
|
||||
};
|
||||
|
||||
lv_font_t hekate_symbol_120 =
|
||||
lv_font_t hekate_symbol_120 =
|
||||
{
|
||||
.unicode_first = LV_SYMBOL_GLYPH_FIRST, /*First Unicode letter in this font*/
|
||||
.unicode_last = LV_SYMBOL_GLYPH_LAST, /*Last Unicode letter in this font*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
***********************************************************************************/
|
||||
|
||||
/*Store the glyph descriptions*/
|
||||
static const lv_font_glyph_dsc_t hekate_symbol_20_glyph_dsc[] =
|
||||
static const lv_font_glyph_dsc_t hekate_symbol_20_glyph_dsc[] =
|
||||
{
|
||||
#if USE_HEKATE_SYMBOL_20 == 4
|
||||
{.w_px = 5, .glyph_index = 0}, /*Unicode: U+f001 ()*/
|
||||
@@ -133,7 +133,7 @@ static const lv_font_glyph_dsc_t hekate_symbol_20_glyph_dsc[] =
|
||||
#endif
|
||||
};
|
||||
|
||||
lv_font_t hekate_symbol_20 =
|
||||
lv_font_t hekate_symbol_20 =
|
||||
{
|
||||
.unicode_first = LV_SYMBOL_GLYPH_FIRST, /*First Unicode letter in this font*/
|
||||
.unicode_last = LV_SYMBOL_GLYPH_LAST, /*Last Unicode letter in this font*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
***********************************************************************************/
|
||||
|
||||
/*Store the glyph descriptions*/
|
||||
static const lv_font_glyph_dsc_t hekate_symbol_30_glyph_dsc[] =
|
||||
static const lv_font_glyph_dsc_t hekate_symbol_30_glyph_dsc[] =
|
||||
{
|
||||
#if USE_HEKATE_SYMBOL_30 == 4
|
||||
{.w_px = 7, .glyph_index = 0}, /*Unicode: U+f001 ()*/
|
||||
@@ -133,7 +133,7 @@ static const lv_font_glyph_dsc_t hekate_symbol_30_glyph_dsc[] =
|
||||
#endif
|
||||
};
|
||||
|
||||
lv_font_t hekate_symbol_30 =
|
||||
lv_font_t hekate_symbol_30 =
|
||||
{
|
||||
.unicode_first = LV_SYMBOL_GLYPH_FIRST, /*First Unicode letter in this font*/
|
||||
.unicode_last = LV_SYMBOL_GLYPH_LAST, /*Last Unicode letter in this font*/
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
***********************************************************************************/
|
||||
|
||||
/*Store the glyph descriptions*/
|
||||
static const lv_font_glyph_dsc_t interui_20_glyph_dsc[] =
|
||||
static const lv_font_glyph_dsc_t interui_20_glyph_dsc[] =
|
||||
{
|
||||
#if USE_INTERUI_20 == 4
|
||||
{.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/
|
||||
@@ -222,7 +222,7 @@ static const lv_font_glyph_dsc_t interui_20_glyph_dsc[] =
|
||||
#endif
|
||||
};
|
||||
|
||||
lv_font_t interui_20 =
|
||||
lv_font_t interui_20 =
|
||||
{
|
||||
.unicode_first = 32, /*First Unicode letter in this font*/
|
||||
.unicode_last = 126, /*Last Unicode letter in this font*/
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
***********************************************************************************/
|
||||
|
||||
/*Store the glyph descriptions*/
|
||||
static const lv_font_glyph_dsc_t interui_30_glyph_dsc[] =
|
||||
static const lv_font_glyph_dsc_t interui_30_glyph_dsc[] =
|
||||
{
|
||||
#if USE_INTERUI_30 == 4
|
||||
{.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/
|
||||
@@ -222,7 +222,7 @@ static const lv_font_glyph_dsc_t interui_30_glyph_dsc[] =
|
||||
#endif
|
||||
};
|
||||
|
||||
lv_font_t interui_30 =
|
||||
lv_font_t interui_30 =
|
||||
{
|
||||
.unicode_first = 32, /*First Unicode letter in this font*/
|
||||
.unicode_last = 126, /*Last Unicode letter in this font*/
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
***********************************************************************************/
|
||||
|
||||
/*Store the glyph descriptions*/
|
||||
static const lv_font_glyph_dsc_t ubuntu_mono_glyph_dsc[] =
|
||||
static const lv_font_glyph_dsc_t ubuntu_mono_glyph_dsc[] =
|
||||
{
|
||||
#if USE_UBUNTU_MONO == 4
|
||||
{.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/
|
||||
@@ -222,7 +222,7 @@ static const lv_font_glyph_dsc_t ubuntu_mono_glyph_dsc[] =
|
||||
#endif
|
||||
};
|
||||
|
||||
lv_font_t ubuntu_mono =
|
||||
lv_font_t ubuntu_mono =
|
||||
{
|
||||
.unicode_first = 32, /*First Unicode letter in this font*/
|
||||
.unicode_last = 126, /*Last Unicode letter in this font*/
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
#if (!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0
|
||||
LV_ROOTS
|
||||
LV_ROOTS
|
||||
#endif /* LV_ENABLE_GC */
|
||||
/**********************
|
||||
* MACROS
|
||||
|
||||
@@ -41,15 +41,14 @@ extern "C" {
|
||||
prefix void * _lv_task_act;\
|
||||
prefix void * _lv_indev_list;\
|
||||
prefix void * _lv_disp_list;\
|
||||
|
||||
|
||||
|
||||
#define LV_NO_PREFIX
|
||||
#define LV_ROOTS LV_GC_ROOTS(LV_NO_PREFIX)
|
||||
|
||||
#if LV_ENABLE_GC == 1
|
||||
# if LV_MEM_CUSTOM != 1
|
||||
# error "GC requires CUSTOM_MEM"
|
||||
# endif /* LV_MEM_CUSTOM */
|
||||
# endif /* LV_MEM_CUSTOM */
|
||||
#else /* LV_ENABLE_GC */
|
||||
# define LV_GC_ROOT(x) x
|
||||
LV_GC_ROOTS(extern)
|
||||
|
||||
@@ -189,9 +189,9 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
|
||||
} else { /*Check the actual length*/
|
||||
n_char_since_last_break++;
|
||||
letter_width = lv_font_get_width(font, letter);
|
||||
cur_w += letter_width;
|
||||
cur_w += letter_width;
|
||||
|
||||
/* Get the length of the current work and determine best place
|
||||
/* Get the length of the current work and determine best place
|
||||
* to break the line. */
|
||||
if(cur_w > max_width) {
|
||||
if( last_break != NO_BREAK_FOUND ) {
|
||||
@@ -231,7 +231,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
|
||||
}
|
||||
other = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
n_char_since_last_break++;
|
||||
lv_coord_t letter_width2 = lv_font_get_width(font, letter);
|
||||
cur_w += letter_width2;
|
||||
|
||||
@@ -801,7 +801,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask)
|
||||
lv_area_t label_area;
|
||||
lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar);
|
||||
label_area.y1 = calendar->coords.y1 + get_header_height(calendar) +
|
||||
ext->style_day_names->body.padding.ver + lv_font_get_height(ext->style_day_names->text.font) +
|
||||
ext->style_day_names->body.padding.ver + lv_font_get_height(ext->style_day_names->text.font) +
|
||||
ext->style_day_names->body.padding.ver;
|
||||
label_area.y2 = label_area.y1 + lv_font_get_height(style_bg->text.font);
|
||||
|
||||
|
||||
@@ -429,10 +429,10 @@ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2
|
||||
y1 = point2.y;
|
||||
|
||||
int dx = abs(x1-x0), sx = x0<x1 ? 1 : -1;
|
||||
int dy = abs(y1-y0), sy = y0<y1 ? 1 : -1;
|
||||
int dy = abs(y1-y0), sy = y0<y1 ? 1 : -1;
|
||||
int err = (dx>dy ? dx : -dy)/2, e2;
|
||||
|
||||
for(;;){
|
||||
|
||||
for(;;){
|
||||
lv_canvas_set_px(canvas, x0, y0, color);
|
||||
|
||||
if (x0==x1 && y0==y1) break;
|
||||
@@ -449,7 +449,7 @@ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2
|
||||
* @param color line color of the triangle
|
||||
*/
|
||||
void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t color)
|
||||
{
|
||||
{
|
||||
lv_canvas_draw_polygon(canvas, points, 3, color);
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t
|
||||
* @param color line color of the rectangle
|
||||
*/
|
||||
void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t color)
|
||||
{
|
||||
{
|
||||
lv_canvas_draw_polygon(canvas, points, 4, color);
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t colo
|
||||
* @param color line color of the polygon
|
||||
*/
|
||||
void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t color)
|
||||
{
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
for(i=0; i < (size - 1); i++) {
|
||||
@@ -512,7 +512,7 @@ void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size,
|
||||
* @param x x coordinate of the start position (seed)
|
||||
* @param y y coordinate of the start position (seed)
|
||||
* @param boundary_color edge/boundary color of the area
|
||||
* @param fill_color fill color of the area
|
||||
* @param fill_color fill color of the area
|
||||
*/
|
||||
void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t boundary_color, lv_color_t fill_color)
|
||||
{
|
||||
|
||||
@@ -202,7 +202,7 @@ void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size,
|
||||
* @param x x coordinate of the start position (seed)
|
||||
* @param y y coordinate of the start position (seed)
|
||||
* @param boundary_color edge/boundary color of the area
|
||||
* @param fill_color fill color of the area
|
||||
* @param fill_color fill color of the area
|
||||
*/
|
||||
void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t boundary_color, lv_color_t fill_color);
|
||||
|
||||
|
||||
@@ -606,7 +606,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig
|
||||
|
||||
/*Add a down symbol in ddlist when closed*/
|
||||
else
|
||||
{
|
||||
{
|
||||
/*Draw a arrow in ddlist if enabled*/
|
||||
if(ext->draw_arrow)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @file lv_ddlist.h
|
||||
*
|
||||
|
||||
@@ -101,7 +101,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
lv_list_ext_t * ext = lv_obj_allocate_ext_attr(new_list, sizeof(lv_list_ext_t));
|
||||
lv_mem_assert(ext);
|
||||
if(ext == NULL) return NULL;
|
||||
|
||||
|
||||
// Important!
|
||||
static lv_style_t img_btn_color;
|
||||
lv_style_copy( &img_btn_color, &lv_style_plain);
|
||||
@@ -116,7 +116,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
ext->anim_time = LV_LIST_FOCUS_TIME;
|
||||
ext->single_mode = false;
|
||||
ext->size = 0;
|
||||
|
||||
|
||||
#if USE_LV_GROUP
|
||||
ext->last_sel = NULL;
|
||||
ext->selected_btn = NULL;
|
||||
|
||||
@@ -121,14 +121,14 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index);
|
||||
/*=====================
|
||||
* Setter functions
|
||||
*====================*/
|
||||
|
||||
|
||||
/**
|
||||
* Set single button selected mode, only one button will be selected if enabled.
|
||||
* @param list pointer to the currently pressed list object
|
||||
* @param mode, enable(true)/disable(false) single selected mode.
|
||||
*/
|
||||
void lv_list_set_single_mode(lv_obj_t *list, bool mode);
|
||||
|
||||
|
||||
#if USE_LV_GROUP
|
||||
|
||||
/**
|
||||
@@ -193,7 +193,7 @@ void lv_list_set_style(lv_obj_t *list, lv_list_style_t type, lv_style_t *style);
|
||||
* @param list pointer to the currently pressed list object.
|
||||
*/
|
||||
bool lv_list_get_single_mode(lv_obj_t *list);
|
||||
|
||||
|
||||
/**
|
||||
* Get the text of a list element
|
||||
* @param btn pointer to list element
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @file lv_page.h
|
||||
*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @file lv_win.c
|
||||
*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*@file lv_themes.h
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user