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

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

?? callback.c

?? 調用sqlite開源數據的小程序
?? C
字號:
/*** 2005 May 23 **** 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 functions used to access the internal hash tables** of user defined functions and collation sequences.**** $Id: callback.c,v 1.3 2005/08/14 01:20:38 drh Exp $*/#include "sqliteInt.h"/*** Invoke the 'collation needed' callback to request a collation sequence** in the database text encoding of name zName, length nName.** If the collation sequence*/static void callCollNeeded(sqlite3 *db, const char *zName, int nName){  assert( !db->xCollNeeded || !db->xCollNeeded16 );  if( nName<0 ) nName = strlen(zName);  if( db->xCollNeeded ){    char *zExternal = sqliteStrNDup(zName, nName);    if( !zExternal ) return;    db->xCollNeeded(db->pCollNeededArg, db, (int)db->enc, zExternal);    sqliteFree(zExternal);  }#ifndef SQLITE_OMIT_UTF16  if( db->xCollNeeded16 ){    char const *zExternal;    sqlite3_value *pTmp = sqlite3GetTransientValue(db);    sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);    zExternal = sqlite3ValueText(pTmp, SQLITE_UTF16NATIVE);    if( !zExternal ) return;    db->xCollNeeded16(db->pCollNeededArg, db, (int)db->enc, zExternal);  }#endif}/*** This routine is called if the collation factory fails to deliver a** collation function in the best encoding but there may be other versions** of this collation function (for other text encodings) available. Use one** of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if** possible.*/static int synthCollSeq(sqlite3 *db, CollSeq *pColl){  CollSeq *pColl2;  char *z = pColl->zName;  int n = strlen(z);  int i;  static const u8 aEnc[] = { SQLITE_UTF16BE, SQLITE_UTF16LE, SQLITE_UTF8 };  for(i=0; i<3; i++){    pColl2 = sqlite3FindCollSeq(db, aEnc[i], z, n, 0);    if( pColl2->xCmp!=0 ){      memcpy(pColl, pColl2, sizeof(CollSeq));      return SQLITE_OK;    }  }  return SQLITE_ERROR;}/*** This function is responsible for invoking the collation factory callback** or substituting a collation sequence of a different encoding when the** requested collation sequence is not available in the database native** encoding.** ** If it is not NULL, then pColl must point to the database native encoding ** collation sequence with name zName, length nName.**** The return value is either the collation sequence to be used in database** db for collation type name zName, length nName, or NULL, if no collation** sequence can be found.*/CollSeq *sqlite3GetCollSeq(  sqlite3* db,   CollSeq *pColl,   const char *zName,   int nName){  CollSeq *p;  p = pColl;  if( !p ){    p = sqlite3FindCollSeq(db, db->enc, zName, nName, 0);  }  if( !p || !p->xCmp ){    /* No collation sequence of this type for this encoding is registered.    ** Call the collation factory to see if it can supply us with one.    */    callCollNeeded(db, zName, nName);    p = sqlite3FindCollSeq(db, db->enc, zName, nName, 0);  }  if( p && !p->xCmp && synthCollSeq(db, p) ){    p = 0;  }  assert( !p || p->xCmp );  return p;}/*** This routine is called on a collation sequence before it is used to** check that it is defined. An undefined collation sequence exists when** a database is loaded that contains references to collation sequences** that have not been defined by sqlite3_create_collation() etc.**** If required, this routine calls the 'collation needed' callback to** request a definition of the collating sequence. If this doesn't work, ** an equivalent collating sequence that uses a text encoding different** from the main database is substituted, if one is available.*/int sqlite3CheckCollSeq(Parse *pParse, CollSeq *pColl){  if( pColl ){    const char *zName = pColl->zName;    CollSeq *p = sqlite3GetCollSeq(pParse->db, pColl, zName, -1);    if( !p ){      if( pParse->nErr==0 ){        sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);      }      pParse->nErr++;      return SQLITE_ERROR;    }  }  return SQLITE_OK;}/*** Locate and return an entry from the db.aCollSeq hash table. If the entry** specified by zName and nName is not found and parameter 'create' is** true, then create a new entry. Otherwise return NULL.**** Each pointer stored in the sqlite3.aCollSeq hash table contains an** array of three CollSeq structures. The first is the collation sequence** prefferred for UTF-8, the second UTF-16le, and the third UTF-16be.**** Stored immediately after the three collation sequences is a copy of** the collation sequence name. A pointer to this string is stored in** each collation sequence structure.*/static CollSeq *findCollSeqEntry(  sqlite3 *db,  const char *zName,  int nName,  int create){  CollSeq *pColl;  if( nName<0 ) nName = strlen(zName);  pColl = sqlite3HashFind(&db->aCollSeq, zName, nName);  if( 0==pColl && create ){    pColl = sqliteMalloc( 3*sizeof(*pColl) + nName + 1 );    if( pColl ){      CollSeq *pDel = 0;      pColl[0].zName = (char*)&pColl[3];      pColl[0].enc = SQLITE_UTF8;      pColl[1].zName = (char*)&pColl[3];      pColl[1].enc = SQLITE_UTF16LE;      pColl[2].zName = (char*)&pColl[3];      pColl[2].enc = SQLITE_UTF16BE;      memcpy(pColl[0].zName, zName, nName);      pColl[0].zName[nName] = 0;      pDel = sqlite3HashInsert(&db->aCollSeq, pColl[0].zName, nName, pColl);      /* If a malloc() failure occured in sqlite3HashInsert(), it will       ** return the pColl pointer to be deleted (because it wasn't added      ** to the hash table).      */      assert( !pDel || (sqlite3_malloc_failed && pDel==pColl) );      sqliteFree(pDel);    }  }  return pColl;}/*** Parameter zName points to a UTF-8 encoded string nName bytes long.** Return the CollSeq* pointer for the collation sequence named zName** for the encoding 'enc' from the database 'db'.**** If the entry specified is not found and 'create' is true, then create a** new entry.  Otherwise return NULL.*/CollSeq *sqlite3FindCollSeq(  sqlite3 *db,  u8 enc,  const char *zName,  int nName,  int create){  CollSeq *pColl = findCollSeqEntry(db, zName, nName, create);  assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );  assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );  if( pColl ) pColl += enc-1;  return pColl;}/*** Locate a user function given a name, a number of arguments and a flag** indicating whether the function prefers UTF-16 over UTF-8.  Return a** pointer to the FuncDef structure that defines that function, or return** NULL if the function does not exist.**** If the createFlag argument is true, then a new (blank) FuncDef** structure is created and liked into the "db" structure if a** no matching function previously existed.  When createFlag is true** and the nArg parameter is -1, then only a function that accepts** any number of arguments will be returned.**** If createFlag is false and nArg is -1, then the first valid** function found is returned.  A function is valid if either xFunc** or xStep is non-zero.**** If createFlag is false, then a function with the required name and** number of arguments may be returned even if the eTextRep flag does not** match that requested.*/FuncDef *sqlite3FindFunction(  sqlite3 *db,       /* An open database */  const char *zName, /* Name of the function.  Not null-terminated */  int nName,         /* Number of characters in the name */  int nArg,          /* Number of arguments.  -1 means any number */  u8 enc,            /* Preferred text encoding */  int createFlag     /* Create new entry if true and does not otherwise exist */){  FuncDef *p;         /* Iterator variable */  FuncDef *pFirst;    /* First function with this name */  FuncDef *pBest = 0; /* Best match found so far */  int bestmatch = 0;    assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );  if( nArg<-1 ) nArg = -1;  pFirst = (FuncDef*)sqlite3HashFind(&db->aFunc, zName, nName);  for(p=pFirst; p; p=p->pNext){    /* During the search for the best function definition, bestmatch is set    ** as follows to indicate the quality of the match with the definition    ** pointed to by pBest:    **    ** 0: pBest is NULL. No match has been found.    ** 1: A variable arguments function that prefers UTF-8 when a UTF-16    **    encoding is requested, or vice versa.    ** 2: A variable arguments function that uses UTF-16BE when UTF-16LE is    **    requested, or vice versa.    ** 3: A variable arguments function using the same text encoding.    ** 4: A function with the exact number of arguments requested that    **    prefers UTF-8 when a UTF-16 encoding is requested, or vice versa.    ** 5: A function with the exact number of arguments requested that    **    prefers UTF-16LE when UTF-16BE is requested, or vice versa.    ** 6: An exact match.    **    ** A larger value of 'matchqual' indicates a more desirable match.    */    if( p->nArg==-1 || p->nArg==nArg || nArg==-1 ){      int match = 1;          /* Quality of this match */      if( p->nArg==nArg || nArg==-1 ){        match = 4;      }      if( enc==p->iPrefEnc ){        match += 2;      }      else if( (enc==SQLITE_UTF16LE && p->iPrefEnc==SQLITE_UTF16BE) ||               (enc==SQLITE_UTF16BE && p->iPrefEnc==SQLITE_UTF16LE) ){        match += 1;      }      if( match>bestmatch ){        pBest = p;        bestmatch = match;      }    }  }  /* If the createFlag parameter is true, and the seach did not reveal an  ** exact match for the name, number of arguments and encoding, then add a  ** new entry to the hash table and return it.  */  if( createFlag && bestmatch<6 &&       (pBest = sqliteMalloc(sizeof(*pBest)+nName)) ){    pBest->nArg = nArg;    pBest->pNext = pFirst;    pBest->iPrefEnc = enc;    memcpy(pBest->zName, zName, nName);    pBest->zName[nName] = 0;    if( pBest==sqlite3HashInsert(&db->aFunc,pBest->zName,nName,(void*)pBest) ){      sqliteFree(pBest);      return 0;    }  }  if( pBest && (pBest->xStep || pBest->xFunc || createFlag) ){    return pBest;  }  return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久99精品久久| 麻豆免费精品视频| 亚洲va欧美va人人爽| 精品一区二区三区香蕉蜜桃| 99re视频这里只有精品| 日韩午夜在线影院| 亚洲精品一二三| 国产激情一区二区三区四区| 欧美三级日韩在线| 中文乱码免费一区二区| 久久精品国产亚洲高清剧情介绍 | 成人99免费视频| 欧美一区二区在线视频| 1区2区3区国产精品| 国产一区 二区 三区一级| 欧美日韩精品福利| 一区二区三区蜜桃| 99re66热这里只有精品3直播 | www.欧美亚洲| 精品久久久久久久久久久久久久久| 亚洲精品乱码久久久久久| 成人18视频日本| 欧美激情在线看| 国内不卡的二区三区中文字幕 | 丁香婷婷综合网| 日韩亚洲电影在线| 91丝袜高跟美女视频| 精品国产一二三| 久久精品72免费观看| 欧美精品高清视频| 亚洲一区二区三区免费视频| 色狠狠综合天天综合综合| 国产精品久久久久影院老司| 成人性生交大片免费| 久久久久国产成人精品亚洲午夜| 蜜臀精品一区二区三区在线观看| 欧美日韩在线免费视频| 亚洲国产精品视频| 欧美亚洲国产一区在线观看网站| 亚洲精品一二三四区| 欧美性色欧美a在线播放| 亚洲国产精品一区二区久久| 欧美性色黄大片手机版| 视频一区免费在线观看| 欧美一级日韩一级| 美女一区二区三区在线观看| 日韩视频在线你懂得| 蜜乳av一区二区| 精品国产乱码久久久久久浪潮 | 亚洲综合一二三区| 欧美中文一区二区三区| 亚洲成人自拍网| 欧美一区二区三区男人的天堂| 日韩在线一区二区三区| 欧美不卡一二三| 国产一区二区精品在线观看| 中文字幕国产一区二区| 欧洲亚洲精品在线| 日本va欧美va精品发布| 国产亚洲精久久久久久| 色综合色狠狠综合色| 天天综合色天天| 久久久久久久性| 在线免费观看日本欧美| 日本中文字幕不卡| 国产精品美女久久福利网站| 欧美性猛交xxxx黑人交| 国产麻豆视频精品| 一区二区激情视频| 久久只精品国产| 欧洲一区二区三区在线| 久久精品国产99| 一区二区三区国产豹纹内裤在线| 91精品国产日韩91久久久久久| 国产成人在线视频播放| 午夜视频久久久久久| 久久精品欧美一区二区三区麻豆| 91黄色免费看| 国产麻豆一精品一av一免费| 亚洲五月六月丁香激情| 国产午夜亚洲精品羞羞网站| 91久久精品网| 国产麻豆精品在线观看| 亚洲动漫第一页| 国产欧美一区二区在线| 欧美一区二区性放荡片| 色婷婷香蕉在线一区二区| 国产精品中文字幕欧美| 视频一区视频二区在线观看| 亚洲欧美日韩一区二区| 欧美精品一区二区精品网| 欧美人妇做爰xxxⅹ性高电影| 本田岬高潮一区二区三区| 蜜桃视频在线一区| 亚洲第一福利一区| 亚洲欧美日韩电影| 国产精品电影院| 精品sm在线观看| 在线播放欧美女士性生活| 色悠悠久久综合| 成人黄色av电影| 国产在线视频精品一区| 青娱乐精品视频| 天堂va蜜桃一区二区三区| 亚洲美女淫视频| 亚洲欧美一区二区三区极速播放| 国产欧美精品区一区二区三区| 日韩欧美国产一区在线观看| 欧美日韩成人综合| 欧美亚洲国产一区二区三区 | 国产一区二区三区不卡在线观看| 日韩精品乱码免费| 午夜精品福利视频网站| 亚洲一线二线三线视频| 亚洲女与黑人做爰| 亚洲人精品午夜| 亚洲欧美激情小说另类| 亚洲欧美日韩在线播放| 亚洲美女电影在线| 亚洲综合免费观看高清完整版 | 久久免费午夜影院| 国产无人区一区二区三区| 国产婷婷一区二区| 国产精品无码永久免费888| 亚洲国产高清在线| 国产精品久久久久久久久免费樱桃| 国产日产欧产精品推荐色| 中文字幕不卡在线播放| 国产精品美女久久久久久久久久久 | 欧美大片拔萝卜| 日韩欧美国产系列| 久久九九国产精品| 成人欧美一区二区三区白人| 亚洲日本青草视频在线怡红院| 亚洲激情在线播放| 婷婷夜色潮精品综合在线| 蜜桃一区二区三区在线| 国产成人免费在线观看| www.亚洲人| 欧美区视频在线观看| 欧美成人一级视频| 国产精品国产馆在线真实露脸| 亚洲精品亚洲人成人网在线播放| 亚洲成人动漫在线观看| 紧缚捆绑精品一区二区| k8久久久一区二区三区| 欧美日韩黄色影视| 久久久综合视频| 最新欧美精品一区二区三区| 亚洲成av人片一区二区三区| 久久99精品国产.久久久久久| 国产一区二区三区精品视频| 91视频观看免费| 欧美猛男gaygay网站| 欧美精品一区二区高清在线观看| 国产精品的网站| 日本欧美久久久久免费播放网| 国产大陆亚洲精品国产| 欧美日韩一区二区三区在线看| 2欧美一区二区三区在线观看视频| 亚洲婷婷综合久久一本伊一区| 蜜乳av一区二区| 色呦呦国产精品| 国产免费久久精品| 日本欧美在线看| 91欧美一区二区| 久久综合九色综合欧美98| 亚洲午夜一区二区| 国产91精品久久久久久久网曝门| 欧美人牲a欧美精品| 亚洲免费色视频| 国产乱码精品1区2区3区| 欧美日韩一区高清| 亚洲视频在线一区| 国产成人综合自拍| 日韩免费看的电影| 亚洲高清不卡在线观看| 99国产欧美另类久久久精品| 精品免费视频一区二区| 日韩在线a电影| 欧美视频在线一区| 国产精品久久久久9999吃药| 极品瑜伽女神91| 欧美一区二区高清| 日韩成人一区二区| 日本电影亚洲天堂一区| 国产精品卡一卡二| 国产乱人伦偷精品视频免下载 | 色综合久久久久网| 国产精品视频一区二区三区不卡| 另类小说色综合网站| 777a∨成人精品桃花网| 亚洲一区二区三区在线看| 91论坛在线播放| 亚洲美女电影在线| 一本大道久久a久久综合婷婷| 亚洲欧洲日韩在线| 99国产精品久久久久久久久久久| 国产精品成人免费在线| 成人一区在线看|