Lines Matching defs:zNum

412 ** Compare the 19-character string zNum against the text representation
414 ** if zNum is less than, equal to, or greater than the string.
415 ** Note that zNum must contain exactly 19 characters.
425 static int compare2pow63(const char *zNum, int incr){
431 c = (zNum[i*incr]-pow63[i])*10;
434 c = zNum[18*incr] - '8';
444 ** Convert zNum to a 64-bit signed integer.
446 ** If the zNum value is representable as a 64-bit twos-complement
449 ** If zNum is exactly 9223372036854665808, return 2. This special
453 ** If zNum is too big for a 64-bit integer and is not
460 int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){
467 const char *zEnd = zNum + length;
468 if( enc==SQLITE_UTF16BE ) zNum++;
469 while( zNum<zEnd && sqlite3Isspace(*zNum) ) zNum+=incr;
470 if( zNum<zEnd ){
471 if( *zNum=='-' ){
473 zNum+=incr;
474 }else if( *zNum=='+' ){
475 zNum+=incr;
478 zStart = zNum;
479 while( zNum<zEnd && zNum[0]=='0' ){ zNum+=incr; } /* Skip leading zeros. */
480 for(i=0; &zNum[i]<zEnd && (c=zNum[i])>='0' && c<='9'; i+=incr){
493 if( (c!=0 && &zNum[i]<zEnd) || (i==0 && zStart==zNum) || i>19*incr ){
494 /* zNum is empty or contains non-numeric text or is longer
502 /* zNum is a 19-digit numbers. Compare it against 9223372036854775808. */
503 c = compare2pow63(zNum, incr);
505 /* zNum is less than 9223372036854775808 so it fits */
509 /* zNum is greater than 9223372036854775808 so it overflows */
512 /* zNum is exactly 9223372036854775808. Fits if negative. The
522 ** If zNum represents an integer that will fit in 32-bits, then set
525 ** Any non-numeric characters that following zNum are ignored.
529 int sqlite3GetInt32(const char *zNum, int *pValue){
533 if( zNum[0]=='-' ){
535 zNum++;
536 }else if( zNum[0]=='+' ){
537 zNum++;
539 while( zNum[0]=='0' ) zNum++;
540 for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){