[pism/pism] 7d607a: Fix a bug in CalCalcs

0 views
Skip to first unread message

Constantine Khrulev

unread,
Nov 10, 2021, 6:09:34 PM11/10/21
to pism....@gmail.com
Branch: refs/heads/dev
Home: https://github.com/pism/pism
Commit: 7d607abf728579b2a4a6f685a59382f5e6e98c46
https://github.com/pism/pism/commit/7d607abf728579b2a4a6f685a59382f5e6e98c46
Author: Constantine Khrulev <ckhr...@alaska.edu>
Date: 2021-11-10 (Wed, 10 Nov 2021)

Changed paths:
M src/external/calcalcs/calcalcs.c
M src/external/calcalcs/calcalcs.h

Log Message:
-----------
Fix a bug in CalCalcs

"errno" in errno.h (part of the C99 standard) may be defined as a macro (appears to be the
case in the GNU C library), so CalCalcs' use of "errno" as a variable name is a bad idea.


Commit: 64f0830735bb98996d543f9a6820eab05df8eed2
https://github.com/pism/pism/commit/64f0830735bb98996d543f9a6820eab05df8eed2
Author: Constantine Khrulev <ckhr...@alaska.edu>
Date: 2021-11-10 (Wed, 10 Nov 2021)

Changed paths:
M src/util/Time.cc

Log Message:
-----------
Fix a bug in pism::increment_date() and add more sanity checks

- Disallow negative years with calendars other than 360_day and 365_day. "Real-life"
calendars do not have a year zero (year jumps from -1 to 1) and handling this properly
would require writing more code we don't really need.
- Stop if the run length is negative (-ys A -ye B with A > B or -y C with C < 0).


Compare: https://github.com/pism/pism/compare/b38d62b74881...64f0830735bb
Reply all
Reply to author
Forward
0 new messages