3 This program generates the "times.h" file with the zulu-times of the first of
4 every month of a decade.
7 /****************************************************************
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 ****************************************************************/
27 static time_t GetDay(int D,int M,int Y)
44 static int WeekGetDay(int D,int M,int Y)
69 file=fopen("times.h","w");
74 fprintf(file,"static time_t TimeDays[10][13] = { \n");
83 fprintf(file,"%i",(int)GetDay(1,M,Y));
89 fprintf(file,"%i } ",(int)GetDay(1,0,Y+1));
90 if (Y!=2006) fprintf(file,",");
96 fprintf(file,"static int WeekDays[10][13] = { \n");
105 fprintf(file,"%i",(int)WeekGetDay(1,M,Y));
111 fprintf(file,"%i } ",(int)WeekGetDay(1,0,Y+1));
112 if (Y!=2006) fprintf(file,",");
116 fprintf(file,"};\n");
117 fprintf(file,"#define KHTTPD_YEAROFFSET 1997\n");
118 fprintf(file,"#define KHTTPD_NUMYEARS 10\n");