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

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

?? lib_str.c

?? 移植到freescale 9s12系列單片機的uCOSII
?? C
?? 第 1 頁 / 共 4 頁
字號:
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                              Str_Cat()
*
* Description : Append concatenation string to destination string.
*
* Argument(s) : pdest       Pointer to destination   string to append concatenation  string (see Note #1).
*
*               pstr_cat    Pointer to concatenation string to append to destination string.
*
* Return(s)   : Pointer to destination string, if NO errors (see Note #2).
*
*               Pointer to NULL,               otherwise.
*
* Caller(s)   : various.
*
* Note(s)     : (1) Destination string buffer size NOT validated; buffer overruns MUST be prevented by caller.
*
*                   (a) Destination buffer size MUST be large enough to accomodate the entire concatenated
*                       string size including the terminating NULL character.
*
*               (2) String concatenation terminates when :
*
*                   (a) Destination/Concatenation string pointer(s) are passed NULL pointers.
*                       (1) No string concatenation performed; NULL pointer returned.
*
*                   (b) Destination string overlaps with NULL address.
*                       (1) No string concatenation performed; NULL pointer returned.
*
*                   (c) Destination/Concatenation string pointer(s) points to NULL.
*                       (1) String buffer(s) overlap with NULL address.
*                       (2) Concatenation string appended into destination string buffer up to but NOT
*                           beyond or including the NULL address; destination string buffer properly
*                           terminated with NULL character.
*
*                   (d) Concatenation string's terminating NULL character found.
*                       (1) Entire concatenation string appended to destination string.
*********************************************************************************************************
*/

CPU_CHAR  *Str_Cat (CPU_CHAR  *pdest,
                    CPU_CHAR  *pstr_cat)
{
    CPU_CHAR  *pstr;
    CPU_CHAR  *pstr_next;

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


    pstr = pdest;
    while (( pstr != (CPU_CHAR *)0) &&                          /* Adv to end of cur dest str until NULL ptr ...        */
           (*pstr != (CPU_CHAR  )0)) {                          /* ... or NULL char found..                             */
        pstr++;
    }
    if (pstr == (CPU_CHAR *)0) {                                /* If NULL str overrun, rtn NULL (see Note #2b).        */
        return ((CPU_CHAR *)0);
    }

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

   *pstr = (CPU_CHAR)0;                                         /* Append NULL char (see Note #2c2).                    */


    return (pdest);
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                             Str_Cat_N()
*
* Description : Append concatenation string to destination string, up to a maximum number of characters.
*
* Argument(s) : pdest       Pointer to destination   string to append concatenation  string (see Note #1).
*
*               pstr_cat    Pointer to concatenation string to append to destination string.
*
*               len_max     Maximum number of characters to concatenate (see Note #2e).
*
* Return(s)   : Pointer to destination string, if NO errors (see Note #2).
*
*               Pointer to NULL,               otherwise.
*
* Caller(s)   : various.
*
* Note(s)     : (1) Destination string buffer size NOT validated; buffer overruns MUST be prevented by caller.
*
*                   (a) Destination buffer size MUST be large enough to accomodate the entire concatenated
*                       string size including the terminating NULL character.
*
*               (2) String concatenation terminates when :
*
*                   (a) Destination/Concatenation string pointer(s) are passed NULL pointers.
*                       (1) No string concatenation performed; NULL pointer returned.
*
*                   (b) Destination string overlaps with NULL address.
*                       (1) No string concatenation performed; NULL pointer returned.
*
*                   (c) Destination/Concatenation string pointer(s) points to NULL.
*                       (1) String buffer(s) overlap with NULL address.
*                       (2) Concatenation string appended into destination string buffer up to but NOT
*                           beyond or including the NULL address; destination string buffer properly
*                           terminated with NULL character.
*
*                   (d) Concatenation string's terminating NULL character found.
*                       (1) Entire concatenation string appended to destination string.
*
*                   (e) 'len_max' number of characters concatenated.
*                       (1) 'len_max' number of characters does NOT include the terminating NULL character.
*
*                           See also Note #1a.
*********************************************************************************************************
*/
/*$PAGE*/
CPU_CHAR  *Str_Cat_N (CPU_CHAR    *pdest,
                      CPU_CHAR    *pstr_cat,
                      CPU_SIZE_T   len_max)
{
    CPU_CHAR    *pstr;
    CPU_CHAR    *pstr_next;
    CPU_SIZE_T   len_cat;

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

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


    pstr = pdest;
    while (( pstr != (CPU_CHAR *)0) &&                          /* Adv to end of cur dest str until NULL ptr ...        */
           (*pstr != (CPU_CHAR  )0)) {                          /* ... or NULL char found..                             */
        pstr++;
    }
    if (pstr == (CPU_CHAR *)0) {                                /* If NULL str overrun, rtn NULL (see Note #2b).        */
        return ((CPU_CHAR *)0);
    }

    pstr_next = pstr;
    pstr_next++;
    len_cat   = 0;

    while (( pstr_next != (CPU_CHAR *)0) &&                     /* Cat str until NULL ptr(s)  (see Note #2c)  ...       */
           ( pstr_cat  != (CPU_CHAR *)0) &&
           (*pstr_cat  != (CPU_CHAR  )0) &&                     /* ... or NULL char found     (see Note #2d); ...       */
           ( len_cat   <  (CPU_SIZE_T)len_max)) {               /* ... or max nbr chars cat'd (see Note #2d).           */
       *pstr = *pstr_cat;
        pstr++;
        pstr_next++;
        pstr_cat++;
        len_cat++;
    }

   *pstr = (CPU_CHAR)0;                                         /* Append NULL char (see Note #2c2).                    */


    return (pdest);
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                              Str_Cmp()
*
* Description : Determine if two strings are identical.
*
* Argument(s) : p1_str      Pointer to first  string (see Note #1).
*
*               p2_str      Pointer to second string (see Note #1).
*
* Return(s)   : 0,              if strings are identical             (see Notes #2a, #2e, & #2f).
*
*               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'.
*
*               (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 (CPU_CHAR  *p1_str,
                     CPU_CHAR  *p2_str)
{
    CPU_CHAR    *p1_str_next;
    CPU_CHAR    *p2_str_next;
    CPU_INT16S   cmp_val;


    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++;
    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)) {
        p1_str_next++;
        p2_str_next++;
        p1_str++;
        p2_str++;
    }


    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_Cmp_N()
*
* Description : Determine if two strings are identical for up to a maximum number of characters.
*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.色综合.com| 国产一区啦啦啦在线观看| 日本一区二区免费在线观看视频| 欧美精品欧美精品系列| 欧美亚洲国产怡红院影院| 91免费版pro下载短视频| 99久久精品费精品国产一区二区| 国产高清在线精品| 粉嫩一区二区三区在线看| 国产精品99久久久久久宅男| 国产精品99久久久久久有的能看 | 国产三级欧美三级日产三级99| 7777女厕盗摄久久久| 欧美一级爆毛片| 欧美精品一区二区三区一线天视频 | 95精品视频在线| 91社区在线播放| 欧美视频在线观看一区二区| 欧美年轻男男videosbes| 91精品国产aⅴ一区二区| 日韩欧美一级二级| 国产欧美一区二区精品性色| 国产精品美女久久久久久久网站| 亚洲人成精品久久久久| 亚洲超丰满肉感bbw| 麻豆国产一区二区| 丁香六月综合激情| 色婷婷精品大视频在线蜜桃视频| 欧美日韩一区三区四区| 久久嫩草精品久久久久| 成人免费小视频| 午夜av一区二区三区| 国产伦精品一区二区三区视频青涩 | 免费成人在线观看| 国产激情一区二区三区四区| 92精品国产成人观看免费| 欧美美女网站色| 久久久国产精华| 亚洲制服丝袜av| 久久99九九99精品| 色伊人久久综合中文字幕| 欧美一区二区三区成人| 国产精品电影一区二区| 天堂在线一区二区| 不卡的av网站| 精品国产免费视频| 亚洲国产aⅴ成人精品无吗| 国产一区二区三区香蕉| 欧美性色黄大片| 国产精品视频线看| 麻豆成人av在线| 在线一区二区三区| 中文av字幕一区| 免费xxxx性欧美18vr| 99精品一区二区三区| 欧美电影免费观看高清完整版 | 精品视频一区二区三区免费| 久久精品夜色噜噜亚洲aⅴ| 天天综合网天天综合色| 色综合久久综合| 中文一区一区三区高中清不卡| 日韩电影免费在线看| 欧美亚洲国产一卡| 亚洲欧美偷拍卡通变态| 国产成人精品一区二区三区四区 | 国产大陆亚洲精品国产| 欧美一区二区三区的| 亚洲福中文字幕伊人影院| 99久久免费视频.com| 久久五月婷婷丁香社区| 久久精品国产亚洲一区二区三区| 欧美日韩成人一区| 亚洲成在人线在线播放| 日本高清不卡一区| 亚洲人成网站影音先锋播放| 99re热这里只有精品免费视频 | 国产成人综合亚洲网站| 久久夜色精品一区| 国产一区二区剧情av在线| 精品国产乱子伦一区| 美女久久久精品| 精品国产一二三| 国产露脸91国语对白| 久久久久99精品国产片| 国产一区二区在线看| 久久夜色精品一区| 成人毛片视频在线观看| 国产精品每日更新在线播放网址 | 99热精品一区二区| 樱花影视一区二区| 欧美裸体bbwbbwbbw| 秋霞电影网一区二区| 日韩精品一区二区三区在线观看 | 久久久www成人免费毛片麻豆| 韩国欧美一区二区| 中文久久乱码一区二区| 91免费观看国产| 日韩福利电影在线| 精品盗摄一区二区三区| 成人晚上爱看视频| 亚洲一二三四区| 日韩欧美国产不卡| 丁香啪啪综合成人亚洲小说 | 亚洲一区二区av电影| 制服丝袜一区二区三区| 国产一区二区三区免费播放| 中文字幕亚洲综合久久菠萝蜜| 91国内精品野花午夜精品 | 国产精品美女一区二区在线观看| 成人精品国产免费网站| 亚洲国产精品一区二区尤物区| 日韩一区二区三区视频在线观看| 国内精品国产三级国产a久久| 中文字幕综合网| 欧美高清hd18日本| 国产91在线|亚洲| 亚洲福利视频一区| 欧美激情一区二区在线| 欧美日本视频在线| 成人的网站免费观看| 亚洲成va人在线观看| 日本一区二区视频在线观看| 欧美日韩激情在线| 国产成人av电影在线| 爽好多水快深点欧美视频| 国产精品入口麻豆九色| 91麻豆精品国产91久久久| av综合在线播放| 国内一区二区视频| 午夜不卡在线视频| 亚洲美女屁股眼交3| 国产欧美精品一区二区色综合 | 91精品婷婷国产综合久久竹菊| 成人av综合一区| 国产综合久久久久久鬼色| 一级做a爱片久久| 国产精品久久久久久久久久久免费看 | 国产精品午夜电影| 日韩欧美国产成人一区二区| 欧美性大战xxxxx久久久| 成人av网站免费观看| 久久99精品久久久久久动态图 | 欧美日韩一区二区电影| 成人av小说网| 丁香桃色午夜亚洲一区二区三区| 精品一区二区三区在线视频| 一区二区三区日韩在线观看| 亚洲欧洲av一区二区三区久久| 久久亚洲私人国产精品va媚药| 日韩一区二区精品在线观看| 欧美在线综合视频| 91麻豆福利精品推荐| 99精品欧美一区二区三区综合在线| 国产一区久久久| 国产精品亚洲一区二区三区在线| 精品一区二区三区在线视频| 久久精品国产成人一区二区三区| 日韩vs国产vs欧美| 欧美aaaaa成人免费观看视频| 亚洲高清视频的网址| 亚洲成人av一区二区三区| 亚洲成人久久影院| 五月开心婷婷久久| 日韩电影网1区2区| 久久精品99国产精品日本| 麻豆成人久久精品二区三区红| 蜜臀91精品一区二区三区| 经典一区二区三区| 高清视频一区二区| 成人h动漫精品一区二区| av电影在线不卡| 91黄色激情网站| 这里只有精品免费| 精品国产百合女同互慰| 中文字幕久久午夜不卡| 亚洲视频1区2区| 亚洲大片在线观看| 精品无人区卡一卡二卡三乱码免费卡| 国内精品久久久久影院色| 成人黄色一级视频| 欧美性受xxxx黑人xyx| 日韩欧美国产综合| 欧美国产精品一区| 一区二区三区中文在线观看| 日韩av一区二| 成人av在线资源| 欧美日韩国产另类一区| 久久日一线二线三线suv| 亚洲婷婷综合色高清在线| 日韩av一区二区在线影视| 粉嫩在线一区二区三区视频| 日本黄色一区二区| 精品欧美一区二区三区精品久久| 国产精品视频一二三| 视频一区在线播放| 成人深夜视频在线观看| 欧美三级视频在线播放| 国产女人aaa级久久久级 | 欧美视频一区二| 久久综合狠狠综合久久综合88 |