1 /*!
2 *  \file hd-data5.c
3 *  \brief All other T-Z countries data which is composed into the
4 *               eternal holiday list.
5 */
6 /*
7 *  Copyright (c) 1994, 95, 96, 1997, 2000 Thomas Esken
8 *  Copyright (c) 2010, 2011, 2013 Free Software Foundation, Inc.
9 *
10 *  This software doesn't claim completeness, correctness or usability.
11 *  On principle I will not be liable for ANY damages or losses (implicit
12 *  or explicit), which result from using or handling my software.
13 *  If you use this software, you agree without any exception to this
14 *  agreement, which binds you LEGALLY !!
15 *
16 *  This program is free software; you can redistribute it and/or modify
17 *  it under the terms of the `GNU General Public License' as published by
18 *  the `Free Software Foundation'; either version 3, or (at your option)
19 *  any later version.
20 *
21 *  You should have received a copy of the `GNU General Public License'
22 *  along with this program; if not, write to the:
23 *
24 */
25 
26 
27 
28 /*
29 *  Include definition header file to see whether HD_TOP20CC is defined there.
30 *    Compile this module only if HD_TOP20CC is NOT defined, otherwise skip it.
31 */
32 #include "tailor.h"
33 
34 
35 
36 #if !HD_TOP20CC
37 
38 /*
39 *  Include header files.
40 */
41 # include "common.h"
42 # include "globals.h"
43 # include "hd-defs.h"
44 # include "hd-data.h"
45 # include "hd-data1.h"
46 # include "hd-data2.h"
47 # include "hd-data3.h"
48 # include "hd-data4.h"
49 # include "hd-use.h"
50 # include "utils.h"
51 # include "hd-data5.h"
52 
53 
54 
55 /*
56 *  All other T-Z countries specific holiday management functions.
57 */
58 void
tc_hdy(init_data,detected,easter,year,hd_elems,fday,count)59 tc_hdy (init_data, detected, easter, year, hd_elems, fday, count)
60      Bool *init_data;
61      const Bool detected;
62      int easter;
63      const int year;
64      int *hd_elems;
65      const int fday;
66      const int count;
67 /*!
68    Manages all specific holidays celebrated in Turks and Caicos Islands.
69 */
70 {
71   register int day;
72 
73 
74   ptr_cc_id = "TC";
75   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
76 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
77   if (*init_data)
78     *init_data = FALSE;
79   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
80 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
81   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
82 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
83 	   count);
84   day = eval_holiday (DAY_MIN, 3, year, DAY_MIN, TRUE) + DAY_MAX;
85   holiday (*init_data, detected, _(hd_text[HD_COMMONWEALTH_DAY].ht_text),
86 	   ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
87   holiday (*init_data, detected, _(hd_text[HD_COLUMBUS_DAY].ht_text),
88 	   ptr_cc_id, "+", 12, 10, year, hd_elems, fday, count);
89   holiday (*init_data, detected,
90 	   _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id, "+",
91 	   30, 8, year, hd_elems, fday, count);
92   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
93 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
94   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
95 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
96   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
97 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
98   holiday (*init_data, detected, _(hd_text[HD_HUMAN_RIGHTS_DAY].ht_text),
99 	   ptr_cc_id, "+", 10, MONTH_MAX, year, hd_elems, fday, count);
100   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
101 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
102   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
103 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
104 	   count);
105   day = eval_holiday (DAY_MIN, 6, year, 6, TRUE) + DAY_MAX;
106   holiday (*init_data, detected, _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text),
107 	   ptr_cc_id, "+", day, 6, year, hd_elems, fday, count);
108   holiday (*init_data, detected, _(hd_text[HD_YOUTH_DAY].ht_text),
109 	   ptr_cc_id, "+", dvec[9 - 1], 9, year, hd_elems, fday, count);
110 }
111 
112 
113 
114 void
td_hdy(init_data,detected,easter,year,hd_elems,fday,count)115 td_hdy (init_data, detected, easter, year, hd_elems, fday, count)
116      Bool *init_data;
117      const Bool detected;
118      int easter;
119      const int year;
120      int *hd_elems;
121      const int fday;
122      const int count;
123 /*!
124    Manages all specific holidays celebrated in Chad.
125 */
126 {
127   ptr_cc_id = "TD";
128   use_other_cc = !use_other_cc;
129   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
130   use_other_cc = !use_other_cc;
131   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
132 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
133   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
134 	   ptr_cc_id, "+", 11, 8, year, hd_elems, fday, count);
135   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HOLIDAY].ht_text),
136 	   ptr_cc_id, "+", 13, 4, year, hd_elems, fday, count);
137   holiday (*init_data, detected, _(hd_text[HD_OAU_DAY].ht_text),
138 	   ptr_cc_id, "+", 25, 5, year, hd_elems, fday, count);
139   holiday (*init_data, detected, _(hd_text[HD_RE_DAY].ht_text),
140 	   ptr_cc_id, "+", 28, 11, year, hd_elems, fday, count);
141 }
142 
143 
144 
145 void
tg_hdy(init_data,detected,easter,year,hd_elems,fday,count)146 tg_hdy (init_data, detected, easter, year, hd_elems, fday, count)
147      Bool *init_data;
148      const Bool detected;
149      int easter;
150      const int year;
151      int *hd_elems;
152      const int fday;
153      const int count;
154 /*!
155    Manages all specific holidays celebrated in Togo.
156 */
157 {
158   ptr_cc_id = "TG";
159   use_other_cc = !use_other_cc;
160   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
161   use_other_cc = !use_other_cc;
162   holiday (*init_data, detected,
163 	   _(hd_text[HD_ECONOMIC_LIBERATION_DAY].ht_text), ptr_cc_id, "+", 24,
164 	   MONTH_MIN, year, hd_elems, fday, count);
165   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
166 	   ptr_cc_id, DIS_HLS_PREF2, 25, MONTH_MAX, year, hd_elems, fday,
167 	   count);
168   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
169 	   ptr_cc_id, DIS_HLS_PREF2, easter, 0, year, hd_elems, fday, count);
170   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
171 	   ptr_cc_id, DIS_HLS_PREF2, easter - 2, 0, year, hd_elems, fday,
172 	   count);
173   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
174 	   ptr_cc_id, "+", 27, 4, year, hd_elems, fday, count);
175   holiday (*init_data, detected, _(hd_text[HD_LIBERATION_DAY].ht_text),
176 	   ptr_cc_id, "+", 13, MONTH_MIN, year, hd_elems, fday, count);
177 }
178 
179 
180 
181 void
th_hdy(init_data,detected,easter,year,hd_elems,fday,count)182 th_hdy (init_data, detected, easter, year, hd_elems, fday, count)
183      Bool *init_data;
184      const Bool detected;
185      int easter;
186      const int year;
187      int *hd_elems;
188      const int fday;
189      const int count;
190 /*!
191    Manages all specific holidays celebrated in Thailand.
192 */
193 {
194   ptr_cc_id = "TH";
195   use_other_cc = !use_other_cc;
196   chinese_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id,
197 	       FALSE);
198   use_other_cc = !use_other_cc;
199   if (year > 1887)
200     {
201       register int day;
202       register int i;
203 
204 
205       day = 6;
206       i = weekday_of_date (day, 4, year);
207       if (i > 5)
208 	day += ((DAY_MAX - i) + 1);
209       holiday (*init_data, detected,
210 	       _(hd_text[HD_KING_RAMA_I_MEMORIAL_DAY].ht_text), ptr_cc_id,
211 	       "+", day, 4, year, hd_elems, fday, count);
212       day = 23;
213       i = weekday_of_date (day, 10, year);
214       if (i > 5)
215 	day += ((DAY_MAX - i) + 1);
216       holiday (*init_data, detected,
217 	       _(hd_text[HD_KING_RAMA_V_MEMORIAL_DAY].ht_text), ptr_cc_id,
218 	       "+", day, 10, year, hd_elems, fday, count);
219       day = 10;
220       i = weekday_of_date (day, MONTH_MAX, year);
221       if (i > 5)
222 	day += ((DAY_MAX - i) + 1);
223       holiday (*init_data, detected,
224 	       _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id,
225 	       "+", day, MONTH_MAX, year, hd_elems, fday, count);
226       day = 5;
227       i = weekday_of_date (day, 5, year);
228       if (i > 5)
229 	day += ((DAY_MAX - i) + 1);
230       holiday (*init_data, detected, _(hd_text[HD_CORONATION_DAY].ht_text),
231 	       ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
232       day = 5;
233       i = weekday_of_date (day, MONTH_MAX, year);
234       if (i > 5)
235 	day += ((DAY_MAX - i) + 1);
236       holiday (*init_data, detected,
237 	       _(hd_text[HD_THE_KINGS_BIRTHDAY].ht_text), ptr_cc_id, "+", day,
238 	       MONTH_MAX, year, hd_elems, fday, count);
239       day = DAY_MIN;
240       i = weekday_of_date (day, 5, year);
241       if (i > 5)
242 	day += ((DAY_MAX - i) + 1);
243       holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
244 	       ptr_cc_id, DIS_HLS_PREF2, day, 5, year, hd_elems, fday, count);
245       day = DAY_MIN;
246       i = weekday_of_date (day, 7, year);
247       if (i > 5)
248 	day += ((DAY_MAX - i) + 1);
249       holiday (*init_data, detected, _(hd_text[HD_MID_YEAR_FESTIVAL].ht_text),
250 	       ptr_cc_id, DIS_HLS_PREF2, day, 7, year, hd_elems, fday, count);
251       day = 12;
252       i = weekday_of_date (day, 8, year);
253       if (i > 5)
254 	day += ((DAY_MAX - i) + 1);
255       holiday (*init_data, detected,
256 	       _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text), ptr_cc_id, "+",
257 	       day, 8, year, hd_elems, fday, count);
258       holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text),
259 	       ptr_cc_id, "+", dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems,
260 	       fday, count);
261       /*
262          Calculate the year number used in the Thai ***CIVIL***
263          (western oriented) calendar based on the Buddhist Era.
264        */
265       sprintf (s2, "%s %d", _(hd_text[HD_THAI_NEW_YEARS_DAY].ht_text),
266 	       year + 543);
267       day = DAY_MIN;
268       if (year > 1939)
269 	{
270 	  i = weekday_of_date (day, MONTH_MIN, year);
271 	  if (i > 5)
272 	    day += ((DAY_MAX - i) + 1);
273 	  i = MONTH_MIN;
274 	}
275       else
276 	i = 4;
277       holiday (*init_data, detected, s2, ptr_cc_id,
278 	       "+", day, i, year, hd_elems, fday, count);
279       if (year > 1888)
280 	{
281 	  day = eval_holiday (DAY_MIN, MONTH_MIN, year, 6, TRUE) + DAY_MAX;
282 	  holiday (*init_data, detected, _(hd_text[HD_CHILDRENS_DAY].ht_text),
283 		   ptr_cc_id, DIS_HLS_PREF, day, MONTH_MIN, year, hd_elems,
284 		   fday, count);
285 	}
286       if (year > 1994)
287 	{
288 	  day = 14;
289 	  i = weekday_of_date (day, 4, year);
290 	  if (i > 5)
291 	    day += ((DAY_MAX - i) + 1);
292 	  holiday (*init_data, detected, _(hd_text[HD_FAMILY_DAY].ht_text),
293 		   ptr_cc_id, DIS_HLS_PREF, day, 4, year, hd_elems, fday,
294 		   count);
295 	}
296     }
297 }
298 
299 
300 
301 void
tj_hdy(init_data,detected,easter,year,hd_elems,fday,count)302 tj_hdy (init_data, detected, easter, year, hd_elems, fday, count)
303      Bool *init_data;
304      const Bool detected;
305      int easter;
306      const int year;
307      int *hd_elems;
308      const int fday;
309      const int count;
310 /*!
311    Manages all specific holidays celebrated in Tajikistan.
312 */
313 {
314   ptr_cc_id = "TJ";
315   use_other_cc = !use_other_cc;
316   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
317   persian_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
318   use_other_cc = !use_other_cc;
319   if ((year > 1916) && (year < 1991))
320     {
321       holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
322 	       ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday,
323 	       count);
324       holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
325 	       ptr_cc_id, "+", DAY_MIN, 5, year, hd_elems, fday, count);
326       holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text),
327 	       ptr_cc_id, "+", 8, 3, year, hd_elems, fday, count);
328       if (year > 1944)
329 	holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text),
330 		 ptr_cc_id, "+", 9, 5, year, hd_elems, fday, count);
331     }
332   if (year > 1990)
333     {
334       holiday (*init_data, detected, _(hd_text[HD_ARMED_FORCES_DAY].ht_text),
335 	       ptr_cc_id, "+", 23, 2, year, hd_elems, fday, count);
336       holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
337 	       ptr_cc_id, "+", 9, 9, year, hd_elems, fday, count);
338     }
339 }
340 
341 
342 
343 void
tk_hdy(init_data,detected,easter,year,hd_elems,fday,count)344 tk_hdy (init_data, detected, easter, year, hd_elems, fday, count)
345      Bool *init_data;
346      const Bool detected;
347      int easter;
348      const int year;
349      int *hd_elems;
350      const int fday;
351      const int count;
352 /*!
353    Manages all specific holidays celebrated in Tokelau.
354 */
355 {
356   ptr_cc_id = "TK";
357   use_other_cc = !use_other_cc;
358   nz_hdy (init_data, detected, easter, year, hd_elems, fday, count);
359   use_other_cc = !use_other_cc;
360 }
361 
362 
363 
364 void
tm_hdy(init_data,detected,easter,year,hd_elems,fday,count)365 tm_hdy (init_data, detected, easter, year, hd_elems, fday, count)
366      Bool *init_data;
367      const Bool detected;
368      int easter;
369      const int year;
370      int *hd_elems;
371      const int fday;
372      const int count;
373 /*!
374    Manages all specific holidays celebrated in Turkmenistan.
375 */
376 {
377   register int i;
378   auto int d;
379   auto int greg_diff;
380 
381 
382   ptr_cc_id = "TM";
383   use_other_cc = !use_other_cc;
384   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
385   persian_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
386   use_other_cc = !use_other_cc;
387   if ((year > 1916) && (year < 1991))
388     {
389       holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
390 	       ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday,
391 	       count);
392       holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text),
393 	       ptr_cc_id, "+", 8, 3, year, hd_elems, fday, count);
394       if (year > 1944)
395 	holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text),
396 		 ptr_cc_id, "+", 9, 5, year, hd_elems, fday, count);
397     }
398   if (year > 1990)
399     {
400       holiday (*init_data, detected,
401 	       _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id,
402 	       "+", 18, 5, year, hd_elems, fday, count);
403       holiday (*init_data, detected, _(hd_text[HD_FLAG_DAY].ht_text),
404 	       ptr_cc_id, "+", 19, 2, year, hd_elems, fday, count);
405       for (i = 27; i <= 28; i++)
406 	holiday (*init_data, detected,
407 		 _(hd_text[HD_INDEPENDENCE_DAY].ht_text), ptr_cc_id, "+", i,
408 		 10, year, hd_elems, fday, count);
409       holiday (*init_data, detected, _(hd_text[HD_NEUTRALITY_DAY].ht_text),
410 	       ptr_cc_id, "+", 12, MONTH_MAX, year, hd_elems, fday, count);
411       holiday (*init_data, detected, _(hd_text[HD_REMEMBRANCE_DAY].ht_text),
412 	       ptr_cc_id, "+", 6, 10, year, hd_elems, fday, count);
413     }
414   /*
415      The Christians in Turkmenistan compute all holiday dates which are
416      depending on Easter Sunday's date in the way done by the
417      Orthodox Christian Eastern churches old calendar.
418    */
419   easter = orthodox_easter (year, &greg_diff, 1924, 3, 10, 22);
420   d = DAY_MIN;
421   if (year != 1924)
422     d += greg_diff;
423   holiday (*init_data, detected,
424 	   _(hd_text[HD_ORTHODOX_NEW_YEARS_DAY].ht_text), ptr_cc_id,
425 	   DIS_HLS_PREF2, d, 0, year, hd_elems, fday, count);
426   if (year != 1924)
427     {
428       auto int m;
429       auto int y;
430 
431 
432       d = 25;
433       m = MONTH_MAX;
434       y = year - 1;
435       for (i = 0; i < greg_diff; i++)
436 	(void) next_date (&d, &m, &y);
437       holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
438 	       ptr_cc_id, DIS_HLS_PREF2, d, m, year, hd_elems, fday, count);
439     }
440   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
441 	   ptr_cc_id, DIS_HLS_PREF2, easter, 0, year, hd_elems, fday, count);
442   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
443 	   ptr_cc_id, DIS_HLS_PREF2, easter - 2, 0, year, hd_elems, fday,
444 	   count);
445 }
446 
447 
448 
449 void
tn_hdy(init_data,detected,easter,year,hd_elems,fday,count)450 tn_hdy (init_data, detected, easter, year, hd_elems, fday, count)
451      Bool *init_data;
452      const Bool detected;
453      int easter;
454      const int year;
455      int *hd_elems;
456      const int fday;
457      const int count;
458 /*!
459    Manages all specific holidays celebrated in Tunisia.
460 */
461 {
462   ptr_cc_id = "TN";
463   use_other_cc = !use_other_cc;
464   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
465   use_other_cc = !use_other_cc;
466   holiday (*init_data, detected, _(hd_text[HD_EVACUATION_DAY].ht_text),
467 	   ptr_cc_id, "+", 15, 10, year, hd_elems, fday, count);
468   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
469 	   ptr_cc_id, "+", 20, 3, year, hd_elems, fday, count);
470   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
471 	   ptr_cc_id, "+", DAY_MIN, 5, year, hd_elems, fday, count);
472   holiday (*init_data, detected, _(hd_text[HD_MARTYRS_DAY].ht_text),
473 	   ptr_cc_id, "+", 9, 4, year, hd_elems, fday, count);
474   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
475 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
476   holiday (*init_data, detected, _(hd_text[HD_REMEMBRANCE_DAY].ht_text),
477 	   ptr_cc_id, "+", 7, 11, year, hd_elems, fday, count);
478   holiday (*init_data, detected, _(hd_text[HD_RE_DAY].ht_text),
479 	   ptr_cc_id, "+", 25, 7, year, hd_elems, fday, count);
480   holiday (*init_data, detected, _(hd_text[HD_REVOLUTION_DAY].ht_text),
481 	   ptr_cc_id, "+", 18, MONTH_MIN, year, hd_elems, fday, count);
482   holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text),
483 	   ptr_cc_id, "+", 13, 8, year, hd_elems, fday, count);
484   holiday (*init_data, detected, _(hd_text[HD_YOUTH_DAY].ht_text),
485 	   ptr_cc_id, "+", 21, 3, year, hd_elems, fday, count);
486   if (year > 1933)
487     holiday (*init_data, detected, _(hd_text[HD_CIVIC_HOLIDAY].ht_text),
488 	     ptr_cc_id, "+", 3, 9, year, hd_elems, fday, count);
489 }
490 
491 
492 
493 void
to_hdy(init_data,detected,easter,year,hd_elems,fday,count)494 to_hdy (init_data, detected, easter, year, hd_elems, fday, count)
495      Bool *init_data;
496      const Bool detected;
497      int easter;
498      const int year;
499      int *hd_elems;
500      const int fday;
501      const int count;
502 /*!
503    Manages all specific holidays celebrated in Tonga.
504 */
505 {
506   ptr_cc_id = "TO";
507   holiday (*init_data, detected,
508 	   _(hd_text[HD_THE_CROWN_PRINCES_BIRTHDAY].ht_text), ptr_cc_id, "+",
509 	   4, 5, year, hd_elems, fday, count);
510   if (*init_data)
511     *init_data = FALSE;
512   holiday (*init_data, detected, _(hd_text[HD_TOPOU_I_DAY].ht_text),
513 	   ptr_cc_id, "+", 4, MONTH_MAX, year, hd_elems, fday, count);
514   holiday (*init_data, detected, _(hd_text[HD_ANZAC_DAY].ht_text),
515 	   ptr_cc_id, "+", 25, 4, year, hd_elems, fday, count);
516   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
517 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
518   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
519 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
520   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
521 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
522 	   count);
523   holiday (*init_data, detected,
524 	   _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id, "+", 4,
525 	   11, year, hd_elems, fday, count);
526   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
527 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
528   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
529 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
530   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
531 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
532   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
533 	   ptr_cc_id, "+", easter - 1, 0, year, hd_elems, fday, count);
534   holiday (*init_data, detected, _(hd_text[HD_LIBERATION_DAY].ht_text),
535 	   ptr_cc_id, "+", 4, 6, year, hd_elems, fday, count);
536   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
537 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
538   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
539 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
540 	   count);
541   holiday (*init_data, detected, _(hd_text[HD_THE_KINGS_BIRTHDAY].ht_text),
542 	   ptr_cc_id, "+", 4, 7, year, hd_elems, fday, count);
543 }
544 
545 
546 
547 void
tr_hdy(init_data,detected,easter,year,hd_elems,fday,count)548 tr_hdy (init_data, detected, easter, year, hd_elems, fday, count)
549      Bool *init_data;
550      const Bool detected;
551      int easter;
552      const int year;
553      int *hd_elems;
554      const int fday;
555      const int count;
556 /*!
557    Manages all specific holidays celebrated in Turkey.
558 */
559 {
560   ptr_cc_id = "TR";
561   use_other_cc = !use_other_cc;
562   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
563   use_other_cc = !use_other_cc;
564   holiday (*init_data, detected, _(hd_text[HD_ATATURK_MEMORIAL_DAY].ht_text),
565 	   ptr_cc_id, "+", 19, 5, year, hd_elems, fday, count);
566   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
567 	   ptr_cc_id, "+", 23, 4, year, hd_elems, fday, count);
568   day = eval_holiday (DAY_MIN, 5, year, DAY_MAX, TRUE) + DAY_MAX;
569   holiday (*init_data, detected, _(hd_text[HD_MOTHERS_DAY].ht_text),
570 	   ptr_cc_id, DIS_HLS_PREF, day, 5, year, hd_elems, fday, count);
571   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
572 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
573   holiday (*init_data, detected, _(hd_text[HD_RE_DAY].ht_text),
574 	   ptr_cc_id, "+", 29, 10, year, hd_elems, fday, count);
575   holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text),
576 	   ptr_cc_id, "+", 30, 8, year, hd_elems, fday, count);
577 }
578 
579 
580 
581 void
tt_hdy(init_data,detected,easter,year,hd_elems,fday,count)582 tt_hdy (init_data, detected, easter, year, hd_elems, fday, count)
583      Bool *init_data;
584      const Bool detected;
585      int easter;
586      const int year;
587      int *hd_elems;
588      const int fday;
589      const int count;
590 /*!
591    Manages all specific holidays celebrated in Trinidad and Tobago.
592 */
593 {
594   register int i;
595 
596 
597   ptr_cc_id = "TT";
598   use_other_cc = !use_other_cc;
599   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
600   use_other_cc = !use_other_cc;
601   holiday (*init_data, detected, _(hd_text[HD_ASH_WEDNESDAY].ht_text),
602 	   ptr_cc_id, DIS_HLS_PREF, easter - 46, 0, year, hd_elems, fday,
603 	   count);
604   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text), ptr_cc_id,
605 	   "+", 26, MONTH_MAX, year, hd_elems, fday, count);
606   for (i = 2; i; i--)
607     holiday (*init_data, detected, _(hd_text[HD_CARNIVAL].ht_text),
608 	     ptr_cc_id, "+", easter - 46 - i, 0, year, hd_elems, fday, count);
609   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
610 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
611 	   count);
612   holiday (*init_data, detected,
613 	   _(hd_text[HD_FEAST_OF_CORPUS_CHRISTI].ht_text), ptr_cc_id, "+",
614 	   easter + 60, 0, year, hd_elems, fday, count);
615   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
616 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
617   holiday (*init_data, detected, _(hd_text[HD_INDIAN_ARRIVAL_DAY].ht_text),
618 	   ptr_cc_id, "+", 30, 5, year, hd_elems, fday, count);
619   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
620 	   "+", 19, 6, year, hd_elems, fday, count);
621   holiday (*init_data, detected, _(hd_text[HD_LIBERATION_DAY].ht_text),
622 	   ptr_cc_id, "+", 30, 3, year, hd_elems, fday, count);
623   holiday (*init_data, detected, _(hd_text[HD_SLAVE_LIBERATION_DAY].ht_text),
624 	   ptr_cc_id, "+", DAY_MIN, 8, year, hd_elems, fday, count);
625   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
626 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
627 	   count);
628   if ((year > 1961) && (year < 1999))
629     holiday (*init_data, detected, _(hd_text[HD_RE_DAY].ht_text),
630 	     ptr_cc_id, "+", 24, 9, year, hd_elems, fday, count);
631   if (year > 1975)
632     holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
633 	     ptr_cc_id, "+", dvec[8 - 1], 8, year, hd_elems, fday, count);
634   base_christian_hdy (init_data, detected, easter, year, hd_elems, fday,
635 		      count, ptr_cc_id);
636 }
637 
638 
639 
640 void
tv_hdy(init_data,detected,easter,year,hd_elems,fday,count)641 tv_hdy (init_data, detected, easter, year, hd_elems, fday, count)
642      Bool *init_data;
643      const Bool detected;
644      int easter;
645      const int year;
646      int *hd_elems;
647      const int fday;
648      const int count;
649 /*!
650    Manages all specific holidays celebrated in Tuvalu.
651 */
652 {
653   register int day;
654 
655 
656   ptr_cc_id = "TV";
657   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
658 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
659   if (*init_data)
660     *init_data = FALSE;
661   holiday (*init_data, detected, _(hd_text[HD_CHILDRENS_DAY].ht_text),
662 	   ptr_cc_id, "+", 5, 8, year, hd_elems, fday, count);
663   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
664 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
665   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
666 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
667 	   count);
668   holiday (*init_data, detected, _(hd_text[HD_COMMONWEALTH_DAY].ht_text),
669 	   ptr_cc_id, "+", 11, 3, year, hd_elems, fday, count);
670   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
671 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
672   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
673 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
674   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
675 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
676   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
677 	   ptr_cc_id, "+", easter - 1, 0, year, hd_elems, fday, count);
678   holiday (*init_data, detected, _(hd_text[HD_GOSPEL_DAY].ht_text), ptr_cc_id,
679 	   "+", 13, 5, year, hd_elems, fday, count);
680   for (day = DAY_MIN; day <= 2; day++)
681     holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
682 	     ptr_cc_id, "+", day, 10, year, hd_elems, fday, count);
683   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
684 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
685   holiday (*init_data, detected,
686 	   _(hd_text[HD_PRINCE_OF_WALES_BIRTHDAY].ht_text), ptr_cc_id, "+",
687 	   14, 11, year, hd_elems, fday, count);
688   day = eval_holiday (DAY_MIN, 6, year, 6, TRUE) + DAY_MAX;
689   holiday (*init_data, detected, _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text),
690 	   ptr_cc_id, "+", day, 6, year, hd_elems, fday, count);
691   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
692 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
693 	   count);
694 }
695 
696 
697 
698 void
tw_hdy(init_data,detected,easter,year,hd_elems,fday,count)699 tw_hdy (init_data, detected, easter, year, hd_elems, fday, count)
700      Bool *init_data;
701      const Bool detected;
702      int easter;
703      const int year;
704      int *hd_elems;
705      const int fday;
706      const int count;
707 /*!
708    Manages all specific holidays celebrated in Taiwan.
709 */
710 {
711   register int day;
712 
713 
714   ptr_cc_id = "TW";
715   use_other_cc = !use_other_cc;
716   if ((year > 1894) && (year < 1945))
717     japanese_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id,
718 		  FALSE);
719   else
720     chinese_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id,
721 		 FALSE);
722   use_other_cc = !use_other_cc;
723   for (day = DAY_MIN; day <= 2; day++)
724     holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
725 	     ptr_cc_id, "+", day, MONTH_MIN, year, hd_elems, fday, count);
726   holiday (*init_data, detected, _(hd_text[HD_BANK_HOLIDAY].ht_text),
727 	   ptr_cc_id, "+", 3, MONTH_MIN, year, hd_elems, fday, count);
728   holiday (*init_data, detected, _(hd_text[HD_MID_YEAR_FESTIVAL].ht_text),
729 	   ptr_cc_id, "+", DAY_MIN, 7, year, hd_elems, fday, count);
730   holiday (*init_data, detected,
731 	   _(hd_text[HD_CHIANG_KAI_SHEKS_BIRTHDAY].ht_text), ptr_cc_id,
732 	   DIS_HLS_PREF, dvec[10 - 1], 10, year, hd_elems, fday, count);
733   holiday (*init_data, detected,
734 	   _(hd_text[HD_DR_SUN_YAT_SENS_BIRTHDAY].ht_text), ptr_cc_id, "+",
735 	   12, 11, year, hd_elems, fday, count);
736   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HOLIDAY].ht_text),
737 	   ptr_cc_id, "+", 10, 10, year, hd_elems, fday, count);
738   holiday (*init_data, detected, _(hd_text[HD_TEACHERS_DAY].ht_text),
739 	   ptr_cc_id, DIS_HLS_PREF, 28, 9, year, hd_elems, fday, count);
740   holiday (*init_data, detected, _(hd_text[HD_YOUTH_DAY].ht_text), ptr_cc_id,
741 	   DIS_HLS_PREF, 29, 3, year, hd_elems, fday, count);
742 }
743 
744 
745 
746 void
tz_hdy(init_data,detected,easter,year,hd_elems,fday,count)747 tz_hdy (init_data, detected, easter, year, hd_elems, fday, count)
748      Bool *init_data;
749      const Bool detected;
750      int easter;
751      const int year;
752      int *hd_elems;
753      const int fday;
754      const int count;
755 /*!
756    Manages all specific holidays celebrated in Tanzania.
757 */
758 {
759   ptr_cc_id = "TZ";
760   use_other_cc = !use_other_cc;
761   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
762   use_other_cc = !use_other_cc;
763   holiday (*init_data, detected, _(hd_text[HD_C_MAPINDUZI_DAY].ht_text),
764 	   ptr_cc_id, "+", 5, 2, year, hd_elems, fday, count);
765   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
766 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
767   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
768 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
769 	   count);
770   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
771 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
772   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
773 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
774   holiday (*init_data, detected, _(hd_text[HD_FARMERS_DAY].ht_text),
775 	   ptr_cc_id, "+", 7, 7, year, hd_elems, fday, count);
776   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
777 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
778   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
779 	   ptr_cc_id, "+", easter - 1, 0, year, hd_elems, fday, count);
780   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
781 	   ptr_cc_id, "+", 9, MONTH_MAX, year, hd_elems, fday, count);
782   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
783 	   "+", DAY_MIN, 5, year, hd_elems, fday, count);
784   holiday (*init_data, detected, _(hd_text[HD_REVOLUTION_DAY].ht_text),
785 	   ptr_cc_id, "+", 12, MONTH_MIN, year, hd_elems, fday, count);
786   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
787 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
788 	   count);
789   holiday (*init_data, detected, _(hd_text[HD_UNION_DAY].ht_text), ptr_cc_id,
790 	   "+", 28, 4, year, hd_elems, fday, count);
791 }
792 
793 
794 
795 void
ua_hdy(init_data,detected,easter,year,hd_elems,fday,count)796 ua_hdy (init_data, detected, easter, year, hd_elems, fday, count)
797      Bool *init_data;
798      const Bool detected;
799      int easter;
800      const int year;
801      int *hd_elems;
802      const int fday;
803      const int count;
804 /*!
805    Manages all specific holidays celebrated in Ukraine.
806 */
807 {
808   register int i;
809   auto int d;
810   auto int greg_diff;
811 
812 
813   ptr_cc_id = "UA";
814   d = 28;
815   i = weekday_of_date (d, 6, year);
816   if (i > 5)
817     d += ((DAY_MAX - i) + 1);
818   holiday (*init_data, detected,
819 	   _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id, "+", d,
820 	   6, year, hd_elems, fday, count);
821   if (*init_data)
822     *init_data = FALSE;
823   d = day_of_year (eval_holiday (dvec[5 - 1], 5, year, 6, FALSE), 5, year);
824   for (i = 0; i < 2; i++)
825     holiday (*init_data, detected, _(hd_text[HD_KIEV_DAY].ht_text),
826 	     ptr_cc_id, DIS_HLS_PREF2, d + i, 0, year, hd_elems, fday, count);
827   d = DAY_MIN;
828   i = weekday_of_date (d, 5, year);
829   if (i > 5)
830     d += ((DAY_MAX - i) + 1);
831   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
832 	   ptr_cc_id, "+", d, 5, year, hd_elems, fday, count);
833   d = 2;
834   i = weekday_of_date (d, 5, year);
835   if (i > 5)
836     d += ((DAY_MAX - i) + 1);
837   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
838 	   ptr_cc_id, "+", d, 5, year, hd_elems, fday, count);
839   d = DAY_MIN;
840   i = weekday_of_date (d, MONTH_MIN, year);
841   if (i > 5)
842     d += ((DAY_MAX - i) + 1);
843   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
844 	   ptr_cc_id, "+", d, MONTH_MIN, year, hd_elems, fday, count);
845   d = 8;
846   i = weekday_of_date (d, 3, year);
847   if (i > 5)
848     d += ((DAY_MAX - i) + 1);
849   holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text),
850 	   ptr_cc_id, "+", d, 3, year, hd_elems, fday, count);
851   if (year > 1944)
852     {
853       d = 9;
854       i = weekday_of_date (d, 5, year);
855       if (i > 5)
856 	d += ((DAY_MAX - i) + 1);
857       holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text),
858 	       ptr_cc_id, "+", d, 5, year, hd_elems, fday, count);
859     }
860   if (year > 1990)
861     {
862       d = 24;
863       i = weekday_of_date (d, 8, year);
864       if (i > 5)
865 	d += ((DAY_MAX - i) + 1);
866       holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
867 	       ptr_cc_id, "+", d, 8, year, hd_elems, fday, count);
868     }
869   /*
870      The Christians in Ukraine compute all holiday dates which are
871      depending on Easter Sunday's date in the way done by the
872      Orthodox Christian Eastern churches old calendar.
873    */
874   easter = orthodox_easter (year, &greg_diff, 1924, 3, 10, 22);
875   d = DAY_MIN;
876   if (year != 1924)
877     d += greg_diff;
878   holiday (*init_data, detected,
879 	   _(hd_text[HD_ORTHODOX_NEW_YEARS_DAY].ht_text), ptr_cc_id,
880 	   DIS_HLS_PREF2, d, 0, year, hd_elems, fday, count);
881   if (year != 1924)
882     {
883       auto int m;
884       auto int y;
885 
886 
887       d = 25;
888       m = MONTH_MAX;
889       y = year - 1;
890       for (i = 0; i < greg_diff; i++)
891 	(void) next_date (&d, &m, &y);
892       holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
893 	       ptr_cc_id, DIS_HLS_PREF2, d, m, year, hd_elems, fday, count);
894     }
895   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
896 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
897   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
898 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
899   for (i = 0; i < 2; i++)
900     holiday (*init_data, detected, _(hd_text[HD_HOLY_TRINITY].ht_text),
901 	     ptr_cc_id, "+", easter + 56 + i, 0, year, hd_elems, fday, count);
902 }
903 
904 
905 
906 void
ug_hdy(init_data,detected,easter,year,hd_elems,fday,count)907 ug_hdy (init_data, detected, easter, year, hd_elems, fday, count)
908      Bool *init_data;
909      const Bool detected;
910      int easter;
911      const int year;
912      int *hd_elems;
913      const int fday;
914      const int count;
915 /*!
916    Manages all specific holidays celebrated in Uganda.
917 */
918 {
919   ptr_cc_id = "UG";
920   use_other_cc = !use_other_cc;
921   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
922   use_other_cc = !use_other_cc;
923   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
924 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
925   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
926 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
927   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
928 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
929 	   count);
930   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
931 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
932   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
933 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
934   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
935 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
936   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
937 	   ptr_cc_id, "+", easter - 1, 0, year, hd_elems, fday, count);
938   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
939 	   ptr_cc_id, "+", 9, 10, year, hd_elems, fday, count);
940   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
941 	   "+", DAY_MIN, 5, year, hd_elems, fday, count);
942   holiday (*init_data, detected, _(hd_text[HD_MARTYRS_DAY].ht_text),
943 	   ptr_cc_id, "+", 3, 6, year, hd_elems, fday, count);
944   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HEROES_DAY].ht_text),
945 	   ptr_cc_id, "+", 9, 6, year, hd_elems, fday, count);
946   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
947 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
948   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
949 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
950 	   count);
951   holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text),
952 	   ptr_cc_id, "+", 26, MONTH_MIN, year, hd_elems, fday, count);
953   holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text), ptr_cc_id,
954 	   "+", 8, 3, year, hd_elems, fday, count);
955 }
956 
957 
958 
959 void
us_ak_hdy(init_data,detected,easter,year,hd_elems,fday,count)960 us_ak_hdy (init_data, detected, easter, year, hd_elems, fday, count)
961      Bool *init_data;
962      const Bool detected;
963      int easter;
964      const int year;
965      int *hd_elems;
966      const int fday;
967      const int count;
968 /*!
969    Manages all specific holidays celebrated in United States/Alaska.
970 */
971 {
972   register int day;
973   register int i;
974 
975 
976   ptr_cc_id = "US_AK";
977   observe_us_hdy = SAFR_SUMO;
978   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
979   day = eval_holiday (dvec[3 - 1], 3, year, DAY_MIN, FALSE);
980   holiday (*init_data, detected, _(hd_text[HD_SEWARDS_DAY].ht_text),
981 	   ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
982   day = 18;
983   i = weekday_of_date (day, 10, year);
984   if (i == DAY_MAX)
985     day++;
986   else if (i == 6)
987     day--;
988   holiday (*init_data, detected, _(hd_text[HD_ALASKA_DAY].ht_text),
989 	   ptr_cc_id, "+", day, 10, year, hd_elems, fday, count);
990 }
991 
992 
993 
994 void
us_al_hdy(init_data,detected,easter,year,hd_elems,fday,count)995 us_al_hdy (init_data, detected, easter, year, hd_elems, fday, count)
996      Bool *init_data;
997      const Bool detected;
998      int easter;
999      const int year;
1000      int *hd_elems;
1001      const int fday;
1002      const int count;
1003 /*!
1004    Manages all specific holidays celebrated in United States/Alabama.
1005 */
1006 {
1007   register int day;
1008 
1009 
1010   ptr_cc_id = "US_AL";
1011   observe_us_hdy = SASA_SUMO;
1012   use_other_cc = !use_other_cc;
1013   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1014   use_other_cc = !use_other_cc;
1015   day = eval_holiday (DAY_MIN, 10, year, DAY_MIN, TRUE) + DAY_MAX;
1016   holiday (*init_data, detected, _(hd_text[HD_COLUMBUS_DAY].ht_text),
1017 	   ptr_cc_id, "+", day, 10, year, hd_elems, fday, count);
1018   day = eval_holiday (DAY_MIN, 6, year, DAY_MIN, TRUE);
1019   holiday (*init_data, detected,
1020 	   _(hd_text[HD_JEFFERSON_DAVIS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1021 	   day, 6, year, hd_elems, fday, count);
1022   day =
1023     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1024   holiday (*init_data, detected,
1025 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
1026 	   day, MONTH_MIN, year, hd_elems, fday, count);
1027   day = eval_holiday (DAY_MIN, 4, year, DAY_MIN, TRUE) + (3 * DAY_MAX);
1028   holiday (*init_data, detected, _(hd_text[HD_REMEMBRANCE_DAY].ht_text),
1029 	   ptr_cc_id, "+", day, 4, year, hd_elems, fday, count);
1030   holiday (*init_data, detected, _(hd_text[HD_SHROVE_TUESDAY].ht_text),
1031 	   ptr_cc_id, "+", easter - 47, 0, year, hd_elems, fday, count);
1032 }
1033 
1034 
1035 
1036 void
us_ar_hdy(init_data,detected,easter,year,hd_elems,fday,count)1037 us_ar_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1038      Bool *init_data;
1039      const Bool detected;
1040      int easter;
1041      const int year;
1042      int *hd_elems;
1043      const int fday;
1044      const int count;
1045 /*!
1046    Manages all specific holidays celebrated in United States/Arkansas.
1047 */
1048 {
1049   register int day;
1050 
1051 
1052   ptr_cc_id = "US_AR";
1053   observe_us_hdy = SASA_SUSU;
1054   use_other_cc = !use_other_cc;
1055   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1056   use_other_cc = !use_other_cc;
1057   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
1058 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
1059   day =
1060     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1061   holiday (*init_data, detected,
1062 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
1063 	   day, MONTH_MIN, year, hd_elems, fday, count);
1064   day = eval_holiday (DAY_MIN, 2, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1065   holiday (*init_data, detected, _(hd_text[HD_PRESIDENTS_DAY].ht_text),
1066 	   ptr_cc_id, "+", day, 2, year, hd_elems, fday, count);
1067 }
1068 
1069 
1070 
1071 void
us_az_hdy(init_data,detected,easter,year,hd_elems,fday,count)1072 us_az_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1073      Bool *init_data;
1074      const Bool detected;
1075      int easter;
1076      const int year;
1077      int *hd_elems;
1078      const int fday;
1079      const int count;
1080 /*!
1081    Manages all specific holidays celebrated in United States/Arizona.
1082 */
1083 {
1084   ptr_cc_id = "US_AZ";
1085   observe_us_hdy = SAFR_SUMO;
1086   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1087 }
1088 
1089 
1090 
1091 void
us_ca_hdy(init_data,detected,easter,year,hd_elems,fday,count)1092 us_ca_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1093      Bool *init_data;
1094      const Bool detected;
1095      int easter;
1096      const int year;
1097      int *hd_elems;
1098      const int fday;
1099      const int count;
1100 /*!
1101    Manages all specific holidays celebrated in United States/California.
1102 */
1103 {
1104   register int day;
1105 
1106 
1107   ptr_cc_id = "US_CA";
1108   observe_us_hdy = SASAFR_SUMO;
1109   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1110   day = 12;
1111   if (weekday_of_date (day, 2, year) == DAY_MAX)
1112     day++;
1113   holiday (*init_data, detected,
1114 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1115 	   day, 2, year, hd_elems, fday, count);
1116   day = dvec[3 - 1];
1117   if (weekday_of_date (day, 3, year) == DAY_MAX)
1118     day++;
1119   holiday (*init_data, detected, _(hd_text[HD_CESAR_CHAVEZ_DAY].ht_text),
1120 	   ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
1121   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1122 	   ptr_cc_id, DIS_HLS_PREF2, easter - 2, 0, year, hd_elems, fday,
1123 	   count);
1124   day = 9;
1125   if (weekday_of_date (day, 9, year) == DAY_MAX)
1126     day++;
1127   holiday (*init_data, detected, _(hd_text[HD_ADMISSION_DAY].ht_text),
1128 	   ptr_cc_id, "+", day, 9, year, hd_elems, fday, count);
1129   day = eval_holiday (DAY_MIN, 11, year, 4, TRUE) + (3 * DAY_MAX) + 1;
1130   holiday (*init_data, detected, _(hd_text[HD_THANKSGIVING_DAY].ht_text),
1131 	   ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1132 }
1133 
1134 
1135 
1136 void
us_co_hdy(init_data,detected,easter,year,hd_elems,fday,count)1137 us_co_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1138      Bool *init_data;
1139      const Bool detected;
1140      int easter;
1141      const int year;
1142      int *hd_elems;
1143      const int fday;
1144      const int count;
1145 /*!
1146    Manages all specific holidays celebrated in United States/Colorado.
1147 */
1148 {
1149   ptr_cc_id = "US_CO";
1150   observe_us_hdy = SASA_SUSU;
1151   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1152   holiday (*init_data, detected,
1153 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1154 	   12, 2, year, hd_elems, fday, count);
1155   holiday (*init_data, detected, _(hd_text[HD_COLORADO_DAY].ht_text),
1156 	   ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
1157 }
1158 
1159 
1160 
1161 void
us_ct_hdy(init_data,detected,easter,year,hd_elems,fday,count)1162 us_ct_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1163      Bool *init_data;
1164      const Bool detected;
1165      int easter;
1166      const int year;
1167      int *hd_elems;
1168      const int fday;
1169      const int count;
1170 /*!
1171    Manages all specific holidays celebrated in United States/Connecticut.
1172 */
1173 {
1174   ptr_cc_id = "US_CT";
1175   observe_us_hdy = SASA_SUSU;
1176   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1177   holiday (*init_data, detected,
1178 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1179 	   12, 2, year, hd_elems, fday, count);
1180   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1181 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1182 }
1183 
1184 
1185 
1186 void
us_dc_hdy(init_data,detected,easter,year,hd_elems,fday,count)1187 us_dc_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1188      Bool *init_data;
1189      const Bool detected;
1190      int easter;
1191      const int year;
1192      int *hd_elems;
1193      const int fday;
1194      const int count;
1195 /*!
1196    Manages all specific holidays celebrated in United States/District of Columbia.
1197 */
1198 {
1199   ptr_cc_id = "US_DC";
1200   observe_us_hdy = SAFR_SUMO;
1201   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1202   if ((year > 1964) && !((1965 - year) & 3))
1203     {
1204       register int day;
1205 
1206 
1207       day = 20;
1208       if (weekday_of_date (day, MONTH_MIN, year) == DAY_MAX)
1209 	day++;
1210       holiday (*init_data, detected,
1211 	       _(hd_text[HD_PRESIDENTIAL_INAUGURATION].ht_text), ptr_cc_id,
1212 	       "+", day, MONTH_MIN, year, hd_elems, fday, count);
1213     }
1214 }
1215 
1216 
1217 
1218 void
us_de_hdy(init_data,detected,easter,year,hd_elems,fday,count)1219 us_de_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1220      Bool *init_data;
1221      const Bool detected;
1222      int easter;
1223      const int year;
1224      int *hd_elems;
1225      const int fday;
1226      const int count;
1227 /*!
1228    Manages all specific holidays celebrated in United States/Delaware.
1229 */
1230 {
1231   ptr_cc_id = "US_DE";
1232   observe_us_hdy = SASA_SUSU;
1233   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1234   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1235 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1236   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
1237 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
1238   if (year > 1844)
1239     {
1240       register int day;
1241 
1242 
1243       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1244       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1245 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1246       holiday (*init_data, detected, _(hd_text[HD_RETURN_DAY].ht_text),
1247 	       ptr_cc_id, "#", day + 2, 11, year, hd_elems, fday, count);
1248     }
1249 }
1250 
1251 
1252 
1253 void
us_fl_hdy(init_data,detected,easter,year,hd_elems,fday,count)1254 us_fl_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1255      Bool *init_data;
1256      const Bool detected;
1257      int easter;
1258      const int year;
1259      int *hd_elems;
1260      const int fday;
1261      const int count;
1262 /*!
1263    Manages all specific holidays celebrated in United States/Florida.
1264 */
1265 {
1266   ptr_cc_id = "US_FL";
1267   observe_us_hdy = SASA_SUSU;
1268   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1269   holiday (*init_data, detected,
1270 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1271 	   12, 2, year, hd_elems, fday, count);
1272 }
1273 
1274 
1275 
1276 void
us_ga_hdy(init_data,detected,easter,year,hd_elems,fday,count)1277 us_ga_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1278      Bool *init_data;
1279      const Bool detected;
1280      int easter;
1281      const int year;
1282      int *hd_elems;
1283      const int fday;
1284      const int count;
1285 /*!
1286    Manages all specific holidays celebrated in United States/Georgia.
1287 */
1288 {
1289   register int day;
1290 
1291 
1292   ptr_cc_id = "US_GA";
1293   observe_us_hdy = SASA_SUMO;
1294   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1295   day = eval_holiday (DAY_MIN, 4, year, DAY_MIN, TRUE) + (3 * DAY_MAX);
1296   holiday (*init_data, detected, _(hd_text[HD_REMEMBRANCE_DAY].ht_text),
1297 	   ptr_cc_id, "+", day, 4, year, hd_elems, fday, count);
1298   day = eval_holiday (DAY_MIN, 11, year, 4, TRUE) + (3 * DAY_MAX) + 1;
1299   holiday (*init_data, detected, _(hd_text[HD_THANKSGIVING_DAY].ht_text),
1300 	   ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1301   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
1302 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
1303 }
1304 
1305 
1306 
1307 void
us_hi_hdy(init_data,detected,easter,year,hd_elems,fday,count)1308 us_hi_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1309      Bool *init_data;
1310      const Bool detected;
1311      int easter;
1312      const int year;
1313      int *hd_elems;
1314      const int fday;
1315      const int count;
1316 /*!
1317    Manages all specific holidays celebrated in United States/Hawaii.
1318 */
1319 {
1320   register int day;
1321 
1322 
1323   ptr_cc_id = "US_HI";
1324   observe_us_hdy = SASA_SUSU;
1325   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1326   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1327 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1328   day = eval_holiday (DAY_MIN, 8, year, 5, TRUE) + (2 * DAY_MAX);
1329   holiday (*init_data, detected, _(hd_text[HD_ADMISSION_DAY].ht_text),
1330 	   ptr_cc_id, "+", day, 9, year, hd_elems, fday, count);
1331   holiday (*init_data, detected,
1332 	   _(hd_text[HD_PRINCE_KALANIANAOLE_DAY].ht_text), ptr_cc_id, "+", 26,
1333 	   3, year, hd_elems, fday, count);
1334   holiday (*init_data, detected, _(hd_text[HD_KING_KAMEHAMEHA_DAY].ht_text),
1335 	   ptr_cc_id, "+", 26, 3, year, hd_elems, fday, count);
1336   if (year > 1844)
1337     {
1338       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1339       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1340 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1341     }
1342 }
1343 
1344 
1345 
1346 void
us_ia_hdy(init_data,detected,easter,year,hd_elems,fday,count)1347 us_ia_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1348      Bool *init_data;
1349      const Bool detected;
1350      int easter;
1351      const int year;
1352      int *hd_elems;
1353      const int fday;
1354      const int count;
1355 /*!
1356    Manages all specific holidays celebrated in United States/Iowa.
1357 */
1358 {
1359   register int day;
1360 
1361 
1362   ptr_cc_id = "US_IA";
1363   observe_us_hdy = SASA_SUSU;
1364   use_other_cc = !use_other_cc;
1365   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1366   use_other_cc = !use_other_cc;
1367   day =
1368     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1369   holiday (*init_data, detected,
1370 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
1371 	   day, MONTH_MIN, year, hd_elems, fday, count);
1372   holiday (*init_data, detected,
1373 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1374 	   12, 2, year, hd_elems, fday, count);
1375   day = eval_holiday (DAY_MIN, 2, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1376   holiday (*init_data, detected, _(hd_text[HD_PRESIDENTS_DAY].ht_text),
1377 	   ptr_cc_id, "+", day, 2, year, hd_elems, fday, count);
1378 }
1379 
1380 
1381 
1382 void
us_id_hdy(init_data,detected,easter,year,hd_elems,fday,count)1383 us_id_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1384      Bool *init_data;
1385      const Bool detected;
1386      int easter;
1387      const int year;
1388      int *hd_elems;
1389      const int fday;
1390      const int count;
1391 /*!
1392    Manages all specific holidays celebrated in United States/Idaho.
1393 */
1394 {
1395   ptr_cc_id = "US_ID";
1396   observe_us_hdy = SAFR_SUMO;
1397   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1398 }
1399 
1400 
1401 
1402 void
us_il_hdy(init_data,detected,easter,year,hd_elems,fday,count)1403 us_il_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1404      Bool *init_data;
1405      const Bool detected;
1406      int easter;
1407      const int year;
1408      int *hd_elems;
1409      const int fday;
1410      const int count;
1411 /*!
1412    Manages all specific holidays celebrated in United States/Illinois.
1413 */
1414 {
1415   register int day;
1416 
1417 
1418   ptr_cc_id = "US_IL";
1419   observe_us_hdy = SASA_SUSU;
1420   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1421   day = eval_holiday (DAY_MIN, 3, year, DAY_MIN, TRUE);
1422   holiday (*init_data, detected,
1423 	   _(hd_text[HD_CASIMIR_PULASKIS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1424 	   day, 3, year, hd_elems, fday, count);
1425   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1426 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1427   holiday (*init_data, detected,
1428 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1429 	   12, 2, year, hd_elems, fday, count);
1430   if (year > 1844)
1431     {
1432       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1433       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1434 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1435     }
1436 }
1437 
1438 
1439 
1440 void
us_in_hdy(init_data,detected,easter,year,hd_elems,fday,count)1441 us_in_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1442      Bool *init_data;
1443      const Bool detected;
1444      int easter;
1445      const int year;
1446      int *hd_elems;
1447      const int fday;
1448      const int count;
1449 /*!
1450    Manages all specific holidays celebrated in United States/Indiana.
1451 */
1452 {
1453   register int day;
1454 
1455 
1456   ptr_cc_id = "US_IN";
1457   observe_us_hdy = SASA_SUSU;
1458   use_other_cc = !use_other_cc;
1459   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1460   use_other_cc = !use_other_cc;
1461   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
1462 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
1463   day = eval_holiday (DAY_MIN, 10, year, DAY_MIN, TRUE) + DAY_MAX;
1464   holiday (*init_data, detected, _(hd_text[HD_COLUMBUS_DAY].ht_text),
1465 	   ptr_cc_id, "+", day, 10, year, hd_elems, fday, count);
1466   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1467 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1468   day = eval_holiday (DAY_MIN, 5, year, DAY_MIN, TRUE) + 1;
1469   holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1470 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
1471   day =
1472     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1473   holiday (*init_data, detected,
1474 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
1475 	   day, MONTH_MIN, year, hd_elems, fday, count);
1476   if (year > 1844)
1477     {
1478       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1479       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1480 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1481     }
1482 }
1483 
1484 
1485 
1486 void
us_ks_hdy(init_data,detected,easter,year,hd_elems,fday,count)1487 us_ks_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1488      Bool *init_data;
1489      const Bool detected;
1490      int easter;
1491      const int year;
1492      int *hd_elems;
1493      const int fday;
1494      const int count;
1495 /*!
1496    Manages all specific holidays celebrated in United States/Kansas.
1497 */
1498 {
1499   ptr_cc_id = "US_KS";
1500   observe_us_hdy = SAFR_SUMO;
1501   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1502 }
1503 
1504 
1505 
1506 void
us_ky_hdy(init_data,detected,easter,year,hd_elems,fday,count)1507 us_ky_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1508      Bool *init_data;
1509      const Bool detected;
1510      int easter;
1511      const int year;
1512      int *hd_elems;
1513      const int fday;
1514      const int count;
1515 /*!
1516    Manages all specific holidays celebrated in United States/Kentucky.
1517 */
1518 {
1519   ptr_cc_id = "US_KY";
1520   observe_us_hdy = SASA_SUSU;
1521   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1522   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
1523 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
1524   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1525 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1526 }
1527 
1528 
1529 
1530 void
us_la_hdy(init_data,detected,easter,year,hd_elems,fday,count)1531 us_la_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1532      Bool *init_data;
1533      const Bool detected;
1534      int easter;
1535      const int year;
1536      int *hd_elems;
1537      const int fday;
1538      const int count;
1539 /*!
1540    Manages all specific holidays celebrated in United States/Louisiana.
1541 */
1542 {
1543   register int day;
1544 
1545 
1546   ptr_cc_id = "US_LA";
1547   observe_us_hdy = SASA_SUMO;
1548   use_other_cc = !use_other_cc;
1549   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1550   use_other_cc = !use_other_cc;
1551   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1552 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1553   day =
1554     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1555   holiday (*init_data, detected,
1556 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
1557 	   day, MONTH_MIN, year, hd_elems, fday, count);
1558   holiday (*init_data, detected, _(hd_text[HD_SHROVE_TUESDAY].ht_text),
1559 	   ptr_cc_id, "+", easter - 47, 0, year, hd_elems, fday, count);
1560   if (year > 1844)
1561     {
1562       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1563       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1564 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1565     }
1566 }
1567 
1568 
1569 
1570 void
us_ma_hdy(init_data,detected,easter,year,hd_elems,fday,count)1571 us_ma_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1572      Bool *init_data;
1573      const Bool detected;
1574      int easter;
1575      const int year;
1576      int *hd_elems;
1577      const int fday;
1578      const int count;
1579 /*!
1580    Manages all specific holidays celebrated in United States/Massachusetts.
1581 */
1582 {
1583   register int day;
1584 
1585 
1586   ptr_cc_id = "US_MA";
1587   observe_us_hdy = SASA_SUSU;
1588   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1589   holiday (*init_data, detected, _(hd_text[HD_EVACUATION_DAY].ht_text),
1590 	   ptr_cc_id, DIS_HLS_PREF2, 17, 3, year, hd_elems, fday, count);
1591   holiday (*init_data, detected, _(hd_text[HD_BUNKER_HILL_DAY].ht_text),
1592 	   ptr_cc_id, DIS_HLS_PREF2, 17, 6, year, hd_elems, fday, count);
1593   day = eval_holiday (DAY_MIN, 4, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1594   holiday (*init_data, detected, _(hd_text[HD_PATRIOTS_DAY].ht_text),
1595 	   ptr_cc_id, "+", day, 4, year, hd_elems, fday, count);
1596 }
1597 
1598 
1599 
1600 void
us_md_hdy(init_data,detected,easter,year,hd_elems,fday,count)1601 us_md_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1602      Bool *init_data;
1603      const Bool detected;
1604      int easter;
1605      const int year;
1606      int *hd_elems;
1607      const int fday;
1608      const int count;
1609 /*!
1610    Manages all specific holidays celebrated in United States/Maryland.
1611 */
1612 {
1613   register int day;
1614 
1615 
1616   ptr_cc_id = "US_MD";
1617   observe_us_hdy = SASA_SUMO;
1618   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1619   day = 12;
1620   if (weekday_of_date (day, 9, year) == DAY_MAX)
1621     day++;
1622   holiday (*init_data, detected, _(hd_text[HD_DEFENDERS_DAY].ht_text),
1623 	   ptr_cc_id, "#", day, 9, year, hd_elems, fday, count);
1624   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1625 	   ptr_cc_id, "#", easter - 2, 0, year, hd_elems, fday, count);
1626   day = 25;
1627   if (weekday_of_date (day, 3, year) == DAY_MAX)
1628     day++;
1629   holiday (*init_data, detected, _(hd_text[HD_MARYLAND_DAY].ht_text),
1630 	   ptr_cc_id, "#", day, 3, year, hd_elems, fday, count);
1631   day = 12;
1632   if (weekday_of_date (day, 2, year) == DAY_MAX)
1633     day++;
1634   holiday (*init_data, detected,
1635 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "#",
1636 	   day, 2, year, hd_elems, fday, count);
1637   day = eval_holiday (DAY_MIN, 11, year, 4, TRUE) + (3 * DAY_MAX) + 1;
1638   holiday (*init_data, detected, _(hd_text[HD_THANKSGIVING_DAY].ht_text),
1639 	   ptr_cc_id, DIS_HLS_PREF2, day, 11, year, hd_elems, fday, count);
1640   if ((year > 1964) && !((1965 - year) & 3))
1641     {
1642       day = 20;
1643       if (weekday_of_date (day, MONTH_MIN, year) == DAY_MAX)
1644 	day++;
1645       holiday (*init_data, detected,
1646 	       _(hd_text[HD_PRESIDENTIAL_INAUGURATION].ht_text), ptr_cc_id,
1647 	       DIS_HLS_PREF2, day, MONTH_MIN, year, hd_elems, fday, count);
1648     }
1649   if (year > 1844)
1650     {
1651       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1652       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1653 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1654     }
1655 }
1656 
1657 
1658 
1659 void
us_me_hdy(init_data,detected,easter,year,hd_elems,fday,count)1660 us_me_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1661      Bool *init_data;
1662      const Bool detected;
1663      int easter;
1664      const int year;
1665      int *hd_elems;
1666      const int fday;
1667      const int count;
1668 /*!
1669    Manages all specific holidays celebrated in United States/Maine.
1670 */
1671 {
1672   register int day;
1673 
1674 
1675   ptr_cc_id = "US_ME";
1676   observe_us_hdy = SASA_SUMO;
1677   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1678   day = eval_holiday (DAY_MIN, 4, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1679   holiday (*init_data, detected, _(hd_text[HD_PATRIOTS_DAY].ht_text),
1680 	   ptr_cc_id, "+", day, 4, year, hd_elems, fday, count);
1681 }
1682 
1683 
1684 
1685 void
us_mi_hdy(init_data,detected,easter,year,hd_elems,fday,count)1686 us_mi_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1687      Bool *init_data;
1688      const Bool detected;
1689      int easter;
1690      const int year;
1691      int *hd_elems;
1692      const int fday;
1693      const int count;
1694 /*!
1695    Manages all specific holidays celebrated in United States/Michigan.
1696 */
1697 {
1698   ptr_cc_id = "US_MI";
1699   observe_us_hdy = SASA_SUSU;
1700   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1701   holiday (*init_data, detected,
1702 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1703 	   12, 2, year, hd_elems, fday, count);
1704   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
1705 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
1706 }
1707 
1708 
1709 
1710 void
us_mn_hdy(init_data,detected,easter,year,hd_elems,fday,count)1711 us_mn_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1712      Bool *init_data;
1713      const Bool detected;
1714      int easter;
1715      const int year;
1716      int *hd_elems;
1717      const int fday;
1718      const int count;
1719 /*!
1720    Manages all specific holidays celebrated in United States/Minnesota.
1721 */
1722 {
1723   ptr_cc_id = "US_MN";
1724   observe_us_hdy = SAFR_SUMO;
1725   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1726 }
1727 
1728 
1729 
1730 void
us_mo_hdy(init_data,detected,easter,year,hd_elems,fday,count)1731 us_mo_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1732      Bool *init_data;
1733      const Bool detected;
1734      int easter;
1735      const int year;
1736      int *hd_elems;
1737      const int fday;
1738      const int count;
1739 /*!
1740    Manages all specific holidays celebrated in United States/Missouri.
1741 */
1742 {
1743   ptr_cc_id = "US_MO";
1744   observe_us_hdy = SASA_SUSU;
1745   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1746   holiday (*init_data, detected,
1747 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1748 	   12, 2, year, hd_elems, fday, count);
1749   holiday (*init_data, detected, _(hd_text[HD_TRUMAN_DAY].ht_text), ptr_cc_id,
1750 	   "+", 8, 5, year, hd_elems, fday, count);
1751 }
1752 
1753 
1754 
1755 void
us_ms_hdy(init_data,detected,easter,year,hd_elems,fday,count)1756 us_ms_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1757      Bool *init_data;
1758      const Bool detected;
1759      int easter;
1760      const int year;
1761      int *hd_elems;
1762      const int fday;
1763      const int count;
1764 /*!
1765    Manages all specific holidays celebrated in United States/Mississippi.
1766 */
1767 {
1768   register int day;
1769 
1770 
1771   ptr_cc_id = "US_MS";
1772   observe_us_hdy = SASA_SUSU;
1773   use_other_cc = !use_other_cc;
1774   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1775   use_other_cc = !use_other_cc;
1776   day =
1777     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1778   holiday (*init_data, detected,
1779 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
1780 	   day, MONTH_MIN, year, hd_elems, fday, count);
1781   day = eval_holiday (DAY_MIN, 2, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
1782   holiday (*init_data, detected, _(hd_text[HD_PRESIDENTS_DAY].ht_text),
1783 	   ptr_cc_id, "+", day, 2, year, hd_elems, fday, count);
1784   day = eval_holiday (DAY_MIN, 4, year, DAY_MIN, TRUE) + (3 * DAY_MAX);
1785   holiday (*init_data, detected, _(hd_text[HD_REMEMBRANCE_DAY].ht_text),
1786 	   ptr_cc_id, "+", day, 4, year, hd_elems, fday, count);
1787   day = eval_holiday (DAY_MIN, 11, year, 4, TRUE) + (3 * DAY_MAX) + 1;
1788   holiday (*init_data, detected, _(hd_text[HD_THANKSGIVING_DAY].ht_text),
1789 	   ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1790 }
1791 
1792 
1793 
1794 void
us_mt_hdy(init_data,detected,easter,year,hd_elems,fday,count)1795 us_mt_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1796      Bool *init_data;
1797      const Bool detected;
1798      int easter;
1799      const int year;
1800      int *hd_elems;
1801      const int fday;
1802      const int count;
1803 /*!
1804    Manages all specific holidays celebrated in United States/Montana.
1805 */
1806 {
1807   ptr_cc_id = "US_MT";
1808   observe_us_hdy = SASA_SUSU;
1809   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1810   if (year > 1844)
1811     {
1812       register int day;
1813 
1814 
1815       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1816       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1817 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1818     }
1819 }
1820 
1821 
1822 
1823 void
us_nc_hdy(init_data,detected,easter,year,hd_elems,fday,count)1824 us_nc_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1825      Bool *init_data;
1826      const Bool detected;
1827      int easter;
1828      const int year;
1829      int *hd_elems;
1830      const int fday;
1831      const int count;
1832 /*!
1833    Manages all specific holidays celebrated in United States/North Carolina.
1834 */
1835 {
1836   ptr_cc_id = "US_NC";
1837   observe_us_hdy = SASA_SUSU;
1838   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1839   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
1840 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
1841   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
1842 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
1843   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1844 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1845 }
1846 
1847 
1848 
1849 void
us_nd_hdy(init_data,detected,easter,year,hd_elems,fday,count)1850 us_nd_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1851      Bool *init_data;
1852      const Bool detected;
1853      int easter;
1854      const int year;
1855      int *hd_elems;
1856      const int fday;
1857      const int count;
1858 /*!
1859    Manages all specific holidays celebrated in United States/North Dakota.
1860 */
1861 {
1862   ptr_cc_id = "US_ND";
1863   observe_us_hdy = SASA_SUSU;
1864   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1865   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1866 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1867 }
1868 
1869 
1870 
1871 void
us_ne_hdy(init_data,detected,easter,year,hd_elems,fday,count)1872 us_ne_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1873      Bool *init_data;
1874      const Bool detected;
1875      int easter;
1876      const int year;
1877      int *hd_elems;
1878      const int fday;
1879      const int count;
1880 /*!
1881    Manages all specific holidays celebrated in United States/Nebraska.
1882 */
1883 {
1884   register int day;
1885 
1886 
1887   ptr_cc_id = "US_NE";
1888   observe_us_hdy = SASA_SUSU;
1889   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1890   day = eval_holiday (dvec[4 - 1], 4, year, 5, FALSE);
1891   holiday (*init_data, detected, _(hd_text[HD_ARBOR_DAY].ht_text),
1892 	   ptr_cc_id, "+", day, 4, year, hd_elems, fday, count);
1893 }
1894 
1895 
1896 
1897 void
us_nh_hdy(init_data,detected,easter,year,hd_elems,fday,count)1898 us_nh_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1899      Bool *init_data;
1900      const Bool detected;
1901      int easter;
1902      const int year;
1903      int *hd_elems;
1904      const int fday;
1905      const int count;
1906 /*!
1907    Manages all specific holidays celebrated in United States/New Hampshire.
1908 */
1909 {
1910   ptr_cc_id = "US_NH";
1911   observe_us_hdy = SASA_SUSU;
1912   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1913   if (year > 1844)
1914     {
1915       register int day;
1916 
1917 
1918       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1919       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1920 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1921     }
1922 }
1923 
1924 
1925 
1926 void
us_nj_hdy(init_data,detected,easter,year,hd_elems,fday,count)1927 us_nj_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1928      Bool *init_data;
1929      const Bool detected;
1930      int easter;
1931      const int year;
1932      int *hd_elems;
1933      const int fday;
1934      const int count;
1935 /*!
1936    Manages all specific holidays celebrated in United States/New Jersey.
1937 */
1938 {
1939   ptr_cc_id = "US_NJ";
1940   observe_us_hdy = SASA_SUSU;
1941   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1942   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
1943 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
1944   holiday (*init_data, detected,
1945 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
1946 	   12, 2, year, hd_elems, fday, count);
1947   if (year > 1844)
1948     {
1949       register int day;
1950 
1951 
1952       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
1953       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
1954 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
1955     }
1956 }
1957 
1958 
1959 
1960 void
us_nm_hdy(init_data,detected,easter,year,hd_elems,fday,count)1961 us_nm_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1962      Bool *init_data;
1963      const Bool detected;
1964      int easter;
1965      const int year;
1966      int *hd_elems;
1967      const int fday;
1968      const int count;
1969 /*!
1970    Manages all specific holidays celebrated in United States/New Mexico.
1971 */
1972 {
1973   ptr_cc_id = "US_NM";
1974   observe_us_hdy = SAFR_SUMO;
1975   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
1976 }
1977 
1978 
1979 
1980 void
us_nv_hdy(init_data,detected,easter,year,hd_elems,fday,count)1981 us_nv_hdy (init_data, detected, easter, year, hd_elems, fday, count)
1982      Bool *init_data;
1983      const Bool detected;
1984      int easter;
1985      const int year;
1986      int *hd_elems;
1987      const int fday;
1988      const int count;
1989 /*!
1990    Manages all specific holidays celebrated in United States/Nevada.
1991 */
1992 {
1993   register int day;
1994   register int i;
1995 
1996 
1997   ptr_cc_id = "US_NV";
1998   observe_us_hdy = SAFR_SUMO;
1999   use_other_cc = !use_other_cc;
2000   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2001   use_other_cc = !use_other_cc;
2002   day = eval_holiday (DAY_MIN, 11, year, 4, TRUE) + (3 * DAY_MAX) + 1;
2003   holiday (*init_data, detected, _(hd_text[HD_FAMILY_DAY].ht_text),
2004 	   ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
2005   day =
2006     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
2007   holiday (*init_data, detected,
2008 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
2009 	   day, MONTH_MIN, year, hd_elems, fday, count);
2010   day = day_of_year (dvec[10 - 1], 10, year);
2011   i = weekday_of_date (dvec[10 - 1], 10, year);
2012   if (i == DAY_MAX)
2013     day++;
2014   else if (i == 6)
2015     day--;
2016   holiday (*init_data, detected, _(hd_text[HD_NEVADA_DAY].ht_text),
2017 	   ptr_cc_id, "+", day, 0, year, hd_elems, fday, count);
2018   day = eval_holiday (DAY_MIN, 2, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
2019   holiday (*init_data, detected, _(hd_text[HD_PRESIDENTS_DAY].ht_text),
2020 	   ptr_cc_id, "+", day, 2, year, hd_elems, fday, count);
2021 }
2022 
2023 
2024 
2025 void
us_ny_hdy(init_data,detected,easter,year,hd_elems,fday,count)2026 us_ny_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2027      Bool *init_data;
2028      const Bool detected;
2029      int easter;
2030      const int year;
2031      int *hd_elems;
2032      const int fday;
2033      const int count;
2034 /*!
2035    Manages all specific holidays celebrated in United States/New York.
2036 */
2037 {
2038   ptr_cc_id = "US_NY";
2039   observe_us_hdy = SASA_SUSU;
2040   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2041   holiday (*init_data, detected,
2042 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
2043 	   12, 2, year, hd_elems, fday, count);
2044   if (year > 1844)
2045     {
2046       register int day;
2047 
2048 
2049       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
2050       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
2051 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
2052     }
2053 }
2054 
2055 
2056 
2057 void
us_oh_hdy(init_data,detected,easter,year,hd_elems,fday,count)2058 us_oh_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2059      Bool *init_data;
2060      const Bool detected;
2061      int easter;
2062      const int year;
2063      int *hd_elems;
2064      const int fday;
2065      const int count;
2066 /*!
2067    Manages all specific holidays celebrated in United States/Ohio.
2068 */
2069 {
2070   ptr_cc_id = "US_OH";
2071   observe_us_hdy = SAFR_SUMO;
2072   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2073 }
2074 
2075 
2076 
2077 void
us_ok_hdy(init_data,detected,easter,year,hd_elems,fday,count)2078 us_ok_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2079      Bool *init_data;
2080      const Bool detected;
2081      int easter;
2082      const int year;
2083      int *hd_elems;
2084      const int fday;
2085      const int count;
2086 /*!
2087    Manages all specific holidays celebrated in United States/Oklahoma.
2088 */
2089 {
2090   ptr_cc_id = "US_OK";
2091   observe_us_hdy = SAFR_SUMO;
2092   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2093 }
2094 
2095 
2096 
2097 void
us_or_hdy(init_data,detected,easter,year,hd_elems,fday,count)2098 us_or_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2099      Bool *init_data;
2100      const Bool detected;
2101      int easter;
2102      const int year;
2103      int *hd_elems;
2104      const int fday;
2105      const int count;
2106 /*!
2107    Manages all specific holidays celebrated in United States/Oregon.
2108 */
2109 {
2110   ptr_cc_id = "US_OR";
2111   observe_us_hdy = SAFR_SUMO;
2112   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2113 }
2114 
2115 
2116 
2117 void
us_pa_hdy(init_data,detected,easter,year,hd_elems,fday,count)2118 us_pa_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2119      Bool *init_data;
2120      const Bool detected;
2121      int easter;
2122      const int year;
2123      int *hd_elems;
2124      const int fday;
2125      const int count;
2126 /*!
2127    Manages all specific holidays celebrated in United States/Pennsylvania.
2128 */
2129 {
2130   ptr_cc_id = "US_PA";
2131   observe_us_hdy = SASA_SUSU;
2132   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2133   holiday (*init_data, detected, _(hd_text[HD_FLAG_DAY].ht_text),
2134 	   ptr_cc_id, "+", 14, 6, year, hd_elems, fday, count);
2135   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
2136 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
2137   holiday (*init_data, detected,
2138 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
2139 	   12, 2, year, hd_elems, fday, count);
2140 }
2141 
2142 
2143 
2144 void
us_ri_hdy(init_data,detected,easter,year,hd_elems,fday,count)2145 us_ri_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2146      Bool *init_data;
2147      const Bool detected;
2148      int easter;
2149      const int year;
2150      int *hd_elems;
2151      const int fday;
2152      const int count;
2153 /*!
2154    Manages all specific holidays celebrated in United States/Rhode Island.
2155 */
2156 {
2157   register int day;
2158   register int i;
2159 
2160 
2161   ptr_cc_id = "US_RI";
2162   observe_us_hdy = SAMO_SUMO;
2163   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2164   day = 4;
2165   i = weekday_of_date (day, 5, year);
2166   if (i > 5)
2167     day += ((DAY_MAX - i) + 1);
2168   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
2169 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
2170   day = eval_holiday (DAY_MIN, 8, year, DAY_MIN, TRUE) + DAY_MAX;
2171   holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text),
2172 	   ptr_cc_id, "+", day, 8, year, hd_elems, fday, count);
2173   if (year > 1844)
2174     {
2175       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
2176       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
2177 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
2178     }
2179 }
2180 
2181 
2182 
2183 void
us_sc_hdy(init_data,detected,easter,year,hd_elems,fday,count)2184 us_sc_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2185      Bool *init_data;
2186      const Bool detected;
2187      int easter;
2188      const int year;
2189      int *hd_elems;
2190      const int fday;
2191      const int count;
2192 /*!
2193    Manages all specific holidays celebrated in United States/South Carolina.
2194 */
2195 {
2196   ptr_cc_id = "US_SC";
2197   observe_us_hdy = SASA_SUSU;
2198   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2199   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
2200 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
2201   if (year > 1844)
2202     {
2203       register int day;
2204 
2205 
2206       day = eval_holiday (DAY_MIN, 11, year, DAY_MIN, TRUE) + 1;
2207       holiday (*init_data, detected, _(hd_text[HD_ELECTION_DAY].ht_text),
2208 	       ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
2209     }
2210 }
2211 
2212 
2213 
2214 void
us_sd_hdy(init_data,detected,easter,year,hd_elems,fday,count)2215 us_sd_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2216      Bool *init_data;
2217      const Bool detected;
2218      int easter;
2219      const int year;
2220      int *hd_elems;
2221      const int fday;
2222      const int count;
2223 /*!
2224    Manages all specific holidays celebrated in United States/South Dakota.
2225 */
2226 {
2227   ptr_cc_id = "US_SD";
2228   observe_us_hdy = SAFR_SUMO;
2229   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2230 }
2231 
2232 
2233 
2234 void
us_tn_hdy(init_data,detected,easter,year,hd_elems,fday,count)2235 us_tn_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2236      Bool *init_data;
2237      const Bool detected;
2238      int easter;
2239      const int year;
2240      int *hd_elems;
2241      const int fday;
2242      const int count;
2243 /*!
2244    Manages all specific holidays celebrated in United States/Tennessee.
2245 */
2246 {
2247   ptr_cc_id = "US_TN";
2248   observe_us_hdy = SAFR_SUMO;
2249   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2250 }
2251 
2252 
2253 
2254 void
us_tx_hdy(init_data,detected,easter,year,hd_elems,fday,count)2255 us_tx_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2256      Bool *init_data;
2257      const Bool detected;
2258      int easter;
2259      const int year;
2260      int *hd_elems;
2261      const int fday;
2262      const int count;
2263 /*!
2264    Manages all specific holidays celebrated in United States/Texas.
2265 */
2266 {
2267   register int day;
2268 
2269 
2270   ptr_cc_id = "US_TX";
2271   observe_us_hdy = SASA_SUSU;
2272   use_other_cc = !use_other_cc;
2273   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2274   use_other_cc = !use_other_cc;
2275   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
2276 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
2277   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
2278 	   ptr_cc_id, "+", 24, MONTH_MAX, year, hd_elems, fday, count);
2279   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
2280 	   ptr_cc_id, "+", 2, 3, year, hd_elems, fday, count);
2281   holiday (*init_data, detected, _(hd_text[HD_LYNDON_B_JOHNSON_DAY].ht_text),
2282 	   ptr_cc_id, "+", 27, 8, year, hd_elems, fday, count);
2283   day =
2284     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
2285   holiday (*init_data, detected,
2286 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
2287 	   day, MONTH_MIN, year, hd_elems, fday, count);
2288   day = eval_holiday (DAY_MIN, 2, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
2289   holiday (*init_data, detected, _(hd_text[HD_PRESIDENTS_DAY].ht_text),
2290 	   ptr_cc_id, "+", day, 2, year, hd_elems, fday, count);
2291   holiday (*init_data, detected, _(hd_text[HD_SAN_JACINTO_DAY].ht_text),
2292 	   ptr_cc_id, "+", 21, 4, year, hd_elems, fday, count);
2293   holiday (*init_data, detected, _(hd_text[HD_SLAVE_LIBERATION_DAY].ht_text),
2294 	   ptr_cc_id, "+", 19, 6, year, hd_elems, fday, count);
2295 }
2296 
2297 
2298 
2299 void
us_ut_hdy(init_data,detected,easter,year,hd_elems,fday,count)2300 us_ut_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2301      Bool *init_data;
2302      const Bool detected;
2303      int easter;
2304      const int year;
2305      int *hd_elems;
2306      const int fday;
2307      const int count;
2308 /*!
2309    Manages all specific holidays celebrated in United States/Utah.
2310 */
2311 {
2312   register int day;
2313   register int i;
2314 
2315 
2316   ptr_cc_id = "US_UT";
2317   observe_us_hdy = SAFR_SUMO;
2318   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2319   day = 24;
2320   i = weekday_of_date (day, 7, year);
2321   if (i == DAY_MAX)
2322     day++;
2323   else if (i == 6)
2324     day--;
2325   holiday (*init_data, detected, _(hd_text[HD_PIONEER_DAY].ht_text),
2326 	   ptr_cc_id, "+", day, 7, year, hd_elems, fday, count);
2327 }
2328 
2329 
2330 
2331 void
us_va_hdy(init_data,detected,easter,year,hd_elems,fday,count)2332 us_va_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2333      Bool *init_data;
2334      const Bool detected;
2335      int easter;
2336      const int year;
2337      int *hd_elems;
2338      const int fday;
2339      const int count;
2340 /*!
2341    Manages all specific holidays celebrated in United States/Virginia.
2342 */
2343 {
2344   ptr_cc_id = "US_VA";
2345   observe_us_hdy = SAFR_SUMO;
2346   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2347   if ((year > 1964) && !((1965 - year) & 3))
2348     {
2349       register int day;
2350 
2351 
2352       day = 20;
2353       if (weekday_of_date (day, MONTH_MIN, year) == DAY_MAX)
2354 	day++;
2355       holiday (*init_data, detected,
2356 	       _(hd_text[HD_PRESIDENTIAL_INAUGURATION].ht_text), ptr_cc_id,
2357 	       DIS_HLS_PREF2, day, MONTH_MIN, year, hd_elems, fday, count);
2358     }
2359 }
2360 
2361 
2362 
2363 void
us_vt_hdy(init_data,detected,easter,year,hd_elems,fday,count)2364 us_vt_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2365      Bool *init_data;
2366      const Bool detected;
2367      int easter;
2368      const int year;
2369      int *hd_elems;
2370      const int fday;
2371      const int count;
2372 /*!
2373    Manages all specific holidays celebrated in United States/Vermont.
2374 */
2375 {
2376   register int day;
2377   register int i;
2378 
2379 
2380   ptr_cc_id = "US_VT";
2381   observe_us_hdy = SAFR_SUMO;
2382   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2383   day = 16;
2384   i = weekday_of_date (day, 8, year);
2385   if (i == DAY_MAX)
2386     day++;
2387   else if (i == 6)
2388     day--;
2389   holiday (*init_data, detected, _(hd_text[HD_BENNINGTON_BATTLE_DAY].ht_text),
2390 	   ptr_cc_id, "+", day, 8, year, hd_elems, fday, count);
2391   day = 12;
2392   i = weekday_of_date (day, 2, year);
2393   if (i == DAY_MAX)
2394     day++;
2395   else if (i == 6)
2396     day--;
2397   holiday (*init_data, detected,
2398 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
2399 	   day, 2, year, hd_elems, fday, count);
2400   day = eval_holiday (DAY_MIN, 3, year, 2, TRUE);
2401   holiday (*init_data, detected, _(hd_text[HD_TOWN_MEETING_DAY].ht_text),
2402 	   ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
2403 }
2404 
2405 
2406 
2407 void
us_wa_hdy(init_data,detected,easter,year,hd_elems,fday,count)2408 us_wa_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2409      Bool *init_data;
2410      const Bool detected;
2411      int easter;
2412      const int year;
2413      int *hd_elems;
2414      const int fday;
2415      const int count;
2416 /*!
2417    Manages all specific holidays celebrated in United States/Washington.
2418 */
2419 {
2420   ptr_cc_id = "US_WA";
2421   observe_us_hdy = SASA_SUSU;
2422   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2423   holiday (*init_data, detected, _(hd_text[HD_SHROVE_TUESDAY].ht_text),
2424 	   ptr_cc_id, DIS_HLS_PREF2, easter - 47, 0, year, hd_elems, fday,
2425 	   count);
2426   holiday (*init_data, detected,
2427 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
2428 	   12, 2, year, hd_elems, fday, count);
2429 }
2430 
2431 
2432 
2433 void
us_wi_hdy(init_data,detected,easter,year,hd_elems,fday,count)2434 us_wi_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2435      Bool *init_data;
2436      const Bool detected;
2437      int easter;
2438      const int year;
2439      int *hd_elems;
2440      const int fday;
2441      const int count;
2442 /*!
2443    Manages all specific holidays celebrated in United States/Wisconsin.
2444 */
2445 {
2446   ptr_cc_id = "US_WI";
2447   observe_us_hdy = SAFR_SUMO;
2448   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2449 }
2450 
2451 
2452 
2453 void
us_wv_hdy(init_data,detected,easter,year,hd_elems,fday,count)2454 us_wv_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2455      Bool *init_data;
2456      const Bool detected;
2457      int easter;
2458      const int year;
2459      int *hd_elems;
2460      const int fday;
2461      const int count;
2462 /*!
2463    Manages all specific holidays celebrated in United States/West Virginia.
2464 */
2465 {
2466   register int day;
2467   register int i;
2468 
2469 
2470   ptr_cc_id = "US_WV";
2471   observe_us_hdy = SAFR_SUMO;
2472   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2473   day = 24;
2474   i = weekday_of_date (day, MONTH_MAX, year);
2475   if (i == DAY_MAX)
2476     day++;
2477   else if (i == 6)
2478     day--;
2479   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
2480 	   ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
2481   day = 12;
2482   i = weekday_of_date (day, 2, year);
2483   if (i == DAY_MAX)
2484     day++;
2485   else if (i == 6)
2486     day--;
2487   holiday (*init_data, detected,
2488 	   _(hd_text[HD_PRESIDENT_LINCOLNS_BIRTHDAY].ht_text), ptr_cc_id, "+",
2489 	   day, 2, year, hd_elems, fday, count);
2490   day = 20;
2491   i = weekday_of_date (day, 6, year);
2492   if (i == DAY_MAX)
2493     day++;
2494   else if (i == 6)
2495     day--;
2496   holiday (*init_data, detected, _(hd_text[HD_WEST_VIRGINIA_DAY].ht_text),
2497 	   ptr_cc_id, "+", day, 6, year, hd_elems, fday, count);
2498   day = dvec[MONTH_MAX - 1];
2499   i = weekday_of_date (day, MONTH_MAX, year);
2500   if (i == DAY_MAX)
2501     i = SPECIAL_VALUE;
2502   else if (i == 6)
2503     day--;
2504   if (i != SPECIAL_VALUE)
2505     holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text),
2506 	     ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
2507   if (weekday_of_date (dvec[MONTH_MAX - 1], MONTH_MAX, year - 1) == DAY_MAX)
2508     holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text),
2509 	     ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
2510 }
2511 
2512 
2513 
2514 void
us_wy_hdy(init_data,detected,easter,year,hd_elems,fday,count)2515 us_wy_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2516      Bool *init_data;
2517      const Bool detected;
2518      int easter;
2519      const int year;
2520      int *hd_elems;
2521      const int fday;
2522      const int count;
2523 /*!
2524    Manages all specific holidays celebrated in United States/Wyoming.
2525 */
2526 {
2527   ptr_cc_id = "US_WY";
2528   observe_us_hdy = SAFR_SUMO;
2529   us_hdy (init_data, detected, easter, year, hd_elems, fday, count);
2530 }
2531 
2532 
2533 
2534 void
uy_hdy(init_data,detected,easter,year,hd_elems,fday,count)2535 uy_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2536      Bool *init_data;
2537      const Bool detected;
2538      int easter;
2539      const int year;
2540      int *hd_elems;
2541      const int fday;
2542      const int count;
2543 /*!
2544    Manages all specific holidays celebrated in Uruguay.
2545 */
2546 {
2547   register int i;
2548 
2549 
2550   ptr_cc_id = "UY";
2551   holiday (*init_data, detected, _(hd_text[HD_BATTLE_OF_LAS_PIEDRAS].ht_text),
2552 	   ptr_cc_id, "+", 18, 5, year, hd_elems, fday, count);
2553   if (*init_data)
2554     *init_data = FALSE;
2555   holiday (*init_data, detected, _(hd_text[HD_ARTIGAS_BIRTHDAY].ht_text),
2556 	   ptr_cc_id, "+", 19, 6, year, hd_elems, fday, count);
2557   holiday (*init_data, detected, _(hd_text[HD_BLESSING_OF_THE_WATER].ht_text),
2558 	   ptr_cc_id, DIS_HLS_PREF, 8, MONTH_MAX, year, hd_elems, fday,
2559 	   count);
2560   holiday (*init_data, detected, _(hd_text[HD_EXPEDITION_OF_THE_33].ht_text),
2561 	   ptr_cc_id, "+", 19, 4, year, hd_elems, fday, count);
2562   holiday (*init_data, detected, _(hd_text[HD_ALL_SAINTS_DAY].ht_text),
2563 	   ptr_cc_id, "+", DAY_MIN, 11, year, hd_elems, fday, count);
2564   holiday (*init_data, detected, _(hd_text[HD_ALL_SOULS_DAY].ht_text),
2565 	   ptr_cc_id, DIS_HLS_PREF, 2, 11, year, hd_elems, fday, count);
2566   for (i = 2; i; i--)
2567     holiday (*init_data, detected, _(hd_text[HD_CARNIVAL].ht_text),
2568 	     ptr_cc_id, DIS_HLS_PREF, easter - 46 - i, 0, year, hd_elems,
2569 	     fday, count);
2570   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
2571 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
2572   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
2573 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
2574 	   count);
2575   holiday (*init_data, detected, _(hd_text[HD_COLUMBUS_DAY].ht_text),
2576 	   ptr_cc_id, "+", 12, 10, year, hd_elems, fday, count);
2577   holiday (*init_data, detected,
2578 	   _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id, "+",
2579 	   18, 7, year, hd_elems, fday, count);
2580   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
2581 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
2582   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
2583 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
2584   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
2585 	   ptr_cc_id, "+", easter - 1, 0, year, hd_elems, fday, count);
2586   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
2587 	   ptr_cc_id, "+", 25, 8, year, hd_elems, fday, count);
2588   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
2589 	   "+", DAY_MIN, 5, year, hd_elems, fday, count);
2590   holiday (*init_data, detected, _(hd_text[HD_MAUNDY_THURSDAY].ht_text),
2591 	   ptr_cc_id, "+", easter - 3, 0, year, hd_elems, fday, count);
2592   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
2593 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
2594   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
2595 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
2596 	   count);
2597   holiday (*init_data, detected, _(hd_text[HD_THREE_KINGS_DAY].ht_text),
2598 	   ptr_cc_id, "+", 6, MONTH_MIN, year, hd_elems, fday, count);
2599 }
2600 
2601 
2602 
2603 void
uz_hdy(init_data,detected,easter,year,hd_elems,fday,count)2604 uz_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2605      Bool *init_data;
2606      const Bool detected;
2607      int easter;
2608      const int year;
2609      int *hd_elems;
2610      const int fday;
2611      const int count;
2612 /*!
2613    Manages all specific holidays celebrated in Uzbekistan.
2614 */
2615 {
2616   auto int d;
2617   auto int greg_diff;
2618 
2619 
2620   ptr_cc_id = "UZ";
2621   use_other_cc = !use_other_cc;
2622   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
2623   persian_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
2624   use_other_cc = !use_other_cc;
2625   if ((year > 1916) && (year < 1991))
2626     {
2627       holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
2628 	       ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday,
2629 	       count);
2630       holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
2631 	       ptr_cc_id, "+", DAY_MIN, 5, year, hd_elems, fday, count);
2632       holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text),
2633 	       ptr_cc_id, "+", 8, 3, year, hd_elems, fday, count);
2634       if (year > 1944)
2635 	holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text),
2636 		 ptr_cc_id, "+", 9, 5, year, hd_elems, fday, count);
2637     }
2638   if (year > 1990)
2639     {
2640       holiday (*init_data, detected,
2641 	       _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id,
2642 	       "+", 3, MONTH_MAX, year, hd_elems, fday, count);
2643       holiday (*init_data, detected, _(hd_text[HD_FLAG_DAY].ht_text),
2644 	       ptr_cc_id, "+", 18, 11, year, hd_elems, fday, count);
2645       holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
2646 	       ptr_cc_id, "+", DAY_MIN, 9, year, hd_elems, fday, count);
2647     }
2648 
2649   /*
2650      The Christians in Uzbekistan compute all holiday dates which are
2651      depending on Easter Sunday's date in the way done by the
2652      Orthodox Christian Eastern churches old calendar.
2653    */
2654   easter = orthodox_easter (year, &greg_diff, 1924, 3, 10, 22);
2655   d = DAY_MIN;
2656   if (year != 1924)
2657     d += greg_diff;
2658   holiday (*init_data, detected,
2659 	   _(hd_text[HD_ORTHODOX_NEW_YEARS_DAY].ht_text), ptr_cc_id,
2660 	   DIS_HLS_PREF2, d, 0, year, hd_elems, fday, count);
2661   if (year != 1924)
2662     {
2663       register int i;
2664       auto int m;
2665       auto int y;
2666 
2667 
2668       d = 25;
2669       m = MONTH_MAX;
2670       y = year - 1;
2671       for (i = 0; i < greg_diff; i++)
2672 	(void) next_date (&d, &m, &y);
2673       holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
2674 	       ptr_cc_id, DIS_HLS_PREF2, d, m, year, hd_elems, fday, count);
2675     }
2676   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
2677 	   ptr_cc_id, DIS_HLS_PREF2, easter, 0, year, hd_elems, fday, count);
2678   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
2679 	   ptr_cc_id, DIS_HLS_PREF2, easter - 2, 0, year, hd_elems, fday,
2680 	   count);
2681 }
2682 
2683 
2684 
2685 void
vc_hdy(init_data,detected,easter,year,hd_elems,fday,count)2686 vc_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2687      Bool *init_data;
2688      const Bool detected;
2689      int easter;
2690      const int year;
2691      int *hd_elems;
2692      const int fday;
2693      const int count;
2694 /*!
2695    Manages all specific holidays celebrated in St Vincent and Grenadines.
2696 */
2697 {
2698   register int day;
2699 
2700 
2701   ptr_cc_id = "VC";
2702   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
2703 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
2704   if (*init_data)
2705     *init_data = FALSE;
2706   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
2707 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
2708 	   count);
2709   day = eval_holiday (DAY_MIN, 7, year, DAY_MIN, TRUE);
2710   holiday (*init_data, detected, _(hd_text[HD_CARICOM_DAY].ht_text),
2711 	   ptr_cc_id, DIS_HLS_PREF, day, 7, year, hd_elems, fday, count);
2712   day = eval_holiday (DAY_MIN, 7, year, 2, TRUE);
2713   holiday (*init_data, detected, _(hd_text[HD_CARNIVAL].ht_text),
2714 	   ptr_cc_id, DIS_HLS_PREF, day, 7, year, hd_elems, fday, count);
2715   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
2716 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
2717   day = eval_holiday (DAY_MIN, 5, year, DAY_MIN, TRUE);
2718   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
2719 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
2720   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HEROES_DAY].ht_text),
2721 	   ptr_cc_id, "+", 22, MONTH_MIN, year, hd_elems, fday, count);
2722   day = eval_holiday (DAY_MIN, 8, year, DAY_MIN, TRUE);
2723   holiday (*init_data, detected, _(hd_text[HD_SLAVE_LIBERATION_DAY].ht_text),
2724 	   ptr_cc_id, "+", day, 8, year, hd_elems, fday, count);
2725   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
2726 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
2727 	   count);
2728   if (year > 1978)
2729     holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
2730 	     ptr_cc_id, "+", 27, 10, year, hd_elems, fday, count);
2731   base_christian_hdy (init_data, detected, easter, year, hd_elems, fday,
2732 		      count, ptr_cc_id);
2733 }
2734 
2735 
2736 
2737 void
ve_hdy(init_data,detected,easter,year,hd_elems,fday,count)2738 ve_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2739      Bool *init_data;
2740      const Bool detected;
2741      int easter;
2742      const int year;
2743      int *hd_elems;
2744      const int fday;
2745      const int count;
2746 /*!
2747    Manages all specific holidays celebrated in Venezuela.
2748 */
2749 {
2750   auto int day;
2751   auto int month;
2752   register int i;
2753 
2754 
2755   ptr_cc_id = "VE";
2756   holiday (*init_data, detected, _(hd_text[HD_BATTLE_OF_CARABOBO].ht_text),
2757 	   ptr_cc_id, "+", 24, 6, year, hd_elems, fday, count);
2758   if (*init_data)
2759     *init_data = FALSE;
2760   day = DAY_MIN;
2761   i = weekday_of_date (day, 11, year);
2762   if ((i > DAY_MIN) && (i < 5))
2763     day += ((DAY_MAX - i) + 1);
2764   holiday (*init_data, detected, _(hd_text[HD_ALL_SAINTS_DAY].ht_text),
2765 	   ptr_cc_id, DIS_HLS_PREF2, day, 11, year, hd_elems, fday, count);
2766   for (day = 2; day; day--)
2767     holiday (*init_data, detected, _(hd_text[HD_CARNIVAL].ht_text),
2768 	     ptr_cc_id, "+", easter - 46 - day, 0, year, hd_elems, fday,
2769 	     count);
2770   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
2771 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
2772   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
2773 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
2774 	   count);
2775   (void) doy2date (easter + 39, (days_of_february (year) == 29), &day,
2776 		   &month);
2777   i = weekday_of_date (day, month, year);
2778   if ((i > DAY_MIN) && (i < 5))
2779     day = easter + 39 + (DAY_MAX - i) + 1;
2780   holiday (*init_data, detected, _(hd_text[HD_CHRISTS_ASCENSION_DAY].ht_text),
2781 	   ptr_cc_id, DIS_HLS_PREF2, day, 0, year, hd_elems, fday, count);
2782   holiday (*init_data, detected, _(hd_text[HD_COLUMBUS_DAY].ht_text),
2783 	   ptr_cc_id, "+", 12, 10, year, hd_elems, fday, count);
2784   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
2785 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
2786   holiday (*init_data, detected,
2787 	   _(hd_text[HD_FEAST_OF_CORPUS_CHRISTI].ht_text), ptr_cc_id, "+",
2788 	   easter + 60, 0, year, hd_elems, fday, count);
2789   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
2790 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
2791   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
2792 	   ptr_cc_id, "+", 5, 7, year, hd_elems, fday, count);
2793   holiday (*init_data, detected,
2794 	   _(hd_text[HD_INDEPENDENCE_PROCLAMATION].ht_text), ptr_cc_id, "+",
2795 	   19, 4, year, hd_elems, fday, count);
2796   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
2797 	   "+", DAY_MIN, 5, year, hd_elems, fday, count);
2798   day = 15;
2799   i = weekday_of_date (day, 8, year);
2800   if ((i > DAY_MIN) && (i < 5))
2801     day += ((DAY_MAX - i) + 1);
2802   holiday (*init_data, detected, _(hd_text[HD_MARYS_ASCENSION_DAY].ht_text),
2803 	   ptr_cc_id, DIS_HLS_PREF2, day, 8, year, hd_elems, fday, count);
2804   day = 8;
2805   i = weekday_of_date (day, MONTH_MAX, year);
2806   if ((i > DAY_MIN) && (i < 5))
2807     day += (DAY_MIN - i);
2808   holiday (*init_data, detected,
2809 	   _(hd_text[HD_MARYS_IMMACULATE_CONCEPTION].ht_text), ptr_cc_id,
2810 	   DIS_HLS_PREF2, day, MONTH_MAX, year, hd_elems, fday, count);
2811   holiday (*init_data, detected, _(hd_text[HD_MAUNDY_THURSDAY].ht_text),
2812 	   ptr_cc_id, "+", easter - 3, 0, year, hd_elems, fday, count);
2813   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
2814 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
2815   holiday (*init_data, detected, _(hd_text[HD_PALM_SUNDAY].ht_text),
2816 	   ptr_cc_id, "+", easter - DAY_MAX, 0, year, hd_elems, fday, count);
2817   holiday (*init_data, detected, _(hd_text[HD_SIMON_BOLIVAR_DAY].ht_text),
2818 	   ptr_cc_id, "+", 24, 7, year, hd_elems, fday, count);
2819   day = 19;
2820   i = weekday_of_date (day, 3, year);
2821   if ((i > DAY_MIN) && (i < 5))
2822     day += ((DAY_MAX - i) + 1);
2823   holiday (*init_data, detected, _(hd_text[HD_ST_JOSEPHS_DAY].ht_text),
2824 	   ptr_cc_id, DIS_HLS_PREF2, day, 3, year, hd_elems, fday, count);
2825   day = day_of_year (29, 6, year);
2826   i = weekday_of_date (29, 6, year);
2827   if ((i > DAY_MIN) && (i < 5))
2828     day += ((DAY_MAX - i) + 1);
2829   holiday (*init_data, detected, _(hd_text[HD_ST_PETER_AND_ST_PAUL].ht_text),
2830 	   ptr_cc_id, DIS_HLS_PREF2, day, 0, year, hd_elems, fday, count);
2831   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
2832 	   DIS_HLS_PREF2, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems,
2833 	   fday, count);
2834   day = 6;
2835   i = weekday_of_date (day, MONTH_MIN, year);
2836   if (i > 4)
2837     day += ((DAY_MAX - i) + 1);
2838   else
2839     day += (DAY_MIN - i);
2840   holiday (*init_data, detected, _(hd_text[HD_THREE_KINGS_DAY].ht_text),
2841 	   ptr_cc_id, DIS_HLS_PREF2, day, MONTH_MIN, year, hd_elems, fday,
2842 	   count);
2843 }
2844 
2845 
2846 
2847 void
vg_hdy(init_data,detected,easter,year,hd_elems,fday,count)2848 vg_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2849      Bool *init_data;
2850      const Bool detected;
2851      int easter;
2852      const int year;
2853      int *hd_elems;
2854      const int fday;
2855      const int count;
2856 /*!
2857    Manages all specific holidays celebrated in British Virgin Islands.
2858 */
2859 {
2860   register int day;
2861   register int i;
2862 
2863 
2864   ptr_cc_id = "VG";
2865   day = eval_holiday (DAY_MIN, 3, year, DAY_MIN, TRUE) + DAY_MAX;
2866   holiday (*init_data, detected, _(hd_text[HD_COMMONWEALTH_DAY].ht_text),
2867 	   ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
2868   if (*init_data)
2869     *init_data = FALSE;
2870   holiday (*init_data, detected, _(hd_text[HD_TERRITORY_DAY].ht_text),
2871 	   ptr_cc_id, "+", DAY_MIN, 7, year, hd_elems, fday, count);
2872   holiday (*init_data, detected, _(hd_text[HD_ST_URSULAS_DAY].ht_text),
2873 	   ptr_cc_id, "+", 21, 10, year, hd_elems, fday, count);
2874   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
2875 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
2876   day = eval_holiday (DAY_MIN, 8, year, DAY_MIN, TRUE);
2877   for (i = 0; i < 3; i++)
2878     holiday (*init_data, detected, _(hd_text[HD_CARNIVAL].ht_text),
2879 	     ptr_cc_id, "+", day + i, 8, year, hd_elems, fday, count);
2880   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
2881 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
2882 	   count);
2883   holiday (*init_data, detected,
2884 	   _(hd_text[HD_PRINCE_OF_WALES_BIRTHDAY].ht_text), ptr_cc_id, "+",
2885 	   14, 11, year, hd_elems, fday, count);
2886   day = eval_holiday (DAY_MIN, 6, year, 6, TRUE) + DAY_MAX;
2887   holiday (*init_data, detected, _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text),
2888 	   ptr_cc_id, "+", day, 6, year, hd_elems, fday, count);
2889   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
2890 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
2891 	   count);
2892   base_christian_hdy (init_data, detected, easter, year, hd_elems, fday,
2893 		      count, ptr_cc_id);
2894 }
2895 
2896 
2897 
2898 void
vi_hdy(init_data,detected,easter,year,hd_elems,fday,count)2899 vi_hdy (init_data, detected, easter, year, hd_elems, fday, count)
2900      Bool *init_data;
2901      const Bool detected;
2902      int easter;
2903      const int year;
2904      int *hd_elems;
2905      const int fday;
2906      const int count;
2907 /*!
2908    Manages all specific holidays celebrated in U.S. Virgin Islands.
2909 */
2910 {
2911   register int day;
2912   register int i;
2913 
2914 
2915   ptr_cc_id = "VI";
2916   holiday (*init_data, detected, _(hd_text[HD_TRANSFER_DAY].ht_text),
2917 	   ptr_cc_id, DIS_HLS_PREF, dvec[3 - 1], 3, year, hd_elems, fday,
2918 	   count);
2919   if (*init_data)
2920     *init_data = FALSE;
2921   day = eval_holiday (dvec[7 - 1], 7, year, DAY_MIN, FALSE) - DAY_MAX;
2922   holiday (*init_data, detected,
2923 	   _(hd_text[HD_HURRICANE_SUPPLICATION_DAY].ht_text), ptr_cc_id, "+",
2924 	   day, 7, year, hd_elems, fday, count);
2925   day = eval_holiday (dvec[10 - 1], 10, year, DAY_MIN, FALSE) - DAY_MAX;
2926   holiday (*init_data, detected,
2927 	   _(hd_text[HD_HURRICANE_THANKSGIVING_DAY].ht_text), ptr_cc_id, "+",
2928 	   day, 10, year, hd_elems, fday, count);
2929   holiday (*init_data, detected,
2930 	   _(hd_text[HD_BRINGING_IN_THE_HARVEST_DAY].ht_text), ptr_cc_id,
2931 	   DIS_HLS_PREF, 13, 11, year, hd_elems, fday, count);
2932   day = eval_holiday (dvec[4 - 1], 4, year, DAY_MAX, FALSE);
2933   for (i = 0; i < 2; i++)
2934     holiday (*init_data, detected, _(hd_text[HD_CARNIVAL].ht_text),
2935 	     ptr_cc_id, DIS_HLS_PREF, day - i, 4, year, hd_elems, fday,
2936 	     count);
2937   day = 25;
2938   i = weekday_of_date (day, MONTH_MAX, year);
2939   if (i == DAY_MAX)
2940     day++;
2941   else if (i == 6)
2942     day--;
2943   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
2944 	   ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
2945   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
2946 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
2947 	   count);
2948   day = eval_holiday (DAY_MIN, 10, year, DAY_MIN, TRUE) + DAY_MAX;
2949   holiday (*init_data, detected, _(hd_text[HD_COLUMBUS_DAY].ht_text),
2950 	   ptr_cc_id, DIS_HLS_PREF, day, 10, year, hd_elems, fday, count);
2951   day = eval_holiday (DAY_MIN, 6, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
2952   holiday (*init_data, detected,
2953 	   _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id, "+",
2954 	   day, 6, year, hd_elems, fday, count);
2955   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
2956 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
2957   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
2958 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
2959   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
2960 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
2961   day = weekday_of_date (4, 7, year);
2962   if (day == DAY_MAX)
2963     day = 5;
2964   else if (day != 6)
2965     day = 4;
2966   else
2967     day = 3;
2968   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
2969 	   ptr_cc_id, "+", day, 7, year, hd_elems, fday, count);
2970   day = eval_holiday (DAY_MIN, 9, year, DAY_MIN, TRUE);
2971   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
2972 	   ptr_cc_id, "+", day, 9, year, hd_elems, fday, count);
2973   holiday (*init_data, detected, _(hd_text[HD_LIBERTY_DAY].ht_text),
2974 	   ptr_cc_id, "+", DAY_MIN, 11, year, hd_elems, fday, count);
2975   day =
2976     eval_holiday (DAY_MIN, MONTH_MIN, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
2977   holiday (*init_data, detected,
2978 	   _(hd_text[HD_MARTIN_LUTHER_KINGS_DAY].ht_text), ptr_cc_id, "+",
2979 	   day, MONTH_MIN, year, hd_elems, fday, count);
2980   holiday (*init_data, detected, _(hd_text[HD_MAUNDY_THURSDAY].ht_text),
2981 	   ptr_cc_id, "+", easter - 3, 0, year, hd_elems, fday, count);
2982   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
2983 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
2984   day = eval_holiday (DAY_MIN, 2, year, DAY_MIN, TRUE) + (2 * DAY_MAX);
2985   holiday (*init_data, detected, _(hd_text[HD_PRESIDENTS_DAY].ht_text),
2986 	   ptr_cc_id, "+", day, 2, year, hd_elems, fday, count);
2987   day = eval_holiday (dvec[5 - 1], 5, year, DAY_MIN, FALSE);
2988   holiday (*init_data, detected, _(hd_text[HD_REMEMBRANCE_DAY].ht_text),
2989 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
2990   holiday (*init_data, detected, _(hd_text[HD_SLAVE_LIBERATION_DAY].ht_text),
2991 	   ptr_cc_id, "+", 3, 7, year, hd_elems, fday, count);
2992   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
2993 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
2994 	   count);
2995   day = eval_holiday (DAY_MIN, 11, year, 4, TRUE) + (3 * DAY_MAX);
2996   holiday (*init_data, detected, _(hd_text[HD_THANKSGIVING_DAY].ht_text),
2997 	   ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
2998   holiday (*init_data, detected, _(hd_text[HD_THREE_KINGS_DAY].ht_text),
2999 	   ptr_cc_id, "+", 6, MONTH_MIN, year, hd_elems, fday, count);
3000   day = 11;
3001   if (weekday_of_date (day, 11, year) == DAY_MAX)
3002     day++;
3003   holiday (*init_data, detected, _(hd_text[HD_VETERANS_DAY].ht_text),
3004 	   ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
3005 }
3006 
3007 
3008 
3009 void
vn_hdy(init_data,detected,easter,year,hd_elems,fday,count)3010 vn_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3011      Bool *init_data;
3012      const Bool detected;
3013      int easter;
3014      const int year;
3015      int *hd_elems;
3016      const int fday;
3017      const int count;
3018 /*!
3019    Manages all specific holidays celebrated in Viet Nam.
3020 */
3021 {
3022   ptr_cc_id = "VN";
3023   use_other_cc = !use_other_cc;
3024   chinese_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id,
3025 	       FALSE);
3026   use_other_cc = !use_other_cc;
3027   holiday (*init_data, detected, _(hd_text[HD_HO_CHI_MINHS_BIRTHDAY].ht_text),
3028 	   ptr_cc_id, "+", 19, 5, year, hd_elems, fday, count);
3029   holiday (*init_data, detected,
3030 	   _(hd_text[HD_FOUNDING_OF_THE_COMMUNIST_PARTY].ht_text), ptr_cc_id,
3031 	   "+", 3, 2, year, hd_elems, fday, count);
3032   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
3033 	   "+", DAY_MIN, 5, year, hd_elems, fday, count);
3034   holiday (*init_data, detected, _(hd_text[HD_LIBERATION_DAY].ht_text),
3035 	   ptr_cc_id, "+", dvec[4 - 1], 4, year, hd_elems, fday, count);
3036   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HOLIDAY].ht_text),
3037 	   ptr_cc_id, "+", 2, 9, year, hd_elems, fday, count);
3038   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3039 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
3040 }
3041 
3042 
3043 
3044 void
vu_hdy(init_data,detected,easter,year,hd_elems,fday,count)3045 vu_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3046      Bool *init_data;
3047      const Bool detected;
3048      int easter;
3049      const int year;
3050      int *hd_elems;
3051      const int fday;
3052      const int count;
3053 /*!
3054    Manages all specific holidays celebrated in Vanuatu.
3055 */
3056 {
3057   register int day;
3058 
3059 
3060   ptr_cc_id = "VU";
3061   day = 25;
3062   if (weekday_of_date (day, 9, year) == DAY_MAX)
3063     day++;
3064   holiday (*init_data, detected, _(hd_text[HD_CUSTOM_CHIEFS_DAY].ht_text),
3065 	   ptr_cc_id, "+", day, 9, year, hd_elems, fday, count);
3066   if (*init_data)
3067     *init_data = FALSE;
3068   day = 24;
3069   if (weekday_of_date (day, 7, year) == DAY_MAX)
3070     day++;
3071   holiday (*init_data, detected, _(hd_text[HD_CHILDRENS_DAY].ht_text),
3072 	   ptr_cc_id, "+", day, 7, year, hd_elems, fday, count);
3073   day = 25;
3074   if (weekday_of_date (day, MONTH_MAX, year) == DAY_MAX)
3075     day++;
3076   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
3077 	   ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
3078   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
3079 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
3080 	   count);
3081   holiday (*init_data, detected, _(hd_text[HD_CHRISTS_ASCENSION_DAY].ht_text),
3082 	   ptr_cc_id, "+", easter + 39, 0, year, hd_elems, fday, count);
3083   day = 5;
3084   if (weekday_of_date (day, 10, year) == DAY_MAX)
3085     day++;
3086   holiday (*init_data, detected,
3087 	   _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id, "+",
3088 	   day, 10, year, hd_elems, fday, count);
3089   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
3090 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
3091   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
3092 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3093   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
3094 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
3095   day = 26;
3096   if (weekday_of_date (day, MONTH_MAX, year) == DAY_MAX)
3097     day++;
3098   holiday (*init_data, detected, _(hd_text[HD_FAMILY_DAY].ht_text),
3099 	   ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
3100   day = 30;
3101   if (weekday_of_date (day, 7, year) == DAY_MAX)
3102     day++;
3103   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
3104 	   ptr_cc_id, "+", day, 7, year, hd_elems, fday, count);
3105   day = DAY_MIN;
3106   if (weekday_of_date (day, 5, year) == DAY_MAX)
3107     day++;
3108   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
3109 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
3110   day = 15;
3111   if (weekday_of_date (day, 8, year) == DAY_MAX)
3112     day++;
3113   holiday (*init_data, detected, _(hd_text[HD_MARYS_ASCENSION_DAY].ht_text),
3114 	   ptr_cc_id, "+", day, 8, year, hd_elems, fday, count);
3115   day = 29;
3116   if (weekday_of_date (day, 11, year) == DAY_MAX)
3117     day++;
3118   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_UNITY_DAY].ht_text),
3119 	   ptr_cc_id, "+", day, 11, year, hd_elems, fday, count);
3120   day = DAY_MIN;
3121   if (weekday_of_date (day, MONTH_MIN, year) == DAY_MAX)
3122     day++;
3123   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3124 	   ptr_cc_id, "+", day, MONTH_MIN, year, hd_elems, fday, count);
3125   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
3126 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
3127 	   count);
3128 }
3129 
3130 
3131 
3132 void
wf_hdy(init_data,detected,easter,year,hd_elems,fday,count)3133 wf_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3134      Bool *init_data;
3135      const Bool detected;
3136      int easter;
3137      const int year;
3138      int *hd_elems;
3139      const int fday;
3140      const int count;
3141 /*!
3142    Manages all specific holidays celebrated in Wallis and Futuna Islands.
3143 */
3144 {
3145   ptr_cc_id = "WF";
3146   use_other_cc = !use_other_cc;
3147   fr_hdy (init_data, detected, easter, year, hd_elems, fday, count);
3148   use_other_cc = !use_other_cc;
3149 }
3150 
3151 
3152 
3153 void
ws_hdy(init_data,detected,easter,year,hd_elems,fday,count)3154 ws_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3155      Bool *init_data;
3156      const Bool detected;
3157      int easter;
3158      const int year;
3159      int *hd_elems;
3160      const int fday;
3161      const int count;
3162 /*!
3163    Manages all specific holidays celebrated in (Western) Samoa.
3164 */
3165 {
3166   register int day;
3167 
3168 
3169   ptr_cc_id = "WS";
3170   day = eval_holiday (DAY_MIN, 10, year, DAY_MAX, TRUE) + DAY_MAX;
3171   holiday (*init_data, detected,
3172 	   _(hd_text[HD_CHILDRENS_WHITE_SUNDAY].ht_text), ptr_cc_id,
3173 	   DIS_HLS_PREF, day, 10, year, hd_elems, fday, count);
3174   if (*init_data)
3175     *init_data = FALSE;
3176   holiday (*init_data, detected, _(hd_text[HD_CIVIC_HOLIDAY].ht_text),
3177 	   ptr_cc_id, "+", day + 1, 10, year, hd_elems, fday, count);
3178   holiday (*init_data, detected, _(hd_text[HD_ANZAC_DAY].ht_text),
3179 	   ptr_cc_id, "+", 25, 4, year, hd_elems, fday, count);
3180   holiday (*init_data, detected, _(hd_text[HD_ARBOR_DAY].ht_text),
3181 	   ptr_cc_id, "+", 3, 11, year, hd_elems, fday, count);
3182   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
3183 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
3184   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
3185 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
3186   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
3187 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
3188 	   count);
3189   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
3190 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
3191   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
3192 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3193   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
3194 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
3195   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
3196 	   ptr_cc_id, "+", easter - 1, 0, year, hd_elems, fday, count);
3197   for (day = DAY_MIN; day <= 3; day++)
3198     holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
3199 	     ptr_cc_id, "+", day, 7, year, hd_elems, fday, count);
3200   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
3201 	   ptr_cc_id, "+", 7, 8, year, hd_elems, fday, count);
3202   holiday (*init_data, detected, _(hd_text[HD_MOTHERS_DAY].ht_text),
3203 	   ptr_cc_id, DIS_HLS_PREF, 15, 5, year, hd_elems, fday, count);
3204   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3205 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
3206   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text),
3207 	   ptr_cc_id, "+", dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems,
3208 	   fday, count);
3209   holiday (*init_data, detected, _(hd_text[HD_THE_KINGS_BIRTHDAY].ht_text),
3210 	   ptr_cc_id, DIS_HLS_PREF, 4, MONTH_MIN, year, hd_elems, fday,
3211 	   count);
3212   holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text), ptr_cc_id,
3213 	   "+", 24, 11, year, hd_elems, fday, count);
3214 }
3215 
3216 
3217 
3218 void
ye_hdy(init_data,detected,easter,year,hd_elems,fday,count)3219 ye_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3220      Bool *init_data;
3221      const Bool detected;
3222      int easter;
3223      const int year;
3224      int *hd_elems;
3225      const int fday;
3226      const int count;
3227 /*!
3228    Manages all specific holidays celebrated in Yemen.
3229 */
3230 {
3231   ptr_cc_id = "YE";
3232   use_other_cc = !use_other_cc;
3233   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
3234   use_other_cc = !use_other_cc;
3235   holiday (*init_data, detected, _(hd_text[HD_UNITY_FACTORY_DAY].ht_text),
3236 	   ptr_cc_id, "+", 7, 7, year, hd_elems, fday, count);
3237   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
3238 	   ptr_cc_id, "+", 30, 11, year, hd_elems, fday, count);
3239   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
3240 	   ptr_cc_id, "+", DAY_MIN, 5, year, hd_elems, fday, count);
3241   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_UNITY_DAY].ht_text),
3242 	   ptr_cc_id, "+", 22, 5, year, hd_elems, fday, count);
3243   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3244 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
3245   holiday (*init_data, detected, _(hd_text[HD_BANK_HOLIDAY].ht_text),
3246 	   ptr_cc_id, "+", dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems,
3247 	   fday, count);
3248   if (year > 1961)
3249     holiday (*init_data, detected, _(hd_text[HD_REVOLUTION_DAY].ht_text),
3250 	     ptr_cc_id, "+", 26, 9, year, hd_elems, fday, count);
3251   if (year > 1962)
3252     holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HOLIDAY].ht_text),
3253 	     ptr_cc_id, "+", 14, 10, year, hd_elems, fday, count);
3254 }
3255 
3256 
3257 
3258 void
yt_hdy(init_data,detected,easter,year,hd_elems,fday,count)3259 yt_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3260      Bool *init_data;
3261      const Bool detected;
3262      int easter;
3263      const int year;
3264      int *hd_elems;
3265      const int fday;
3266      const int count;
3267 /*!
3268    Manages all specific holidays celebrated in Mayotte.
3269 */
3270 {
3271   ptr_cc_id = "YT";
3272   use_other_cc = !use_other_cc;
3273   fr_hdy (init_data, detected, easter, year, hd_elems, fday, count);
3274   use_other_cc = !use_other_cc;
3275 }
3276 
3277 
3278 
3279 void
yu_hdy(init_data,detected,easter,year,hd_elems,fday,count)3280 yu_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3281      Bool *init_data;
3282      const Bool detected;
3283      int easter;
3284      const int year;
3285      int *hd_elems;
3286      const int fday;
3287      const int count;
3288 /*!
3289    Manages all specific holidays celebrated in Serbia and Montenegro.
3290 */
3291 {
3292   auto int d;
3293   auto int greg_diff;
3294 
3295 
3296   ptr_cc_id = "YU";
3297   use_other_cc = !use_other_cc;
3298   islamic_hdy (init_data, detected, year, hd_elems, fday, count, ptr_cc_id);
3299   use_other_cc = !use_other_cc;
3300   holiday (*init_data, detected, _(hd_text[HD_BELGRADES_DAY].ht_text),
3301 	   ptr_cc_id, DIS_HLS_PREF, 20, 10, year, hd_elems, fday, count);
3302   holiday (*init_data, detected,
3303 	   _(hd_text[HD_CONSTITUTION_ANNIVERSARY].ht_text), ptr_cc_id, "#",
3304 	   28, 3, year, hd_elems, fday, count);
3305   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
3306 	   "+", DAY_MIN, 5, year, hd_elems, fday, count);
3307   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HOLIDAY].ht_text),
3308 	   ptr_cc_id, "+", 27, 4, year, hd_elems, fday, count);
3309   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3310 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
3311   if (year > 1943)
3312     holiday (*init_data, detected, _(hd_text[HD_RE_DAY].ht_text),
3313 	     ptr_cc_id, "+", 11, MONTH_MIN, year, hd_elems, fday, count);
3314   /*
3315      The Christian Western churches holidays.
3316    */
3317   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
3318 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
3319 	   count);
3320   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
3321 	   ptr_cc_id, DIS_HLS_PREF, 25, MONTH_MAX, year, hd_elems, fday,
3322 	   count);
3323   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
3324 	   ptr_cc_id, DIS_HLS_PREF, easter, 0, year, hd_elems, fday, count);
3325   /*
3326      The Christians in Serbia and Montenegro compute all holiday dates
3327      which are depending on Easter Sunday's date in the way done by the
3328      Orthodox Christian Eastern churches old calendar.
3329    */
3330   easter = orthodox_easter (year, &greg_diff, 1924, 3, 10, 22);
3331   d = DAY_MIN;
3332   if (year != 1924)
3333     d += greg_diff;
3334   holiday (*init_data, detected,
3335 	   _(hd_text[HD_ORTHODOX_NEW_YEARS_DAY].ht_text), ptr_cc_id,
3336 	   DIS_HLS_PREF2, d, 0, year, hd_elems, fday, count);
3337   if (year != 1924)
3338     {
3339       register int i;
3340       auto int m;
3341       auto int y;
3342 
3343 
3344       d = 24;
3345       m = MONTH_MAX;
3346       y = year - 1;
3347       for (i = 0; i < greg_diff; i++)
3348 	(void) next_date (&d, &m, &y);
3349       holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
3350 	       ptr_cc_id, DIS_HLS_PREF2, d, m, year, hd_elems, fday, count);
3351       (void) next_date (&d, &m, &y);
3352       holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
3353 	       ptr_cc_id, "+", d, m, year, hd_elems, fday, count);
3354     }
3355   d = day_of_year (14, MONTH_MIN, year);
3356   if (year > 1924)
3357     d += greg_diff;
3358   holiday (*init_data, detected, _(hd_text[HD_JESUS_CIRCUMCISION].ht_text),
3359 	   ptr_cc_id, "+", d, 0, year, hd_elems, fday, count);
3360   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
3361 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3362 }
3363 
3364 
3365 
3366 void
za_hdy(init_data,detected,easter,year,hd_elems,fday,count)3367 za_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3368      Bool *init_data;
3369      const Bool detected;
3370      int easter;
3371      const int year;
3372      int *hd_elems;
3373      const int fday;
3374      const int count;
3375 /*!
3376    Manages all specific holidays celebrated in South Africa.
3377 */
3378 {
3379   register int day;
3380 
3381 
3382   ptr_cc_id = "ZA";
3383   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
3384 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3385   if (*init_data)
3386     *init_data = FALSE;
3387   holiday (*init_data, detected, _(hd_text[HD_FAMILY_DAY].ht_text),
3388 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
3389   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
3390 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
3391   day = DAY_MIN;
3392   if (weekday_of_date (day, 5, year) == DAY_MAX)
3393     day++;
3394   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
3395 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
3396   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3397 	   ptr_cc_id, "+", day, MONTH_MIN, year, hd_elems, fday, count);
3398   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
3399 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
3400 	   count);
3401   day = 25;
3402   if (weekday_of_date (day, MONTH_MAX, year) == DAY_MAX)
3403     day++;
3404   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
3405 	   ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
3406   day = 26;
3407   if (weekday_of_date (day, MONTH_MAX, year) == DAY_MAX)
3408     day++;
3409   holiday (*init_data, detected, _(hd_text[HD_DAY_OF_GOODWILL].ht_text),
3410 	   ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
3411   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
3412 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
3413 	   count);
3414   if (year > 1992)
3415     {
3416       day = 21;
3417       if (weekday_of_date (day, 3, year) == DAY_MAX)
3418 	day++;
3419       holiday (*init_data, detected, _(hd_text[HD_HUMAN_RIGHTS_DAY].ht_text),
3420 	       ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
3421       day = 24;
3422       if (weekday_of_date (day, 9, year) == DAY_MAX)
3423 	day++;
3424       holiday (*init_data, detected, _(hd_text[HD_HERITAGE_DAY].ht_text),
3425 	       ptr_cc_id, "+", day, 9, year, hd_elems, fday, count);
3426       day = 16;
3427       if (weekday_of_date (day, MONTH_MAX, year) == DAY_MAX)
3428 	day++;
3429       holiday (*init_data, detected,
3430 	       _(hd_text[HD_DAY_OF_RECONCILIATION].ht_text), ptr_cc_id, "+",
3431 	       day, MONTH_MAX, year, hd_elems, fday, count);
3432       day = 27;
3433       if (weekday_of_date (day, 4, year) == DAY_MAX)
3434 	day++;
3435       holiday (*init_data, detected, _(hd_text[HD_LIBERTY_DAY].ht_text),
3436 	       ptr_cc_id, "+", day, 4, year, hd_elems, fday, count);
3437       day = DAY_MIN;
3438       if (weekday_of_date (day, MONTH_MIN, year) == DAY_MAX)
3439 	day++;
3440       day = 9;
3441       if (weekday_of_date (day, 8, year) == DAY_MAX)
3442 	day++;
3443       holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text),
3444 	       ptr_cc_id, "+", day, 8, year, hd_elems, fday, count);
3445       day = 16;
3446       if (weekday_of_date (day, 6, year) == DAY_MAX)
3447 	day++;
3448       holiday (*init_data, detected, _(hd_text[HD_YOUTH_DAY].ht_text),
3449 	       ptr_cc_id, "+", day, 6, year, hd_elems, fday, count);
3450     }
3451   else
3452     {
3453       holiday (*init_data, detected, _(hd_text[HD_SETTLERS_DAY].ht_text),
3454 	       ptr_cc_id, "+", 6, 9, year, hd_elems, fday, count);
3455       holiday (*init_data, detected, _(hd_text[HD_RE_DAY].ht_text),
3456 	       ptr_cc_id, "+", dvec[5 - 1], 5, year, hd_elems, fday, count);
3457     }
3458 }
3459 
3460 
3461 
3462 void
zm_hdy(init_data,detected,easter,year,hd_elems,fday,count)3463 zm_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3464      Bool *init_data;
3465      const Bool detected;
3466      int easter;
3467      const int year;
3468      int *hd_elems;
3469      const int fday;
3470      const int count;
3471 /*!
3472    Manages all specific holidays celebrated in Zambia.
3473 */
3474 {
3475   register int day;
3476 
3477 
3478   ptr_cc_id = "ZM";
3479   day = 25;
3480   if (weekday_of_date (day, MONTH_MAX, year) == DAY_MAX)
3481     day++;
3482   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
3483 	   ptr_cc_id, "+", day, MONTH_MAX, year, hd_elems, fday, count);
3484   if (*init_data)
3485     *init_data = FALSE;
3486   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
3487 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
3488 	   count);
3489   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
3490 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
3491   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
3492 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3493   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
3494 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
3495   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
3496 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3497   day = eval_holiday (DAY_MIN, 8, year, DAY_MIN, TRUE);
3498   holiday (*init_data, detected, _(hd_text[HD_FARMERS_DAY].ht_text),
3499 	   ptr_cc_id, "+", day, 8, year, hd_elems, fday, count);
3500   day = 24;
3501   if (weekday_of_date (day, 10, year) == DAY_MAX)
3502     day++;
3503   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
3504 	   ptr_cc_id, "+", day, 10, year, hd_elems, fday, count);
3505   day = DAY_MIN;
3506   if (weekday_of_date (day, 5, year) == DAY_MAX)
3507     day++;
3508   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text),
3509 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
3510   day = eval_holiday (DAY_MIN, 7, year, DAY_MIN, TRUE);
3511   holiday (*init_data, detected, _(hd_text[HD_HEROES_DAY].ht_text),
3512 	   ptr_cc_id, "+", day, 7, year, hd_elems, fday, count);
3513   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_UNITY_DAY].ht_text),
3514 	   ptr_cc_id, "+", day + 1, 7, year, hd_elems, fday, count);
3515   day = DAY_MIN;
3516   if (weekday_of_date (day, MONTH_MIN, year) == DAY_MAX)
3517     day++;
3518   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3519 	   ptr_cc_id, "+", day, MONTH_MIN, year, hd_elems, fday, count);
3520   day = 25;
3521   if (weekday_of_date (day, 5, year) == DAY_MAX)
3522     day++;
3523   holiday (*init_data, detected, _(hd_text[HD_OAU_DAY].ht_text),
3524 	   ptr_cc_id, "+", day, 5, year, hd_elems, fday, count);
3525   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
3526 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
3527 	   count);
3528   day = 12;
3529   if (weekday_of_date (day, 3, year) == DAY_MAX)
3530     day++;
3531   holiday (*init_data, detected, _(hd_text[HD_YOUTH_DAY].ht_text),
3532 	   ptr_cc_id, "+", day, 3, year, hd_elems, fday, count);
3533 }
3534 
3535 
3536 
3537 void
zw_hdy(init_data,detected,easter,year,hd_elems,fday,count)3538 zw_hdy (init_data, detected, easter, year, hd_elems, fday, count)
3539      Bool *init_data;
3540      const Bool detected;
3541      int easter;
3542      const int year;
3543      int *hd_elems;
3544      const int fday;
3545      const int count;
3546 /*!
3547    Manages all specific holidays celebrated in Zimbabwe.
3548 */
3549 {
3550   ptr_cc_id = "ZW";
3551   holiday (*init_data, detected, _(hd_text[HD_ARMED_FORCES_DAY].ht_text),
3552 	   ptr_cc_id, "+", 12, 8, year, hd_elems, fday, count);
3553   if (*init_data)
3554     *init_data = FALSE;
3555   holiday (*init_data, detected, _(hd_text[HD_BOXING_DAY].ht_text),
3556 	   ptr_cc_id, "+", 26, MONTH_MAX, year, hd_elems, fday, count);
3557   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_DAY].ht_text),
3558 	   ptr_cc_id, "+", 25, MONTH_MAX, year, hd_elems, fday, count);
3559   holiday (*init_data, detected, _(hd_text[HD_CHRISTMAS_EVE].ht_text),
3560 	   ptr_cc_id, DIS_HLS_PREF, 24, MONTH_MAX, year, hd_elems, fday,
3561 	   count);
3562   holiday (*init_data, detected, _(hd_text[HD_EASTER_MONDAY].ht_text),
3563 	   ptr_cc_id, "+", easter + 1, 0, year, hd_elems, fday, count);
3564   holiday (*init_data, detected, _(hd_text[HD_EASTER_SUNDAY].ht_text),
3565 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3566   holiday (*init_data, detected, _(hd_text[HD_GOOD_FRIDAY].ht_text),
3567 	   ptr_cc_id, "+", easter - 2, 0, year, hd_elems, fday, count);
3568   holiday (*init_data, detected, _(hd_text[HD_GOOD_SATURDAY].ht_text),
3569 	   ptr_cc_id, "+", easter, 0, year, hd_elems, fday, count);
3570   holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text),
3571 	   ptr_cc_id, "+", 18, 4, year, hd_elems, fday, count);
3572   holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id,
3573 	   "+", DAY_MIN, 5, year, hd_elems, fday, count);
3574   holiday (*init_data, detected, _(hd_text[HD_HEROES_DAY].ht_text), ptr_cc_id,
3575 	   "+", 11, 8, year, hd_elems, fday, count);
3576   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_UNITY_DAY].ht_text),
3577 	   ptr_cc_id, "+", 22, MONTH_MAX, year, hd_elems, fday, count);
3578   holiday (*init_data, detected, _(hd_text[HD_NEW_YEARS_DAY].ht_text),
3579 	   ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count);
3580   holiday (*init_data, detected, _(hd_text[HD_OAU_DAY].ht_text), ptr_cc_id,
3581 	   "+", 25, 5, year, hd_elems, fday, count);
3582   holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id,
3583 	   DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday,
3584 	   count);
3585 }
3586 #endif /* !HD_TOP20CC */
3587