1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Rename pmloglevel_t to alpm_loglevel_t

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2011-06-28 14:41:07 +10:00
parent cd1e39ba62
commit 0aef91bc4f
10 changed files with 18 additions and 18 deletions

View File

@ -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, ...);
/*

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -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);

View File

@ -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) {

View File

@ -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) {

View File

@ -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;