summaryrefslogtreecommitdiffstats
path: root/libmsi
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-23 11:25:34 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-12-06 20:26:29 +0100
commit30557984c4dac095c98ba7ba25afa6948d6f9934 (patch)
tree4e490c92fbeb44efef0e53fbbe10f938e7822425 /libmsi
parentb19defc32740225273c7efa63a784de18cde3dd1 (diff)
downloadmsitools-30557984c4dac095c98ba7ba25afa6948d6f9934.tar.gz
msitools-30557984c4dac095c98ba7ba25afa6948d6f9934.tar.xz
msitools-30557984c4dac095c98ba7ba25afa6948d6f9934.zip
get rid of the stupid Win32 CHAR type
Diffstat (limited to 'libmsi')
-rw-r--r--libmsi/database.c12
-rw-r--r--libmsi/msipriv.h10
-rw-r--r--libmsi/msiquery.c10
-rw-r--r--libmsi/record.c12
-rw-r--r--libmsi/string.c10
-rw-r--r--libmsi/suminfo.c12
-rw-r--r--libmsi/tokenize.c2
7 files changed, 34 insertions, 34 deletions
diff --git a/libmsi/database.c b/libmsi/database.c
index efdfe52..e51a081 100644
--- a/libmsi/database.c
+++ b/libmsi/database.c
@@ -466,7 +466,7 @@ unsigned MsiOpenDatabaseW(const WCHAR *szDBPath, const WCHAR *szPersist, MSIOBJE
return ret;
}
-unsigned MsiOpenDatabaseA(const CHAR *szDBPath, const CHAR *szPersist, MSIOBJECT **phDB)
+unsigned MsiOpenDatabaseA(const char *szDBPath, const char *szPersist, MSIOBJECT **phDB)
{
HRESULT r = ERROR_FUNCTION_FAILED;
WCHAR *szwDBPath = NULL;
@@ -503,7 +503,7 @@ end:
static WCHAR *msi_read_text_archive(const WCHAR *path, unsigned *len)
{
HANDLE file;
- CHAR *data = NULL;
+ char *data = NULL;
WCHAR *wdata = NULL;
unsigned read, size = 0;
@@ -1042,7 +1042,7 @@ unsigned MsiDatabaseImportW(MSIOBJECT *handle, const WCHAR *szFolder, const WCHA
}
unsigned MsiDatabaseImportA( MSIOBJECT *handle,
- const CHAR *szFolder, const CHAR *szFilename )
+ const char *szFolder, const char *szFilename )
{
WCHAR *path = NULL;
WCHAR *file = NULL;
@@ -1251,8 +1251,8 @@ unsigned MsiDatabaseExportW( MSIOBJECT *handle, const WCHAR *szTable,
return r;
}
-unsigned MsiDatabaseExportA( MSIOBJECT *handle, const CHAR *szTable,
- const CHAR *szFolder, const CHAR *szFilename )
+unsigned MsiDatabaseExportA( MSIOBJECT *handle, const char *szTable,
+ const char *szFolder, const char *szFilename )
{
WCHAR *path = NULL;
WCHAR *file = NULL;
@@ -1294,7 +1294,7 @@ end:
}
unsigned MsiDatabaseMergeA(MSIOBJECT *hDatabase, MSIOBJECT *hDatabaseMerge,
- const CHAR *szTableName)
+ const char *szTableName)
{
unsigned r;
WCHAR *table;
diff --git a/libmsi/msipriv.h b/libmsi/msipriv.h
index 865efbf..511dd96 100644
--- a/libmsi/msipriv.h
+++ b/libmsi/msipriv.h
@@ -284,7 +284,7 @@ typedef struct tagMSISUMMARYINFO
typedef struct {
BOOL unicode;
union {
- CHAR *a;
+ char *a;
WCHAR *w;
} str;
} awstring;
@@ -292,7 +292,7 @@ typedef struct {
typedef struct {
BOOL unicode;
union {
- const CHAR *a;
+ const char *a;
const WCHAR *w;
} str;
} awcstring;
@@ -356,7 +356,7 @@ extern unsigned MSI_RecordSetIntPtr( MSIRECORD *, unsigned, intptr_t );
extern unsigned MSI_RecordSetStringW( MSIRECORD *, unsigned, const WCHAR *);
extern BOOL MSI_RecordIsNull( MSIRECORD *, unsigned );
extern unsigned MSI_RecordGetStringW( MSIRECORD *, unsigned, WCHAR *, unsigned *);
-extern unsigned MSI_RecordGetStringA( MSIRECORD *, unsigned, CHAR *, unsigned *);
+extern unsigned MSI_RecordGetStringA( MSIRECORD *, unsigned, char *, unsigned *);
extern int MSI_RecordGetInteger( MSIRECORD *, unsigned );
extern intptr_t MSI_RecordGetIntPtr( MSIRECORD *, unsigned );
extern unsigned MSI_RecordReadStream( MSIRECORD *, unsigned, char *, unsigned *);
@@ -549,7 +549,7 @@ static inline BOOL msi_free( void *mem )
static inline char *strdupWtoA( const WCHAR *str )
{
- CHAR *ret = NULL;
+ char *ret = NULL;
unsigned len;
if (!str) return ret;
@@ -560,7 +560,7 @@ static inline char *strdupWtoA( const WCHAR *str )
return ret;
}
-static inline WCHAR *strdupAtoW( const CHAR *str )
+static inline WCHAR *strdupAtoW( const char *str )
{
WCHAR *ret = NULL;
unsigned len;
diff --git a/libmsi/msiquery.c b/libmsi/msiquery.c
index a4f22b5..be9428b 100644
--- a/libmsi/msiquery.c
+++ b/libmsi/msiquery.c
@@ -85,7 +85,7 @@ unsigned VIEW_find_column( MSIVIEW *table, const WCHAR *name, const WCHAR *table
}
unsigned MsiDatabaseOpenViewA(MSIOBJECT *hdb,
- const CHAR *szQuery, MSIOBJECT **phView)
+ const char *szQuery, MSIOBJECT **phView)
{
unsigned r;
WCHAR *szwQuery;
@@ -640,7 +640,7 @@ MSIDBERROR MsiViewGetErrorW( MSIOBJECT *handle, WCHAR *buffer, unsigned *buflen
return r;
}
-MSIDBERROR MsiViewGetErrorA( MSIOBJECT *handle, CHAR *buffer, unsigned *buflen )
+MSIDBERROR MsiViewGetErrorA( MSIOBJECT *handle, char *buffer, unsigned *buflen )
{
MSIQUERY *query;
const WCHAR *column;
@@ -729,7 +729,7 @@ unsigned MsiDatabaseApplyTransformW( MSIOBJECT *hdb,
}
unsigned MsiDatabaseApplyTransformA( MSIOBJECT *hdb,
- const CHAR *szTransformFile, int iErrorCond)
+ const char *szTransformFile, int iErrorCond)
{
WCHAR *wstr;
unsigned ret;
@@ -878,7 +878,7 @@ unsigned MsiDatabaseGetPrimaryKeysW( MSIOBJECT *hdb,
}
unsigned MsiDatabaseGetPrimaryKeysA(MSIOBJECT *hdb,
- const CHAR *table, MSIOBJECT **phRec)
+ const char *table, MSIOBJECT **phRec)
{
WCHAR *szwTable = NULL;
unsigned r;
@@ -898,7 +898,7 @@ unsigned MsiDatabaseGetPrimaryKeysA(MSIOBJECT *hdb,
}
MSICONDITION MsiDatabaseIsTablePersistentA(
- MSIOBJECT *hDatabase, const CHAR *szTableName)
+ MSIOBJECT *hDatabase, const char *szTableName)
{
WCHAR *szwTableName = NULL;
MSICONDITION r;
diff --git a/libmsi/record.c b/libmsi/record.c
index c3f71a6..66cfb8f 100644
--- a/libmsi/record.c
+++ b/libmsi/record.c
@@ -368,10 +368,10 @@ BOOL MsiRecordIsNull( MSIOBJECT *handle, unsigned iField )
}
unsigned MSI_RecordGetStringA(MSIRECORD *rec, unsigned iField,
- CHAR *szValue, unsigned *pcchValue)
+ char *szValue, unsigned *pcchValue)
{
unsigned len=0, ret;
- CHAR buffer[16];
+ char buffer[16];
TRACE("%p %d %p %p\n", rec, iField, szValue, pcchValue);
@@ -421,7 +421,7 @@ unsigned MSI_RecordGetStringA(MSIRECORD *rec, unsigned iField,
}
unsigned MsiRecordGetStringA(MSIOBJECT *handle, unsigned iField,
- CHAR *szValue, unsigned *pcchValue)
+ char *szValue, unsigned *pcchValue)
{
MSIRECORD *rec;
unsigned ret;
@@ -564,7 +564,7 @@ unsigned MsiRecordDataSize(MSIOBJECT *handle, unsigned iField)
return ret;
}
-static unsigned MSI_RecordSetStringA( MSIRECORD *rec, unsigned iField, const CHAR *szValue )
+static unsigned MSI_RecordSetStringA( MSIRECORD *rec, unsigned iField, const char *szValue )
{
WCHAR *str;
@@ -589,7 +589,7 @@ static unsigned MSI_RecordSetStringA( MSIRECORD *rec, unsigned iField, const CHA
return 0;
}
-unsigned MsiRecordSetStringA( MSIOBJECT *handle, unsigned iField, const CHAR *szValue )
+unsigned MsiRecordSetStringA( MSIOBJECT *handle, unsigned iField, const char *szValue )
{
MSIRECORD *rec;
unsigned ret;
@@ -752,7 +752,7 @@ unsigned MSI_RecordSetStreamFromFileW(MSIRECORD *rec, unsigned iField, const WCH
return ERROR_SUCCESS;
}
-unsigned MsiRecordSetStreamA(MSIOBJECT *hRecord, unsigned iField, const CHAR *szFilename)
+unsigned MsiRecordSetStreamA(MSIOBJECT *hRecord, unsigned iField, const char *szFilename)
{
WCHAR *wstr = NULL;
unsigned ret;
diff --git a/libmsi/string.c b/libmsi/string.c
index 26ce375..875fcee 100644
--- a/libmsi/string.c
+++ b/libmsi/string.c
@@ -213,7 +213,7 @@ static void set_st_entry( string_table *st, unsigned n, WCHAR *str, uint16_t ref
st->freeslot = n + 1;
}
-static unsigned msi_string2idA( const string_table *st, const CHAR *buffer, unsigned *id )
+static unsigned msi_string2idA( const string_table *st, const char *buffer, unsigned *id )
{
unsigned sz;
unsigned r = ERROR_INVALID_PARAMETER;
@@ -241,7 +241,7 @@ static unsigned msi_string2idA( const string_table *st, const CHAR *buffer, unsi
return r;
}
-static int msi_addstring( string_table *st, unsigned n, const CHAR *data, int len, uint16_t refcount, enum StringPersistence persistence )
+static int msi_addstring( string_table *st, unsigned n, const char *data, int len, uint16_t refcount, enum StringPersistence persistence )
{
WCHAR *str;
int sz;
@@ -357,7 +357,7 @@ const WCHAR *msi_string_lookup_id( const string_table *st, unsigned id )
*
* Returned string is not nul terminated.
*/
-static unsigned msi_id2stringA( const string_table *st, unsigned id, CHAR *buffer, unsigned *sz )
+static unsigned msi_id2stringA( const string_table *st, unsigned id, char *buffer, unsigned *sz )
{
unsigned len, lenW;
const WCHAR *str;
@@ -466,7 +466,7 @@ HRESULT msi_init_string_table( IStorage *stg )
string_table *msi_load_string_table( IStorage *stg, unsigned *bytes_per_strref )
{
string_table *st = NULL;
- CHAR *data = NULL;
+ char *data = NULL;
uint16_t *pool = NULL;
unsigned r, datasize = 0, poolsize = 0, codepage;
unsigned i, count, offset, len, n, refs;
@@ -553,7 +553,7 @@ unsigned msi_save_string_table( const string_table *st, IStorage *storage, unsig
{
unsigned i, datasize = 0, poolsize = 0, sz, used, r, codepage, n;
unsigned ret = ERROR_FUNCTION_FAILED;
- CHAR *data = NULL;
+ char *data = NULL;
uint16_t *pool = NULL;
TRACE("\n");
diff --git a/libmsi/suminfo.c b/libmsi/suminfo.c
index 8c0e612..8d4bdcd 100644
--- a/libmsi/suminfo.c
+++ b/libmsi/suminfo.c
@@ -208,7 +208,7 @@ static void read_properties_from_data( PROPVARIANT *prop, uint8_t *data, unsigne
property.vt = propdata->type;
if( propdata->type == VT_LPSTR)
{
- CHAR *str = msi_alloc( propdata->u.str.len );
+ char *str = msi_alloc( propdata->u.str.len );
memcpy( str, propdata->u.str.str, propdata->u.str.len );
str[ propdata->u.str.len - 1 ] = 0;
property.pszVal = str;
@@ -322,7 +322,7 @@ static unsigned write_filetime( uint8_t *data, unsigned ofs, const FILETIME *ft
return 8;
}
-static unsigned write_string( uint8_t *data, unsigned ofs, const CHAR *str )
+static unsigned write_string( uint8_t *data, unsigned ofs, const char *str )
{
unsigned len = lstrlenA( str ) + 1;
write_dword( data, ofs, len );
@@ -496,7 +496,7 @@ unsigned MsiGetSummaryInformationW( MSIOBJECT *hDatabase,
}
unsigned MsiGetSummaryInformationA(MSIOBJECT *hDatabase,
- const CHAR *szDatabase, unsigned uiUpdateCount, MSIOBJECT **pHandle)
+ const char *szDatabase, unsigned uiUpdateCount, MSIOBJECT **pHandle)
{
WCHAR *szwDatabase = NULL;
unsigned ret;
@@ -647,7 +647,7 @@ WCHAR *msi_get_suminfo_product( IStorage *stg )
unsigned MsiSummaryInfoGetPropertyA(
MSIOBJECT *handle, unsigned uiProperty, unsigned *puiDataType, int *piValue,
- FILETIME *pftValue, CHAR *szValueBuf, unsigned *pcchValueBuf)
+ FILETIME *pftValue, char *szValueBuf, unsigned *pcchValueBuf)
{
awstring str;
@@ -765,7 +765,7 @@ unsigned MsiSummaryInfoSetPropertyW( MSIOBJECT *handle, unsigned uiProperty,
}
unsigned MsiSummaryInfoSetPropertyA( MSIOBJECT *handle, unsigned uiProperty,
- unsigned uiDataType, int iValue, FILETIME* pftValue, const CHAR *szValue )
+ unsigned uiDataType, int iValue, FILETIME* pftValue, const char *szValue )
{
awcstring str;
MSISUMMARYINFO *si;
@@ -951,7 +951,7 @@ unsigned MsiSummaryInfoPersist( MSIOBJECT *handle )
return ret;
}
-unsigned MsiCreateTransformSummaryInfoA( MSIOBJECT *db, MSIOBJECT *db_ref, const CHAR *transform, int error, int validation )
+unsigned MsiCreateTransformSummaryInfoA( MSIOBJECT *db, MSIOBJECT *db_ref, const char *transform, int error, int validation )
{
unsigned r;
WCHAR *transformW = NULL;
diff --git a/libmsi/tokenize.c b/libmsi/tokenize.c
index 93f5115..0ddf14e 100644
--- a/libmsi/tokenize.c
+++ b/libmsi/tokenize.c
@@ -93,7 +93,7 @@ static int compKeyword(const void *m1, const void *m2){
const char *q = k->zName;
for (; *p; p++, q++) {
- CHAR c;
+ char c;
if ((uint16_t) *p > 127)
return 1;
c = *p;