Mercurial > mplayer.hg
diff loader/ext.c @ 7386:174e2a58b4cd
avifile sync - 95% cosmetics 5% bug
author | arpi |
---|---|
date | Fri, 13 Sep 2002 19:43:17 +0000 |
parents | aa1491f8167b |
children | 2571b2e0c0b4 |
line wrap: on
line diff
--- a/loader/ext.c Fri Sep 13 19:42:33 2002 +0000 +++ b/loader/ext.c Fri Sep 13 19:43:17 2002 +0000 @@ -18,10 +18,11 @@ #include <string.h> #include <stdarg.h> #include <ctype.h> -#include <wine/windef.h> -#include <wine/winbase.h> -#include <wine/debugtools.h> -#include <wine/heap.h> + +#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 @@ 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 @@ 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 @@ { 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 @@ 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 @@ } 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;