diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-12-08 15:53:06 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-10 14:01:30 +0100 |
commit | 3fd04bf98a826f766f8a656c262b89cba38db284 (patch) | |
tree | 4b04f804a40e90d023f8430a835a26719b4fa22e /libmsi | |
parent | 3bafbe496107b4a74790fb79b22d986c864bb460 (diff) | |
download | msitools-3fd04bf98a826f766f8a656c262b89cba38db284.tar.gz msitools-3fd04bf98a826f766f8a656c262b89cba38db284.tar.xz msitools-3fd04bf98a826f766f8a656c262b89cba38db284.zip |
Prefer glib macros over custom one
Diffstat (limited to 'libmsi')
-rw-r--r-- | libmsi/database.c | 12 | ||||
-rw-r--r-- | libmsi/msipriv.h | 6 |
2 files changed, 6 insertions, 12 deletions
diff --git a/libmsi/database.c b/libmsi/database.c index 1dafd91..b52251b 100644 --- a/libmsi/database.c +++ b/libmsi/database.c @@ -650,10 +650,10 @@ LibmsiResult _libmsi_database_start_transaction(LibmsiDatabase *db, const char * db->outfile = stg; g_object_ref(G_OBJECT(db->outfile)); - if (!strstr( szPersist, DIRSEP )) + if (!strstr( szPersist, G_DIR_SEPARATOR_S )) { getcwd( path, MAX_PATH ); - strcat( path, DIRSEP ); + strcat( path, G_DIR_SEPARATOR_S ); strcat( path, szPersist ); } else @@ -702,10 +702,10 @@ LibmsiResult libmsi_database_open(const char *szDBPath, const char *szPersist, L goto end; } - if (!strstr( szDBPath, DIRSEP )) + if (!strstr( szDBPath, G_DIR_SEPARATOR_S )) { getcwd( path, MAX_PATH ); - strcat( path, DIRSEP ); + strcat( path, G_DIR_SEPARATOR_S ); strcat( path, szDBPath ); } else @@ -1051,7 +1051,7 @@ static char *msi_import_stream_filename(const char *path, const char *name) msi_free (fullname); return NULL; } - strcpy( ptr, DIRSEP ); + strcpy( ptr, G_DIR_SEPARATOR_S ); strcat( ptr, name ); return fullname; } @@ -1175,7 +1175,7 @@ static unsigned _libmsi_database_import(LibmsiDatabase *db, const char *folder, return LIBMSI_RESULT_OUTOFMEMORY; strcpy( path, folder ); - strcat( path, DIRSEP ); + strcat( path, G_DIR_SEPARATOR_S ); strcat( path, file ); data = msi_read_text_archive( path, &len ); diff --git a/libmsi/msipriv.h b/libmsi/msipriv.h index 2c6a462..89642e6 100644 --- a/libmsi/msipriv.h +++ b/libmsi/msipriv.h @@ -42,12 +42,6 @@ #include "libmsi.h" #include "list.h" -#ifdef _WIN32 -#define DIRSEP "\\" -#else -#define DIRSEP "/" -#endif - #pragma GCC visibility push(hidden) #ifndef MAX_PATH |