From 07d03729ff537eca8429cea27c1f2d15f04ec54f Mon Sep 17 00:00:00 2001 From: Yoshihisa Uchida Date: Tue, 29 Jun 2010 11:05:36 +0000 Subject: text_viewer: callback functions are changed to the function that returns int value. And the text viewer quits when the problem occurs by callback functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27172 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/text_viewer/tv_bookmark.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'apps/plugins/text_viewer/tv_bookmark.c') diff --git a/apps/plugins/text_viewer/tv_bookmark.c b/apps/plugins/text_viewer/tv_bookmark.c index d569ed8d11..7e38d766ec 100644 --- a/apps/plugins/text_viewer/tv_bookmark.c +++ b/apps/plugins/text_viewer/tv_bookmark.c @@ -98,15 +98,16 @@ static int tv_find_bookmark(const struct tv_screen_pos *pos) return -1; } -static void tv_change_preferences(const struct tv_preferences *oldp) +static int tv_change_preferences(const struct tv_preferences *oldp) { int i; - if (oldp == NULL) - return; - - for (i = 0; i < bookmark_count; i++) - tv_convert_fpos(bookmarks[i].pos.file_pos, &bookmarks[i].pos); + if (oldp) + { + for (i = 0; i < bookmark_count; i++) + tv_convert_fpos(bookmarks[i].pos.file_pos, &bookmarks[i].pos); + } + return TV_CALLBACK_OK; } void tv_init_bookmark(void) -- cgit v1.2.3