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

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

?? lib_str.c

?? 移植到freescale 9s12系列單片機(jī)的uCOSII
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
/*
*********************************************************************************************************
*                                               uC/LIB
*                                       CUSTOM LIBRARY MODULES
*
*                          (c) Copyright 2004-2006; 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.22
* 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 accomodate 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 accomodate 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);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美吻胸吃奶大尺度电影| 国产日产亚洲精品系列| 欧美视频在线一区| 99久久久国产精品免费蜜臀| 高清国产一区二区| 国产成人精品亚洲日本在线桃色| 成人国产电影网| 国产一区二区三区精品欧美日韩一区二区三区| 日韩影院精彩在线| 免费一区二区视频| 久久99精品国产.久久久久久| 日韩精品一区二区在线观看| 日韩欧美在线综合网| 亚洲免费电影在线| 亚洲精品免费播放| 一区二区三区国产豹纹内裤在线 | 欧美图区在线视频| 99riav久久精品riav| 99re8在线精品视频免费播放| 美女国产一区二区三区| 欧美a级一区二区| 蜜臂av日日欢夜夜爽一区| 老司机精品视频在线| 久久激情综合网| 国产一区二区不卡在线| bt欧美亚洲午夜电影天堂| 91在线视频观看| 欧美日韩亚洲丝袜制服| 日韩精品一区二区三区视频在线观看| 91在线观看下载| 欧美日韩综合在线| 欧美电影免费观看高清完整版在线 | 波多野结衣亚洲一区| 99re热视频这里只精品| 欧美视频在线播放| 日韩亚洲欧美一区| 久久久精品tv| 欧美国产日本韩| 一区二区三区四区亚洲| 色一区在线观看| 欧美日韩一区视频| 精品国产制服丝袜高跟| 中文字幕综合网| 丝袜亚洲另类欧美| 国产99久久久国产精品免费看| 日韩av电影免费观看高清完整版 | 麻豆专区一区二区三区四区五区| 中文字幕在线观看不卡视频| 一区二区三区电影在线播| 天堂蜜桃91精品| 国产福利一区二区三区| 色菇凉天天综合网| 日韩一区二区三区免费观看| 国产精品久久三| 日韩高清一区在线| eeuss国产一区二区三区| 欧美丰满少妇xxxxx高潮对白| 欧美色区777第一页| 久久奇米777| 亚洲一区二区三区在线| 国产精品456| 在线电影一区二区三区| 亚洲国产成人自拍| 欧美日韩另类国产亚洲欧美一级| 91黄色激情网站| 日韩免费在线观看| 亚洲日本乱码在线观看| 国产乱人伦偷精品视频免下载| 国产美女在线观看一区| 在线观看中文字幕不卡| 国产欧美久久久精品影院| 日本不卡在线视频| 色偷偷久久人人79超碰人人澡| 欧美亚洲一区二区在线观看| 国产欧美一区二区三区沐欲| 午夜精品久久久久久久| 91麻豆视频网站| 欧美国产日产图区| 久久成人羞羞网站| 欧美猛男gaygay网站| 中文字幕五月欧美| 国产乱子伦视频一区二区三区 | 午夜久久久久久电影| 成人99免费视频| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 99久久精品久久久久久清纯| 欧美一级艳片视频免费观看| 成人精品一区二区三区四区| 精品99999| 毛片一区二区三区| 91精品国产综合久久久蜜臀图片| 欧美tickle裸体挠脚心vk| 视频一区视频二区中文| 欧美午夜影院一区| 亚洲一区二区三区精品在线| 日本韩国欧美国产| 亚洲另类色综合网站| 99re视频精品| 国产精品久久看| 成人动漫一区二区| 中文字幕在线观看一区| av在线不卡电影| 中文字幕一区二区三区在线不卡| 亚洲va国产天堂va久久en| 在线这里只有精品| 亚洲精品中文字幕乱码三区 | 国产成人综合在线播放| 欧美精品一区视频| 精品影视av免费| 精品久久久网站| 激情综合五月婷婷| 国产三级精品视频| 大胆欧美人体老妇| 国产精品国产三级国产普通话蜜臀| 午夜精品久久久久久久99樱桃| 国产成人av自拍| 国产精品久线观看视频| 国产亚洲精品精华液| 国产成人aaa| 亚洲欧洲日产国码二区| 91麻豆高清视频| 午夜日韩在线观看| 91精品国产综合久久精品图片| 国产精品国产馆在线真实露脸| 欧美a级一区二区| 久久色.com| 成人18视频在线播放| 亚洲一区免费视频| 欧美一区二区三区思思人| 精品亚洲成a人| 欧美激情一区在线| 色综合天天视频在线观看 | 国产精品视频第一区| 本田岬高潮一区二区三区| 一区二区三区不卡视频在线观看| 国产jizzjizz一区二区| 最新日韩在线视频| 欧美色国产精品| 精品一区二区三区免费毛片爱 | 久久精品免视看| 91女神在线视频| 琪琪久久久久日韩精品| 国产日本欧洲亚洲| 日本黄色一区二区| 久久99精品久久久久婷婷| 欧美国产1区2区| 欧美色区777第一页| 国产米奇在线777精品观看| 亚洲免费av高清| 欧美xxxxx牲另类人与| 97国产一区二区| 手机精品视频在线观看| 国产精品无人区| 91精品视频网| 99精品久久久久久| 另类小说色综合网站| 亚洲色图欧美在线| 精品国产乱码久久| 91在线小视频| 久久福利资源站| 亚洲国产三级在线| 国产网站一区二区| 欧美丰满少妇xxxxx高潮对白| 日韩黄色小视频| 亚洲天堂网中文字| 欧美成人性战久久| 日本韩国一区二区三区视频| 国产精品自产自拍| 日韩电影网1区2区| 一区二区三区在线看| 国产性做久久久久久| 欧美丰满少妇xxxbbb| 91麻豆精品秘密| 国产suv精品一区二区三区| 日本成人在线一区| 曰韩精品一区二区| 老司机精品视频导航| 亚洲gay无套男同| 中文字幕一区av| 国产欧美综合色| 精品国产一区二区精华| 欧美日韩一区三区四区| 91色视频在线| 懂色av中文字幕一区二区三区| 中文字幕亚洲在| 久久九九久久九九| 精品国产一区二区三区久久久蜜月| 国产一区二区三区四区五区入口 | 91精品国产aⅴ一区二区| 91麻豆免费看片| 成人18视频日本| 国产成人精品一区二| 久久99精品久久久久婷婷| 日本三级亚洲精品| 亚洲一区国产视频| 一区二区三区高清在线| 亚洲精品国产视频| 亚洲欧洲综合另类| 亚洲日本丝袜连裤袜办公室| 中文字幕中文字幕一区二区|