1818 Sweetmorn, Bureaucracy 42, 3161 YOLD, by Lee H:. O:. Smith, KYTP,
1919 aka Andrew Bulhak, aka acb@dev.null.org
2020
21+ Slightly hackled and crackled by a sweet firey stove on
22+ Boomtime, the 53rd day of Bureaucracy in the YOLD 3179,
23+ by Chaplain Nyan the Wiser, aka Dan Dart, aka ntw@dandart.co.uk
24+
2125 and I'm not responsible if this program messes anything up (except your
2226 mind, I'm responsible for that) (and that goes for me as well --lhos)
2327
2428 Version history:
2529 Bureflux 3161: First release of enhanced ddate with format strings
2630 59 Bcy, 3161: PRAISE_BOB and KILL_BOB options split, other minor
2731 changes.
32+ 53 Bcy, 3179: Fixed gregorian date conversions less than YOLD 1167
2833
2934 1999-02-22 Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
3035 - added Native Language Support
@@ -136,6 +141,7 @@ char *excl[] = {
136141 "Grudnuk demand sustenance!" , "Keep the Lasagna flying!" ,
137142 "You are what you see." ,
138143 "Or is it?" , "This statement is false." ,
144+ "Lies and slander, sire!" , "Hee hee hee!" ,
139145#if defined(linux ) || defined (__linux__ ) || defined (__linux )
140146 "Hail Eris, Hack Linux!" ,
141147#elif defined(__APPLE__ )
@@ -324,7 +330,7 @@ struct disc_time makeday(int imonth,int iday,int iyear) /*i for input */
324330
325331 memset (& funkychickens ,0 ,sizeof (funkychickens ));
326332 /* basic range checks */
327- if (imonth < 1 || imonth > 12 ) {
333+ if (imonth < 1 || imonth > 12 || iyear == 0 ) {
328334 funkychickens .season = -1 ;
329335 return funkychickens ;
330336 }
@@ -337,7 +343,9 @@ struct disc_time makeday(int imonth,int iday,int iyear) /*i for input */
337343 }
338344
339345 imonth -- ;
340- funkychickens .year = iyear + 1166 ;
346+ /* note: gregorian year 0 doesn't exist so
347+ * add one if user specifies a year less than 0 */
348+ funkychickens .year = iyear + 1166 + ((0 > iyear )?1 :0 );
341349 while (imonth > 0 ) { dayspast += cal [-- imonth ]; }
342350 funkychickens .day = dayspast + iday - 1 ;
343351 funkychickens .season = 0 ;
0 commit comments