diff options
| author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-16 10:34:40 +0000 |
|---|---|---|
| committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-16 10:34:40 +0000 |
| commit | 23d9812273d9c74af72ccdc3aa4cfea971f220a4 (patch) | |
| tree | 8e60c3a2a41879f8b2a52516fa416b3ab906e239 /apps/plugins/text_editor.c | |
| parent | 35677cbc54bbe400ebbff59b489dda7ca7f04916 (diff) | |
| download | rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.zip rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.gz rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.bz2 rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.xz | |
loader-initialized global plugin API:
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by
__header.api
the loader uses this pointer to initialize rb before calling entry_point
entry_point is no longer passed a pointer to the plugin API
all plugins, and pluginlib functions, are modified to refer to the
global rb
pluginlib functions which only served to copy the API pointer are
removed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/text_editor.c')
| -rw-r--r-- | apps/plugins/text_editor.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index abb2787..f03cdcf 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c @@ -28,7 +28,6 @@ #endif #define MAX_LINE_LEN 2048 PLUGIN_HEADER -static const struct plugin_api* rb; static char buffer[MAX_CHARS]; static char eol[3]; @@ -264,7 +263,7 @@ int do_item_menu(int cur_sel, char* copy_buffer) ret = MENU_RET_SAVE; break; case 6: /* playback menu */ - playback_control(rb, NULL); + playback_control(NULL); ret = MENU_RET_UPDATE; break; default: @@ -308,7 +307,7 @@ int hex_to_rgb(const char* hex, int* color) #endif /* HAVE_LCD_COLOR */ /* this is the plugin entry point */ -enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) +enum plugin_status plugin_start(const void* parameter) { int fd; static char temp_line[MAX_LINE_LEN]; @@ -324,8 +323,6 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame bool edit_colors_file = false; #endif - rb = api; - copy_buffer[0]='\0'; prev_show_statusbar = rb->global_settings->statusbar; rb->global_settings->statusbar = false; @@ -481,7 +478,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame case 0: break; case 1: - playback_control(rb, NULL); + playback_control(NULL); break; case 2: //save to disk save_changes(1); |