diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-12-22 19:38:55 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-12-22 19:38:55 +0000 |
commit | e3aace4a4d821d388a40545d6497069a973636d8 (patch) | |
tree | a5043edfd56135b43162587c34669515ed3ba613 /lib | |
parent | d8d82215561305cb7af0a33d7810cbb9cadb2cea (diff) | |
download | pacman-e3aace4a4d821d388a40545d6497069a973636d8.tar.xz |
Cleanup from Dan McGee <dpmcgee@gmail.com> and Jürgen Hötzel <juergen@hoetzel.info>
* configure swig check
* misc libalpm cleanup
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/alpm.h | 6 | ||||
-rw-r--r-- | lib/libalpm/backup.c | 4 | ||||
-rw-r--r-- | lib/libalpm/db.h | 6 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 2 |
4 files changed, 11 insertions, 7 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 2f35ad6f..143f3367 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -399,7 +399,7 @@ char *alpm_get_sha1sum(char *name); /* * Errors */ -extern enum __pmerrno_t { +enum __pmerrno_t { PM_ERR_MEMORY = 1, PM_ERR_SYSTEM, PM_ERR_BADPERMS, @@ -469,7 +469,9 @@ extern enum __pmerrno_t { /* Downloading */ PM_ERR_CONNECT_FAILED, PM_ERR_FORK_FAILED -} pm_errno; +}; + +extern enum __pmerrno_t pm_errno; char *alpm_strerror(int err); diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c index cf29abf0..4c438fe4 100644 --- a/lib/libalpm/backup.c +++ b/lib/libalpm/backup.c @@ -55,9 +55,9 @@ char *_alpm_needbackup(char *file, pmlist_t *backup) ptr++; /* now str points to the filename and ptr points to the md5 or sha1 hash */ if(!strcmp(file, str)) { - char *md5 = strdup(ptr); + char *hash = strdup(ptr); FREE(str); - return(md5); + return(hash); } FREE(str); } diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h index d894c213..9224d69a 100644 --- a/lib/libalpm/db.h +++ b/lib/libalpm/db.h @@ -43,11 +43,14 @@ struct __pmdb_t { pmlist_t *grpcache; pmlist_t *servers; }; - +/* db.c, database general calls */ pmdb_t *_alpm_db_new(char *root, char *dbpath, char *treename); void _alpm_db_free(void *data); int _alpm_db_cmp(const void *db1, const void *db2); pmlist_t *_alpm_db_search(pmdb_t *db, pmlist_t *needles); +pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback); + +/* be.c, backend specific calls */ int _alpm_db_install(pmdb_t *db, const char *dbfile); int _alpm_db_open(pmdb_t *db); void _alpm_db_close(pmdb_t *db); @@ -58,7 +61,6 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, unsigned int inforeq); int _alpm_db_remove(pmdb_t *db, pmpkg_t *info); int _alpm_db_getlastupdate(pmdb_t *db, char *ts); int _alpm_db_setlastupdate(pmdb_t *db, char *ts); -pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback); #endif /* _ALPM_DB_H */ diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index a2645a38..e31a891f 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -382,7 +382,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, pmlist_t *dbs_sync, p { pmlist_t *deps = NULL; pmlist_t *list = NULL; /* list allowing checkdeps usage with data from trans->packages */ - pmlist_t *trail = NULL; /* breadcrum list to avoid running into circles */ + pmlist_t *trail = NULL; /* breadcrumb list to avoid running into circles */ pmlist_t *asked = NULL; pmlist_t *i, *j, *k, *l; int ret = 0; |