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

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

?? btree.c

?? 這是一個(gè)嵌入式系統(tǒng)上運(yùn)行的輕量級(jí)數(shù)據(jù)庫(kù)
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
}/*** 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;      }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久99精品久久| 日韩制服丝袜先锋影音| 国产三级精品三级| 精品国产乱子伦一区| 日韩一区二区三区电影在线观看 | 精品一区二区三区av| 日韩影视精彩在线| 日本欧美久久久久免费播放网| 亚洲国产三级在线| 午夜精品aaa| 美腿丝袜亚洲三区| 韩日欧美一区二区三区| 国产乱码字幕精品高清av| 国产精品一级片| 不卡免费追剧大全电视剧网站| 成人精品在线视频观看| 97se亚洲国产综合自在线观| 91一区二区在线观看| 91国产免费看| 91 com成人网| 久久综合网色—综合色88| 久久精品日韩一区二区三区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 制服视频三区第一页精品| 欧美电影在线免费观看| 精品日产卡一卡二卡麻豆| 久久九九99视频| 亚洲欧洲日韩女同| 亚洲成人免费电影| 老司机精品视频线观看86 | 在线观看亚洲专区| 在线成人小视频| 久久伊人蜜桃av一区二区| 中文字幕乱码亚洲精品一区| 亚洲精品视频自拍| 日韩成人免费电影| 国产成a人亚洲精| 欧美性猛交一区二区三区精品| 69成人精品免费视频| 国产午夜精品一区二区三区嫩草| 亚洲天堂久久久久久久| 日本中文在线一区| 成人激情免费视频| 91麻豆精品国产自产在线观看一区| 337p日本欧洲亚洲大胆精品| 亚洲日本丝袜连裤袜办公室| 日韩不卡免费视频| 成人av影视在线观看| 欧美三级午夜理伦三级中视频| 2017欧美狠狠色| 一区二区三区在线视频观看| 国产一区中文字幕| 在线观看不卡视频| 久久精品亚洲精品国产欧美| 一区二区三区在线免费播放 | 精品美女一区二区三区| 亚洲欧洲一区二区在线播放| 全部av―极品视觉盛宴亚洲| 91网站最新网址| 久久一日本道色综合| 亚洲在线中文字幕| 成人午夜电影小说| 日韩一区二区高清| 一区二区在线观看不卡| 国产精品亚洲а∨天堂免在线| 欧美三区在线观看| 国产精品成人网| 精东粉嫩av免费一区二区三区| 欧美丝袜自拍制服另类| 国产精品久久久久婷婷| 韩国欧美一区二区| 欧美夫妻性生活| 亚洲一级片在线观看| 成人三级伦理片| 精品99999| 日本美女一区二区三区| 91黄视频在线| 成人免费在线视频观看| 国产精品99久久久久| 欧美一区二区国产| 亚洲成人自拍网| 一本大道久久a久久综合婷婷| 欧美国产激情一区二区三区蜜月| 久久99国产精品久久| 91精品在线观看入口| 夜夜嗨av一区二区三区中文字幕| 成人黄色一级视频| 国产日本欧美一区二区| 国产一区二三区| 欧美电影精品一区二区| 日本不卡在线视频| 欧美日韩不卡一区二区| 亚洲国产乱码最新视频 | 97se亚洲国产综合在线| 中文成人综合网| 国产精品一二三在| 国产日本欧洲亚洲| 国产91色综合久久免费分享| 久久久精品2019中文字幕之3| 韩国成人精品a∨在线观看| 欧美tk—视频vk| 国内精品久久久久影院薰衣草| 日韩欧美一区中文| 九色综合国产一区二区三区| 欧美大片国产精品| 久久国产精品一区二区| 欧美草草影院在线视频| 国内精品国产成人国产三级粉色| 精品国产一区二区三区四区四| 极品美女销魂一区二区三区免费 | 亚洲一区二区三区中文字幕在线| 在线亚洲高清视频| 亚洲午夜av在线| 91精品国产色综合久久不卡蜜臀 | 青青草97国产精品免费观看| 91精品国产91热久久久做人人| 日av在线不卡| 精品99一区二区三区| 国产99精品国产| 亚洲人成小说网站色在线| 在线视频国内自拍亚洲视频| 天使萌一区二区三区免费观看| 日韩欧美亚洲一区二区| 国产精品一区二区在线观看网站| 国产精品无人区| 色婷婷激情久久| 天天av天天翘天天综合网| 日韩欧美一二三| 粉嫩av一区二区三区在线播放| 成人免费视频在线观看| 欧美亚洲国产bt| 久久av中文字幕片| 国产精品污网站| 欧美视频一区二区三区| 看片网站欧美日韩| 国产精品麻豆99久久久久久| 91久久精品网| 免费观看成人av| 国产精品毛片久久久久久久| 欧美特级限制片免费在线观看| 青青草国产成人av片免费| 国产欧美一区视频| 欧日韩精品视频| 极品美女销魂一区二区三区免费| 中文字幕一区二区三区不卡在线| 欧美日韩大陆一区二区| 国产福利91精品一区| 亚洲一二三级电影| www精品美女久久久tv| 91亚洲精品久久久蜜桃| 蜜臀久久99精品久久久画质超高清| 欧美高清在线一区| 欧美老肥妇做.爰bbww| 国产精品一级黄| 午夜精品视频一区| 欧美国产亚洲另类动漫| 51午夜精品国产| 99re成人精品视频| 免费观看一级欧美片| 亚洲欧美一区二区久久| wwwwxxxxx欧美| 欧美性感一区二区三区| 国产69精品久久777的优势| 视频在线观看国产精品| 中文字幕一区二区三区不卡 | 精品国产伦一区二区三区免费| 91麻豆免费看片| 国产在线一区观看| 午夜精品爽啪视频| 亚洲欧美日韩中文播放 | 国产女主播视频一区二区| 欧美伦理影视网| 91丨porny丨在线| 国产suv一区二区三区88区| 日产国产高清一区二区三区| 亚洲精品成人悠悠色影视| 国产日韩av一区| 精品国产不卡一区二区三区| 在线精品视频一区二区三四 | 中文字幕av一区 二区| 欧美一级黄色片| 欧美调教femdomvk| 99久久精品国产一区二区三区 | 欧美丝袜丝交足nylons图片| 国产91丝袜在线18| 国产麻豆精品95视频| 日本在线观看不卡视频| 亚洲地区一二三色| 一卡二卡欧美日韩| 亚洲视频免费看| 国产精品久久久久久久久免费相片 | 成人精品视频.| 国产在线播精品第三| 久久精品av麻豆的观看方式| 午夜精品久久久久久| 亚洲在线一区二区三区| 亚洲欧洲制服丝袜| 综合av第一页| 亚洲欧美在线aaa| 中文字幕一区二区三区av|