aboutsummaryrefslogtreecommitdiff
path: root/hw/blizzard.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-10 01:44:56 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-10 01:44:56 +0100
commitbc24a225af2464dc30f88d6f930779cbf0e22b67 (patch)
tree6df682b479f89863159f836e1dc292623ab577e1 /hw/blizzard.c
parentd4ec5228821b8bdd8019cb5dafa2ea3659ddb1f9 (diff)
Follow coding conventions
Remove explicit struct qualifiers and rename structure types. Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/blizzard.c')
-rw-r--r--hw/blizzard.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/hw/blizzard.c b/hw/blizzard.c
index 0f6801631a..40739d5e86 100644
--- a/hw/blizzard.c
+++ b/hw/blizzard.c
@@ -28,7 +28,7 @@
typedef void (*blizzard_fn_t)(uint8_t *, const uint8_t *, unsigned int);
-struct blizzard_s {
+typedef struct {
uint8_t reg;
uint32_t addr;
int swallow;
@@ -120,7 +120,7 @@ struct blizzard_s {
int pitch;
blizzard_fn_t line_fn;
} data;
-};
+} BlizzardState;
/* Bytes(!) per pixel */
static const int blizzard_iformat_bpp[0x10] = {
@@ -144,7 +144,7 @@ static inline void blizzard_rgb2yuv(int r, int g, int b,
*v = 0x80 + ((0xe0e * r - 0x0bc7 * g - 0x247 * b) >> 13);
}
-static void blizzard_window(struct blizzard_s *s)
+static void blizzard_window(BlizzardState *s)
{
uint8_t *src, *dst;
int bypp[2];
@@ -175,7 +175,7 @@ static void blizzard_window(struct blizzard_s *s)
fn(dst, src, bypl[2]);
}
-static int blizzard_transfer_setup(struct blizzard_s *s)
+static int blizzard_transfer_setup(BlizzardState *s)
{
if (s->source > 3 || !s->bpp ||
s->ix[1] < s->ix[0] || s->iy[1] < s->iy[0])
@@ -199,7 +199,7 @@ static int blizzard_transfer_setup(struct blizzard_s *s)
return 1;
}
-static void blizzard_reset(struct blizzard_s *s)
+static void blizzard_reset(BlizzardState *s)
{
s->reg = 0;
s->swallow = 0;
@@ -280,14 +280,14 @@ static void blizzard_reset(struct blizzard_s *s)
}
static inline void blizzard_invalidate_display(void *opaque) {
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
s->invalidate = 1;
}
static uint16_t blizzard_reg_read(void *opaque, uint8_t reg)
{
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
switch (reg) {
case 0x00: /* Revision Code */
@@ -490,7 +490,7 @@ static uint16_t blizzard_reg_read(void *opaque, uint8_t reg)
static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value)
{
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
switch (reg) {
case 0x04: /* PLL M-Divider */
@@ -831,7 +831,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value)
uint16_t s1d13745_read(void *opaque, int dc)
{
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
uint16_t value = blizzard_reg_read(s, s->reg);
if (s->swallow -- > 0)
@@ -844,7 +844,7 @@ uint16_t s1d13745_read(void *opaque, int dc)
void s1d13745_write(void *opaque, int dc, uint16_t value)
{
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
if (s->swallow -- > 0)
return;
@@ -860,7 +860,7 @@ void s1d13745_write(void *opaque, int dc, uint16_t value)
void s1d13745_write_block(void *opaque, int dc,
void *buf, size_t len, int pitch)
{
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
while (len > 0) {
if (s->reg == 0x90 && dc &&
@@ -886,7 +886,7 @@ void s1d13745_write_block(void *opaque, int dc,
static void blizzard_update_display(void *opaque)
{
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
int y, bypp, bypl, bwidth;
uint8_t *src, *dst;
@@ -935,7 +935,7 @@ static void blizzard_update_display(void *opaque)
}
static void blizzard_screen_dump(void *opaque, const char *filename) {
- struct blizzard_s *s = (struct blizzard_s *) opaque;
+ BlizzardState *s = (BlizzardState *) opaque;
blizzard_update_display(opaque);
if (s && ds_get_data(s->state))
@@ -955,7 +955,7 @@ static void blizzard_screen_dump(void *opaque, const char *filename) {
void *s1d13745_init(qemu_irq gpio_int)
{
- struct blizzard_s *s = (struct blizzard_s *) qemu_mallocz(sizeof(*s));
+ BlizzardState *s = (BlizzardState *) qemu_mallocz(sizeof(*s));
s->fb = qemu_malloc(0x180000);