[sword-devel] Added new function to the Sword library: SWMgr::Version()

Troy A. Griffitts sword-devel@crosswire.org
Mon, 18 Jun 2001 15:09:11 -0700

Thanks for the suggestion Martin.
We have a version comparator in the InstallMgr source.  It's used to
compare module version so it can give correct info to the user as to
what is the difference between their currently installed version and any
updated version available for download.  It has method just as you
suggested.  Maybe we should use it for the library also and include it
in the base source.


Martin Gruner wrote:
> > "1.51a" wouldn't be a float either.  We can make the change so long as
> > we promise never to use letters or minor versions greater than 9.  But I
> > would suggest this be done in the library somehow rather than in the
> > MinimumVersion tag.  "1.5.2" and "1.5.1a" are the versions of the
> > library, and the tag should accurately represent this.  If you want do
> > drop the last '.' in the string interally, that should be okay.
> > Alternately, we could make a version struct with distinct
> > major/minor/build numbers.
> Alternative suggestion:
> -provide a char* version() returning whatever you like
> -provide a bool compareVersionStrings(char* version1, char* version2)
> The SWMgr version can then be compared against the value in the .conf file.
> Sword can handle the version computing internally.
> Martin