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

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

?? lib_str.c

?? UCOSII在STM32平臺的移植
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*
*********************************************************************************************************
*                                               uC/LIB
*                                       CUSTOM LIBRARY MODULES
*
*                          (c) Copyright 2004-2007; Micrium, Inc.; Weston, FL
*
*               All rights reserved.  Protected by international copyright laws.
*
*               uC/LIB is provided in source form for FREE evaluation, for educational
*               use or peaceful research.  If you plan on using uC/LIB in a commercial
*               product you need to contact Micrium to properly license its use in your
*               product.  We provide ALL the source code for your convenience and to
*               help you experience uC/LIB.  The fact that the source code is provided
*               does NOT mean that you can use it without paying a licensing fee.
*
*               Knowledge of the source code may NOT be used to develop a similar product.
*
*               Please help us continue to provide the Embedded community with the finest
*               software available.  Your honesty is greatly appreciated.
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*
*                                       ASCII STRING MANAGEMENT
*
* Filename      : lib_str.c
* Version       : V1.24
* Programmer(s) : ITJ
*                 JDH
*********************************************************************************************************
* Note(s)       : (1) NO compiler-supplied standard library functions are used in library or product software.
*
*                     (a) ALL standard library functions are implemented in the custom library modules :
*
*                         (1) \<Custom Library Directory>\lib*.*
*
*                         (2) \<Custom Library Directory>\Ports\<cpu>\<compiler>\lib*_a.*
*
*                               where
*                                       <Custom Library Directory>      directory path for custom library software
*                                       <cpu>                           directory name for specific processor (CPU)
*                                       <compiler>                      directory name for specific compiler
*
*                     (b) Product-specific library functions are implemented in individual products.
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                            INCLUDE FILES
*********************************************************************************************************
*/

#define    LIB_STR_MODULE
#include  <lib_str.h>


/*$PAGE*/
/*
*********************************************************************************************************
*                                            LOCAL DEFINES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                           LOCAL CONSTANTS
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                          LOCAL DATA TYPES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                            LOCAL TABLES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                       LOCAL GLOBAL VARIABLES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                      LOCAL FUNCTION PROTOTYPES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                     LOCAL CONFIGURATION ERRORS
*********************************************************************************************************
*/


/*$PAGE*/
/*
*********************************************************************************************************
*                                              Str_Len()
*
* Description : Calculate length of a string.
*
* Argument(s) : pstr        Pointer to string (see Note #1).
*
* Return(s)   : Length of string; number of characters in string before terminating NULL character.
*
* Caller(s)   : various.
*
* Note(s)     : (1) String buffer NOT modified.
*
*               (2) String length calculation terminates when :
*
*                   (a) String pointer points to NULL.
*                       (1) String buffer overlaps with NULL address.
*                       (2) String length calculated for string up to but NOT beyond or including
*                           the NULL address.
*
*                   (b) Terminating NULL character found.
*                       (1) String length calculated for string up to but NOT           including
*                           the NULL character.
*********************************************************************************************************
*/

CPU_SIZE_T  Str_Len (CPU_CHAR  *pstr)
{
    CPU_SIZE_T  len;


    len = 0;
    while (( pstr != (CPU_CHAR *)0) &&                          /* Calc str len until NULL ptr (see Note #2a) ...       */
           (*pstr != (CPU_CHAR  )0)) {                          /* ... or NULL char found      (see Note #2b).          */
        len++;
        pstr++;
    }

    return (len);
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                             Str_Copy()
*
* Description : Copy source string to destination string buffer.
*
* Argument(s) : pdest       Pointer to destination string buffer to receive source string copy (see Note #1).
*
*               psrc        Pointer to source      string to copy into destination string buffer.
*
* Return(s)   : Pointer to destination string, if NO errors (see Note #2).
*
*               Pointer to NULL,               otherwise.
*
* Caller(s)   : various.
*
* Note(s)     : (1) Destination buffer size NOT validated; buffer overruns MUST be prevented by caller.
*
*                   (a) Destination buffer size MUST be large enough to accommodate the entire source 
*                       string size including the terminating NULL character.
*
*               (2) String copy terminates when :
*
*                   (a) Destination/Source string pointer(s) are passed NULL pointers.
*                       (1) No string copy performed; NULL pointer returned.
*
*                   (b) Destination/Source string pointer(s) points to NULL.
*                       (1) String buffer(s) overlap with NULL address.
*                       (2) Source string copied into destination string buffer up to but NOT beyond or
*                           including the NULL address; destination string buffer properly terminated
*                           with NULL character.
*
*                   (c) Source string's terminating NULL character found.
*                       (1) Entire source string copied into destination string buffer.
*********************************************************************************************************
*/

CPU_CHAR  *Str_Copy (CPU_CHAR  *pdest,
                     CPU_CHAR  *psrc)
{
    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 (psrc  == (CPU_CHAR *)0) {
        return  ((CPU_CHAR *)0);
    }


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

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


    return (pdest);
}


/*$PAGE*/
/*
*********************************************************************************************************
*                                            Str_Copy_N()
*
* Description : Copy source string to destination string buffer, up to a maximum number of characters.
*
* Argument(s) : pdest       Pointer to destination string buffer to receive source string copy (see Note #1).
*
*               psrc        Pointer to source      string to copy into destination string buffer.
*
*               len_max     Maximum number of characters to copy (see Note #2d).
*
* Return(s)   : Pointer to destination string, if NO errors (see Note #2).
*
*               Pointer to NULL,               otherwise.
*
* Caller(s)   : various.
*
* Note(s)     : (1) Destination buffer size NOT validated; buffer overruns MUST be prevented by caller.
*
*                   (a) Destination buffer size MUST be large enough to accommodate the entire source 
*                       string size including the terminating NULL character.
*
*               (2) String copy terminates when :
*
*                   (a) Destination/Source string pointer(s) are passed NULL pointers.
*                       (1) No string copy performed; NULL pointer returned.
*
*                   (b) Destination/Source string pointer(s) points to NULL.
*                       (1) String buffer(s) overlap with NULL address.
*                       (2) Source string copied into destination string buffer up to but NOT beyond or
*                           including the NULL address; destination string buffer properly terminated
*                           with NULL character.
*
*                   (c) Source string's terminating NULL character found.
*                       (1) Entire source string copied into destination string buffer.
*
*                   (d) 'len_max' number of characters copied.
*                       (1) 'len_max' number of characters does NOT include the terminating NULL character.
*
*                           See also Note #1a.
*********************************************************************************************************
*/

CPU_CHAR  *Str_Copy_N (CPU_CHAR    *pdest,
                       CPU_CHAR    *psrc,
                       CPU_SIZE_T   len_max)
{
    CPU_CHAR    *pstr;
    CPU_CHAR    *pstr_next;
    CPU_SIZE_T   len_copy;

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

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


    pstr      = pdest;
    pstr_next = pstr;
    pstr_next++;
    len_copy  = 0;

    while (( pstr_next != (CPU_CHAR *)0) &&                     /* Copy str until NULL ptr(s)  (see Note #2b)  ...      */
           ( psrc      != (CPU_CHAR *)0) &&
           (*psrc      != (CPU_CHAR  )0) &&                     /* ... or NULL char found      (see Note #2c); ...      */
           ( len_copy  <  (CPU_SIZE_T)len_max)) {               /* ... or max nbr chars copied (see Note #2d).          */
       *pstr = *psrc;
        pstr++;
        pstr_next++;
        psrc++;
        len_copy++;
    }

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


    return (pdest);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线区一区二视频| 欧美国产日韩一二三区| 久久九九影视网| 亚洲国产三级在线| 成人国产精品免费观看动漫| 欧美日韩大陆一区二区| 自拍偷拍国产精品| 国产精品伊人色| 欧美午夜片在线看| 国产精品国产三级国产| 另类小说色综合网站| 制服丝袜一区二区三区| 亚洲精品成a人| 9l国产精品久久久久麻豆| 久久综合色婷婷| 看片网站欧美日韩| 777亚洲妇女| 亚洲午夜免费福利视频| 91在线观看视频| 国产精品久久久久aaaa| www.亚洲精品| 国产精品嫩草99a| 国产精品一二三在| 欧美精品一区二区三区在线| 久久99精品国产.久久久久久| 欧美日韩国产影片| 天涯成人国产亚洲精品一区av| 欧美亚洲一区二区在线观看| 亚洲黄色性网站| 在线视频欧美精品| 亚洲一区二区在线免费观看视频| 色欧美日韩亚洲| 亚洲精品国产无天堂网2021| 在线观看av一区二区| 午夜欧美在线一二页| 欧美另类videos死尸| 日本特黄久久久高潮| 亚洲精品在线观看视频| 国产精品一级在线| 中文字幕亚洲电影| 日本精品裸体写真集在线观看 | 午夜一区二区三区在线观看| 欧美性受极品xxxx喷水| 三级欧美在线一区| 日韩女优毛片在线| 国产传媒一区在线| 成人欧美一区二区三区小说| 在线视频国内自拍亚洲视频| 日韩一区精品视频| 久久精品视频一区二区三区| 成人激情开心网| 亚洲a一区二区| 亚洲精品一区二区三区福利| www.亚洲激情.com| 视频精品一区二区| 国产三级精品在线| 欧美色综合天天久久综合精品| 美日韩一级片在线观看| 中文无字幕一区二区三区| 欧美午夜不卡视频| 欧美aaaaaa午夜精品| 国产精品午夜免费| 欧美日韩国产天堂| 国产91精品久久久久久久网曝门| 亚洲品质自拍视频| 欧美大黄免费观看| 91免费在线看| 另类小说欧美激情| 亚洲自拍与偷拍| 亚洲美女在线一区| 欧美一级精品大片| 99久久精品免费看国产免费软件| 一区二区高清免费观看影视大全 | 国产欧美综合在线观看第十页| 91免费版在线看| 经典三级在线一区| 亚洲风情在线资源站| 国产精品无人区| 欧美一级二级三级蜜桃| av在线播放一区二区三区| 婷婷综合久久一区二区三区| 中文字幕在线观看一区| 欧美不卡激情三级在线观看| 欧美亚一区二区| 91在线观看高清| 国产成人一区二区精品非洲| 男女男精品网站| 中文字幕在线免费不卡| 欧美精品一区二区三| 7777精品伊人久久久大香线蕉| 99天天综合性| 国产一区不卡精品| 七七婷婷婷婷精品国产| 亚洲天堂网中文字| 中文字幕免费观看一区| wwwwww.欧美系列| 欧美一卡二卡三卡| 欧美日本高清视频在线观看| 色哟哟在线观看一区二区三区| 国产成人精品1024| 韩国欧美国产1区| 麻豆精品新av中文字幕| 日韩不卡手机在线v区| 亚洲一区二区3| 亚洲综合区在线| 亚洲免费观看高清在线观看| 亚洲欧洲日产国产综合网| 欧美激情一区二区| 欧美国产乱子伦| 国产日产精品1区| 国产亚洲精品福利| 久久久久久久久99精品| 久久久久久电影| 国产精品麻豆久久久| 中文字幕av资源一区| 中文字幕一区在线观看视频| 中文字幕亚洲欧美在线不卡| 亚洲免费观看高清完整版在线观看| 中文字幕亚洲成人| 一个色在线综合| 婷婷国产在线综合| 日本aⅴ亚洲精品中文乱码| 蜜桃视频在线观看一区| 狠狠狠色丁香婷婷综合激情| 亚洲黄色小视频| 日韩国产欧美在线观看| 老司机午夜精品| 国产精品一级二级三级| 99久久精品国产精品久久| 日本久久电影网| 91精品国产丝袜白色高跟鞋| 精品久久久久99| 欧美激情资源网| 亚洲国产色一区| 国产资源精品在线观看| 99re在线精品| 欧美日韩国产成人在线91| 欧美电影免费观看高清完整版在 | 欧美特级限制片免费在线观看| 91精品国产入口在线| 久久欧美中文字幕| 自拍偷拍国产亚洲| 美国一区二区三区在线播放| 国产成人免费av在线| 91成人在线精品| 精品国产人成亚洲区| 日韩一区日韩二区| 裸体健美xxxx欧美裸体表演| 成人在线综合网| 91精品国模一区二区三区| 国产亚洲一二三区| 亚洲国产成人高清精品| 国产成人在线视频网址| 欧美视频三区在线播放| 久久亚洲精华国产精华液| 一二三区精品视频| 国产麻豆日韩欧美久久| 欧美日韩精品三区| 国产精品少妇自拍| 日本不卡在线视频| 欧美最新大片在线看| 国产亚洲一区二区三区| 婷婷久久综合九色国产成人 | 制服丝袜亚洲色图| 亚洲欧洲国产日韩| 极品尤物av久久免费看| 欧美自拍偷拍一区| 国产精品久久久久久久久动漫| 日本在线不卡视频| 色悠悠亚洲一区二区| 欧美国产禁国产网站cc| 久草中文综合在线| 在线成人av影院| 一区二区三区不卡视频| 丰满亚洲少妇av| 久久久亚洲欧洲日产国码αv| 日韩在线一区二区| 欧美亚洲图片小说| 亚洲精品成人在线| 色综合天天做天天爱| 国产精品情趣视频| 福利一区二区在线| 国产天堂亚洲国产碰碰| 精品亚洲欧美一区| 欧美va亚洲va| 在线视频国产一区| 亚洲欧美偷拍三级| 成人高清免费在线播放| 欧美国产一区二区在线观看| 国模无码大尺度一区二区三区| 91麻豆精品久久久久蜜臀| 亚洲国产精品麻豆| 欧美日韩成人在线| 亚洲午夜激情av| 欧美午夜一区二区三区| 五月天亚洲婷婷| 日韩一区二区在线看| 麻豆精品一区二区av白丝在线| 日韩一区二区三区av| 看国产成人h片视频|