Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/time.cfa

    rff2a33e r65240bb  
    1010// Created On       : Tue Mar 27 13:33:14 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 13 08:41:55 2019
    13 // Update Count     : 65
     12// Last Modified On : Fri Jul 12 12:03:19 2019
     13// Update Count     : 59
    1414//
    1515
    1616#include "time.hfa"
    17 #include "fstream.hfa"
     17#include "iostream.hfa"
    1818#include <stdio.h>                                                                              // snprintf
    1919#include <assert.h>
     
    5252
    5353#ifdef __CFA_DEBUG__
    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
     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."
    5856#endif // __CFA_DEBUG__
    5957
     
    6563#ifdef __CFA_DEBUG__
    6664        if ( month < 1 || 12 < month ) {
    67                 tabort( year, month, day, hour, min, sec, nsec );
     65                abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );
    6866        } // if
    6967#endif // __CFA_DEBUG__
     
    7169#ifdef __CFA_DEBUG__
    7270        if ( day < 1 || 31 < day ) {
    73                 tabort( year, month, day, hour, min, sec, nsec );
     71                abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );
    7472        } // if
    7573#endif // __CFA_DEBUG__
     
    8179#ifdef __CFA_DEBUG__
    8280        if ( epochsec == (time_t)-1 ) {
    83                 tabort( year, month, day, hour, min, sec, nsec );
     81                abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );
    8482        } // if
    8583#endif // __CFA_DEBUG__
     
    8785#ifdef __CFA_DEBUG__
    8886        if ( tv > 2147483647LL * TIMEGRAN ) {                           // between 00:00:00 UTC, January 1, 1970 and 03:14:07 UTC, January 19, 2038.
    89                 tabort( year, month, day, hour, min, sec, nsec );
     87                abort( CreateFmt, year, month, day, hour, (int)min, sec, nsec );
    9088        } // if
    9189#endif // __CFA_DEBUG__
Note: See TracChangeset for help on using the changeset viewer.