From 0aef91bc4fc5e872afe7da1692bf97c027eecf37 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:41:07 +1000 Subject: Rename pmloglevel_t to alpm_loglevel_t Signed-off-by: Allan McRae --- lib/libalpm/alpm.h | 6 +++--- lib/libalpm/log.c | 2 +- lib/libalpm/log.h | 2 +- src/pacman/callback.c | 2 +- src/pacman/callback.h | 2 +- src/pacman/util.c | 8 ++++---- src/pacman/util.h | 8 ++++---- src/util/cleanupdelta.c | 2 +- src/util/testdb.c | 2 +- src/util/testpkg.c | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index d8fb8349..83dad5d8 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -173,14 +173,14 @@ typedef struct _alpm_backup_t { /** * Logging Levels */ -typedef enum _pmloglevel_t { +typedef enum _alpm_loglevel_t { PM_LOG_ERROR = 1, PM_LOG_WARNING = (1 << 1), PM_LOG_DEBUG = (1 << 2), PM_LOG_FUNCTION = (1 << 3) -} pmloglevel_t; +} alpm_loglevel_t; -typedef void (*alpm_cb_log)(pmloglevel_t, const char *, va_list); +typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list); int alpm_logaction(alpm_handle_t *handle, const char *fmt, ...); /* diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c index e8a6e429..eeeaef3c 100644 --- a/lib/libalpm/log.c +++ b/lib/libalpm/log.c @@ -83,7 +83,7 @@ int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *fmt, ...) /** @} */ -void _alpm_log(alpm_handle_t *handle, pmloglevel_t flag, const char *fmt, ...) +void _alpm_log(alpm_handle_t *handle, alpm_loglevel_t flag, const char *fmt, ...) { va_list args; diff --git a/lib/libalpm/log.h b/lib/libalpm/log.h index c0813689..a43290d8 100644 --- a/lib/libalpm/log.h +++ b/lib/libalpm/log.h @@ -22,7 +22,7 @@ #include "alpm.h" -void _alpm_log(alpm_handle_t *handle, pmloglevel_t flag, +void _alpm_log(alpm_handle_t *handle, alpm_loglevel_t flag, const char *fmt, ...) __attribute__((format(printf,3,4))); #endif /* _ALPM_LOG_H */ diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 0cc462d6..6b5546a6 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -655,7 +655,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total) } /* Callback to handle notifications from the library */ -void cb_log(pmloglevel_t level, const char *fmt, va_list args) +void cb_log(alpm_loglevel_t level, const char *fmt, va_list args) { if(!fmt || strlen(fmt) == 0) { return; diff --git a/src/pacman/callback.h b/src/pacman/callback.h index 1109a3b2..5e8acd7a 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -41,7 +41,7 @@ void cb_dl_total(off_t total); void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total); /* callback to handle messages/notifications from pacman library */ -void cb_log(pmloglevel_t level, const char *fmt, va_list args); +void cb_log(alpm_loglevel_t level, const char *fmt, va_list args); #endif /* _PM_CALLBACK_H */ diff --git a/src/pacman/util.c b/src/pacman/util.c index 1e6d1e18..5dceead3 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -1194,7 +1194,7 @@ int noyes(char *fmt, ...) return ret; } -int pm_printf(pmloglevel_t level, const char *format, ...) +int pm_printf(alpm_loglevel_t level, const char *format, ...) { int ret; va_list args; @@ -1207,7 +1207,7 @@ int pm_printf(pmloglevel_t level, const char *format, ...) return ret; } -int pm_fprintf(FILE *stream, pmloglevel_t level, const char *format, ...) +int pm_fprintf(FILE *stream, alpm_loglevel_t level, const char *format, ...) { int ret; va_list args; @@ -1236,7 +1236,7 @@ int pm_asprintf(char **string, const char *format, ...) return ret; } -int pm_vasprintf(char **string, pmloglevel_t level, const char *format, va_list args) +int pm_vasprintf(char **string, alpm_loglevel_t level, const char *format, va_list args) { int ret = 0; char *msg = NULL; @@ -1272,7 +1272,7 @@ int pm_vasprintf(char **string, pmloglevel_t level, const char *format, va_list return ret; } -int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list args) +int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list args) { int ret = 0; diff --git a/src/pacman/util.h b/src/pacman/util.h index 89ab903a..25e2f302 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -66,11 +66,11 @@ int select_question(int count); int multiselect_question(char *array, int count); int yesno(char *fmt, ...); int noyes(char *fmt, ...); -int pm_printf(pmloglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); -int pm_fprintf(FILE *stream, pmloglevel_t level, const char *format, ...) __attribute__((format(printf,3,4))); +int pm_printf(alpm_loglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); +int pm_fprintf(FILE *stream, alpm_loglevel_t level, const char *format, ...) __attribute__((format(printf,3,4))); int pm_asprintf(char **string, const char *format, ...); -int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); -int pm_vasprintf(char **string, pmloglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); +int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); +int pm_vasprintf(char **string, alpm_loglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); #ifndef HAVE_STRNDUP char *strndup(const char *s, size_t n); diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c index dcd849bb..43897730 100644 --- a/src/util/cleanupdelta.c +++ b/src/util/cleanupdelta.c @@ -39,7 +39,7 @@ static void cleanup(int signum) { exit(signum); } -static void output_cb(pmloglevel_t level, const char *fmt, va_list args) +static void output_cb(alpm_loglevel_t level, const char *fmt, va_list args) { if(strlen(fmt)) { switch(level) { diff --git a/src/util/testdb.c b/src/util/testdb.c index 38067911..c887f6d5 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -41,7 +41,7 @@ static void cleanup(int signum) { exit(signum); } -static void output_cb(pmloglevel_t level, const char *fmt, va_list args) +static void output_cb(alpm_loglevel_t level, const char *fmt, va_list args) { if(strlen(fmt)) { switch(level) { diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 972b2f47..70a395e8 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -24,7 +24,7 @@ #define BASENAME "testpkg" -static void output_cb(pmloglevel_t level, const char *fmt, va_list args) +static void output_cb(alpm_loglevel_t level, const char *fmt, va_list args) { if(fmt[0] == '\0') { return; -- cgit v1.2.3-70-g09d2