dotgnu-pnet-commits
[Top][All Lists]
Advanced

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

[Dotgnu-pnet-commits] CVS: pnet/support mkcase.c, NONE, 1.1 unicase.c, N


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/support mkcase.c, NONE, 1.1 unicase.c, NONE, 1.1 .cvsignore, 1.2, 1.3 Makefile.am, 1.46, 1.47 unicode.c, 1.4, 1.5
Date: Thu, 28 Aug 2003 21:53:54 -0400

Update of /cvsroot/dotgnu-pnet/pnet/support
In directory subversions:/tmp/cvs-serv14589/support

Modified Files:
        .cvsignore Makefile.am unicode.c 
Added Files:
        mkcase.c unicase.c 
Log Message:


Add support routines for performing Unicode case conversion.


--- NEW FILE ---
/*
 * mkcase.c - Make the Unicode case conversion table from UnicodeData.txt.
 *
 * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <stdio.h>
#include <stdlib.h>
#include "il_system.h"
#include "il_utils.h"

#ifdef  __cplusplus
extern  "C" {
#endif

#if defined(__palmos__)

int main(int argc, char *argv[])
{
        return 0;
}

#else

/*
 * Range limits for compressing the table size.
 */
#define RANGE1_LOWER            0x0000
#define RANGE1_UPPER            0x05FF
#define RANGE2_LOWER            0x1E00
#define RANGE2_UPPER            0x24FF
#define RANGE3_LOWER            0xFF00
#define RANGE3_UPPER            0xFFFF

/*
 * Lower, upper, and title case conversions.
 */
static unsigned short lower[65536];
static unsigned short upper[65536];
static unsigned short title[65536];

/*
 * Parse a hex character value.
 */
static unsigned long parseHex(char **_ptr, unsigned long defValue)
{
        char *ptr = *_ptr;
        unsigned long ch;
        if(*ptr == '\0' || *ptr == ';' || *ptr == '\r' || *ptr == '\n')
        {
                return defValue;
        }
        ch = 0;
        while(*ptr != '\0' && *ptr != ';')
        {
                if(*ptr >= '0' && *ptr <= '9')
                {
                        ch = (ch * 16) + (*ptr - '0');
                }
                else if(*ptr >= 'A' && *ptr <= 'F')
                {
                        ch = (ch * 16) + (*ptr - 'A' + 10);
                }
                else if(*ptr >= 'a' && *ptr <= 'f')
                {
                        ch = (ch * 16) + (*ptr - 'a' + 10);
                }
                else if(*ptr == '\r' || *ptr == '\n')
                {
                        /* Skip end of line characters */
                }
                else
                {
                        fprintf(stderr, "Bad character value in input: '%c'\n", 
*ptr);
                        exit(1);
                }
                ++ptr;
        }
        *_ptr = ptr;
        return ch;
}

/*
 * Write a case conversion table.
 */
static void writeTable(const char *name, unsigned short *table)
{
        int outIfDef = 0;
        unsigned long ch;
        printf("static unsigned short const %s[] = {\n", name);
        for(ch = 0; ch < 65536; ++ch)
        {
                /* Filter out characters that we know will map to themselves */
                if(ch > RANGE1_UPPER && ch < RANGE2_LOWER)
                {
                        continue;
                }
                if(ch > RANGE2_UPPER && ch < RANGE3_LOWER)
                {
                        continue;
                }

                /* Print a #ifdef to be used in latin1 mode to reduce the table 
size */
                if(!outIfDef && ch >= 0x100)
                {
                        printf("#ifndef SMALL_UNICODE_TABLE\n");
                        outIfDef = 1;
                }

                /* Print the character mapping information */
                printf("0x%04X, ", (int)(table[ch]));
                if((ch & 7) == 7)
                {
                        putc('\n', stdout);
                }
        }
        printf("#endif\n");
        printf("};\n");
}

int main(int argc, char *argv[])
{
        char buffer[BUFSIZ];
        unsigned long startch;
        unsigned long ch;
        char *ptr;
        char *catName;
        unsigned long upperch;
        unsigned long lowerch;
        unsigned long titlech;

        /* Initialize the value tables to straight-through mappings */
        for(ch = 0; ch < 65536; ++ch)
        {
                lower[ch] = (unsigned short)ch;
                upper[ch] = (unsigned short)ch;
                title[ch] = (unsigned short)ch;
        }

        /* Process UnicodeData.txt to get the case conversion information */
        startch = 0;
        while(fgets(buffer, sizeof(buffer), stdin))
        {
                ptr = buffer;

                /* Parse the character value */
                ch = parseHex(&ptr, 0);
                if(*ptr != ';')
                {
                        continue;
                }

                /* Skip the character if not within the 16-bit range */
                if(ch >= 0x10000)
                {
                        startch = ch + 1;
                        continue;
                }

                /* Find the category name */
                ++ptr;
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                catName = ptr;
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }

                /* If the character name ended in ", Last>", then ignore
                   the character range */
                if((catName - buffer) > 8 && !strncmp(catName - 8, ", Last>", 
7))
                {
                        continue;
                }

                /* Find the case conversion fields */
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }
                while(*ptr != '\0' && *ptr != ';')
                {
                        ++ptr;
                }
                if(*ptr == ';')
                {
                        ++ptr;
                }

                /* Extract the upper, lower, and title mappings */
                upperch = parseHex(&ptr, ch);
                if(*ptr != ';')
                {
                        continue;
                }
                ++ptr;
                lowerch = parseHex(&ptr, ch);
                if(*ptr != ';')
                {
                        continue;
                }
                ++ptr;
                titlech = parseHex(&ptr, ch);

                /* Update the case mapping tables */
                upper[ch] = (unsigned short)upperch;
                lower[ch] = (unsigned short)lowerch;
                title[ch] = (unsigned short)titlech;
        }

        /* Write out the mapping tables */
        printf("/* This file is automatically generated - do not edit */\n");
        printf("#define UNICASE_RANGE1_LOWER  0x%04X\n", RANGE1_LOWER);
        printf("#define UNICASE_RANGE1_UPPER  0x%04X\n", RANGE1_UPPER);
        printf("#define UNICASE_RANGE1_OFFSET 0x%04X\n", 0);
        printf("#define UNICASE_RANGE2_LOWER  0x%04X\n", RANGE2_LOWER);
        printf("#define UNICASE_RANGE2_UPPER  0x%04X\n", RANGE2_UPPER);
        printf("#define UNICASE_RANGE2_OFFSET 0x%04X\n", RANGE1_UPPER + 1);
        printf("#define UNICASE_RANGE3_LOWER  0x%04X\n", RANGE3_LOWER);
        printf("#define UNICASE_RANGE3_UPPER  0x%04X\n", RANGE3_UPPER);
        printf("#define UNICASE_RANGE3_OFFSET 0x%04X\n",
                   (RANGE1_UPPER - RANGE1_LOWER + 1) +
                   (RANGE2_UPPER - RANGE2_LOWER + 1));
        writeTable("unicodeToUpper", upper);
        writeTable("unicodeToLower", lower);
        writeTable("unicodeToTitle", title);

        /* Done */
        return 0;
}

#endif

#ifdef  __cplusplus
};
#endif

--- NEW FILE ---
/* This file is automatically generated - do not edit */
#define UNICASE_RANGE1_LOWER  0x0000
#define UNICASE_RANGE1_UPPER  0x05FF
#define UNICASE_RANGE1_OFFSET 0x0000
#define UNICASE_RANGE2_LOWER  0x1E00
#define UNICASE_RANGE2_UPPER  0x24FF
#define UNICASE_RANGE2_OFFSET 0x0600
#define UNICASE_RANGE3_LOWER  0xFF00
#define UNICASE_RANGE3_UPPER  0xFFFF
#define UNICASE_RANGE3_OFFSET 0x0D00
static unsigned short const unicodeToUpper[] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F, 
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, 
[...1327 lines suppressed...]
0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77, 
0xFF78, 0xFF79, 0xFF7A, 0xFF7B, 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F, 
0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, 0xFF85, 0xFF86, 0xFF87, 
0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, 0xFF8E, 0xFF8F, 
0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97, 
0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F, 
0xFFA0, 0xFFA1, 0xFFA2, 0xFFA3, 0xFFA4, 0xFFA5, 0xFFA6, 0xFFA7, 
0xFFA8, 0xFFA9, 0xFFAA, 0xFFAB, 0xFFAC, 0xFFAD, 0xFFAE, 0xFFAF, 
0xFFB0, 0xFFB1, 0xFFB2, 0xFFB3, 0xFFB4, 0xFFB5, 0xFFB6, 0xFFB7, 
0xFFB8, 0xFFB9, 0xFFBA, 0xFFBB, 0xFFBC, 0xFFBD, 0xFFBE, 0xFFBF, 
0xFFC0, 0xFFC1, 0xFFC2, 0xFFC3, 0xFFC4, 0xFFC5, 0xFFC6, 0xFFC7, 
0xFFC8, 0xFFC9, 0xFFCA, 0xFFCB, 0xFFCC, 0xFFCD, 0xFFCE, 0xFFCF, 
0xFFD0, 0xFFD1, 0xFFD2, 0xFFD3, 0xFFD4, 0xFFD5, 0xFFD6, 0xFFD7, 
0xFFD8, 0xFFD9, 0xFFDA, 0xFFDB, 0xFFDC, 0xFFDD, 0xFFDE, 0xFFDF, 
0xFFE0, 0xFFE1, 0xFFE2, 0xFFE3, 0xFFE4, 0xFFE5, 0xFFE6, 0xFFE7, 
0xFFE8, 0xFFE9, 0xFFEA, 0xFFEB, 0xFFEC, 0xFFED, 0xFFEE, 0xFFEF, 
0xFFF0, 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, 0xFFF7, 
0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, 0xFFFF, 
#endif
};

Index: .cvsignore
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** .cvsignore  25 Mar 2002 00:52:30 -0000      1.2
--- .cvsignore  29 Aug 2003 01:53:51 -0000      1.3
***************
*** 3,5 ****
--- 3,7 ----
  .deps
  mkcategory
+ mknumber
+ mkcase
  errno_map.c

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/Makefile.am,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** Makefile.am 23 Jul 2003 00:38:09 -0000      1.46
--- Makefile.am 29 Aug 2003 01:53:51 -0000      1.47
***************
*** 1,4 ****
  lib_LIBRARIES = libILSupport.a
! noinst_PROGRAMS = mkcategory mknumber
  
  libILSupport_a_SOURCES = aes.c \
--- 1,4 ----
  lib_LIBRARIES = libILSupport.a
! noinst_PROGRAMS = mkcategory mknumber mkcase
  
  libILSupport_a_SOURCES = aes.c \
***************
*** 65,68 ****
--- 65,70 ----
  
  mknumber_SOURCES = mknumber.c
+ 
+ mkcase_SOURCES = mkcase.c
  
  AM_CFLAGS = -I$(top_srcdir)/libgc/include -I$(top_srcdir)/include \

Index: unicode.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/unicode.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** unicode.c   10 Jun 2002 05:39:26 -0000      1.4
--- unicode.c   29 Aug 2003 01:53:51 -0000      1.5
***************
*** 141,144 ****
--- 141,414 ----
  }
  
+ /*
+  * Include the Unicode case conversion value table from "unicase.c".
+  * The table is automatically generated from "UnicodeData.txt"
+  * using the "mkcase" program.
+  */
+ #include "unicase.c"
+ 
+ unsigned ILUnicodeCharToUpper(unsigned ch)
+ {
+ #ifdef SMALL_UNICODE_TABLE
+       if(ch < 0x0100)
+       {
+               return unicodeToUpper[ch];
+       }
+       else
+       {
+               return ch;
+       }
+ #else
+       if(ch <= UNICASE_RANGE1_UPPER)
+       {
+               return unicodeToUpper[ch];
+       }
+       else if(ch >= UNICASE_RANGE2_LOWER && ch <= UNICASE_RANGE2_UPPER)
+       {
+               return unicodeToUpper
+                       [ch - UNICASE_RANGE2_LOWER + UNICASE_RANGE2_OFFSET];
+       }
+       else if(ch >= UNICASE_RANGE3_LOWER && ch <= UNICASE_RANGE3_LOWER)
+       {
+               return unicodeToUpper
+                       [ch - UNICASE_RANGE3_LOWER + UNICASE_RANGE3_OFFSET];
+       }
+       else
+       {
+               return ch;
+       }
+ #endif
+ }
+ 
+ unsigned ILUnicodeCharToLower(unsigned ch)
+ {
+ #ifdef SMALL_UNICODE_TABLE
+       if(ch < 0x0100)
+       {
+               return unicodeToLower[ch];
+       }
+       else
+       {
+               return ch;
+       }
+ #else
+       if(ch <= UNICASE_RANGE1_UPPER)
+       {
+               return unicodeToLower[ch];
+       }
+       else if(ch >= UNICASE_RANGE2_LOWER && ch <= UNICASE_RANGE2_UPPER)
+       {
+               return unicodeToLower
+                       [ch - UNICASE_RANGE2_LOWER + UNICASE_RANGE2_OFFSET];
+       }
+       else if(ch >= UNICASE_RANGE3_LOWER && ch <= UNICASE_RANGE3_LOWER)
+       {
+               return unicodeToLower
+                       [ch - UNICASE_RANGE3_LOWER + UNICASE_RANGE3_OFFSET];
+       }
+       else
+       {
+               return ch;
+       }
+ #endif
+ }
+ 
+ unsigned ILUnicodeCharToTitle(unsigned ch)
+ {
+ #ifdef SMALL_UNICODE_TABLE
+       if(ch < 0x0100)
+       {
+               return unicodeToTitle[ch];
+       }
+       else
+       {
+               return ch;
+       }
+ #else
+       if(ch <= UNICASE_RANGE1_UPPER)
+       {
+               return unicodeToTitle[ch];
+       }
+       else if(ch >= UNICASE_RANGE2_LOWER && ch <= UNICASE_RANGE2_UPPER)
+       {
+               return unicodeToTitle
+                       [ch - UNICASE_RANGE2_LOWER + UNICASE_RANGE2_OFFSET];
+       }
+       else if(ch >= UNICASE_RANGE3_LOWER && ch <= UNICASE_RANGE3_LOWER)
+       {
+               return unicodeToTitle
+                       [ch - UNICASE_RANGE3_LOWER + UNICASE_RANGE3_OFFSET];
+       }
+       else
+       {
+               return ch;
+       }
+ #endif
+ }
+ 
+ void ILUnicodeStringToUpper(unsigned short *dest, const unsigned short *src,
+                                                       unsigned long len)
+ {
+       unsigned ch;
+       while(len > 0)
+       {
+               ch = *src++;
+ #ifdef SMALL_UNICODE_TABLE
+               if(ch < 0x0100)
+               {
+                       ch = unicodeToUpper[ch];
+               }
+ #else
+               if(ch <= UNICASE_RANGE1_UPPER)
+               {
+                       ch = unicodeToUpper[ch];
+               }
+               else if(ch >= UNICASE_RANGE2_LOWER && ch <= 
UNICASE_RANGE2_UPPER)
+               {
+                       ch = unicodeToUpper
+                               [ch - UNICASE_RANGE2_LOWER + 
UNICASE_RANGE2_OFFSET];
+               }
+               else if(ch >= UNICASE_RANGE3_LOWER && ch <= 
UNICASE_RANGE3_LOWER)
+               {
+                       ch = unicodeToUpper
+                               [ch - UNICASE_RANGE3_LOWER + 
UNICASE_RANGE3_OFFSET];
+               }
+ #endif
+               *dest++ = (ILUInt16)ch;
+               --len;
+       }
+ }
+ 
+ void ILUnicodeStringToLower(unsigned short *dest, const unsigned short *src,
+                                                       unsigned long len)
+ {
+       unsigned ch;
+       while(len > 0)
+       {
+               ch = *src++;
+ #ifdef SMALL_UNICODE_TABLE
+               if(ch < 0x0100)
+               {
+                       ch = unicodeToLower[ch];
+               }
+ #else
+               if(ch <= UNICASE_RANGE1_UPPER)
+               {
+                       ch = unicodeToLower[ch];
+               }
+               else if(ch >= UNICASE_RANGE2_LOWER && ch <= 
UNICASE_RANGE2_UPPER)
+               {
+                       ch = unicodeToLower
+                               [ch - UNICASE_RANGE2_LOWER + 
UNICASE_RANGE2_OFFSET];
+               }
+               else if(ch >= UNICASE_RANGE3_LOWER && ch <= 
UNICASE_RANGE3_LOWER)
+               {
+                       ch = unicodeToLower
+                               [ch - UNICASE_RANGE3_LOWER + 
UNICASE_RANGE3_OFFSET];
+               }
+ #endif
+               *dest++ = (ILUInt16)ch;
+               --len;
+       }
+ }
+ 
+ void ILUnicodeStringToTitle(unsigned short *dest, const unsigned short *src,
+                                                       unsigned long len)
+ {
+       unsigned ch;
+       while(len > 0)
+       {
+               ch = *src++;
+ #ifdef SMALL_UNICODE_TABLE
+               if(ch < 0x0100)
+               {
+                       ch = unicodeToTitle[ch];
+               }
+ #else
+               if(ch <= UNICASE_RANGE1_UPPER)
+               {
+                       ch = unicodeToTitle[ch];
+               }
+               else if(ch >= UNICASE_RANGE2_LOWER && ch <= 
UNICASE_RANGE2_UPPER)
+               {
+                       ch = unicodeToTitle
+                               [ch - UNICASE_RANGE2_LOWER + 
UNICASE_RANGE2_OFFSET];
+               }
+               else if(ch >= UNICASE_RANGE3_LOWER && ch <= 
UNICASE_RANGE3_LOWER)
+               {
+                       ch = unicodeToTitle
+                               [ch - UNICASE_RANGE3_LOWER + 
UNICASE_RANGE3_OFFSET];
+               }
+ #endif
+               *dest++ = (ILUInt16)ch;
+               --len;
+       }
+ }
+ 
+ int ILUnicodeStringCompare(const unsigned short *str1,
+                                                  const unsigned short *str2,
+                                                  unsigned long len)
+ {
+       unsigned ch1;
+       unsigned ch2;
+       while(len > 0)
+       {
+               ch1 = *str1++;
+ #ifdef SMALL_UNICODE_TABLE
+               if(ch1 < 0x0100)
+               {
+                       ch1 = unicodeToLower[ch1];
+               }
+ #else
+               if(ch1 <= UNICASE_RANGE1_UPPER)
+               {
+                       ch1 = unicodeToLower[ch1];
+               }
+               else if(ch1 >= UNICASE_RANGE2_LOWER && ch1 <= 
UNICASE_RANGE2_UPPER)
+               {
+                       ch1 = unicodeToLower
+                               [ch1 - UNICASE_RANGE2_LOWER + 
UNICASE_RANGE2_OFFSET];
+               }
+               else if(ch1 >= UNICASE_RANGE3_LOWER && ch1 <= 
UNICASE_RANGE3_LOWER)
+               {
+                       ch1 = unicodeToLower
+                               [ch1 - UNICASE_RANGE3_LOWER + 
UNICASE_RANGE3_OFFSET];
+               }
+ #endif
+               ch2 = *str2++;
+ #ifdef SMALL_UNICODE_TABLE
+               if(ch2 < 0x0100)
+               {
+                       ch2 = unicodeToLower[ch2];
+               }
+ #else
+               if(ch2 <= UNICASE_RANGE1_UPPER)
+               {
+                       ch2 = unicodeToLower[ch2];
+               }
+               else if(ch2 >= UNICASE_RANGE2_LOWER && ch2 <= 
UNICASE_RANGE2_UPPER)
+               {
+                       ch2 = unicodeToLower
+                               [ch2 - UNICASE_RANGE2_LOWER + 
UNICASE_RANGE2_OFFSET];
+               }
+               else if(ch2 >= UNICASE_RANGE3_LOWER && ch2 <= 
UNICASE_RANGE3_LOWER)
+               {
+                       ch2 = unicodeToLower
+                               [ch2 - UNICASE_RANGE3_LOWER + 
UNICASE_RANGE3_OFFSET];
+               }
+ #endif
+               if(ch1 < ch2)
+               {
+                       return -1;
+               }
+               else if(ch1 > ch2)
+               {
+                       return 1;
+               }
+               --len;
+       }
+       return 0;
+ }
+ 
  #ifdef        __cplusplus
  };





reply via email to

[Prev in Thread] Current Thread [Next in Thread]