From 52670048845e27f707bfb23613822090e9f78fe2 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Thu, 6 Oct 2005 19:02:14 +0000 Subject: Applied patch from Christian Hamar (krics@linuxforum.hu) --- src/util/convertdb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/util/convertdb.c b/src/util/convertdb.c index 6fbebb23..b5436013 100644 --- a/src/util/convertdb.c +++ b/src/util/convertdb.c @@ -28,7 +28,7 @@ #include #include #include -#include "pacconf.h" +#include "alpm.h" #include "list.h" #include "util.h" @@ -48,7 +48,7 @@ int main(int argc, char* argv[]) struct stat buf; char dbdir[PATH_MAX]; - sprintf(dbdir, "/%s", PACDBDIR); + sprintf(dbdir, "/%s", PM_DBPATH); if(argc < 2) { printf("converts a pacman 1.x database to a pacman 2.0 format\n"); @@ -73,8 +73,8 @@ int main(int argc, char* argv[]) perror(dbdir); return(1); } - trim(name); - trim(ver); + _alpm_strtrim(name); + _alpm_strtrim(ver); fprintf(stderr, "converting %s\n", name); /* package directory */ snprintf(topdir, PATH_MAX, "%s/%s-%s", argv[1], name, ver); @@ -111,14 +111,14 @@ int main(int argc, char* argv[]) return(1); } fputs("%FILES%\n", fp); - while(fgets(line, 255, db) && strcmp(trim(line), "")) { - trim(line); + while(fgets(line, 255, db) && strcmp(_alpm_strtrim(line), "")) { + _alpm_strtrim(line); ptr = line; /* check for backup designation and frontslashes that shouldn't be there */ if(line[0] == '*') ptr++; if(*ptr == '/') ptr++; - if(line[0] == '*') backup = list_add(backup, strdup(ptr)); + if(line[0] == '*') backup = pm_list_add(backup, strdup(ptr)); fprintf(fp, "%s\n", ptr); } @@ -137,7 +137,7 @@ int main(int argc, char* argv[]) snprintf(line, PATH_MAX, "/bin/cp %s %s/install", path, topdir); system(line); } - list_free(backup); + pm_list_free(backup); } umask(oldumask); return(0); -- cgit v1.2.3-24-g4f1b