summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2008-05-03 08:35:14 +0000
committerBertrik Sikken <bertrik@sikken.nl>2008-05-03 08:35:14 +0000
commite15f8a21a971920558a6f463586b16a0ee49ad79 (patch)
tree91d6771d0979c43e5390dc1de0ba79cd0638ba25
parent9c1ab1f0572da9d68f45fc8cb6c361cee0b33376 (diff)
downloadrockbox-e15f8a21a971920558a6f463586b16a0ee49ad79.tar.gz
rockbox-e15f8a21a971920558a6f463586b16a0ee49ad79.tar.bz2
rockbox-e15f8a21a971920558a6f463586b16a0ee49ad79.zip
Made source files #include the header file that they implement to make sure they are in sync. Made some local functions static.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17312 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/dsp.c4
-rw-r--r--apps/gui/color_picker.c1
-rw-r--r--apps/gui/gwps-common.c2
-rw-r--r--apps/gui/list.c1
-rw-r--r--apps/gui/splash.c9
-rw-r--r--apps/menu.c2
-rw-r--r--apps/menus/display_menu.c10
-rw-r--r--apps/menus/recording_menu.c1
-rw-r--r--apps/recorder/keyboard.c1
-rw-r--r--apps/recorder/radio.c3
-rw-r--r--apps/recorder/recording.c2
-rw-r--r--apps/root_menu.c2
-rw-r--r--apps/tagcache.c2
-rw-r--r--apps/tagcache.h3
-rw-r--r--firmware/bidi.c7
-rw-r--r--firmware/common/crc32-mi4.c2
-rw-r--r--firmware/common/crc32.c2
-rw-r--r--firmware/common/structec.c2
-rw-r--r--firmware/debug.c1
-rw-r--r--firmware/drivers/audio/as3514.c1
-rw-r--r--firmware/export/bidi.h5
-rw-r--r--firmware/mp3data.c4
-rw-r--r--firmware/replaygain.c1
-rw-r--r--firmware/target/arm/sandisk/ata-c200_e200.c2
-rw-r--r--firmware/target/arm/sandisk/power-c200_e200.c1
-rw-r--r--firmware/thread.c2
26 files changed, 47 insertions, 26 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index 5b90b7c543..7eee7bab48 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -927,7 +927,7 @@ void dsp_set_eq(bool enable)
set_gain(&audio_dsp);
}
-void dsp_set_stereo_width(int value)
+static void dsp_set_stereo_width(int value)
{
long width, straight, cross;
@@ -1023,7 +1023,7 @@ static void channels_process_sound_chan_karaoke(int count, int32_t *buf[])
}
#endif /* DSP_HAVE_ASM_SOUND_CHAN_KARAOKE */
-void dsp_set_channel_config(int value)
+static void dsp_set_channel_config(int value)
{
static const channels_process_fn_type channels_process_functions[] =
{
diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c
index b883349620..a788cbade2 100644
--- a/apps/gui/color_picker.c
+++ b/apps/gui/color_picker.c
@@ -32,6 +32,7 @@
#include "splash.h"
#include "action.h"
#include "icon.h"
+#include "color_picker.h"
/* structure for color info */
struct rgb_pick
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 9582a48dc4..ed4ca17b2a 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -64,7 +64,7 @@
/* draws the statusbar on the given wps-screen */
#ifdef HAVE_LCD_BITMAP
-void gui_wps_statusbar_draw(struct gui_wps *wps, bool force)
+static void gui_wps_statusbar_draw(struct gui_wps *wps, bool force)
{
bool draw = global_settings.statusbar;
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 2c849660d6..6b4229545d 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -38,6 +38,7 @@
#include "misc.h"
#include "talk.h"
#include "viewport.h"
+#include "list.h"
#ifdef HAVE_LCD_CHARCELLS
#define SCROLL_LIMIT 1
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index c690777cc6..df0446e62d 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -25,6 +25,7 @@
#include "lang.h"
#include "settings.h"
#include "talk.h"
+#include "splash.h"
#ifndef MAX
#define MAX(a, b) (((a)>(b))?(a):(b))
@@ -185,7 +186,7 @@ static void splash(struct screen * screen, const char *fmt, va_list ap)
}
void gui_splash(struct screen * screen, int ticks,
- const unsigned char *fmt, ...)
+ const char *fmt, ...)
{
va_list ap;
va_start( ap, fmt );
@@ -196,21 +197,21 @@ void gui_splash(struct screen * screen, int ticks,
sleep(ticks);
}
-void gui_syncsplash(int ticks, const unsigned char *fmt, ...)
+void gui_syncsplash(int ticks, const char *fmt, ...)
{
va_list ap;
int i;
#if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC
long id;
/* fmt may be a so called virtual pointer. See settings.h. */
- if((id = P2ID(fmt)) >= 0)
+ if((id = P2ID((unsigned char *)fmt)) >= 0)
/* If fmt specifies a voicefont ID, and voice menus are
enabled, then speak it. */
cond_talk_ids_fq(id);
#endif
/* If fmt is a lang ID then get the corresponding string (which
still might contain % place holders). */
- fmt = P2STR(fmt);
+ fmt = P2STR((unsigned char *)fmt);
va_start( ap, fmt );
FOR_NB_SCREENS(i)
splash(&(screens[i]), fmt, ap);
diff --git a/apps/menu.c b/apps/menu.c
index f61acd076b..e1998ea2f7 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -282,7 +282,7 @@ static int talk_menu_item(int selected_item, void *data)
}
/* this is used to reload the default menu viewports when the
theme changes. nothing happens if the menu is using a supplied parent vp */
-void init_default_menu_viewports(struct viewport parent[NB_SCREENS], bool hide_bars)
+static void init_default_menu_viewports(struct viewport parent[NB_SCREENS], bool hide_bars)
{
int i;
FOR_NB_SCREENS(i)
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index d593e9b8f3..3bcf5f08e4 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -37,7 +37,7 @@
#include "backdrop.h"
#ifdef HAVE_BACKLIGHT
-int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item)
+static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item)
{
(void)this_item;
switch (action)
@@ -55,7 +55,7 @@ int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item
}
#endif
#ifdef HAVE_LCD_BITMAP
-int flipdisplay_callback(int action,const struct menu_item_ex *this_item)
+static int flipdisplay_callback(int action,const struct menu_item_ex *this_item)
{
(void)this_item;
switch (action)
@@ -251,7 +251,7 @@ MENUITEM_SETTING(list_accel_start_delay,
MENUITEM_SETTING(list_accel_wait, &global_settings.list_accel_wait, NULL);
#endif /* HAVE_SCROLLWHEEL */
#ifdef HAVE_LCD_BITMAP
-int screenscroll_callback(int action,const struct menu_item_ex *this_item)
+static int screenscroll_callback(int action,const struct menu_item_ex *this_item)
{
(void)this_item;
switch (action)
@@ -294,7 +294,7 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON,
/***********************************/
/* BARS MENU */
#ifdef HAVE_LCD_BITMAP
-int statusbar_callback(int action,const struct menu_item_ex *this_item)
+static int statusbar_callback(int action,const struct menu_item_ex *this_item)
{
(void)this_item;
switch (action)
@@ -328,7 +328,7 @@ MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
/* PEAK METER MENU */
#ifdef HAVE_LCD_BITMAP
-int peakmeter_callback(int action,const struct menu_item_ex *this_item)
+static int peakmeter_callback(int action,const struct menu_item_ex *this_item)
{
(void)this_item;
switch (action)
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c
index aa16adffd1..887d89a4c3 100644
--- a/apps/menus/recording_menu.c
+++ b/apps/menus/recording_menu.c
@@ -62,6 +62,7 @@
#endif
#include "action.h"
#include "recording.h"
+#include "sound_menu.h"
static bool no_source_in_menu = false;
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 6788db8452..ae7666f788 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -34,6 +34,7 @@
#include "icon.h"
#include "pcmbuf.h"
#include "lang.h"
+#include "keyboard.h"
#ifndef O_BINARY
#define O_BINARY 0
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 3a15d4f721..f4b643de94 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -1278,7 +1278,8 @@ MENUITEM_FUNCTION(radio_edit_preset_item, MENU_FUNC_CHECK_RETVAL,
MENUITEM_FUNCTION(radio_delete_preset_item, MENU_FUNC_CHECK_RETVAL,
ID2P(LANG_FM_DELETE_PRESET),
radio_delete_preset, NULL, NULL, Icon_NOICON);
-int radio_preset_callback(int action, const struct menu_item_ex *this_item)
+static int radio_preset_callback(int action,
+ const struct menu_item_ex *this_item)
{
if (action == ACTION_STD_OK)
action = ACTION_EXIT_AFTER_THIS_MENUITEM;
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 4c8da8c3bd..6a2b9257d4 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -66,6 +66,8 @@
#include "screen_access.h"
#include "action.h"
#include "radio.h"
+#include "sound_menu.h"
+
#ifdef HAVE_RECORDING
/* This array holds the record timer interval lengths, in seconds */
static const unsigned long rec_timer_seconds[] =
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 378b776b81..cb9d7769eb 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -354,7 +354,7 @@ MENUITEM_RETURNVALUE(db_browser, ID2P(LANG_TAGCACHE), GO_TO_DBBROWSER,
#endif
MENUITEM_RETURNVALUE(rocks_browser, ID2P(LANG_PLUGINS), GO_TO_BROWSEPLUGINS,
NULL, Icon_Plugin);
-char *get_wps_item_name(int selected_item, void * data, char *buffer)
+static char *get_wps_item_name(int selected_item, void * data, char *buffer)
{
(void)selected_item; (void)data; (void)buffer;
if (audio_status())
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 8cf261f93f..68b894f9ff 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -73,6 +73,8 @@
#include "settings.h"
#include "dir.h"
#include "structec.h"
+#include "tagcache.h"
+
#ifndef __PCTOOL__
#include "splash.h"
#include "lang.h"
diff --git a/apps/tagcache.h b/apps/tagcache.h
index 51b063d7ff..143062a95f 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -169,8 +169,9 @@ struct tagcache_search {
int idx_id;
};
-#ifdef __PCTOOL__
void build_tagcache(const char *path);
+
+#ifdef __PCTOOL__
void tagcache_reverse_scan(void);
#endif
diff --git a/firmware/bidi.c b/firmware/bidi.c
index 539c64a127..eb3af22e9c 100644
--- a/firmware/bidi.c
+++ b/firmware/bidi.c
@@ -27,6 +27,7 @@
#include "rbunicode.h"
#include "arabjoin.h"
#include "scroll_engine.h"
+#include "bidi.h"
/* #define _HEB_BUFFER_LENGTH (MAX_PATH + LCD_WIDTH/2 + 3 + 2 + 2) * 2 */
#define _HEB_BLOCK_TYPE_ENG 1
@@ -40,7 +41,7 @@
#define _isnewline(c) ((c=='\n' || c=='\r') ? 1 : 0)
#define XOR(a,b) ((a||b) && !(a&&b))
-const arab_t * arab_lookup(unsigned short uchar)
+static const arab_t * arab_lookup(unsigned short uchar)
{
if (uchar >= 0x621 && uchar <= 0x63a)
return &(jointable[uchar - 0x621]);
@@ -53,8 +54,8 @@ const arab_t * arab_lookup(unsigned short uchar)
return 0;
}
-void arabjoin(unsigned short * stringprt, int length){
-
+static void arabjoin(unsigned short * stringprt, int length)
+{
bool connected = false;
unsigned short * writeprt = stringprt;
diff --git a/firmware/common/crc32-mi4.c b/firmware/common/crc32-mi4.c
index 8956364f10..ed33f60671 100644
--- a/firmware/common/crc32-mi4.c
+++ b/firmware/common/crc32-mi4.c
@@ -37,7 +37,7 @@
/* based on implementation by Finn Yannick Jacobs */
-
+#include "crc32-mi4.h"
/* crc_tab[] -- this crcTable is being build by chksum_crc32GenTab().
* so make sure, you call it before using the other
diff --git a/firmware/common/crc32.c b/firmware/common/crc32.c
index 21fefac07f..f02243dbb6 100644
--- a/firmware/common/crc32.c
+++ b/firmware/common/crc32.c
@@ -19,6 +19,8 @@
/* Code copied from firmware_flash plugin. */
+#include "crc32.h"
+
/* Tool function to calculate a CRC32 across some buffer */
/* third argument is either 0xFFFFFFFF to start or value from last piece */
unsigned crc_32(const void *src, unsigned len, unsigned crc32)
diff --git a/firmware/common/structec.c b/firmware/common/structec.c
index 1f4205c67c..937742002b 100644
--- a/firmware/common/structec.c
+++ b/firmware/common/structec.c
@@ -109,7 +109,7 @@ void structec_convert(void *structure, const char *ecinst,
* @param ecinst endianess correction string.
* @return length of the struct in bytes.
*/
-size_t structec_size(const char *ecinst)
+static size_t structec_size(const char *ecinst)
{
size_t size = 0;
diff --git a/firmware/debug.c b/firmware/debug.c
index 6b638c18c2..f6d93a378d 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -36,6 +36,7 @@ static char debugbuf[400];
#ifndef SIMULATOR /* allow non archos platforms to display output */
#include "kernel.h"
#include "system.h"
+#include "debug.h"
#ifdef DEBUG
#if CONFIG_CPU == SH7034 /* these are still very SH-oriented */
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index f37821730c..940cc36c5f 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -23,6 +23,7 @@
#include "debug.h"
#include "system.h"
#include "audio.h"
+#include "sound.h"
#include "audiohw.h"
#include "i2s.h"
diff --git a/firmware/export/bidi.h b/firmware/export/bidi.h
index 36ff46c6c0..516dcfcca8 100644
--- a/firmware/export/bidi.h
+++ b/firmware/export/bidi.h
@@ -17,5 +17,8 @@
*
****************************************************************************/
#ifndef BIDI_H
+#define BIDI_H
+
extern unsigned short *bidi_l2v(const unsigned char *str, int orientation);
-#endif
+
+#endif /* BIDI_H */
diff --git a/firmware/mp3data.c b/firmware/mp3data.c
index bfdb098261..79e334072d 100644
--- a/firmware/mp3data.c
+++ b/firmware/mp3data.c
@@ -307,8 +307,8 @@ static void buf_init(void)
fnf_read_index = 0;
}
-unsigned long buf_find_next_frame(int fd, long *offset, long max_offset,
- unsigned long last_header)
+static unsigned long buf_find_next_frame(int fd, long *offset, long max_offset,
+ unsigned long last_header)
{
return __find_next_frame(fd, offset, max_offset, last_header, buf_getbyte);
}
diff --git a/firmware/replaygain.c b/firmware/replaygain.c
index 05395d1efe..8871b1f25b 100644
--- a/firmware/replaygain.c
+++ b/firmware/replaygain.c
@@ -27,6 +27,7 @@
#include <system.h>
#include "id3.h"
#include "debug.h"
+#include "replaygain.h"
/* The fixed point math routines (with the exception of fp_atof) are based
* on oMathFP by Dan Carter (http://orbisstudios.com).
diff --git a/firmware/target/arm/sandisk/ata-c200_e200.c b/firmware/target/arm/sandisk/ata-c200_e200.c
index e4a5388978..08183c5265 100644
--- a/firmware/target/arm/sandisk/ata-c200_e200.c
+++ b/firmware/target/arm/sandisk/ata-c200_e200.c
@@ -787,7 +787,7 @@ static void sd_select_device(int card_no)
/* API Functions */
-void ata_led(bool onoff)
+static void ata_led(bool onoff)
{
led(onoff);
}
diff --git a/firmware/target/arm/sandisk/power-c200_e200.c b/firmware/target/arm/sandisk/power-c200_e200.c
index a7ec6cdead..8c8214a7ce 100644
--- a/firmware/target/arm/sandisk/power-c200_e200.c
+++ b/firmware/target/arm/sandisk/power-c200_e200.c
@@ -23,6 +23,7 @@
#include "i2c-pp.h"
#include "tuner.h"
#include "as3514.h"
+#include "power.h"
void power_init(void)
{
diff --git a/firmware/thread.c b/firmware/thread.c
index 9705293e9e..0f4273107f 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -1657,7 +1657,7 @@ struct thread_entry *
* catch something.
*---------------------------------------------------------------------------
*/
-void check_for_obj_waiters(const char *function, struct thread_entry *thread)
+static void check_for_obj_waiters(const char *function, struct thread_entry *thread)
{
/* Only one bit in the mask should be set with a frequency on 1 which
* represents the thread's own base priority */