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

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

?? utility.c

?? gif圖像文件軟件解碼器的arm版本的源代碼程序
?? C
字號:
///////////////////////////////////////////////////////////////////////////////
//
//  utility.c
//
//  DESCRIPTION
//        Define utility functions.
//
//
///////////////////////////////////////////////////////////////////////////////


/*
  Include declarations.
*/

#include "gifcommon.h"

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   L o c a l e N C o m p a r e                                               %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Method LocaleNCompare compares two strings byte-by-byte, according to
%  the ordering of the currnet locale encoding. LocaleNCompare returns an
%  integer greater than, equal to, or less than 0, if the string pointed
%  to by p is greater than, equal to, or less than the string pointed to
%  by q respectively.  The sign of a non-zero return value is determined
%  by the sign of the difference between the values of the first pair of
%  bytes that differ in the strings being compared.  The LocaleNCompare
%  method makes the same comparison as LocaleCompare but looks at a
%  maximum of n bytes.  Bytes following a null byte are not compared.
%
%  The format of the LocaleNCompare method is:
%
%      int LocaleNCompare(const char *p,const char *q,unsigned int n)
%
%  A description of each parameter follows:
%
%    o p: A pointer to a character string.
%
%    o q: A pointer to a character string to compare to p.
%
%    o n: The number of characters to compare in strings p & q.
%
%
*/
int LocaleNCompare
(
    const char      *p,
    const char      *q,
    unsigned int    n
)
{
    register int    i;
    register int    j;

    if (p == q)
    {
        return(0);
    }
    if (p == (char *) OP_NULL)
    {
        return(-1);
    }
    if (q == (char *) OP_NULL)
    {
        return(1);
    }
    while ((*p != '\0') && (*q != '\0'))
    {
        if ((*p == '\0') || (*q == '\0'))
        {
            break;
        }
        i = (*p);
        if (islower(i))
        {
            i = toupper(i);
        }
        j = (*q);
        if (islower(j))
        {
            j = toupper(j);
        }
        if (i != j)
        {
            break;
        }
        n--;
        if (n == 0)
        {
            break;
        }
        p++;
        q++;
    }
    return(toupper(*p)-toupper(*q));
}

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   A l l o c a t e S t r i n g                                               %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Method AllocateString allocates memory for a string and copies the source
%  string to that memory location (and returns it).
%
%  The format of the AllocateString method is:
%
%      char *AllocateString(const char *source)
%
%  A description of each parameter follows:
%
%    o allocated_string:  Method AllocateString returns a copy of the source
%      string.
%
%    o source: A character string.
%
%
*/
char *AllocateString
(
    const char          *source, 
    AllocateMemory      getmemory
)
{
    char            *destination;
    unsigned int    length;

    length = MaxTextExtent;

    if (source != (char *) OP_NULL)
    {
        length += strlen(source);
    }

    destination = (char *) getmemory(length+MaxTextExtent);

    if (destination == (char *) OP_NULL)
    {
        return OP_NULL;
    }

    *destination = '\0';

    if (source != (char *) OP_NULL)
    {
        (void) strcpy(destination, source);
    }

    return(destination);
}

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   C o n c a t e n a t e S t r i n g                                         %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Method ConcatenateString appends a copy of string source, including
%  the terminating null character, to the end of string destination.
%
%  The format of the ConcatenateString method is:
%
%      unsigned int ConcatenateString(char **destination,const char *source)
%
%  A description of each parameter follows:
%
%    o status:  Method ConcatenateString returns True is the string is cloned,
%      otherwise False is returned.
%
%    o destination:  A pointer to a character string.
%
%    o source: A character string.
%
%
*/
unsigned int ConcatenateString
(
    char                **destination,
    const char          *source, 
    AllocateMemory      getmemory, 
    LiberateMemory      freememory
)
{
    if (source == (const char *) OP_NULL)
    {
        return(OP_TRUE);
    }

    ReacquireMemory((void **) &(*destination),
            strlen(*destination)+strlen(source)+MaxTextExtent, getmemory, freememory);

    if (*destination == (char *) OP_NULL)
    {
        return(OP_FALSE);
    }

    (void) strcat(*destination, source);
    
    return(OP_TRUE);
}

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e a c q u i r e M e m o r y                                             %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Regetmemory() changes the size of the memory and returns a
%  pointer to the (possibly moved) block.  The contents will be unchanged
%  up to the lesser of the new and old sizes.
%
%  The format of the Regetmemory method is:
%
%      void Regetmemory(void **memory,const unsigned int size)
%
%  A description of each parameter follows:
%
%    o memory: A pointer to a memory allocation.  On return the pointer
%      may change but the contents of the original allocation will not.
%
%    o size: The new size of the allocated memory.
%
%
*/
void ReacquireMemory
(
    void                    **memory,
    const unsigned int      size, 
    AllocateMemory          getmemory, 
    LiberateMemory          freememory
)
{
    void    *allocation;

    if (*memory == (void *) OP_NULL)
    {
        *memory = getmemory(size);
        return;
    }
    allocation = realloc(*memory,size);
    if (allocation == (void *) OP_NULL)
    {
        freememory((void *) *memory);
    }
    *memory = allocation;
}

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   L o c a l e C o m p a r e                                                 %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Method LocaleCompare compares two strings byte-by-byte, according to
%  the ordering of the current locale encoding. LocaleCompare returns an
%  integer greater than, equal to, or less than 0, if the string pointed
%  to by p is greater than, equal to, or less than the string pointed to
%  by q respectively.  The sign of a non-zero return value is determined
%  by the sign of the difference between the values of the first pair of
%  bytes that differ in the strings being compared.
%
%  The format of the LocaleCompare method is:
%
%      int LocaleCompare(const char *p,const char *q)
%
%  A description of each parameter follows:
%
%    o p: A pointer to a character string.
%
%    o q: A pointer to a character string to compare to p.
%
%
*/
int LocaleCompare
(
    const char      *p,
    const char      *q
)
{
    register int    i;
    register int    j;

    if (p == q)
    {
        return(0);
    }
    if (p == (char *) OP_NULL)
    {
        return(-1);
    }
    if (q == (char *) OP_NULL)
    {
        return(1);
    }
    while ((*p != '\0') && (*q != '\0'))
    {
        i=(*p);
        
        if (islower(i))
        {
            i=toupper(i);
        }
        
        j=(*q);
        
        if (islower(j))
        {
            j=toupper(j);
        }
        
        if (i != j)
        {
            break;
        }
        
        p++;
        q++;
    }
    
    return(toupper(*p)-toupper(*q));
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品美女久久久久久久| 精品一区二区三区免费毛片爱 | 亚洲欧美日韩国产中文在线| 亚洲gay无套男同| 春色校园综合激情亚洲| 欧美成人女星排行榜| 亚洲成国产人片在线观看| 不卡的看片网站| 26uuu精品一区二区在线观看| 亚洲6080在线| 在线观看av一区二区| 欧美国产成人在线| 国产一区在线看| 日韩欧美在线网站| 三级亚洲高清视频| 欧美精品tushy高清| 亚洲无线码一区二区三区| 在线观看91精品国产入口| 中文字幕中文字幕一区| 国产精品1024| 国产视频在线观看一区二区三区| 久久国产尿小便嘘嘘尿| 欧美一级国产精品| 青青国产91久久久久久| 欧美电影在线免费观看| 日韩精品一二三四| 欧美精品日韩一本| 亚洲国产wwwccc36天堂| 欧美色电影在线| 亚洲高清免费在线| 欧美裸体bbwbbwbbw| 午夜亚洲国产au精品一区二区 | 91香蕉视频黄| 亚洲欧洲精品天堂一级| 成人黄色一级视频| 亚洲欧洲精品成人久久奇米网| 9色porny自拍视频一区二区| 18涩涩午夜精品.www| 色狠狠桃花综合| 香蕉久久夜色精品国产使用方法 | 欧美国产在线观看| 91麻豆精品在线观看| 亚洲欧美视频在线观看视频| 欧美视频自拍偷拍| 免费在线看一区| 久久久久久久久一| www.色精品| 亚洲电影一级片| 日韩免费在线观看| 国产99久久久国产精品潘金网站| 国产精品麻豆网站| 欧美美女一区二区| 国产一区 二区 三区一级| 国产精品免费av| 欧美日韩一区精品| 国产麻豆精品在线观看| 一区二区三区丝袜| 日韩一区二区在线观看视频播放| 国产二区国产一区在线观看| 夜夜揉揉日日人人青青一国产精品| 91精品国产乱| 成人aa视频在线观看| 亚洲成人一区二区| 中文字幕第一区综合| 欧美日韩国产一级片| 粉嫩在线一区二区三区视频| 亚洲成人av中文| 国产精品丝袜黑色高跟| 宅男在线国产精品| 成人av动漫网站| 另类小说一区二区三区| 亚洲免费毛片网站| 国产亚洲一本大道中文在线| 欧美亚洲综合在线| 不卡的看片网站| 精品一区二区三区在线视频| 一区二区视频在线| 久久久亚洲精品一区二区三区| 欧美日韩在线播放三区四区| 不卡在线观看av| 麻豆久久久久久| 亚洲午夜免费电影| 最新日韩av在线| 26uuu欧美| 91精品久久久久久久91蜜桃| 一本高清dvd不卡在线观看| 精品一区二区久久久| 午夜视频在线观看一区二区三区| 中文字幕一区日韩精品欧美| 日韩精品一区二区三区在线观看| 欧洲人成人精品| 91一区在线观看| av不卡免费电影| 成人免费毛片a| 国产自产v一区二区三区c| 视频一区二区中文字幕| 亚洲图片欧美视频| 亚洲国产精品欧美一二99| 亚洲欧美视频一区| 国产精品短视频| 国产欧美日韩精品在线| 久久人人97超碰com| 欧美www视频| 精品国产成人在线影院 | 国产精品久久久久久久久免费樱桃 | 欧美吞精做爰啪啪高潮| 色成年激情久久综合| 91视视频在线直接观看在线看网页在线看 | 欧美日本国产视频| 在线观看亚洲精品视频| 91麻豆免费看| 欧美亚洲国产怡红院影院| 一本久道久久综合中文字幕| 色婷婷综合久久久| 欧美日韩精品三区| 欧美一区二区久久| 精品国产一区二区三区久久久蜜月 | **性色生活片久久毛片| 亚洲精品日韩一| 亚洲综合色网站| 日韩二区在线观看| 麻豆视频一区二区| 国产一区二区导航在线播放| 国产成人午夜电影网| 99在线精品视频| 91高清在线观看| 这里只有精品99re| 久久网站热最新地址| 欧美激情一区二区在线| 亚洲欧美偷拍三级| 亚洲一区二区av在线| 日本不卡一区二区三区高清视频| 久久99蜜桃精品| 成人黄色电影在线 | 欧美人xxxx| 26uuu亚洲婷婷狠狠天堂| 国产精品乱码一区二区三区软件| |精品福利一区二区三区| 亚洲国产一区二区三区| 精品一区二区日韩| 91麻豆免费看片| 日韩视频免费观看高清完整版在线观看 | 亚洲乱码一区二区三区在线观看| 一区二区三区精品| 精品一区二区三区免费播放| 99久久精品免费精品国产| 欧美日韩一级二级三级| 久久色.com| 亚洲在线观看免费| 国产激情精品久久久第一区二区| 91啪亚洲精品| 欧美精品一区视频| 亚洲国产你懂的| 国产激情一区二区三区四区 | 亚洲欧洲日本在线| 麻豆一区二区三区| 色欧美片视频在线观看在线视频| 日韩欧美一区电影| 亚洲免费观看高清完整版在线 | 欧美变态凌虐bdsm| 亚洲一区二区三区四区五区黄| 久久97超碰色| 欧美色爱综合网| 最新日韩av在线| 国产永久精品大片wwwapp| 欧美日韩视频在线第一区| 国产欧美一区二区三区在线看蜜臀| 亚洲高清不卡在线观看| 99久久婷婷国产综合精品| 久久午夜色播影院免费高清 | www亚洲一区| 日韩1区2区日韩1区2区| 色婷婷av久久久久久久| 国产精品理论片| 国产成人亚洲综合a∨婷婷图片 | 日韩欧美一区二区三区在线| 一区二区三区自拍| av电影天堂一区二区在线观看| 日韩欧美一区在线| 日本亚洲欧美天堂免费| 欧美猛男超大videosgay| 亚洲人成网站色在线观看| 成人激情午夜影院| 中文字幕免费不卡| 国产成人免费在线| 久久理论电影网| 国产黄色精品网站| 国产午夜精品一区二区三区视频 | 国产精品久久久久三级| 国产不卡在线视频| 久久婷婷久久一区二区三区| 看片网站欧美日韩| 亚洲精品在线观| 精品写真视频在线观看| 日韩精品一区二区三区视频| 热久久久久久久| 欧美成人a在线| 国产毛片精品国产一区二区三区| 久久久久高清精品| 国产激情一区二区三区四区|