text_viewer: cleanup & bugfix
commit045d4d053effcec3f84ddd80fb86784fc75d1739
authorfunman <funman@a1c6a512-1295-4272-9138-f99709370657>
Sun, 20 Jun 2010 21:53:47 +0000 (20 21:53 +0000)
committerfunman <funman@a1c6a512-1295-4272-9138-f99709370657>
Sun, 20 Jun 2010 21:53:47 +0000 (20 21:53 +0000)
tree0426e9c8cecac7532a88888e78e5e54ea9bb6145
parenta0777d3727bee6f15cb93739b220b26bd0ed5343
text_viewer: cleanup & bugfix

cleanup:
    - don't use enum in struct / return values
    - don't use a getter for preferences but a global pointer
    - explicitely make enums start at 0
    - use static tables for header/footer settings
    - remove unneeded memset before strlcpy
    - use static buffer allocation, not dynamic
    - check header/footer preferences before using the callbacks
    - don't include font filename in archos player preferences (break
      file format)

bugfix:
    - statically allocate old preferences in tv_set_preferences()

Sometimes I can read a file on Clipv2, but it still aborts quite often
refs: FS#11399

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26998 a1c6a512-1295-4272-9138-f99709370657
19 files changed:
apps/plugins/text_viewer/text_viewer.c
apps/plugins/text_viewer/tv_action.c
apps/plugins/text_viewer/tv_action.h
apps/plugins/text_viewer/tv_bookmark.c
apps/plugins/text_viewer/tv_menu.c
apps/plugins/text_viewer/tv_menu.h
apps/plugins/text_viewer/tv_pager.c
apps/plugins/text_viewer/tv_pager.h
apps/plugins/text_viewer/tv_preferences.c
apps/plugins/text_viewer/tv_preferences.h
apps/plugins/text_viewer/tv_reader.c
apps/plugins/text_viewer/tv_reader.h
apps/plugins/text_viewer/tv_settings.c
apps/plugins/text_viewer/tv_text_processor.c
apps/plugins/text_viewer/tv_text_processor.h
apps/plugins/text_viewer/tv_text_reader.c
apps/plugins/text_viewer/tv_text_reader.h
apps/plugins/text_viewer/tv_window.c
apps/plugins/text_viewer/tv_window.h