diff options
-rw-r--r-- | dselect/pkglist.cc | 4 | ||||
-rw-r--r-- | lib/dpkg/dpkg-db.h | 20 | ||||
-rw-r--r-- | lib/dpkg/parsedump.h | 2 | ||||
-rw-r--r-- | lib/dpkg/parsehelp.c | 8 | ||||
-rw-r--r-- | lib/dpkg/test/t-version.c | 6 | ||||
-rw-r--r-- | lib/dpkg/vercmp.c | 10 | ||||
-rw-r--r-- | lib/dpkg/version.c | 4 | ||||
-rw-r--r-- | lib/dpkg/version.h | 6 | ||||
-rw-r--r-- | src/enquiry.c | 14 |
9 files changed, 38 insertions, 36 deletions
diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc index 811ec4ca6..d03675cda 100644 --- a/dselect/pkglist.cc +++ b/dselect/pkglist.cc @@ -159,8 +159,8 @@ void packagelist::sortinplace() { } void packagelist::ensurestatsortinfo() { - const struct versionrevision *veri; - const struct versionrevision *vera; + const struct dpkg_version *veri; + const struct dpkg_version *vera; struct pkginfo *pkg; int index; diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h index fc954ab87..e258929cf 100644 --- a/lib/dpkg/dpkg-db.h +++ b/lib/dpkg/dpkg-db.h @@ -79,7 +79,7 @@ struct deppossi { struct pkgset *ed; struct deppossi *next, *rev_next, *rev_prev; const struct dpkg_arch *arch; - struct versionrevision version; + struct dpkg_version version; enum depverrel verrel; bool arch_is_implicit; bool cyclebreak; @@ -131,7 +131,7 @@ struct pkgbin { const char *installedsize; const char *origin; const char *bugs; - struct versionrevision version; + struct dpkg_version version; struct conffile *conffiles; struct arbitraryfield *arbs; }; @@ -201,7 +201,7 @@ struct pkginfo { } priority; const char *otherpriority; const char *section; - struct versionrevision configversion; + struct dpkg_version configversion; struct filedetails *files; struct pkgbin installed; struct pkgbin available; @@ -341,11 +341,11 @@ extern const struct namevalue wantinfos[]; #include <dpkg/error.h> enum versiondisplayepochwhen { vdew_never, vdew_nonambig, vdew_always }; -void varbufversion(struct varbuf*, const struct versionrevision*, +void varbufversion(struct varbuf *, const struct dpkg_version *, enum versiondisplayepochwhen); -int parseversion(struct versionrevision *rversion, const char *, +int parseversion(struct dpkg_version *version, const char *, struct dpkg_error *err); -const char *versiondescribe(const struct versionrevision*, +const char *versiondescribe(const struct dpkg_version *, enum versiondisplayepochwhen); enum pkg_name_arch_when { @@ -388,11 +388,11 @@ void varbufdependency(struct varbuf *vb, struct dependency *dep); /*** from vercmp.c ***/ -bool versionsatisfied3(const struct versionrevision *it, - const struct versionrevision *ref, +bool versionsatisfied3(const struct dpkg_version *it, + const struct dpkg_version *ref, enum depverrel verrel); -int versioncompare(const struct versionrevision *version, - const struct versionrevision *refversion); +int versioncompare(const struct dpkg_version *version, + const struct dpkg_version *refversion); /*** from depcon.c ***/ diff --git a/lib/dpkg/parsedump.h b/lib/dpkg/parsedump.h index 35eadae35..b097ac8a7 100644 --- a/lib/dpkg/parsedump.h +++ b/lib/dpkg/parsedump.h @@ -115,7 +115,7 @@ struct fieldinfo { }; void parse_db_version(struct parsedb_state *ps, - struct versionrevision *version, const char *value, + struct dpkg_version *version, const char *value, const char *fmt, ...) DPKG_ATTR_PRINTF(4); void parse_error(struct parsedb_state *ps, const char *fmt, ...) diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c index 08c85d18d..c4c5fd990 100644 --- a/lib/dpkg/parsehelp.c +++ b/lib/dpkg/parsehelp.c @@ -147,7 +147,7 @@ pkg_name_is_illegal(const char *p) void varbufversion (struct varbuf *vb, - const struct versionrevision *version, + const struct dpkg_version *version, enum versiondisplayepochwhen vdew) { switch (vdew) { @@ -173,7 +173,7 @@ void varbufversion } const char *versiondescribe -(const struct versionrevision *version, +(const struct dpkg_version *version, enum versiondisplayepochwhen vdew) { static struct varbuf bufs[10]; @@ -205,7 +205,7 @@ const char *versiondescribe * @retval -1 On failure, and err is set accordingly. */ int -parseversion(struct versionrevision *rversion, const char *string, +parseversion(struct dpkg_version *rversion, const char *string, struct dpkg_error *err) { char *hyphen, *colon, *eepochcolon; @@ -276,7 +276,7 @@ parseversion(struct versionrevision *rversion, const char *string, * @param fmt The error format string. */ void -parse_db_version(struct parsedb_state *ps, struct versionrevision *version, +parse_db_version(struct parsedb_state *ps, struct dpkg_version *version, const char *value, const char *fmt, ...) { struct dpkg_error err; diff --git a/lib/dpkg/test/t-version.c b/lib/dpkg/test/t-version.c index 3ee1bccb4..e1e728361 100644 --- a/lib/dpkg/test/t-version.c +++ b/lib/dpkg/test/t-version.c @@ -28,12 +28,12 @@ #include <dpkg/dpkg-db.h> #define version(epoch, version, revision) \ - (struct versionrevision) { (epoch), (version), (revision) } + (struct dpkg_version) { (epoch), (version), (revision) } static void test_version_compare(void) { - struct versionrevision a, b; + struct dpkg_version a, b; dpkg_version_blank(&a); dpkg_version_blank(&b); @@ -78,7 +78,7 @@ static void test_version_parse(void) { struct dpkg_error err; - struct versionrevision a, b; + struct dpkg_version a, b; const char *p; char *verstr; diff --git a/lib/dpkg/vercmp.c b/lib/dpkg/vercmp.c index 22994903b..49f8b12a8 100644 --- a/lib/dpkg/vercmp.c +++ b/lib/dpkg/vercmp.c @@ -72,8 +72,10 @@ static int verrevcmp(const char *val, const char *ref) { return 0; } -int versioncompare(const struct versionrevision *version, - const struct versionrevision *refversion) { +int +versioncompare(const struct dpkg_version *version, + const struct dpkg_version *refversion) +{ int r; if (version->epoch > refversion->epoch) return 1; @@ -83,8 +85,8 @@ int versioncompare(const struct versionrevision *version, } bool -versionsatisfied3(const struct versionrevision *it, - const struct versionrevision *ref, +versionsatisfied3(const struct dpkg_version *it, + const struct dpkg_version *ref, enum depverrel verrel) { int r; diff --git a/lib/dpkg/version.c b/lib/dpkg/version.c index b63d5f767..ff63cc9fd 100644 --- a/lib/dpkg/version.c +++ b/lib/dpkg/version.c @@ -24,7 +24,7 @@ #include <dpkg/version.h> void -dpkg_version_blank(struct versionrevision *version) +dpkg_version_blank(struct dpkg_version *version) { version->epoch = 0; version->version = NULL; @@ -32,7 +32,7 @@ dpkg_version_blank(struct versionrevision *version) } bool -dpkg_version_is_informative(const struct versionrevision *version) +dpkg_version_is_informative(const struct dpkg_version *version) { return (version->epoch || (version->version && *version->version) || diff --git a/lib/dpkg/version.h b/lib/dpkg/version.h index 0d870d2f1..eafb47d14 100644 --- a/lib/dpkg/version.h +++ b/lib/dpkg/version.h @@ -33,14 +33,14 @@ DPKG_BEGIN_DECLS * @{ */ -struct versionrevision { +struct dpkg_version { unsigned long epoch; const char *version; const char *revision; }; -void dpkg_version_blank(struct versionrevision *version); -bool dpkg_version_is_informative(const struct versionrevision *version); +void dpkg_version_blank(struct dpkg_version *version); +bool dpkg_version_is_informative(const struct dpkg_version *version); /** @} */ diff --git a/src/enquiry.c b/src/enquiry.c index e039529a0..0e00eb6ca 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -338,7 +338,7 @@ unpackchk(const char *const *argv) static int assert_version_support(const char *const *argv, - struct versionrevision *version, + struct dpkg_version *version, const char *feature_name) { struct pkginfo *pkg; @@ -371,7 +371,7 @@ assert_version_support(const char *const *argv, int assertpredep(const char *const *argv) { - struct versionrevision version = { 0, "1.1.0", NULL }; + struct dpkg_version version = { 0, "1.1.0", NULL }; return assert_version_support(argv, &version, _("Pre-Depends field")); } @@ -379,7 +379,7 @@ assertpredep(const char *const *argv) int assertepoch(const char *const *argv) { - struct versionrevision version = { 0, "1.4.0.7", NULL }; + struct dpkg_version version = { 0, "1.4.0.7", NULL }; return assert_version_support(argv, &version, _("epoch")); } @@ -387,7 +387,7 @@ assertepoch(const char *const *argv) int assertlongfilenames(const char *const *argv) { - struct versionrevision version = { 0, "1.4.1.17", NULL }; + struct dpkg_version version = { 0, "1.4.1.17", NULL }; return assert_version_support(argv, &version, _("long filenames")); } @@ -395,7 +395,7 @@ assertlongfilenames(const char *const *argv) int assertmulticonrep(const char *const *argv) { - struct versionrevision version = { 0, "1.4.1.19", NULL }; + struct dpkg_version version = { 0, "1.4.1.19", NULL }; return assert_version_support(argv, &version, _("multiple Conflicts and Replaces")); @@ -404,7 +404,7 @@ assertmulticonrep(const char *const *argv) int assertmultiarch(const char *const *argv) { - struct versionrevision version = { 0, "1.16.2", NULL }; + struct dpkg_version version = { 0, "1.16.2", NULL }; return assert_version_support(argv, &version, _("multi-arch")); } @@ -609,7 +609,7 @@ cmpversions(const char *const *argv) }; const struct relationinfo *rip; - struct versionrevision a, b; + struct dpkg_version a, b; struct dpkg_error err; int r; |