calendar.c (306a501f3520479370df138f56bb5ef612944c59) calendar.c (fa1837702339667092ca19afec47972849aa88fb)
1/*-
2 * Copyright (c) 1997 Wolfgang Helbig
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1997 Wolfgang Helbig
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id$
26 * $Id: calendar.c,v 1.1.1.1 1997/12/04 10:41:49 helbig Exp $
27 */
28
29#include "calendar.h"
30
31#ifndef NULL
32#define NULL 0
33#endif
34

--- 6 unchanged lines hidden (view full) ---

41 * Gregorian calendar.
42 */
43static int const month1[] =
44 {0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 337};
45 /* M A M J J A S O N D J */
46static int const month1s[]=
47 {0, 31, 61, 92, 122, 153, 184, 214, 235, 265, 296, 327};
48
27 */
28
29#include "calendar.h"
30
31#ifndef NULL
32#define NULL 0
33#endif
34

--- 6 unchanged lines hidden (view full) ---

41 * Gregorian calendar.
42 */
43static int const month1[] =
44 {0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 337};
45 /* M A M J J A S O N D J */
46static int const month1s[]=
47 {0, 31, 61, 92, 122, 153, 184, 214, 235, 265, 296, 327};
48
49typedef struct date date;
50
49/* The last day of Julian calendar, in internal and ndays representation */
50static int nswitch; /* The last day of Julian calendar */
51static date jiswitch = {1582, 7, 3};
52
53static date *date2idt(date *idt, date *dt);
54static date *idt2date(date *dt, date *idt);
55static int ndaysji(date *idt);
56static int ndaysgi(date *idt);

--- 271 unchanged lines hidden ---
51/* The last day of Julian calendar, in internal and ndays representation */
52static int nswitch; /* The last day of Julian calendar */
53static date jiswitch = {1582, 7, 3};
54
55static date *date2idt(date *idt, date *dt);
56static date *idt2date(date *dt, date *idt);
57static int ndaysji(date *idt);
58static int ndaysgi(date *idt);

--- 271 unchanged lines hidden ---