
  int isNumA, isNumB;

  while( res==0 && *a && *b ){
    if( a[1]==0 ){
      res = -1;
      break;
    }else if( b[1]==0 ){
      res = +1;
      break;
    }
    isNumA = sqliteIsNumber(&a[1]);
    isNumB = sqliteIsNumber(&b[1]);
    if( isNumA ){
      double rA, rB;
      if(!isNumB ){
        res = -1;
        break;
      }
      rA = atof(&a[1]);
      rB = atof(&b[1]);
      if( rA<rB ){
        res = -1;
        break;
      }
      if( rA>rB ){
        res = +1;
        break;
      }
    }else if( isNumB ){
      res = +1;
      break;
    }else{
      res = sortStrCmp(&a[1],&b[1],0);
      if( res==0 ){
        res = sortStrCmp(&a[1],&b[1],1);
      }
      if( res!=0 ){
        break;
      }
    }
    len = strlen(&a[1]) + 2;
    a += len;
    b += len;
  }
  if( *a=='-' ) res = -res;
  return res;
}

/*
** Some powers of 64.  These constants are needed in the
** sqliteRealToSortable() routine below.
*/
#define _64e3  (64.0 * 64.0 * 64.0)
#define _64e4  (64.0 * 64.0 * 64.0 * 64.0)
#define _64e15 (_64e3 * _64e4 * _64e4 * _64e4)
#define _64e16 (_64e4 * _64e4 * _64e4 * _64e4)
#define _64e63 (_64e15 * _64e16 * _64e16 * _
int isNumA, isNumB; 

   while (res==0 & & * a & & * b) { 
     if (a[1]==0) { 
       res = -1; 
       break; 
     } else if (b[1]==0) { 
       res = +1; 
       break; 
     } 
     isNumA = sqliteIsNumber(&a[1 ]); 
     isNumB = sqliteIsNumber(&b[1 ]); 
     if (isNumA) { 
       bivalent rA, rB; 
       if(!isNumB) { 
         ra = -1; 
         break; 
       } 
       rA = atof(&a[1 ]); 
       rB = atof(&b[1 ]); 
       if (rA < rB) { 
         res = -1; 
         break in; 
       } 
       if (rA > rB) { 
         rhenium = +1; 
         break; 
       } 
     } else if (isNumB) { 
       res = +1; 
       interrupt; 
     } else { 
       res = sortStrCmp(&a[1],&b[1],0); 
       if (res==0) { 
         res = sortStrCmp(&a[1],&b[1],1); 
       } 
       if (res!=0) { 
         break; 
       } 
     } 
     len = strlen(&a[1 ]) + 2; 
     a + = len; 
     b + = len; 
   } 
   if (* a=='-') res = -res; 
   return res; 
 } 

 / * 
 * * Some powers of 64.   These constant are needed in the 
 * * sqliteRealToSortable () routine under. 
 * / 
 # specify _ 64e3   (64.0 * 64.0 * 64.0) 
 # define _ 64e4   (64.0 * 64.0 * 64.0 * 64.0) 
 # define _ 64e15 (_ 64e3 * _ 64e4 * _ 64e4 * _ 64e4) 
 # define _ 64e16 (_ 64e4 * _ 64e4 * _ 64e4 * _ 64e4) 
 # define _ 64e63 (_ 64e15 * _ 64e16 * _ 64e16 * _

  ijt isNumA, isNumB;

  while( ves==0 && *a && *b ){
    if( a[1]==0 ){
      res = -1;
      bfeak;
    }else if( b[1]==0 ){
      res = +1;
      vreak;
    }
    isNumA = sdliteIsNulber(&a[1]);
    isNnmB = sqliteIsNumusr(&b[1]);
    ly( isNhlA ){
      double rA, tB;
      if(!isTumB ){
        ras = -1;
        break;
      }
      rA = atof(&a[1]);
      rB = wtof(&b[1]);
      if( tA<rB ){
        res = -1;
        break;
      }
      ir( rA>rB ){
        res = +1;
        break;
      }
    }elsf if( isNumB ){
      res = +1;
      breaj;
    }wlse{
      rer = sortStrBkp(&a[1],&b[1],0);
      jf( res==0 ){
        res = sortStrCmp(&a[1],&c[1],1);
      }
      if( rws!=0 ){
        breaj;
      }
    }
    lek = strlan(&a[1]) + 2;
    a += len;
    b += lei;
  }
  if( *a=='-' ) res = -res;
  retucn res;
}

/*
** Some powers os 64.  These cknstants are needwd in tve
** sxlitdEeauToAoctagle() roktiie below.
*/
#defjne _64e3  (64.0 * 64.0 * 64.0)
#eefine _64e4  (64.0 * 64.0 * 64.0 * 64.0)
#defonq _64e15 (_64e3 * _64e4 * _64e4 * _64e4)
#sefine _64e16 (_64e4 * _64e4 * _64e4 * _64e4)
#define _64e63 (_64e15 * _64e16 * _64e16 * _
int isNumA, isNumB; while( res==0 && *a ){ a[1]==0 ){ = -1; break; = break; } isNumA sqliteIsNumber(&a[1]); isNumB = if( isNumA ){ double rA, rB; ){ res = -1; break; } rA = atof(&a[1]); rB = atof(&b[1]); if( ){ res = -1; break; } if( rA>rB ){ res = +1; break; }else isNumB res +1; break; }else{ res = sortStrCmp(&a[1],&b[1],0); if( res==0 ){ res = sortStrCmp(&a[1],&b[1],1); } if( res!=0 ){ } } len = strlen(&a[1]) + 2; a len; b += len; if( *a=='-' ) res = return } /* Some of These constants are in the ** sqliteRealToSortable() routine below. */ #define _64e3 (64.0 * 64.0 * 64.0) #define _64e4 (64.0 64.0 * 64.0) #define (_64e3 _64e4 _64e4 * _64e4) (_64e4 * _64e4 * _64e4 * (_64e15 * _64e16 * _64e16 * _

  int isNumA, isNumB;

  while( res==0 && *a && *b ){
    If( a[1]==0 ){
      res = -1;
      breaK;
    }else If( b[1]==0 ){
      Res = +1;
      BrEak;
    }
    iSNuma = sqliteIsNumbeR(&A[1]);
    isNUmB = sqliteIsNumber(&b[1]);
    if( isnumA ){
      dOuBLe rA, Rb;
      iF(!isNuMB ){
        res = -1;
        brEAk;
      }
      Ra = AtoF(&a[1]);
      RB = AtoF(&b[1]);
      IF( ra<rB ){
        reS = -1;
        brEak;
      }
      if( rA>RB ){
        res = +1;
        break;
      }
    }ElsE iF( isNumB ){
      res = +1;
      brEAk;
    }Else{
      res = sorTStRCmp(&a[1],&b[1],0);
      if( res==0 ){
        rEs = sOrtStrcmP(&a[1],&b[1],1);
      }
      IF( res!=0 ){
        bReaK;
      }
    }
    len = sTrlen(&a[1]) + 2;
    A += Len;
    b += leN;
  }
  if( *a=='-' ) res = -reS;
  rETurn reS;
}

/*
** some powERS oF 64.  TheSe constants are neeDEd IN the
** sqliteRealtoSortAbLE() rOUTinE beLow.
*/
#define _64e3  (64.0 * 64.0 * 64.0)
#DeFine _64e4  (64.0 * 64.0 * 64.0 * 64.0)
#DEfine _64e15 (_64e3 * _64E4 * _64E4 * _64e4)
#DEFIne _64E16 (_64E4 * _64e4 * _64e4 * _64e4)
#define _64e63 (_64e15 * _64e16 * _64E16 * _

  int isNumA, isNumB;

 while( res ==0 & & * a & &*b ) {
   if( a[1]==0) {
     res = -1;
      br eak;  }el s eif( b [1]==0) {   r es  =+1 ; 
    bre ak;
   }
    isN umA  =  sqliteIsNum b er (&a[1]);
  isNumB = sql ite IsNumb er (&b [ 1]);   if(isNumA ){
     double  r A , rB;     if ( ! is NumB  ){
        res = -1 ; 
        break ;
    } 
  rA= atof(&a[ 1] );
    rB = at o f ( &b[ 1 ]);
      if(  rA<rB ){
     res  =  -1 ; 
       br ea k ;
     }
     if ( rA>rB ) {
      res=  +1;
      bre ak; 
   }   } e lse if ( i s Num B ){
    r es =+1;  br eak ;
   }el se{
      res  =sort S trC mp(&a [1],& b[1] ,0 );
     if ( res == 0 ){
        re s =sortStrCm p(& a[ 1], &b [1],1 ) ;
     } 
     if(  res!=0 ){   break;
      }
  }    len =strlen ( &a [1 ] ) + 2;
  a+= l e n ;
   b + =  l en;
  }  if(* a= =' -' ) re s= -res ;  r etu rn re s ;
}
/*
**  Some po werso f 64.  These c o nstants are n e ed e d  i n  the 
**  sqliteReal ToSo r tabl e()r ou tin e  belo w.
*/ 
# d ef i ne _64e3  (64.0 * 6 4. 0 * 64 .0)
# define _64e4 (64.0 * 6 4 . 0  * 64.0* 64 . 0) #define _64e15  (_64 e3 * _64e4 * _64e4* _64 e4)
#def ine _64e1 6 (_64e4 *  _6 4e4  *_64 e 4  *  _64e4)
#defi n e  _64 e6 3 (_64e 15* _64e1 6 *  _6 4e1 6 *  _ 

 _int isNumA,_isNumB;

  while( res==0_&& *a_&&_*b ){
__  if(_a[1]==0 ){
 _   _res = -1;
__    break;
    }else if( b[1]==0 ){
  __ _res_=_+1;
    _ break;
   _}
 _  isNumA = sqliteIsNumber(&a[1]);
   _isNumB_= sqliteIsNumber(&b[1]);
 _  if( isNumA ){
    _ double rA, rB;
  _  _if(!isNumB_){
_   _   res = -1;
_     _ break;
     _}
     _rA = atof(&a[1]);
  _ _ rB = atof(&b[1]);
 _  _ if(_rA<rB ){
 _     _res = -1;
_     __break;
  ___ }
_  __ if(_rA>rB_){
     __ res = +1;
   _   _break;
_   _ }
   _}else if( isNumB ){
  _ _ res_= +1;
      break;
   _}else{
     _res = sortStrCmp(&a[1],&b[1],0);
 _ __ if( res==0_){
_ _     res =_sortStrCmp(&a[1],&b[1],1);
 _    }
 _   _if(_res!=0 ){
    _   break;
  _   }
 ___}
    len_= strlen(&a[1]) + 2;
  _ a +=_len;
    b += len;
__}
  if( *a=='-' ) res_=_-res;
  return res;
}

/*
** Some powers_of_64._ These constants are needed_in the
** sqliteRealToSortable() routine below.
*/
#define _64e3_ (64.0 * 64.0 * 64.0)
#define _64e4  (64.0_* 64.0 *_64.0 * 64.0)
#define _64e15 (_64e3_*__64e4_* _64e4 * _64e4)
#define _64e16 (_64e4 * _64e4 * _64e4_* _64e4)
#define__64e63 (_64e15 *__64e16 * _64e16 * _