Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11818 - rework ppmviewer to fit our shiny new imageviewer framework

Attached to Project: Rockbox
Opened by Marcin Bukat (MarcinBukat) - Monday, 20 December 2010, 15:23 GMT+2
Last edited by Marcin Bukat (MarcinBukat) - Sunday, 09 January 2011, 14:27 GMT+2
Task Type Bugs
Category Battery/Charging
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch moves ppm decoder to imageviewer.
   imageviewer_ppm.patch (28.7 KiB)
 b/apps/plugins/CATEGORIES                    |    2 
 b/apps/plugins/SOURCES                       |    1 
 b/apps/plugins/imageviewer/SUBDIRS           |    3 
 b/apps/plugins/imageviewer/image_decoder.c   |    2 
 b/apps/plugins/imageviewer/image_decoder.h   |    1 
 b/apps/plugins/imageviewer/ppm/SOURCES       |    2 
 b/apps/plugins/imageviewer/ppm/ppm.c         |  224 +++++++++++++++++
 b/apps/plugins/imageviewer/ppm/ppm.make      |   29 ++
 b/apps/plugins/imageviewer/ppm/ppm_decoder.c |  250 +++++++++++++++++++
 b/apps/plugins/imageviewer/ppm/ppm_decoder.h |   24 +
 a/apps/plugins/ppmviewer.c                   |  355 ---------------------------
 b/apps/plugins/viewers.config                |    3 
 12 files changed, 539 insertions(+), 357 deletions(-)

This task depends upon

Closed by  Marcin Bukat (MarcinBukat)
Sunday, 09 January 2011, 14:27 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  r29012
Comment by Teruaki Kawashima (teru) - Tuesday, 21 December 2010, 15:35 GMT+2
- values added to image_decoder.[ch] need to be surrounded by #if.
- return value of read_ppm isn't checked in load_image in ppm.c
- header of ppm.c contains unrelated comments.
- apps/plugins/CATEGORIES seems to be sorted by plugin name, it would be better to follow the convention.
Comment by Marcin Bukat (MarcinBukat) - Tuesday, 21 December 2010, 21:12 GMT+2
Thanks teru for review. Please take a look at this fixed version.
   imageviewer_ppm_v2.patch (29.3 KiB)
 b/apps/plugins/CATEGORIES                    |    2 
 b/apps/plugins/SOURCES                       |    1 
 b/apps/plugins/imageviewer/SUBDIRS           |    3 
 b/apps/plugins/imageviewer/image_decoder.c   |    6 
 b/apps/plugins/imageviewer/image_decoder.h   |    3 
 b/apps/plugins/imageviewer/ppm/SOURCES       |    2 
 b/apps/plugins/imageviewer/ppm/ppm.c         |  224 +++++++++++++++++
 b/apps/plugins/imageviewer/ppm/ppm.make      |   29 ++
 b/apps/plugins/imageviewer/ppm/ppm_decoder.c |  250 +++++++++++++++++++
 b/apps/plugins/imageviewer/ppm/ppm_decoder.h |   44 +++
 a/apps/plugins/ppmviewer.c                   |  355 ---------------------------
 b/apps/plugins/viewers.config                |    3 
 12 files changed, 565 insertions(+), 357 deletions(-)

Comment by Teruaki Kawashima (teru) - Wednesday, 22 December 2010, 10:14 GMT+2
- file descriptor is not closed.
- i get a warning when compiling.
/home/teru/rockbox/original/apps/plugins/imageviewer/ppm/ppm.c: In function ‘load_image’:
/home/teru/rockbox/original/apps/plugins/imageviewer/ppm/ppm.c:81: warning: ‘rc’ may be used uninitialize
read_ppm shouldn't be in if (!iv->running_slideshow).
- remove ppmviewer from viewers.config.

it looks fine otherwise.
Comment by Marcin Bukat (MarcinBukat) - Wednesday, 22 December 2010, 13:40 GMT+2
new version
   imageviewer_ppm_v3.patch (29.8 KiB)
 b/apps/plugins/CATEGORIES                    |    2 
 b/apps/plugins/SOURCES                       |    1 
 b/apps/plugins/imageviewer/SUBDIRS           |    3 
 b/apps/plugins/imageviewer/image_decoder.c   |    6 
 b/apps/plugins/imageviewer/image_decoder.h   |    3 
 b/apps/plugins/imageviewer/ppm/SOURCES       |    2 
 b/apps/plugins/imageviewer/ppm/ppm.c         |  227 +++++++++++++++++
 b/apps/plugins/imageviewer/ppm/ppm.make      |   29 ++
 b/apps/plugins/imageviewer/ppm/ppm_decoder.c |  250 +++++++++++++++++++
 b/apps/plugins/imageviewer/ppm/ppm_decoder.h |   44 +++
 a/apps/plugins/ppmviewer.c                   |  355 ---------------------------
 b/apps/plugins/viewers.config                |    4 
 12 files changed, 568 insertions(+), 358 deletions(-)

Loading...