diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-02-17 22:35:26 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-02-17 22:35:26 +0000 |
commit | be39f49a5461d5804e4391266dfea6dd076691f4 (patch) | |
tree | 911a7f550895d9fdda7b4846d6775699549b2bf4 /lib/libalpm/package.c | |
parent | 5e4c3661c6066623bbfa34bacccfafda5be21315 (diff) | |
download | pacman-be39f49a5461d5804e4391266dfea6dd076691f4.tar.xz |
prepend library function names with _alpm (helped with the patch from VMiklos <vmiklos@frugalware.org>)
added log and event callbacks to sync_commit internal transactions
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r-- | lib/libalpm/package.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 91b57b0e..7767297a 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -35,7 +35,7 @@ #include "package.h" #include "alpm.h" -pmpkg_t *pkg_new(const char *name, const char *version) +pmpkg_t *_alpm_pkg_new(const char *name, const char *version) { pmpkg_t* pkg = NULL; @@ -79,7 +79,7 @@ pmpkg_t *pkg_new(const char *name, const char *version) return(pkg); } -pmpkg_t *pkg_dup(pmpkg_t *pkg) +pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg) { pmpkg_t* newpkg = NULL; @@ -118,7 +118,7 @@ pmpkg_t *pkg_dup(pmpkg_t *pkg) return(newpkg); } -void pkg_free(pmpkg_t *pkg) +void _alpm_pkg_free(pmpkg_t *pkg) { if(pkg == NULL) { return; @@ -185,11 +185,11 @@ static int parse_descfile(char *descfile, pmpkg_t *info, int output) } else if(!strcmp(key, "PKGDESC")) { STRNCPY(info->desc, ptr, sizeof(info->desc)); } else if(!strcmp(key, "GROUP")) { - info->groups = pm_list_add(info->groups, strdup(ptr)); + info->groups = _alpm_list_add(info->groups, strdup(ptr)); } else if(!strcmp(key, "URL")) { STRNCPY(info->url, ptr, sizeof(info->url)); } else if(!strcmp(key, "LICENSE")) { - info->license = pm_list_add(info->license, strdup(ptr)); + info->license = _alpm_list_add(info->license, strdup(ptr)); } else if(!strcmp(key, "BUILDDATE")) { STRNCPY(info->builddate, ptr, sizeof(info->builddate)); } else if(!strcmp(key, "INSTALLDATE")) { @@ -203,15 +203,15 @@ static int parse_descfile(char *descfile, pmpkg_t *info, int output) STRNCPY(tmp, ptr, sizeof(tmp)); info->size = atol(tmp); } else if(!strcmp(key, "DEPEND")) { - info->depends = pm_list_add(info->depends, strdup(ptr)); + info->depends = _alpm_list_add(info->depends, strdup(ptr)); } else if(!strcmp(key, "CONFLICT")) { - info->conflicts = pm_list_add(info->conflicts, strdup(ptr)); + info->conflicts = _alpm_list_add(info->conflicts, strdup(ptr)); } else if(!strcmp(key, "REPLACES")) { - info->replaces = pm_list_add(info->replaces, strdup(ptr)); + info->replaces = _alpm_list_add(info->replaces, strdup(ptr)); } else if(!strcmp(key, "PROVIDES")) { - info->provides = pm_list_add(info->provides, strdup(ptr)); + info->provides = _alpm_list_add(info->provides, strdup(ptr)); } else if(!strcmp(key, "BACKUP")) { - info->backup = pm_list_add(info->backup, strdup(ptr)); + info->backup = _alpm_list_add(info->backup, strdup(ptr)); } else { _alpm_log(PM_LOG_ERROR, "%s: syntax error in description file line %d", info->name[0] != '\0' ? info->name : "error", linenum); @@ -225,7 +225,7 @@ static int parse_descfile(char *descfile, pmpkg_t *info, int output) return(0); } -pmpkg_t *pkg_load(char *pkgfile) +pmpkg_t *_alpm_pkg_load(char *pkgfile) { char *expath; int i; @@ -249,7 +249,7 @@ pmpkg_t *pkg_load(char *pkgfile) RET_ERR(PM_ERR_NOT_A_FILE, NULL); } - info = pkg_new(NULL, NULL); + info = _alpm_pkg_new(NULL, NULL); if(info == NULL) { tar_close(tar); RET_ERR(PM_ERR_MEMORY, NULL); @@ -323,7 +323,7 @@ pmpkg_t *pkg_load(char *pkgfile) continue; } _alpm_strtrim(str); - info->files = pm_list_add(info->files, strdup(str)); + info->files = _alpm_list_add(info->files, strdup(str)); } FREE(str); fclose(fp); @@ -340,7 +340,7 @@ pmpkg_t *pkg_load(char *pkgfile) /* no .FILELIST present in this package.. build the filelist the */ /* old-fashioned way, one at a time */ expath = strdup(th_get_pathname(tar)); - info->files = pm_list_add(info->files, expath); + info->files = _alpm_list_add(info->files, expath); } } @@ -374,7 +374,7 @@ error: /* Test for existence of a package in a PMList* * of pmpkg_t* */ -pmpkg_t *pkg_isin(char *needle, PMList *haystack) +pmpkg_t *_alpm_pkg_isin(char *needle, PMList *haystack) { PMList *lp; @@ -392,7 +392,7 @@ pmpkg_t *pkg_isin(char *needle, PMList *haystack) return(NULL); } -int pkg_splitname(char *target, char *name, char *version) +int _alpm_pkg_splitname(char *target, char *name, char *version) { char tmp[PKG_FULLNAME_LEN+7]; char *p, *q; |