From 59fd2b24bd7ad8ff0c18f66ffbf83f7ceefa9d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 23 Jun 2010 13:56:08 +0000 Subject: 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 --- apps/plugins/text_viewer/tv_text_processor.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/plugins/text_viewer/tv_text_processor.c') diff --git a/apps/plugins/text_viewer/tv_text_processor.c b/apps/plugins/text_viewer/tv_text_processor.c index f9a2fad..3ad388e 100644 --- a/apps/plugins/text_viewer/tv_text_processor.c +++ b/apps/plugins/text_viewer/tv_text_processor.c @@ -544,11 +544,16 @@ int tv_create_formed_text(const unsigned char *src, ssize_t bufsize, return size; } -void tv_init_text_processor(void) +bool tv_init_text_processor(unsigned char **buf, size_t *size) { + /* unused : no need for dynamic buffer yet */ + (void)buf; + (void)size; + text_type = TV_TEXT_UNKNOWN; expand_extra_line = false; is_break_line = false; + return true; } void tv_set_creation_conditions(int blocks, int width) -- cgit v1.1