Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/util/vercmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/vercmp.c')
-rw-r--r--src/util/vercmp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/util/vercmp.c b/src/util/vercmp.c
index f4356fb4..41a4f8e2 100644
--- a/src/util/vercmp.c
+++ b/src/util/vercmp.c
@@ -1,5 +1,6 @@
/*
- * vercmp.c
+ * vercmp.c - Compare package version numbers using pacman's version
+ * comparison logic
*
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
* Copyright (c) 2002-2005 by Judd Vinet <jvinet@zeroflux.org>
@@ -22,19 +23,19 @@
#include <stdio.h> /* printf */
#include <string.h>
-#define BASENAME "vercmp"
-
/* forward declaration, comes from version.o in libalpm source that is linked
* in directly so we don't have any library deps */
int alpm_pkg_vercmp(const char *a, const char *b);
static void usage(void)
{
- fprintf(stderr, "usage: %s <ver1> <ver2>\n\n", BASENAME);
- fprintf(stderr, "output values:\n");
- fprintf(stderr, " < 0 : if ver1 < ver2\n");
- fprintf(stderr, " 0 : if ver1 == ver2\n");
- fprintf(stderr, " > 0 : if ver1 > ver2\n");
+ fprintf(stderr, "vercmp (pacman) v" PACKAGE_VERSION "\n\n"
+ "Compare package version numbers using pacman's version comparison logic.\n\n"
+ "Usage: vercmp <ver1> <ver2>\n\n"
+ "Output values:\n"
+ " < 0 : if ver1 < ver2\n"
+ " 0 : if ver1 == ver2\n"
+ " > 0 : if ver1 > ver2\n");
}
int main(int argc, char *argv[])