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

@ -488,7 +488,7 @@ static INT compare_substring( LPCWSTR a, INT operator, LPCWSTR b )
return !strncmpiW( a + (l - r), b, r ); return !strncmpiW( a + (l - r), b, r );
} }
default: default:
ERR("invalid substring operator\n"); ERR("invalid substring operator\n");
return 0; return 0;
} }
return 0; return 0;
@ -498,7 +498,7 @@ static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert )
{ {
if (operator >= COND_SS && operator <= COND_RHS) if (operator >= COND_SS && operator <= COND_RHS)
return compare_substring( a, operator, b ); return compare_substring( a, operator, b );
/* null and empty string are equivalent */ /* null and empty string are equivalent */
if (!a) a = szEmpty; if (!a) a = szEmpty;
if (!b) b = szEmpty; if (!b) b = szEmpty;
@ -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

@ -522,22 +522,22 @@ static UINT get_action_info( const GUID *guid, INT *type, MSIHANDLE *handle,
#ifdef __i386__ #ifdef __i386__
extern UINT CUSTOMPROC_wrapper( MsiCustomActionEntryPoint proc, MSIHANDLE handle ); extern UINT CUSTOMPROC_wrapper( MsiCustomActionEntryPoint proc, MSIHANDLE handle );
__ASM_GLOBAL_FUNC( CUSTOMPROC_wrapper, __ASM_GLOBAL_FUNC( CUSTOMPROC_wrapper,
"pushl %ebp\n\t" "pushl %ebp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
__ASM_CFI(".cfi_rel_offset %ebp,0\n\t") __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
"movl %esp,%ebp\n\t" "movl %esp,%ebp\n\t"
__ASM_CFI(".cfi_def_cfa_register %ebp\n\t") __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
"pushl 12(%ebp)\n\t" "pushl 12(%ebp)\n\t"
"movl 8(%ebp),%eax\n\t" "movl 8(%ebp),%eax\n\t"
"call *%eax\n\t" "call *%eax\n\t"
"leave\n\t" "leave\n\t"
__ASM_CFI(".cfi_def_cfa %esp,4\n\t") __ASM_CFI(".cfi_def_cfa %esp,4\n\t")
__ASM_CFI(".cfi_same_value %ebp\n\t") __ASM_CFI(".cfi_same_value %ebp\n\t")
"ret" ) "ret" )
#else #else
static inline UINT CUSTOMPROC_wrapper( MsiCustomActionEntryPoint proc, MSIHANDLE handle ) static inline UINT CUSTOMPROC_wrapper( MsiCustomActionEntryPoint proc, MSIHANDLE handle )
{ {
return proc(handle); return proc(handle);
} }
#endif #endif
@ -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)
@ -1124,36 +1122,32 @@ static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, LPCWSTR source,
file = msi_get_loaded_file(package, source); file = msi_get_loaded_file(package, source);
if (!file) if (!file)
{ {
ERR("invalid file key %s\n", debugstr_w(source)); ERR("invalid file key %s\n", debugstr_w(source));
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} }
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)
{ {
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)
{ {
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);
@ -1340,26 +1332,25 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
msi_reset_folders( package, TRUE ); msi_reset_folders( package, TRUE );
msi_free(deformated); msi_free(deformated);
break; break;
case 37: /* JScript/VBScript text stored in target column. */ case 37: /* JScript/VBScript text stored in target column. */
case 38: case 38:
rc = HANDLE_CustomType37_38(package,source,target,type,action); rc = HANDLE_CustomType37_38(package,source,target,type,action);
break; break;
case 5: case 5:
case 6: /* JScript/VBScript file stored in a Binary table stream. */ case 6: /* JScript/VBScript file stored in a Binary table stream. */
rc = HANDLE_CustomType5_6(package,source,target,type,action); rc = HANDLE_CustomType5_6(package,source,target,type,action);
break; break;
case 21: /* JScript/VBScript file installed with the product. */ case 21: /* JScript/VBScript file installed with the product. */
case 22: case 22:
rc = HANDLE_CustomType21_22(package,source,target,type,action); rc = HANDLE_CustomType21_22(package,source,target,type,action);
break; break;
case 53: /* JScript/VBScript text specified by a property value. */ case 53: /* JScript/VBScript text specified by a property value. */
case 54: case 54:
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;
} }

View File

@ -228,7 +228,7 @@ HRESULT WINAPI DllCanUnloadNow(void)
} }
/*********************************************************************** /***********************************************************************
* DllRegisterServer (MSI.@) * DllRegisterServer (MSI.@)
*/ */
HRESULT WINAPI DllRegisterServer(void) HRESULT WINAPI DllRegisterServer(void)
{ {
@ -236,7 +236,7 @@ HRESULT WINAPI DllRegisterServer(void)
} }
/*********************************************************************** /***********************************************************************
* DllUnregisterServer (MSI.@) * DllUnregisterServer (MSI.@)
*/ */
HRESULT WINAPI DllUnregisterServer(void) HRESULT WINAPI DllUnregisterServer(void)
{ {