Commit 25801274 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Get rid of unnecessary typedefs.

parent 3611398b
......@@ -69,8 +69,7 @@ static INT ui_actionstart(MSIPACKAGE *package, LPCWSTR action, LPCWSTR descripti
return rc;
}
static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start,
INT rc)
static void ui_actioninfo(MSIPACKAGE *package, const WCHAR *action, BOOL start, INT rc)
{
MSIRECORD *row;
WCHAR *template;
......@@ -815,11 +814,6 @@ UINT msi_load_all_components( MSIPACKAGE *package )
return r;
}
typedef struct {
MSIPACKAGE *package;
MSIFEATURE *feature;
} _ilfs;
static UINT add_feature_component( MSIFEATURE *feature, MSICOMPONENT *comp )
{
ComponentList *cl;
......@@ -846,22 +840,28 @@ static UINT add_feature_child( MSIFEATURE *parent, MSIFEATURE *child )
return ERROR_SUCCESS;
}
struct package_feature
{
MSIPACKAGE *package;
MSIFEATURE *feature;
};
static UINT iterate_load_featurecomponents(MSIRECORD *row, LPVOID param)
{
_ilfs* ilfs = param;
struct package_feature *package_feature = param;
LPCWSTR component;
MSICOMPONENT *comp;
component = MSI_RecordGetString(row,1);
/* check to see if the component is already loaded */
comp = msi_get_loaded_component( ilfs->package, component );
comp = msi_get_loaded_component( package_feature->package, component );
if (!comp)
{
WARN("ignoring unknown component %s\n", debugstr_w(component));
return ERROR_SUCCESS;
}
add_feature_component( ilfs->feature, comp );
add_feature_component( package_feature->feature, comp );
comp->Enabled = TRUE;
return ERROR_SUCCESS;
......@@ -872,7 +872,7 @@ static UINT load_feature(MSIRECORD *row, LPVOID param)
MSIPACKAGE *package = param;
MSIFEATURE *feature;
MSIQUERY *view;
_ilfs ilfs;
struct package_feature package_feature;
UINT rc;
/* fill in the data */
......@@ -912,10 +912,10 @@ static UINT load_feature(MSIRECORD *row, LPVOID param)
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
ilfs.package = package;
ilfs.feature = feature;
package_feature.package = package;
package_feature.feature = feature;
rc = MSI_IterateRecords(view, NULL, iterate_load_featurecomponents , &ilfs);
rc = MSI_IterateRecords(view, NULL, iterate_load_featurecomponents, &package_feature);
msiobj_release(&view->hdr);
return rc;
}
......@@ -3418,19 +3418,19 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
return ERROR_SUCCESS;
}
typedef struct {
struct typelib
{
CLSID clsid;
LPWSTR source;
LPWSTR path;
ITypeLib *ptLib;
} typelib_struct;
};
static BOOL CALLBACK Typelib_EnumResNameProc( HMODULE hModule, LPCWSTR lpszType,
LPWSTR lpszName, LONG_PTR lParam)
{
TLIBATTR *attr;
typelib_struct *tl_struct = (typelib_struct*) lParam;
struct typelib *tl_struct = (struct typelib *)lParam;
int sz;
HRESULT res;
......@@ -3500,7 +3500,7 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
LPCWSTR component;
MSICOMPONENT *comp;
MSIFILE *file;
typelib_struct tl_struct;
struct typelib tl_struct;
ITypeLib *tlib;
HMODULE module;
HRESULT hr;
......
......@@ -34,18 +34,18 @@
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
typedef struct tagMSIALTERVIEW
struct alter_view
{
MSIVIEW view;
MSIDATABASE *db;
MSIVIEW *table;
column_info *colinfo;
INT hold;
} MSIALTERVIEW;
};
static UINT ALTER_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
TRACE("%p %d %d %p\n", av, row, col, val );
......@@ -54,7 +54,7 @@ static UINT ALTER_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *
static UINT ALTER_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
TRACE("%p %d %d %p\n", av, row, col, stm );
......@@ -63,7 +63,7 @@ static UINT ALTER_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, ISt
static UINT ALTER_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
UINT ref;
TRACE("%p %p\n", av, record);
......@@ -86,7 +86,7 @@ static UINT ALTER_execute( struct tagMSIVIEW *view, MSIRECORD *record )
static UINT ALTER_close( struct tagMSIVIEW *view )
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
TRACE("%p\n", av );
......@@ -95,7 +95,7 @@ static UINT ALTER_close( struct tagMSIVIEW *view )
static UINT ALTER_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
TRACE("%p %p %p\n", av, rows, cols );
......@@ -105,7 +105,7 @@ static UINT ALTER_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *col
static UINT ALTER_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
TRACE("%p %d %p %p %p %p\n", av, n, name, type, temporary, table_name );
......@@ -115,7 +115,7 @@ static UINT ALTER_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *nam
static UINT ALTER_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
MSIRECORD *rec, UINT row )
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
TRACE("%p %d %p\n", av, eModifyMode, rec );
......@@ -124,7 +124,7 @@ static UINT ALTER_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
static UINT ALTER_delete( struct tagMSIVIEW *view )
{
MSIALTERVIEW *av = (MSIALTERVIEW*)view;
struct alter_view *av = (struct alter_view *)view;
TRACE("%p\n", av );
if (av->table)
......@@ -159,7 +159,7 @@ static const MSIVIEWOPS alter_ops =
UINT ALTER_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR name, column_info *colinfo, int hold )
{
MSIALTERVIEW *av;
struct alter_view *av;
UINT r;
TRACE("%p %p %s %d\n", view, colinfo, debugstr_w(name), hold );
......
......@@ -34,7 +34,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi);
typedef struct tagMSISIGNATURE
struct signature
{
LPCWSTR Name; /* NOT owned by this structure */
LPWSTR File;
......@@ -47,7 +47,7 @@ typedef struct tagMSISIGNATURE
FILETIME MinTime;
FILETIME MaxTime;
LPWSTR Languages;
}MSISIGNATURE;
};
void msi_parse_version_string(LPCWSTR verStr, PDWORD ms, PDWORD ls)
{
......@@ -80,7 +80,7 @@ void msi_parse_version_string(LPCWSTR verStr, PDWORD ms, PDWORD ls)
* Returns ERROR_SUCCESS upon success (where not finding the record counts as
* success), something else on error.
*/
static UINT get_signature( MSIPACKAGE *package, MSISIGNATURE *sig, const WCHAR *name )
static UINT get_signature( MSIPACKAGE *package, struct signature *sig, const WCHAR *name )
{
WCHAR *minVersion, *maxVersion, *p;
MSIRECORD *row;
......@@ -148,13 +148,13 @@ static UINT get_signature( MSIPACKAGE *package, MSISIGNATURE *sig, const WCHAR *
}
/* Frees any memory allocated in sig */
static void free_signature( MSISIGNATURE *sig )
static void free_signature( struct signature *sig )
{
free(sig->File);
free(sig->Languages);
}
static WCHAR *search_file( MSIPACKAGE *package, WCHAR *path, MSISIGNATURE *sig )
static WCHAR *search_file( MSIPACKAGE *package, WCHAR *path, struct signature *sig )
{
VS_FIXEDFILEINFO *info;
DWORD attr;
......@@ -220,7 +220,7 @@ done:
return val;
}
static UINT search_components( MSIPACKAGE *package, WCHAR **appValue, MSISIGNATURE *sig )
static UINT search_components( MSIPACKAGE *package, WCHAR **appValue, struct signature *sig )
{
MSIRECORD *row, *rec;
LPCWSTR signature, guid;
......@@ -341,9 +341,9 @@ static void convert_reg_value( DWORD regType, const BYTE *value, DWORD sz, WCHAR
}
}
static UINT search_directory( MSIPACKAGE *, MSISIGNATURE *, const WCHAR *, int, WCHAR ** );
static UINT search_directory( MSIPACKAGE *, struct signature *, const WCHAR *, int, WCHAR ** );
static UINT search_reg( MSIPACKAGE *package, WCHAR **appValue, MSISIGNATURE *sig )
static UINT search_reg( MSIPACKAGE *package, WCHAR **appValue, struct signature *sig )
{
const WCHAR *keyPath, *valueName;
WCHAR *deformatted = NULL, *ptr = NULL, *end;
......@@ -494,7 +494,7 @@ static LPWSTR get_ini_field(LPWSTR buf, int field)
return wcsdup(beg);
}
static UINT search_ini( MSIPACKAGE *package, WCHAR **appValue, MSISIGNATURE *sig )
static UINT search_ini( MSIPACKAGE *package, WCHAR **appValue, struct signature *sig )
{
MSIRECORD *row;
LPWSTR fileName, section, key;
......@@ -652,7 +652,7 @@ done:
* Return ERROR_SUCCESS in case of success (whether or not the file matches),
* something else if an install-halting error occurs.
*/
static UINT file_version_matches( MSIPACKAGE *package, const MSISIGNATURE *sig, const WCHAR *filePath,
static UINT file_version_matches( MSIPACKAGE *package, const struct signature *sig, const WCHAR *filePath,
BOOL *matches )
{
UINT len;
......@@ -712,7 +712,7 @@ static UINT file_version_matches( MSIPACKAGE *package, const MSISIGNATURE *sig,
* Return ERROR_SUCCESS in case of success (whether or not the file matches),
* something else if an install-halting error occurs.
*/
static UINT file_matches_sig( MSIPACKAGE *package, const MSISIGNATURE *sig, const WIN32_FIND_DATAW *findData,
static UINT file_matches_sig( MSIPACKAGE *package, const struct signature *sig, const WIN32_FIND_DATAW *findData,
const WCHAR *fullFilePath, BOOL *matches )
{
UINT rc = ERROR_SUCCESS;
......@@ -757,7 +757,7 @@ static UINT file_matches_sig( MSIPACKAGE *package, const MSISIGNATURE *sig, cons
* Returns ERROR_SUCCESS on success (which may include non-critical errors),
* something else on failures which should halt the install.
*/
static UINT recurse_search_directory( MSIPACKAGE *package, WCHAR **appValue, MSISIGNATURE *sig, const WCHAR *dir,
static UINT recurse_search_directory( MSIPACKAGE *package, WCHAR **appValue, struct signature *sig, const WCHAR *dir,
int depth )
{
HANDLE hFind;
......@@ -871,7 +871,7 @@ static BOOL is_full_path( const WCHAR *path )
return ret;
}
static UINT search_directory( MSIPACKAGE *package, MSISIGNATURE *sig, const WCHAR *path, int depth, WCHAR **appValue )
static UINT search_directory( MSIPACKAGE *package, struct signature *sig, const WCHAR *path, int depth, WCHAR **appValue )
{
UINT rc;
DWORD attr;
......@@ -940,9 +940,9 @@ static UINT search_directory( MSIPACKAGE *package, MSISIGNATURE *sig, const WCHA
return rc;
}
static UINT search_sig_name( MSIPACKAGE *, const WCHAR *, MSISIGNATURE *, WCHAR ** );
static UINT search_sig_name( MSIPACKAGE *, const WCHAR *, struct signature *, WCHAR ** );
static UINT search_dr( MSIPACKAGE *package, WCHAR **appValue, MSISIGNATURE *sig )
static UINT search_dr( MSIPACKAGE *package, WCHAR **appValue, struct signature *sig )
{
LPWSTR parent = NULL;
LPCWSTR parentName;
......@@ -968,7 +968,7 @@ static UINT search_dr( MSIPACKAGE *package, WCHAR **appValue, MSISIGNATURE *sig
parentName = MSI_RecordGetString(row, 2);
if (parentName)
{
MSISIGNATURE parentSig;
struct signature parentSig;
search_sig_name( package, parentName, &parentSig, &parent );
free_signature( &parentSig );
......@@ -1017,7 +1017,7 @@ static UINT search_dr( MSIPACKAGE *package, WCHAR **appValue, MSISIGNATURE *sig
return rc;
}
static UINT search_sig_name( MSIPACKAGE *package, const WCHAR *sigName, MSISIGNATURE *sig, WCHAR **appValue )
static UINT search_sig_name( MSIPACKAGE *package, const WCHAR *sigName, struct signature *sig, WCHAR **appValue )
{
UINT rc;
......@@ -1045,7 +1045,7 @@ static UINT ITERATE_AppSearch(MSIRECORD *row, LPVOID param)
MSIPACKAGE *package = param;
LPCWSTR propName, sigName;
LPWSTR value = NULL;
MSISIGNATURE sig;
struct signature sig;
MSIRECORD *uirow;
UINT r;
......@@ -1102,7 +1102,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
MSIPACKAGE *package = param;
LPCWSTR signature;
LPWSTR value = NULL;
MSISIGNATURE sig;
struct signature sig;
UINT r = ERROR_SUCCESS;
signature = MSI_RecordGetString(row, 1);
......
......@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
/* below is the query interface to a table */
typedef struct tagMSICREATEVIEW
struct create_view
{
MSIVIEW view;
MSIDATABASE *db;
......@@ -46,11 +46,11 @@ typedef struct tagMSICREATEVIEW
BOOL bIsTemp;
BOOL hold;
column_info *col_info;
} MSICREATEVIEW;
};
static UINT CREATE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
{
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
struct create_view *cv = (struct create_view *)view;
TRACE("%p %d %d %p\n", cv, row, col, val );
......@@ -59,7 +59,7 @@ static UINT CREATE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT
static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
struct create_view *cv = (struct create_view *)view;
BOOL persist = (cv->bIsTemp) ? MSICONDITION_FALSE : MSICONDITION_TRUE;
TRACE("%p Table %s (%s)\n", cv, debugstr_w(cv->name),
......@@ -73,7 +73,7 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
static UINT CREATE_close( struct tagMSIVIEW *view )
{
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
struct create_view *cv = (struct create_view *)view;
TRACE("%p\n", cv);
......@@ -82,7 +82,7 @@ static UINT CREATE_close( struct tagMSIVIEW *view )
static UINT CREATE_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
{
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
struct create_view *cv = (struct create_view *)view;
TRACE("%p %p %p\n", cv, rows, cols );
......@@ -92,7 +92,7 @@ static UINT CREATE_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *co
static UINT CREATE_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
struct create_view *cv = (struct create_view *)view;
TRACE("%p %d %p %p %p %p\n", cv, n, name, type, temporary, table_name );
......@@ -102,7 +102,7 @@ static UINT CREATE_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *na
static UINT CREATE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
MSIRECORD *rec, UINT row)
{
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
struct create_view *cv = (struct create_view *)view;
TRACE("%p %d %p\n", cv, eModifyMode, rec );
......@@ -111,7 +111,7 @@ static UINT CREATE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
static UINT CREATE_delete( struct tagMSIVIEW *view )
{
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
struct create_view *cv = (struct create_view *)view;
TRACE("%p\n", cv );
......@@ -160,7 +160,7 @@ static UINT check_columns( const column_info *col_info )
UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
column_info *col_info, BOOL hold )
{
MSICREATEVIEW *cv = NULL;
struct create_view *cv = NULL;
UINT r;
column_info *col;
BOOL temp = TRUE;
......
......@@ -43,13 +43,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
#define CUSTOM_ACTION_TYPE_MASK 0x3F
typedef struct tagMSIRUNNINGACTION
struct running_action
{
struct list entry;
HANDLE handle;
BOOL process;
LPWSTR name;
} MSIRUNNINGACTION;
};
typedef UINT (WINAPI *MsiCustomActionEntryPoint)( MSIHANDLE );
......@@ -298,9 +298,9 @@ static MSIBINARY *get_temp_binary(MSIPACKAGE *package, LPCWSTR source)
static void file_running_action(MSIPACKAGE* package, HANDLE Handle,
BOOL process, LPCWSTR name)
{
MSIRUNNINGACTION *action;
struct running_action *action;
action = malloc( sizeof(MSIRUNNINGACTION) );
action = malloc( sizeof(*action) );
action->handle = Handle;
action->process = process;
......@@ -1563,7 +1563,7 @@ void ACTION_FinishCustomActions(const MSIPACKAGE* package)
while ((item = list_head( &package->RunningActions )))
{
MSIRUNNINGACTION *action = LIST_ENTRY( item, MSIRUNNINGACTION, entry );
struct running_action *action = LIST_ENTRY( item, struct running_action, entry );
list_remove( &action->entry );
......
......@@ -1206,7 +1206,7 @@ UINT WINAPI MsiDatabaseMergeA( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, co
return r;
}
typedef struct _tagMERGETABLE
struct merge_table
{
struct list entry;
struct list rows;
......@@ -1218,22 +1218,22 @@ typedef struct _tagMERGETABLE
DWORD numtypes;
LPWSTR *labels;
DWORD numlabels;
} MERGETABLE;
};
typedef struct _tagMERGEROW
struct merge_row
{
struct list entry;
MSIRECORD *data;
} MERGEROW;
};
typedef struct _tagMERGEDATA
struct merge_data
{
MSIDATABASE *db;
MSIDATABASE *merge;
MERGETABLE *curtable;
struct merge_table *curtable;
MSIQUERY *curview;
struct list *tabledata;
} MERGEDATA;
};
static BOOL merge_type_match(LPCWSTR type1, LPCWSTR type2)
{
......@@ -1462,9 +1462,9 @@ done:
static UINT merge_diff_row(MSIRECORD *rec, LPVOID param)
{
MERGEDATA *data = param;
MERGETABLE *table = data->curtable;
MERGEROW *mergerow;
struct merge_data *data = param;
struct merge_table *table = data->curtable;
struct merge_row *mergerow;
MSIQUERY *dbview = NULL;
MSIRECORD *row = NULL;
LPWSTR query = NULL;
......@@ -1496,7 +1496,7 @@ static UINT merge_diff_row(MSIRECORD *rec, LPVOID param)
r = ERROR_SUCCESS;
}
mergerow = malloc(sizeof(MERGEROW));
mergerow = malloc(sizeof(*mergerow));
if (!mergerow)
{
r = ERROR_OUTOFMEMORY;
......@@ -1606,13 +1606,13 @@ end:
return r;
}
static void merge_free_rows(MERGETABLE *table)
static void merge_free_rows(struct merge_table *table)
{
struct list *item, *cursor;
LIST_FOR_EACH_SAFE(item, cursor, &table->rows)
{
MERGEROW *row = LIST_ENTRY(item, MERGEROW, entry);
struct merge_row *row = LIST_ENTRY(item, struct merge_row, entry);
list_remove(&row->entry);
msiobj_release(&row->data->hdr);
......@@ -1620,7 +1620,7 @@ static void merge_free_rows(MERGETABLE *table)
}
}
static void free_merge_table(MERGETABLE *table)
static void free_merge_table(struct merge_table *table)
{
UINT i;
......@@ -1654,13 +1654,13 @@ static void free_merge_table(MERGETABLE *table)
free(table);
}
static UINT get_merge_table(MSIDATABASE *db, const WCHAR *name, MERGETABLE **ptable)
static UINT get_merge_table(MSIDATABASE *db, const WCHAR *name, struct merge_table **ptable)
{
UINT r;
MERGETABLE *table;
struct merge_table *table;
MSIQUERY *mergeview = NULL;
table = calloc(1, sizeof(MERGETABLE));
table = calloc(1, sizeof(*table));
if (!table)
{
*ptable = NULL;
......@@ -1701,8 +1701,8 @@ err:
static UINT merge_diff_tables(MSIRECORD *rec, LPVOID param)
{
MERGEDATA *data = param;
MERGETABLE *table;
struct merge_data *data = param;
struct merge_table *table;
MSIQUERY *dbview = NULL;
MSIQUERY *mergeview = NULL;
LPCWSTR name;
......@@ -1754,7 +1754,7 @@ static UINT gather_merge_data(MSIDATABASE *db, MSIDATABASE *merge,
struct list *tabledata)
{
MSIQUERY *view;
MERGEDATA data;
struct merge_data data;
UINT r;
r = MSI_DatabaseOpenViewW(merge, L"SELECT * FROM `_Tables`", &view);
......@@ -1769,10 +1769,10 @@ static UINT gather_merge_data(MSIDATABASE *db, MSIDATABASE *merge,
return r;
}
static UINT merge_table(MSIDATABASE *db, MERGETABLE *table)
static UINT merge_table(MSIDATABASE *db, struct merge_table *table)
{
UINT r;
MERGEROW *row;
struct merge_row *row;
MSIVIEW *tv;
if (!TABLE_Exists(db, table->name))
......@@ -1782,7 +1782,7 @@ static UINT merge_table(MSIDATABASE *db, MERGETABLE *table)
return ERROR_FUNCTION_FAILED;
}
LIST_FOR_EACH_ENTRY(row, &table->rows, MERGEROW, entry)
LIST_FOR_EACH_ENTRY(row, &table->rows, struct merge_row, entry)
{
r = TABLE_CreateView(db, table->name, &tv);
if (r != ERROR_SUCCESS)
......@@ -1832,7 +1832,7 @@ UINT WINAPI MsiDatabaseMergeW( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, co
struct list tabledata = LIST_INIT(tabledata);
struct list *item, *cursor;
MSIDATABASE *db, *merge;
MERGETABLE *table;
struct merge_table *table;
BOOL conflicts;
UINT r;
......@@ -1854,7 +1854,7 @@ UINT WINAPI MsiDatabaseMergeW( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, co
goto done;
conflicts = FALSE;
LIST_FOR_EACH_ENTRY(table, &tabledata, MERGETABLE, entry)
LIST_FOR_EACH_ENTRY(table, &tabledata, struct merge_table, entry)
{
if (table->numconflicts)
{
......@@ -1875,7 +1875,7 @@ UINT WINAPI MsiDatabaseMergeW( MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, co
LIST_FOR_EACH_SAFE(item, cursor, &tabledata)
{
MERGETABLE *table = LIST_ENTRY(item, MERGETABLE, entry);
struct merge_table *table = LIST_ENTRY(item, struct merge_table, entry);
list_remove(&table->entry);
free_merge_table(table);
}
......
......@@ -48,16 +48,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
* that's a bug in the way I'm running the query, or a just a bug.
*/
typedef struct tagMSIDELETEVIEW
struct delete_view
{
MSIVIEW view;
MSIDATABASE *db;
MSIVIEW *table;
} MSIDELETEVIEW;
};
static UINT DELETE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
TRACE("%p %d %d %p\n", dv, row, col, val );
......@@ -66,7 +66,7 @@ static UINT DELETE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT
static UINT DELETE_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
TRACE("%p %d %d %p\n", dv, row, col, stm );
......@@ -75,7 +75,7 @@ static UINT DELETE_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, IS
static UINT DELETE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
UINT r, i, rows = 0, cols = 0;
TRACE("%p %p\n", dv, record);
......@@ -102,7 +102,7 @@ static UINT DELETE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
static UINT DELETE_close( struct tagMSIVIEW *view )
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
TRACE("%p\n", dv );
......@@ -114,7 +114,7 @@ static UINT DELETE_close( struct tagMSIVIEW *view )
static UINT DELETE_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
TRACE("%p %p %p\n", dv, rows, cols );
......@@ -129,7 +129,7 @@ static UINT DELETE_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *co
static UINT DELETE_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
TRACE("%p %d %p %p %p %p\n", dv, n, name, type, temporary, table_name );
......@@ -143,7 +143,7 @@ static UINT DELETE_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *na
static UINT DELETE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
MSIRECORD *rec, UINT row )
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
TRACE("%p %d %p\n", dv, eModifyMode, rec );
......@@ -152,7 +152,7 @@ static UINT DELETE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
static UINT DELETE_delete( struct tagMSIVIEW *view )
{
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
struct delete_view *dv = (struct delete_view *)view;
TRACE("%p\n", dv );
......@@ -189,7 +189,7 @@ static const MSIVIEWOPS delete_ops =
UINT DELETE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table )
{
MSIDELETEVIEW *dv = NULL;
struct delete_view *dv = NULL;
TRACE("%p\n", dv );
......
......@@ -35,25 +35,25 @@
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
typedef struct tagDISTINCTSET
struct distinct_set
{
UINT val;
UINT count;
UINT row;
struct tagDISTINCTSET *nextrow;
struct tagDISTINCTSET *nextcol;
} DISTINCTSET;
struct distinct_set *nextrow;
struct distinct_set *nextcol;
};
typedef struct tagMSIDISTINCTVIEW
struct distinct_view
{
MSIVIEW view;
MSIDATABASE *db;
MSIVIEW *table;
UINT row_count;
UINT *translation;
} MSIDISTINCTVIEW;
};
static DISTINCTSET ** distinct_insert( DISTINCTSET **x, UINT val, UINT row )
static struct distinct_set **distinct_insert( struct distinct_set **x, UINT val, UINT row )
{
/* horrible O(n) find */
while( *x )
......@@ -67,7 +67,7 @@ static DISTINCTSET ** distinct_insert( DISTINCTSET **x, UINT val, UINT row )
}
/* nothing found, so add one */
*x = malloc( sizeof(DISTINCTSET) );
*x = malloc( sizeof(**x) );
if( *x )
{
(*x)->val = val;
......@@ -79,11 +79,11 @@ static DISTINCTSET ** distinct_insert( DISTINCTSET **x, UINT val, UINT row )
return x;
}
static void distinct_free( DISTINCTSET *x )
static void distinct_free( struct distinct_set *x )
{
while( x )
{
DISTINCTSET *next = x->nextrow;
struct distinct_set *next = x->nextrow;
distinct_free( x->nextcol );
free( x );
x = next;
......@@ -92,7 +92,7 @@ static void distinct_free( DISTINCTSET *x )
static UINT DISTINCT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
{
MSIDISTINCTVIEW *dv = (MSIDISTINCTVIEW*)view;
struct distinct_view *dv = (struct distinct_view *)view;
TRACE("%p %d %d %p\n", dv, row, col, val );
......@@ -109,9 +109,9 @@ static UINT DISTINCT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UIN
static UINT DISTINCT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSIDISTINCTVIEW *dv = (MSIDISTINCTVIEW*)view;
struct distinct_view *dv = (struct distinct_view *)view;
UINT r, i, j, r_count, c_count;
DISTINCTSET *rowset = NULL;
struct distinct_set *rowset = NULL;
TRACE("%p %p\n", dv, record);
......@@ -133,7 +133,7 @@ static UINT DISTINCT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
/* build it */
for( i=0; i<r_count; i++ )
{
DISTINCTSET **x = &rowset;
struct distinct_set **x = &rowset;
for( j=1; j<=c_count; j++ )
{
......@@ -171,7 +171,7 @@ static UINT DISTINCT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
static UINT DISTINCT_close( struct tagMSIVIEW *view )
{
MSIDISTINCTVIEW *dv = (MSIDISTINCTVIEW*)view;
struct distinct_view *dv = (struct distinct_view *)view;
TRACE("%p\n", dv );
......@@ -187,7 +187,7 @@ static UINT DISTINCT_close( struct tagMSIVIEW *view )
static UINT DISTINCT_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
{
MSIDISTINCTVIEW *dv = (MSIDISTINCTVIEW*)view;
struct distinct_view *dv = (struct distinct_view *)view;
TRACE("%p %p %p\n", dv, rows, cols );
......@@ -207,7 +207,7 @@ static UINT DISTINCT_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *
static UINT DISTINCT_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSIDISTINCTVIEW *dv = (MSIDISTINCTVIEW*)view;
struct distinct_view *dv = (struct distinct_view *)view;
TRACE("%p %d %p %p %p %p\n", dv, n, name, type, temporary, table_name );
......@@ -221,7 +221,7 @@ static UINT DISTINCT_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *
static UINT DISTINCT_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
MSIRECORD *rec, UINT row )
{
MSIDISTINCTVIEW *dv = (MSIDISTINCTVIEW*)view;
struct distinct_view *dv = (struct distinct_view *)view;
TRACE("%p %d %p\n", dv, eModifyMode, rec );
......@@ -233,7 +233,7 @@ static UINT DISTINCT_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
static UINT DISTINCT_delete( struct tagMSIVIEW *view )
{
MSIDISTINCTVIEW *dv = (MSIDISTINCTVIEW*)view;
struct distinct_view *dv = (struct distinct_view *)view;
TRACE("%p\n", dv );
......@@ -272,7 +272,7 @@ static const MSIVIEWOPS distinct_ops =
UINT DISTINCT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table )
{
MSIDISTINCTVIEW *dv = NULL;
struct distinct_view *dv = NULL;
UINT count = 0, r;
TRACE("%p\n", dv );
......
......@@ -34,18 +34,18 @@
WINE_DEFAULT_DEBUG_CHANNEL(msidb);
typedef struct tagMSIDROPVIEW
struct drop_view
{
MSIVIEW view;
MSIDATABASE *db;
MSIVIEW *table;
column_info *colinfo;
INT hold;
} MSIDROPVIEW;
};
static UINT DROP_execute(struct tagMSIVIEW *view, MSIRECORD *record)
{
MSIDROPVIEW *dv = (MSIDROPVIEW*)view;
struct drop_view *dv = (struct drop_view *)view;
UINT r;
TRACE("%p %p\n", dv, record);
......@@ -62,7 +62,7 @@ static UINT DROP_execute(struct tagMSIVIEW *view, MSIRECORD *record)
static UINT DROP_close(struct tagMSIVIEW *view)
{
MSIDROPVIEW *dv = (MSIDROPVIEW*)view;
struct drop_view *dv = (struct drop_view *)view;
TRACE("%p\n", dv);
......@@ -71,7 +71,7 @@ static UINT DROP_close(struct tagMSIVIEW *view)
static UINT DROP_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
{
MSIDROPVIEW *dv = (MSIDROPVIEW*)view;
struct drop_view *dv = (struct drop_view *)view;
TRACE("%p %p %p\n", dv, rows, cols);
......@@ -80,7 +80,7 @@ static UINT DROP_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
static UINT DROP_delete( struct tagMSIVIEW *view )
{
MSIDROPVIEW *dv = (MSIDROPVIEW*)view;
struct drop_view *dv = (struct drop_view *)view;
TRACE("%p\n", dv );
......@@ -117,7 +117,7 @@ static const MSIVIEWOPS drop_ops =
UINT DROP_CreateView(MSIDATABASE *db, MSIVIEW **view, LPCWSTR name)
{
MSIDROPVIEW *dv;
struct drop_view *dv;
UINT r;
TRACE("%p %s\n", view, debugstr_w(name));
......
......@@ -851,14 +851,14 @@ done:
#define is_dot_dir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))))
typedef struct
struct file_list
{
struct list entry;
LPWSTR sourcename;
LPWSTR destname;
LPWSTR source;
LPWSTR dest;
} FILE_LIST;
};
static BOOL move_file( MSIPACKAGE *package, const WCHAR *source, const WCHAR *dest, int options )
{
......@@ -913,31 +913,31 @@ static WCHAR *wildcard_to_file( const WCHAR *wildcard, const WCHAR *filename )
return path;
}
static void free_file_entry(FILE_LIST *file)
static void free_file_entry(struct file_list *file)
{
free(file->source);
free(file->dest);
free(file);
}
static void free_list(FILE_LIST *list)
static void free_list(struct file_list *list)
{
while (!list_empty(&list->entry))
{
FILE_LIST *file = LIST_ENTRY(list_head(&list->entry), FILE_LIST, entry);
struct file_list *file = LIST_ENTRY(list_head(&list->entry), struct file_list, entry);
list_remove(&file->entry);
free_file_entry(file);
}
}
static BOOL add_wildcard( FILE_LIST *files, const WCHAR *source, WCHAR *dest )
static BOOL add_wildcard( struct file_list *files, const WCHAR *source, WCHAR *dest )
{
FILE_LIST *new, *file;
struct file_list *new, *file;
WCHAR *ptr, *filename;
DWORD size;
new = calloc(1, sizeof(FILE_LIST));
new = calloc(1, sizeof(*new));
if (!new)
return FALSE;
......@@ -969,7 +969,7 @@ static BOOL add_wildcard( FILE_LIST *files, const WCHAR *source, WCHAR *dest )
return TRUE;
}
LIST_FOR_EACH_ENTRY(file, &files->entry, FILE_LIST, entry)
LIST_FOR_EACH_ENTRY(file, &files->entry, struct file_list, entry)
{
if (wcscmp( source, file->source ) < 0)
{
......@@ -988,7 +988,7 @@ static BOOL move_files_wildcard( MSIPACKAGE *package, const WCHAR *source, WCHAR
HANDLE hfile;
LPWSTR path;
BOOL res;
FILE_LIST files, *file;
struct file_list files, *file;
DWORD size;
hfile = msi_find_first_file( package, source, &wfd );
......@@ -1016,7 +1016,7 @@ static BOOL move_files_wildcard( MSIPACKAGE *package, const WCHAR *source, WCHAR
goto done;
/* only the first wildcard match gets renamed to dest */
file = LIST_ENTRY(list_head(&files.entry), FILE_LIST, entry);
file = LIST_ENTRY(list_head(&files.entry), struct file_list, entry);
size = (wcsrchr(file->dest, '\\') - file->dest) + lstrlenW(file->destname) + 2;
file->dest = realloc(file->dest, size * sizeof(WCHAR));
if (!file->dest)
......@@ -1034,7 +1034,7 @@ static BOOL move_files_wildcard( MSIPACKAGE *package, const WCHAR *source, WCHAR
while (!list_empty(&files.entry))
{
file = LIST_ENTRY(list_head(&files.entry), FILE_LIST, entry);
file = LIST_ENTRY(list_head(&files.entry), struct file_list, entry);
move_file( package, file->source, file->dest, options );
......
......@@ -28,40 +28,43 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi);
typedef struct _tagTT_OFFSET_TABLE {
struct offset_table
{
USHORT uMajorVersion;
USHORT uMinorVersion;
USHORT uNumOfTables;
USHORT uSearchRange;
USHORT uEntrySelector;
USHORT uRangeShift;
} TT_OFFSET_TABLE;
};
typedef struct _tagTT_TABLE_DIRECTORY {
struct table_directory
{
char szTag[4]; /* table name */
ULONG uCheckSum; /* Check sum */
ULONG uOffset; /* Offset from beginning of file */
ULONG uLength; /* length of the table in bytes */
} TT_TABLE_DIRECTORY;
};
typedef struct _tagTT_NAME_TABLE_HEADER {
struct name_table_header
{
USHORT uFSelector; /* format selector. Always 0 */
USHORT uNRCount; /* Name Records count */
USHORT uStorageOffset; /* Offset for strings storage,
* from start of the table */
} TT_NAME_TABLE_HEADER;
USHORT uStorageOffset; /* Offset for strings storage from start of the table */
};
#define NAME_ID_FULL_FONT_NAME 4
#define NAME_ID_VERSION 5
typedef struct _tagTT_NAME_RECORD {
struct name_record
{
USHORT uPlatformID;
USHORT uEncodingID;
USHORT uLanguageID;
USHORT uNameID;
USHORT uStringLength;
USHORT uStringOffset; /* from start of storage area */
} TT_NAME_RECORD;
};
#define SWAPWORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x))
#define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x)))
......@@ -72,11 +75,11 @@ typedef struct _tagTT_NAME_RECORD {
*/
static WCHAR *load_ttf_name_id( MSIPACKAGE *package, const WCHAR *filename, DWORD id )
{
TT_TABLE_DIRECTORY tblDir;
struct table_directory tblDir;
BOOL bFound = FALSE;
TT_OFFSET_TABLE ttOffsetTable;
TT_NAME_TABLE_HEADER ttNTHeader;
TT_NAME_RECORD ttRecord;
struct offset_table ttOffsetTable;
struct name_table_header ttNTHeader;
struct name_record ttRecord;
DWORD dwRead;
HANDLE handle;
LPWSTR ret = NULL;
......@@ -92,7 +95,7 @@ static WCHAR *load_ttf_name_id( MSIPACKAGE *package, const WCHAR *filename, DWOR
return NULL;
}
if (!ReadFile(handle,&ttOffsetTable, sizeof(TT_OFFSET_TABLE),&dwRead,NULL))
if (!ReadFile(handle,&ttOffsetTable, sizeof(struct offset_table),&dwRead,NULL))
goto end;
ttOffsetTable.uNumOfTables = SWAPWORD(ttOffsetTable.uNumOfTables);
......@@ -105,7 +108,7 @@ static WCHAR *load_ttf_name_id( MSIPACKAGE *package, const WCHAR *filename, DWOR
for (i=0; i< ttOffsetTable.uNumOfTables; i++)
{
if (!ReadFile(handle,&tblDir, sizeof(TT_TABLE_DIRECTORY),&dwRead,NULL))
if (!ReadFile(handle, &tblDir, sizeof(tblDir), &dwRead, NULL))
break;
if (memcmp(tblDir.szTag,"name",4)==0)
{
......@@ -120,14 +123,14 @@ static WCHAR *load_ttf_name_id( MSIPACKAGE *package, const WCHAR *filename, DWOR
goto end;
SetFilePointer(handle, tblDir.uOffset, NULL, FILE_BEGIN);
if (!ReadFile(handle,&ttNTHeader, sizeof(TT_NAME_TABLE_HEADER), &dwRead,NULL))
if (!ReadFile(handle, &ttNTHeader, sizeof(ttNTHeader), &dwRead, NULL))
goto end;
ttNTHeader.uNRCount = SWAPWORD(ttNTHeader.uNRCount);
ttNTHeader.uStorageOffset = SWAPWORD(ttNTHeader.uStorageOffset);
for(i=0; i<ttNTHeader.uNRCount; i++)
{
if (!ReadFile(handle,&ttRecord, sizeof(TT_NAME_RECORD),&dwRead,NULL))
if (!ReadFile(handle, &ttRecord, sizeof(ttRecord), &dwRead, NULL))
break;
ttRecord.uNameID = SWAPWORD(ttRecord.uNameID);
......
......@@ -54,7 +54,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
#define left_type(x) (x & 0xF0)
typedef struct _tagFORMAT
struct format
{
MSIPACKAGE *package;
MSIRECORD *record;
......@@ -64,9 +64,9 @@ typedef struct _tagFORMAT
BOOL propfailed;
BOOL groupfailed;
int groups;
} FORMAT;
};
typedef struct _tagFORMSTR
struct form_str
{
struct list entry;
int n;
......@@ -74,25 +74,25 @@ typedef struct _tagFORMSTR
int type;
BOOL propfound;
BOOL nonprop;
} FORMSTR;
};
typedef struct _tagSTACK
struct stack
{
struct list items;
} STACK;
};
static STACK *create_stack(void)
static struct stack *create_stack(void)
{
STACK *stack = malloc(sizeof(STACK));
struct stack *stack = malloc(sizeof(*stack));
list_init(&stack->items);
return stack;
}
static void free_stack(STACK *stack)
static void free_stack(struct stack *stack)
{
while (!list_empty(&stack->items))
{
FORMSTR *str = LIST_ENTRY(list_head(&stack->items), FORMSTR, entry);
struct form_str *str = LIST_ENTRY(list_head(&stack->items), struct form_str, entry);
list_remove(&str->entry);
free(str);
}
......@@ -100,28 +100,28 @@ static void free_stack(STACK *stack)
free(stack);
}
static void stack_push(STACK *stack, FORMSTR *str)
static void stack_push(struct stack *stack, struct form_str *str)
{
list_add_head(&stack->items, &str->entry);
}
static FORMSTR *stack_pop(STACK *stack)
static struct form_str *stack_pop(struct stack *stack)
{
FORMSTR *ret;
struct form_str *ret;
if (list_empty(&stack->items))
return NULL;
ret = LIST_ENTRY(list_head(&stack->items), FORMSTR, entry);
ret = LIST_ENTRY(list_head(&stack->items), struct form_str, entry);
list_remove(&ret->entry);
return ret;
}
static FORMSTR *stack_find(STACK *stack, int type)
static struct form_str *stack_find(struct stack *stack, int type)
{
FORMSTR *str;
struct form_str *str;
LIST_FOR_EACH_ENTRY(str, &stack->items, FORMSTR, entry)
LIST_FOR_EACH_ENTRY(str, &stack->items, struct form_str, entry)
{
if (str->type == type)
return str;
......@@ -130,17 +130,17 @@ static FORMSTR *stack_find(STACK *stack, int type)
return NULL;
}
static FORMSTR *stack_peek(STACK *stack)
static struct form_str *stack_peek(struct stack *stack)
{
return LIST_ENTRY(list_head(&stack->items), FORMSTR, entry);
return LIST_ENTRY(list_head(&stack->items), struct form_str, entry);
}
static LPCWSTR get_formstr_data(FORMAT *format, FORMSTR *str)
static const WCHAR *get_formstr_data(struct format *format, struct form_str *str)
{
return &format->deformatted[str->n];
}
static WCHAR *dup_formstr( FORMAT *format, FORMSTR *str, int *ret_len )
static WCHAR *dup_formstr( struct format *format, struct form_str *str, int *ret_len )
{
WCHAR *val;
......@@ -154,7 +154,7 @@ static WCHAR *dup_formstr( FORMAT *format, FORMSTR *str, int *ret_len )
return val;
}
static WCHAR *deformat_index( FORMAT *format, FORMSTR *str, int *ret_len )
static WCHAR *deformat_index( struct format *format, struct form_str *str, int *ret_len )
{
WCHAR *val, *ret;
DWORD len;
......@@ -180,7 +180,7 @@ static WCHAR *deformat_index( FORMAT *format, FORMSTR *str, int *ret_len )
return ret;
}
static WCHAR *deformat_property( FORMAT *format, FORMSTR *str, int *ret_len )
static WCHAR *deformat_property( struct format *format, struct form_str *str, int *ret_len )
{
WCHAR *prop, *ret;
DWORD len = 0;
......@@ -203,7 +203,7 @@ static WCHAR *deformat_property( FORMAT *format, FORMSTR *str, int *ret_len )
return ret;
}
static WCHAR *deformat_component( FORMAT *format, FORMSTR *str, int *ret_len )
static WCHAR *deformat_component( struct format *format, struct form_str *str, int *ret_len )
{
WCHAR *key, *ret;
MSICOMPONENT *comp;
......@@ -227,7 +227,7 @@ static WCHAR *deformat_component( FORMAT *format, FORMSTR *str, int *ret_len )
return ret;
}
static WCHAR *deformat_file( FORMAT *format, FORMSTR *str, BOOL shortname, int *ret_len )
static WCHAR *deformat_file( struct format *format, struct form_str *str, BOOL shortname, int *ret_len )
{
WCHAR *key, *ret = NULL;
const MSIFILE *file;
......@@ -257,7 +257,7 @@ done:
return ret;
}
static WCHAR *deformat_environment( FORMAT *format, FORMSTR *str, int *ret_len )
static WCHAR *deformat_environment( struct format *format, struct form_str *str, int *ret_len )
{
WCHAR *key, *ret = NULL;
DWORD len;
......@@ -275,7 +275,7 @@ static WCHAR *deformat_environment( FORMAT *format, FORMSTR *str, int *ret_len )
return ret;
}
static WCHAR *deformat_literal( FORMAT *format, FORMSTR *str, BOOL *propfound,
static WCHAR *deformat_literal( struct format *format, struct form_str *str, BOOL *propfound,
int *type, int *len )
{
LPCWSTR data = get_formstr_data(format, str);
......@@ -389,10 +389,10 @@ static BOOL format_is_literal(WCHAR x)
return (format_is_alpha(x) || format_is_number(x));
}
static int format_lex(FORMAT *format, FORMSTR **out)
static int format_lex(struct format *format, struct form_str **out)
{
int type, len = 1;
FORMSTR *str;
struct form_str *str;
LPCWSTR data;
WCHAR ch;
......@@ -401,7 +401,7 @@ static int format_lex(FORMAT *format, FORMSTR **out)
if (!format->deformatted)
return FORMAT_NULL;
*out = calloc(1, sizeof(FORMSTR));
*out = calloc(1, sizeof(**out));
if (!*out)
return FORMAT_FAIL;
......@@ -473,10 +473,10 @@ static int format_lex(FORMAT *format, FORMSTR **out)
return type;
}
static FORMSTR *format_replace( FORMAT *format, BOOL propfound, BOOL nonprop,
int oldsize, int type, WCHAR *replace, int len )
static struct form_str *format_replace( struct format *format, BOOL propfound, BOOL nonprop,
int oldsize, int type, WCHAR *replace, int len )
{
FORMSTR *ret;
struct form_str *ret;
LPWSTR str, ptr;
DWORD size = 0;
int n;
......@@ -533,7 +533,7 @@ static FORMSTR *format_replace( FORMAT *format, BOOL propfound, BOOL nonprop,
if (!replace)
return NULL;
ret = calloc(1, sizeof(FORMSTR));
ret = calloc(1, sizeof(*ret));
if (!ret)
return NULL;
......@@ -546,12 +546,12 @@ static FORMSTR *format_replace( FORMAT *format, BOOL propfound, BOOL nonprop,
return ret;
}
static WCHAR *replace_stack_group( FORMAT *format, STACK *values,
static WCHAR *replace_stack_group( struct format *format, struct stack *values,
BOOL *propfound, BOOL *nonprop,
int *oldsize, int *type, int *len )
{
WCHAR *replaced;
FORMSTR *content, *node;
struct form_str *content, *node;
int n;
*nonprop = FALSE;
......@@ -575,7 +575,7 @@ static WCHAR *replace_stack_group( FORMAT *format, STACK *values,
free(node);
}
content = calloc(1, sizeof(FORMSTR));
content = calloc(1, sizeof(*content));
content->n = n;
content->len = *oldsize;
content->type = FORMAT_LITERAL;
......@@ -616,12 +616,12 @@ static WCHAR *replace_stack_group( FORMAT *format, STACK *values,
return replaced;
}
static WCHAR *replace_stack_prop( FORMAT *format, STACK *values,
static WCHAR *replace_stack_prop( struct format *format, struct stack *values,
BOOL *propfound, BOOL *nonprop,
int *oldsize, int *type, int *len )
{
WCHAR *replaced;
FORMSTR *content, *node;
struct form_str *content, *node;
int n;
*propfound = FALSE;
......@@ -644,7 +644,7 @@ static WCHAR *replace_stack_prop( FORMAT *format, STACK *values,
free(node);
}
content = calloc(1, sizeof(FORMSTR));
content = calloc(1, sizeof(*content));
content->n = n + 1;
content->len = *oldsize - 2;
content->type = *type;
......@@ -676,10 +676,10 @@ static WCHAR *replace_stack_prop( FORMAT *format, STACK *values,
return replaced;
}
static UINT replace_stack(FORMAT *format, STACK *stack, STACK *values)
static UINT replace_stack(struct format *format, struct stack *stack, struct stack *values)
{
WCHAR *replaced = NULL;
FORMSTR *beg, *top, *node;
struct form_str *beg, *top, *node;
BOOL propfound = FALSE, nonprop = FALSE, group = FALSE;
int type, n, len = 0, oldsize = 0;
......@@ -757,10 +757,10 @@ static DWORD deformat_string_internal(MSIPACKAGE *package, LPCWSTR ptr,
WCHAR** data, DWORD *len,
MSIRECORD* record)
{
FORMAT format;
FORMSTR *str = NULL;
STACK *stack, *temp;
FORMSTR *node;
struct format format;
struct form_str *str = NULL;
struct stack *stack, *temp;
struct form_str *node;
int type;
if (!ptr)
......@@ -773,7 +773,7 @@ static DWORD deformat_string_internal(MSIPACKAGE *package, LPCWSTR ptr,
*data = wcsdup(ptr);
*len = lstrlenW(ptr);
ZeroMemory(&format, sizeof(FORMAT));
ZeroMemory(&format, sizeof(format));
format.package = package;
format.record = record;
format.deformatted = *data;
......
......@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
/* below is the query interface to a table */
typedef struct tagMSIINSERTVIEW
struct insert_view
{
MSIVIEW view;
MSIVIEW *table;
......@@ -46,11 +46,11 @@ typedef struct tagMSIINSERTVIEW
BOOL bIsTemp;
MSIVIEW *sv;
column_info *vals;
} MSIINSERTVIEW;
};
static UINT INSERT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
struct insert_view *iv = (struct insert_view *)view;
TRACE("%p %d %d %p\n", iv, row, col, val );
......@@ -106,7 +106,7 @@ err:
/* checks to see if the column order specified in the INSERT query
* matches the column order of the table
*/
static BOOL columns_in_order(MSIINSERTVIEW *iv, UINT col_count)
static BOOL columns_in_order(struct insert_view *iv, UINT col_count)
{
LPCWSTR a, b;
UINT i;
......@@ -124,7 +124,7 @@ static BOOL columns_in_order(MSIINSERTVIEW *iv, UINT col_count)
/* rearranges the data in the record to be inserted based on column order,
* and pads the record for any missing columns in the INSERT query
*/
static UINT arrange_record(MSIINSERTVIEW *iv, MSIRECORD **values)
static UINT arrange_record(struct insert_view *iv, MSIRECORD **values)
{
MSIRECORD *padded;
UINT col_count, val_count;
......@@ -176,7 +176,7 @@ err:
return r;
}
static BOOL row_has_null_primary_keys(MSIINSERTVIEW *iv, MSIRECORD *row)
static BOOL row_has_null_primary_keys(struct insert_view *iv, MSIRECORD *row)
{
UINT r, i, col_count, type;
......@@ -203,7 +203,7 @@ static BOOL row_has_null_primary_keys(MSIINSERTVIEW *iv, MSIRECORD *row)
static UINT INSERT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
struct insert_view *iv = (struct insert_view *)view;
UINT r, row = -1, col_count = 0;
MSIVIEW *sv;
MSIRECORD *values = NULL;
......@@ -251,7 +251,7 @@ err:
static UINT INSERT_close( struct tagMSIVIEW *view )
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
struct insert_view *iv = (struct insert_view *)view;
MSIVIEW *sv;
TRACE("%p\n", iv);
......@@ -265,7 +265,7 @@ static UINT INSERT_close( struct tagMSIVIEW *view )
static UINT INSERT_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
struct insert_view *iv = (struct insert_view *)view;
MSIVIEW *sv;
TRACE("%p %p %p\n", iv, rows, cols );
......@@ -280,7 +280,7 @@ static UINT INSERT_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *co
static UINT INSERT_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
struct insert_view *iv = (struct insert_view *)view;
MSIVIEW *sv;
TRACE("%p %d %p %p %p %p\n", iv, n, name, type, temporary, table_name );
......@@ -294,7 +294,7 @@ static UINT INSERT_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *na
static UINT INSERT_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *rec, UINT row)
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
struct insert_view *iv = (struct insert_view *)view;
TRACE("%p %d %p\n", iv, eModifyMode, rec );
......@@ -303,7 +303,7 @@ static UINT INSERT_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRE
static UINT INSERT_delete( struct tagMSIVIEW *view )
{
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
struct insert_view *iv = (struct insert_view *)view;
MSIVIEW *sv;
TRACE("%p\n", iv );
......@@ -351,7 +351,7 @@ static UINT count_column_info( const column_info *ci )
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
column_info *columns, column_info *values, BOOL temp )
{
MSIINSERTVIEW *iv = NULL;
struct insert_view *iv = NULL;
UINT r;
MSIVIEW *tv = NULL, *sv = NULL;
......
......@@ -4005,17 +4005,17 @@ UINT WINAPI MsiReinstallFeatureA( const char *szProduct, const char *szFeature,
return rc;
}
typedef struct
struct md5_ctx
{
unsigned int i[2];
unsigned int buf[4];
unsigned char in[64];
unsigned char digest[16];
} MD5_CTX;
};
extern VOID WINAPI MD5Init( MD5_CTX *);
extern VOID WINAPI MD5Update( MD5_CTX *, const unsigned char *, unsigned int );
extern VOID WINAPI MD5Final( MD5_CTX *);
extern void WINAPI MD5Init( struct md5_ctx * );
extern void WINAPI MD5Update( struct md5_ctx *, const unsigned char *, unsigned int );
extern void WINAPI MD5Final( struct md5_ctx * );
UINT msi_get_filehash( MSIPACKAGE *package, const WCHAR *path, MSIFILEHASHINFO *hash )
{
......@@ -4039,7 +4039,7 @@ UINT msi_get_filehash( MSIPACKAGE *package, const WCHAR *path, MSIFILEHASHINFO *
{
if ((p = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, length )))
{
MD5_CTX ctx;
struct md5_ctx ctx;
MD5Init( &ctx );
MD5Update( &ctx, p, length );
......
......@@ -87,20 +87,21 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
typedef struct tagIClassFactoryImpl {
struct class_factory
{
IClassFactory IClassFactory_iface;
HRESULT (*create_object)( IUnknown*, LPVOID* );
} IClassFactoryImpl;
HRESULT (*create_object)( IUnknown *, void ** );
};
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
static inline struct class_factory *impl_from_IClassFactory(IClassFactory *iface)
{
return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
return CONTAINING_RECORD(iface, struct class_factory, IClassFactory_iface);
}
static HRESULT WINAPI MsiCF_QueryInterface(LPCLASSFACTORY iface,
REFIID riid,LPVOID *ppobj)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
struct class_factory *This = impl_from_IClassFactory(iface);
TRACE("%p %s %p\n",This,debugstr_guid(riid),ppobj);
......@@ -129,7 +130,7 @@ static ULONG WINAPI MsiCF_Release(LPCLASSFACTORY iface)
static HRESULT WINAPI MsiCF_CreateInstance(LPCLASSFACTORY iface,
LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
struct class_factory *This = impl_from_IClassFactory(iface);
IUnknown *unk = NULL;
HRESULT r;
......@@ -165,7 +166,7 @@ static const IClassFactoryVtbl MsiCF_Vtbl =
MsiCF_LockServer
};
static IClassFactoryImpl MsiServer_CF = { { &MsiCF_Vtbl }, create_msiserver };
static struct class_factory MsiServer_CF = { { &MsiCF_Vtbl }, create_msiserver };
/******************************************************************
* DllGetClassObject [MSI.@]
......
......@@ -573,11 +573,11 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
return filename;
}
typedef struct tagLANGANDCODEPAGE
struct lang_codepage
{
WORD wLanguage;
WORD wCodePage;
} LANGANDCODEPAGE;
};
static void set_msi_assembly_prop(MSIPACKAGE *package)
{
......@@ -586,7 +586,7 @@ static void set_msi_assembly_prop(MSIPACKAGE *package)
LPVOID version = NULL;
WCHAR buf[MAX_PATH];
LPWSTR fusion, verstr;
LANGANDCODEPAGE *translate;
struct lang_codepage *translate;
fusion = get_fusion_filename(package);
if (!fusion)
......
......@@ -68,7 +68,6 @@ struct complex_expr
struct expr *right;
};
struct tagJOINTABLE;
union ext_column
{
struct
......@@ -79,7 +78,7 @@ union ext_column
struct
{
UINT column;
struct tagJOINTABLE *table;
struct join_table *table;
} parsed;
};
......
......@@ -50,18 +50,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
#endif
/*
* MsiActiveScriptSite - Our IActiveScriptSite implementation.
* struct script_site - Our IActiveScriptSite implementation.
*/
typedef struct {
struct script_site
{
IActiveScriptSite IActiveScriptSite_iface;
IDispatch *installer;
IDispatch *session;
LONG ref;
} MsiActiveScriptSite;
};
static inline MsiActiveScriptSite *impl_from_IActiveScriptSite( IActiveScriptSite *iface )
static inline struct script_site *impl_from_IActiveScriptSite( IActiveScriptSite *iface )
{
return CONTAINING_RECORD(iface, MsiActiveScriptSite, IActiveScriptSite_iface);
return CONTAINING_RECORD(iface, struct script_site, IActiveScriptSite_iface);
}
/*
......@@ -69,7 +70,7 @@ static inline MsiActiveScriptSite *impl_from_IActiveScriptSite( IActiveScriptSit
*/
static HRESULT WINAPI MsiActiveScriptSite_QueryInterface(IActiveScriptSite* iface, REFIID riid, void** obj)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
......@@ -88,7 +89,7 @@ static HRESULT WINAPI MsiActiveScriptSite_QueryInterface(IActiveScriptSite* ifac
static ULONG WINAPI MsiActiveScriptSite_AddRef(IActiveScriptSite* iface)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE( "(%p)->(%lu)\n", This, ref );
return ref;
......@@ -96,7 +97,7 @@ static ULONG WINAPI MsiActiveScriptSite_AddRef(IActiveScriptSite* iface)
static ULONG WINAPI MsiActiveScriptSite_Release(IActiveScriptSite* iface)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE( "(%p)->(%lu)\n", This, ref );
......@@ -109,14 +110,14 @@ static ULONG WINAPI MsiActiveScriptSite_Release(IActiveScriptSite* iface)
static HRESULT WINAPI MsiActiveScriptSite_GetLCID(IActiveScriptSite* iface, LCID* plcid)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
TRACE("(%p)->(%p)\n", This, plcid);
return E_NOTIMPL; /* Script will use system-defined locale */
}
static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo(IActiveScriptSite* iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown** ppiunkItem, ITypeInfo** ppti)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
TRACE( "(%p)->(%p, %lu, %p, %p)\n", This, pstrName, dwReturnMask, ppiunkItem, ppti );
......@@ -149,14 +150,14 @@ static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo(IActiveScriptSite* iface,
static HRESULT WINAPI MsiActiveScriptSite_GetDocVersionString(IActiveScriptSite* iface, BSTR* pbstrVersion)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
TRACE("(%p)->(%p)\n", This, pbstrVersion);
return E_NOTIMPL;
}
static HRESULT WINAPI MsiActiveScriptSite_OnScriptTerminate(IActiveScriptSite* iface, const VARIANT* pvarResult, const EXCEPINFO* pexcepinfo)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
TRACE("(%p)->(%p, %p)\n", This, pvarResult, pexcepinfo);
return S_OK;
}
......@@ -198,7 +199,7 @@ static HRESULT WINAPI MsiActiveScriptSite_OnStateChange(IActiveScriptSite* iface
static HRESULT WINAPI MsiActiveScriptSite_OnScriptError(IActiveScriptSite* iface, IActiveScriptError* pscripterror)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
EXCEPINFO exception;
HRESULT hr;
......@@ -219,14 +220,14 @@ static HRESULT WINAPI MsiActiveScriptSite_OnScriptError(IActiveScriptSite* iface
static HRESULT WINAPI MsiActiveScriptSite_OnEnterScript(IActiveScriptSite* iface)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
TRACE("(%p)\n", This);
return S_OK;
}
static HRESULT WINAPI MsiActiveScriptSite_OnLeaveScript(IActiveScriptSite* iface)
{
MsiActiveScriptSite *This = impl_from_IActiveScriptSite(iface);
struct script_site *This = impl_from_IActiveScriptSite(iface);
TRACE("(%p)\n", This);
return S_OK;
}
......@@ -246,15 +247,15 @@ static const struct IActiveScriptSiteVtbl activescriptsitevtbl =
MsiActiveScriptSite_OnLeaveScript
};
static HRESULT create_activescriptsite(MsiActiveScriptSite **obj)
static HRESULT create_activescriptsite(struct script_site **obj)
{
MsiActiveScriptSite* object;
struct script_site *object;
TRACE("(%p)\n", obj);
*obj = NULL;
object = malloc(sizeof(MsiActiveScriptSite));
object = malloc(sizeof(*object));
if (!object)
return E_OUTOFMEMORY;
......@@ -290,7 +291,7 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function
HRESULT hr;
IActiveScript *pActiveScript = NULL;
IActiveScriptParse *pActiveScriptParse = NULL;
MsiActiveScriptSite *scriptsite;
struct script_site *scriptsite;
IDispatch *pDispatch = NULL;
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
DISPID dispid;
......
......@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
/* below is the query interface to a table */
typedef struct tagMSISELECTVIEW
struct select_view
{
MSIVIEW view;
MSIDATABASE *db;
......@@ -46,9 +46,9 @@ typedef struct tagMSISELECTVIEW
UINT num_cols;
UINT max_cols;
UINT cols[1];
} MSISELECTVIEW;
};
static UINT translate_record( MSISELECTVIEW *sv, MSIRECORD *in, MSIRECORD **out )
static UINT translate_record( struct select_view *sv, MSIRECORD *in, MSIRECORD **out )
{
UINT r, col_count, i;
MSIRECORD *object;
......@@ -74,7 +74,7 @@ static UINT translate_record( MSISELECTVIEW *sv, MSIRECORD *in, MSIRECORD **out
static UINT SELECT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
TRACE("%p %d %d %p\n", sv, row, col, val );
......@@ -95,7 +95,7 @@ static UINT SELECT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT
static UINT SELECT_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
TRACE("%p %d %d %p\n", sv, row, col, stm );
......@@ -116,7 +116,7 @@ static UINT SELECT_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, IS
static UINT SELECT_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
UINT i, expanded_mask = 0, r = ERROR_SUCCESS, col_count = 0;
MSIRECORD *expanded;
......@@ -158,7 +158,7 @@ static UINT SELECT_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
static UINT SELECT_insert_row( struct tagMSIVIEW *view, MSIRECORD *record, UINT row, BOOL temporary )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
UINT table_cols, r;
MSIRECORD *outrec;
......@@ -183,7 +183,7 @@ static UINT SELECT_insert_row( struct tagMSIVIEW *view, MSIRECORD *record, UINT
static UINT SELECT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
TRACE("%p %p\n", sv, record);
......@@ -195,7 +195,7 @@ static UINT SELECT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
static UINT SELECT_close( struct tagMSIVIEW *view )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
TRACE("%p\n", sv );
......@@ -207,7 +207,7 @@ static UINT SELECT_close( struct tagMSIVIEW *view )
static UINT SELECT_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
TRACE("%p %p %p\n", sv, rows, cols );
......@@ -223,7 +223,7 @@ static UINT SELECT_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *co
static UINT SELECT_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
TRACE("%p %d %p %p %p %p\n", sv, n, name, type, temporary, table_name );
......@@ -248,7 +248,7 @@ static UINT SELECT_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *na
UINT msi_select_update(MSIVIEW *view, MSIRECORD *rec, UINT row)
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
UINT r, i, col, type, val;
IStream *stream;
LPCWSTR str;
......@@ -295,7 +295,7 @@ UINT msi_select_update(MSIVIEW *view, MSIRECORD *rec, UINT row)
static UINT SELECT_modify( struct tagMSIVIEW *view, MSIMODIFY mode,
MSIRECORD *rec, UINT row )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
MSIRECORD *table_rec;
UINT r;
......@@ -336,7 +336,7 @@ static UINT SELECT_modify( struct tagMSIVIEW *view, MSIMODIFY mode,
static UINT SELECT_delete( struct tagMSIVIEW *view )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
struct select_view *sv = (struct select_view *)view;
TRACE("%p\n", sv );
......@@ -372,8 +372,7 @@ static const MSIVIEWOPS select_ops =
NULL,
};
static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name,
LPCWSTR table_name )
static UINT SELECT_AddColumn( struct select_view *sv, const WCHAR *name, const WCHAR *table_name )
{
UINT r, n;
MSIVIEW *table;
......@@ -423,14 +422,14 @@ static int select_count_columns( const column_info *col )
UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
const column_info *columns )
{
MSISELECTVIEW *sv = NULL;
struct select_view *sv = NULL;
UINT count = 0, r = ERROR_SUCCESS;
TRACE("%p\n", sv );
count = select_count_columns( columns );
sv = calloc( 1, offsetof( MSISELECTVIEW, cols[count] ) );
sv = calloc( 1, offsetof( struct select_view, cols[count] ) );
if( !sv )
return ERROR_FUNCTION_FAILED;
......
......@@ -42,13 +42,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
* These apis are defined in MSI 3.0
*/
typedef struct tagMediaInfo
struct media_info
{
struct list entry;
LPWSTR path;
WCHAR szIndex[10];
DWORD index;
} media_info;
};
static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions,
MSIINSTALLCONTEXT context, BOOL create)
......@@ -937,17 +937,16 @@ static void free_source_list(struct list *sourcelist)
{
while (!list_empty(sourcelist))
{
media_info *info = LIST_ENTRY(list_head(sourcelist), media_info, entry);
struct media_info *info = LIST_ENTRY(list_head(sourcelist), struct media_info, entry);
list_remove(&info->entry);
free(info->path);
free(info);
}
}
static void add_source_to_list(struct list *sourcelist, media_info *info,
DWORD *index)
static void add_source_to_list(struct list *sourcelist, struct media_info *info, DWORD *index)
{
media_info *iter;
struct media_info *iter;
BOOL found = FALSE;
if (index) *index = 0;
......@@ -958,7 +957,7 @@ static void add_source_to_list(struct list *sourcelist, media_info *info,
return;
}
LIST_FOR_EACH_ENTRY(iter, sourcelist, media_info, entry)
LIST_FOR_EACH_ENTRY(iter, sourcelist, struct media_info, entry)
{
if (!found && info->index < iter->index)
{
......@@ -983,7 +982,7 @@ static UINT fill_source_list(struct list *sourcelist, HKEY sourcekey, DWORD *cou
DWORD index = 0;
WCHAR name[10];
DWORD size, val_size;
media_info *entry;
struct media_info *entry;
*count = 0;
......@@ -994,7 +993,7 @@ static UINT fill_source_list(struct list *sourcelist, HKEY sourcekey, DWORD *cou
if (r != ERROR_SUCCESS)
return r;
entry = malloc(sizeof(media_info));
entry = malloc(sizeof(*entry));
if (!entry)
goto error;
......@@ -1037,7 +1036,7 @@ UINT WINAPI MsiSourceListAddSourceExW( const WCHAR *szProduct, const WCHAR *szUs
HKEY sourcekey, typekey;
UINT rc;
struct list sourcelist;
media_info *info;
struct media_info *info;
WCHAR *source, squashed_pc[SQUASHED_GUID_SIZE], name[10];
LPCWSTR postfix;
DWORD size, count, index;
......@@ -1118,7 +1117,7 @@ UINT WINAPI MsiSourceListAddSourceExW( const WCHAR *szProduct, const WCHAR *szUs
else
{
swprintf(name, ARRAY_SIZE(name), L"%d", dwIndex);
info = malloc(sizeof(media_info));
info = malloc(sizeof(*info));
if (!info)
{
rc = ERROR_OUTOFMEMORY;
......@@ -1130,7 +1129,7 @@ UINT WINAPI MsiSourceListAddSourceExW( const WCHAR *szProduct, const WCHAR *szUs
info->index = dwIndex;
add_source_to_list(&sourcelist, info, &index);
LIST_FOR_EACH_ENTRY(info, &sourcelist, media_info, entry)
LIST_FOR_EACH_ENTRY(info, &sourcelist, struct media_info, entry)
{
if (info->index < index)
continue;
......
......@@ -40,23 +40,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
#define NUM_STORAGES_COLS 2
#define MAX_STORAGES_NAME_LEN 62
typedef struct tabSTORAGE
struct storage
{
UINT str_index;
IStorage *storage;
} STORAGE;
typedef struct tagMSISTORAGESVIEW
struct storages_view
{
MSIVIEW view;
MSIDATABASE *db;
STORAGE *storages;
struct storage *storages;
UINT max_storages;
UINT num_rows;
UINT row_size;
} MSISTORAGESVIEW;
};
static BOOL storages_set_table_size(MSISTORAGESVIEW *sv, UINT size)
static BOOL storages_set_table_size(struct storages_view *sv, UINT size)
{
if (size >= sv->max_storages)
{
......@@ -71,7 +71,7 @@ static BOOL storages_set_table_size(MSISTORAGESVIEW *sv, UINT size)
static UINT STORAGES_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT *val)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
TRACE("(%p, %d, %d, %p)\n", view, row, col, val);
......@@ -88,7 +88,7 @@ static UINT STORAGES_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT
static UINT STORAGES_fetch_stream(struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
TRACE("(%p, %d, %d, %p)\n", view, row, col, stm);
......@@ -155,7 +155,7 @@ done:
static UINT STORAGES_set_stream( MSIVIEW *view, UINT row, UINT col, IStream *stream )
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
IStorage *stg, *substg, *prev;
const WCHAR *name;
HRESULT hr;
......@@ -195,7 +195,7 @@ static UINT STORAGES_set_stream( MSIVIEW *view, UINT row, UINT col, IStream *str
static UINT STORAGES_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
IStorage *stg, *substg = NULL, *prev;
IStream *stm;
LPWSTR name = NULL;
......@@ -259,7 +259,7 @@ done:
static UINT STORAGES_insert_row(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row, BOOL temporary)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
if (!storages_set_table_size(sv, ++sv->num_rows))
return ERROR_FUNCTION_FAILED;
......@@ -294,7 +294,7 @@ static UINT STORAGES_close(struct tagMSIVIEW *view)
static UINT STORAGES_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
TRACE("(%p, %p, %p)\n", view, rows, cols);
......@@ -330,7 +330,7 @@ static UINT STORAGES_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *
return ERROR_SUCCESS;
}
static UINT storages_find_row(MSISTORAGESVIEW *sv, MSIRECORD *rec, UINT *row)
static UINT storages_find_row(struct storages_view *sv, MSIRECORD *rec, UINT *row)
{
LPCWSTR str;
UINT r, i, id, data;
......@@ -356,7 +356,7 @@ static UINT storages_find_row(MSISTORAGESVIEW *sv, MSIRECORD *rec, UINT *row)
static UINT storages_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
UINT r, row;
r = storages_find_row(sv, rec, &row);
......@@ -368,7 +368,7 @@ static UINT storages_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
static UINT storages_modify_assign(struct tagMSIVIEW *view, MSIRECORD *rec)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
UINT r, row;
r = storages_find_row(sv, rec, &row);
......@@ -420,7 +420,7 @@ static UINT STORAGES_modify(struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIR
static UINT STORAGES_delete(struct tagMSIVIEW *view)
{
MSISTORAGESVIEW *sv = (MSISTORAGESVIEW *)view;
struct storages_view *sv = (struct storages_view *)view;
UINT i;
TRACE("(%p)\n", view);
......@@ -461,7 +461,7 @@ static const MSIVIEWOPS storages_ops =
NULL,
};
static INT add_storages_to_table(MSISTORAGESVIEW *sv)
static INT add_storages_to_table(struct storages_view *sv)
{
IEnumSTATSTG *stgenum = NULL;
STATSTG stat;
......@@ -514,12 +514,12 @@ static INT add_storages_to_table(MSISTORAGESVIEW *sv)
UINT STORAGES_CreateView(MSIDATABASE *db, MSIVIEW **view)
{
MSISTORAGESVIEW *sv;
struct storages_view *sv;
INT rows;
TRACE("(%p, %p)\n", db, view);
sv = calloc(1, sizeof(MSISTORAGESVIEW));
sv = calloc(1, sizeof(*sv));
if (!sv)
return ERROR_FUNCTION_FAILED;
......
......@@ -38,12 +38,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
#define NUM_STREAMS_COLS 2
typedef struct tagMSISTREAMSVIEW
struct streams_view
{
MSIVIEW view;
MSIDATABASE *db;
UINT num_cols;
} MSISTREAMSVIEW;
};
static BOOL streams_resize_table( MSIDATABASE *db, UINT size )
{
......@@ -67,7 +67,7 @@ static BOOL streams_resize_table( MSIDATABASE *db, UINT size )
static UINT STREAMS_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT *val)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
TRACE("(%p, %d, %d, %p)\n", view, row, col, val);
......@@ -84,7 +84,7 @@ static UINT STREAMS_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT
static UINT STREAMS_fetch_stream(struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
LARGE_INTEGER pos;
HRESULT hr;
......@@ -112,7 +112,7 @@ static UINT STREAMS_set_string( struct tagMSIVIEW *view, UINT row, UINT col, con
static UINT STREAMS_set_stream( MSIVIEW *view, UINT row, UINT col, IStream *stream )
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
IStream *prev;
TRACE("view %p, row %u, col %u, stream %p.\n", view, row, col, stream);
......@@ -125,7 +125,7 @@ static UINT STREAMS_set_stream( MSIVIEW *view, UINT row, UINT col, IStream *stre
static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
TRACE("(%p, %d, %p, %08x)\n", view, row, rec, mask);
......@@ -162,7 +162,7 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
return ERROR_SUCCESS;
}
static UINT streams_find_row( MSISTREAMSVIEW *sv, MSIRECORD *rec, UINT *row )
static UINT streams_find_row( struct streams_view *sv, MSIRECORD *rec, UINT *row )
{
const WCHAR *str;
UINT r, i, id, val;
......@@ -188,7 +188,7 @@ static UINT streams_find_row( MSISTREAMSVIEW *sv, MSIRECORD *rec, UINT *row )
static UINT STREAMS_insert_row(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row, BOOL temporary)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
UINT i, r, num_rows = sv->db->num_streams + 1;
TRACE("(%p, %p, %d, %d)\n", view, rec, row, temporary);
......@@ -218,7 +218,7 @@ static UINT STREAMS_insert_row(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row
static UINT STREAMS_delete_row(struct tagMSIVIEW *view, UINT row)
{
MSIDATABASE *db = ((MSISTREAMSVIEW *)view)->db;
MSIDATABASE *db = ((struct streams_view *)view)->db;
UINT i, num_rows = db->num_streams - 1;
const WCHAR *name;
WCHAR *encname;
......@@ -256,7 +256,7 @@ static UINT STREAMS_close(struct tagMSIVIEW *view)
static UINT STREAMS_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
TRACE("(%p, %p, %p)\n", view, rows, cols);
......@@ -269,7 +269,7 @@ static UINT STREAMS_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *co
static UINT STREAMS_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
TRACE("(%p, %d, %p, %p, %p, %p)\n", view, n, name, type, temporary, table_name);
......@@ -295,7 +295,7 @@ static UINT STREAMS_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *n
static UINT streams_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
UINT r, row;
r = streams_find_row(sv, rec, &row);
......@@ -307,7 +307,7 @@ static UINT streams_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
static UINT streams_modify_assign(struct tagMSIVIEW *view, MSIRECORD *rec)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
UINT r;
r = streams_find_row( sv, rec, NULL );
......@@ -362,7 +362,7 @@ static UINT STREAMS_modify(struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRE
static UINT STREAMS_delete(struct tagMSIVIEW *view)
{
MSISTREAMSVIEW *sv = (MSISTREAMSVIEW *)view;
struct streams_view *sv = (struct streams_view *)view;
TRACE("(%p)\n", view);
......@@ -538,7 +538,7 @@ UINT msi_get_stream( MSIDATABASE *db, const WCHAR *name, IStream **ret )
UINT STREAMS_CreateView(MSIDATABASE *db, MSIVIEW **view)
{
MSISTREAMSVIEW *sv;
struct streams_view *sv;
UINT r;
TRACE("(%p, %p)\n", db, view);
......@@ -547,7 +547,7 @@ UINT STREAMS_CreateView(MSIDATABASE *db, MSIVIEW **view)
if (r != ERROR_SUCCESS)
return r;
if (!(sv = calloc( 1, sizeof(MSISTREAMSVIEW) )))
if (!(sv = calloc( 1, sizeof(*sv) )))
return ERROR_OUTOFMEMORY;
sv->view.ops = &streams_ops;
......
......@@ -44,30 +44,35 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
#include "pshpack1.h"
typedef struct {
struct property_set_header
{
WORD wByteOrder;
WORD wFormat;
DWORD dwOSVer;
CLSID clsID;
DWORD reserved;
} PROPERTYSETHEADER;
};
typedef struct {
struct format_id_offset
{
FMTID fmtid;
DWORD dwOffset;
} FORMATIDOFFSET;
};
typedef struct {
struct property_section_header
{
DWORD cbSection;
DWORD cProperties;
} PROPERTYSECTIONHEADER;
};
typedef struct {
struct property_id_offset
{
DWORD propid;
DWORD dwOffset;
} PROPERTYIDOFFSET;
};
typedef struct {
struct property_data
{
DWORD type;
union {
INT i4;
......@@ -78,7 +83,7 @@ typedef struct {
BYTE str[1];
} str;
} u;
} PROPERTY_DATA;
};
#include "poppack.h"
......@@ -86,7 +91,7 @@ static HRESULT (WINAPI *pPropVariantChangeType)
(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc,
PROPVAR_CHANGE_FLAGS flags, VARTYPE vt);
#define SECT_HDR_SIZE (sizeof(PROPERTYSECTIONHEADER))
#define SECT_HDR_SIZE (sizeof(struct property_section_header))
static void free_prop( PROPVARIANT *prop )
{
......@@ -170,14 +175,14 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz
{
UINT type;
DWORD i, size;
PROPERTY_DATA *propdata;
struct property_data *propdata;
PROPVARIANT property, *ptr;
PROPVARIANT changed;
PROPERTYIDOFFSET *idofs;
PROPERTYSECTIONHEADER *section_hdr;
struct property_id_offset *idofs;
struct property_section_header *section_hdr;
section_hdr = (PROPERTYSECTIONHEADER*) &data[0];
idofs = (PROPERTYIDOFFSET*) &data[SECT_HDR_SIZE];
section_hdr = (struct property_section_header *) &data[0];
idofs = (struct property_id_offset *)&data[SECT_HDR_SIZE];
/* now set all the properties */
for( i = 0; i < section_hdr->cProperties; i++ )
......@@ -195,7 +200,7 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz
break;
}
propdata = (PROPERTY_DATA*) &data[ idofs[i].dwOffset ];
propdata = (struct property_data *)&data[ idofs[i].dwOffset ];
/* check we don't run off the end of the data */
size = sz - idofs[i].dwOffset - sizeof(DWORD);
......@@ -237,9 +242,9 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz
static UINT load_summary_info( MSISUMMARYINFO *si, IStream *stm )
{
PROPERTYSETHEADER set_hdr;
FORMATIDOFFSET format_hdr;
PROPERTYSECTIONHEADER section_hdr;
struct property_set_header set_hdr;
struct format_id_offset format_hdr;
struct property_section_header section_hdr;
LPBYTE data = NULL;
LARGE_INTEGER ofs;
ULONG count, sz;
......@@ -362,10 +367,10 @@ static UINT write_property_to_data( const PROPVARIANT *prop, LPBYTE data )
static UINT save_summary_info( const MSISUMMARYINFO * si, IStream *stm )
{
UINT ret = ERROR_FUNCTION_FAILED;
PROPERTYSETHEADER set_hdr;
FORMATIDOFFSET format_hdr;
PROPERTYSECTIONHEADER section_hdr;
PROPERTYIDOFFSET idofs[MSI_MAX_PROPS];
struct property_set_header set_hdr;
struct format_id_offset format_hdr;
struct property_section_header section_hdr;
struct property_id_offset idofs[MSI_MAX_PROPS];
LPBYTE data = NULL;
ULONG count, sz;
HRESULT r;
......
......@@ -29,8 +29,8 @@
** All the keywords of the SQL language are stored as in a hash
** table composed of instances of the following structure.
*/
typedef struct Keyword Keyword;
struct Keyword {
struct keyword
{
const WCHAR *name; /* The keyword name */
unsigned int len;
int tokenType; /* The token value for this keyword */
......@@ -43,7 +43,7 @@ struct Keyword {
** They MUST be in alphabetical order
*/
#define X(str) str, ARRAY_SIZE(str) - 1
static const Keyword aKeywordTable[] = {
static const struct keyword aKeywordTable[] = {
{ X(L"ADD"), TK_ADD },
{ X(L"ALTER"), TK_ALTER },
{ X(L"AND"), TK_AND },
......@@ -88,7 +88,7 @@ static const Keyword aKeywordTable[] = {
** Comparison function for binary search.
*/
static int __cdecl compKeyword(const void *m1, const void *m2){
const Keyword *k1 = m1, *k2 = m2;
const struct keyword *k1 = m1, *k2 = m2;
int ret, len = min( k1->len, k2->len );
if ((ret = wcsnicmp( k1->name, k2->name, len ))) return ret;
......@@ -103,7 +103,7 @@ static int __cdecl compKeyword(const void *m1, const void *m2){
** returned. If the input is not a keyword, TK_ID is returned.
*/
static int sqliteKeywordCode(const WCHAR *z, int n){
Keyword key, *r;
struct keyword key, *r;
if( n>MAX_TOKEN_LEN )
return TK_ID;
......@@ -111,7 +111,7 @@ static int sqliteKeywordCode(const WCHAR *z, int n){
key.tokenType = 0;
key.name = z;
key.len = n;
r = bsearch( &key, aKeywordTable, ARRAY_SIZE(aKeywordTable), sizeof(Keyword), compKeyword );
r = bsearch( &key, aKeywordTable, ARRAY_SIZE(aKeywordTable), sizeof(struct keyword), compKeyword );
if( r )
return r->tokenType;
return TK_ID;
......
......@@ -38,17 +38,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
/* below is the query interface to a table */
typedef struct tagMSIUPDATEVIEW
struct update_view
{
MSIVIEW view;
MSIDATABASE *db;
MSIVIEW *wv;
column_info *vals;
} MSIUPDATEVIEW;
};
static UINT UPDATE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
{
MSIUPDATEVIEW *uv = (MSIUPDATEVIEW*)view;
struct update_view *uv = (struct update_view *)view;
TRACE("%p %d %d %p\n", uv, row, col, val );
......@@ -57,7 +57,7 @@ static UINT UPDATE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT
static UINT UPDATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
{
MSIUPDATEVIEW *uv = (MSIUPDATEVIEW*)view;
struct update_view *uv = (struct update_view *)view;
UINT i, r, col_count = 0, row_count = 0;
MSIRECORD *values = NULL;
MSIRECORD *where = NULL;
......@@ -128,7 +128,7 @@ done:
static UINT UPDATE_close( struct tagMSIVIEW *view )
{
MSIUPDATEVIEW *uv = (MSIUPDATEVIEW*)view;
struct update_view *uv = (struct update_view *)view;
MSIVIEW *wv;
TRACE("%p\n", uv);
......@@ -142,7 +142,7 @@ static UINT UPDATE_close( struct tagMSIVIEW *view )
static UINT UPDATE_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
{
MSIUPDATEVIEW *uv = (MSIUPDATEVIEW*)view;
struct update_view *uv = (struct update_view *)view;
MSIVIEW *wv;
TRACE("%p %p %p\n", uv, rows, cols );
......@@ -157,7 +157,7 @@ static UINT UPDATE_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *co
static UINT UPDATE_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *name,
UINT *type, BOOL *temporary, LPCWSTR *table_name )
{
MSIUPDATEVIEW *uv = (MSIUPDATEVIEW*)view;
struct update_view *uv = (struct update_view *)view;
MSIVIEW *wv;
TRACE("%p %d %p %p %p %p\n", uv, n, name, type, temporary, table_name );
......@@ -172,7 +172,7 @@ static UINT UPDATE_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *na
static UINT UPDATE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
MSIRECORD *rec, UINT row )
{
MSIUPDATEVIEW *uv = (MSIUPDATEVIEW*)view;
struct update_view *uv = (struct update_view *)view;
TRACE("%p %d %p\n", uv, eModifyMode, rec );
......@@ -181,7 +181,7 @@ static UINT UPDATE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
static UINT UPDATE_delete( struct tagMSIVIEW *view )
{
MSIUPDATEVIEW *uv = (MSIUPDATEVIEW*)view;
struct update_view *uv = (struct update_view *)view;
MSIVIEW *wv;
TRACE("%p\n", uv );
......@@ -220,7 +220,7 @@ static const MSIVIEWOPS update_ops =
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
column_info *columns, struct expr *expr )
{
MSIUPDATEVIEW *uv = NULL;
struct update_view *uv = NULL;
UINT r;
MSIVIEW *sv = NULL, *wv = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment