summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2019-06-23 15:54:27 +0200
committerMarco d'Itri <md@linux.it>2019-06-28 01:44:58 +0200
commitbfc8c6bf9ccb6c43f3ef46d218c9cf0f9a85319a (patch)
tree6703e79730418d4f07e9b81d94822ac669ea78c4
parent9bdb9bc7b6c2770fbd46d1d26b04ed1369c1859f (diff)
downloadwhois-bfc8c6bf9ccb6c43f3ef46d218c9cf0f9a85319a.tar.gz
Automatically generate the IDSTRING
-rwxr-xr-xmake_version_h.pl5
-rw-r--r--whois.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/make_version_h.pl b/make_version_h.pl
index 06c7841..51a8f76 100755
--- a/make_version_h.pl
+++ b/make_version_h.pl
@@ -17,8 +17,13 @@ $ver =~ s/ ( ~bpo\d+\+\d+ | \+b\d+ | ~deb\d+.* | ubuntu\d+ | \+dyson\d+ ) $//x;
# The version number must not deviate from this format or the -V option
# to RIPE-like servers will break. If needed, update the previous regexp.
+# This may not be true anymore in 2019.
die "Invalid version number in $changelog!\n"
unless $ver =~ /^ \d+\.\d+ ( \.\d+ )? $/x;
+# This is the version number used in the help messages.
print qq|#define VERSION "$ver"\n|;
+# This is the string sent to RIPE-like servers as the argument of -V.
+print qq|#define IDSTRING "Md$ver"\n|;
+
diff --git a/whois.h b/whois.h
index 1f9115f..bb910e5 100644
--- a/whois.h
+++ b/whois.h
@@ -3,10 +3,6 @@
/* 6bone referto: extension */
#define REFERTO_FORMAT "%% referto: whois -h %255s -p %15s %1021[^\n\r]"
-/* String sent to RIPE servers - MUST NOT BE LONGER THAN FIVE CHARACTERS! */
-/* Do *NOT* change it if you don't know what you are doing! */
-#define IDSTRING "Md5.2"
-
#define HIDE_TO_THE_END -3
#define HIDE_DISABLED -2
#define HIDE_NOT_STARTED -1