Changeset 7dc2e57b for libcfa/src/time.cfa
- Timestamp:
- Jul 15, 2019, 2:43:38 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a87d40b, e67991f
- Parents:
- ce12e2b (diff), 4f37255 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/time.cfa
rce12e2b r7dc2e57b 10 10 // Created On : Tue Mar 27 13:33:14 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 12 12:03:19201913 // Update Count : 5912 // Last Modified On : Sat Jul 13 08:41:55 2019 13 // Update Count : 65 14 14 // 15 15 16 16 #include "time.hfa" 17 #include " iostream.hfa"17 #include "fstream.hfa" 18 18 #include <stdio.h> // snprintf 19 19 #include <assert.h> … … 52 52 53 53 #ifdef __CFA_DEBUG__ 54 #define CreateFmt "Attempt to create Time( year=%d (>=1970), month=%d (1-12), day=%d (1-31), hour=%d (0-23), min=%d (0-59), sec=%d (0-60), nsec=%d (0-999_999_999), " \ 55 "which exceeds range 00:00:00 UTC, January 1, 1970 to 03:14:07 UTC, January 19, 2038." 54 static void tabort( int year, int month, int day, int hour, int min, int sec, int nsec ) { 55 abort | "Attempt to create Time( year=" | year | "(>=1970), month=" | month | "(1-12), day=" | day | "(1-31), hour=" | hour | "(0-23), min=" | min | "(0-59), sec=" | sec 56 | "(0-60), nsec=" | nsec | "(0-999_999_999), which exceeds range 00:00:00 UTC, January 1, 1970 to 03:14:07 UTC, January 19, 2038."; 57 } // tabort 56 58 #endif // __CFA_DEBUG__ 57 59 … … 63 65 #ifdef __CFA_DEBUG__ 64 66 if ( month < 1 || 12 < month ) { 65 abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );67 tabort( year, month, day, hour, min, sec, nsec ); 66 68 } // if 67 69 #endif // __CFA_DEBUG__ … … 69 71 #ifdef __CFA_DEBUG__ 70 72 if ( day < 1 || 31 < day ) { 71 abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );73 tabort( year, month, day, hour, min, sec, nsec ); 72 74 } // if 73 75 #endif // __CFA_DEBUG__ … … 79 81 #ifdef __CFA_DEBUG__ 80 82 if ( epochsec == (time_t)-1 ) { 81 abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );83 tabort( year, month, day, hour, min, sec, nsec ); 82 84 } // if 83 85 #endif // __CFA_DEBUG__ … … 85 87 #ifdef __CFA_DEBUG__ 86 88 if ( tv > 2147483647LL * TIMEGRAN ) { // between 00:00:00 UTC, January 1, 1970 and 03:14:07 UTC, January 19, 2038. 87 abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );89 tabort( year, month, day, hour, min, sec, nsec ); 88 90 } // if 89 91 #endif // __CFA_DEBUG__
Note: See TracChangeset
for help on using the changeset viewer.