krnl386.exe16: Use BOOL type where appropriate.
This commit is contained in:
parent
f24a5bc824
commit
aaa0c692f1
13 changed files with 32 additions and 33 deletions
|
@ -300,7 +300,7 @@ static void DOSMEM_Collapse( MCB* mcb )
|
|||
*/
|
||||
BOOL DOSMEM_InitDosMemory(void)
|
||||
{
|
||||
static int done;
|
||||
static BOOL done;
|
||||
static HANDLE hRunOnce;
|
||||
|
||||
if (done) return TRUE;
|
||||
|
@ -351,7 +351,7 @@ BOOL DOSMEM_InitDosMemory(void)
|
|||
DOSVM_InitSegments();
|
||||
|
||||
SetEvent( hRunOnce );
|
||||
done = 1;
|
||||
done = TRUE;
|
||||
return ret;
|
||||
}
|
||||
/* someone beat us here... */
|
||||
|
@ -649,7 +649,7 @@ UINT DOSMEM_Available(void)
|
|||
*/
|
||||
BOOL DOSMEM_MapDosLayout(void)
|
||||
{
|
||||
static int already_mapped;
|
||||
static BOOL already_mapped;
|
||||
|
||||
if (!already_mapped)
|
||||
{
|
||||
|
@ -666,7 +666,7 @@ BOOL DOSMEM_MapDosLayout(void)
|
|||
/* we may now need the actual interrupt stubs, and since we've just moved the
|
||||
* interrupt vector table away, we can fill the area with stubs instead... */
|
||||
DOSMEM_MakeIsrStubs();
|
||||
already_mapped = 1;
|
||||
already_mapped = TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -547,7 +547,7 @@ BOOL16 WINAPI GlobalUnlock16(
|
|||
GLOBALARENA *pArena = GET_ARENA_PTR(handle);
|
||||
if (!VALID_HANDLE(handle)) {
|
||||
WARN("Invalid handle 0x%04x passed to GlobalUnlock16!\n",handle);
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
TRACE("%04x\n", handle );
|
||||
if (pArena->lockCount) pArena->lockCount--;
|
||||
|
|
|
@ -480,7 +480,7 @@ static void MSCDEX_StoreMSF(DWORD frame, BYTE* val)
|
|||
val[0] = frame % CDFRAMES_PERSEC; /* frames */
|
||||
}
|
||||
|
||||
static int is_cdrom( int drive)
|
||||
static BOOL is_cdrom(int drive)
|
||||
{
|
||||
char root[] = "A:\\";
|
||||
root[0] += drive;
|
||||
|
@ -549,7 +549,7 @@ static void MSCDEX_Request(BYTE *driver_request, BOOL dorealmode)
|
|||
CDROM_SUB_Q_DATA_FORMAT fmt;
|
||||
SUB_Q_CHANNEL_DATA data;
|
||||
DWORD br;
|
||||
DWORD present = TRUE;
|
||||
BOOL present = TRUE;
|
||||
|
||||
/* FIXME
|
||||
* the following tests are wrong because lots of functions don't require the
|
||||
|
|
|
@ -93,7 +93,7 @@ static BYTE parport_8255[4] = {0x4f, 0x20, 0xff, 0xff};
|
|||
|
||||
static BYTE cmosaddress;
|
||||
|
||||
static int cmos_image_initialized = 0;
|
||||
static BOOL cmos_image_initialized = FALSE;
|
||||
|
||||
static BYTE cmosimage[64] =
|
||||
{
|
||||
|
@ -832,7 +832,7 @@ DWORD DOSVM_inport( int port, int size )
|
|||
if (!cmos_image_initialized)
|
||||
{
|
||||
IO_FixCMOSCheckSum();
|
||||
cmos_image_initialized = 1;
|
||||
cmos_image_initialized = TRUE;
|
||||
}
|
||||
res = (DWORD)cmosimage[cmosaddress & 0x3f];
|
||||
break;
|
||||
|
@ -1075,7 +1075,7 @@ void DOSVM_outport( int port, int size, DWORD value )
|
|||
if (!cmos_image_initialized)
|
||||
{
|
||||
IO_FixCMOSCheckSum();
|
||||
cmos_image_initialized = 1;
|
||||
cmos_image_initialized = TRUE;
|
||||
}
|
||||
cmosimage[cmosaddress & 0x3f] = (BYTE)value;
|
||||
break;
|
||||
|
|
|
@ -90,11 +90,11 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|||
BOOL WINAPI KERNEL_DllEntryPoint( DWORD reasion, HINSTANCE16 inst, WORD ds,
|
||||
WORD heap, DWORD reserved1, WORD reserved2 )
|
||||
{
|
||||
static int done;
|
||||
static BOOL done;
|
||||
|
||||
/* the entry point can be called multiple times */
|
||||
if (done) return TRUE;
|
||||
done = 1;
|
||||
done = TRUE;
|
||||
|
||||
/* create the shared heap for broken win95 native dlls */
|
||||
HeapCreate( HEAP_SHARED, 0, 0 );
|
||||
|
@ -469,12 +469,11 @@ SEGPTR WINAPI lstrcatn16( SEGPTR dst, LPCSTR src, INT16 n )
|
|||
*/
|
||||
BOOL16 WINAPI GetWinDebugInfo16(WINDEBUGINFO16 *lpwdi, UINT16 flags)
|
||||
{
|
||||
FIXME("(%8lx,%d): stub returning 0\n",
|
||||
(unsigned long)lpwdi, flags);
|
||||
/* 0 means not in debugging mode/version */
|
||||
FIXME("(%p,%d): stub returning FALSE\n", lpwdi, flags);
|
||||
/* FALSE means not in debugging mode/version */
|
||||
/* Can this type of debugging be used in wine ? */
|
||||
/* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -482,11 +481,11 @@ BOOL16 WINAPI GetWinDebugInfo16(WINDEBUGINFO16 *lpwdi, UINT16 flags)
|
|||
*/
|
||||
BOOL16 WINAPI SetWinDebugInfo16(WINDEBUGINFO16 *lpwdi)
|
||||
{
|
||||
FIXME("(%8lx): stub returning 0\n", (unsigned long)lpwdi);
|
||||
/* 0 means not in debugging mode/version */
|
||||
FIXME("(%p): stub returning FALSE\n", lpwdi);
|
||||
/* FALSE means not in debugging mode/version */
|
||||
/* Can this type of debugging be used in wine ? */
|
||||
/* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -242,7 +242,7 @@ extern int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT
|
|||
/* snoop16.c */
|
||||
extern void SNOOP16_RegisterDLL(HMODULE16,LPCSTR);
|
||||
extern FARPROC16 SNOOP16_GetProcAddress16(HMODULE16,DWORD,FARPROC16);
|
||||
extern int SNOOP16_ShowDebugmsgSnoop(const char *dll,int ord,const char *fname);
|
||||
extern BOOL SNOOP16_ShowDebugmsgSnoop(const char *dll,int ord,const char *fname);
|
||||
|
||||
/* syslevel.c */
|
||||
extern VOID SYSLEVEL_CheckNotLevel( INT level );
|
||||
|
|
|
@ -105,7 +105,7 @@ static inline void patch_code_segment( NE_MODULE *pModule )
|
|||
/***********************************************************************
|
||||
* contains_path
|
||||
*/
|
||||
static inline int contains_path( LPCSTR name )
|
||||
static inline BOOL contains_path( LPCSTR name )
|
||||
{
|
||||
return ((*name && (name[1] == ':')) || strchr(name, '/') || strchr(name, '\\'));
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ BOOL16 NE_SetEntryPoint( HMODULE16 hModule, WORD ordinal, WORD offset )
|
|||
while ((ordinal < bundle->first + 1) || (ordinal > bundle->last))
|
||||
{
|
||||
bundle = (ET_BUNDLE *)((BYTE *)pModule + bundle->next);
|
||||
if (!(bundle->next)) return 0;
|
||||
if (!bundle->next) return FALSE;
|
||||
}
|
||||
|
||||
entry = (ET_ENTRY *)((BYTE *)bundle+6);
|
||||
|
|
|
@ -232,7 +232,7 @@ static BOOL RELAY_ShowDebugmsgRelay(const char *module, int ordinal, const char
|
|||
* Simple function to decide if a particular debugging message is
|
||||
* wanted.
|
||||
*/
|
||||
int SNOOP16_ShowDebugmsgSnoop(const char *module, int ordinal, const char *func)
|
||||
BOOL SNOOP16_ShowDebugmsgSnoop(const char *module, int ordinal, const char *func)
|
||||
{
|
||||
if (debug_snoop_excludelist && check_list( module, ordinal, func, debug_snoop_excludelist ))
|
||||
return FALSE;
|
||||
|
|
|
@ -1136,7 +1136,7 @@ BOOL16 WINAPI FreeResource16( HGLOBAL16 handle )
|
|||
pNameInfo->handle = 0;
|
||||
pNameInfo->flags &= ~NE_SEGFLAGS_LOADED;
|
||||
}
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
pNameInfo++;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ static BOOL SB_Init(void)
|
|||
result = DirectSoundCreate(NULL,&lpdsound,NULL);
|
||||
if (result != DS_OK) {
|
||||
ERR("Unable to initialize Sound Subsystem err = %x !\n",result);
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME: To uncomment when :
|
||||
|
@ -136,7 +136,7 @@ static BOOL SB_Init(void)
|
|||
result = IDirectSound_SetCooperativeLevel(lpdsound,vga_hwnd,DSSCL_EXCLUSIVE|DSSCL_PRIORITY);
|
||||
if (result != DS_OK) {
|
||||
ERR("Can't set cooperative level !\n");
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -156,13 +156,13 @@ static BOOL SB_Init(void)
|
|||
result = IDirectSound_CreateSoundBuffer(lpdsound,&buf_desc,&lpdsbuf,NULL);
|
||||
if (result != DS_OK) {
|
||||
ERR("Can't create sound buffer !\n");
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
result = IDirectSoundBuffer_Play(lpdsbuf,0, 0, DSBPLAY_LOOPING);
|
||||
if (result != DS_OK) {
|
||||
ERR("Can't start playing !\n");
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
buf_off = 0;
|
||||
|
@ -171,10 +171,10 @@ static BOOL SB_Init(void)
|
|||
TRACE("thread\n");
|
||||
if (!SB_Thread) {
|
||||
ERR("Can't create thread !\n");
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void SB_Reset(void)
|
||||
|
|
|
@ -226,7 +226,7 @@ static BOOL TASK_FreeThunk( SEGPTR thunk )
|
|||
THUNKS *pThunk;
|
||||
WORD sel, base;
|
||||
|
||||
if (!(pTask = TASK_GetCurrent())) return 0;
|
||||
if (!(pTask = TASK_GetCurrent())) return FALSE;
|
||||
sel = pTask->hCSAlias;
|
||||
pThunk = (THUNKS *)pTask->thunks;
|
||||
base = (char *)pThunk - (char *)pTask;
|
||||
|
|
|
@ -272,7 +272,7 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
|
|||
struct ThunkDataCommon *TD16;
|
||||
HMODULE16 hmod;
|
||||
int ordinal;
|
||||
static int done;
|
||||
static BOOL done;
|
||||
|
||||
if (!done)
|
||||
{
|
||||
|
|
|
@ -241,7 +241,7 @@ BOOL WINAPI UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
|
|||
UTINFO *ut;
|
||||
HMODULE16 hModule16;
|
||||
FARPROC16 target16, init16;
|
||||
static int done;
|
||||
static BOOL done;
|
||||
|
||||
if (!done)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue