diff options
author | Yoshihisa Uchida <uchida@rockbox.org> | 2010-07-02 12:16:47 +0000 |
---|---|---|
committer | Yoshihisa Uchida <uchida@rockbox.org> | 2010-07-02 12:16:47 +0000 |
commit | 2cdf332f01bf3a9904f8322596bb81740ea3fe6b (patch) | |
tree | 25f1f2826798ed0812000a86256a8c35a9782355 /apps/plugins/text_viewer/text_viewer.c | |
parent | 0fef85e9dbdc31c593ffda7b3d4f8062eec503f2 (diff) | |
download | rockbox-2cdf332f01bf3a9904f8322596bb81740ea3fe6b.tar.gz rockbox-2cdf332f01bf3a9904f8322596bb81740ea3fe6b.zip |
text viewer: for tv_action and tv_bookmark, the prototype of the initializer is the same arguments as other modules.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27243 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/text_viewer/text_viewer.c')
-rw-r--r-- | apps/plugins/text_viewer/text_viewer.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c index e5f3160bb6..ca5cf70d36 100644 --- a/apps/plugins/text_viewer/text_viewer.c +++ b/apps/plugins/text_viewer/text_viewer.c | |||
@@ -35,13 +35,23 @@ enum plugin_status plugin_start(const void* file) | |||
35 | long old_tick; | 35 | long old_tick; |
36 | bool done = false; | 36 | bool done = false; |
37 | bool display_update = true; | 37 | bool display_update = true; |
38 | size_t size; | ||
39 | unsigned char *plugin_buf; | ||
38 | 40 | ||
39 | old_tick = *rb->current_tick; | 41 | old_tick = *rb->current_tick; |
40 | 42 | ||
41 | if (!file) | 43 | if (!file) |
42 | return PLUGIN_ERROR; | 44 | return PLUGIN_ERROR; |
43 | 45 | ||
44 | if (!tv_init(file)) { | 46 | /* get the plugin buffer */ |
47 | plugin_buf = rb->plugin_get_buffer(&size); | ||
48 | |||
49 | if (!tv_init_action(&plugin_buf, &size)) { | ||
50 | rb->splash(HZ, "Error initialize"); | ||
51 | return PLUGIN_ERROR; | ||
52 | } | ||
53 | |||
54 | if (!tv_load_file(file)) { | ||
45 | rb->splash(HZ, "Error opening file"); | 55 | rb->splash(HZ, "Error opening file"); |
46 | return PLUGIN_ERROR; | 56 | return PLUGIN_ERROR; |
47 | } | 57 | } |