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

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

?? ansitime.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
    const time_t timer,		/* time represented as seconds from epoch */    struct tm *  tmp		/* pointer to broken-down time structure */    )    {    long	days;    long	timeOfDay;    long	year;    long	mon;    ldiv_t	result;     /* Calulate number of days since epoch */    days = timer / SECSPERDAY;    timeOfDay = timer % SECSPERDAY;    /* If time of day is negative, subtract one day, and add SECSPERDAY     * to make it positive.     */    if(timeOfDay<0)    	{	timeOfDay+=SECSPERDAY;	days-=1;    	}    /* Calulate number of years since epoch */    year = days / DAYSPERYEAR;    while ( __daysSinceEpoch (year, 0) > days )    	year--;    /* Calulate the day of the week */    tmp->tm_wday = (days + EPOCH_WDAY) % DAYSPERWEEK;	/*	 * If there is a negative weekday, add DAYSPERWEEK to make it positive	 */	if(tmp->tm_wday<0)		tmp->tm_wday+=DAYSPERWEEK;    /* Find year and remaining days */    days -= __daysSinceEpoch (year, 0);    year += EPOCH_YEAR;    /* Find month */    /* __jullday needs years since TM_YEAR_BASE (SPR 4251) */    for  ( mon = 0;          (days >= __julday (year - TM_YEAR_BASE, mon + 1, 0)) && (mon < 11);          mon++ )	;    /* Initialise tm structure */    tmp->tm_year = year - TM_YEAR_BASE; /* years since 1900 */    tmp->tm_mon  = mon;    tmp->tm_mday = (days - __julday (tmp->tm_year, mon, 0)) + 1;    tmp->tm_yday = __julday (tmp->tm_year, mon, tmp->tm_mday) - 1;    tmp->tm_hour = timeOfDay / SECSPERHOUR;    timeOfDay  %= SECSPERHOUR;    ldiv_r (timeOfDay, SECSPERMIN, &result);    tmp->tm_min = result.quot;    tmp->tm_sec = result.rem;    return(OK);    }/**************************************************************************  daysSinceEpoch - calculate number days since ANSI C epoch                 * *  The (year + 1)/4 term accounts for leap years, the     *  first of which was 1972 & should be added starting '73 * * RETURNS:* NOMANUAL*/int __daysSinceEpoch    (     int year,	/* Years since epoch */    int yday 	/* days since Jan 1  */    )    {	if(year>=0) /* 1970 + */    	return ( (365 * year) + (year + 1) / 4  + yday );	else		/* 1969 - */    	return ( (365 * year) + (year - 2) / 4  + yday );    } /************************************************************************** julday - calculate Julian Day given year, month, day            *              Inputs      : year (years since 1900), month (0 - 11), *     			     day (1 - 31)  *              Comment     : Returns Julian day in range 1:366.  *			     Unix wants 0:365 * RETURNS: Julian day                                            * NOMANUAL*/int __julday    (     int yr, /* year */    int mon, /* month */    int day /* day */    )    {    static jdays[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};    int leap = 0;    if (isleap (yr + TM_YEAR_BASE))	{	/*	 * If it is a leap year, leap only gets set if the day is	 * after beginning of March (SPR #4251).	 */	if (mon > 1)	    leap = 1;	}    return (jdays [mon] + day + leap );    }/* localtime.c - localtime routine for the ANSI time library *//* Copyright 1992-1996 Wind River Systems, Inc. *//*modification history--------------------01d,20jun96,dbt  corrected localtime_r (SPR #2521).		 timeBuffer must be initialized before a call of __getDstInfo.		 Updated copyright.01c,05feb93,jdi  documentation cleanup for 5.1.01b,20sep92,smb  documentation additions01a,25jul92,smb  written.*//*  DESCRIPTION    INCLUDE FILE: time.h, stdlib.h   SEE ALSO: American National Standard X3.159-1989 NOMANUAL*/#include "vxWorks.h"#include "time.h"#include "stdlib.h"#include "private/timeP.h"extern TIMELOCALE *__loctime;	/* time locale information *//****************************************************************************** localtime - convert calendar time into broken-down time (ANSI)** This routine converts the calendar time pointed to by <timer> into* broken-down time, expressed as local time.** This routine is not reentrant.  For a reentrant version, see localtime_r().** INCLUDE FILES: time.h** RETURNS: * A pointer to a `tm' structure containing the local broken-down time.*/struct tm *localtime    (    const time_t * timer 	/* calendar time in seconds */    )    {    static struct tm timeBuffer;    localtime_r (timer, &timeBuffer);    return (&timeBuffer);    }/****************************************************************************** localtime_r - convert calendar time into broken-down time (POSIX)** This routine converts the calendar time pointed to by <timer> into* broken-down time, expressed as local time.  The broken-down time is* stored in <timeBuffer>.** This routine is the POSIX re-entrant version of localtime().** INCLUDE FILES: time.h** RETURNS: OK.*/int localtime_r    (    const time_t * timer, 	/* calendar time in seconds */    struct tm *    timeBuffer	/* buffer for the broken-down time */    )    {    char zoneBuf [sizeof (ZONEBUFFER)];    int  dstOffset;    /* First get the zone info */    __getZoneInfo(zoneBuf, TIMEOFFSET, __loctime);    /* Generate a broken-down time structure */    __getTime (*timer - ((atoi (zoneBuf)) * SECSPERMIN), timeBuffer);    /* is Daylight Saving Time in effect ? */    dstOffset  = __getDstInfo (timeBuffer,__loctime);    timeBuffer->tm_isdst = dstOffset;    /* Correct the broken-down time structure if necessary */    if (dstOffset)	__getTime ((*timer - ((atoi (zoneBuf)) * SECSPERMIN))				+ (dstOffset * SECSPERHOUR), timeBuffer);    return (OK);                 /* __getTime always returns OK */    }/* mktime.c - mktime file for time  *//* Copyright 1992-1996 Wind River Systems, Inc. *//*modification history--------------------01f,30jul96,dbt  In function mktime, if tm_isdst flag is true substract one 		 hour from timeIs (SPR #6954). 		 Updated copyright.01e,25jul96,dbt  fixed warnings in mktime.c.01d,24sep93,jmm  _tmValidate() calls _julday() with the tm_mday parameter01c,05feb93,jdi  documentation cleanup for 5.1.01b,20sep92,smb  documentation additions01a,25jul92,smb  written.*//*  DESCRIPTION    INCLUDE FILE: time.h, stdlib.h   SEE ALSO: American National Standard X3.159-1989 NOMANUAL*/#include "vxWorks.h"#include "time.h"#include "stdlib.h"#include "private/timeP.h"extern TIMELOCALE *__loctime; /* locale time structure *//* LOCAL */LOCAL void __tmNormalize (int *,int *,int);LOCAL void __tmValidate (struct tm *); /********************************************************************************* mktime - convert broken-down time into calendar time (ANSI)** This routine converts the broken-down time, expressed as local time, in* the structure pointed to by <timeptr> into a calendar time value with the* same encoding as that of the values returned by the time() function.  The* original values of the `tm_wday' and `tm_yday' components of the `tm'* structure are ignored, and the original values of the other components are* not restricted to the ranges indicated in time.h.  On successful completion,* the values of `tm_wday' and `tm_yday' are set appropriately, and the other* components are set to represent the specified calendar time, but with* their values forced to the ranges indicated in time.h; the final value of* `tm_mday' is not set until `tm_mon' and `tm_year' are determined.** INCLUDE FILES: time.h** RETURNS:* The calendar time in seconds, or ERROR (-1)* if calendar time cannot be calculated.*/time_t mktime    (    struct tm * timeptr	/* pointer to broken-down structure */    )    {    time_t timeIs = 0;    int    days   = 0;    char   zoneBuf [sizeof (ZONEBUFFER)];    /* Validate tm structure */    __tmValidate (timeptr);    /* Calulate time_t value */    /* time */    timeIs += (timeptr->tm_sec +    	      (timeptr->tm_min * SECSPERMIN) +    	      (timeptr->tm_hour * SECSPERHOUR));    /* date */    days += __julday (timeptr->tm_year, timeptr->tm_mon, timeptr->tm_mday);    timeptr->tm_yday = (days - 1);    if ((timeptr->tm_year + TM_YEAR_BASE) < EPOCH_YEAR )    	return ((time_t) ERROR);    /* days in previous years */    days = __daysSinceEpoch (timeptr->tm_year - (EPOCH_YEAR - TM_YEAR_BASE),    		             timeptr->tm_yday );    timeptr->tm_wday = (days + EPOCH_WDAY) % DAYSPERWEEK;    timeIs += (days * SECSPERDAY);    /* correct for day light saving */    /* validate again for the extra DST hour */    if ((timeptr->tm_isdst = __getDstInfo (timeptr, __loctime)))    	{    	timeIs -= SECSPERHOUR;    	__tmValidate (timeptr);    	}    /* correct for zone offset from UTC */    __getZoneInfo (zoneBuf, TIMEOFFSET, __loctime);    timeIs += (atoi (zoneBuf) * SECSPERMIN);    return(timeIs);    }	/********************************************************************************* __tmValidate - validate the broken-down structure, tmptr.** RETURNS: the validated structure.* NOMANUAL*/LOCAL void __tmValidate    (    struct tm * tmptr	/* pointer to broken-down structure */    )    {    struct tm tmStruct;    int       jday;    int       mon;    /* Adjust timeptr to reflect a legal time     * Is it within range 1970-2038?     */		       tmStruct = *tmptr;    __tmNormalize (&tmStruct.tm_min, &tmStruct.tm_sec, SECSPERMIN);    __tmNormalize (&tmStruct.tm_hour, &tmStruct.tm_min, MINSPERHOUR);    __tmNormalize (&tmStruct.tm_mday, &tmStruct.tm_hour, HOURSPERDAY);    __tmNormalize (&tmStruct.tm_year, &tmStruct.tm_mon, MONSPERYEAR);    /* tm_mday may not be in the correct range - check */    jday = __julday (tmStruct.tm_year, tmStruct.tm_mon , tmStruct.tm_mday);    if (jday < 0)     	{    	tmStruct.tm_year--;    	jday += DAYSPERYEAR;    	}    /* Calulate month and day */    for (mon = 0;          (jday > __julday (tmStruct.tm_year, mon+1, 0)) && (mon < 11);          mon++ )	;    tmStruct.tm_mon  = mon;    tmStruct.tm_mday = jday - __julday (tmStruct.tm_year, mon, 0);    tmStruct.tm_wday = 0;    tmStruct.tm_yday = 0;    *tmptr = tmStruct;    }/********************************************************************************* __tmNormalize - This function is used to reduce units to a range [0,base]*		  tens is used to store the number of times units is divisable*		  by base.** 	total = (tens * base) + units** RETURNS: no value* NOMANUAL*/LOCAL void __tmNormalize    (    int * tens,		/* tens */    int * units,	/* units */    int   base		/* base */    )    {    *tens += *units / base;    *units %= base;    if ((*units % base ) < 0)    	{    	(*tens)--;    	*units += base;    	}    }/* strftime.c - strftime file for time  *//* Copyright 1991-1996 Wind River Systems, Inc. *//*modification history--------------------01i,20jan97,dbt  modified comment concerning seconds (SPR #4436).01h,04oct96,dbt  reworked the fix for SPR #7277.01g,03oct96,dbt  use memcpy with 'strlen + 1' instead of 'strlen' (SPR #7277)01f,27jun96,dbt  corrected __getDstInfo() (spr 2521)	 	 Updated copyright.01g,10feb95,rhp  internal doc tweak from ansiTime.c01f,15sep94,rhp  fixed TIMEZONE example in comment (related to SPR #3490)01e,17aug93,dvs  changed TIME to TIMEO to fix conflicting defines (SPR #2249)01d,05feb93,jdi  documentation cleanup for 5.1.01c,20sep92,smb  documentation additions01b,26jul92,rrr  fixed decl of __weekOfYear to compile on mips.01a,25jul92,smb  written.*//*  DESCRIPTION    INCLUDE FILE: time.h, stdlib.h, string.h, locale.h   SEE ALSO: American National Standard X3.159-1989 NOMANUAL*/#include "vxWorks.h"#include "string.h"#include "stdlib.h"#include "locale.h"#include "private/timeP.h"extern TIMELOCALE * __loctime;		/* time locale information *//* LOCAL */LOCAL size_t strftime_r (char *, size_t, const char *,			 const struct tm *, TIMELOCALE *);LOCAL void   __generateTime (char *, const struct tm *,		             TIMELOCALE *, int *, const char *);LOCAL void   __getDay (char *, int, int, TIMELOCALE *, int *);LOCAL void   __getMonth (char *, int, int, TIMELOCALE *, int *);LOCAL void   __getLocale (char *, int, const struct tm *, TIMELOCALE *, int *);LOCAL void   __intToStr (char *, int, int);LOCAL int    __weekOfYear (int, int, int);/********************************************************************************* strftime - convert broken-down time into a formatted string (ANSI)** This routine formats the broken-down time in <tptr> based on the conversion* specified in the string <format>, and places the result in the string <s>.** The format is a multibyte character sequence, beginning and ending in its* initial state.  The <format> string consists of zero or more conversion* specifiers and ordinary multibyte characters.  A conversion specifier* consists of a % character followed by a character that determines the* behavior of the conversion.  All ordinary multibyte characters (including* the terminating NULL character) are copied unchanged to the array.  If* copying takes place between objects that overlap, the behavior is* undefined.  No more than <n> characters are placed into the array.** Each conversion specifier is replaced by appropriate characters as * described in the following list.  The appropriate characters are determined * by the LC_TIME category of the current locale and by the values contained * in the structure pointed to by <tptr>.** .iP %a* the locale's abbreviated weekday name.* .iP %A* the locale's full weekday name.* .iP %b* the locale's abbreviated month name.* .iP %B* the locale's full month name.* .iP %c* the locale's appropriate date and time representation.* .iP %d* the day of the month as decimal number (01-31).* .iP %H* the hour (24-hour clock) as a decimal number (00-23).* .iP %I* the hour (12-hour clock) as a decimal number (01-12).* .iP %j* the day of the year as decimal number (001-366).* .iP %m* the month as a decimal number (01-12).* .iP %M* the minute as a decimal number (00-59).* .iP %P* the locale's equivalent of the AM/PM * designations associated with a 12-hour clock.* .iP %S* the second as a decimal number (00-59).* .iP %U* the week number of the year (first Sunday* as the first day of week 1) as a decimal number (00-53).* .iP %w* the weekday as a decimal number (0-6), where Sunday is 0.* .iP %W* the week number of the year (the first Monday* as the first day of week 1) as a decimal number (00-53).* .iP %x* the locale's appropriate date representation.* .iP %X* the locale's appropriate time representation.* .iP %y* the year without century as a decimal number (00-99).* .iP %Y* the year with century as a decimal number.* .iP %Z* the time zone name or abbreviation, or by no* characters if no time zone is determinable.* .iP %%* %.* .LP** For any other conversion specifier, the behavior is undefined.** INCLUDE FILES: time.h** RETURNS:* The number of characters in <s>, not including the terminating null* character -- or zero if the number of characters in <s>, including the null* character, is more than <n> (in which case the contents of <s> are* indeterminate).*/size_t strftime    (    char *            s,		/* string array */    size_t            n,		/* maximum size of array */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人亚洲一区二区一| 亚洲一区二区三区美女| 欧美专区在线观看一区| 精品一区二区三区影院在线午夜| 亚洲日本青草视频在线怡红院| 日韩免费在线观看| 欧美丝袜丝交足nylons图片| 成人午夜私人影院| 久久精品国产秦先生| 午夜视频久久久久久| 亚洲人成在线播放网站岛国| 久久午夜老司机| 日韩亚洲欧美一区| 正在播放亚洲一区| 色94色欧美sute亚洲线路一久 | 在线播放91灌醉迷j高跟美女 | 色偷偷成人一区二区三区91| 精品夜夜嗨av一区二区三区| 亚洲丰满少妇videoshd| 最新热久久免费视频| 欧美激情一区在线观看| 久久久精品免费网站| 精品日韩在线一区| 欧美一区二区三区在线观看视频| 欧美系列在线观看| 色丁香久综合在线久综合在线观看| 99在线精品免费| 成熟亚洲日本毛茸茸凸凹| 久久不见久久见免费视频1| 国产精品一卡二| 老司机午夜精品| 蜜桃精品在线观看| 蜜桃一区二区三区在线观看| 免费人成黄页网站在线一区二区| 亚洲国产精品一区二区久久恐怖片 | 久久亚洲综合av| 欧美大片一区二区三区| 日韩视频永久免费| 精品久久久久久久久久久久久久久久久| 制服.丝袜.亚洲.中文.综合| 日韩一区二区在线免费观看| 欧美一区三区二区| 欧美成人精品福利| 久久视频一区二区| 亚洲国产精品精华液ab| 国产精品网站在线| 国产精品超碰97尤物18| 亚洲品质自拍视频| 亚洲成人综合视频| 日韩av一区二区在线影视| 热久久国产精品| 奇米影视一区二区三区| 韩国一区二区三区| 国产成人自拍高清视频在线免费播放| 国产精品亚洲第一| 色综合久久久久久久| 欧美性猛片aaaaaaa做受| 欧美一区二区黄色| 欧美精品一区二区三区蜜桃视频| 久久久久97国产精华液好用吗| 久久久久国色av免费看影院| 国产精品欧美极品| 亚洲第一电影网| 韩国女主播一区| 色综合久久综合网97色综合| 欧美精品在线观看一区二区| 精品91自产拍在线观看一区| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品私房写真福利视频| 一区二区三区视频在线看| 日本sm残虐另类| 成人一区二区三区视频在线观看| 91久久精品午夜一区二区| 日韩一区二区精品在线观看| 欧美韩日一区二区三区| 亚洲精品福利视频网站| 另类欧美日韩国产在线| 91美女视频网站| 国产精品萝li| 日韩精品亚洲一区二区三区免费| 狠狠色丁香婷综合久久| 欧美在线视频全部完| 精品成a人在线观看| 亚洲精品自拍动漫在线| 精彩视频一区二区| 日本乱人伦aⅴ精品| 2021国产精品久久精品| 一区二区三区在线视频观看58| 久久精品噜噜噜成人88aⅴ| 99re热这里只有精品视频| 欧美mv和日韩mv的网站| 亚洲另类一区二区| 国产精品亚洲一区二区三区妖精| 欧美日韩一区二区在线观看视频| 久久精品男人天堂av| 亚洲国产成人91porn| 国产91在线观看| 欧美r级在线观看| 亚洲mv在线观看| av一区二区三区| 久久久久久亚洲综合| 欧美aⅴ一区二区三区视频| 成人av免费在线| 精品理论电影在线| 天天影视网天天综合色在线播放| 91欧美一区二区| 久久久精品蜜桃| 麻豆一区二区在线| 制服丝袜亚洲网站| 亚洲综合清纯丝袜自拍| eeuss鲁片一区二区三区在线观看| 日韩视频国产视频| 婷婷综合久久一区二区三区| 99vv1com这只有精品| 国产清纯白嫩初高生在线观看91 | 亚洲v精品v日韩v欧美v专区| 91麻豆精品在线观看| 国产人成亚洲第一网站在线播放| 久久99九九99精品| 欧美精品日日鲁夜夜添| 一区二区久久久久久| 色香色香欲天天天影视综合网| 国产精品久久久久aaaa樱花| 国产suv精品一区二区三区| 精品久久久久久综合日本欧美 | 麻豆国产欧美日韩综合精品二区| 欧美色爱综合网| 亚洲一区二区精品久久av| 色综合久久综合网欧美综合网| 日韩在线观看一区二区| 欧美亚洲尤物久久| 一区二区免费在线播放| 91精品福利在线| 一区二区三区四区不卡在线| 欧美中文字幕亚洲一区二区va在线 | 日韩精品一区二区三区在线观看 | 亚洲视频资源在线| 91在线精品一区二区| 亚洲欧美一区二区三区极速播放 | 欧洲精品一区二区三区在线观看| 日韩理论片网站| 91传媒视频在线播放| 亚洲香肠在线观看| 制服丝袜日韩国产| 韩日av一区二区| 国产精品久久久久永久免费观看 | 色综合久久88色综合天天免费| 亚洲天堂精品视频| 色94色欧美sute亚洲线路一ni| 亚洲国产精品一区二区久久恐怖片 | 国产尤物一区二区| 久久久不卡影院| av高清久久久| 一区二区三区日本| 欧美电影在哪看比较好| 久久99国产精品久久| 国产精品拍天天在线| 一本色道久久加勒比精品 | 精品伊人久久久久7777人| 久久网站最新地址| 99久久777色| 亚洲成人资源网| 精品成人一区二区三区| 99精品偷自拍| 亚洲成人动漫在线免费观看| 欧美xxxx老人做受| 不卡一区二区三区四区| 一区二区三区四区亚洲| 日韩欧美国产综合| 不卡的av在线| 日韩国产在线观看| 国产精品国产三级国产专播品爱网| 日本精品视频一区二区| 美女任你摸久久| 国产精品久久久久四虎| 欧美日韩午夜在线| 欧美色窝79yyyycom| 久久99精品国产.久久久久久| 亚洲欧洲精品天堂一级| 555www色欧美视频| jizz一区二区| 久久国产生活片100| 亚洲码国产岛国毛片在线| 精品久久久久久综合日本欧美| 一本到高清视频免费精品| 国产综合色在线| 亚洲风情在线资源站| 欧美国产禁国产网站cc| 91精品欧美福利在线观看| 99久久综合国产精品| 久久99久久99小草精品免视看| 亚洲欧美国产毛片在线| 欧美mv日韩mv亚洲| 欧美日韩久久一区二区| 99国产欧美另类久久久精品 | 久久www免费人成看片高清| 樱桃视频在线观看一区| 国产精品女同互慰在线看| 欧美不卡一区二区三区| 欧美色欧美亚洲另类二区|