(svn r2984) Use adequate types, this should aid portability a bit

This commit is contained in:
tron 2005-09-25 09:04:59 +00:00
parent d20bcf3eb5
commit bdbceba0cb
7 changed files with 14 additions and 11 deletions

View File

@ -166,7 +166,7 @@ void LoadDriver(int driver, const char *name)
static const char* GetDriverParam(const char* const* parm, const char* name)
{
uint len;
size_t len;
if (parm == NULL) return NULL;

View File

@ -828,7 +828,8 @@ static void CompanyLeagueWndProc(Window *w, WindowEvent *e)
case WE_PAINT: {
Player *p;
Player *plist[MAX_PLAYERS];
size_t pl_num, i;
uint pl_num;
uint i;
DrawWindowWidgets(w);

View File

@ -17,7 +17,7 @@
static struct {
char song[MAX_PATH];
int pid;
pid_t pid;
} _midi;
static void DoPlay(void);

View File

@ -12,7 +12,7 @@ static struct {
bool playing;
int new_vol;
HANDLE wait_obj;
uint devid;
UINT_PTR devid;
char start_song[260];
} _midi;
@ -44,7 +44,7 @@ static void Win32MidiSetVolume(byte vol)
SetEvent(_midi.wait_obj);
}
static long CDECL MidiSendCommand(const char *cmd, ...) {
static MCIERROR CDECL MidiSendCommand(const char *cmd, ...) {
va_list va;
char buf[512];
@ -72,7 +72,7 @@ static void MidiIntStopSong(void)
static void MidiIntSetVolume(int vol)
{
uint v = (vol * 65535 / 127);
DWORD v = (vol * 65535 / 127);
midiOutSetVolume((HMIDIOUT)_midi.devid, v + (v << 16));
}
@ -128,7 +128,8 @@ static const char *Win32MidiStart(const char * const *parm)
{
MIDIOUTCAPS midicaps;
DWORD threadId;
uint dev, nbdev;
UINT nbdev;
UINT_PTR dev;
char buf[16];
mciSendStringA("capability sequencer has audio", buf, lengthof(buf), 0);

View File

@ -1668,7 +1668,7 @@ static void VehicleNewName(byte *buf, int len)
name = (const char*)buf;
len -= (lang & 0x80) ? 6 : 5;
for (; id < endid && len > 0; id++) {
int ofs = strlen(name) + 1;
size_t ofs = strlen(name) + 1;
if (ofs < 128) {
DEBUG(grf, 8) ("VehicleNewName: %d <- %s", id, name);

View File

@ -57,7 +57,8 @@ void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...
{
char buf[MAX_TEXTMESSAGE_LENGTH];
va_list va;
int i, length;
size_t length;
uint i;
va_start(va, message);
vsnprintf(buf, lengthof(buf), message, va);

View File

@ -161,7 +161,7 @@ static char *PrintModuleInfo(char *output, HMODULE mod)
GetModuleFileName(mod, buffer, MAX_PATH);
GetFileInfo(&dfi, buffer);
output += sprintf(output, " %-20s handle: %.8X size: %d crc: %.8X date: %d-%.2d-%.2d %.2d:%.2d:%.2d\r\n",
output += sprintf(output, " %-20s handle: %p size: %d crc: %.8X date: %d-%.2d-%.2d %.2d:%.2d:%.2d\r\n",
buffer,
mod,
dfi.size,
@ -351,7 +351,7 @@ static bool DoEmergencySave(HWND wnd)
return b;
}
static BOOL CALLBACK CrashDialogFunc(HWND wnd,UINT msg,WPARAM wParam,LPARAM lParam)
static INT_PTR CALLBACK CrashDialogFunc(HWND wnd,UINT msg,WPARAM wParam,LPARAM lParam)
{
switch(msg) {
case WM_INITDIALOG: