X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrverscmp.c;h=1e87461905a0a08daf6290deb62e7cb976e1eb25;hb=e911cfd715b17d7314df5882f00b86a2cef6c3ad;hp=bc5ba1f9d85d5c7b45275e235b1a9e878e6e2837;hpb=111767fdfc11d44e27ab2b1b136768dbfcf94ebe;p=gnulib.git diff --git a/lib/strverscmp.c b/lib/strverscmp.c index bc5ba1f9d..1e8746190 100644 --- a/lib/strverscmp.c +++ b/lib/strverscmp.c @@ -18,6 +18,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#if HAVE_CONFIG_H +# include +#endif + #include #include @@ -39,9 +43,7 @@ */ int -strverscmp (s1, s2) - const char *s1; - const char *s2; +strverscmp (const char *s1, const char *s2) { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; @@ -67,11 +69,11 @@ strverscmp (s1, s2) /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, - /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP, - +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP, + /* S_I */ CMP, -1, -1, CMP, 1, LEN, LEN, CMP, + 1, LEN, LEN, CMP, CMP, CMP, CMP, CMP, /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, - /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP, + /* S_Z */ CMP, 1, 1, CMP, -1, CMP, CMP, CMP, -1, CMP, CMP, CMP };