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

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

?? cm_hash.c

?? 中國石油二期加油站IC系統后臺通訊軟件
?? C
?? 第 1 頁 / 共 3 頁
字號:
   /* search this bin for exact key match */
   hashListBin = &hashListCp->hl[idx];
   hashListEnt = (CmHashListEnt *) hashListBin->next;

   /* examine each entry in bin */
   i = 0;
   while (hashListBin != (CmListEnt *) hashListEnt)
   {
      /* check if key matches */
      if (cmHashMatchKey(hashListEnt->key, hashListEnt->keyLen, key, keyLen) 
          == ROK)
      {
         /* matching key */
         *entry = (PTR) (((U8 *) hashListEnt) - hashListCp->offset);

         /* check for duplicates */
         if (!hashListCp->dupFlg)
            RETVALUE(ROK);

         /* for duplicate key, check sequence number */
         if (i++ == seqNmb)
            RETVALUE(ROK);
      }

      /* go to next entry */
      hashListEnt = (CmHashListEnt *) hashListEnt->list.next;
   }

   /* no matching key found */
   RETVALUE(RFAILED);
} /* end of cmHashListFind */


/*
*
*       Fun:   cmHashListGetNext
*
*       Desc:  Gets next entry in hash list with respect to the specified
*              previous entry. If previous entry is NULLP, gets first
*              entry in hash list. Parameters are:
*
*              hashListCp   control point for hash list
*              prevEnt      pointer to previous entry
*              entry        pointer to next entry to be returned
*
*       Ret:   ROK      - get successful, *entry points to found entry
*                         (at beginning of list or in the list)
*              RFAILED  - get failed, *entry is unchanged 
*                         (incorrect parameter values)
*              ROKDNA   - get failed, *entry is unchanged.
*                         (end of list)
*       Notes:  None.
*
*       File:  cm_hash.c
*
*/
#ifdef ANSI
PUBLIC S16 cmHashListGetNext
(
CmHashListCp *hashListCp,    /* hash list to get from */
PTR          prevEnt,        /* previous entry */
PTR          *entry          /* entry to be returned */
)
#else
PUBLIC S16 cmHashListGetNext(hashListCp, prevEnt, entry)
CmHashListCp *hashListCp;    /* hash list to get from */
PTR          prevEnt;        /* previous entry */
PTR          *entry;         /* entry to be returned */
#endif
{
   CmListEnt     *hashListBin;   /* temporary hash list bin pointer */
   CmHashListEnt *hashListEnt;   /* temporary hash list entry pointer */
   CmHashListEnt *prevListEnt;   /* previous hash list entry pointer */
   U16           i;              /* hash list counter */

   TRC2(cmHashListGetNext);

#if (ERRCLASS & ERRCLS_DEBUG)
   /* error check on parameters */
   if ((hashListCp == NULLP) || (entry == NULLP))
      RETVALUE(RFAILED);
#endif

   /* check if need to get first entry */
   if (prevEnt == NULLP)
   {
      /* get first entry in hash list */
      for (i = 0; i < hashListCp->nmbBins; i++)
         /* check for non-empty bin */
         if (hashListCp->hl[i].next != &hashListCp->hl[i])
         {
            /* get first entry in bin */
            hashListEnt = (CmHashListEnt *) hashListCp->hl[i].next;

            /* requested entry is in nxtEnt */
            *entry = (PTR) (((U8 *) hashListEnt) - hashListCp->offset);

            RETVALUE(ROK);
         }

      /* no more entries */
      RETVALUE(ROKDNA);
   }

   /* use previous entry to find next entry */

   /* get pointer to previous hash list entry header */
   prevListEnt = (CmHashListEnt *) (((U8 *) prevEnt) + hashListCp->offset);

   /* get index of previous entry */
   i = prevListEnt->hashVal;

   /* set pointers to get next entry */
   hashListBin = &hashListCp->hl[i];
   prevListEnt = (CmHashListEnt *) prevListEnt->list.next;
   for (;;)
   {
      /* check if more entries in this bin */
      if (prevListEnt != (CmHashListEnt *) hashListBin)
      {
         /* found next entry */
         *entry = (PTR) (((U8 *) prevListEnt) - hashListCp->offset);

         RETVALUE(ROK);
      }

      /* no more entries in this bin, go to next bin, check if more bins */
      if (++i >= hashListCp->nmbBins)
         /* no more entries */
         break;

      /* reset pointers for next bin */
      hashListBin = &hashListCp->hl[i];
      prevListEnt = (CmHashListEnt *) hashListBin->next;
   }

   /* no more entries */
   RETVALUE(ROKDNA);
} /* end of cmHashListGetNext */


/*
*
*       Fun:   cmHashListQuery
*
*       Desc:  Gets hash list attributes.  Parameters are:
*
*              hashListCp   control point for hash list
*              queryType    type of attribute being queried
*              result       result of query, to be returned
*
*       Ret:   ROK      - successful, *result contains query result
*              RFAILED  - failed, *result unchanged (incorrect parameter values)
*
*       Notes: This function is obsoleted! 
*              Use macros defined in cm_hash.h instead
*
*       File:  cm_hash.c
*
*/
#ifdef ANSI
PUBLIC S16 cmHashListQuery
(
CmHashListCp *hashListCp,    /* hash list to query */
U8           queryType,      /* type of query */
U16          *result         /* result of query */
)
#else
PUBLIC S16 cmHashListQuery(hashListCp, queryType, result)
CmHashListCp *hashListCp;    /* hash list to query */
U8           queryType;      /* type of query */
U16          *result;        /* result of query */
#endif
{
   TRC2(cmHashListQuery);

   /* deal with queries that do not need hashListCp */

#if (ERRCLASS & ERRCLS_DEBUG)
   /* error check on parameters */
   if (result == NULLP)
      RETVALUE(RFAILED);
#endif

   /* respond depending on query type */
   if (queryType == CM_HASH_QUERYTYPE_BINSIZE)
   {
      /* storage for each bin */
      *result = (U16) sizeof(CmListEnt);
      RETVALUE(ROK);
   }

   /* deal with queries that do need hashListCp */

#if (ERRCLASS & ERRCLS_DEBUG)
   /* error check on parameters */
   if (hashListCp == NULLP)
      RETVALUE(RFAILED);
#endif

   /* respond depending on query type */
   switch (queryType)
   {
      case CM_HASH_QUERYTYPE_ENTRIES:   /* current number of entries */
         *result = (U16) hashListCp->nmbEnt;
         RETVALUE(ROK);

      case CM_HASH_QUERYTYPE_BINS:      /* number of bins */
         *result = (U16) hashListCp->nmbBins;
         RETVALUE(ROK);

      case CM_HASH_QUERYTYPE_OFFSET:    /* offset of CmHashListEnt in entries */
         *result = (U16) hashListCp->offset;
         RETVALUE(ROK);

      case CM_HASH_QUERYTYPE_DUPFLG:    /* allow duplicate keys */
         *result = (U16) hashListCp->dupFlg;
         RETVALUE(ROK);

      case CM_HASH_QUERYTYPE_KEYTYPE:   /* key type for selecting hash functions */
         *result = (U16) hashListCp->keyType;
         RETVALUE(ROK);

      default:                          /* process other query types */
         break;
   }

   /* illegal query type */
   RETVALUE(RFAILED);
} /* end of cmHashListQuery */

#ifdef HASH_OPEN_ADDRESSING
  
/*
*
*       Fun:   cmHashListOAInsert
*
*       Desc:  Inserts a new entry in the hash list with open addressing.
*              Parameters are: 
*
*              hashListCp   control point for hash list
*              entry        pointer to new entry to add in the hash list
*              key          pointer to key string in the new entry
*              keyLen       length of key string
*
*       Ret:   ROK      - insertion successful
*              ROKDUP   - insertion failed (duplicate key not allowed)
*              RFAILED  - insertion failed (incorrect parameter values)
*
*       Notes: None
*
*       File:  cm_hash.c
*
*/

#ifdef ANSI
PUBLIC S16 cmHashListOAInsert
(
CmHashListCp *hashListCp,  /* hash table to add to */
PTR          entry,        /* entry to add */
U8           *key,         /* pointer to key */
U16          keyLen        /* length of key */
)
#else
PUBLIC S16 cmHashListOAInsert(hashListCp, entry, key, keyLen)
CmHashListCp *hashListCp;  /* hash table to add to */
PTR          entry;        /* entry to add */
U8           *key;         /* pointer to key */
U16          keyLen;       /* length of key */
#endif
{
   CmListEnt     *hashBin;        /* temporary hash list bin pointer */
   CmHashListEnt *hashListEnt;    /* pointer to hash list entry header */
   U16 idx;                       /* index for insertion into hash list */
   U16 hashSize;                  /* hash size */
   U16 i;

   TRC2(cmHashListOAInsert);

#if (ERRCLASS & ERRCLS_DEBUG)
   /* error check on parameters */
   if ((hashListCp == NULLP) || (entry == NULLP) || 
       (key == NULLP) || (keyLen == 0))
      RETVALUE(RFAILED);
#endif

   /* check if table is full */
   if (hashListCp->nmbBins == hashListCp->nmbEnt)
      RETVALUE(ROUTRES);

   /* get pointer to hash list entry header */
   hashListEnt = (CmHashListEnt *) (((U8 *) entry) + hashListCp->offset);

   /* initialize hash list entry header */
   hashListEnt->list.next = NULLP;
   hashListEnt->list.prev = NULLP;
   hashListEnt->keyLen    = keyLen;
   hashListEnt->key       = key;

   /* compute index for insertion */
   if ((*hashListCp->hashFunc)(hashListCp, key, keyLen, &idx) != ROK)
      RETVALUE(RFAILED);

   /*
    *  find an empty bin
    */
   hashSize = hashListCp->nmbBins;
   hashBin = &hashListCp->hl[idx];
   for (i = hashSize; i > 0; i--)
   {
      if (hashBin->next == hashBin)
         break;                            /* found */
      if (++idx >= hashSize)
      {
         idx = 0;
         hashBin = &hashListCp->hl[0];
      }
      else
         hashBin++;
   }

   /* insert into list */
   if (cmListInsert(hashBin->prev, &hashListEnt->list) != ROK)
      RETVALUE(RFAILED);

   hashListEnt->hashVal   = idx;

   /* increment count of entries in hash list */
   hashListCp->nmbEnt++;

   RETVALUE(ROK);
} /* end of cmHashListOAInsert */


#endif /* HASH_OPENADDRESSING */


/********************************************************************30**
  
         End of file: cm_hash.c 1.11  -  02/11/00 11:55:45
   
*********************************************************************31*/


/********************************************************************40**
  
        Notes:
  
*********************************************************************41*/

/********************************************************************50**

*********************************************************************51*/

/********************************************************************60**
  
        Revision history:
  
*********************************************************************61*/
  
/********************************************************************80**

  version    pat  init                   description
----------- ----- ----  ------------------------------------------------
1.1          ---  rg    1. initial release.

1.2          ---  bw    1. store hash value in struct CmHashListEnt.
             ---  bw    2. new functions for hash table with open addressing
             ---  bw    3. change copyright header

1.3          ---  ak    1. fixed compile time warnings in cmHashListOAInsert

1.4          ---  rg    1. changed cmHashListQuery to allow queries with
                           NULL hashListCp for some query types.

*********************************************************************81*/

/********************************************************************90**
 
     ver       pat    init                  description
------------ -------- ---- ----------------------------------------------
1.5          ---      rg   1. corrected cmHashListQuery to allow queries with
                             NULL hashListCp for some query types.
             ---      rg   2. changed cmHashListInit to initialize nmbBins
                             only after successfully allocating bins.
             ---      rg   3. included cm_lib.x to use cmMemcmp for hash key
                             matching.
             ---      rg   4. replaced cmHashFindIndex with a hashFunc field
                             in CmHashListCp, which is computed based on key 
                             type at initialization time.
             ---      rg   5. Added cmHashFuncDefault to handle default 
                             key type.
             ---      rg   6. used 32-bit or 16-bit operations, when possible,
                             to add the bytes of a key for default key type.
             ---      rg   7. replaced ERRCHK with (ERRCLASS & ERCLS_DEBUG).
             ---      rg   8. removed unnecessary error checks in support 
                             functions.
             ---      rg   9. added support for binBitMask computation to
                             speed up hash index calculation. 

             ---      kvm  10. added support for multiplication method of
                              hash list index computation (cmHashFuncMult24)
             ---      kvm  11. added code for nmbBinBits computation
             ---      kvm  12. added support for direct indexing 
                              (cmHashFuncDirIdx)

             ---      ak   13. added comment to indicate obsolescence of
                              cmHashListQuery
             ---      ak   14. Fixed return-value bug in cmHashListQuery
             ---      ak   15. changed ERRCHK -> ERRCLS_DEBUG

1.6          ---      rg   1. corrected cmHashFuncDefault to do only 8-bit
                             operations so the hash index value is not 
                             influenced by the key pointer alignment.

1.7          ---      sg   1. removed a unused variable from cmHashFuncDefault

1.8          ---      mk   1. Changed the typecast from S16 to PTR in 
                             call to the function cmMemcmp.
             ---      mg   2. Corrected pointer adjustment logic in 
                             cmListDelete
             ---      mg   3. Changes to pass through chksrc.

1.9          ---      bbk  1. Changed copyright header date.

1.10         ---      tej  1. Changed copyright header date.
1.11         ---      bbk  1. Added cmHashFuncString as hash function for 
                              strings
                           2. Removed the use of variable index as 
                              VxWorks has a keyword as "index"
*********************************************************************91*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲福利电影网| 国产精品欧美经典| 久久综合99re88久久爱| 中文字幕一区二区在线播放| 亚洲国产中文字幕| 激情综合网天天干| 色婷婷久久一区二区三区麻豆| 欧美系列日韩一区| 久久久久国产一区二区三区四区| 亚洲视频你懂的| 美腿丝袜在线亚洲一区| a在线欧美一区| 日韩一区二区中文字幕| 亚洲欧美日韩久久| 国产九色精品成人porny| 成人在线视频首页| 欧美一区二区在线免费观看| 国产精品天天看| 全国精品久久少妇| 色屁屁一区二区| 欧美午夜不卡视频| 亚洲精品一区二区三区四区高清| 日韩精品一二三| 欧美疯狂性受xxxxx喷水图片| 亚洲最大色网站| 在线亚洲一区观看| 亚洲精品日韩综合观看成人91| 成人动漫一区二区| 欧美激情一区二区三区蜜桃视频| 国产精品亚洲第一区在线暖暖韩国| 欧美一卡2卡三卡4卡5免费| 婷婷六月综合网| 欧美视频在线观看一区二区| 亚洲电影视频在线| 欧美二区在线观看| 日韩精品免费视频人成| 日韩丝袜情趣美女图片| 麻豆精品一区二区综合av| 日韩欧美在线1卡| 精品夜夜嗨av一区二区三区| 日韩精品自拍偷拍| 国产精品自在欧美一区| 中文字幕+乱码+中文字幕一区| 从欧美一区二区三区| 国产精品无遮挡| 一本大道久久a久久精二百 | 中文无字幕一区二区三区| 国产成人精品综合在线观看| 中文字幕久久午夜不卡| 91日韩精品一区| 亚洲福利一二三区| 欧美成人激情免费网| 国产综合久久久久影院| 中文字幕不卡在线| 欧美午夜一区二区| 激情六月婷婷久久| 国产亚洲自拍一区| 91麻豆自制传媒国产之光| 午夜久久久久久久久| 欧美mv日韩mv亚洲| 成人黄动漫网站免费app| 亚洲一区二区在线免费看| 在线成人午夜影院| 国产91丝袜在线播放0| 亚洲美女视频一区| 在线成人av影院| 丁香六月综合激情| 亚洲一区二区成人在线观看| 精品欧美一区二区久久| 97超碰欧美中文字幕| 婷婷综合另类小说色区| 国产精品美女久久久久久久网站| 色菇凉天天综合网| 国产呦精品一区二区三区网站| 亚洲欧美日韩中文字幕一区二区三区 | 婷婷久久综合九色综合绿巨人 | 色综合久久综合网欧美综合网| 午夜激情综合网| 国产欧美日韩视频在线观看| 欧美在线影院一区二区| 国产精品影视在线| 日韩专区一卡二卡| 亚洲日本韩国一区| 2021久久国产精品不只是精品| 91成人免费在线| 国产白丝精品91爽爽久久| 天堂资源在线中文精品| 中文字幕一区日韩精品欧美| 久久综合色综合88| 7777精品伊人久久久大香线蕉超级流畅| 岛国精品在线播放| 蜜桃av噜噜一区| 亚洲午夜视频在线观看| 国产精品久线在线观看| 2017欧美狠狠色| 91精品欧美综合在线观看最新| va亚洲va日韩不卡在线观看| 国产在线乱码一区二区三区| 日韩av一级电影| 一区二区三区高清在线| 国产精品国产三级国产aⅴ入口| 日韩美一区二区三区| 在线电影一区二区三区| 欧美午夜精品久久久| 欧日韩精品视频| 99免费精品在线观看| 丁香婷婷综合色啪| 国产精品一区在线| 国产综合久久久久久久久久久久| 婷婷开心久久网| 五月婷婷另类国产| 婷婷六月综合网| 丝袜亚洲精品中文字幕一区| 亚洲高清免费视频| 亚洲福利国产精品| 天天亚洲美女在线视频| 日韩精品欧美成人高清一区二区| 午夜精品一区二区三区三上悠亚| 亚洲精品国产成人久久av盗摄| 亚洲欧美日本在线| 亚洲精品视频在线观看网站| 一区二区三区四区视频精品免费| 亚洲免费资源在线播放| 有坂深雪av一区二区精品| 亚洲综合一二三区| 五月天中文字幕一区二区| 天天av天天翘天天综合网 | 午夜影院久久久| 视频一区二区三区中文字幕| 青青青爽久久午夜综合久久午夜| 日韩精品国产欧美| 美国三级日本三级久久99| 国产精品自在在线| 99re热这里只有精品视频| 欧美亚洲国产一区二区三区| 欧美日韩免费视频| 精品国产青草久久久久福利| 国产欧美日韩在线| 日韩理论电影院| 亚洲成人免费看| 国产精品系列在线观看| 91捆绑美女网站| 欧美日本精品一区二区三区| 欧美mv和日韩mv的网站| 日本一区二区三区在线观看| 亚洲精品国产a久久久久久 | 亚洲18女电影在线观看| 日韩黄色免费电影| 成人开心网精品视频| 精品视频在线视频| www精品美女久久久tv| 亚洲欧美日韩综合aⅴ视频| 奇米色一区二区| 99热这里都是精品| 欧美videos中文字幕| 亚洲人妖av一区二区| 日韩和欧美一区二区| 99久久免费国产| 日韩欧美中文字幕制服| 成人免费在线播放视频| 久久精品国产精品亚洲红杏 | 日韩精品一区二区三区在线播放 | 亚洲午夜电影在线| 国产剧情av麻豆香蕉精品| 在线一区二区三区做爰视频网站| wwwwxxxxx欧美| 亚洲h在线观看| 99re8在线精品视频免费播放| 欧美一二三区在线| 亚洲理论在线观看| 国产在线精品一区在线观看麻豆| 欧美午夜在线观看| 椎名由奈av一区二区三区| 国产伦理精品不卡| 日韩欧美一区在线| 亚洲一区中文日韩| 99久久精品国产麻豆演员表| www成人在线观看| 日本不卡一区二区| 精品视频123区在线观看| 亚洲欧美色图小说| 不卡一区二区三区四区| 国产偷国产偷精品高清尤物| 美女一区二区久久| 欧美精品久久久久久久多人混战| 一区二区三区日韩精品| 91蜜桃在线免费视频| 国产日韩精品一区二区浪潮av| 六月丁香婷婷色狠狠久久| 欧美日韩和欧美的一区二区| 亚洲男人的天堂av| 91麻豆国产福利在线观看| 中文字幕综合网| 91免费看视频| 亚洲女爱视频在线| 91污片在线观看| 亚洲色图20p| 一本色道久久加勒比精品| 国产精品高潮呻吟| 91蜜桃在线免费视频|