diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2010-01-21 12:06:02 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2010-01-21 12:06:02 +0000 |
commit | ccf8e4e8bae0e1371f68cdce3e420f05bfd19853 (patch) | |
tree | 35239a0d40ea9c67b79db16eb3b5c8c475ddaf46 /apps/plugins | |
parent | 3e89296d6a3ecbcd430d3569fdc28a355ac36a0d (diff) | |
download | rockbox-ccf8e4e8bae0e1371f68cdce3e420f05bfd19853.tar.gz rockbox-ccf8e4e8bae0e1371f68cdce3e420f05bfd19853.zip |
jpeg,png: fix typo in comments and indentions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24307 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/imageviewer/imageviewer.c | 6 | ||||
-rw-r--r-- | apps/plugins/imageviewer/imageviewer.h | 4 | ||||
-rw-r--r-- | apps/plugins/imageviewer/png/png.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index 1b39c5a9e3..c35c1f26be 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c | |||
@@ -39,7 +39,7 @@ GREY_INFO_STRUCT | |||
39 | /******************************* Globals ***********************************/ | 39 | /******************************* Globals ***********************************/ |
40 | 40 | ||
41 | bool slideshow_enabled = false; /* run slideshow */ | 41 | bool slideshow_enabled = false; /* run slideshow */ |
42 | bool running_slideshow = false; /* loading image because of slideshw */ | 42 | bool running_slideshow = false; /* loading image because of slideshow */ |
43 | #ifdef DISK_SPINDOWN | 43 | #ifdef DISK_SPINDOWN |
44 | bool immediate_ata_off = false; /* power down disk after loading */ | 44 | bool immediate_ata_off = false; /* power down disk after loading */ |
45 | #endif | 45 | #endif |
@@ -120,7 +120,7 @@ static char **file_pt; | |||
120 | 120 | ||
121 | /************************* Implementation ***************************/ | 121 | /************************* Implementation ***************************/ |
122 | 122 | ||
123 | /*Read directory contents for scrolling. */ | 123 | /* Read directory contents for scrolling. */ |
124 | static void get_pic_list(void) | 124 | static void get_pic_list(void) |
125 | { | 125 | { |
126 | int i; | 126 | int i; |
@@ -295,7 +295,7 @@ static int show_menu(void) /* return 1 to quit */ | |||
295 | case MIID_RETURN: | 295 | case MIID_RETURN: |
296 | break; | 296 | break; |
297 | case MIID_TOGGLE_SS_MODE: | 297 | case MIID_TOGGLE_SS_MODE: |
298 | rb->set_option("Toggle Slideshow", &slideshow_enabled, INT, | 298 | rb->set_option("Toggle Slideshow", &slideshow_enabled, BOOL, |
299 | slideshow , 2, NULL); | 299 | slideshow , 2, NULL); |
300 | break; | 300 | break; |
301 | case MIID_CHANGE_SS_MODE: | 301 | case MIID_CHANGE_SS_MODE: |
diff --git a/apps/plugins/imageviewer/imageviewer.h b/apps/plugins/imageviewer/imageviewer.h index 3851e1f2a2..4ced196e59 100644 --- a/apps/plugins/imageviewer/imageviewer.h +++ b/apps/plugins/imageviewer/imageviewer.h | |||
@@ -394,12 +394,12 @@ extern bool immediate_ata_off; | |||
394 | extern bool plug_buf; | 394 | extern bool plug_buf; |
395 | #endif | 395 | #endif |
396 | 396 | ||
397 | /* functions needed to be implemented in each image decoders. */ | 397 | /* functions need to be implemented in each image decoders. */ |
398 | /* return true if ext is supported by the decoder. */ | 398 | /* return true if ext is supported by the decoder. */ |
399 | extern bool img_ext(const char *ext); | 399 | extern bool img_ext(const char *ext); |
400 | /* return needed size of buffer to store downscaled image by ds */ | 400 | /* return needed size of buffer to store downscaled image by ds */ |
401 | extern int img_mem(int ds); | 401 | extern int img_mem(int ds); |
402 | /* load image from filename. set width and height of info properly. alos, set | 402 | /* load image from filename. set width and height of info properly. also, set |
403 | * buf_size to remaining size of buf after load image. it is used to caluclate | 403 | * buf_size to remaining size of buf after load image. it is used to caluclate |
404 | * min downscale. */ | 404 | * min downscale. */ |
405 | extern int load_image(char *filename, struct image_info *info, | 405 | extern int load_image(char *filename, struct image_info *info, |
diff --git a/apps/plugins/imageviewer/png/png.c b/apps/plugins/imageviewer/png/png.c index 5cf6f4d471..d04b0850f4 100644 --- a/apps/plugins/imageviewer/png/png.c +++ b/apps/plugins/imageviewer/png/png.c | |||
@@ -146,7 +146,7 @@ static fb_data *disp_buf; | |||
146 | /* my memory pool (from the mp3 buffer) */ | 146 | /* my memory pool (from the mp3 buffer) */ |
147 | static char print[128]; /* use a common snprintf() buffer */ | 147 | static char print[128]; /* use a common snprintf() buffer */ |
148 | 148 | ||
149 | unsigned char *memory, *memory_max; | 149 | unsigned char *memory, *memory_max; /* inffast.c needs memory_max */ |
150 | static size_t memory_size; | 150 | static size_t memory_size; |
151 | 151 | ||
152 | static unsigned char *image; /* where we put the content of the file */ | 152 | 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 | |||
1053 | /*provide some proper output values if error will happen*/ | 1053 | /*provide some proper output values if error will happen*/ |
1054 | decoded_image_size = 0; | 1054 | decoded_image_size = 0; |
1055 | 1055 | ||
1056 | if (size == 0 || in == 0) { decoder->error = 48; return; } /*the given data is empty*/ | 1056 | if (size == 0 || in == 0) { decoder->error = 48; return; } /*the given data is empty*/ |
1057 | 1057 | ||
1058 | LodePNG_inspect(decoder, in, size); /*reads header and resets other parameters in decoder->infoPng*/ | 1058 | LodePNG_inspect(decoder, in, size); /*reads header and resets other parameters in decoder->infoPng*/ |
1059 | if (decoder->error) return; | 1059 | if (decoder->error) return; |
@@ -1216,7 +1216,7 @@ void LodePNG_decode(LodePNG_Decoder* decoder, unsigned char* in, size_t insize, | |||
1216 | if (decoder->error) return; | 1216 | if (decoder->error) return; |
1217 | 1217 | ||
1218 | /*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"*/ | 1218 | /*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"*/ |
1219 | if (!(decoder->infoRaw.color.colorType == 2 || decoder->infoRaw.color.colorType == 6) && !(decoder->infoRaw.color.bitDepth == 8)) { decoder->error = 56; return; } | 1219 | if (!(decoder->infoRaw.color.colorType == 2 || decoder->infoRaw.color.colorType == 6) && !(decoder->infoRaw.color.bitDepth == 8)) { decoder->error = 56; return; } |
1220 | converted_image = (fb_data *)((intptr_t)(memory + 3) & ~3); | 1220 | converted_image = (fb_data *)((intptr_t)(memory + 3) & ~3); |
1221 | converted_image_size = decoder->infoPng.width*decoder->infoPng.height; | 1221 | converted_image_size = decoder->infoPng.width*decoder->infoPng.height; |
1222 | if ((unsigned char *)(converted_image + converted_image_size) >= decoded_image) { decoder->error = OUT_OF_MEMORY; } | 1222 | if ((unsigned char *)(converted_image + converted_image_size) >= decoded_image) { decoder->error = OUT_OF_MEMORY; } |