From 8031987c1a007e01a7a5bde97c4c7ad0bb0c34d2 Mon Sep 17 00:00:00 2001 From: yui Date: Fri, 13 Nov 2015 14:04:30 +0000 Subject: [PATCH] resolves BOOL/BRESULT refs #90 svn merge -r 176:177 https://amethyst.yui.ne.jp/svn-dev/x1/xmil/branches/yui/WORK_01 svn merge -r 214:216 https://amethyst.yui.ne.jp/svn-dev/x1/xmil/branches/yui/WORK_01 --- adv/patch/ctc.c | 4 ++-- adv/patch/ctc.h | 2 +- adv/patch/subcpu.c | 2 +- adv/xmil.c | 2 +- fdd/fdd_2d.c | 4 ++-- fdd/fdd_d88.c | 2 +- fdd/fdd_ini.c | 2 +- fdd/fdd_ini.h | 2 +- fdd/fddfile.c | 4 ++-- fdd/fddfile.h | 4 ++-- font/font.c | 2 +- font/font.h | 2 +- font/fontmake.c | 2 +- ievent.c | 4 ++-- io/ctc.c | 4 ++-- io/ctc.h | 2 +- io/dmac.c | 4 ++-- io/dmac.h | 4 ++-- io/fdc.c | 2 +- io/subcpu.c | 4 ++-- io/subcpu.h | 2 +- nds/patch/ctc.c | 4 ++-- nds/patch/subcpu.c | 2 +- nds/xmil9.cpp | 2 +- nevent.c | 2 +- nevent.h | 2 +- pccore.c | 2 +- pccore.h | 2 +- statsave.c | 4 ++-- vram/make15.c | 8 ++++---- vram/make24.c | 12 ++++++------ vram/makescrn.c | 4 ++-- 32 files changed, 52 insertions(+), 52 deletions(-) diff --git a/adv/patch/ctc.c b/adv/patch/ctc.c index 27d1932..ca47a8a 100644 --- a/adv/patch/ctc.c +++ b/adv/patch/ctc.c @@ -227,11 +227,11 @@ void neitem_ctc(UINT id) { } } -BRESULT ieitem_ctc(UINT id) { +BOOL ieitem_ctc(UINT id) { CTCCH *ch; REG8 intr; - BRESULT r; + BOOL r; UINT i; REG8 bit; diff --git a/adv/patch/ctc.h b/adv/patch/ctc.h index 8224735..82a6e12 100644 --- a/adv/patch/ctc.h +++ b/adv/patch/ctc.h @@ -40,7 +40,7 @@ extern "C" { #endif void neitem_ctc(UINT id); -BRESULT ieitem_ctc(UINT id); +BOOL ieitem_ctc(UINT id); void ieeoi_ctc(UINT id); void IOOUTCALL ctc_o(UINT port, REG8 dat); // x1_ctc_w diff --git a/adv/patch/subcpu.c b/adv/patch/subcpu.c index c2265f4..8ed926c 100644 --- a/adv/patch/subcpu.c +++ b/adv/patch/subcpu.c @@ -33,7 +33,7 @@ void neitem_scpu(UINT id) { } } -BRESULT ieitem_scpu(UINT id) { +BOOL ieitem_scpu(UINT id) { UINT key; UINT8 keydata; diff --git a/adv/xmil.c b/adv/xmil.c index c969459..527fda0 100644 --- a/adv/xmil.c +++ b/adv/xmil.c @@ -168,7 +168,7 @@ static void exec1frame(XMILMAIN *xmm) { joymng_setflags(); advpsg_sync(&advpsg); - pccore_exec((BRESULT)(xmm->framecnt == 0)); + pccore_exec(xmm->framecnt == 0); xmm->framecnt++; } diff --git a/fdd/fdd_2d.c b/fdd/fdd_2d.c index 6733ee5..fb464c2 100644 --- a/fdd/fdd_2d.c +++ b/fdd/fdd_2d.c @@ -26,7 +26,7 @@ static REG8 fdd2d_read(FDDFILE fdd, REG8 media, UINT track, REG8 sc, UINT rsize; FILEH fh; long pos; - BRESULT b; + BOOL b; if ((media != fdd->inf.xdf.media) || (track >= fdd->inf.xdf.tracks) || (sc == 0) || (sc > fdd->inf.xdf.sectors)) { @@ -61,7 +61,7 @@ static REG8 fdd2d_write(FDDFILE fdd, REG8 media, UINT track, REG8 sc, UINT secsize; FILEH fh; long pos; - BRESULT b; + BOOL b; if ((media != fdd->inf.xdf.media) || (track >= fdd->inf.xdf.tracks) || (sc == 0) || (sc > fdd->inf.xdf.sectors)) { diff --git a/fdd/fdd_d88.c b/fdd/fdd_d88.c index 87a564f..42228a3 100644 --- a/fdd/fdd_d88.c +++ b/fdd/fdd_d88.c @@ -462,7 +462,7 @@ BRESULT fddd88_set(FDDFILE fdd, const OEMCHAR *fname) { short attr; FILEH fh; - BRESULT r; + BOOL r; UINT8 ptr[D88_TRACKMAX][4]; UINT i; diff --git a/fdd/fdd_ini.c b/fdd/fdd_ini.c index f1c974e..6096b7a 100644 --- a/fdd/fdd_ini.c +++ b/fdd/fdd_ini.c @@ -4,7 +4,7 @@ #include "fdd_ini.h" -BRESULT is_d8ufile(const OEMCHAR *fname) { +BOOL is_d8ufile(const OEMCHAR *fname) { (void)fname; return(FALSE); diff --git a/fdd/fdd_ini.h b/fdd/fdd_ini.h index f45782c..9b538c1 100644 --- a/fdd/fdd_ini.h +++ b/fdd/fdd_ini.h @@ -3,7 +3,7 @@ extern "C" { #endif -BRESULT is_d8ufile(const OEMCHAR *fname); +BOOL is_d8ufile(const OEMCHAR *fname); BRESULT fdd_ini(const OEMCHAR *filename); #ifdef __cplusplus diff --git a/fdd/fddfile.c b/fdd/fddfile.c index 60328b7..92b7190 100644 --- a/fdd/fddfile.c +++ b/fdd/fddfile.c @@ -96,7 +96,7 @@ const OEMCHAR *fddfile_diskname(REG8 drv) { return(fddfile[drv].fname); } -BRESULT fddfile_diskready(REG8 drv) { +BOOL fddfile_diskready(REG8 drv) { if ((drv >= MAX_FDDFILE) || (fddfile[drv].type == DISKTYPE_NOTREADY)) { return(FALSE); @@ -104,7 +104,7 @@ BRESULT fddfile_diskready(REG8 drv) { return(TRUE); } -BRESULT fddfile_diskprotect(REG8 drv) { +BOOL fddfile_diskprotect(REG8 drv) { if ((drv >= MAX_FDDFILE) || (!fddfile[drv].protect)) { return(FALSE); diff --git a/fdd/fddfile.h b/fdd/fddfile.h index b138e56..2d26523 100644 --- a/fdd/fddfile.h +++ b/fdd/fddfile.h @@ -105,8 +105,8 @@ extern _FDDFILE fddfile[MAX_FDDFILE]; void fddfile_initialize(void); const OEMCHAR *fddfile_diskname(REG8 drv); -BRESULT fddfile_diskready(REG8 drv); -BRESULT fddfile_diskprotect(REG8 drv); +BOOL fddfile_diskready(REG8 drv); +BOOL fddfile_diskprotect(REG8 drv); BRESULT fddfile_set(REG8 drv, const OEMCHAR *fname, UINT ftype, int ro); void fddfile_eject(REG8 drv); diff --git a/font/font.c b/font/font.c index 1b8eed0..fd29f0e 100644 --- a/font/font.c +++ b/font/font.c @@ -87,7 +87,7 @@ static void font_cnvx1t2x1(void) { } -REG8 font_load(const OEMCHAR *filename, BRESULT force) { +REG8 font_load(const OEMCHAR *filename, BOOL force) { OEMCHAR fname[MAX_PATH]; REG8 type; diff --git a/font/font.h b/font/font.h index 1fff599..d6a4f58 100644 --- a/font/font.h +++ b/font/font.h @@ -12,7 +12,7 @@ extern UINT8 font_knjx1[0x20000]; extern UINT8 font_knjx1t[0x40000]; UINT8 *font_adrsx1t(UINT jis); -REG8 font_load(const OEMCHAR *filename, BRESULT force); +REG8 font_load(const OEMCHAR *filename, BOOL force); #ifdef __cplusplus } diff --git a/font/fontmake.c b/font/fontmake.c index c11fa44..91435b9 100644 --- a/font/fontmake.c +++ b/font/fontmake.c @@ -65,7 +65,7 @@ const JISPAIR *tblterm; return(jis); } -static BRESULT isx1jis(UINT jis) { +static BOOL isx1jis(UINT jis) { const UINT8 *p; UINT tmp; diff --git a/ievent.c b/ievent.c index b46169c..b2d4dff 100644 --- a/ievent.c +++ b/ievent.c @@ -9,9 +9,9 @@ /* ここでデイジーチェイン */ -typedef BRESULT (*IEVENTFN)(UINT id); +typedef BOOL (*IEVENTFN)(UINT id); -static BRESULT dummy(UINT id) { +static BOOL dummy(UINT id) { (void)id; return(FALSE); diff --git a/io/ctc.c b/io/ctc.c index 85add19..f388edb 100644 --- a/io/ctc.c +++ b/io/ctc.c @@ -185,11 +185,11 @@ void neitem_ctc(UINT id) { } } -BRESULT ieitem_ctc(UINT id) { +BOOL ieitem_ctc(UINT id) { CTCCH *ch; REG8 intr; - BRESULT r; + BOOL r; UINT i; REG8 bit; diff --git a/io/ctc.h b/io/ctc.h index be85c44..66dbba3 100644 --- a/io/ctc.h +++ b/io/ctc.h @@ -40,7 +40,7 @@ extern "C" { #endif void neitem_ctc(UINT id); -BRESULT ieitem_ctc(UINT id); +BOOL ieitem_ctc(UINT id); void ieeoi_ctc(UINT id); void IOOUTCALL ctc_o(UINT port, REG8 dat); diff --git a/io/dmac.c b/io/dmac.c index af32e40..47a5cb9 100644 --- a/io/dmac.c +++ b/io/dmac.c @@ -26,7 +26,7 @@ static REG8 iswork(const DMAC *d) { return(1); } -void dmac_sendready(BRESULT ready) { +void dmac_sendready(BOOL ready) { DMAC *d; REG8 working; @@ -58,7 +58,7 @@ void dmac_sendready(BRESULT ready) { } -BRESULT ieitem_dmac(UINT id) { +BOOL ieitem_dmac(UINT id) { DMAC *d; REG8 vect; diff --git a/io/dmac.h b/io/dmac.h index 7be6d1b..f471569 100644 --- a/io/dmac.h +++ b/io/dmac.h @@ -186,8 +186,8 @@ typedef struct { extern "C" { #endif -void dmac_sendready(BRESULT ready); -BRESULT ieitem_dmac(UINT id); +void dmac_sendready(BOOL ready); +BOOL ieitem_dmac(UINT id); void IOOUTCALL dmac_o(UINT port, REG8 dat); REG8 IOINPCALL dmac_i(UINT port); diff --git a/io/fdc.c b/io/fdc.c index 137d5ef..386eb27 100644 --- a/io/fdc.c +++ b/io/fdc.c @@ -502,7 +502,7 @@ static REG8 crccmd(FDC *f) { static void fdcenddata(FDC *f) { - BRESULT r; + BOOL r; REG8 stat; r = FALSE; diff --git a/io/subcpu.c b/io/subcpu.c index 35d6162..0bcd295 100644 --- a/io/subcpu.c +++ b/io/subcpu.c @@ -63,7 +63,7 @@ static const SCPUTBL scputbl[0x20] = { void neitem_scpu(UINT id) { - BRESULT intr; + BOOL intr; intr = FALSE; /* こうすると同時押しが判定できないのでキーバッファを持つべし */ @@ -85,7 +85,7 @@ void neitem_scpu(UINT id) { } } -BRESULT ieitem_scpu(UINT id) { +BOOL ieitem_scpu(UINT id) { UINT key; UINT8 keydata; diff --git a/io/subcpu.h b/io/subcpu.h index 000295c..7079b88 100644 --- a/io/subcpu.h +++ b/io/subcpu.h @@ -31,7 +31,7 @@ extern "C" { #endif void neitem_scpu(UINT id); -BRESULT ieitem_scpu(UINT id); +BOOL ieitem_scpu(UINT id); void subcpu_sendkey(void); void IOOUTCALL subcpu_o(UINT port, REG8 dat); diff --git a/nds/patch/ctc.c b/nds/patch/ctc.c index 24505c8..1851091 100644 --- a/nds/patch/ctc.c +++ b/nds/patch/ctc.c @@ -198,11 +198,11 @@ void neitem_ctc(UINT uId) } } -BRESULT ieitem_ctc(UINT uId) +BOOL ieitem_ctc(UINT uId) { CTCCH *pCh; REG8 cIntr; - BRESULT r; + BOOL r; UINT i; REG8 cBit; diff --git a/nds/patch/subcpu.c b/nds/patch/subcpu.c index 1ded6c0..3e91841 100644 --- a/nds/patch/subcpu.c +++ b/nds/patch/subcpu.c @@ -36,7 +36,7 @@ void neitem_scpu(UINT uId) } } -BRESULT ieitem_scpu(UINT uId) +BOOL ieitem_scpu(UINT uId) { UINT uKey; REG8 cKeyData; diff --git a/nds/xmil9.cpp b/nds/xmil9.cpp index 72747cc..ec223bf 100644 --- a/nds/xmil9.cpp +++ b/nds/xmil9.cpp @@ -160,7 +160,7 @@ static void processwait(XMILMAIN &xmm, UINT uCount) static void exec1frame(XMILMAIN &xmm) { joymng_setflags(); - pccore_exec((BRESULT)(xmm.uFrameCount == 0)); + pccore_exec(xmm.uFrameCount == 0); xmm.uFrameCount++; nds9psg_sync(&nds9psg); softkbd9_sync(); diff --git a/nevent.c b/nevent.c index 28a557a..5c340b0 100644 --- a/nevent.c +++ b/nevent.c @@ -166,7 +166,7 @@ void nevent_setbyms(UINT id, SINT32 ms, NEVENTCB proc, BRESULT absolute) { nevent_set(id, clock, proc, absolute); } -BRESULT nevent_iswork(UINT id) { +BOOL nevent_iswork(UINT id) { NEVENTITEM item; diff --git a/nevent.h b/nevent.h index 9b2ff2c..ba151bc 100644 --- a/nevent.h +++ b/nevent.h @@ -64,7 +64,7 @@ void nevent_setbyms(UINT id, SINT32 ms, NEVENTCB proc, BRESULT absolute); void nevent_reset(UINT id); /* イベントの動作状態取得 */ -BRESULT nevent_iswork(UINT id); +BOOL nevent_iswork(UINT id); /* 実行したクロック数の取得 */ SINT32 nevent_getwork(UINT id); diff --git a/pccore.c b/pccore.c index 9b32bd0..1b2131d 100644 --- a/pccore.c +++ b/pccore.c @@ -255,7 +255,7 @@ static UINT iocounter = 0; #endif -void pccore_exec(BRESULT draw) { +void pccore_exec(BOOL draw) { SINT32 frameclock; #if defined(MAINFRAMES_OLD) diff --git a/pccore.h b/pccore.h index a75f48b..a8c6815 100644 --- a/pccore.h +++ b/pccore.h @@ -74,7 +74,7 @@ void neitem_vsync(UINT id); void pccore_initialize(void); void pccore_reset(void); void pccore_deinitialize(void); -void pccore_exec(BRESULT draw); +void pccore_exec(BOOL draw); #ifdef __cplusplus } diff --git a/statsave.c b/statsave.c index b52dafb..ea15250 100644 --- a/statsave.c +++ b/statsave.c @@ -587,7 +587,7 @@ int statsave_check(const OEMCHAR *filename, OEMCHAR *buf, UINT size) { SFFILEH sffh; int ret; - BRESULT done; + BOOL done; const SFENTRY *tbl; const SFENTRY *tblterm; @@ -643,7 +643,7 @@ int statsave_load(const OEMCHAR *filename) { SFFILEH sffh; int ret; - BRESULT done; + BOOL done; const SFENTRY *tbl; const SFENTRY *tblterm; diff --git a/vram/make15.c b/vram/make15.c index b25db4e..5ee73f6 100644 --- a/vram/make15.c +++ b/vram/make15.c @@ -12,7 +12,7 @@ void width80x25_200l(void) { // 80x25 200line UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -78,7 +78,7 @@ void width80x12_200l(void) { // 80x12 200line UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -149,7 +149,7 @@ void width80x20l(void) { UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -208,7 +208,7 @@ void width80x10l(void) { UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; diff --git a/vram/make24.c b/vram/make24.c index 6caf8f9..737d880 100644 --- a/vram/make24.c +++ b/vram/make24.c @@ -12,7 +12,7 @@ void width80x25_200h(void) { // 80x25 200line UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -83,7 +83,7 @@ void width80x25_400h(void) { // 80x25 400line UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -156,7 +156,7 @@ void width80x12_200h(void) { // 80x12 200line UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -228,7 +228,7 @@ void width80x12_400h(void) { // 80x12 400line UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -309,7 +309,7 @@ void width80x20h(void) { UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; @@ -370,7 +370,7 @@ void width80x10h(void) { UINT fontcy; UINT pos; - BRESULT newline; + BOOL newline; UINT8 *dst; UINT y; UINT8 *lp; diff --git a/vram/makescrn.c b/vram/makescrn.c index be9bf93..22e1d23 100644 --- a/vram/makescrn.c +++ b/vram/makescrn.c @@ -30,7 +30,7 @@ static void flashupdatetmp(void) { UINT x; UINT r; UINT posr; - BRESULT y2; + BOOL y2; REG16 atr; REG16 udtbase; REG16 udt; @@ -89,7 +89,7 @@ static void flashupdatetmp(void) { } while(--y); } -static BRESULT updateblink(void) { +static BOOL updateblink(void) { UINT pos; REG8 update;