--- np2/statsave.c 2004/03/29 14:19:24 1.40 +++ np2/statsave.c 2005/02/07 14:46:07 1.43 @@ -31,6 +31,7 @@ #include "keydisp.h" #include "hostdrv.h" #include "calendar.h" +#include "keystat.h" #if defined(MACOS) #define CRCONST str_cr @@ -185,7 +186,7 @@ sfo_err1: static int statflag_closesection(SFFILEH sffh) { UINT leng; - BYTE zero[16]; + UINT8 zero[16]; if (sffh == NULL) { goto sfcs_err1; @@ -546,7 +547,7 @@ static int nevent_write(STFLAGH sfh, int UINT i; ZeroMemory(&nit, sizeof(nit)); - for (i=0; itype) { @@ -1226,9 +1230,11 @@ const SFENTRY *tblterm; ret |= flagsave_ext(&sffh->sfh, tbl); break; +#if !defined(DISABLE_SOUND) case STATFLAG_FM: ret |= flagsave_fm(&sffh->sfh, tbl); break; +#endif case STATFLAG_GIJ: ret |= flagsave_gij(&sffh->sfh, tbl); @@ -1268,7 +1274,7 @@ const SFENTRY *tblterm; while((!done) && (ret != STATFLAG_FAILURE)) { ret |= statflag_readsection(sffh); tbl = np2tbl; - tblterm = tbl + (sizeof(np2tbl)/sizeof(SFENTRY)); + tblterm = tbl + NELEMENTS(np2tbl); while(tbl < tblterm) { if (!memcmp(sffh->sfh.hdr.index, tbl->index, 10)) { break; @@ -1296,7 +1302,9 @@ const SFENTRY *tblterm; case STATFLAG_EVT: case STATFLAG_EXT: case STATFLAG_GIJ: +#if !defined(DISABLE_SOUND) case STATFLAG_FM: +#endif #if defined(SUPPORT_HOSTDRV) case STATFLAG_HDRV: #endif @@ -1366,7 +1374,7 @@ const SFENTRY *tblterm; while((!done) && (ret != STATFLAG_FAILURE)) { ret |= statflag_readsection(sffh); tbl = np2tbl + 1; - tblterm = np2tbl + (sizeof(np2tbl)/sizeof(SFENTRY)); + tblterm = np2tbl + NELEMENTS(np2tbl); while(tbl < tblterm) { if (!memcmp(sffh->sfh.hdr.index, tbl->index, 10)) { break; @@ -1417,9 +1425,11 @@ const SFENTRY *tblterm; ret |= flagload_ext(&sffh->sfh, tbl); break; +#if !defined(DISABLE_SOUND) case STATFLAG_FM: ret |= flagload_fm(&sffh->sfh, tbl); break; +#endif case STATFLAG_GIJ: ret |= flagload_gij(&sffh->sfh, tbl);