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
This commit is contained in:
Bertrik Sikken 2008-05-03 08:35:14 +00:00
parent 9c1ab1f057
commit e15f8a21a9
26 changed files with 47 additions and 26 deletions

View File

@ -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[] =
{

View File

@ -32,6 +32,7 @@
#include "splash.h"
#include "action.h"
#include "icon.h"
#include "color_picker.h"
/* structure for color info */
struct rgb_pick

View File

@ -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;

View File

@ -38,6 +38,7 @@
#include "misc.h"
#include "talk.h"
#include "viewport.h"
#include "list.h"
#ifdef HAVE_LCD_CHARCELLS
#define SCROLL_LIMIT 1

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -62,6 +62,7 @@
#endif
#include "action.h"
#include "recording.h"
#include "sound_menu.h"
static bool no_source_in_menu = false;

View File

@ -34,6 +34,7 @@
#include "icon.h"
#include "pcmbuf.h"
#include "lang.h"
#include "keyboard.h"
#ifndef O_BINARY
#define O_BINARY 0

View File

@ -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;

View File

@ -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[] =

View File

@ -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())

View File

@ -73,6 +73,8 @@
#include "settings.h"
#include "dir.h"
#include "structec.h"
#include "tagcache.h"
#ifndef __PCTOOL__
#include "splash.h"
#include "lang.h"

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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)

View File

@ -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;

View File

@ -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 */

View File

@ -23,6 +23,7 @@
#include "debug.h"
#include "system.h"
#include "audio.h"
#include "sound.h"
#include "audiohw.h"
#include "i2s.h"

View File

@ -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 */

View File

@ -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);
}

View File

@ -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).

View File

@ -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);
}

View File

@ -23,6 +23,7 @@
#include "i2c-pp.h"
#include "tuner.h"
#include "as3514.h"
#include "power.h"
void power_init(void)
{

View File

@ -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 */