summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2008-05-04 13:21:07 +0000
committerBertrik Sikken <bertrik@sikken.nl>2008-05-04 13:21:07 +0000
commita36c8f1db3b1fbb2ce2dbb834032c4e84f30add7 (patch)
tree65d3214e15daa1efb5782e075b9841848539b334 /apps/plugins
parent517aca8532af3121d9c75ff293c5269f20c0b540 (diff)
downloadrockbox-a36c8f1db3b1fbb2ce2dbb834032c4e84f30add7.zip
rockbox-a36c8f1db3b1fbb2ce2dbb834032c4e84f30add7.tar.gz
rockbox-a36c8f1db3b1fbb2ce2dbb834032c4e84f30add7.tar.bz2
rockbox-a36c8f1db3b1fbb2ce2dbb834032c4e84f30add7.tar.xz
pluginlib: made local functions in static and made sure that source files include their own header file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17353 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lib/checkbox.c1
-rw-r--r--apps/plugins/lib/configfile.c2
-rw-r--r--apps/plugins/lib/fixedpoint.c1
-rw-r--r--apps/plugins/lib/helper.c1
-rw-r--r--apps/plugins/lib/overlay.c1
-rw-r--r--apps/plugins/lib/playback_control.c9
-rw-r--r--apps/plugins/lib/playback_control.h3
-rw-r--r--apps/plugins/lib/pluginlib_actions.c2
-rw-r--r--apps/plugins/lib/xlcd_draw.c22
9 files changed, 23 insertions, 19 deletions
diff --git a/apps/plugins/lib/checkbox.c b/apps/plugins/lib/checkbox.c
index ba3decd..5acc52a 100644
--- a/apps/plugins/lib/checkbox.c
+++ b/apps/plugins/lib/checkbox.c
@@ -18,6 +18,7 @@
****************************************************************************/
#include "plugin.h"
+#include "checkbox.h"
#ifdef HAVE_LCD_BITMAP
diff --git a/apps/plugins/lib/configfile.c b/apps/plugins/lib/configfile.c
index 7c7d56e..b0d134f 100644
--- a/apps/plugins/lib/configfile.c
+++ b/apps/plugins/lib/configfile.c
@@ -26,7 +26,7 @@ void configfile_init(struct plugin_api* newrb)
cfg_rb = newrb;
}
-void get_cfg_filename(char* buf, int buf_len, const char* filename)
+static void get_cfg_filename(char* buf, int buf_len, const char* filename)
{
char *s;
cfg_rb->strcpy(buf, cfg_rb->plugin_get_current_filename());
diff --git a/apps/plugins/lib/fixedpoint.c b/apps/plugins/lib/fixedpoint.c
index 88c2f6e..92979da 100644
--- a/apps/plugins/lib/fixedpoint.c
+++ b/apps/plugins/lib/fixedpoint.c
@@ -20,6 +20,7 @@
****************************************************************************/
#include <inttypes.h>
+#include "fixedpoint.h"
/* Inverse gain of circular cordic rotation in s0.31 format. */
static const long cordic_circular_gain = 0xb2458939; /* 0.607252929 */
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index 2feff14..3af60b5 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -18,6 +18,7 @@
****************************************************************************/
#include "plugin.h"
+#include "helper.h"
/* Force the backlight on */
void backlight_force_on(struct plugin_api* rb)
diff --git a/apps/plugins/lib/overlay.c b/apps/plugins/lib/overlay.c
index 6abde85..53cc4a8 100644
--- a/apps/plugins/lib/overlay.c
+++ b/apps/plugins/lib/overlay.c
@@ -21,6 +21,7 @@
#ifndef SIMULATOR
#include "plugin.h"
+#include "overlay.h"
/* load and run a plugin linked as an overlay.
diff --git a/apps/plugins/lib/playback_control.c b/apps/plugins/lib/playback_control.c
index af4384e..7e74728 100644
--- a/apps/plugins/lib/playback_control.c
+++ b/apps/plugins/lib/playback_control.c
@@ -18,17 +18,18 @@
****************************************************************************/
#include "plugin.h"
+#include "playback_control.h"
struct plugin_api* api = 0;
struct viewport *parentvp = NULL;
-bool prevtrack(void)
+static bool prevtrack(void)
{
api->audio_prev();
return false;
}
-bool play(void)
+static bool play(void)
{
int audio_status = api->audio_status();
if (!audio_status && api->global_status->resume_index != -1)
@@ -46,13 +47,13 @@ bool play(void)
return false;
}
-bool stop(void)
+static bool stop(void)
{
api->audio_stop();
return false;
}
-bool nexttrack(void)
+static bool nexttrack(void)
{
api->audio_next();
return false;
diff --git a/apps/plugins/lib/playback_control.h b/apps/plugins/lib/playback_control.h
index 49e789b..a3a0d7a 100644
--- a/apps/plugins/lib/playback_control.h
+++ b/apps/plugins/lib/playback_control.h
@@ -20,12 +20,11 @@
#define __PLAYBACK_CONTROL_H__
/* Use these if your menu uses the new menu api.
- REMEBER to call playback_control_init(rb) before rb->do_menu()...
+ REMEMBER to call playback_control_init(rb) before rb->do_menu()...
The parent viewport here is needed by the internal functions,
So, make sure you use the same viewport for the rb->do_menu() call
that you use in the playback_control_init() call
*/
-extern const struct menu_item_ex playback_control_menu;
void playback_control_init(struct plugin_api* newapi,
struct viewport parent[NB_SCREENS]);
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index 99ebb51..be78bf1 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -456,7 +456,7 @@ static int plugin_context_count = 0;
static int last_context = 0; /* index into plugin_context_order
of the last context returned */
-const struct button_mapping* get_context_map(int context)
+static const struct button_mapping* get_context_map(int context)
{
(void)context;
if (last_context<plugin_context_count)
diff --git a/apps/plugins/lib/xlcd_draw.c b/apps/plugins/lib/xlcd_draw.c
index accf3b4..506fe99 100644
--- a/apps/plugins/lib/xlcd_draw.c
+++ b/apps/plugins/lib/xlcd_draw.c
@@ -26,9 +26,9 @@
#include "xlcd.h"
/* sort the given coordinates by increasing x value */
-void sort_points_by_increasing_x(int* x1, int* y1,
- int* x2, int* y2,
- int* x3, int* y3)
+static void sort_points_by_increasing_x(int* x1, int* y1,
+ int* x2, int* y2,
+ int* x3, int* y3)
{
int x, y;
if (*x1 > *x3)
@@ -69,10 +69,10 @@ void sort_points_by_increasing_x(int* x1, int* y1,
sort_points_by_increasing_x(y1, x1, y2, x2, y3, x3)
/* draw a filled triangle, using horizontal lines for speed */
-void xlcd_filltriangle_horizontal(struct screen* display,
- int x1, int y1,
- int x2, int y2,
- int x3, int y3)
+static void xlcd_filltriangle_horizontal(struct screen* display,
+ int x1, int y1,
+ int x2, int y2,
+ int x3, int y3)
{
long fp_x1, fp_x2, fp_dx1, fp_dx2;
int y;
@@ -109,10 +109,10 @@ void xlcd_filltriangle_horizontal(struct screen* display,
}
/* draw a filled triangle, using vertical lines for speed */
-void xlcd_filltriangle_vertical(struct screen* display,
- int x1, int y1,
- int x2, int y2,
- int x3, int y3)
+static void xlcd_filltriangle_vertical(struct screen* display,
+ int x1, int y1,
+ int x2, int y2,
+ int x3, int y3)
{
long fp_y1, fp_y2, fp_dy1, fp_dy2;
int x;