mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 09:21:53 -05:00
* Added missing header include guards in md5.h and sha1.h.
* Some header cleanup on the pacman side of things - we had alpm.h instead alpm_list.h in a few headers. * removed an extra slash in path-building snprintf in server.c.
This commit is contained in:
parent
869e81e1cf
commit
5baba84397
@ -634,7 +634,7 @@ alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, alpm_list_t* needles)
|
||||
* @param progress progress callback function pointer
|
||||
* @return 0 on success, -1 on error (pm_errno is set accordingly)
|
||||
*/
|
||||
int SYMEXPORT alpm_trans_init(pmtranstype_t type, unsigned int flags,
|
||||
int SYMEXPORT alpm_trans_init(pmtranstype_t type, pmtransflag_t flags,
|
||||
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
|
||||
alpm_trans_cb_progress progress)
|
||||
{
|
||||
|
@ -349,7 +349,7 @@ pmtranstype_t alpm_trans_get_type();
|
||||
unsigned int alpm_trans_get_flags();
|
||||
alpm_list_t * alpm_trans_get_targets();
|
||||
alpm_list_t * alpm_trans_get_pkgs();
|
||||
int alpm_trans_init(pmtranstype_t type, unsigned int flags,
|
||||
int alpm_trans_init(pmtranstype_t type, pmtransflag_t flags,
|
||||
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
|
||||
alpm_trans_cb_progress cb_progress);
|
||||
int alpm_trans_sysupgrade(void);
|
||||
|
@ -20,8 +20,9 @@ software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.
|
||||
*/
|
||||
documentation and/or software. */
|
||||
#ifndef _ALPM_MD5_H
|
||||
#define _ALPM_MD5_H
|
||||
|
||||
/* POINTER defines a generic pointer type */
|
||||
typedef unsigned char *POINTER;
|
||||
@ -47,4 +48,6 @@ void _alpm_MD5Final(unsigned char [16], MD5_CTX *);
|
||||
char* _alpm_MDFile(char *);
|
||||
void _alpm_MDPrint(unsigned char [16]);
|
||||
|
||||
#endif /* _ALPM_MD5_H */
|
||||
|
||||
/* vim: set ts=2 sw=2 noet: */
|
||||
|
@ -203,8 +203,8 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
|
||||
}
|
||||
_alpm_log(PM_LOG_DEBUG, _("using '%s' for download progress"), pkgname);
|
||||
|
||||
snprintf(realfile, PATH_MAX, "%s/%s", localpath, fn);
|
||||
snprintf(output, PATH_MAX, "%s/%s.part", localpath, fn);
|
||||
snprintf(realfile, PATH_MAX, "%s%s", localpath, fn);
|
||||
snprintf(output, PATH_MAX, "%s%s.part", localpath, fn);
|
||||
|
||||
if(alpm_list_find_str(complete, fn)) {
|
||||
continue;
|
||||
|
@ -15,6 +15,8 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#ifndef _ALPM_SHA1_H
|
||||
#define _ALPM_SHA1_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
@ -65,4 +67,6 @@ struct sha_ctx
|
||||
/* Needed for pacman */
|
||||
char *_alpm_SHAFile (char *);
|
||||
|
||||
#endif /* _ALPM_SHA1_H */
|
||||
|
||||
/* vim: set ts=2 sw=2 noet: */
|
||||
|
@ -97,7 +97,7 @@ void _alpm_trans_free(void *data)
|
||||
FREE(trans);
|
||||
}
|
||||
|
||||
int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, unsigned int flags,
|
||||
int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, pmtransflag_t flags,
|
||||
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
|
||||
alpm_trans_cb_progress progress)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ typedef enum _pmtransstate_t {
|
||||
/* Transaction */
|
||||
struct __pmtrans_t {
|
||||
pmtranstype_t type;
|
||||
unsigned int flags;
|
||||
pmtransflag_t flags;
|
||||
pmtransstate_t state;
|
||||
alpm_list_t *targets; /* list of (char *) */
|
||||
alpm_list_t *packages; /* list of (pmpkg_t *) or (pmsyncpkg_t *) */
|
||||
@ -78,7 +78,7 @@ do { \
|
||||
|
||||
pmtrans_t *_alpm_trans_new(void);
|
||||
void _alpm_trans_free(void *data);
|
||||
int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, unsigned int flags,
|
||||
int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, pmtransflag_t flags,
|
||||
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
|
||||
alpm_trans_cb_progress progress);
|
||||
int _alpm_trans_sysupgrade(pmtrans_t *trans);
|
||||
|
@ -20,8 +20,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _PM_RPMVERCMP_H
|
||||
#define _PM_RPMVERCMP_H
|
||||
#ifndef _ALPM_VERSIONCMP_H
|
||||
#define _ALPM_VERSIONCMP_H
|
||||
|
||||
#include "deps.h"
|
||||
#include "package.h"
|
||||
@ -30,6 +30,6 @@ int _alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep);
|
||||
int _alpm_versioncmp(const char *a, const char *b);
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* _ALPM_VERSIONCMP_H */
|
||||
|
||||
/* vim: set ts=2 sw=2 noet: */
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _PM_ADD_H
|
||||
#define _PM_ADD_H
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
||||
int pacman_add(alpm_list_t *targets);
|
||||
|
||||
|
@ -51,7 +51,7 @@ typedef struct __config_t {
|
||||
unsigned short op_s_search;
|
||||
unsigned short op_s_upgrade;
|
||||
unsigned short group;
|
||||
unsigned int flags;
|
||||
pmtransflag_t flags;
|
||||
unsigned short noask;
|
||||
unsigned int ask;
|
||||
} config_t;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _PM_DEPTEST_H
|
||||
#define _PM_DEPTEST_H
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
||||
int pacman_deptest(alpm_list_t *targets);
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#ifndef _PM_LOG_H
|
||||
#define _PM_LOG_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* TODO these are illegal in ISO C, thus the reason -pedantic was never used
|
||||
* as a compile flag for the pacman side of things (named variadic macros) */
|
||||
#define MSG(line, fmt, args...) pm_fprintf(stdout, line, fmt, ##args)
|
||||
|
@ -21,6 +21,8 @@
|
||||
#ifndef _PM_PACKAGE_H
|
||||
#define _PM_PACKAGE_H
|
||||
|
||||
#include <alpm.h>
|
||||
|
||||
void dump_pkg_full(pmpkg_t *pkg, int level);
|
||||
void dump_pkg_sync(pmpkg_t *pkg, const char *treename);
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _PM_QUERY_H
|
||||
#define _PM_QUERY_H
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
||||
int pacman_query(alpm_list_t *targets);
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _PM_REMOVE_H
|
||||
#define _PM_REMOVE_H
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
||||
int pacman_remove(alpm_list_t *targets);
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _PM_SYNC_H
|
||||
#define _PM_SYNC_H
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
||||
int pacman_sync(alpm_list_t *targets);
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#ifndef _PM_TRANS_H
|
||||
#define _PM_TRANS_H
|
||||
|
||||
#include <alpm.h>
|
||||
|
||||
/* callback to handle messages/notifications from pacman transactions */
|
||||
void cb_trans_evt(pmtransevt_t event, void *data1, void *data2);
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _PM_UPGRADE_H
|
||||
#define _PM_UPGRADE_H
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
||||
int pacman_upgrade(alpm_list_t *targets);
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <alpm.h>
|
||||
#include <alpm_list.h>
|
||||
|
||||
#define MALLOC(p, b) do { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user