Commit 01f7581c authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

do no longer use tfmacros.h

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.
make timetutil deprecated


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3378
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 6cc6f93d
......@@ -24,6 +24,7 @@
*
* 25/04/97 Thomas Forbriger (IfG Stuttgart)
* 27/05/97 timeutil_norm did ignore carry to doy
* 15/11/10 avoid tfmacros.h
*
* This is a pure C pre-version of libtime.f
* By now (5/8/2000) it is still included in libtime.a but provides no extra
......@@ -34,7 +35,11 @@
#include <stdio.h>
#include <stddef.h>
#include <timeutil.h>
#include <tfmacros.h>
#define TU_EXIT_FAILURE 1
#define TU_CHECKERROR( EXPR , SUB, STR )\
if ( EXPR ) { fprintf(stderr, "ERROR (%s):\n %s\n", SUB, STR );\
exit(TU_EXIT_FAILURE); }
/*
* some constants we need internally
......@@ -116,7 +121,7 @@ timeutil_Ttime td;
while (i<td.month) {
doy=doy+days[i];
i=i+1;
CHECKERROR((i>13),"timeutil_doy","month value out of range")
TU_CHECKERROR((i>13),"timeutil_doy","month value out of range")
}
doy=doy+td.day;
return doy;
......@@ -170,7 +175,7 @@ long int doy;
while(td->day>days[td->month]) {
td->day=td->day-days[td->month];
td->month=td->month+1;
CHECKERROR((td->month>13), "timeutil_date", "doy value out of range")
TU_CHECKERROR((td->month>13), "timeutil_date", "doy value out of range")
}
} /* timeutil_date */
......
......@@ -27,11 +27,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
* 15/11/2010 make timeutil deprecated, its functionality duplicates
* the functionality presented in libtime.h
*
*/
#ifndef _TF_TIMEUTIL_H
#define _TF_TIMEUTIL_H
#warning "timeutil is deprecated! It may vanish in the near future"
/*
* define macros
* =============
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment