mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
+3
-2
@@ -238,7 +238,7 @@ static char *audio_alloc_prefix (const char *s)
|
||||
return r;
|
||||
}
|
||||
|
||||
const char *audio_audfmt_to_string (audfmt_e fmt)
|
||||
static const char *audio_audfmt_to_string (audfmt_e fmt)
|
||||
{
|
||||
switch (fmt) {
|
||||
case AUD_FMT_U8:
|
||||
@@ -264,7 +264,8 @@ const char *audio_audfmt_to_string (audfmt_e fmt)
|
||||
return "S16";
|
||||
}
|
||||
|
||||
audfmt_e audio_string_to_audfmt (const char *s, audfmt_e defval, int *defaultp)
|
||||
static audfmt_e audio_string_to_audfmt (const char *s, audfmt_e defval,
|
||||
int *defaultp)
|
||||
{
|
||||
if (!strcasecmp (s, "u8")) {
|
||||
*defaultp = 0;
|
||||
|
||||
+3
-3
@@ -175,7 +175,7 @@ static inline int array_roll(array_t* array,int index_to,int index_from,int coun
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline int array_remove_slice(array_t* array,int index, int count)
|
||||
static inline int array_remove_slice(array_t* array,int index, int count)
|
||||
{
|
||||
assert(index >=0);
|
||||
assert(count > 0);
|
||||
@@ -186,13 +186,13 @@ inline int array_remove_slice(array_t* array,int index, int count)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int array_remove(array_t* array,int index)
|
||||
static int array_remove(array_t* array,int index)
|
||||
{
|
||||
return array_remove_slice(array, index, 1);
|
||||
}
|
||||
|
||||
/* return the index for a given member */
|
||||
int array_index(array_t* array, void* pointer)
|
||||
static int array_index(array_t* array, void* pointer)
|
||||
{
|
||||
size_t offset = (char*)pointer - array->pointer;
|
||||
assert(offset >= 0);
|
||||
|
||||
@@ -124,7 +124,7 @@ void path_combine(char *dest, int dest_size,
|
||||
}
|
||||
|
||||
|
||||
void bdrv_register(BlockDriver *bdrv)
|
||||
static void bdrv_register(BlockDriver *bdrv)
|
||||
{
|
||||
if (!bdrv->bdrv_aio_read) {
|
||||
/* add AIO emulation layer */
|
||||
|
||||
@@ -61,7 +61,7 @@ typedef struct QEMUFIFO {
|
||||
int count, wptr, rptr;
|
||||
} QEMUFIFO;
|
||||
|
||||
int qemu_fifo_write(QEMUFIFO *f, const uint8_t *buf, int len1)
|
||||
static int qemu_fifo_write(QEMUFIFO *f, const uint8_t *buf, int len1)
|
||||
{
|
||||
int l, len;
|
||||
|
||||
@@ -84,7 +84,7 @@ int qemu_fifo_write(QEMUFIFO *f, const uint8_t *buf, int len1)
|
||||
return len1;
|
||||
}
|
||||
|
||||
int qemu_fifo_read(QEMUFIFO *f, uint8_t *buf, int len1)
|
||||
static int qemu_fifo_read(QEMUFIFO *f, uint8_t *buf, int len1)
|
||||
{
|
||||
int l, len;
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ enum {
|
||||
|
||||
int do_swap;
|
||||
|
||||
void __attribute__((noreturn)) __attribute__((format (printf, 1, 2))) error(const char *fmt, ...)
|
||||
static void __attribute__((noreturn)) __attribute__((format (printf, 1, 2))) error(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
@@ -243,7 +243,7 @@ void __attribute__((noreturn)) __attribute__((format (printf, 1, 2))) error(cons
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void *load_data(int fd, long offset, unsigned int size)
|
||||
static void *load_data(int fd, long offset, unsigned int size)
|
||||
{
|
||||
char *data;
|
||||
|
||||
|
||||
@@ -138,9 +138,9 @@ static int glue(load_symbols, SZ)(struct elfhdr *ehdr, int fd, int must_swab)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend,
|
||||
int must_swab, uint64_t *pentry,
|
||||
uint64_t *lowaddr, uint64_t *highaddr)
|
||||
static int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend,
|
||||
int must_swab, uint64_t *pentry,
|
||||
uint64_t *lowaddr, uint64_t *highaddr)
|
||||
{
|
||||
struct elfhdr ehdr;
|
||||
struct elf_phdr *phdr = NULL, *ph;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "hw.h"
|
||||
#include "arm-misc.h"
|
||||
#include "primecell.h"
|
||||
#include "sysemu.h"
|
||||
|
||||
#define LOCK_VALUE 0xa05f
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
*/
|
||||
|
||||
#include "hw.h"
|
||||
#include "arm-misc.h"
|
||||
#include "qemu-timer.h"
|
||||
#include "primecell.h"
|
||||
|
||||
/* Common timer implementation. */
|
||||
|
||||
@@ -43,7 +43,7 @@ static void arm_timer_update(arm_timer_state *s)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset)
|
||||
static uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset)
|
||||
{
|
||||
arm_timer_state *s = (arm_timer_state *)opaque;
|
||||
|
||||
|
||||
+1
-1
@@ -908,7 +908,7 @@ static void pci_gt64120_set_irq(qemu_irq *pic, int irq_num, int level)
|
||||
}
|
||||
|
||||
|
||||
void gt64120_reset(void *opaque)
|
||||
static void gt64120_reset(void *opaque)
|
||||
{
|
||||
GT64120State *s = opaque;
|
||||
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ void pic_update_irq(PicState2 *s)
|
||||
int64_t irq_time[16];
|
||||
#endif
|
||||
|
||||
void i8259_set_irq(void *opaque, int irq, int level)
|
||||
static void i8259_set_irq(void *opaque, int irq, int level)
|
||||
{
|
||||
PicState2 *s = opaque;
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "block.h"
|
||||
#include "qemu-timer.h"
|
||||
#include "sysemu.h"
|
||||
#include "ppc_mac.h"
|
||||
|
||||
/* debug IDE devices */
|
||||
//#define DEBUG_IDE
|
||||
|
||||
+10
-10
@@ -390,7 +390,7 @@ void rtc_set_date(RTCState *s, const struct tm *tm)
|
||||
#define REG_IBM_CENTURY_BYTE 0x32
|
||||
#define REG_IBM_PS2_CENTURY_BYTE 0x37
|
||||
|
||||
void rtc_set_date_from_host(RTCState *s)
|
||||
static void rtc_set_date_from_host(RTCState *s)
|
||||
{
|
||||
time_t ti;
|
||||
struct tm *tm;
|
||||
@@ -498,22 +498,22 @@ RTCState *rtc_init(int base, qemu_irq irq)
|
||||
}
|
||||
|
||||
/* Memory mapped interface */
|
||||
uint32_t cmos_mm_readb (void *opaque, target_phys_addr_t addr)
|
||||
static uint32_t cmos_mm_readb (void *opaque, target_phys_addr_t addr)
|
||||
{
|
||||
RTCState *s = opaque;
|
||||
|
||||
return cmos_ioport_read(s, (addr - s->base) >> s->it_shift) & 0xFF;
|
||||
}
|
||||
|
||||
void cmos_mm_writeb (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
static void cmos_mm_writeb (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
RTCState *s = opaque;
|
||||
|
||||
cmos_ioport_write(s, (addr - s->base) >> s->it_shift, value & 0xFF);
|
||||
}
|
||||
|
||||
uint32_t cmos_mm_readw (void *opaque, target_phys_addr_t addr)
|
||||
static uint32_t cmos_mm_readw (void *opaque, target_phys_addr_t addr)
|
||||
{
|
||||
RTCState *s = opaque;
|
||||
uint32_t val;
|
||||
@@ -525,8 +525,8 @@ uint32_t cmos_mm_readw (void *opaque, target_phys_addr_t addr)
|
||||
return val;
|
||||
}
|
||||
|
||||
void cmos_mm_writew (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
static void cmos_mm_writew (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
RTCState *s = opaque;
|
||||
#ifdef TARGET_WORDS_BIGENDIAN
|
||||
@@ -535,7 +535,7 @@ void cmos_mm_writew (void *opaque,
|
||||
cmos_ioport_write(s, (addr - s->base) >> s->it_shift, value & 0xFFFF);
|
||||
}
|
||||
|
||||
uint32_t cmos_mm_readl (void *opaque, target_phys_addr_t addr)
|
||||
static uint32_t cmos_mm_readl (void *opaque, target_phys_addr_t addr)
|
||||
{
|
||||
RTCState *s = opaque;
|
||||
uint32_t val;
|
||||
@@ -547,8 +547,8 @@ uint32_t cmos_mm_readl (void *opaque, target_phys_addr_t addr)
|
||||
return val;
|
||||
}
|
||||
|
||||
void cmos_mm_writel (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
static void cmos_mm_writel (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
RTCState *s = opaque;
|
||||
#ifdef TARGET_WORDS_BIGENDIAN
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ static uint32_t mcf_fec_read(void *opaque, target_phys_addr_t addr)
|
||||
}
|
||||
}
|
||||
|
||||
void mcf_fec_write(void *opaque, target_phys_addr_t addr, uint32_t value)
|
||||
static void mcf_fec_write(void *opaque, target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
mcf_fec_state *s = (mcf_fec_state *)opaque;
|
||||
switch (addr & 0x3ff) {
|
||||
|
||||
+2
-2
@@ -398,7 +398,7 @@ static CPUWriteMemoryFunc *malta_fpga_write[] = {
|
||||
malta_fpga_writel
|
||||
};
|
||||
|
||||
void malta_fpga_reset(void *opaque)
|
||||
static void malta_fpga_reset(void *opaque)
|
||||
{
|
||||
MaltaFPGAState *s = opaque;
|
||||
|
||||
@@ -415,7 +415,7 @@ void malta_fpga_reset(void *opaque)
|
||||
malta_fpga_update_display(s);
|
||||
}
|
||||
|
||||
MaltaFPGAState *malta_fpga_init(target_phys_addr_t base, CPUState *env)
|
||||
static MaltaFPGAState *malta_fpga_init(target_phys_addr_t base, CPUState *env)
|
||||
{
|
||||
MaltaFPGAState *s;
|
||||
CharDriverState *uart_chr;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
#include "hw.h"
|
||||
#include "pci.h"
|
||||
#include "pc.h"
|
||||
#include "net.h"
|
||||
|
||||
/* debug NE2000 card */
|
||||
|
||||
@@ -37,5 +37,6 @@ void m48t59_toggle_lock (void *private, int lock);
|
||||
m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
|
||||
uint32_t io_base, uint16_t size,
|
||||
int type);
|
||||
void m48t59_set_addr (void *opaque, uint32_t addr);
|
||||
|
||||
#endif /* !NVRAM_H */
|
||||
|
||||
@@ -3041,7 +3041,7 @@ static CPUWriteMemoryFunc *omap_mpuio_writefn[] = {
|
||||
omap_badwidth_write16,
|
||||
};
|
||||
|
||||
void omap_mpuio_reset(struct omap_mpuio_s *s)
|
||||
static void omap_mpuio_reset(struct omap_mpuio_s *s)
|
||||
{
|
||||
s->inputs = 0;
|
||||
s->outputs = 0;
|
||||
@@ -3257,7 +3257,7 @@ static CPUWriteMemoryFunc *omap_gpio_writefn[] = {
|
||||
omap_badwidth_write16,
|
||||
};
|
||||
|
||||
void omap_gpio_reset(struct omap_gpio_s *s)
|
||||
static void omap_gpio_reset(struct omap_gpio_s *s)
|
||||
{
|
||||
s->inputs = 0;
|
||||
s->outputs = ~0;
|
||||
@@ -3429,7 +3429,7 @@ static CPUWriteMemoryFunc *omap_uwire_writefn[] = {
|
||||
omap_badwidth_write16,
|
||||
};
|
||||
|
||||
void omap_uwire_reset(struct omap_uwire_s *s)
|
||||
static void omap_uwire_reset(struct omap_uwire_s *s)
|
||||
{
|
||||
s->control = 0;
|
||||
s->setup[0] = 0;
|
||||
@@ -3470,7 +3470,7 @@ void omap_uwire_attach(struct omap_uwire_s *s,
|
||||
}
|
||||
|
||||
/* Pseudonoise Pulse-Width Light Modulator */
|
||||
void omap_pwl_update(struct omap_mpu_state_s *s)
|
||||
static void omap_pwl_update(struct omap_mpu_state_s *s)
|
||||
{
|
||||
int output = (s->pwl.clk && s->pwl.enable) ? s->pwl.level : 0;
|
||||
|
||||
@@ -3528,7 +3528,7 @@ static CPUWriteMemoryFunc *omap_pwl_writefn[] = {
|
||||
omap_badwidth_write8,
|
||||
};
|
||||
|
||||
void omap_pwl_reset(struct omap_mpu_state_s *s)
|
||||
static void omap_pwl_reset(struct omap_mpu_state_s *s)
|
||||
{
|
||||
s->pwl.output = 0;
|
||||
s->pwl.level = 0;
|
||||
@@ -3632,7 +3632,7 @@ static CPUWriteMemoryFunc *omap_pwt_writefn[] = {
|
||||
omap_badwidth_write8,
|
||||
};
|
||||
|
||||
void omap_pwt_reset(struct omap_mpu_state_s *s)
|
||||
static void omap_pwt_reset(struct omap_mpu_state_s *s)
|
||||
{
|
||||
s->pwt.frc = 0;
|
||||
s->pwt.vrc = 0;
|
||||
@@ -4037,7 +4037,7 @@ static void omap_rtc_tick(void *opaque)
|
||||
qemu_mod_timer(s->clk, s->tick);
|
||||
}
|
||||
|
||||
void omap_rtc_reset(struct omap_rtc_s *s)
|
||||
static void omap_rtc_reset(struct omap_rtc_s *s)
|
||||
{
|
||||
s->interrupts = 0;
|
||||
s->comp_reg = 0;
|
||||
@@ -4509,14 +4509,14 @@ struct omap_mcbsp_s *omap_mcbsp_init(target_phys_addr_t base,
|
||||
return s;
|
||||
}
|
||||
|
||||
void omap_mcbsp_i2s_swallow(void *opaque, int line, int level)
|
||||
static void omap_mcbsp_i2s_swallow(void *opaque, int line, int level)
|
||||
{
|
||||
struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;
|
||||
|
||||
omap_mcbsp_rx_start(s);
|
||||
}
|
||||
|
||||
void omap_mcbsp_i2s_start(void *opaque, int line, int level)
|
||||
static void omap_mcbsp_i2s_start(void *opaque, int line, int level)
|
||||
{
|
||||
struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;
|
||||
|
||||
|
||||
@@ -662,6 +662,9 @@ struct omap_mpu_state_s {
|
||||
# error TARGET_PHYS_ADDR_BITS undefined
|
||||
# endif
|
||||
|
||||
uint32_t omap_badwidth_read8(void *opaque, target_phys_addr_t addr);
|
||||
void omap_badwidth_write8(void *opaque, target_phys_addr_t addr,
|
||||
uint32_t value);
|
||||
uint32_t omap_badwidth_read16(void *opaque, target_phys_addr_t addr);
|
||||
void omap_badwidth_write16(void *opaque, target_phys_addr_t addr,
|
||||
uint32_t value);
|
||||
|
||||
+4
-4
@@ -114,7 +114,7 @@ static draw_line_func *draw_line_table2[33] = {
|
||||
[32] = draw_line16_32,
|
||||
};
|
||||
|
||||
void omap_update_display(void *opaque)
|
||||
static void omap_update_display(void *opaque)
|
||||
{
|
||||
struct omap_lcd_panel_s *omap_lcd = (struct omap_lcd_panel_s *) opaque;
|
||||
draw_line_func *draw_line;
|
||||
@@ -289,7 +289,7 @@ static int ppm_save(const char *filename, uint8_t *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void omap_screen_dump(void *opaque, const char *filename) {
|
||||
static void omap_screen_dump(void *opaque, const char *filename) {
|
||||
struct omap_lcd_panel_s *omap_lcd = opaque;
|
||||
omap_update_display(opaque);
|
||||
if (omap_lcd && omap_lcd->state->data)
|
||||
@@ -298,12 +298,12 @@ void omap_screen_dump(void *opaque, const char *filename) {
|
||||
omap_lcd->state->linesize);
|
||||
}
|
||||
|
||||
void omap_invalidate_display(void *opaque) {
|
||||
static void omap_invalidate_display(void *opaque) {
|
||||
struct omap_lcd_panel_s *omap_lcd = opaque;
|
||||
omap_lcd->invalidate = 1;
|
||||
}
|
||||
|
||||
void omap_lcd_update(struct omap_lcd_panel_s *s) {
|
||||
static void omap_lcd_update(struct omap_lcd_panel_s *s) {
|
||||
if (!s->enable) {
|
||||
s->dma->current_frame = -1;
|
||||
s->sync_error = 0;
|
||||
|
||||
+9
-9
@@ -458,45 +458,45 @@ ParallelState *parallel_init(int base, qemu_irq irq, CharDriverState *chr)
|
||||
}
|
||||
|
||||
/* Memory mapped interface */
|
||||
uint32_t parallel_mm_readb (void *opaque, target_phys_addr_t addr)
|
||||
static uint32_t parallel_mm_readb (void *opaque, target_phys_addr_t addr)
|
||||
{
|
||||
ParallelState *s = opaque;
|
||||
|
||||
return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift) & 0xFF;
|
||||
}
|
||||
|
||||
void parallel_mm_writeb (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
static void parallel_mm_writeb (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
ParallelState *s = opaque;
|
||||
|
||||
parallel_ioport_write_sw(s, (addr - s->base) >> s->it_shift, value & 0xFF);
|
||||
}
|
||||
|
||||
uint32_t parallel_mm_readw (void *opaque, target_phys_addr_t addr)
|
||||
static uint32_t parallel_mm_readw (void *opaque, target_phys_addr_t addr)
|
||||
{
|
||||
ParallelState *s = opaque;
|
||||
|
||||
return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift) & 0xFFFF;
|
||||
}
|
||||
|
||||
void parallel_mm_writew (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
static void parallel_mm_writew (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
ParallelState *s = opaque;
|
||||
|
||||
parallel_ioport_write_sw(s, (addr - s->base) >> s->it_shift, value & 0xFFFF);
|
||||
}
|
||||
|
||||
uint32_t parallel_mm_readl (void *opaque, target_phys_addr_t addr)
|
||||
static uint32_t parallel_mm_readl (void *opaque, target_phys_addr_t addr)
|
||||
{
|
||||
ParallelState *s = opaque;
|
||||
|
||||
return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift);
|
||||
}
|
||||
|
||||
void parallel_mm_writel (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
static void parallel_mm_writel (void *opaque,
|
||||
target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
ParallelState *s = opaque;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user