[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C routine that compares debian package versions



On Wed, Jul 11, 2001 at 11:51:09AM -0300, Miguel Griffa wrote:
> mmm...  wouldn't just strcmp work?

Even ignoring epochs and debian revisions, upstream version 1.10 is
newer than version 1.9, but strcmp will get even that simple case wrong.
ASCII comparison doesn't work very well on numbers unless leading zeroes
are used to force them all to the same number of digits first.



Reply to: