The following commit has been merged in the master branch: commit 222996f8c64e6263384ae35331ed0d04cce3cbcc Author: Guillem Jover <guil...@debian.org> Date: Fri Apr 29 07:19:29 2011 +0200
libdpkg: Move informativeversion() to the version module diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h index 86b2490..1ddde86 100644 --- a/lib/dpkg/dpkg-db.h +++ b/lib/dpkg/dpkg-db.h @@ -287,8 +287,6 @@ extern const struct namevalue statusinfos[]; extern const struct namevalue eflaginfos[]; extern const struct namevalue wantinfos[]; -bool informativeversion(const struct versionrevision *version); - enum versiondisplayepochwhen { vdew_never, vdew_nonambig, vdew_always }; void varbufversion(struct varbuf*, const struct versionrevision*, enum versiondisplayepochwhen); diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c index dd9b20d..2b001fe 100644 --- a/lib/dpkg/parsehelp.c +++ b/lib/dpkg/parsehelp.c @@ -140,14 +140,6 @@ pkg_name_is_illegal(const char *p, const char **ep) return buf; } -bool -informativeversion(const struct versionrevision *version) -{ - return (version->epoch || - (version->version && *version->version) || - (version->revision && *version->revision)); -} - void varbufversion (struct varbuf *vb, const struct versionrevision *version, diff --git a/lib/dpkg/version.c b/lib/dpkg/version.c index 9e7cc82..4bdf782 100644 --- a/lib/dpkg/version.c +++ b/lib/dpkg/version.c @@ -30,3 +30,11 @@ blankversion(struct versionrevision *version) version->version = NULL; version->revision = NULL; } + +bool +informativeversion(const struct versionrevision *version) +{ + return (version->epoch || + (version->version && *version->version) || + (version->revision && *version->revision)); +} diff --git a/lib/dpkg/version.h b/lib/dpkg/version.h index 3eb70f1..c03ceb5 100644 --- a/lib/dpkg/version.h +++ b/lib/dpkg/version.h @@ -21,6 +21,8 @@ #ifndef LIBDPKG_VERSION_H #define LIBDPKG_VERSION_H +#include <stdbool.h> + #include <dpkg/macros.h> DPKG_BEGIN_DECLS @@ -32,6 +34,7 @@ struct versionrevision { }; void blankversion(struct versionrevision *version); +bool informativeversion(const struct versionrevision *version); DPKG_END_DECLS -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org