diff options
author | dgp <dgp@users.sourceforge.net> | 2006-09-28 15:10:23 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-09-28 15:10:23 (GMT) |
commit | 023f68bcd4d6661b4a1ac20e9c90cc212f1901cc (patch) | |
tree | 7ba3ca2b54f62d5618b9bdd28c00b12b4dcc47f0 /generic | |
parent | 542215ff7f7979ba967987a746cfa8dd723425c6 (diff) | |
download | tcl-023f68bcd4d6661b4a1ac20e9c90cc212f1901cc.zip tcl-023f68bcd4d6661b4a1ac20e9c90cc212f1901cc.tar.gz tcl-023f68bcd4d6661b4a1ac20e9c90cc212f1901cc.tar.bz2 |
* generic/tclPkg.c (CompareVersion): Flatten strcmp() results to
{-1, 0, 1} to match expectations of CompareVersion() callers.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclPkg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c index ab4c397..25c044c 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.17 2006/09/27 20:22:40 andreas_kupries Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.18 2006/09/28 15:10:25 dgp Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -1391,6 +1391,7 @@ CompareVersions( o2 = *e2 ; *e2 = '\0'; res = strcmp (s1, s2); + res = (res < 0) ? -1 : (res ? 1 : 0); *e1 = o1; *e2 = o2; |