renamed pmconfig_t to config_t
This commit is contained in:
parent
7fac942da1
commit
44fc71396f
|
@ -31,7 +31,7 @@
|
|||
#include "trans.h"
|
||||
#include "conf.h"
|
||||
|
||||
extern pmconfig_t *config;
|
||||
extern config_t *config;
|
||||
|
||||
int pacman_add(list_t *targets)
|
||||
{
|
||||
|
|
|
@ -38,21 +38,21 @@
|
|||
|
||||
extern list_t *pmc_syncs;
|
||||
|
||||
pmconfig_t *config_new()
|
||||
config_t *config_new()
|
||||
{
|
||||
pmconfig_t *config;
|
||||
config_t *config;
|
||||
|
||||
config = (pmconfig_t *)malloc(sizeof(pmconfig_t));
|
||||
config = (config_t *)malloc(sizeof(config_t));
|
||||
if(config == NULL) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
memset(config, 0, sizeof(pmconfig_t));
|
||||
memset(config, 0, sizeof(config_t));
|
||||
|
||||
return(config);
|
||||
}
|
||||
|
||||
int config_free(pmconfig_t *config)
|
||||
int config_free(config_t *config)
|
||||
{
|
||||
if(config == NULL) {
|
||||
return(-1);
|
||||
|
@ -71,7 +71,7 @@ int config_free(pmconfig_t *config)
|
|||
return(0);
|
||||
}
|
||||
|
||||
int parseconfig(pmconfig_t *config)
|
||||
int parseconfig(config_t *config)
|
||||
{
|
||||
FILE *fp = NULL;
|
||||
char line[PATH_MAX+1];
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef _PM_CONF_H
|
||||
#define _PM_CONF_H
|
||||
|
||||
typedef struct __pmconfig_t {
|
||||
typedef struct __config_t {
|
||||
/* command line options */
|
||||
char *root;
|
||||
char *dbpath;
|
||||
|
@ -59,12 +59,12 @@ typedef struct __pmconfig_t {
|
|||
unsigned short chomp;
|
||||
unsigned short nopassiveftp;
|
||||
list_t *holdpkg;
|
||||
} pmconfig_t;
|
||||
} config_t;
|
||||
|
||||
#define FREECONF(p) do { if(p) { config_free(p); p = NULL; } } while(0)
|
||||
pmconfig_t *config_new();
|
||||
int config_free(pmconfig_t *config);
|
||||
int parseconfig(pmconfig_t *config);
|
||||
config_t *config_new();
|
||||
int config_free(config_t *config);
|
||||
int parseconfig(config_t *config);
|
||||
|
||||
#endif /* _PM_CONF_H */
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ static int xfered1;
|
|||
static unsigned char eta_h, eta_m, eta_s;
|
||||
|
||||
/* pacman options */
|
||||
extern pmconfig_t *config;
|
||||
extern config_t *config;
|
||||
|
||||
extern int maxcols;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#define LOG_STR_LEN 256
|
||||
|
||||
extern pmconfig_t *config;
|
||||
extern config_t *config;
|
||||
|
||||
static int neednl; /* for cleaner message output */
|
||||
|
||||
|
@ -41,7 +41,7 @@ static int neednl; /* for cleaner message output */
|
|||
*/
|
||||
void cb_log(unsigned short level, char *msg)
|
||||
{
|
||||
char str[8] = "";
|
||||
char str[9] = "";
|
||||
|
||||
switch(level) {
|
||||
case PM_LOG_DEBUG:
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "sync.h"
|
||||
#include "pacman.h"
|
||||
|
||||
pmconfig_t *config = NULL;
|
||||
config_t *config = NULL;
|
||||
|
||||
PM_DB *db_local;
|
||||
/* list of (sync_t *) structs for sync locations */
|
||||
|
@ -95,6 +95,7 @@ int main(int argc, char *argv[])
|
|||
/* parse the command line */
|
||||
ret = parseargs(argc, argv);
|
||||
if(ret != 0) {
|
||||
config_free(config);
|
||||
exit(ret);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "log.h"
|
||||
#include "conf.h"
|
||||
|
||||
extern pmconfig_t *config;
|
||||
extern config_t *config;
|
||||
extern PM_DB *db_local;
|
||||
|
||||
static int query_fileowner(PM_DB *db, char *filename)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "trans.h"
|
||||
#include "conf.h"
|
||||
|
||||
extern pmconfig_t *config;
|
||||
extern config_t *config;
|
||||
|
||||
extern PM_DB *db_local;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "pacman.h"
|
||||
#include "conf.h"
|
||||
|
||||
extern pmconfig_t *config;
|
||||
extern config_t *config;
|
||||
|
||||
extern PM_DB *db_local;
|
||||
extern list_t *pmc_syncs;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "add.h"
|
||||
#include "conf.h"
|
||||
|
||||
extern pmconfig_t *config;
|
||||
extern config_t *config;
|
||||
|
||||
int pacman_upgrade(list_t *targets)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue