亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vdbemem.c

?? 調用sqlite開源數據的小程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
  pMem->z = (char *)z;  if( xDel==SQLITE_STATIC ){    pMem->flags = MEM_Static;  }else if( xDel==SQLITE_TRANSIENT ){    pMem->flags = MEM_Ephem;  }else{    pMem->flags = MEM_Dyn;    pMem->xDel = xDel;  }  pMem->enc = enc;  pMem->type = enc==0 ? SQLITE_BLOB : SQLITE_TEXT;  pMem->n = n;  assert( enc==0 || enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE       || enc==SQLITE_UTF16BE );  switch( enc ){    case 0:      pMem->flags |= MEM_Blob;      pMem->enc = SQLITE_UTF8;      break;    case SQLITE_UTF8:      pMem->flags |= MEM_Str;      if( n<0 ){        pMem->n = strlen(z);        pMem->flags |= MEM_Term;      }      break;#ifndef SQLITE_OMIT_UTF16    case SQLITE_UTF16LE:    case SQLITE_UTF16BE:      pMem->flags |= MEM_Str;      if( pMem->n<0 ){        pMem->n = sqlite3utf16ByteLen(pMem->z,-1);        pMem->flags |= MEM_Term;      }      if( sqlite3VdbeMemHandleBom(pMem) ){        return SQLITE_NOMEM;      }#endif /* SQLITE_OMIT_UTF16 */  }  if( pMem->flags&MEM_Ephem ){    return sqlite3VdbeMemMakeWriteable(pMem);  }  return SQLITE_OK;}/*** Compare the values contained by the two memory cells, returning** negative, zero or positive if pMem1 is less than, equal to, or greater** than pMem2. Sorting order is NULL's first, followed by numbers (integers** and reals) sorted numerically, followed by text ordered by the collating** sequence pColl and finally blob's ordered by memcmp().**** Two NULL values are considered equal by this function.*/int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){  int rc;  int f1, f2;  int combined_flags;  /* Interchange pMem1 and pMem2 if the collating sequence specifies  ** DESC order.  */  f1 = pMem1->flags;  f2 = pMem2->flags;  combined_flags = f1|f2;   /* If one value is NULL, it is less than the other. If both values  ** are NULL, return 0.  */  if( combined_flags&MEM_Null ){    return (f2&MEM_Null) - (f1&MEM_Null);  }  /* If one value is a number and the other is not, the number is less.  ** If both are numbers, compare as reals if one is a real, or as integers  ** if both values are integers.  */  if( combined_flags&(MEM_Int|MEM_Real) ){    if( !(f1&(MEM_Int|MEM_Real)) ){      return 1;    }    if( !(f2&(MEM_Int|MEM_Real)) ){      return -1;    }    if( (f1 & f2 & MEM_Int)==0 ){      double r1, r2;      if( (f1&MEM_Real)==0 ){        r1 = pMem1->i;      }else{        r1 = pMem1->r;      }      if( (f2&MEM_Real)==0 ){        r2 = pMem2->i;      }else{        r2 = pMem2->r;      }      if( r1<r2 ) return -1;      if( r1>r2 ) return 1;      return 0;    }else{      assert( f1&MEM_Int );      assert( f2&MEM_Int );      if( pMem1->i < pMem2->i ) return -1;      if( pMem1->i > pMem2->i ) return 1;      return 0;    }  }  /* If one value is a string and the other is a blob, the string is less.  ** If both are strings, compare using the collating functions.  */  if( combined_flags&MEM_Str ){    if( (f1 & MEM_Str)==0 ){      return 1;    }    if( (f2 & MEM_Str)==0 ){      return -1;    }    assert( pMem1->enc==pMem2->enc );    assert( pMem1->enc==SQLITE_UTF8 ||             pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE );    /* This assert may fail if the collation sequence is deleted after this    ** vdbe program is compiled. The documentation defines this as an    ** undefined condition. A crash is usual result.    */    assert( !pColl || pColl->xCmp );    if( pColl ){      if( pMem1->enc==pColl->enc ){        return pColl->xCmp(pColl->pUser,pMem1->n,pMem1->z,pMem2->n,pMem2->z);      }else{        u8 origEnc = pMem1->enc;        rc = pColl->xCmp(          pColl->pUser,          sqlite3ValueBytes((sqlite3_value*)pMem1, pColl->enc),          sqlite3ValueText((sqlite3_value*)pMem1, pColl->enc),          sqlite3ValueBytes((sqlite3_value*)pMem2, pColl->enc),          sqlite3ValueText((sqlite3_value*)pMem2, pColl->enc)        );        sqlite3ValueBytes((sqlite3_value*)pMem1, origEnc);        sqlite3ValueText((sqlite3_value*)pMem1, origEnc);        sqlite3ValueBytes((sqlite3_value*)pMem2, origEnc);        sqlite3ValueText((sqlite3_value*)pMem2, origEnc);        return rc;      }    }    /* If a NULL pointer was passed as the collate function, fall through    ** to the blob case and use memcmp().  */  }   /* Both values must be blobs.  Compare using memcmp().  */  rc = memcmp(pMem1->z, pMem2->z, (pMem1->n>pMem2->n)?pMem2->n:pMem1->n);  if( rc==0 ){    rc = pMem1->n - pMem2->n;  }  return rc;}/*** Move data out of a btree key or data field and into a Mem structure.** The data or key is taken from the entry that pCur is currently pointing** to.  offset and amt determine what portion of the data or key to retrieve.** key is true to get the key or false to get data.  The result is written** into the pMem element.**** The pMem structure is assumed to be uninitialized.  Any prior content** is overwritten without being freed.**** If this routine fails for any reason (malloc returns NULL or unable** to read from the disk) then the pMem is left in an inconsistent state.*/int sqlite3VdbeMemFromBtree(  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */  int offset,       /* Offset from the start of data to return bytes from. */  int amt,          /* Number of bytes to return. */  int key,          /* If true, retrieve from the btree key, not data. */  Mem *pMem         /* OUT: Return data in this Mem structure. */){  char *zData;      /* Data from the btree layer */  int available;    /* Number of bytes available on the local btree page */  if( key ){    zData = (char *)sqlite3BtreeKeyFetch(pCur, &available);  }else{    zData = (char *)sqlite3BtreeDataFetch(pCur, &available);  }  pMem->n = amt;  if( offset+amt<=available ){    pMem->z = &zData[offset];    pMem->flags = MEM_Blob|MEM_Ephem;  }else{    int rc;    if( amt>NBFS-2 ){      zData = (char *)sqliteMallocRaw(amt+2);      if( !zData ){        return SQLITE_NOMEM;      }      pMem->flags = MEM_Blob|MEM_Dyn|MEM_Term;      pMem->xDel = 0;    }else{      zData = &(pMem->zShort[0]);      pMem->flags = MEM_Blob|MEM_Short|MEM_Term;    }    pMem->z = zData;    pMem->enc = 0;    pMem->type = SQLITE_BLOB;    if( key ){      rc = sqlite3BtreeKey(pCur, offset, amt, zData);    }else{      rc = sqlite3BtreeData(pCur, offset, amt, zData);    }    zData[amt] = 0;    zData[amt+1] = 0;    if( rc!=SQLITE_OK ){      if( amt>NBFS-2 ){        assert( zData!=pMem->zShort );        assert( pMem->flags & MEM_Dyn );        sqliteFree(zData);      } else {        assert( zData==pMem->zShort );        assert( pMem->flags & MEM_Short );      }      return rc;    }  }  return SQLITE_OK;}#ifndef NDEBUG/*** Perform various checks on the memory cell pMem. An assert() will** fail if pMem is internally inconsistent.*/void sqlite3VdbeMemSanity(Mem *pMem, u8 db_enc){  int flags = pMem->flags;  assert( flags!=0 );  /* Must define some type */  if( pMem->flags & (MEM_Str|MEM_Blob) ){    int x = pMem->flags & (MEM_Static|MEM_Dyn|MEM_Ephem|MEM_Short);    assert( x!=0 );            /* Strings must define a string subtype */    assert( (x & (x-1))==0 );  /* Only one string subtype can be defined */    assert( pMem->z!=0 );      /* Strings must have a value */    /* Mem.z points to Mem.zShort iff the subtype is MEM_Short */    assert( (pMem->flags & MEM_Short)==0 || pMem->z==pMem->zShort );    assert( (pMem->flags & MEM_Short)!=0 || pMem->z!=pMem->zShort );    /* No destructor unless there is MEM_Dyn */    assert( pMem->xDel==0 || (pMem->flags & MEM_Dyn)!=0 );    if( (flags & MEM_Str) ){      assert( pMem->enc==SQLITE_UTF8 ||               pMem->enc==SQLITE_UTF16BE ||              pMem->enc==SQLITE_UTF16LE       );      /* If the string is UTF-8 encoded and nul terminated, then pMem->n      ** must be the length of the string.  (Later:)  If the database file      ** has been corrupted, '\000' characters might have been inserted      ** into the middle of the string.  In that case, the strlen() might      ** be less.      */      if( pMem->enc==SQLITE_UTF8 && (flags & MEM_Term) ){         assert( strlen(pMem->z)<=pMem->n );        assert( pMem->z[pMem->n]==0 );      }    }  }else{    /* Cannot define a string subtype for non-string objects */    assert( (pMem->flags & (MEM_Static|MEM_Dyn|MEM_Ephem|MEM_Short))==0 );    assert( pMem->xDel==0 );  }  /* MEM_Null excludes all other types */  assert( (pMem->flags&(MEM_Str|MEM_Int|MEM_Real|MEM_Blob))==0          || (pMem->flags&MEM_Null)==0 );  /* If the MEM is both real and integer, the values are equal */  assert( (pMem->flags & (MEM_Int|MEM_Real))!=(MEM_Int|MEM_Real)           || pMem->r==pMem->i );}#endif/* This function is only available internally, it is not part of the** external API. It works in a similar way to sqlite3_value_text(),** except the data returned is in the encoding specified by the second** parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or** SQLITE_UTF8.*/const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){  if( !pVal ) return 0;  assert( enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE || enc==SQLITE_UTF8);  if( pVal->flags&MEM_Null ){    return 0;  }  if( pVal->flags&MEM_Str ){    sqlite3VdbeChangeEncoding(pVal, enc);  }else if( !(pVal->flags&MEM_Blob) ){    sqlite3VdbeMemStringify(pVal, enc);  }  return (const void *)(pVal->z);}/*** Create a new sqlite3_value object.*/sqlite3_value* sqlite3ValueNew(void){  Mem *p = sqliteMalloc(sizeof(*p));  if( p ){    p->flags = MEM_Null;    p->type = SQLITE_NULL;  }  return p;}/*** Create a new sqlite3_value object, containing the value of pExpr.**** This only works for very simple expressions that consist of one constant** token (i.e. "5", "5.1", "NULL", "'a string'"). If the expression can** be converted directly into a value, then the value is allocated and** a pointer written to *ppVal. The caller is responsible for deallocating** the value by passing it to sqlite3ValueFree() later on. If the expression** cannot be converted to a value, then *ppVal is set to NULL.*/int sqlite3ValueFromExpr(  Expr *pExpr,   u8 enc,   u8 affinity,  sqlite3_value **ppVal){  int op;  char *zVal = 0;  sqlite3_value *pVal = 0;  if( !pExpr ){    *ppVal = 0;    return SQLITE_OK;  }  op = pExpr->op;  if( op==TK_STRING || op==TK_FLOAT || op==TK_INTEGER ){    zVal = sqliteStrNDup(pExpr->token.z, pExpr->token.n);    pVal = sqlite3ValueNew();    if( !zVal || !pVal ) goto no_mem;    sqlite3Dequote(zVal);    sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, sqlite3FreeX);    if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_NONE ){      sqlite3ValueApplyAffinity(pVal, SQLITE_AFF_NUMERIC, enc);    }else{      sqlite3ValueApplyAffinity(pVal, affinity, enc);    }  }else if( op==TK_UMINUS ) {    if( SQLITE_OK==sqlite3ValueFromExpr(pExpr->pLeft, enc, affinity, &pVal) ){      pVal->i = -1 * pVal->i;      pVal->r = -1.0 * pVal->r;    }  }#ifndef SQLITE_OMIT_BLOB_LITERAL  else if( op==TK_BLOB ){    int nVal;    pVal = sqlite3ValueNew();    zVal = sqliteStrNDup(pExpr->token.z+1, pExpr->token.n-1);    if( !zVal || !pVal ) goto no_mem;    sqlite3Dequote(zVal);    nVal = strlen(zVal)/2;    sqlite3VdbeMemSetStr(pVal, sqlite3HexToBlob(zVal), nVal, 0, sqlite3FreeX);    sqliteFree(zVal);  }#endif  *ppVal = pVal;  return SQLITE_OK;no_mem:  sqliteFree(zVal);  sqlite3ValueFree(pVal);  *ppVal = 0;  return SQLITE_NOMEM;}/*** Change the string value of an sqlite3_value object*/void sqlite3ValueSetStr(  sqlite3_value *v,   int n,   const void *z,   u8 enc,  void (*xDel)(void*)){  if( v ) sqlite3VdbeMemSetStr((Mem *)v, z, n, enc, xDel);}/*** Free an sqlite3_value object*/void sqlite3ValueFree(sqlite3_value *v){  if( !v ) return;  sqlite3ValueSetStr(v, 0, 0, SQLITE_UTF8, SQLITE_STATIC);  sqliteFree(v);}/*** Return the number of bytes in the sqlite3_value object assuming** that it uses the encoding "enc"*/int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){  Mem *p = (Mem*)pVal;  if( (p->flags & MEM_Blob)!=0 || sqlite3ValueText(pVal, enc) ){    return p->n;  }  return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国成人福利片在线播放| 亚洲精品欧美专区| 麻豆传媒一区二区三区| 8x8x8国产精品| 男女性色大片免费观看一区二区 | 欧美放荡的少妇| 香蕉乱码成人久久天堂爱免费| 日本久久电影网| 午夜欧美在线一二页| 欧美区在线观看| 久久66热re国产| 久久久精品中文字幕麻豆发布| 国产精品18久久久久久vr| 日本一区二区成人在线| 色狠狠一区二区| 午夜不卡av免费| 日韩女优制服丝袜电影| 国产精品1024| 亚洲免费伊人电影| 制服丝袜激情欧洲亚洲| 国产精品亚洲第一区在线暖暖韩国 | 欧洲精品一区二区| 日本欧美在线看| 国产日韩欧美a| 在线日韩一区二区| 久久99国产精品尤物| 国产精品美女一区二区三区| 91久久免费观看| 麻豆国产精品一区二区三区 | 欧美日韩高清一区二区三区| 免费在线视频一区| 欧美国产欧美亚州国产日韩mv天天看完整| 99免费精品视频| 日韩1区2区3区| 国产精品国产三级国产普通话蜜臀 | 国产精品丝袜久久久久久app| 91麻豆精品在线观看| 青青草原综合久久大伊人精品| 久久女同精品一区二区| 欧洲国内综合视频| 国产精品888| 亚洲成人av一区二区三区| 亚洲精品在线观看网站| 日本韩国一区二区三区| 激情综合网最新| 亚洲影院理伦片| 国产日韩一级二级三级| 欧美日韩国产乱码电影| 成+人+亚洲+综合天堂| 欧美a级一区二区| 亚洲天堂久久久久久久| 欧美精品一区在线观看| 欧美性猛片xxxx免费看久爱| 国产福利91精品一区二区三区| 亚洲国产视频一区二区| 国产精品每日更新| 久久免费午夜影院| 91精品国产色综合久久不卡蜜臀| a级高清视频欧美日韩| 精久久久久久久久久久| 视频一区视频二区中文| 亚洲一本大道在线| 亚洲视频在线观看三级| 国产精品丝袜91| 国产免费成人在线视频| 久久中文字幕电影| 日韩欧美一区在线观看| 制服丝袜亚洲网站| 这里只有精品99re| 欧美综合天天夜夜久久| 91美女福利视频| 99精品视频一区| caoporen国产精品视频| 99精品欧美一区| 99久久er热在这里只有精品66| 成人美女视频在线看| 国产在线视频精品一区| 经典三级视频一区| 国产精品一区免费在线观看| 国内外精品视频| 国产精品一区免费视频| 狠狠色丁香久久婷婷综| 黄色资源网久久资源365| 日韩成人精品在线| 美腿丝袜亚洲综合| 国模冰冰炮一区二区| 国产最新精品精品你懂的| 国产精品一区二区三区四区| 国产一区视频在线看| 狠狠色狠狠色综合系列| 国产99久久久精品| 99精品视频一区二区| 色综合天天视频在线观看| 91官网在线免费观看| 日本电影亚洲天堂一区| 欧美电影在哪看比较好| 欧美大片在线观看一区二区| 久久午夜免费电影| 国产精品免费视频网站| 亚洲免费观看高清完整版在线| 亚洲精品乱码久久久久久黑人| 亚洲一区二区三区四区的| 午夜精品福利视频网站| 久久99精品久久久| 成人av动漫网站| 欧美手机在线视频| 精品欧美乱码久久久久久1区2区| 国产三级三级三级精品8ⅰ区| ...av二区三区久久精品| 一个色综合av| 精品一区二区三区日韩| av爱爱亚洲一区| 在线91免费看| 国产精品免费丝袜| 日韩综合小视频| 丰满白嫩尤物一区二区| 欧美色倩网站大全免费| 欧美精品一区二区三区一线天视频 | www.日韩在线| 欧美日本国产一区| 国产欧美精品一区二区三区四区| 亚洲精品国产精品乱码不99| 美女脱光内衣内裤视频久久影院| 国产精品夜夜嗨| 欧美日韩激情一区| 欧美激情中文不卡| 久久精品av麻豆的观看方式| 成人aaaa免费全部观看| 欧美成人精品福利| 亚洲毛片av在线| 成人影视亚洲图片在线| 欧美日韩国产一级| 中文字幕一区二区视频| 久久国产精品露脸对白| 在线一区二区三区| 国产女同性恋一区二区| 青草av.久久免费一区| 色天天综合色天天久久| 欧美精品一区二| 偷拍自拍另类欧美| 日本久久一区二区三区| 国产欧美一区二区三区网站| 日本午夜一区二区| 91国产免费看| 亚洲视频一区二区在线| 国产成人午夜精品影院观看视频| 欧美肥妇bbw| 亚洲国产cao| 色播五月激情综合网| 欧美国产激情二区三区| 久久99精品国产| 日韩欧美精品在线视频| 天堂va蜜桃一区二区三区 | 岛国精品一区二区| 在线播放国产精品二区一二区四区| 亚洲欧洲在线观看av| 国产米奇在线777精品观看| 日韩一级二级三级| 日日嗨av一区二区三区四区| 欧美探花视频资源| 亚洲精品国产精品乱码不99| 色老头久久综合| 亚洲色图丝袜美腿| eeuss鲁片一区二区三区| 中文字幕欧美区| 本田岬高潮一区二区三区| 国产午夜精品福利| 国产福利一区在线观看| 久久嫩草精品久久久精品一| 韩国三级中文字幕hd久久精品| 欧美一级在线免费| 免费三级欧美电影| 日韩一区二区麻豆国产| 免费观看在线色综合| 欧美sm美女调教| 国产精品一区二区在线观看网站| 欧美精品一区二区三区视频| 国产一区二区三区精品欧美日韩一区二区三区| 欧美精品aⅴ在线视频| 日韩成人免费看| 精品女同一区二区| 国产精品一二三四五| 国产三区在线成人av| 99国产欧美另类久久久精品| 国产精品国产三级国产aⅴ入口| www.激情成人| 一区二区三区在线视频观看| 欧美午夜不卡视频| 奇米精品一区二区三区四区| 久久综合99re88久久爱| av中文字幕在线不卡| 一区二区三区**美女毛片| 欧美私人免费视频| 久久激情综合网| 亚洲国产精品精华液2区45| 色婷婷综合久久久久中文一区二区 | 7777精品伊人久久久大香线蕉完整版 | 欧美一二区视频| 国产黑丝在线一区二区三区| 国产精品久线观看视频|