summaryrefslogtreecommitdiffstats
path: root/libmsi
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-23 10:26:25 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-12-06 20:26:29 +0100
commit03613cc7fb190dd94623ebe96c72329d4f1d1475 (patch)
tree4b4ac768ebb0eca1b6dc2e1604b3caa8edb0f5ef /libmsi
parentee54109d9b784c72b25418933494e0691f42c2e8 (diff)
downloadmsitools-03613cc7fb190dd94623ebe96c72329d4f1d1475.tar.gz
msitools-03613cc7fb190dd94623ebe96c72329d4f1d1475.tar.xz
msitools-03613cc7fb190dd94623ebe96c72329d4f1d1475.zip
split multiple declarations on a single line
Diffstat (limited to 'libmsi')
-rw-r--r--libmsi/database.c48
-rw-r--r--libmsi/insert.c6
-rw-r--r--libmsi/msiquery.c6
-rw-r--r--libmsi/streams.c3
-rw-r--r--libmsi/suminfo.c3
-rw-r--r--libmsi/table.c13
6 files changed, 55 insertions, 24 deletions
diff --git a/libmsi/database.c b/libmsi/database.c
index e37bcb8..17d6376 100644
--- a/libmsi/database.c
+++ b/libmsi/database.c
@@ -299,7 +299,8 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
HRESULT r;
MSIDATABASE *db = NULL;
UINT ret = ERROR_FUNCTION_FAILED;
- LPCWSTR szMode, save_path;
+ LPCWSTR szMode;
+ LPCWSTR save_path;
STATSTG stat;
BOOL created = FALSE, patch = FALSE;
WCHAR path[MAX_PATH];
@@ -468,7 +469,8 @@ UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, PMSIOBJECT *ph
UINT WINAPI MsiOpenDatabaseA(LPCSTR szDBPath, LPCSTR szPersist, PMSIOBJECT *phDB)
{
HRESULT r = ERROR_FUNCTION_FAILED;
- LPWSTR szwDBPath = NULL, szwPersist = NULL;
+ LPWSTR szwDBPath = NULL;
+ LPWSTR szwPersist = NULL;
TRACE("%s %s %p\n", debugstr_a(szDBPath), debugstr_a(szPersist), phDB);
@@ -530,7 +532,8 @@ done:
static void msi_parse_line(LPWSTR *line, LPWSTR **entries, DWORD *num_entries, DWORD *len)
{
- LPWSTR ptr = *line, save;
+ LPWSTR ptr = *line;
+ LPWSTR save;
DWORD i, count = 1, chars_left = *len;
*entries = NULL;
@@ -615,7 +618,8 @@ static LPWSTR msi_build_createsql_prelude(LPWSTR table)
static LPWSTR msi_build_createsql_columns(LPWSTR *columns_data, LPWSTR *types, DWORD num_columns)
{
- LPWSTR columns, p;
+ LPWSTR columns;
+ LPWSTR p;
LPCWSTR type;
DWORD sql_size = 1, i, len;
WCHAR expanded[128], *ptr;
@@ -711,7 +715,9 @@ static LPWSTR msi_build_createsql_columns(LPWSTR *columns_data, LPWSTR *types, D
static LPWSTR msi_build_createsql_postlude(LPWSTR *primary_keys, DWORD num_keys)
{
- LPWSTR postlude, keys, ptr;
+ LPWSTR postlude;
+ LPWSTR keys;
+ LPWSTR ptr;
DWORD size, key_size, i;
static const WCHAR key_fmt[] = {'`','%','s','`',',',' ',0};
@@ -752,7 +758,9 @@ static UINT msi_add_table_to_db(MSIDATABASE *db, LPWSTR *columns, LPWSTR *types,
DWORD size;
MSIQUERY *view;
LPWSTR create_sql = NULL;
- LPWSTR prelude, columns_sql, postlude;
+ LPWSTR prelude;
+ LPWSTR columns_sql;
+ LPWSTR postlude;
prelude = msi_build_createsql_prelude(labels[0]);
columns_sql = msi_build_createsql_columns(columns, types, num_columns);
@@ -789,7 +797,8 @@ done:
static LPWSTR msi_import_stream_filename(LPCWSTR path, LPCWSTR name)
{
DWORD len;
- LPWSTR fullname, ptr;
+ LPWSTR fullname;
+ LPWSTR ptr;
len = lstrlenW(path) + lstrlenW(name) + 1;
fullname = msi_alloc(len*sizeof(WCHAR));
@@ -908,8 +917,12 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
DWORD len, i;
DWORD num_labels, num_types;
DWORD num_columns, num_records = 0;
- LPWSTR *columns, *types, *labels;
- LPWSTR path, ptr, data;
+ LPWSTR *columns;
+ LPWSTR *types;
+ LPWSTR *labels;
+ LPWSTR path;
+ LPWSTR ptr;
+ LPWSTR data;
LPWSTR **records = NULL;
LPWSTR **temp_records;
@@ -1031,7 +1044,8 @@ UINT WINAPI MsiDatabaseImportW(PMSIOBJECT handle, LPCWSTR szFolder, LPCWSTR szFi
UINT WINAPI MsiDatabaseImportA( PMSIOBJECT handle,
LPCSTR szFolder, LPCSTR szFilename )
{
- LPWSTR path = NULL, file = NULL;
+ LPWSTR path = NULL;
+ LPWSTR file = NULL;
UINT r = ERROR_OUTOFMEMORY;
TRACE("%x %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename));
@@ -1240,7 +1254,9 @@ UINT WINAPI MsiDatabaseExportW( PMSIOBJECT handle, LPCWSTR szTable,
UINT WINAPI MsiDatabaseExportA( PMSIOBJECT handle, LPCSTR szTable,
LPCSTR szFolder, LPCSTR szFilename )
{
- LPWSTR path = NULL, file = NULL, table = NULL;
+ LPWSTR path = NULL;
+ LPWSTR file = NULL;
+ LPWSTR table = NULL;
UINT r = ERROR_OUTOFMEMORY;
TRACE("%x %s %s %s\n", handle, debugstr_a(szTable),
@@ -1434,7 +1450,8 @@ done:
static LPWSTR get_key_value(MSIQUERY *view, LPCWSTR key, MSIRECORD *rec)
{
MSIRECORD *colnames;
- LPWSTR str, val;
+ LPWSTR str;
+ LPWSTR val;
UINT r, i = 0, sz = 0;
int cmp;
@@ -1492,8 +1509,11 @@ static LPWSTR get_key_value(MSIQUERY *view, LPCWSTR key, MSIRECORD *rec)
static LPWSTR create_diff_row_query(MSIDATABASE *merge, MSIQUERY *view,
LPWSTR table, MSIRECORD *rec)
{
- LPWSTR query = NULL, clause = NULL, val;
- LPCWSTR setptr, key;
+ LPWSTR query = NULL;
+ LPWSTR clause = NULL;
+ LPWSTR val;
+ LPCWSTR setptr;
+ LPCWSTR key;
DWORD size, oldsize;
MSIRECORD *keys;
UINT r, i, count;
diff --git a/libmsi/insert.c b/libmsi/insert.c
index 9687f8a..bb25729 100644
--- a/libmsi/insert.c
+++ b/libmsi/insert.c
@@ -107,7 +107,8 @@ err:
*/
static BOOL msi_columns_in_order(MSIINSERTVIEW *iv, UINT col_count)
{
- LPCWSTR a, b;
+ LPCWSTR a;
+ LPCWSTR b;
UINT i;
for (i = 1; i <= col_count; i++)
@@ -128,7 +129,8 @@ static UINT msi_arrange_record(MSIINSERTVIEW *iv, MSIRECORD **values)
MSIRECORD *padded;
UINT col_count, val_count;
UINT r, i, colidx;
- LPCWSTR a, b;
+ LPCWSTR a;
+ LPCWSTR b;
r = iv->table->ops->get_dimensions(iv->table, NULL, &col_count);
if (r != ERROR_SUCCESS)
diff --git a/libmsi/msiquery.c b/libmsi/msiquery.c
index 2c73a90..bc56e5f 100644
--- a/libmsi/msiquery.c
+++ b/libmsi/msiquery.c
@@ -56,7 +56,8 @@ static void MSI_CloseView( MSIOBJECT *arg )
UINT VIEW_find_column( MSIVIEW *table, LPCWSTR name, LPCWSTR table_name, UINT *n )
{
- LPCWSTR col_name, haystack_table_name;
+ LPCWSTR col_name;
+ LPCWSTR haystack_table_name;
UINT i, count, r;
r = table->ops->get_dimensions( table, NULL, &count );
@@ -790,7 +791,8 @@ struct msi_primary_key_record_info
static UINT msi_primary_key_iterator( MSIRECORD *rec, LPVOID param )
{
struct msi_primary_key_record_info *info = param;
- LPCWSTR name, table;
+ LPCWSTR name;
+ LPCWSTR table;
DWORD type;
type = MSI_RecordGetInteger( rec, 4 );
diff --git a/libmsi/streams.c b/libmsi/streams.c
index 2c270fa..7fbe970 100644
--- a/libmsi/streams.c
+++ b/libmsi/streams.c
@@ -133,7 +133,8 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
STREAM *stream;
IStream *stm;
STATSTG stat;
- LPWSTR encname = NULL, name = NULL;
+ LPWSTR encname = NULL;
+ LPWSTR name = NULL;
USHORT *data = NULL;
HRESULT hr;
ULONG count;
diff --git a/libmsi/suminfo.c b/libmsi/suminfo.c
index 94edf9e..69ce4ad 100644
--- a/libmsi/suminfo.c
+++ b/libmsi/suminfo.c
@@ -168,7 +168,8 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz
UINT type;
DWORD i, size;
PROPERTY_DATA *propdata;
- PROPVARIANT property, *ptr;
+ PROPVARIANT property;
+ PROPVARIANT *ptr;
PROPVARIANT changed;
PROPERTYIDOFFSET *idofs;
PROPERTYSECTIONHEADER *section_hdr;
diff --git a/libmsi/table.c b/libmsi/table.c
index 3c0dea2..4ef0dca 100644
--- a/libmsi/table.c
+++ b/libmsi/table.c
@@ -129,7 +129,8 @@ LPWSTR encode_streamname(BOOL bTable, LPCWSTR in)
{
DWORD count = MAX_STREAM_NAME;
DWORD ch, next;
- LPWSTR out, p;
+ LPWSTR out;
+ LPWSTR p;
if( !bTable )
count = lstrlenW( in )+2;
@@ -1054,7 +1055,8 @@ static UINT TABLE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *
static UINT msi_stream_name( const MSITABLEVIEW *tv, UINT row, LPWSTR *pstname )
{
- LPWSTR p, stname = NULL;
+ LPWSTR p;
+ LPWSTR stname = NULL;
UINT i, r, type, ival;
DWORD len;
LPCWSTR sval;
@@ -1147,7 +1149,8 @@ static UINT TABLE_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, ISt
{
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
UINT r;
- LPWSTR encname, full_name = NULL;
+ LPWSTR encname;
+ LPWSTR full_name = NULL;
if( !view->ops->fetch_int )
return ERROR_INVALID_PARAMETER;
@@ -2231,7 +2234,9 @@ static UINT read_raw_int(const BYTE *data, UINT col, UINT bytes)
static UINT msi_record_encoded_stream_name( const MSITABLEVIEW *tv, MSIRECORD *rec, LPWSTR *pstname )
{
- LPWSTR stname = NULL, sval, p;
+ LPWSTR stname = NULL;
+ LPWSTR sval;
+ LPWSTR p;
DWORD len;
UINT i, r;