Skip to content

Commit

Permalink
Merge pull request #5 from dandart/master
Browse files Browse the repository at this point in the history
Let 1 be 1
  • Loading branch information
Philipp Moeller committed Jun 10, 2014
2 parents 0091c1c + c045cd7 commit ee648b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
2 changes: 2 additions & 0 deletions ddate.1
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ Original program by Druel the Chaotic aka Jeremy Johnson ([email protected]
.br
Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak ([email protected])
.br
Gregorian B.C.E. dates fixed by Chaplain Nyan the Wiser, aka Dan Dart ([email protected])
.br
Five tons of flax.

.SH DISTRIBUTION POLICY
Expand Down
12 changes: 10 additions & 2 deletions ddate.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@
Sweetmorn, Bureaucracy 42, 3161 YOLD, by Lee H:. O:. Smith, KYTP,
aka Andrew Bulhak, aka [email protected]
Slightly hackled and crackled by a sweet firey stove on
Boomtime, the 53rd day of Bureaucracy in the YOLD 3179,
by Chaplain Nyan the Wiser, aka Dan Dart, aka [email protected]
and I'm not responsible if this program messes anything up (except your
mind, I'm responsible for that) (and that goes for me as well --lhos)
Version history:
Bureflux 3161: First release of enhanced ddate with format strings
59 Bcy, 3161: PRAISE_BOB and KILL_BOB options split, other minor
changes.
53 Bcy, 3179: Fixed gregorian date conversions less than YOLD 1167
1999-02-22 Arkadiusz Miskiewicz <[email protected]>
- added Native Language Support
Expand Down Expand Up @@ -136,6 +141,7 @@ char *excl[] = {
"Grudnuk demand sustenance!", "Keep the Lasagna flying!",
"You are what you see.",
"Or is it?", "This statement is false.",
"Lies and slander, sire!", "Hee hee hee!",
#if defined(linux) || defined (__linux__) || defined (__linux)
"Hail Eris, Hack Linux!",
#elif defined(__APPLE__)
Expand Down Expand Up @@ -324,7 +330,7 @@ struct disc_time makeday(int imonth,int iday,int iyear) /*i for input */

memset(&funkychickens,0,sizeof(funkychickens));
/* basic range checks */
if (imonth < 1 || imonth > 12) {
if (imonth < 1 || imonth > 12 || iyear == 0) {
funkychickens.season = -1;
return funkychickens;
}
Expand All @@ -337,7 +343,9 @@ struct disc_time makeday(int imonth,int iday,int iyear) /*i for input */
}

imonth--;
funkychickens.year= iyear+1166;
/* note: gregorian year 0 doesn't exist so
* add one if user specifies a year less than 0 */
funkychickens.year= iyear+1166 + ((0 > iyear)?1:0);
while(imonth>0) { dayspast+=cal[--imonth]; }
funkychickens.day=dayspast+iday-1;
funkychickens.season=0;
Expand Down

0 comments on commit ee648b9

Please sign in to comment.