Diff for /gforth/engine/Attic/memcmpc.c between versions 1.2 and 1.6

version 1.2, 1998/10/25 23:15:48 version 1.6, 2003/01/26 20:56:38
Line 1 Line 1
 /* case insensitive memory block comparison  /* case insensitive memory block comparison
   
   Copyright (C) 1996 Free Software Foundation, Inc.    Copyright (C) 1996,1998 Free Software Foundation, Inc.
   
   This file is part of Gforth.    This file is part of Gforth.
   
Line 16 Line 16
   
   You should have received a copy of the GNU General Public License    You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software    along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 */  */
   
 /* this is mainly useful for testing for equality; to get a version  /* this is mainly useful for testing for equality; to get a version
    that delivers the right < and > results in any locale, you would     that delivers the right < and > results in any locale, you would
    have to work with strcoll and some hackery */     have to work with strcoll and some hackery */
   
 #include <ctype.h>  
 #include "forth.h"  #include "forth.h"
   #include <ctype.h>
   
 Cell memcasecmp(const Char *s1, const Char *s2, Cell n)  Cell memcasecmp(const Char *s1, const Char *s2, Cell n)
 {  {
Line 33  Cell memcasecmp(const Char *s1, const Ch Line 33  Cell memcasecmp(const Char *s1, const Ch
   for (i=0; i<n; i++) {    for (i=0; i<n; i++) {
     Char c1=toupper(s1[i]);      Char c1=toupper(s1[i]);
     Char c2=toupper(s2[i]);      Char c2=toupper(s2[i]);
     if (c1 != c2)      if (c1 != c2) {
       return c1-c2;        if (c1 < c2)
           return -1;
         else
           return 1;
       }
   }    }
   return 0;    return 0;
 }  }

Removed from v.1.2  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>