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

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

?? strftime.c

?? C標準庫源代碼,能提高對C的理解,不錯的哦
?? C
?? 第 1 頁 / 共 3 頁
字號:
/***
*strftime.c - String Format Time
*
*       Copyright (c) 1988-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
*
*******************************************************************************/

#ifdef _MAC
#define _WLM_NOFORCE_LIBS
#include <windows.h>
#ifdef _WIN32
#undef  _WIN32  /* windows.h should NOT set _WIN32 */
#endif  /* _WIN32 */
/* The following two TYPEDEFs are NOT defined in <windows.h> for the Mac */
typedef DWORD LCTYPE;           /* from windows.h */
typedef int mbstate_t;          /* from wchar.h */
#endif  /* _MAC */

#include <cruntime.h>
#include <internal.h>
#include <mtdll.h>
#include <time.h>
#include <locale.h>
#include <setlocal.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <xlocinfo.h>

/* Prototypes for local routines */
static void __cdecl _expandtime (char specifier, const struct tm *tmptr,
        char **out, size_t *count, struct __lc_time_data *lc_time);
static void __cdecl _store_str (char *in, char **out, size_t *count);
static void __cdecl _store_num (int num, int digits, char **out, size_t *count);
static void __cdecl _store_number (int num, char **out, size_t *count);
static void __cdecl _store_winword (const char *format, const struct tm *tmptr, char **out, size_t *count, struct __lc_time_data *lc_time);


/* LC_TIME data for local "C" */

__declspec(selectany) struct __lc_time_data __lc_time_c = {

        {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},

        {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
                "Friday", "Saturday", },

        {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
                "Sep", "Oct", "Nov", "Dec"},

        {"January", "February", "March", "April", "May", "June",
                "July", "August", "September", "October",
                "November", "December"},

        {"AM", "PM"}

        , { "M/d/yy" }
        , { "dddd, MMMM dd, yyyy" }
        , { "H:mm:ss" }
        };

/* Pointer to the current LC_TIME data structure. */

struct __lc_time_data *__lc_time_curr = &__lc_time_c;

/* Flags */
unsigned __alternate_form;
unsigned __no_lead_zeros;

#define TIME_SEP        ':'

/*      get a copy of the current day names */
char * __cdecl _Getdays (
        void
        )
{
        const struct __lc_time_data *pt = __lc_time_curr;
        size_t n, len = 0;
        char *p;

        for (n = 0; n < 7; ++n)
                len += strlen(pt->wday_abbr[n]) + strlen(pt->wday[n]) + 2;
        p = (char *)malloc(len + 1);

        if (p != 0) {
                char *s = p;

                for (n = 0; n < 7; ++n) {
                        *s++ = TIME_SEP;
                        s += strlen(strcpy(s, pt->wday_abbr[n]));
                        *s++ = TIME_SEP;
                        s += strlen(strcpy(s, pt->wday[n]));
                }
                *s++ = '\0';
        }

        return (p);
}

/*      get a copy of the current month names */
char * __cdecl _Getmonths (
        void
        )
{
        const struct __lc_time_data *pt = __lc_time_curr;
        size_t n, len = 0;
        char *p;

        for (n = 0; n < 12; ++n)
                len += strlen(pt->month_abbr[n]) + strlen(pt->month[n]) + 2;
        p = (char *)malloc(len + 1);

        if (p != 0) {
                char *s = p;

                for (n = 0; n < 12; ++n) {
                        *s++ = TIME_SEP;
                        s += strlen(strcpy(s, pt->month_abbr[n]));
                        *s++ = TIME_SEP;
                        s += strlen(strcpy(s, pt->month[n]));
                }
                *s++ = '\0';
        }

        return (p);
}

/*      get a copy of the current time locale information */
void * __cdecl _Gettnames (
        void
        )
{
        const struct __lc_time_data *pt = __lc_time_curr;
        size_t n, len = 0;
        void *p;

        for (n = 0; n < 7; ++n)
                len += strlen(pt->wday_abbr[n]) + strlen(pt->wday[n]) + 2;
        for (n = 0; n < 12; ++n)
                len += strlen(pt->month_abbr[n]) + strlen(pt->month[n]) + 2;
        len += strlen(pt->ampm[0]) + strlen(pt->ampm[1]) + 2;
        len += strlen(pt->ww_sdatefmt) + 1;
        len += strlen(pt->ww_ldatefmt) + 1;
        len += strlen(pt->ww_timefmt) + 1;
        p = malloc(sizeof (*pt) + len);

        if (p != 0)
                {struct __lc_time_data *pn = (struct __lc_time_data *)p;
                char *s = (char *)p + sizeof (*pt);

                memcpy(p, __lc_time_curr, sizeof (*pt));
                for (n = 0; n < 7; ++n)
                        {pn->wday_abbr[n] = s;
                        s += strlen(strcpy(s, pt->wday_abbr[n])) + 1;
                        pn->wday[n] = s;
                        s += strlen(strcpy(s, pt->wday[n])) + 1; }
                for (n = 0; n < 12; ++n)
                        {pn->month_abbr[n] = s;
                        s += strlen(strcpy(s, pt->month_abbr[n])) + 1;
                        pn->month[n] = s;
                        s += strlen(strcpy(s, pt->month[n])) + 1; }
                pn->ampm[0] = s;
                s += strlen(strcpy(s, pt->ampm[0])) + 1;
                pn->ampm[1] = s;
                s += strlen(strcpy(s, pt->ampm[1])) + 1;
                pn->ww_sdatefmt = s;
                s += strlen(strcpy(s, pt->ww_sdatefmt)) + 1;
                pn->ww_ldatefmt = s;
                s += strlen(strcpy(s, pt->ww_ldatefmt)) + 1;
                pn->ww_timefmt = s; }

        return (p);
}


/***
*size_t strftime(string, maxsize, format, timeptr) - Format a time string
*
*Purpose:
*       Place characters into the user's output buffer expanding time
*       format directives as described in the user's control string.
*       Use the supplied 'tm' structure for time data when expanding
*       the format directives.
*       [ANSI]
*
*Entry:
*       char *string = pointer to output string
*       size_t maxsize = max length of string
*       const char *format = format control string
*       const struct tm *timeptr = pointer to tb data structure
*
*Exit:
*       !0 = If the total number of resulting characters including the
*       terminating null is not more than 'maxsize', then return the
*       number of chars placed in the 'string' array (not including the
*       null terminator).
*
*       0 = Otherwise, return 0 and the contents of the string are
*       indeterminate.
*
*Exceptions:
*
*******************************************************************************/

size_t __cdecl strftime (
        char *string,
        size_t maxsize,
        const char *format,
        const struct tm *timeptr
        )
{
        return (_Strftime(string, maxsize, format, timeptr, 0));
}

/***
*size_t _Strftime(string, maxsize, format,
*       timeptr, lc_time) - Format a time string for a given locale
*
*Purpose:
*       Place characters into the user's output buffer expanding time
*       format directives as described in the user's control string.
*       Use the supplied 'tm' structure for time data when expanding
*       the format directives. use the locale information at lc_time.
*       [ANSI]
*
*Entry:
*       char *string = pointer to output string
*       size_t maxsize = max length of string
*       const char *format = format control string
*       const struct tm *timeptr = pointer to tb data structure
*               struct __lc_time_data *lc_time = pointer to locale-specific info
*                       (passed as void * to avoid type mismatch with C++)
*
*Exit:
*       !0 = If the total number of resulting characters including the
*       terminating null is not more than 'maxsize', then return the
*       number of chars placed in the 'string' array (not including the
*       null terminator).
*
*       0 = Otherwise, return 0 and the contents of the string are
*       indeterminate.
*
*Exceptions:
*
*******************************************************************************/

size_t __cdecl _Strftime (
        char *string,
        size_t maxsize,
        const char *format,
        const struct tm *timeptr,
                void *lc_time_arg
        )
{
        struct __lc_time_data *lc_time = lc_time_arg == 0 ? __lc_time_curr
            : (struct __lc_time_data *)lc_time_arg;

        size_t left;                    /* space left in output string */
#ifdef _MT
        int local_lock_flag;
#endif  /* _MT */

        /* Copy maxsize into temp. */
        left = maxsize;

        _lock_locale( local_lock_flag )

        /* Copy the input string to the output string expanding the format
        designations appropriately.  Stop copying when one of the following
        is true: (1) we hit a null char in the input stream, or (2) there's
        no room left in the output stream. */

        while (left > 0)
        {
                switch(*format)
                {

                case('\0'):

                        /* end of format input string */
                        goto done;

                case('%'):

                        /* Format directive.  Take appropriate action based
                        on format control character. */

                        format++;                       /* skip over % char */

                        /* process flags */
                        __alternate_form = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美伦理影视网| 一区二区三区在线高清| 国产精品国产三级国产普通话三级| 国产精品沙发午睡系列990531| 欧美高清在线一区二区| 丝袜美腿亚洲一区二区图片| 国产乱码字幕精品高清av| 9人人澡人人爽人人精品| 欧美猛男超大videosgay| 国产三区在线成人av| 亚洲老司机在线| 国产专区欧美精品| 色综合一区二区三区| 欧美tickling挠脚心丨vk| 日韩一区有码在线| 麻豆91在线播放免费| 色综合一区二区三区| 精品国产乱码久久久久久久| 亚洲欧美另类图片小说| 久久99久久99精品免视看婷婷| 91免费版在线看| 久久久久久亚洲综合影院红桃| 亚洲精品成人在线| 国产精品性做久久久久久| 9191成人精品久久| 亚洲三级在线看| 国产美女在线观看一区| 欧美老女人在线| 一区二区三区四区蜜桃| 国产成a人亚洲| 日韩欧美在线影院| 亚洲国产精品欧美一二99| 粉嫩av一区二区三区在线播放| 日韩一区二区三区三四区视频在线观看| 亚洲欧洲日产国产综合网| 九九热在线视频观看这里只有精品| 在线观看精品一区| 中文字幕亚洲在| 高清不卡在线观看av| 欧美成人综合网站| 日本美女一区二区| 欧美久久高跟鞋激| 偷拍日韩校园综合在线| 欧美亚洲高清一区二区三区不卡| 国产精品蜜臀av| 成人视屏免费看| 国产精品美女久久久久久久网站| 国产成人三级在线观看| 久久女同互慰一区二区三区| 激情亚洲综合在线| 欧美r级在线观看| 国产一区二区女| 久久久久久久久99精品| 国产精品一区二区在线看| 久久久久青草大香线综合精品| 久久精品理论片| 日韩欧美激情在线| 极品少妇xxxx精品少妇| 久久色在线视频| 国产iv一区二区三区| 国产精品拍天天在线| 成人毛片视频在线观看| 国产精品国产a| 91久久精品日日躁夜夜躁欧美| 亚洲美女在线一区| 欧美日韩一区二区三区四区五区| 亚洲电影欧美电影有声小说| 欧美日韩精品福利| 亚洲精品国久久99热| 欧美日本在线观看| 免费不卡在线观看| 久久精品一区二区三区四区| 成人影视亚洲图片在线| 亚洲精品欧美综合四区| 欧美日韩在线播放三区| 麻豆91在线播放| 久久精品亚洲国产奇米99| 99在线精品观看| 视频一区在线视频| 欧美激情一区不卡| 日本黄色一区二区| 久久超碰97中文字幕| 中文字幕乱码日本亚洲一区二区 | 色欧美88888久久久久久影院| 夜夜爽夜夜爽精品视频| 欧美一级搡bbbb搡bbbb| 成人综合激情网| 亚欧色一区w666天堂| 久久精品日产第一区二区三区高清版 | 在线视频综合导航| 蜜桃视频一区二区三区在线观看| 中文天堂在线一区| 欧美日韩亚洲国产综合| 国产福利不卡视频| 五月婷婷综合在线| 欧美经典一区二区三区| 欧美天天综合网| 国产精品456| 午夜视频在线观看一区| 国产精品伦一区二区三级视频| 欧美三级欧美一级| 成人精品一区二区三区四区| 日本中文字幕一区| 亚洲乱码国产乱码精品精小说 | 日本亚洲三级在线| 亚洲图片你懂的| 久久久99久久精品欧美| 欧美日韩国产电影| 91在线小视频| 国产成人在线电影| 精品在线一区二区三区| 天天综合日日夜夜精品| 国产精品电影一区二区三区| 精品国产不卡一区二区三区| 欧美日韩精品福利| 日本高清不卡视频| 99久久精品一区| 波多野结衣中文字幕一区 | 亚洲国产精品av| 精品国产乱码久久久久久1区2区 | 日韩写真欧美这视频| 91看片淫黄大片一级在线观看| 激情久久久久久久久久久久久久久久| 午夜电影久久久| 亚洲va欧美va人人爽| 一区二区三区在线不卡| 亚洲欧洲国产日韩| 日韩美女久久久| 中文字幕视频一区二区三区久| 久久久精品影视| 国产欧美一区二区精品性| 精品福利二区三区| 日韩精品一区二区三区中文不卡| 91精品国产一区二区三区香蕉 | 国产成人av福利| 国产一区二区三区在线观看免费 | 香蕉久久一区二区不卡无毒影院 | 国产精品77777| 国产.欧美.日韩| 成人99免费视频| 99国产欧美另类久久久精品| thepron国产精品| 91视频国产资源| 欧美最猛黑人xxxxx猛交| 在线观看成人小视频| 欧美无乱码久久久免费午夜一区 | 成人av一区二区三区| kk眼镜猥琐国模调教系列一区二区| 国产成人免费网站| 成年人网站91| 欧美色综合久久| 欧美精品乱码久久久久久| 678五月天丁香亚洲综合网| 日韩女优制服丝袜电影| 精品福利视频一区二区三区| 欧美国产激情一区二区三区蜜月| 国产精品天干天干在观线| 1024国产精品| 日韩在线a电影| 激情深爱一区二区| 99re成人精品视频| 欧美剧在线免费观看网站| 日韩一区二区在线播放| 国产精品青草久久| 五月天婷婷综合| 国产精品一二三四五| 色综合天天综合网天天狠天天| 欧美电影影音先锋| 国产日韩av一区二区| 亚洲激情在线播放| 麻豆精品精品国产自在97香蕉| 懂色av噜噜一区二区三区av| 欧美性受xxxx黑人xyx性爽| 日韩欧美高清在线| 1024精品合集| 久久99国产精品久久| 一本大道av伊人久久综合| 日韩欧美国产综合| 亚洲乱码国产乱码精品精可以看| 免费美女久久99| av一区二区三区四区| 欧美人xxxx| 欧美激情中文字幕| 欧美极品xxx| 日本在线观看不卡视频| 国产91丝袜在线播放九色| 在线国产电影不卡| 精品国免费一区二区三区| 欧美高清在线视频| 日韩av一区二区三区| 99久久久久免费精品国产| 久久久久九九视频| 久久精品国产久精国产爱| 欧美在线免费播放| 一区二区三区四区中文字幕| 91原创在线视频| 亚洲人妖av一区二区| 99精品国产91久久久久久| 国产精品视频免费| av日韩在线网站|