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

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

?? lib_str.c

?? 移植到freescale 9s12系列單片機(jī)的uCOSII
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
* Argument(s) : p1_str      Pointer to first  string (see Note #1).
*
*               p2_str      Pointer to second string (see Note #1).
*
*               len_max     Maximum number of characters to compare  (see Notes #2i & #2j).
*
* Return(s)   : 0,              if strings are identical             (see Notes #2a, #2e, #2f, #2i, & #2j).
*
*               Negative value, if 'p1_str' is less    than 'p2_str' (see Notes #2b, #2g, & #2d).
*
*               Positive value, if 'p1_str' is greater than 'p2_str' (see Notes #2c, #2h, & #2d).
*
* Caller(s)   : various.
*
* Note(s)     : (1) String buffers NOT modified.
*
*               (2) String comparison terminates when :
*
*                   (a) BOTH string pointer(s) are passed NULL pointers.
*                       (1) NULL strings identical; return 0.
*
*                   (b) 'p1_str' passed a NULL pointer.
*                       (1) Return negative value of character pointed to by 'p2_str'.
*
*                   (c) 'p2_str' passed a NULL pointer.
*                       (1) Return positive value of character pointed to by 'p1_str'.
*
*                   (d) Non-matching characters found.
*                       (1) Return signed-integer difference of the character pointed to by 'p2_str'
*                           from the character pointed to by 'p1_str'.
*
*                   (e) Terminating NULL character found in both strings.
*                       (1) Strings identical; return 0.
*                       (2) Only one NULL character test required in conditional since previous condition
*                           tested character equality.
*
*                   (f) BOTH strings point to NULL.
*                       (1) Strings overlap with NULL address.
*                       (2) Strings identical up to but NOT beyond or including the NULL address; return 0.
*
*                   (g) 'p1_str_next' points to NULL.
*                       (1) 'p1_str' overlaps with NULL address.
*                       (2) Strings compared up to but NOT beyond or including the NULL address.
*                       (3) Return  negative value of character pointed to by 'p2_str_next'.
*
*                   (h) 'p2_str_next' points to NULL.
*                       (1) 'p2_str' overlaps with NULL address.
*                       (2) Strings compared up to but NOT beyond or including the NULL address.
*                       (3) Return  positive value of character pointed to by 'p1_str_next'.
*
*                   (i) 'len_max' passed a zero length.
*                       (1) Zero-length strings identical; return 0.
*
*                   (j) First 'len_max' number of characters identical.
*                       (1) Strings identical; return 0.
*
*               (3) Since 16-bit signed arithmetic is performed to calculate a non-identical comparison
*                   return value, 'CPU_CHAR' native data type size MUST be 8-bit.
*********************************************************************************************************
*/
/*$PAGE*/
CPU_INT16S  Str_Cmp_N (CPU_CHAR    *p1_str,
                       CPU_CHAR    *p2_str,
                       CPU_SIZE_T   len_max)
{
    CPU_CHAR    *p1_str_next;
    CPU_CHAR    *p2_str_next;
    CPU_INT16S   cmp_val;
    CPU_SIZE_T   cmp_len;


    if (len_max == 0) {                                         /* If cmp len equals zero, rtn 0      (see Note #2i).   */
        return ((CPU_INT16S)0);
    }

    if (p1_str == (CPU_CHAR *)0) {
        if (p2_str == (CPU_CHAR *)0) {
            return ((CPU_INT16S)0);                             /* If BOTH str ptrs NULL,  rtn 0      (see Note #2a).   */
        }
        cmp_val = (CPU_INT16S)0 - (CPU_INT16S)(*p2_str);
        return (cmp_val);                                       /* If p1_str NULL, rtn neg p2_str val (see Note #2b).   */
    }
    if (p2_str == (CPU_CHAR *)0) {
        cmp_val = (CPU_INT16S)(*p1_str);
        return (cmp_val);                                       /* If p2_str NULL, rtn pos p1_str val (see Note #2c).   */
    }


    p1_str_next = p1_str;
    p2_str_next = p2_str;
    p1_str_next++;
    p2_str_next++;
    cmp_len     = 0;
    while ((*p1_str      == *p2_str)       &&                   /* Cmp strs until non-matching char (see Note #2d) ..   */
           (*p1_str      != (CPU_CHAR  )0) &&                   /* .. or NULL char(s)               (see Note #2e) ..   */
           ( p1_str_next != (CPU_CHAR *)0) &&                   /* .. or NULL ptr(s) found (see Notes #2f, #2g, & #2h); */
           ( p2_str_next != (CPU_CHAR *)0) &&
           ( cmp_len     <  (CPU_SIZE_T)len_max)) {             /* .. or len nbr chars cmp'd        (see Note #2j).     */
        p1_str_next++;
        p2_str_next++;
        p1_str++;
        p2_str++;
        cmp_len++;
    }


    if (cmp_len == len_max) {                                           /* If strs     identical for len nbr of chars,  */
        return ((CPU_INT16S)0);                                         /* ... rtn 0 (see Note #2j).                    */
    }

    if (*p1_str != *p2_str) {                                           /* If strs NOT identical, ...                   */
         cmp_val = (CPU_INT16S)(*p1_str) - (CPU_INT16S)(*p2_str);       /* ... calc & rtn char diff  (see Note #2d1).   */

    } else if (*p1_str == (CPU_CHAR)0) {                                /* If NULL char(s) found, ...                   */
         cmp_val = 0;                                                   /* ... strs identical; rtn 0 (see Note #2e).    */

    } else {
        if (p1_str_next == (CPU_CHAR *)0) {
            if (p2_str_next == (CPU_CHAR *)0) {                         /* If BOTH next str ptrs NULL, ...              */
                cmp_val = (CPU_INT16S)0;                                /* ... rtn 0                   (see Note #2f).  */
            } else {                                                    /* If p1_str_next NULL, ...                     */
                cmp_val = (CPU_INT16S)0 - (CPU_INT16S)(*p2_str_next);   /* ... rtn neg p2_str_next val (see Note #2g).  */
            }
        } else {                                                        /* If p2_str_next NULL, ...                     */
            cmp_val = (CPU_INT16S)(*p1_str_next);                       /* ... rtn pos p1_str_next val (see Note #2h).  */
        }
    }


    return (cmp_val);
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                             Str_Char()
*
* Description : Search string for first occurrence of specific character.
*
* Argument(s) : pstr            Pointer to string (see Note #1).
*
*               srch_char       Search character.
*
* Return(s)   : Pointer to first occurrence of search character in string, if any.
*
*               Pointer to NULL,                                           otherwise.
*
* Caller(s)   : various.
*
* Note(s)     : (1) String buffer NOT modified.
*
*               (2) String search terminates when :
*
*                   (a) String pointer passed a NULL pointer.
*                       (1) No string search performed; NULL pointer returned.
*
*                   (b) String pointer points to NULL.
*                       (1) String overlaps with NULL address.
*                       (2) String searched up to but NOT beyond or including the NULL address.
*
*                   (c) String's terminating NULL character found.
*                       (1) Search character NOT found in search string; NULL pointer returned.
*                       (2) Applicable ONLY IF search character is NOT the terminating NULL character.
*
*                   (d) Search character found.
*                       (1) Return pointer to first occurrence of search character in search string.
*********************************************************************************************************
*/

CPU_CHAR  *Str_Char (CPU_CHAR  *pstr,
                     CPU_CHAR   srch_char)
{
    CPU_CHAR  *pstr_next;


    if (pstr == (CPU_CHAR *)0) {                                /* Rtn NULL if srch str ptr NULL (see Note #2a).        */
        return ((CPU_CHAR *)0);
    }


    pstr_next = pstr;
    pstr_next++;
    while (( pstr_next != (CPU_CHAR *)0) &&                     /* Srch str until NULL ptr(s) (see Note #2b) ...        */
           (*pstr      != (CPU_CHAR  )0) &&                     /* ... or NULL char           (see Note #2c) ...        */
           (*pstr      != (CPU_CHAR  )srch_char)) {             /* ... or srch char found     (see Note #2d).           */
        pstr++;
        pstr_next++;
    }


    if (*pstr != srch_char) {                                   /* If srch char NOT found, str points to NULL; ...      */
        return ((CPU_CHAR *)0);                                 /* ... rtn NULL (see Notes #2b & #2c).                  */
    }

    return (pstr);                                              /* Else rtn ptr to found srch char (see Note #2d).      */
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                            Str_Char_N()
*
* Description : Search string for first occurrence of specific character, up to a maximum number of characters.
*
* Argument(s) : pstr            Pointer to string (see Note #1).
*
*               len_max         Maximum number of characters to search (see Notes #2e & #3).
*
*               srch_char       Search character.
*
* Return(s)   : Pointer to first occurrence of search character in string, if any.
*
*               Pointer to NULL,                                           otherwise.
*
* Caller(s)   : various.
*
* Note(s)     : (1) String buffer NOT modified.
*
*               (2) String search terminates when :
*
*                   (a) String pointer passed a NULL pointer.
*                       (1) No string search performed; NULL pointer returned.
*
*                   (b) String pointer points to NULL.
*                       (1) String overlaps with NULL address.
*                       (2) String searched up to but NOT beyond or including the NULL address.
*
*                   (c) String's terminating NULL character found.
*                       (1) Search character NOT found in search string; NULL pointer returned.
*                       (2) Applicable ONLY IF search character is NOT the terminating NULL character.
*
*                   (d) Search character found.
*                       (1) Return pointer to first occurrence of search character in search string.
*
*                   (e) 'len_max' number of characters searched.
*                       (1) 'len_max' number of characters does NOT include terminating NULL character.
*
*               (3) Ideally, the 'len_max' parameter would be the last parameter in this function's
*                   paramter list for consistency with all other custom string library functions.
*                   However, the 'len_max' parameter is ordered to comply with the standard library
*                   function's parameter list.
*********************************************************************************************************
*/

CPU_CHAR  *Str_Char_N (CPU_CHAR    *pstr,
                       CPU_SIZE_T   len_max,
                       CPU_CHAR     srch_char)
{
    CPU_CHAR    *pstr_next;
    CPU_SIZE_T   len_srch;


    if (pstr == (CPU_CHAR *)0) {                                /* Rtn NULL if srch str ptr NULL    (see Note #2a).     */
        return ((CPU_CHAR *)0);
    }

    if (len_max == (CPU_SIZE_T)0) {                             /* Rtn NULL if srch len equals zero (see Note #2e).     */
        return ((CPU_CHAR *)0);
    }


    pstr_next = pstr;
    pstr_next++;
    len_srch  = 0;
    while (( pstr_next != (CPU_CHAR *)0)         &&             /* Srch str until NULL ptr(s)  (see Note #2b)  ...      */
           (*pstr      != (CPU_CHAR  )0)         &&             /* ... or NULL char            (see Note #2c)  ...      */
           (*pstr      != (CPU_CHAR  )srch_char) &&             /* ... or srch char found      (see Note #2d); ...      */
           ( len_srch  <  (CPU_SIZE_T)len_max)) {               /* ... or max nbr chars srch'd (see Note #2e).          */
        pstr++;
        pstr_next++;
        len_srch++;
    }


    if (*pstr != srch_char) {                                   /* If srch char NOT found, str points to NULL; ...      */
        return ((CPU_CHAR *)0);                                 /* ... rtn NULL (see Notes #2b & #2c).                  */
    }

    return (pstr);                                              /* Else rtn ptr to found srch char (see Note #2d).      */
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                           Str_Char_Last()
*
* Description : Search string for last occurrence of specific character.
*
* Argument(s) : pstr            Pointer to string (see Note #1).
*
*               srch_char       Search character.
*
* Return(s)   : Pointer to last occurrence of search character in string, if any.
*
*               Pointer to NULL,                                          otherwise.
*
* Caller(s)   : various.
*
* Note(s)     : (1) String buffer NOT modified.
*
*               (2) String search terminates when :
*
*                   (a) String pointer passed a NULL pointer.
*                       (1) No string search performed; NULL pointer returned.
*
*                   (b) String pointer points to NULL.
*                       (1) String overlaps with NULL address.
*                       (2) String searched up to but NOT beyond or including the NULL address.
*                       (3) NULL address boundary handled in Str_Len().

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜欧美一区二区三区在线播放| 香蕉成人伊视频在线观看| 色综合av在线| 日本aⅴ免费视频一区二区三区| 久久尤物电影视频在线观看| 一本大道久久a久久综合婷婷| 秋霞午夜av一区二区三区| 国产精品欧美久久久久无广告| 欧美日韩黄色影视| 成人精品鲁一区一区二区| 青草国产精品久久久久久| 日韩毛片一二三区| 国产欧美一区二区三区鸳鸯浴| 欧美二区三区91| 一本大道久久a久久精二百| 国产九九视频一区二区三区| 日韩国产高清在线| 亚洲卡通动漫在线| 欧美国产日本韩| 日韩女优av电影| 欧美日韩一本到| 91在线视频观看| 国产成人综合自拍| 久久成人免费日本黄色| 亚洲1区2区3区视频| 亚洲欧美电影一区二区| 国产精品视频一二三| 精品少妇一区二区三区日产乱码 | 91丨九色porny丨蝌蚪| 极品瑜伽女神91| 秋霞电影网一区二区| 亚洲一区精品在线| 亚洲免费成人av| 国产精品久久久久婷婷二区次| 久久久精品2019中文字幕之3| 精品少妇一区二区三区在线视频 | 欧美国产视频在线| 久久久久久久国产精品影院| 日韩精品中文字幕一区二区三区| 欧美一区二区精品| 3d动漫精品啪啪| 在线成人午夜影院| 91精品欧美久久久久久动漫| 欧美乱妇20p| 欧美日韩在线综合| 欧美日韩国产综合一区二区三区| 欧美性猛交xxxxxx富婆| 欧美综合欧美视频| 欧美三级电影在线观看| 欧美日韩国产精品自在自线| 欧美日韩亚州综合| 欧美日本视频在线| 91精品国产全国免费观看 | 国产精品热久久久久夜色精品三区| 精品国产免费久久| 国产婷婷一区二区| 国产精品嫩草影院com| 国产精品成人网| 亚洲裸体xxx| 午夜激情久久久| 开心九九激情九九欧美日韩精美视频电影| 久久国产综合精品| 高清shemale亚洲人妖| aaa欧美色吧激情视频| 色欧美日韩亚洲| 欧美久久婷婷综合色| 欧美一区二区啪啪| 国产情人综合久久777777| 国产午夜亚洲精品羞羞网站| 国产精品福利一区| 亚洲福利视频一区二区| 男男成人高潮片免费网站| 狠狠色丁香久久婷婷综| 丰满少妇在线播放bd日韩电影| 99国内精品久久| 337p亚洲精品色噜噜| 久久久久国产精品麻豆| 亚洲免费在线电影| 日韩精品成人一区二区三区| 国产一区二区毛片| 91香蕉视频黄| 欧美mv日韩mv| 亚洲欧美区自拍先锋| 日韩高清不卡在线| 国产成人免费xxxxxxxx| 在线观看一区二区精品视频| 日韩精品中文字幕一区二区三区| 国产精品不卡一区二区三区| 午夜不卡av免费| 国产成人精品免费| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 精品剧情在线观看| 亚洲另类春色国产| 国产精品自在欧美一区| 91电影在线观看| 国产性色一区二区| 琪琪一区二区三区| 91免费观看在线| 久久无码av三级| 亚洲成人综合网站| 99麻豆久久久国产精品免费优播| 日韩一区二区三区精品视频| 亚洲欧美色综合| 国内精品在线播放| 欧美精品色一区二区三区| 国产精品色噜噜| 狠狠色狠狠色综合系列| 欧美视频在线观看一区| 中文av一区二区| 奇米一区二区三区| 欧美中文字幕不卡| 国产精品伦理在线| 精品亚洲国内自在自线福利| 欧美视频在线一区二区三区| 国产精品久久久久婷婷二区次| 久久精品国产第一区二区三区| 欧美在线播放高清精品| 国产精品国模大尺度视频| 精品无人码麻豆乱码1区2区| 欧美精品在线一区二区| 亚洲激情男女视频| 成人免费看黄yyy456| 久久综合中文字幕| 美女精品自拍一二三四| 欧美精品粉嫩高潮一区二区| 亚洲精品自拍动漫在线| 成人av电影观看| 中文字幕久久午夜不卡| 国产一区二区视频在线| 精品裸体舞一区二区三区| 免费人成网站在线观看欧美高清| 欧美日韩亚洲不卡| 亚洲电影第三页| 欧美午夜影院一区| 亚洲线精品一区二区三区八戒| 97精品国产露脸对白| 国产精品久久久久久久裸模| 成人性视频免费网站| 日本一区二区三级电影在线观看| 国产剧情一区二区| 国产欧美日韩视频在线观看| 国产精品自在在线| 日本一区二区成人| 国产成人精品亚洲777人妖| 久久久精品蜜桃| 国产成人日日夜夜| 中文字幕一区二区三区色视频| 成人涩涩免费视频| 最新热久久免费视频| av亚洲精华国产精华精| 亚洲视频网在线直播| 一本色道久久综合精品竹菊| 亚洲午夜影视影院在线观看| 欧美色图激情小说| 五月婷婷激情综合网| 欧美一区日本一区韩国一区| 久久99日本精品| 久久久久久久久久美女| 成人午夜激情片| 亚洲人亚洲人成电影网站色| 欧美午夜在线观看| 免费观看成人鲁鲁鲁鲁鲁视频| www日韩大片| 成人黄色国产精品网站大全在线免费观看| 国产精品久久久久四虎| 在线观看日韩毛片| 日本大胆欧美人术艺术动态| 久久综合久久鬼色| av午夜精品一区二区三区| 亚洲午夜精品17c| 日韩一区二区在线看片| 成人性生交大片免费看中文网站 | 日韩精品1区2区3区| 久久久久久夜精品精品免费| 91麻豆swag| 日韩**一区毛片| 欧美高清在线视频| 欧美色网站导航| 精品在线一区二区| 一区在线播放视频| 91精品国产免费| 成人av中文字幕| 日韩影院在线观看| 欧美激情一区二区三区全黄| 欧美日韩一区成人| 国产99精品国产| 亚洲18女电影在线观看| 国产亚洲美州欧州综合国| 91国偷自产一区二区开放时间 | 国产精品久久久99| 9191成人精品久久| 成人午夜电影网站| 日本亚洲视频在线| 中文字幕一区二区三区在线不卡| 欧美一级片在线看| 一本色道亚洲精品aⅴ| 国产精品一区二区三区99| 亚洲午夜羞羞片| 中文字幕一区av| 精品国产麻豆免费人成网站|