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

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

?? lib_str.c

?? ucos-ii 的完整代碼
?? 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一区二区三区免费野_久草精品视频
欧美色倩网站大全免费| 久久精品视频一区二区| 毛片av中文字幕一区二区| 亚洲欧美影音先锋| 日韩女同互慰一区二区| 日韩精品一区在线观看| 精品久久国产97色综合| 精品国产精品网麻豆系列| 欧美成人a∨高清免费观看| 日韩一区二区三区av| 777久久久精品| 欧美xxxxxxxx| 久久精品亚洲精品国产欧美kt∨| 精品国产乱码久久久久久久久| 精品国产青草久久久久福利| 精品裸体舞一区二区三区| 久久蜜桃香蕉精品一区二区三区| 久久久不卡影院| 中文字幕在线不卡| 亚洲色图视频网站| 亚洲国产美女搞黄色| 午夜免费久久看| 精品在线一区二区| 成人av午夜影院| 一本久久精品一区二区| 91国产视频在线观看| 欧美一区二区高清| 中文字幕av一区二区三区免费看 | 中文字幕色av一区二区三区| 欧美激情一区二区在线| 亚洲免费观看高清完整版在线观看| 亚洲精品国久久99热| 日韩和欧美一区二区| 91久久人澡人人添人人爽欧美| 欧美一区二区视频在线观看2022| 一区二区成人在线观看| 国产精品一区二区黑丝| 亚洲欧洲国产日本综合| 亚洲一区二区三区小说| 国产在线精品一区二区| 一本到不卡精品视频在线观看| 欧美日韩一区二区三区在线看| 欧美一级理论性理论a| 欧美国产精品专区| 亚洲成a人v欧美综合天堂| 国产精品 欧美精品| 制服丝袜亚洲色图| 一区在线观看视频| 国模大尺度一区二区三区| 欧美中文字幕亚洲一区二区va在线| 91精品国产色综合久久不卡蜜臀 | 午夜精品免费在线观看| av在线播放不卡| 精品国产污污免费网站入口 | 91麻豆国产福利精品| 精品奇米国产一区二区三区| 日本一区中文字幕| 大桥未久av一区二区三区中文| 337p亚洲精品色噜噜| 亚洲欧美色图小说| 国产91对白在线观看九色| 欧美日韩国产小视频| 樱花草国产18久久久久| 成人免费毛片嘿嘿连载视频| 精品日韩在线观看| 日韩电影一二三区| 欧美日本在线一区| 亚洲国产日韩a在线播放| 91色在线porny| 欧美国产乱子伦| 国产精品亚洲一区二区三区妖精| 欧美一区二区三区男人的天堂| 亚洲一区二区欧美激情| 91丨porny丨首页| 日韩一区在线播放| 99国产精品久久久久久久久久| 国产精品久久久久久久久动漫 | 中文字幕av一区二区三区免费看| 美日韩一区二区三区| 日韩欧美视频在线| 久草热8精品视频在线观看| 欧美一区二区大片| 老司机免费视频一区二区| 日韩欧美高清一区| 久久99精品久久只有精品| 久久综合色播五月| 国产成人综合亚洲91猫咪| 国产欧美一区二区精品性色| 国产精品一级片在线观看| 国产精品午夜春色av| 99国产一区二区三精品乱码| 一区二区三区四区不卡视频 | 欧美一区二区三区思思人| 蜜桃久久精品一区二区| 久久久国产一区二区三区四区小说 | 亚洲国产精品t66y| 国产凹凸在线观看一区二区| 日韩美女啊v在线免费观看| 在线看日本不卡| 亚洲大片精品永久免费| 欧美大肚乱孕交hd孕妇| 国产精品小仙女| 国产精品免费丝袜| 欧美色男人天堂| 久久99精品国产91久久来源| 欧美国产日韩a欧美在线观看| gogo大胆日本视频一区| 午夜视频在线观看一区二区| 欧美成人精品福利| 91网页版在线| 另类小说图片综合网| 国产精品福利在线播放| 欧美精品在线观看播放| 国产精品1区二区.| 亚洲影院在线观看| 精品国产一区二区亚洲人成毛片 | 紧缚捆绑精品一区二区| 国产精品每日更新| 91精品福利在线一区二区三区 | 91麻豆精品秘密| 亚洲.国产.中文慕字在线| 国产欧美日韩不卡免费| 欧美日韩mp4| av亚洲精华国产精华精| 日韩成人精品在线| 亚洲欧美日韩一区二区三区在线观看| 91精品国产综合久久久久久| 波多野结衣在线一区| 极品少妇xxxx精品少妇偷拍| 一区二区欧美精品| 国产精品区一区二区三| 精品国产a毛片| 欧美日韩专区在线| 91玉足脚交白嫩脚丫在线播放| 国内不卡的二区三区中文字幕| 亚洲国产精品久久人人爱 | 亚洲一区二区三区四区中文字幕| 国产日韩精品一区二区三区| 日韩视频一区二区三区| 久久精品欧美日韩精品 | 日韩免费成人网| 欧美久久婷婷综合色| 日本久久电影网| 99精品视频在线观看免费| 国产成人综合亚洲网站| 激情亚洲综合在线| 日本欧美在线观看| 午夜伦欧美伦电影理论片| 亚洲动漫第一页| 一区二区成人在线观看| 一区二区三区电影在线播| 亚洲免费观看高清完整版在线| 国产精品成人免费在线| 亚洲国产精品成人综合| 国产亚洲精品久| 久久精品免费在线观看| 久久精品免费在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 国产午夜亚洲精品理论片色戒 | 亚洲一区二区三区四区中文字幕| 自拍偷拍国产精品| 一区二区三区欧美久久| 亚洲国产成人91porn| 亚洲国产一二三| 午夜av一区二区| 日本不卡视频在线| 久久国产精品区| 国产一区二区伦理| 成人av资源在线观看| 色吊一区二区三区| 欧美日韩在线播放三区| 91精品国产综合久久福利| 91精品国产色综合久久ai换脸| 日韩欧美国产麻豆| 国产欧美精品一区二区三区四区| 国产精品免费观看视频| 伊人夜夜躁av伊人久久| 日韩和欧美一区二区三区| 国产一区二区三区免费播放| 成人精品免费看| 在线精品视频免费观看| 日韩欧美电影一区| 欧美经典三级视频一区二区三区| 一区二区三区在线不卡| 免费日本视频一区| 99麻豆久久久国产精品免费| 欧美视频中文字幕| 久久久欧美精品sm网站| 亚洲综合小说图片| 久久99久国产精品黄毛片色诱| 成人h动漫精品| 69堂精品视频| 中文字幕在线免费不卡| 亚洲3atv精品一区二区三区| 国产91精品露脸国语对白| 欧美日韩aaa| 亚洲人成7777| 激情久久五月天| 欧美午夜免费电影| 国产欧美日韩激情|