The following commit has been merged in the master branch:
commit b89373e169cf0d90c3143eeac0bded1a5d9e9c5c
Author: Guillem Jover <[email protected]>
Date:   Sun Oct 24 03:17:38 2010 +0200

    libdpkg: Rename package blank functions to pkg_blank and pkg_perfile_blank

diff --git a/lib/dpkg/database.c b/lib/dpkg/database.c
index 188132a..750e72d 100644
--- a/lib/dpkg/database.c
+++ b/lib/dpkg/database.c
@@ -61,7 +61,9 @@ void blankversion(struct versionrevision *version) {
   version->version= version->revision= NULL;
 }
 
-void blankpackage(struct pkginfo *pigp) {
+void
+pkg_blank(struct pkginfo *pigp)
+{
   pigp->name= NULL;
   pigp->status= stat_notinstalled;
   pigp->eflag = eflag_ok;
@@ -75,11 +77,13 @@ void blankpackage(struct pkginfo *pigp) {
   pigp->trigaw.head = pigp->trigaw.tail = NULL;
   pigp->othertrigaw_head = NULL;
   pigp->trigpend_head = NULL;
-  blankpackageperfile(&pigp->installed);
-  blankpackageperfile(&pigp->available);
+  pkg_perfile_blank(&pigp->installed);
+  pkg_perfile_blank(&pigp->available);
 }
 
-void blankpackageperfile(struct pkginfoperfile *pifp) {
+void
+pkg_perfile_blank(struct pkginfoperfile *pifp)
+{
   pifp->essential = false;
   pifp->depends= NULL;
   pifp->depended= NULL;
@@ -135,7 +139,7 @@ pkg_db_find(const char *inname)
   if (*pointerp) { free(name); return *pointerp; }
 
   newpkg= nfmalloc(sizeof(struct pkginfo));
-  blankpackage(newpkg);
+  pkg_blank(newpkg);
   newpkg->name= nfstrsave(name);
   newpkg->next= NULL;
   *pointerp= newpkg;
diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h
index ee0878b..cd4bc53 100644
--- a/lib/dpkg/dpkg-db.h
+++ b/lib/dpkg/dpkg-db.h
@@ -213,8 +213,8 @@ const char *pkgadminfile(struct pkginfo *pkg, const char 
*whichfile);
 
 /*** from database.c ***/
 
-void blankpackage(struct pkginfo *pp);
-void blankpackageperfile(struct pkginfoperfile *pifp);
+void pkg_blank(struct pkginfo *pp);
+void pkg_perfile_blank(struct pkginfoperfile *pifp);
 void blankversion(struct versionrevision*);
 bool pkg_is_informative(struct pkginfo *pkg, struct pkginfoperfile *info);
 
diff --git a/lib/dpkg/libdpkg.Versions b/lib/dpkg/libdpkg.Versions
index af1e299..319d895 100644
--- a/lib/dpkg/libdpkg.Versions
+++ b/lib/dpkg/libdpkg.Versions
@@ -163,8 +163,8 @@ LIBDPKG_PRIVATE {
        parseversion;
 
        # Package struct handling
-       blankpackage;
-       blankpackageperfile;
+       pkg_blank;
+       pkg_perfile_blank;
        pkg_name_is_illegal;
        pkg_is_informative;
        copy_dependency_links;
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index 7e2bc35..444f113 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -144,7 +144,7 @@ int parsedb(const char *filename, enum parsedbflags flags,
 
   for (;;) { /* loop per package */
     memset(fieldencountered, 0, sizeof(fieldencountered));
-    blankpackage(&newpig);
+    pkg_blank(&newpig);
 
 /* Skip adjacent new lines */
     while(!EOF_mmap(dataptr, endptr)) {
diff --git a/lib/dpkg/test/t-pkg-queue.c b/lib/dpkg/test/t-pkg-queue.c
index 92528d9..9a05d7c 100644
--- a/lib/dpkg/test/t-pkg-queue.c
+++ b/lib/dpkg/test/t-pkg-queue.c
@@ -54,7 +54,7 @@ test_pkg_queue_push_pop(void)
        struct pkg_list *l1, *l2, *l3;
        struct pkginfo pkg, *pkgp;
 
-       blankpackage(&pkg);
+       pkg_blank(&pkg);
 
        test_pass(pkg_queue_is_empty(&q));
 
diff --git a/lib/dpkg/test/t-pkginfo.c b/lib/dpkg/test/t-pkginfo.c
index 3fab78e..7fe6100 100644
--- a/lib/dpkg/test/t-pkginfo.c
+++ b/lib/dpkg/test/t-pkginfo.c
@@ -29,13 +29,13 @@ test_pkginfo_informative(void)
 {
        struct pkginfo pkg;
 
-       blankpackage(&pkg);
+       pkg_blank(&pkg);
        test_fail(pkg_is_informative(&pkg, &pkg.installed));
 
        pkg.want = want_purge;
        test_pass(pkg_is_informative(&pkg, &pkg.installed));
 
-       blankpackage(&pkg);
+       pkg_blank(&pkg);
        pkg.installed.description = "test description";
        test_pass(pkg_is_informative(&pkg, &pkg.installed));
 
diff --git a/src/cleanup.c b/src/cleanup.c
index 484232d..101455f 100644
--- a/src/cleanup.c
+++ b/src/cleanup.c
@@ -181,7 +181,7 @@ void cu_preinstverynew(int argc, void **argv) {
                         "abort-install", NULL);
   pkg->status= stat_notinstalled;
   pkg->eflag &= ~eflag_reinstreq;
-  blankpackageperfile(&pkg->installed);
+  pkg_perfile_blank(&pkg->installed);
   modstatdb_note(pkg);
   cleanup_pkg_failed--;
 }
diff --git a/src/processarc.c b/src/processarc.c
index 2cca061..e9641d7 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -1142,7 +1142,7 @@ void process_archive(const char *filename) {
     otherpkg->eflag = eflag_ok;
 
     blankversion(&otherpkg->configversion);
-    blankpackageperfile(&otherpkg->installed);
+    pkg_perfile_blank(&otherpkg->installed);
 
     otherpkg->clientdata->fileslistvalid = false;
 
diff --git a/src/remove.c b/src/remove.c
index 2508ba9..4ab138d 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -577,7 +577,7 @@ void removal_bulk(struct pkginfo *pkg) {
     /* This will mess up reverse links, but if we follow them
      * we won't go back because pkg->status is stat_notinstalled.
      */
-    blankpackageperfile(&pkg->installed);
+    pkg_perfile_blank(&pkg->installed);
   }
       
   pkg->eflag = eflag_ok;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to