/* * Copyright (C) 2001-2003 by egnite Software GmbH. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * For additional information see http://www.ethernut.de/ * */ /* * Some constants for use in time conversion functions. * * $Log$ * Revision 1.2 2003/11/24 18:05:11 drsung * first release * * */ #ifndef __CTIME_H #define __CTIME_H #define _DAY_SEC (24UL * 60UL * 60UL) /* secs in a day */ #define _YEAR_SEC (365L * _DAY_SEC) /* secs in a year */ #define _FOUR_YEAR_SEC (1461L * _DAY_SEC) /* secs in a 4 year interval */ #define _DEC_SEC 315532800UL /* secs in 1970-1979 */ #define _BASE_YEAR 70L /* 1970 is the base year */ #define _BASE_DOW 4 /* 01-01-70 was a Thursday */ #define _LEAP_YEAR_ADJUST 17L /* Leap years 1900 - 1970 */ #define _MAX_YEAR 138L /* 2038 is the max year */ extern int _lpdays[]; extern int _days[]; extern tm _tb; int _isindst(tm * tb); #endif /* __CTIME_H */