From: Theodore Ts'o Date: Fri, 7 Jan 2005 04:52:45 +0000 (-0500) Subject: Update version to 1.36-rc1, and change parsing algorithm for version strings X-Git-Tag: E2FSPROGS-1_36~77 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=da83cb6e4833c7c19279d31c31c6c8b5851f17e2;p=tools%2Fe2fsprogs.git Update version to 1.36-rc1, and change parsing algorithm for version strings so that it deals with -rc version numbers correctly. --- diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 1eb5ed5..7b5e802 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,9 @@ +2005-01-06 Theodore Ts'o + + * version.c (ext2fs_parse_version_string): Change parsing + algorithm so that version strings such as 1.36-rc1 returns + a non-surprising result (i.e., 136, and not 1361). + 2005-01-05 Theodore Ts'o * block.c (block_iterate_ind, block_iterate_dind, diff --git a/lib/ext2fs/version.c b/lib/ext2fs/version.c index f8536fc..f59ce87 100644 --- a/lib/ext2fs/version.c +++ b/lib/ext2fs/version.c @@ -30,8 +30,10 @@ int ext2fs_parse_version_string(const char *ver_string) int version = 0; for (cp = ver_string; *cp; cp++) { - if (!isdigit(*cp)) + if (*cp == '.') continue; + if (!isdigit(*cp)) + break; version = (version * 10) + (*cp - '0'); } return version; diff --git a/version.h b/version.h index 0c1a2cc..0f2cbe3 100644 --- a/version.h +++ b/version.h @@ -6,5 +6,5 @@ * Ts'o. This file may be redistributed under the GNU Public License. */ -#define E2FSPROGS_VERSION "1.35" -#define E2FSPROGS_DATE "28-Feb-2004" +#define E2FSPROGS_VERSION "1.36-rc1" +#define E2FSPROGS_DATE "06-Jan-2005"