1
0
Fork 0
forked from len0rd/rockbox

jpeg,png: fix typo in comments and indentions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24307 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2010-01-21 12:06:02 +00:00
parent 3e89296d6a
commit ccf8e4e8ba
3 changed files with 8 additions and 8 deletions

View file

@ -39,7 +39,7 @@ GREY_INFO_STRUCT
/******************************* Globals ***********************************/ /******************************* Globals ***********************************/
bool slideshow_enabled = false; /* run slideshow */ bool slideshow_enabled = false; /* run slideshow */
bool running_slideshow = false; /* loading image because of slideshw */ bool running_slideshow = false; /* loading image because of slideshow */
#ifdef DISK_SPINDOWN #ifdef DISK_SPINDOWN
bool immediate_ata_off = false; /* power down disk after loading */ bool immediate_ata_off = false; /* power down disk after loading */
#endif #endif
@ -120,7 +120,7 @@ static char **file_pt;
/************************* Implementation ***************************/ /************************* Implementation ***************************/
/*Read directory contents for scrolling. */ /* Read directory contents for scrolling. */
static void get_pic_list(void) static void get_pic_list(void)
{ {
int i; int i;
@ -295,7 +295,7 @@ static int show_menu(void) /* return 1 to quit */
case MIID_RETURN: case MIID_RETURN:
break; break;
case MIID_TOGGLE_SS_MODE: case MIID_TOGGLE_SS_MODE:
rb->set_option("Toggle Slideshow", &slideshow_enabled, INT, rb->set_option("Toggle Slideshow", &slideshow_enabled, BOOL,
slideshow , 2, NULL); slideshow , 2, NULL);
break; break;
case MIID_CHANGE_SS_MODE: case MIID_CHANGE_SS_MODE:

View file

@ -394,12 +394,12 @@ extern bool immediate_ata_off;
extern bool plug_buf; extern bool plug_buf;
#endif #endif
/* functions needed to be implemented in each image decoders. */ /* functions need to be implemented in each image decoders. */
/* return true if ext is supported by the decoder. */ /* return true if ext is supported by the decoder. */
extern bool img_ext(const char *ext); extern bool img_ext(const char *ext);
/* return needed size of buffer to store downscaled image by ds */ /* return needed size of buffer to store downscaled image by ds */
extern int img_mem(int ds); extern int img_mem(int ds);
/* load image from filename. set width and height of info properly. alos, set /* load image from filename. set width and height of info properly. also, set
* buf_size to remaining size of buf after load image. it is used to caluclate * buf_size to remaining size of buf after load image. it is used to caluclate
* min downscale. */ * min downscale. */
extern int load_image(char *filename, struct image_info *info, extern int load_image(char *filename, struct image_info *info,

View file

@ -146,7 +146,7 @@ static fb_data *disp_buf;
/* my memory pool (from the mp3 buffer) */ /* my memory pool (from the mp3 buffer) */
static char print[128]; /* use a common snprintf() buffer */ static char print[128]; /* use a common snprintf() buffer */
unsigned char *memory, *memory_max; unsigned char *memory, *memory_max; /* inffast.c needs memory_max */
static size_t memory_size; static size_t memory_size;
static unsigned char *image; /* where we put the content of the file */ static unsigned char *image; /* where we put the content of the file */
@ -1053,7 +1053,7 @@ static void decodeGeneric(LodePNG_Decoder* decoder, unsigned char* in, size_t si
/*provide some proper output values if error will happen*/ /*provide some proper output values if error will happen*/
decoded_image_size = 0; decoded_image_size = 0;
if (size == 0 || in == 0) { decoder->error = 48; return; } /*the given data is empty*/ if (size == 0 || in == 0) { decoder->error = 48; return; } /*the given data is empty*/
LodePNG_inspect(decoder, in, size); /*reads header and resets other parameters in decoder->infoPng*/ LodePNG_inspect(decoder, in, size); /*reads header and resets other parameters in decoder->infoPng*/
if (decoder->error) return; if (decoder->error) return;
@ -1216,7 +1216,7 @@ void LodePNG_decode(LodePNG_Decoder* decoder, unsigned char* in, size_t insize,
if (decoder->error) return; if (decoder->error) return;
/*TODO: check if this works according to the statement in the documentation: "The converter can convert from greyscale input color type, to 8-bit greyscale or greyscale with alpha"*/ /*TODO: check if this works according to the statement in the documentation: "The converter can convert from greyscale input color type, to 8-bit greyscale or greyscale with alpha"*/
if (!(decoder->infoRaw.color.colorType == 2 || decoder->infoRaw.color.colorType == 6) && !(decoder->infoRaw.color.bitDepth == 8)) { decoder->error = 56; return; } if (!(decoder->infoRaw.color.colorType == 2 || decoder->infoRaw.color.colorType == 6) && !(decoder->infoRaw.color.bitDepth == 8)) { decoder->error = 56; return; }
converted_image = (fb_data *)((intptr_t)(memory + 3) & ~3); converted_image = (fb_data *)((intptr_t)(memory + 3) & ~3);
converted_image_size = decoder->infoPng.width*decoder->infoPng.height; converted_image_size = decoder->infoPng.width*decoder->infoPng.height;
if ((unsigned char *)(converted_image + converted_image_size) >= decoded_image) { decoder->error = OUT_OF_MEMORY; } if ((unsigned char *)(converted_image + converted_image_size) >= decoded_image) { decoder->error = OUT_OF_MEMORY; }