Commit graph

10 commits

Author SHA1 Message Date
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Thomas Jarosch
2caf8870af text_viewer plugin: Fix two out-of-bounds buffer accesses
Test code:
--------------
int main(void)
{
    static unsigned short extra_spaces[] = { 0, 0x3000 };
    return sizeof(extra_spaces);
}
--------------

-> returns four instead of two.

cppcheck reported:
[rockbox/apps/plugins/text_viewer/tv_text_processor.c:180]: (error) Array 'break_chars[27]' acces
sed at index 53, which is out of bounds.
[rockbox/apps/plugins/text_viewer/tv_text_processor.c:195]: (error) Array 'extra_spaces[2]' acces
sed at index 3, which is out of bounds.

Change-Id: I66c305cc5c99e59e7c8e0aa9c86cecbe293ff037
2014-12-20 12:55:20 +01:00
Jonathan Gordon
aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +00:00
Yoshihisa Uchida
ac622c6d67 text viewer: reworks screen access logics and some bugs fix.
- screen access logics separte from tv_window. (new tv_display.[ch])
- using multi screen api.
- (bug fix) the head of the each line is not normally displayed when the alignment is RIGHT.
- (bug fix) unnecessary blank line is not displayed. (a part of FS#11400).
- (bug fix) the order by which callback functions were called was not correct. (FIFO->FILO)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27138 a1c6a512-1295-4272-9138-f99709370657
2010-06-26 09:14:53 +00:00
Yoshihisa Uchida
7e37fa926d text_viewer: rename preference values.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27106 a1c6a512-1295-4272-9138-f99709370657
2010-06-24 12:58:46 +00:00
Rafaël Carré
59fd2b24bd FS#11399 by me: fix r26998 for text_viewer
Restore the old behaviour:

- preferences must be read-write for tv_preferences.c , read-only for
  all other modules -> use pointer to const struct
- init functions must get the plugin buffer + its size as arguments for
  easily adding new functions -> use pointer to buffer pointer and size
  to make allocation easier
- preferences meaning is private to each file and must not be known by
  tv_preferences.c -> move tv_check_header_and_footer() back in
  tv_window.c; also avoid chaining 3 times the callbacks by calling
  tv_set_preferences() only once if more than one preference needs
  changing

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27089 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 13:56:08 +00:00
Rafaël Carré
298316d192 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
2010-06-20 21:53:47 +00:00
Yoshihisa Uchida
a784938b78 text viewer: can select the indent spaces when the line mode is reflow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26763 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 11:13:02 +00:00
Yoshihisa Uchida
1445c3b8c5 text viewer: can be selected the number of screens per page.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26613 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 08:44:27 +00:00
Yoshihisa Uchida
fdba840450 reworks text viewer plugin. (FS#11209)
new text viewer plugin: text_viewer.rock.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26571 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 10:30:08 +00:00