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

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

?? cm_lib.c

?? 中國石油二期加油站IC系統后臺通訊軟件
?? C
?? 第 1 頁 / 共 2 頁
字號:

/********************************************************************20**

     Name:     common library functions
  
     Type:     C source file
  
     Desc:     Common functions that are implemented in
               both a portable and a performance-efficient manner. These
               functions are selected based on the operating system.

     File:     cm_lib.c

     Sid:      cm_lib.c@@/main/10 - Fri Feb  9 16:23:51 2001

     Prg:      ak

*********************************************************************21*/

/***********************************************************************
 * This file provides memory and string library functions implemented in
 * one of two ways:
 *
 *     1. portable: does not assume library support for any of the functions
 *                  needed.
 *
 *     2. using environment specific: this uses existing library
 *        functions and is therefore, for an environment where such
 *        functionality is available and , a more desirable choice!
 *
 *  The following functions are available in this file:
 *
 *       1. cmMemcpy: copies specified number of octets from one memory
 *          location to another.
 *       2. cmMemcmp: compares specified number of octets at one memory
 *          locaton with the same number from another.
 *       3. cmMemset: sets specified number of octets starting at given
 *          memory location with the given value.
 *       4. cmStrCmp: compares two strings, until the '\0' character is
 *          encountered.
 *       5. cmStrncmp: compares two strings, until \0 is encountered or
 *          until the specified length is exceeded.
 *       6. cmStrlen: finds length of a string until the \0 character.
 *
 *  The following flags are used in this file:
 *
 *     1. DONT_USE_SYS_LIB: If defined, this will compile in the portable
 *        versions of each function in this file. This overrides all other
 *        flags defined in this file.
 *
 *  For the SOLARIS environment:
 *
 *     The functionality defined in this file is generally available as library
 *     functions in the native operating systems' libraries. We have provided
 *     the functionality using the SOLARIS libraries, in this file.
 *
 *     If you want to take advantage of these library functions, all you need
 *     to do is the following:
 *
 *     1. Do not turn on the DONT_USE_SYS_LIB flag.
 *     2. Turn on the SUNOS51 flag.
 *
 *     This, in turn, turns on the following flags
 *
 *        1. MEMCPY_AVAIL  : maps cmMemcpy to C library function memcpy
 *        2. MEMCMP_AVAIL  : maps cmMemcmp to C library function memcmp
 *        3. MEMSET_AVAIL  : maps cmMemset to C library function memset
 *        4. STRCMP_AVAIL  : maps cmStrcmp to Strings library function strcmp
 *        5. STRNCMP_AVAIL : maps cmStrncmp to Strings library function strncmp
 *        5. STRLEN_AVAIL  : maps cmStrlen to Strings library function strlen
 *
 *  For an environment different from SOLARIS:
 *        
 *    You will need to modify this file to do more or less the same stuff
 *    as has been done for Solaris. i.e.
 *
 *     1. create a section inside the #ifndef DONT_USE_SYS_LIB section
 *        similar to the #ifdef SUNOS51 section that:
 *             1. includes system header files.
 *             2. defines MEMCPY_AVAIL etc. as needed.
 *     2. modify code inside functions to make use of the system library
 *        primitive.
 *     3. communicate your changes to Trillium so they can be incorporated
 *        in the next release of this file
 *
 *  To add a new library primitive to this file:
 *     1. it should be implemented in both a portable and environment specific
 *        manner.
 *     2. the portable implementation will not be the default
 *     3. the portable version and the environment specif versions must be
 *        enclosed in #ifdef XXXXXX_AVAIL
 *                     <environment specific implementation>
 *                    #else
 *                     <portable implementation>
 *                    #endif
 *     4. It must be communicated to Trillium so it will be included in the
 *        next release of the file.
 *     5. Trillium engineering must have all changes approved by engineering
 *        management.
 *     6. Trillium reserves the right to not incorporate any changes submitted
 *        by customers, if not approved by Trillium engineering management.
 *     7. Trillium reserves the right to modify code submitted by customers to
 *        enhance this file.
 ************************************************************************/


#ifndef DONT_USE_SYS_LIB

#define MEMCPY_AVAIL   1
#define MEMCMP_AVAIL   1
#define MEMSET_AVAIL   1
#define STRCMP_AVAIL   1
#define STRNCMP_AVAIL  1
#define STRLEN_AVAIL   1

#else  /* DONT_USE_SYS_LIB */
#define MEMCPY_AVAIL   0
#define MEMCMP_AVAIL   0
#define MEMSET_AVAIL   0
#define STRCMP_AVAIL   0
#define STRNCMP_AVAIL  0
#define STRLEN_AVAIL   0
#endif /* not DONT_USE_SYS_LIB */


#include "envopt.h"        /* environment options */
#include "envind.h"        /* environment options */
#include "envdep.h"        /* environment options */
 
#include "gen.h"           /* general layer */
#include "ssi.h"           /* system services */

/* header/extern include files (.x) */
 
#include "gen.x"           /* general layer */
#include "ssi.x"           /* system services */
#include "cm_lib.x"        /* prototypes of primitives in this file */


#include "stdio.h"
#include "ctype.h"
#include "stdlib.h"
#include "string.h"

#if (ERRCLASS & ERRCLS_DEBUG)

#define ECMLIBBASE     0
#define ECMLIB001      ECMLIBBASE + 1
#define ECMLIB002      ECMLIBBASE + 2
#define ECMLIB003      ECMLIBBASE + 3
#define ECMLIB004      ECMLIBBASE + 4
#define ECMLIB005      ECMLIBBASE + 5
#define ECMLIB006      ECMLIBBASE + 6
#define ECMLIB007      ECMLIBBASE + 7

#define CMLIBERR(_eCode, _eVal, _eDesc) \
    SLogError ((Ent) 0, (Inst)0, (ProcId)0, __FILE__, __LINE__, \
               (ErrCls)ERRCLS_DEBUG, (ErrCode)_eCode, (ErrVal) _eVal, \
               (Txt *) _eDesc)
#else
#define CMLIBERR(_eCode, _eVal, _eDesc)
#endif


/*
*
*       Fun:   cmMemcpy
*
*       Desc:  common primitive to copy a contiguous string of bytes
*              optimized for when memcpy is available. It uses memcpy
*              when available. Otherwise, copies in a 'for' loop.
*
*              sets "len" memory locations starting from "tgt" to the values
*              of corresponding memory locations starting from "src".
*
*       Ret:   pointer to target string
*
*       Notes: None
*
*       File:  cm_lib.c
*
*/
#ifdef ANSI
PUBLIC U8 *cmMemcpy
(
U8           *tgt,
CONSTANT U8  *src,
PTR          len
)
#else
PUBLIC U8 *cmMemcpy(tgt, src, len)
U8           *tgt;
CONSTANT U8  *src;
PTR          len;
#endif
{
#if (MEMCPY_AVAIL) /* memcpy is available */
   RETVALUE((U8 *) memcpy((Void *)tgt, (CONSTANT Void *)src, (size_t)len));
#else
   while (len--)
      *tgt++ = *src++;

   RETVALUE(tgt);
#endif /* MEMCPY_AVAIL */

} /* end of cmMemcpy */


/*
*
*       Fun:   cmMemcmp
*
*       Desc:  common primitive to compare a contiguous string of bytes
*              optimized for when memcmp is available. It uses memcmp
*              when available. Otherwise, compares in a 'for' loop.
*
*       Ret:    < 0 => s1 < s2
*               > 0 => s1 > s2
*               = 0 => s1 = s2
*
*       Notes: None
*
*       File:  cm_lib.c
*
*/
#ifdef ANSI
PUBLIC S16 cmMemcmp
(
CONSTANT U8     *s1,
CONSTANT U8     *s2,
PTR             len
)
#else
PUBLIC S16 cmMemcmp (s1, s2, len)
CONSTANT U8     *s1;
CONSTANT U8     *s2;
PTR             len;
#endif
{
#if MEMCMP_AVAIL /* memcmp is available */
   RETVALUE((S16) memcmp((CONSTANT Void *)s1, (CONSTANT Void *)s2, (size_t)len));
#else  /* MEMCMP_AVAIL: memcmp is not available */
   while (len--)
   {
      if (*s1 ^ *s2)
         RETVALUE((S16) (*s1 - *s2));
      s1++;
      s2++;
   }
   RETVALUE(0);
#endif /* MEMCMP_AVAIL */
} /* end of cmMemcmp */


/*
*
*       Fun:   cmMemset
*
*       Desc:  common primitive to set a contiguous string of bytes
*              with a specified value optimized for when memset is available.
*              It uses memset when available. Otherwise, uses a 'for' loop.
*
*              sets "len" memory locations starting from "str" to the value
*              "val".
* 
*       Ret:   pointer to string
*
*       Notes: None
*
*       File:  cm_lib.c

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品免费观看视频| 成人激情开心网| 一区二区在线免费观看| 国产欧美一区二区精品婷婷| 久久综合99re88久久爱| 精品美女在线播放| 精品处破学生在线二十三| 精品区一区二区| 久久人人超碰精品| 久久久不卡影院| 国产偷国产偷亚洲高清人白洁 | 日韩免费观看高清完整版| 欧美肥大bbwbbw高潮| 在线成人午夜影院| 欧美电视剧在线看免费| 亚洲精品在线三区| 欧美激情在线免费观看| 国产精品久久久久久久裸模| 1区2区3区精品视频| 亚洲情趣在线观看| 亚洲福利一区二区三区| 日韩综合在线视频| 美女视频网站久久| 国产裸体歌舞团一区二区| 国产一区999| 成人的网站免费观看| 91婷婷韩国欧美一区二区| 在线免费观看一区| 7878成人国产在线观看| 精品久久久久久综合日本欧美| 精品国产欧美一区二区| 中文字幕av免费专区久久| 综合自拍亚洲综合图不卡区| 亚洲午夜久久久久| 久久国产人妖系列| 成人免费视频播放| 美腿丝袜亚洲色图| 高清国产一区二区| 欧美在线你懂得| 日韩一区二区三区四区| 日本一区二区不卡视频| 亚洲一区二区三区爽爽爽爽爽| 三级久久三级久久| 成人一区二区三区中文字幕| 欧美视频你懂的| 精品国产91亚洲一区二区三区婷婷 | 国产一区激情在线| 91丨porny丨蝌蚪视频| 欧美精品九九99久久| 欧美精彩视频一区二区三区| 亚洲午夜在线电影| 国产精品自产自拍| 欧美三级乱人伦电影| 久久在线观看免费| 香蕉加勒比综合久久| 国产在线麻豆精品观看| 91国产免费看| 337p日本欧洲亚洲大胆精品| 亚洲精品乱码久久久久久久久 | 国产不卡在线播放| 欧美日韩日日摸| 国产精品视频第一区| 图片区小说区国产精品视频| 成人夜色视频网站在线观看| 欧美一级高清大全免费观看| 亚洲精品你懂的| 国产盗摄精品一区二区三区在线 | 成人av小说网| 欧美成人女星排名| 亚洲午夜在线观看视频在线| 国产91丝袜在线播放九色| 91麻豆精品国产91久久久资源速度| 亚洲国产经典视频| 久久国产精品免费| 欧美日韩视频第一区| 亚洲私人黄色宅男| 国产高清精品久久久久| 欧美久久久久免费| 亚洲精品乱码久久久久久久久| 国产综合一区二区| 欧美一级在线观看| 一区二区三区久久久| 成人免费毛片app| 久久中文字幕电影| 久久99国产乱子伦精品免费| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产日韩精品一区二区三区 | 狠狠色丁香九九婷婷综合五月| 欧美午夜精品一区二区三区| 一区二区中文视频| 成人黄色大片在线观看| 久久久午夜电影| 激情av综合网| 精品国产乱码久久久久久免费| 亚洲第一主播视频| 欧美亚一区二区| 亚洲免费电影在线| aaa国产一区| ...中文天堂在线一区| 懂色av一区二区三区蜜臀 | 麻豆精品在线视频| 欧美日韩精品欧美日韩精品一 | 欧美岛国在线观看| 日韩影视精彩在线| 欧美丰满少妇xxxbbb| 五月天婷婷综合| 欧美视频中文字幕| 亚洲午夜在线视频| 欧美猛男男办公室激情| 亚洲国产日韩a在线播放性色| 一本大道久久a久久精品综合| 亚洲欧洲日韩一区二区三区| 99视频国产精品| 1024亚洲合集| 欧美主播一区二区三区| 亚洲国产精品一区二区久久 | 欧美午夜一区二区三区| 一区二区三区四区不卡在线| 在线视频一区二区免费| 亚洲人成伊人成综合网小说| 中文一区二区在线观看| 成人一区二区三区在线观看| 国产精品卡一卡二卡三| 色婷婷av一区二区三区gif| 亚洲国产精品影院| 日韩欧美中文一区| 国产成人aaa| 亚洲视频1区2区| 欧美午夜视频网站| 久久99国产精品成人| 国产日韩一级二级三级| 99re亚洲国产精品| 亚洲一区二区影院| 这里只有精品免费| 国产福利一区二区三区| 自拍偷拍国产精品| 欧美麻豆精品久久久久久| 久久精品国产精品亚洲综合| 欧美国产日韩在线观看| 色综合 综合色| 日本vs亚洲vs韩国一区三区二区| 26uuu亚洲| 色老汉av一区二区三区| 奇米色一区二区| 中文字幕av一区 二区| 中文字幕亚洲一区二区va在线| 色8久久精品久久久久久蜜| 麻豆一区二区三| 中文字幕日韩精品一区| 7777精品伊人久久久大香线蕉完整版 | 奇米四色…亚洲| 中文字幕不卡的av| 制服丝袜中文字幕一区| 成人免费不卡视频| 首页综合国产亚洲丝袜| 亚洲国产精品ⅴa在线观看| 欧美久久久影院| av色综合久久天堂av综合| 免费观看久久久4p| 亚洲青青青在线视频| 欧美mv日韩mv| 欧美午夜精品免费| 国产成人免费视频网站 | 日韩高清不卡一区| 日本一区二区视频在线观看| 欧美欧美午夜aⅴ在线观看| 国产91精品一区二区麻豆网站| 亚洲18色成人| 国产三级欧美三级日产三级99| 欧美午夜电影网| 成人午夜又粗又硬又大| 日本美女一区二区三区| 亚洲欧美综合另类在线卡通| 欧美xxxxxxxx| 欧美高清一级片在线| aa级大片欧美| 国产成人亚洲综合a∨猫咪| 强制捆绑调教一区二区| 亚洲欧美激情在线| 国产日本欧洲亚洲| 欧美大片一区二区三区| 在线精品视频一区二区三四| 欧美一区二区精品| 亚洲高清中文字幕| 国产精品美日韩| 成人v精品蜜桃久久一区| 亚洲欧美日韩中文字幕一区二区三区| 激情综合网av| 26uuu成人网一区二区三区| 成人午夜视频在线| 亚洲一区二区视频在线| aaa国产一区| 欧美一级免费大片| 韩国女主播成人在线观看| 亚洲第一av色| 欧美不卡在线视频| 一本久久a久久免费精品不卡| 久久天堂av综合合色蜜桃网| 欧美亚洲国产一区在线观看网站 | 91久久线看在观草草青青|