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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? vdbemem.c

?? 調(diào)用sqlite開源數(shù)據(jù)的小程序
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/*** 2004 May 26**** The author disclaims copyright to this source code.  In place of** a legal notice, here is a blessing:****    May you do good and not evil.**    May you find forgiveness for yourself and forgive others.**    May you share freely, never taking more than you give.******************************************************************************* This file contains code use to manipulate "Mem" structure.  A "Mem"** stores a single value in the VDBE.  Mem is an opaque structure visible** only within the VDBE.  Interface routines refer to a Mem using the** name sqlite_value*/#include "sqliteInt.h"#include "os.h"#include <ctype.h>#include "vdbeInt.h"/*** If pMem is an object with a valid string representation, this routine** ensures the internal encoding for the string representation is** 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE.**** If pMem is not a string object, or the encoding of the string** representation is already stored using the requested encoding, then this** routine is a no-op.**** SQLITE_OK is returned if the conversion is successful (or not required).** SQLITE_NOMEM may be returned if a malloc() fails during conversion** between formats.*/int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){  int rc;  if( !(pMem->flags&MEM_Str) || pMem->enc==desiredEnc ){    return SQLITE_OK;  }#ifdef SQLITE_OMIT_UTF16  return SQLITE_ERROR;#else  rc = sqlite3VdbeMemTranslate(pMem, desiredEnc);  if( rc==SQLITE_NOMEM ){    sqlite3VdbeMemRelease(pMem);    pMem->flags = MEM_Null;    pMem->z = 0;  }  return rc;#endif}/*** Make the given Mem object MEM_Dyn.**** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.*/int sqlite3VdbeMemDynamicify(Mem *pMem){  int n = pMem->n;  u8 *z;  if( (pMem->flags & (MEM_Ephem|MEM_Static|MEM_Short))==0 ){    return SQLITE_OK;  }  assert( (pMem->flags & MEM_Dyn)==0 );  assert( pMem->flags & (MEM_Str|MEM_Blob) );  z = sqliteMallocRaw( n+2 );  if( z==0 ){    return SQLITE_NOMEM;  }  pMem->flags |= MEM_Dyn|MEM_Term;  pMem->xDel = 0;  memcpy(z, pMem->z, n );  z[n] = 0;  z[n+1] = 0;  pMem->z = z;  pMem->flags &= ~(MEM_Ephem|MEM_Static|MEM_Short);  return SQLITE_OK;}/*** Make the given Mem object either MEM_Short or MEM_Dyn so that bytes** of the Mem.z[] array can be modified.**** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.*/int sqlite3VdbeMemMakeWriteable(Mem *pMem){  int n;  u8 *z;  if( (pMem->flags & (MEM_Ephem|MEM_Static))==0 ){    return SQLITE_OK;  }  assert( (pMem->flags & MEM_Dyn)==0 );  assert( pMem->flags & (MEM_Str|MEM_Blob) );  if( (n = pMem->n)+2<sizeof(pMem->zShort) ){    z = pMem->zShort;    pMem->flags |= MEM_Short|MEM_Term;  }else{    z = sqliteMallocRaw( n+2 );    if( z==0 ){      return SQLITE_NOMEM;    }    pMem->flags |= MEM_Dyn|MEM_Term;    pMem->xDel = 0;  }  memcpy(z, pMem->z, n );  z[n] = 0;  z[n+1] = 0;  pMem->z = z;  pMem->flags &= ~(MEM_Ephem|MEM_Static);  return SQLITE_OK;}/*** Make sure the given Mem is \u0000 terminated.*/int sqlite3VdbeMemNulTerminate(Mem *pMem){  /* In SQLite, a string without a nul terminator occurs when a string  ** is loaded from disk (in this case the memory management is ephemeral),  ** or when it is supplied by the user as a bound variable or function  ** return value. Therefore, the memory management of the string must be  ** either ephemeral, static or controlled by a user-supplied destructor.  */  assert(                             !(pMem->flags&MEM_Str) ||                /* it's not a string, or      */    (pMem->flags&MEM_Term) ||                /* it's nul term. already, or */    (pMem->flags&(MEM_Ephem|MEM_Static)) ||  /* it's static or ephem, or   */    (pMem->flags&MEM_Dyn && pMem->xDel)      /* external management        */  );  if( (pMem->flags & MEM_Term)!=0 || (pMem->flags & MEM_Str)==0 ){    return SQLITE_OK;   /* Nothing to do */  }  if( pMem->flags & (MEM_Static|MEM_Ephem) ){    return sqlite3VdbeMemMakeWriteable(pMem);  }else{    char *z = sqliteMalloc(pMem->n+2);    if( !z ) return SQLITE_NOMEM;    memcpy(z, pMem->z, pMem->n);    z[pMem->n] = 0;    z[pMem->n+1] = 0;    pMem->xDel(pMem->z);    pMem->xDel = 0;    pMem->z = z;  }  return SQLITE_OK;}/*** Add MEM_Str to the set of representations for the given Mem.  Numbers** are converted using sqlite3_snprintf().  Converting a BLOB to a string** is a no-op.**** Existing representations MEM_Int and MEM_Real are *not* invalidated.**** A MEM_Null value will never be passed to this function. This function is** used for converting values to text for returning to the user (i.e. via** sqlite3_value_text()), or for ensuring that values to be used as btree** keys are strings. In the former case a NULL pointer is returned the** user and the later is an internal programming error.*/int sqlite3VdbeMemStringify(Mem *pMem, int enc){  int rc = SQLITE_OK;  int fg = pMem->flags;  u8 *z = pMem->zShort;  assert( !(fg&(MEM_Str|MEM_Blob)) );  assert( fg&(MEM_Int|MEM_Real) );  /* For a Real or Integer, use sqlite3_snprintf() to produce the UTF-8  ** string representation of the value. Then, if the required encoding  ** is UTF-16le or UTF-16be do a translation.  **   ** FIX ME: It would be better if sqlite3_snprintf() could do UTF-16.  */  if( fg & MEM_Real ){    sqlite3_snprintf(NBFS, z, "%!.15g", pMem->r);  }else{    assert( fg & MEM_Int );    sqlite3_snprintf(NBFS, z, "%lld", pMem->i);  }  pMem->n = strlen(z);  pMem->z = z;  pMem->enc = SQLITE_UTF8;  pMem->flags |= MEM_Str | MEM_Short | MEM_Term;  sqlite3VdbeChangeEncoding(pMem, enc);  return rc;}/*** Memory cell pMem contains the context of an aggregate function.** This routine calls the finalize method for that function.  The** result of the aggregate is stored back into pMem.*/void sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){  if( pFunc && pFunc->xFinalize ){    sqlite3_context ctx;    assert( (pMem->flags & MEM_Null)!=0 || pFunc==*(FuncDef**)&pMem->i );    ctx.s.flags = MEM_Null;    ctx.s.z = pMem->zShort;    ctx.pMem = pMem;    ctx.pFunc = pFunc;    pFunc->xFinalize(&ctx);    if( pMem->z && pMem->z!=pMem->zShort ){      sqliteFree( pMem->z );    }    *pMem = ctx.s;    if( pMem->flags & MEM_Short ){      pMem->z = pMem->zShort;    }  }}/*** Release any memory held by the Mem. This may leave the Mem in an** inconsistent state, for example with (Mem.z==0) and** (Mem.type==SQLITE_TEXT).*/void sqlite3VdbeMemRelease(Mem *p){  if( p->flags & (MEM_Dyn|MEM_Agg) ){    if( p->xDel ){      if( p->flags & MEM_Agg ){        sqlite3VdbeMemFinalize(p, *(FuncDef**)&p->i);        assert( (p->flags & MEM_Agg)==0 );        sqlite3VdbeMemRelease(p);      }else{        p->xDel((void *)p->z);      }    }else{      sqliteFree(p->z);    }    p->z = 0;    p->xDel = 0;  }}/*** Return some kind of integer value which is the best we can do** at representing the value that *pMem describes as an integer.** If pMem is an integer, then the value is exact.  If pMem is** a floating-point then the value returned is the integer part.** If pMem is a string or blob, then we make an attempt to convert** it into a integer and return that.  If pMem is NULL, return 0.**** If pMem is a string, its encoding might be changed.*/i64 sqlite3VdbeIntValue(Mem *pMem){  int flags = pMem->flags;  if( flags & MEM_Int ){    return pMem->i;  }else if( flags & MEM_Real ){    return (i64)pMem->r;  }else if( flags & (MEM_Str|MEM_Blob) ){    i64 value;    if( sqlite3VdbeChangeEncoding(pMem, SQLITE_UTF8)       || sqlite3VdbeMemNulTerminate(pMem) ){      return SQLITE_NOMEM;    }    assert( pMem->z );    sqlite3atoi64(pMem->z, &value);    return value;  }else{    return 0;  }}/*** Convert pMem to type integer.  Invalidate any prior representations.*/int sqlite3VdbeMemIntegerify(Mem *pMem){  pMem->i = sqlite3VdbeIntValue(pMem);  sqlite3VdbeMemRelease(pMem);  pMem->flags = MEM_Int;  return SQLITE_OK;}/*** Return the best representation of pMem that we can get into a** double.  If pMem is already a double or an integer, return its** value.  If it is a string or blob, try to convert it to a double.** If it is a NULL, return 0.0.*/double sqlite3VdbeRealValue(Mem *pMem){  if( pMem->flags & MEM_Real ){    return pMem->r;  }else if( pMem->flags & MEM_Int ){    return (double)pMem->i;  }else if( pMem->flags & (MEM_Str|MEM_Blob) ){    double val = 0.0;    if( sqlite3VdbeChangeEncoding(pMem, SQLITE_UTF8)       || sqlite3VdbeMemNulTerminate(pMem) ){      return SQLITE_NOMEM;    }    assert( pMem->z );    sqlite3AtoF(pMem->z, &val);    return val;  }else{    return 0.0;  }}/*** Convert pMem so that it is of type MEM_Real.  Invalidate any** prior representations.*/int sqlite3VdbeMemRealify(Mem *pMem){  pMem->r = sqlite3VdbeRealValue(pMem);  sqlite3VdbeMemRelease(pMem);  pMem->flags = MEM_Real;  return SQLITE_OK;}/*** Delete any previous value and set the value stored in *pMem to NULL.*/void sqlite3VdbeMemSetNull(Mem *pMem){  sqlite3VdbeMemRelease(pMem);  pMem->flags = MEM_Null;  pMem->type = SQLITE_NULL;  pMem->n = 0;}/*** Delete any previous value and set the value stored in *pMem to val,** manifest type INTEGER.*/void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){  sqlite3VdbeMemRelease(pMem);  pMem->i = val;  pMem->flags = MEM_Int;  pMem->type = SQLITE_INTEGER;}/*** Delete any previous value and set the value stored in *pMem to val,** manifest type REAL.*/void sqlite3VdbeMemSetDouble(Mem *pMem, double val){  sqlite3VdbeMemRelease(pMem);  pMem->r = val;  pMem->flags = MEM_Real;  pMem->type = SQLITE_FLOAT;}/*** Make an shallow copy of pFrom into pTo.  Prior contents of** pTo are overwritten.  The pFrom->z field is not duplicated.  If** pFrom->z is used, then pTo->z points to the same thing as pFrom->z** and flags gets srcType (either MEM_Ephem or MEM_Static).*/void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){  memcpy(pTo, pFrom, sizeof(*pFrom)-sizeof(pFrom->zShort));  pTo->xDel = 0;  if( pTo->flags & (MEM_Str|MEM_Blob) ){    pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Short|MEM_Ephem);    assert( srcType==MEM_Ephem || srcType==MEM_Static );    pTo->flags |= srcType;  }}/*** Make a full copy of pFrom into pTo.  Prior contents of pTo are** freed before the copy is made.*/int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){  int rc;  if( pTo->flags & MEM_Dyn ){    sqlite3VdbeMemRelease(pTo);  }  sqlite3VdbeMemShallowCopy(pTo, pFrom, MEM_Ephem);  if( pTo->flags & MEM_Ephem ){    rc = sqlite3VdbeMemMakeWriteable(pTo);  }else{    rc = SQLITE_OK;  }  return rc;}/*** Transfer the contents of pFrom to pTo. Any existing value in pTo is** freed. If pFrom contains ephemeral data, a copy is made.**** pFrom contains an SQL NULL when this routine returns.  SQLITE_NOMEM** might be returned if pFrom held ephemeral data and we were unable** to allocate enough space to make a copy.*/int sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){  int rc;  if( pTo->flags & MEM_Dyn ){    sqlite3VdbeMemRelease(pTo);  }  memcpy(pTo, pFrom, sizeof(Mem));  if( pFrom->flags & MEM_Short ){    pTo->z = pTo->zShort;  }  pFrom->flags = MEM_Null;  pFrom->xDel = 0;  if( pTo->flags & MEM_Ephem ){    rc = sqlite3VdbeMemMakeWriteable(pTo);  }else{    rc = SQLITE_OK;  }  return rc;}/*** Change the value of a Mem to be a string or a BLOB.*/int sqlite3VdbeMemSetStr(  Mem *pMem,          /* Memory cell to set to string value */  const char *z,      /* String pointer */  int n,              /* Bytes in string, or negative */  u8 enc,             /* Encoding of z.  0 for BLOBs */  void (*xDel)(void*) /* Destructor function */){  sqlite3VdbeMemRelease(pMem);  if( !z ){    pMem->flags = MEM_Null;    pMem->type = SQLITE_NULL;    return SQLITE_OK;  }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人久久视频在线观看| 亚洲精品国产精华液| 在线观看精品一区| 99re这里只有精品视频首页| 国产精品影视网| 免费成人av在线| 美国毛片一区二区| 久久99精品国产| 国产一区二区三区四| 国产一区二区免费看| 国产一区二区三区最好精华液| 欧美日韩卡一卡二| 777久久久精品| 欧美一级片免费看| 精品久久久久99| 国产欧美一区二区精品性 | 亚洲精品福利视频网站| 亚洲激情综合网| 日日夜夜精品视频免费| 久久超碰97中文字幕| 国产麻豆视频一区| 国产精品一区二区免费不卡| 风间由美性色一区二区三区| 99精品视频一区二区三区| 欧美在线播放高清精品| 日韩欧美国产麻豆| 国产精品国产自产拍高清av| 亚洲制服丝袜一区| 韩国av一区二区三区在线观看| 国产成a人亚洲精| 一本久道中文字幕精品亚洲嫩| 欧美疯狂性受xxxxx喷水图片| 久久色.com| 偷拍亚洲欧洲综合| 北岛玲一区二区三区四区| 欧美日韩色一区| 中文字幕+乱码+中文字幕一区| 亚洲国产成人91porn| 国产精品自在在线| 制服.丝袜.亚洲.中文.综合| 国产欧美视频在线观看| 丝袜亚洲另类欧美| 99久免费精品视频在线观看| 欧美一区二区不卡视频| 亚洲日本欧美天堂| 国产在线国偷精品产拍免费yy| 一本色道**综合亚洲精品蜜桃冫 | 精品国产一区二区三区久久久蜜月 | 欧美性视频一区二区三区| 日韩视频123| 亚洲高清免费视频| 91丨国产丨九色丨pron| 国产三区在线成人av| 喷白浆一区二区| 欧美亚洲高清一区| 亚洲欧美电影院| 成人午夜短视频| 久久婷婷成人综合色| 免费欧美高清视频| 欧美日韩日日骚| 亚洲综合激情另类小说区| 波多野结衣91| 国产欧美日韩另类视频免费观看| 日韩国产欧美在线播放| 在线观看日韩一区| 亚洲欧美激情在线| 99精品偷自拍| 椎名由奈av一区二区三区| 粉嫩嫩av羞羞动漫久久久| 精品国产第一区二区三区观看体验 | 欧美日韩激情一区二区三区| 国产精品电影院| 99热国产精品| 亚洲另类在线一区| 欧美日韩一区高清| 首页国产欧美日韩丝袜| 91精品婷婷国产综合久久| 视频一区免费在线观看| 欧美久久一区二区| 日韩不卡免费视频| 亚洲精品一区二区三区四区高清| 久久精品国产成人一区二区三区 | 六月丁香综合在线视频| 日韩欧美一二区| 麻豆精品视频在线| 久久久精品tv| 99国产欧美久久久精品| 一区二区三区在线视频免费观看| 色哟哟精品一区| 亚洲高清三级视频| 日韩女优视频免费观看| 国产一区二区电影| 国产精品白丝在线| 一本大道av一区二区在线播放| 亚洲视频在线一区| 欧美精品九九99久久| 蜜桃av一区二区在线观看| 久久综合成人精品亚洲另类欧美| 天天色综合天天| 精品国产青草久久久久福利| 韩国av一区二区三区| 日韩毛片视频在线看| 欧美亚洲一区二区三区四区| 午夜精品影院在线观看| 欧美精品一区二区三区久久久| 国产成人自拍高清视频在线免费播放| 国产精品乱码人人做人人爱 | 国产ts人妖一区二区| 日本一区二区三区国色天香 | 日韩国产精品久久久久久亚洲| 日韩午夜小视频| 99国产精品国产精品毛片| 亚洲综合一区二区精品导航| 欧美一卡二卡在线| 成人黄页在线观看| 日本欧美一区二区三区乱码| 久久久午夜精品| 色哟哟欧美精品| 国产老女人精品毛片久久| 艳妇臀荡乳欲伦亚洲一区| 日韩精品一区二区三区视频在线观看 | 青娱乐精品在线视频| 国产精品青草综合久久久久99| 欧美日韩中文字幕一区二区| 国产精品一二二区| 日本亚洲三级在线| 最新国产精品久久精品| 欧美电影免费观看高清完整版在 | 亚洲与欧洲av电影| 国产日韩三级在线| 欧美精品乱码久久久久久按摩| 不卡一区二区在线| 麻豆一区二区在线| 日本怡春院一区二区| 亚洲精品乱码久久久久久| 久久综合给合久久狠狠狠97色69| 欧美日韩一区小说| 99视频在线精品| 国产激情偷乱视频一区二区三区| 性感美女久久精品| 亚洲一区二区欧美日韩| 国产精品免费久久久久| 亚洲精品一线二线三线| 欧美成人精品1314www| 欧美精品第1页| 欧美三区在线观看| 欧美综合天天夜夜久久| 色噜噜狠狠色综合中国| av不卡一区二区三区| 国产乱妇无码大片在线观看| 免费成人在线视频观看| 日韩精品一二三四| 亚洲妇女屁股眼交7| 亚洲最快最全在线视频| 一区二区三区中文字幕精品精品| 中文字幕日韩精品一区| 成人免费一区二区三区在线观看 | 亚洲欧美色综合| 亚洲婷婷国产精品电影人久久| 国产欧美一区二区精品仙草咪 | 99热国产精品| 成人黄色在线视频| 99精品国产99久久久久久白柏| av在线免费不卡| 95精品视频在线| 欧美日韩精品系列| 欧美一级黄色大片| 久久网站热最新地址| 国产拍揄自揄精品视频麻豆| 久久久91精品国产一区二区精品| 国产视频一区二区在线| 国产精品护士白丝一区av| 亚洲天堂免费看| 亚洲在线视频免费观看| 日韩成人伦理电影在线观看| 久草在线在线精品观看| 成人免费高清视频| 在线观看区一区二| 日韩免费观看高清完整版在线观看| 欧美成人午夜电影| 国产精品久久777777| 亚洲一区二区三区国产| 毛片av一区二区| 91丨九色丨蝌蚪丨老版| 欧美精品1区2区3区| 久久久九九九九| 一区二区三区视频在线观看| 亚洲自拍偷拍九九九| 国内精品免费**视频| 91亚洲国产成人精品一区二区三 | 99九九99九九九视频精品| 欧美日韩性生活| 久久久久国产成人精品亚洲午夜| 综合久久给合久久狠狠狠97色 | 亚洲品质自拍视频网站| 日本在线观看不卡视频| 91国偷自产一区二区使用方法| 日韩欧美国产精品一区| 一级做a爱片久久| 韩国三级中文字幕hd久久精品|