* TODO
* o Check the installation functions.
*/
-#include "config.h"
-#include "wine/port.h"
#include <stdlib.h>
#include <stdarg.h>
WINE_DEFAULT_DEBUG_CHANNEL(ver);
-/* Couple of Hacks */
-extern inline DWORD WINAPI GetLastError(void)
-{
- DWORD ret;
- __asm__ __volatile__( ".byte 0x64\n\tmovl 0x60,%0" : "=r" (ret) );
- return ret;
-}
/******************************************************************************
* testFileExistenceA
}
}
- if (lpszFilename && !testFileExistenceA(curDir, lpszFilename, TRUE))
- retval |= VFF_FILEINUSE;
+ /* Check to see if the file exists and is inuse by another application */
+ if (lpszFilename && testFileExistenceA(curDir, lpszFilename, FALSE)) {
+ if (lpszFilename && !testFileExistenceA(curDir, lpszFilename, TRUE))
+ retval |= VFF_FILEINUSE;
+ }
curDirSizeReq = strlen(curDir) + 1;
destDirSizeReq = strlen(destDir) + 1;
}
ret = LZCopy(hfsrc,hfdst);
_lclose(hfdst);
- if (((long) ret) < 0) {
+ if (((LONG)ret) < 0) {
/* translate LZ errors into VIF_xxx */
switch (ret) {
case LZERROR_BADINHANDLE:
if (VerQueryValueA(buf1,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf1,&len1) &&
VerQueryValueA(buf2,"\\VarFileInfo\\Translation",(LPVOID*)&tbuf2,&len2)
) {
- /* irgendwas mit tbuf1 und tbuf2 machen
- * generiert DIFFLANG|MISMATCH
+ /* Do something with tbuf1 and tbuf2
+ * generates DIFFLANG|MISMATCH
*/
}
HeapFree(GetProcessHeap(), 0, buf2);
xret|=VIF_TEMPFILE;
}
} else {
- if (-1!=GetFileAttributesA(destfn))
+ if (INVALID_FILE_ATTRIBUTES!=GetFileAttributesA(destfn))
if (!DeleteFileA(destfn)) {
xret|=_error2vif(GetLastError())|VIF_CANNOTDELETE;
DeleteFileA(tmpfn);