msi: Get rid of the remaining tabs.

This commit is contained in:
Hans Leidekker 2011-06-30 12:16:02 +02:00 committed by Alexandre Julliard
parent 7d677fc327
commit 823560d472
5 changed files with 53 additions and 68 deletions

View File

@ -665,8 +665,7 @@ static int COND_GetOne( struct cond_str *str, COND_input *cond )
if (ch == '"' ) if (ch == '"' )
{ {
LPCWSTR p = strchrW( str->data + 1, '"' ); LPCWSTR p = strchrW( str->data + 1, '"' );
if (!p) if (!p) return COND_ERROR;
return COND_ERROR;
len = p - str->data + 1; len = p - str->data + 1;
rc = COND_LITER; rc = COND_LITER;
} }
@ -813,8 +812,7 @@ MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *package, LPCWSTR szCondition )
TRACE("%s\n", debugstr_w( szCondition ) ); TRACE("%s\n", debugstr_w( szCondition ) );
if ( szCondition == NULL ) if (szCondition == NULL) return MSICONDITION_NONE;
return MSICONDITION_NONE;
cond.package = package; cond.package = package;
cond.str = szCondition; cond.str = szCondition;

View File

@ -1078,12 +1078,10 @@ static UINT HANDLE_CustomType5_6(MSIPACKAGE *package, LPCWSTR source,
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
r = MSI_RecordReadStream(row, 2, NULL, &sz); r = MSI_RecordReadStream(row, 2, NULL, &sz);
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS) return r;
return r;
buffer = msi_alloc(sizeof(CHAR)*(sz+1)); buffer = msi_alloc( sz + 1 );
if (!buffer) if (!buffer) return ERROR_FUNCTION_FAILED;
return ERROR_FUNCTION_FAILED;
r = MSI_RecordReadStream(row, 2, buffer, &sz); r = MSI_RecordReadStream(row, 2, buffer, &sz);
if (r != ERROR_SUCCESS) if (r != ERROR_SUCCESS)
@ -1129,8 +1127,7 @@ static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, LPCWSTR source,
} }
hFile = CreateFileW(file->TargetPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); hFile = CreateFileW(file->TargetPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE) if (hFile == INVALID_HANDLE_VALUE) return ERROR_FUNCTION_FAILED;
return ERROR_FUNCTION_FAILED;
sz = GetFileSize(hFile, &szHighWord); sz = GetFileSize(hFile, &szHighWord);
if (sz == INVALID_FILE_SIZE || szHighWord != 0) if (sz == INVALID_FILE_SIZE || szHighWord != 0)
@ -1138,14 +1135,12 @@ static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, LPCWSTR source,
CloseHandle(hFile); CloseHandle(hFile);
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} }
buffer = msi_alloc( sz + 1 );
buffer = msi_alloc(sizeof(CHAR)*(sz+1));
if (!buffer) if (!buffer)
{ {
CloseHandle(hFile); CloseHandle(hFile);
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} }
bRet = ReadFile(hFile, buffer, sz, &read, NULL); bRet = ReadFile(hFile, buffer, sz, &read, NULL);
CloseHandle(hFile); CloseHandle(hFile);
if (!bRet) if (!bRet)
@ -1153,7 +1148,6 @@ static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, LPCWSTR source,
r = ERROR_FUNCTION_FAILED; r = ERROR_FUNCTION_FAILED;
goto done; goto done;
} }
buffer[read] = 0; buffer[read] = 0;
bufferw = strdupAtoW(buffer); bufferw = strdupAtoW(buffer);
if (!bufferw) if (!bufferw)
@ -1161,7 +1155,6 @@ static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, LPCWSTR source,
r = ERROR_FUNCTION_FAILED; r = ERROR_FUNCTION_FAILED;
goto done; goto done;
} }
info = do_msidbCustomActionTypeScript( package, type, bufferw, target, action ); info = do_msidbCustomActionTypeScript( package, type, bufferw, target, action );
r = wait_thread_handle( info ); r = wait_thread_handle( info );
release_custom_action_data( info ); release_custom_action_data( info );
@ -1182,8 +1175,7 @@ static UINT HANDLE_CustomType53_54(MSIPACKAGE *package, LPCWSTR source,
TRACE("%s %s\n", debugstr_w(source), debugstr_w(target)); TRACE("%s %s\n", debugstr_w(source), debugstr_w(target));
prop = msi_dup_property( package->db, source ); prop = msi_dup_property( package->db, source );
if (!prop) if (!prop) return ERROR_SUCCESS;
return ERROR_SUCCESS;
info = do_msidbCustomActionTypeScript( package, type, prop, NULL, action ); info = do_msidbCustomActionTypeScript( package, type, prop, NULL, action );
msi_free(prop); msi_free(prop);
@ -1357,9 +1349,8 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
rc = HANDLE_CustomType53_54(package,source,target,type,action); rc = HANDLE_CustomType53_54(package,source,target,type,action);
break; break;
default: default:
FIXME("UNHANDLED ACTION TYPE %i (%s %s)\n", FIXME("unhandled action type %u (%s %s)\n", type & CUSTOM_ACTION_TYPE_MASK,
type & CUSTOM_ACTION_TYPE_MASK, debugstr_w(source), debugstr_w(source), debugstr_w(target));
debugstr_w(target));
} }
end: end:

View File

@ -1251,9 +1251,7 @@ static void msi_scrolltext_add_text( msi_control *control, LPCWSTR text )
static UINT msi_dialog_scrolltext_control( msi_dialog *dialog, MSIRECORD *rec ) static UINT msi_dialog_scrolltext_control( msi_dialog *dialog, MSIRECORD *rec )
{ {
static const WCHAR szRichEdit20W[] = { static const WCHAR szRichEdit20W[] = {'R','i','c','h','E','d','i','t','2','0','W',0};
'R','i','c','h','E','d','i','t','2','0','W',0
};
struct msi_scrolltext_info *info; struct msi_scrolltext_info *info;
msi_control *control; msi_control *control;
HMODULE hRichedit; HMODULE hRichedit;

View File

@ -2244,8 +2244,7 @@ LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, LPWSTR lpBuffer,
if( !p ) if( !p )
return 0; return 0;
for (i = 0; i < (id&0xf); i++) for (i = 0; i < (id & 0xf); i++) p += *p + 1;
p += *p + 1;
len = *p; len = *p;
if( nBufferMax <= len ) if( nBufferMax <= len )
@ -2255,7 +2254,6 @@ LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, LPWSTR lpBuffer,
lpBuffer[ len ] = 0; lpBuffer[ len ] = 0;
TRACE("found -> %s\n", debugstr_w(lpBuffer)); TRACE("found -> %s\n", debugstr_w(lpBuffer));
return lang; return lang;
} }