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

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

?? btree.c

?? Trolltech公司發布的基于C++圖形開發環境
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*** Set *pSize to the number of bytes of data in the entry the** cursor currently points to.  Always return SQLITE_OK.** Failure is not possible.  If the cursor is not currently** pointing to an entry (which can happen, for example, if** the database is empty) then *pSize is set to 0.*/static int fileBtreeDataSize(BtCursor *pCur, int *pSize){  Cell *pCell;  MemPage *pPage;  pPage = pCur->pPage;  assert( pPage!=0 );  if( pCur->idx >= pPage->nCell ){    *pSize = 0;  }else{    pCell = pPage->apCell[pCur->idx];    *pSize = NDATA(pCur->pBt, pCell->h);  }  return SQLITE_OK;}/*** Read part of the data associated with cursor pCur.  A maximum** of "amt" bytes will be transfered into zBuf[].  The transfer** begins at "offset".  The number of bytes actually read is** returned.  The amount returned will be smaller than the** amount requested if there are not enough bytes in the data** to satisfy the request.*/static int fileBtreeData(BtCursor *pCur, int offset, int amt, char *zBuf){  Cell *pCell;  MemPage *pPage;  assert( amt>=0 );  assert( offset>=0 );  assert( pCur->pPage!=0 );  pPage = pCur->pPage;  if( pCur->idx >= pPage->nCell ){    return 0;  }  pCell = pPage->apCell[pCur->idx];  assert( amt+offset <= NDATA(pCur->pBt, pCell->h) );  getPayload(pCur, offset + NKEY(pCur->pBt, pCell->h), amt, zBuf);  return amt;}/*** Compare an external key against the key on the entry that pCur points to.**** The external key is pKey and is nKey bytes long.  The last nIgnore bytes** of the key associated with pCur are ignored, as if they do not exist.** (The normal case is for nIgnore to be zero in which case the entire** internal key is used in the comparison.)**** The comparison result is written to *pRes as follows:****    *pRes<0    This means pCur<pKey****    *pRes==0   This means pCur==pKey for all nKey bytes****    *pRes>0    This means pCur>pKey**** When one key is an exact prefix of the other, the shorter key is** considered less than the longer one.  In order to be equal the** keys must be exactly the same length. (The length of the pCur key** is the actual key length minus nIgnore bytes.)*/static int fileBtreeKeyCompare(  BtCursor *pCur,       /* Pointer to entry to compare against */  const void *pKey,     /* Key to compare against entry that pCur points to */  int nKey,             /* Number of bytes in pKey */  int nIgnore,          /* Ignore this many bytes at the end of pCur */  int *pResult          /* Write the result here */){  Pgno nextPage;  int n, c, rc, nLocal;  Cell *pCell;  Btree *pBt = pCur->pBt;  const char *zKey  = (const char*)pKey;  assert( pCur->pPage );  assert( pCur->idx>=0 && pCur->idx<pCur->pPage->nCell );  pCell = pCur->pPage->apCell[pCur->idx];  nLocal = NKEY(pBt, pCell->h) - nIgnore;  if( nLocal<0 ) nLocal = 0;  n = nKey<nLocal ? nKey : nLocal;  if( n>MX_LOCAL_PAYLOAD ){    n = MX_LOCAL_PAYLOAD;  }  c = memcmp(pCell->aPayload, zKey, n);  if( c!=0 ){    *pResult = c;    return SQLITE_OK;  }  zKey += n;  nKey -= n;  nLocal -= n;  nextPage = SWAB32(pBt, pCell->ovfl);  while( nKey>0 && nLocal>0 ){    OverflowPage *pOvfl;    if( nextPage==0 ){      return SQLITE_CORRUPT;    }    rc = sqlitepager_get(pBt->pPager, nextPage, (void**)&pOvfl);    if( rc ){      return rc;    }    nextPage = SWAB32(pBt, pOvfl->iNext);    n = nKey<nLocal ? nKey : nLocal;    if( n>OVERFLOW_SIZE ){      n = OVERFLOW_SIZE;    }    c = memcmp(pOvfl->aPayload, zKey, n);    sqlitepager_unref(pOvfl);    if( c!=0 ){      *pResult = c;      return SQLITE_OK;    }    nKey -= n;    nLocal -= n;    zKey += n;  }  if( c==0 ){    c = nLocal - nKey;  }  *pResult = c;  return SQLITE_OK;}/*** Move the cursor down to a new child page.  The newPgno argument is the** page number of the child page in the byte order of the disk image.*/static int moveToChild(BtCursor *pCur, int newPgno){  int rc;  MemPage *pNewPage;  Btree *pBt = pCur->pBt;  newPgno = SWAB32(pBt, newPgno);  rc = sqlitepager_get(pBt->pPager, newPgno, (void**)&pNewPage);  if( rc ) return rc;  rc = initPage(pBt, pNewPage, newPgno, pCur->pPage);  if( rc ) return rc;  assert( pCur->idx>=pCur->pPage->nCell          || pCur->pPage->apCell[pCur->idx]->h.leftChild==SWAB32(pBt,newPgno) );  assert( pCur->idx<pCur->pPage->nCell          || pCur->pPage->u.hdr.rightChild==SWAB32(pBt,newPgno) );  pNewPage->idxParent = pCur->idx;  pCur->pPage->idxShift = 0;  sqlitepager_unref(pCur->pPage);  pCur->pPage = pNewPage;  pCur->idx = 0;  if( pNewPage->nCell<1 ){    return SQLITE_CORRUPT;  }  return SQLITE_OK;}/*** Move the cursor up to the parent page.**** pCur->idx is set to the cell index that contains the pointer** to the page we are coming from.  If we are coming from the** right-most child page then pCur->idx is set to one more than** the largest cell index.*/static void moveToParent(BtCursor *pCur){  Pgno oldPgno;  MemPage *pParent;  MemPage *pPage;  int idxParent;  pPage = pCur->pPage;  assert( pPage!=0 );  pParent = pPage->pParent;  assert( pParent!=0 );  idxParent = pPage->idxParent;  sqlitepager_ref(pParent);  sqlitepager_unref(pPage);  pCur->pPage = pParent;  assert( pParent->idxShift==0 );  if( pParent->idxShift==0 ){    pCur->idx = idxParent;#ifndef NDEBUG      /* Verify that pCur->idx is the correct index to point back to the child    ** page we just came from     */    oldPgno = SWAB32(pCur->pBt, sqlitepager_pagenumber(pPage));    if( pCur->idx<pParent->nCell ){      assert( pParent->apCell[idxParent]->h.leftChild==oldPgno );    }else{      assert( pParent->u.hdr.rightChild==oldPgno );    }#endif  }else{    /* The MemPage.idxShift flag indicates that cell indices might have     ** changed since idxParent was set and hence idxParent might be out    ** of date.  So recompute the parent cell index by scanning all cells    ** and locating the one that points to the child we just came from.    */    int i;    pCur->idx = pParent->nCell;    oldPgno = SWAB32(pCur->pBt, sqlitepager_pagenumber(pPage));    for(i=0; i<pParent->nCell; i++){      if( pParent->apCell[i]->h.leftChild==oldPgno ){        pCur->idx = i;        break;      }    }  }}/*** Move the cursor to the root page*/static int moveToRoot(BtCursor *pCur){  MemPage *pNew;  int rc;  Btree *pBt = pCur->pBt;  rc = sqlitepager_get(pBt->pPager, pCur->pgnoRoot, (void**)&pNew);  if( rc ) return rc;  rc = initPage(pBt, pNew, pCur->pgnoRoot, 0);  if( rc ) return rc;  sqlitepager_unref(pCur->pPage);  pCur->pPage = pNew;  pCur->idx = 0;  return SQLITE_OK;}/*** Move the cursor down to the left-most leaf entry beneath the** entry to which it is currently pointing.*/static int moveToLeftmost(BtCursor *pCur){  Pgno pgno;  int rc;  while( (pgno = pCur->pPage->apCell[pCur->idx]->h.leftChild)!=0 ){    rc = moveToChild(pCur, pgno);    if( rc ) return rc;  }  return SQLITE_OK;}/*** Move the cursor down to the right-most leaf entry beneath the** page to which it is currently pointing.  Notice the difference** between moveToLeftmost() and moveToRightmost().  moveToLeftmost()** finds the left-most entry beneath the *entry* whereas moveToRightmost()** finds the right-most entry beneath the *page*.*/static int moveToRightmost(BtCursor *pCur){  Pgno pgno;  int rc;  while( (pgno = pCur->pPage->u.hdr.rightChild)!=0 ){    pCur->idx = pCur->pPage->nCell;    rc = moveToChild(pCur, pgno);    if( rc ) return rc;  }  pCur->idx = pCur->pPage->nCell - 1;  return SQLITE_OK;}/* Move the cursor to the first entry in the table.  Return SQLITE_OK** on success.  Set *pRes to 0 if the cursor actually points to something** or set *pRes to 1 if the table is empty.*/static int fileBtreeFirst(BtCursor *pCur, int *pRes){  int rc;  if( pCur->pPage==0 ) return SQLITE_ABORT;  rc = moveToRoot(pCur);  if( rc ) return rc;  if( pCur->pPage->nCell==0 ){    *pRes = 1;    return SQLITE_OK;  }  *pRes = 0;  rc = moveToLeftmost(pCur);  pCur->eSkip = SKIP_NONE;  return rc;}/* Move the cursor to the last entry in the table.  Return SQLITE_OK** on success.  Set *pRes to 0 if the cursor actually points to something** or set *pRes to 1 if the table is empty.*/static int fileBtreeLast(BtCursor *pCur, int *pRes){  int rc;  if( pCur->pPage==0 ) return SQLITE_ABORT;  rc = moveToRoot(pCur);  if( rc ) return rc;  assert( pCur->pPage->isInit );  if( pCur->pPage->nCell==0 ){    *pRes = 1;    return SQLITE_OK;  }  *pRes = 0;  rc = moveToRightmost(pCur);  pCur->eSkip = SKIP_NONE;  return rc;}/* Move the cursor so that it points to an entry near pKey.** Return a success code.**** If an exact match is not found, then the cursor is always** left pointing at a leaf page which would hold the entry if it** were present.  The cursor might point to an entry that comes** before or after the key.**** The result of comparing the key with the entry to which the** cursor is left pointing is stored in pCur->iMatch.  The same** value is also written to *pRes if pRes!=NULL.  The meaning of** this value is as follows:****     *pRes<0      The cursor is left pointing at an entry that**                  is smaller than pKey or if the table is empty**                  and the cursor is therefore left point to nothing.****     *pRes==0     The cursor is left pointing at an entry that**                  exactly matches pKey.****     *pRes>0      The cursor is left pointing at an entry that**                  is larger than pKey.*/staticint fileBtreeMoveto(BtCursor *pCur, const void *pKey, int nKey, int *pRes){  int rc;  if( pCur->pPage==0 ) return SQLITE_ABORT;  pCur->eSkip = SKIP_NONE;  rc = moveToRoot(pCur);  if( rc ) return rc;  for(;;){    int lwr, upr;    Pgno chldPg;    MemPage *pPage = pCur->pPage;    int c = -1;  /* pRes return if table is empty must be -1 */    lwr = 0;    upr = pPage->nCell-1;    while( lwr<=upr ){      pCur->idx = (lwr+upr)/2;      rc = fileBtreeKeyCompare(pCur, pKey, nKey, 0, &c);      if( rc ) return rc;      if( c==0 ){        pCur->iMatch = c;        if( pRes ) *pRes = 0;        return SQLITE_OK;      }      if( c<0 ){        lwr = pCur->idx+1;      }else{        upr = pCur->idx-1;      }    }    assert( lwr==upr+1 );    assert( pPage->isInit );    if( lwr>=pPage->nCell ){      chldPg = pPage->u.hdr.rightChild;    }else{      chldPg = pPage->apCell[lwr]->h.leftChild;    }    if( chldPg==0 ){      pCur->iMatch = c;      if( pRes ) *pRes = c;      return SQLITE_OK;    }    pCur->idx = lwr;    rc = moveToChild(pCur, chldPg);    if( rc ) return rc;  }  /* NOT REACHED */}/*** Advance the cursor to the next entry in the database.  If** successful then set *pRes=0.  If the cursor** was already pointing to the last entry in the database before** this routine was called, then set *pRes=1.*/static int fileBtreeNext(BtCursor *pCur, int *pRes){  int rc;  MemPage *pPage = pCur->pPage;  assert( pRes!=0 );  if( pPage==0 ){    *pRes = 1;    return SQLITE_ABORT;  }  assert( pPage->isInit );  assert( pCur->eSkip!=SKIP_INVALID );  if( pPage->nCell==0 ){    *pRes = 1;    return SQLITE_OK;  }  assert( pCur->idx<pPage->nCell );  if( pCur->eSkip==SKIP_NEXT ){    pCur->eSkip = SKIP_NONE;    *pRes = 0;    return SQLITE_OK;  }  pCur->eSkip = SKIP_NONE;  pCur->idx++;  if( pCur->idx>=pPage->nCell ){    if( pPage->u.hdr.rightChild ){      rc = moveToChild(pCur, pPage->u.hdr.rightChild);      if( rc ) return rc;      rc = moveToLeftmost(pCur);      *pRes = 0;      return rc;    }    do{      if( pPage->pParent==0 ){        *pRes = 1;        return SQLITE_OK;      }      moveToParent(pCur);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩午夜小视频| 亚洲国产高清不卡| 国产精品国产自产拍高清av王其| 亚洲人妖av一区二区| 视频一区欧美精品| 99视频精品全部免费在线| 欧美肥妇毛茸茸| 亚洲一区二区三区影院| 国产美女视频一区| 欧美一区二区视频在线观看2020| 中文成人综合网| 国产一区欧美二区| 69久久99精品久久久久婷婷| 亚洲伦理在线精品| hitomi一区二区三区精品| 久久夜色精品国产噜噜av| 日韩有码一区二区三区| 欧美在线小视频| 亚洲另类中文字| 91亚洲精品乱码久久久久久蜜桃 | 精品国产一区a| 亚洲国产综合色| 色域天天综合网| 亚洲丝袜美腿综合| 成av人片一区二区| 国产精品污网站| 成人永久aaa| 国产精品久久久久三级| 成人一区二区三区在线观看| 国产欧美一区二区精品久导航| 久久99日本精品| 精品精品欲导航| 狠狠色丁香九九婷婷综合五月| 欧美一区二区三区日韩| 日韩精品乱码免费| 日韩午夜精品视频| 精品无人码麻豆乱码1区2区| 2023国产一二三区日本精品2022| 精品制服美女丁香| 国产婷婷一区二区| 白白色亚洲国产精品| 亚洲丝袜制服诱惑| 欧美色男人天堂| 天天综合色天天| 欧美tk—视频vk| 国产91精品一区二区麻豆亚洲| 国产欧美日韩综合| 91色.com| 婷婷丁香久久五月婷婷| 欧美不卡视频一区| 国产高清在线观看免费不卡| 欧美激情自拍偷拍| 在线视频中文字幕一区二区| 日韩在线一区二区三区| 亚洲精品高清在线| 欧美日韩国产不卡| 日本不卡在线视频| 国产精品午夜在线观看| 色婷婷av一区二区| 久久精品久久99精品久久| 国产欧美日韩一区二区三区在线观看| 99视频在线精品| 日本伊人午夜精品| 中文字幕亚洲综合久久菠萝蜜| 欧美写真视频网站| 国产激情精品久久久第一区二区 | 欧美白人最猛性xxxxx69交| 国内精品国产成人| 一区二区三区高清| 精品国产青草久久久久福利| 91亚洲永久精品| 三级影片在线观看欧美日韩一区二区| 国产网站一区二区| 欧美猛男超大videosgay| 国产一区二区毛片| 亚洲成av人片一区二区三区| 国产色产综合产在线视频| 在线视频一区二区免费| 国产福利一区在线观看| 日韩国产一区二| 国产精品福利一区二区三区| 91精品国产欧美一区二区成人 | 欧美精品日韩精品| 成人久久视频在线观看| 麻豆国产精品一区二区三区| 亚洲人午夜精品天堂一二香蕉| 精品日韩一区二区三区| 欧美色欧美亚洲另类二区| 成人av在线播放网站| 成人性生交大片免费看在线播放| 午夜电影网亚洲视频| 亚洲嫩草精品久久| 国产精品午夜在线| 久久久久99精品国产片| 日韩欧美国产成人一区二区| 色综合久久天天| gogogo免费视频观看亚洲一| 国内久久婷婷综合| 日韩电影免费在线观看网站| 亚洲欧美另类小说视频| 中文字幕av资源一区| 国产亚洲视频系列| 欧美精品一区二| 日韩精品一区在线观看| 日韩欧美激情一区| 欧美一区二区三区免费视频| 欧美日韩成人激情| 欧美日韩欧美一区二区| 欧美影视一区在线| 精品视频一区二区不卡| 欧美性猛交xxxx黑人交| 色婷婷亚洲一区二区三区| 91在线porny国产在线看| 成人动漫在线一区| 99麻豆久久久国产精品免费 | 久久99精品久久久久久| 肉丝袜脚交视频一区二区| 久久精品免费在线观看| 欧美一二三区在线观看| 日韩小视频在线观看专区| 欧美肥胖老妇做爰| 欧美三级日韩三级| 色屁屁一区二区| 国产一区二区三区免费观看| 看片的网站亚洲| 日本女人一区二区三区| 亚洲国产精品久久人人爱| 偷拍日韩校园综合在线| 夜夜精品浪潮av一区二区三区| 亚洲日本一区二区三区| 亚洲视频在线一区| 亚洲欧美日韩国产中文在线| 亚洲线精品一区二区三区| 亚洲一区二区综合| 亚洲成人中文在线| 亚洲国产精品久久艾草纯爱| 一区二区三区av电影| 一区二区三区中文免费| 一区二区三区四区不卡在线| 亚洲精品少妇30p| 同产精品九九九| 美女视频黄久久| 久久99九九99精品| 国产宾馆实践打屁股91| 精品综合免费视频观看| 不卡影院免费观看| 91福利小视频| 在线不卡一区二区| 日韩一区二区精品在线观看| 亚洲国产精品黑人久久久| 国产精品人妖ts系列视频 | 91精品国产品国语在线不卡| 欧美一三区三区四区免费在线看| 欧美精品色综合| 日韩三级视频中文字幕| 国产夜色精品一区二区av| 中文字幕中文字幕在线一区| 国产精品视频线看| 免费av成人在线| 欧美日韩一区二区三区在线| 日韩一级免费观看| 久久精品视频网| 首页国产欧美日韩丝袜| 国产精品一区二区黑丝| 一本一本大道香蕉久在线精品| 91极品视觉盛宴| 欧美www视频| 亚洲素人一区二区| 麻豆免费看一区二区三区| 色综合中文字幕国产| 在线这里只有精品| 26uuu另类欧美| 亚洲最色的网站| 日韩成人午夜精品| 91行情网站电视在线观看高清版| 91精品国产麻豆国产自产在线| 久久久国产精品午夜一区ai换脸| 亚洲欧美日韩人成在线播放| 日韩电影一区二区三区| 99精品1区2区| 久久影院电视剧免费观看| 尤物在线观看一区| 精品亚洲国内自在自线福利| 欧美性大战久久久久久久蜜臀| 久久一区二区视频| 丝袜诱惑亚洲看片| 懂色av一区二区夜夜嗨| 2021久久国产精品不只是精品| 亚洲精品少妇30p| 国产91丝袜在线观看| 欧美一区二区三区视频在线观看 | 麻豆精品蜜桃视频网站| 懂色av一区二区三区蜜臀| 日韩精品专区在线影院观看| 亚洲激情成人在线| 国产精品资源在线观看| 久久久久99精品国产片| 美女视频黄 久久| 欧美日韩国产不卡| 日本一区中文字幕|