From c7eafc3610b65eafe408d4959ded4c1aab44157a Mon Sep 17 00:00:00 2001 From: arpi Date: Fri, 13 Sep 2002 19:43:17 +0000 Subject: avifile sync - 95% cosmetics 5% bug git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7387 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/ext.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'loader/ext.c') diff --git a/loader/ext.c b/loader/ext.c index eb56db1478..638b0cb488 100644 --- a/loader/ext.c +++ b/loader/ext.c @@ -18,10 +18,11 @@ #include #include #include -#include -#include -#include -#include + +#include "wine/windef.h" +#include "wine/winbase.h" +#include "wine/debugtools.h" +#include "wine/heap.h" #include "ext.h" #if 0 @@ -188,18 +189,18 @@ WIN_BOOL WINAPI IsBadReadPtr(LPCVOID data, UINT size) LPSTR HEAP_strdupA(HANDLE heap, DWORD flags, LPCSTR string) { // return strdup(string); - char* answ=malloc(strlen(string)+1); + char* answ = (char*) malloc(strlen(string) + 1); strcpy(answ, string); return answ; } LPWSTR HEAP_strdupAtoW(HANDLE heap, DWORD flags, LPCSTR string) { int size, i; - short* answer; + WCHAR* answer; if(string==0) return 0; size=strlen(string); - answer=malloc(2 * (size + 1)); + answer = (WCHAR*) malloc(sizeof(WCHAR) * (size + 1)); for(i=0; i<=size; i++) answer[i]=(short)string[i]; return answer; @@ -213,7 +214,7 @@ LPSTR HEAP_strdupWtoA(HANDLE heap, DWORD flags, LPCWSTR string) size=0; while(string[size]) size++; - answer=malloc(size+2); + answer = (char*) malloc(size + 2); for(i=0; i<=size; i++) answer[i]=(char)string[i]; return answer; @@ -390,12 +391,12 @@ HANDLE WINAPI CreateFileMappingA(HANDLE handle, LPSECURITY_ATTRIBUTES lpAttr, { if(fm==0) { - fm=malloc(sizeof(file_mapping)); + fm = (file_mapping*) malloc(sizeof(file_mapping)); fm->prev=NULL; } else { - fm->next=malloc(sizeof(file_mapping)); + fm->next = (file_mapping*) malloc(sizeof(file_mapping)); fm->next->prev=fm; fm=fm->next; } @@ -403,7 +404,7 @@ HANDLE WINAPI CreateFileMappingA(HANDLE handle, LPSECURITY_ATTRIBUTES lpAttr, fm->handle=answer; if(name) { - fm->name=malloc(strlen(name)+1); + fm->name = (char*) malloc(strlen(name)+1); strcpy(fm->name, name); } else @@ -509,9 +510,9 @@ LPVOID WINAPI VirtualAlloc(LPVOID address, DWORD size, DWORD type, DWORD protec } else { - virt_alloc *new_vm=malloc(sizeof(virt_alloc)); + virt_alloc *new_vm = (virt_alloc*) malloc(sizeof(virt_alloc)); new_vm->mapping_size=size; - new_vm->address=answer; + new_vm->address=(char*)answer; new_vm->prev=vm; if(type == MEM_RESERVE) new_vm->state=0; -- cgit v1.2.3