diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index eb934ebd1..63efbed50 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -2292,7 +2292,7 @@ machine_amstrad_init(const machine_t *model, int type) ams = (amstrad_t *) malloc(sizeof(amstrad_t)); memset(ams, 0x00, sizeof(amstrad_t)); - ams->type = type; + ams->type = type; amstrad_latch = 0x80000000; switch (type) { diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index ef43077b5..2827c43ef 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -506,7 +506,6 @@ machine_at_ap5s_init(const machine_t *model) return ret; } - int machine_at_ms5124_init(const machine_t *model) { @@ -536,7 +535,6 @@ machine_at_ms5124_init(const machine_t *model) return ret; } - int machine_at_vectra54_init(const machine_t *model) { diff --git a/src/machine/m_xt_t1000_vid.c b/src/machine/m_xt_t1000_vid.c index d15a8f1c2..309ec132e 100644 --- a/src/machine/m_xt_t1000_vid.c +++ b/src/machine/m_xt_t1000_vid.c @@ -697,7 +697,7 @@ t1000_speed_changed(void *p) } static const device_config_t t1000_config[] = { - // clang-format off + // clang-format off { .name = "display_language", .description = "Language", @@ -723,7 +723,7 @@ static const device_config_t t1000_config[] = { .default_int = 0 }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on +// clang-format on }; const device_t t1000_video_device = { diff --git a/src/machine/m_xt_xi8088.c b/src/machine/m_xt_xi8088.c index bbbc1a42c..6d64fe438 100644 --- a/src/machine/m_xt_xi8088.c +++ b/src/machine/m_xt_xi8088.c @@ -86,7 +86,7 @@ xi8088_init(const device_t *info) } static const device_config_t xi8088_config[] = { - // clang-format off + // clang-format off { .name = "turbo_setting", .description = "Turbo", @@ -156,7 +156,7 @@ static const device_config_t xi8088_config[] = { .default_int = 0 }, { .name = "", .description = "", .type = CONFIG_END } - // clang-format on +// clang-format on }; const device_t xi8088_device = { diff --git a/src/machine/machine.c b/src/machine/machine.c index 774b972c2..c2347b107 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -42,80 +42,75 @@ #include <86box/machine.h> #include <86box/isamem.h> - int bios_only = 0; int machine; // int AT, PCI; - #ifdef ENABLE_MACHINE_LOG int machine_do_log = ENABLE_MACHINE_LOG; - static void machine_log(const char *fmt, ...) { - va_list ap; + va_list ap; - if (machine_do_log) - { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); - } + if (machine_do_log) { + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); + } } #else -#define machine_log(fmt, ...) +# define machine_log(fmt, ...) #endif - static int machine_init_ex(int m) { int ret = 0; if (!bios_only) { - machine_log("Initializing as \"%s\"\n", machine_getname()); + machine_log("Initializing as \"%s\"\n", machine_getname()); - is_vpc = 0; - standalone_gameport_type = NULL; - gameport_instance_id = 0; + is_vpc = 0; + standalone_gameport_type = NULL; + gameport_instance_id = 0; - /* Set up the architecture flags. */ - // AT = IS_AT(machine); - // PCI = IS_ARCH(machine, MACHINE_BUS_PCI); + /* Set up the architecture flags. */ + // AT = IS_AT(machine); + // PCI = IS_ARCH(machine, MACHINE_BUS_PCI); - cpu_set(); - pc_speed_changed(); + cpu_set(); + pc_speed_changed(); - /* Reset the memory state. */ - mem_reset(); - smbase = is_am486dxl ? 0x00060000 : 0x00030000; + /* Reset the memory state. */ + mem_reset(); + smbase = is_am486dxl ? 0x00060000 : 0x00030000; - lpt_init(); + lpt_init(); - if (cassette_enable) - device_add(&cassette_device); + if (cassette_enable) + device_add(&cassette_device); - cart_reset(); + cart_reset(); - /* Prepare some video-related things if we're using internal - or no video. */ - video_pre_reset(gfxcard); + /* Prepare some video-related things if we're using internal + or no video. */ + video_pre_reset(gfxcard); - /* Reset any ISA memory cards. */ - isamem_reset(); + /* Reset any ISA memory cards. */ + isamem_reset(); - /* Reset the fast off stuff. */ - cpu_fast_off_reset(); + /* Reset the fast off stuff. */ + cpu_fast_off_reset(); } /* All good, boot the machine! */ if (machines[m].init) - ret = machines[m].init(&machines[m]); + ret = machines[m].init(&machines[m]); if (bios_only || !ret) - return ret; + return ret; if (gfxcard != VID_NONE) { if (ibm8514_enabled) { @@ -132,7 +127,6 @@ machine_init_ex(int m) return ret; } - void machine_init(void) { @@ -140,11 +134,10 @@ machine_init(void) (void) machine_init_ex(machine); } - int machine_available(int m) { - int ret; + int ret; device_t *d = (device_t *) machine_getdevice(m); bios_only = 1; @@ -160,15 +153,14 @@ machine_available(int m) return !!ret; } - void pit_irq0_timer(int new_out, int old_out) { if (new_out && !old_out) - picint(1); + picint(1); if (!new_out) - picintc(1); + picintc(1); } void diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index efd4a4895..f3a56fc98 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -201,6 +201,7 @@ const machine_filter_t machine_chipsets[] = { const machine_t machines[] = { + // clang-format off /* 8088 Machines */ { .name = "[8088] IBM PC (1981)", @@ -11784,6 +11785,7 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL } + // clang-format on }; /* Saved copies - jumpers get applied to these.