~ubuntu-branches/ubuntu/gutsy/icu/gutsy

« back to all changes in this revision

Viewing changes to source/tools/genrb/parse.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2005-05-21 22:44:31 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: package-import@ubuntu.com-20050521224431-r7rktfhnu1n4tf1g
Tags: 2.1-2.1
Rename icu-doc to icu21-doc. icu-doc is built by the icu28 package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "error.h"
24
24
#include "uhash.h"
25
25
#include "cmemory.h"
 
26
#include "cstring.h"
26
27
#include "read.h"
27
28
#include "ustr.h"
28
29
#include "reslist.h"
847
848
        value = uprv_strtoul(string, &stopstring, 0);/* make intvector support decimal,hexdigit,octal digit ranging from -2^31-2^32-1*/
848
849
        len=stopstring-string;
849
850
 
850
 
        if(len==strlen(string))
 
851
        if(len==uprv_strlen(string))
851
852
        {
852
853
            intvector_add(result, value, status);
853
854
            uprv_free(string);
930
931
                value[i >> 1] = (uint8_t) uprv_strtoul(toConv, &stopstring, 16);
931
932
                len=stopstring-toConv;
932
933
 
933
 
                if(len!=strlen(toConv))
 
934
                if(len!=uprv_strlen(toConv))
934
935
                {
935
936
                    uprv_free(string);
936
937
                    *status=U_INVALID_CHAR_FOUND;
998
999
    /* to handle illegal char in the integer*/
999
1000
    value = uprv_strtoul(string, &stopstring, 0);
1000
1001
    len=stopstring-string;
1001
 
    if(len==strlen(string))
 
1002
    if(len==uprv_strlen(string))
1002
1003
    {
1003
1004
        result = int_open(bundle, tag, value, status);
1004
1005
    }
1275
1276
        {
1276
1277
            *status=U_ZERO_ERROR;
1277
1278
        }
 
1279
        else
 
1280
        {
 
1281
            error(line, "parse error, did not find open-brace '{' or colon ':', stopped with %s", u_errorName(*status));
 
1282
        }
1278
1283
    }
1279
1284
    /* The above is added by Jing/GCL */
1280
1285