httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/strings apr_strnatcmp.c
Date Sun, 06 Aug 2000 15:48:40 GMT
bjh         00/08/06 08:48:40

  Modified:    src/lib/apr/strings apr_strnatcmp.c
  Log:
  Use apr_is*() character test macros to avoid warnings about signed
  characters.
  
  Revision  Changes    Path
  1.4       +9 -9      apache-2.0/src/lib/apr/strings/apr_strnatcmp.c
  
  Index: apr_strnatcmp.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/strings/apr_strnatcmp.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_strnatcmp.c	2000/08/02 05:26:34	1.3
  +++ apr_strnatcmp.c	2000/08/06 15:48:40	1.4
  @@ -45,11 +45,11 @@
   	both numbers to know that they have the same magnitude, so we
   	remember it in BIAS. */
        for (;; a++, b++) {
  -	  if (!isdigit(*a)  &&  !isdigit(*b))
  +	  if (!apr_isdigit(*a)  &&  !apr_isdigit(*b))
   	       return bias;
  -	  else if (!isdigit(*a))
  +	  else if (!apr_isdigit(*a))
   	       return -1;
  -	  else if (!isdigit(*b))
  +	  else if (!apr_isdigit(*b))
   	       return +1;
   	  else if (*a < *b) {
   	       if (!bias)
  @@ -71,11 +71,11 @@
        /* Compare two left-aligned numbers: the first to have a
           different value wins. */
        for (;; a++, b++) {
  -	  if (!isdigit(*a)  &&  !isdigit(*b))
  +	  if (!apr_isdigit(*a)  &&  !apr_isdigit(*b))
   	       return 0;
  -	  else if (!isdigit(*a))
  +	  else if (!apr_isdigit(*a))
   	       return -1;
  -	  else if (!isdigit(*b))
  +	  else if (!apr_isdigit(*b))
   	       return +1;
   	  else if (*a < *b)
   	       return -1;
  @@ -99,14 +99,14 @@
   	  ca = a[ai]; cb = b[bi];
   
   	  /* skip over leading spaces or zeros */
  -	  while (isspace(ca))
  +	  while (apr_isspace(ca))
   	       ca = a[++ai];
   
  -	  while (isspace(cb))
  +	  while (apr_isspace(cb))
   	       cb = b[++bi];
   
   	  /* process run of digits */
  -	  if (isdigit(ca)  &&  isdigit(cb)) {
  +	  if (apr_isdigit(ca)  &&  apr_isdigit(cb)) {
   	       fractional = (ca == '0' || cb == '0');
   
   	       if (fractional) {
  
  
  

Mime
View raw message