~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/my_strtoll10.c

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#define LFACTOR1  10000000000ULL
23
23
#define LFACTOR2  100000000000ULL
24
24
 
25
 
static uint64_t lfactor[9]=
 
25
static unsigned long lfactor[9]=
26
26
{
27
27
  1L, 10L, 100L, 1000L, 10000L, 100000L, 1000000L, 10000000L, 100000000L
28
28
};
29
29
 
30
30
/*
31
 
  Convert a string to an to uint64_t integer value
 
31
  Convert a string to an to unsigned long long integer value
32
32
  
33
33
  SYNOPSYS
34
34
    my_strtoll10()
40
40
  DESCRIPTION
41
41
    This function takes the decimal representation of integer number
42
42
    from string nptr and converts it to an signed or unsigned
43
 
    int64_t value.
 
43
    long long integer value.
44
44
    Space characters and tab are ignored.
45
45
    A sign character might precede the digit characters. The number
46
46
    may have any number of pre-zero digits.
59
59
    -1          Number was an ok negative number
60
60
    0           ok
61
61
    ERANGE      If the the value of the converted number exceeded the
62
 
                maximum negative/uint64_t integer.
 
62
                maximum negative/unsigned long long integer.
63
63
                In this case the return value is UINT64_MAX if value was
64
64
                positive and UINT64_MIN if value was negative.
65
65
    EDOM        If the string didn't contain any digits. In this case