--- loader/module.c.old tis sep 2 16:40:16 2003 +++ loader/module.c ons jan 28 18:03:56 2004 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "wine/windef.h" #include "wine/winerror.h" @@ -40,8 +40,8 @@ #ifdef EMU_QTX_API #include "wrapper.h" -static int report_func(void *stack_base, int stack_size, reg386_t *reg, u_int32_t *flags); -static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, u_int32_t *flags); +static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); +static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); #endif //#undef TRACE @@ -647,10 +647,10 @@ #ifdef EMU_QTX_API -static u_int32_t ret_array[4096]; +static uint32_t ret_array[4096]; static int ret_i=0; -static int report_func(void *stack_base, int stack_size, reg386_t *reg, u_int32_t *flags) +static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) { #ifdef DEBUG_QTX_API int i; @@ -706,7 +706,7 @@ printf("FUNC[%X/%s]: wrapper=%p func=%p len=%d\n",reg->eax, pname?pname:"???",pwrapper,pptr,plen); - printf("FUNC: caller=%p ebx=%p\n",((u_int32_t *)stack_base)[0],reg->ebx); + printf("FUNC: caller=%p ebx=%p\n",((uint32_t *)stack_base)[0],reg->ebx); if(pname) printf("%*sENTER(%d): %s(",ret_i*2,"",ret_i,pname); @@ -713,7 +713,7 @@ else printf("%*sENTER(%d): %X(",ret_i*2,"",ret_i,reg->eax); for (i=0;i=0x20 && fcc[0]<128 && @@ -733,8 +733,8 @@ // memory management: case 0x150011: //NewPtrClear case 0x150012: //NewPtrSysClear - reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]); - memset((void *)reg->eax,0,((u_int32_t *)stack_base)[1]); + reg->eax=(uint32_t)malloc(((uint32_t *)stack_base)[1]); + memset((void *)reg->eax,0,((uint32_t *)stack_base)[1]); #ifdef DEBUG_QTX_API printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); #endif @@ -741,16 +741,16 @@ return 1; case 0x15000F: //NewPtr case 0x150010: //NewPtrSys - reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]); + reg->eax=(uint32_t)malloc(((uint32_t *)stack_base)[1]); #ifdef DEBUG_QTX_API printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); #endif return 1; case 0x15002f: //DisposePtr - if(((u_int32_t *)stack_base)[1]>=0x60000000) + if(((uint32_t *)stack_base)[1]>=0x60000000) printf("WARNING! Invalid Ptr handle!\n"); else - free((void *)((u_int32_t *)stack_base)[1]); + free((void *)((uint32_t *)stack_base)[1]); reg->eax=0; #ifdef DEBUG_QTX_API printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); @@ -778,33 +778,33 @@ #if 0 switch(reg->eax){ // case 0x00010000: -// printf("FUNC: ImageCodecInitialize/ImageCodecGetCodecInfo(ci=%p,&icap=%p)\n",((u_int32_t *)stack_base)[1],((u_int32_t *)stack_base)[4]); +// printf("FUNC: ImageCodecInitialize/ImageCodecGetCodecInfo(ci=%p,&icap=%p)\n",((uint32_t *)stack_base)[1],((uint32_t *)stack_base)[4]); // break; case 0x00010003: - printf("FUNC: CountComponents(&desc=%p)\n",((u_int32_t *)stack_base)[1]); + printf("FUNC: CountComponents(&desc=%p)\n",((uint32_t *)stack_base)[1]); break; case 0x00010004: - printf("FUNC: FindNextComponent(prev=%p,&desc=%p)\n",((u_int32_t *)stack_base)[1],((u_int32_t *)stack_base)[2]); + printf("FUNC: FindNextComponent(prev=%p,&desc=%p)\n",((uint32_t *)stack_base)[1],((uint32_t *)stack_base)[2]); break; case 0x00010007: - printf("FUNC: OpenComponent(prev=%p)\n",((u_int32_t *)stack_base)[1]); + printf("FUNC: OpenComponent(prev=%p)\n",((uint32_t *)stack_base)[1]); break; case 0x0003008b: printf("FUNC: QTNewGWorldFromPtr(&pts=%p,fourcc=%.4s,&rect=%p,x1=%p,x2=%p,x3=%p,plane=%p,stride=%d)\n", - ((u_int32_t *)stack_base)[1], - &(((u_int32_t *)stack_base)[2]), - ((u_int32_t *)stack_base)[3], - ((u_int32_t *)stack_base)[4], - ((u_int32_t *)stack_base)[5], - ((u_int32_t *)stack_base)[6], - ((u_int32_t *)stack_base)[7], - ((u_int32_t *)stack_base)[8]); + ((uint32_t *)stack_base)[1], + &(((uint32_t *)stack_base)[2]), + ((uint32_t *)stack_base)[3], + ((uint32_t *)stack_base)[4], + ((uint32_t *)stack_base)[5], + ((uint32_t *)stack_base)[6], + ((uint32_t *)stack_base)[7], + ((uint32_t *)stack_base)[8]); break; case 0x001c0018: - printf("FUNC: GetGWorldPixMap(gworld=%p)\n",((u_int32_t *)stack_base)[1]); + printf("FUNC: GetGWorldPixMap(gworld=%p)\n",((uint32_t *)stack_base)[1]); break; case 0x00110001: - printf("FUNC: Gestalt(fourcc=%.4s, &ret=%p)\n",&(((u_int32_t *)stack_base)[1]),((u_int32_t *)stack_base)[2]); + printf("FUNC: Gestalt(fourcc=%.4s, &ret=%p)\n",&(((uint32_t *)stack_base)[1]),((uint32_t *)stack_base)[2]); break; default: { int i; @@ -829,7 +829,7 @@ #endif // save ret addr: - ret_array[ret_i]=((u_int32_t *)stack_base)[0]; + ret_array[ret_i]=((uint32_t *)stack_base)[0]; ++ret_i; #if 0 @@ -836,13 +836,13 @@ // print first 7 longs in the stack (return address, arg[1], arg[2] ... ) printf("stack[] = { "); for (i=0;i<7;i++) { - printf("%08x ", ((u_int32_t *)stack_base)[i]); + printf("%08x ", ((uint32_t *)stack_base)[i]); } printf("}\n\n"); #endif // // mess with function parameters -// ((u_int32_t *)stack_base)[1] = 0x66554433; +// ((uint32_t *)stack_base)[1] = 0x66554433; // // mess with return address... // reg->eax = 0x11223344; @@ -849,7 +849,7 @@ return 0; } -static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, u_int32_t *flags) +static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) { int i; short err; @@ -856,7 +856,7 @@ // restore ret addr: --ret_i; - ((u_int32_t *)stack_base)[0]=ret_array[ret_i]; + ((uint32_t *)stack_base)[0]=ret_array[ret_i]; #ifdef DEBUG_QTX_API @@ -882,7 +882,7 @@ // print first 7 longs in the stack (return address, arg[1], arg[2] ... ) printf("stack[] = { "); for (i=0;i<7;i++) { - printf("%08x ", ((u_int32_t *)stack_base)[i]); + printf("%08x ", ((uint32_t *)stack_base)[i]); } printf("}\n\n"); #endif @@ -890,7 +890,7 @@ #endif // // mess with function parameters -// ((u_int32_t *)stack_base)[1] = 0x66554433; +// ((uint32_t *)stack_base)[1] = 0x66554433; // // mess with return address... // reg->eax = 0x11223344;