/* ----------------------------------------------------------------*
 *                                                                 *
 * time_igpp.h - Contains UCLA TIME declarations.                  *
 *                                                                 *
 * Copyright (c) 1975-2003 Regents of the University of California.*
 * All Rights Reserved.                                            *
 *                                                                 *
 * Redistribution and use in source and binary forms are permitted *
 * provided that the above copyright notice and this paragraph are *
 * duplicated in all such forms and that any documentation,        *
 * advertising materials, and other materials related to such      *
 * distribution and use California, Los Angeles.  The name of the  *
 * University may not be used to endorse or promote products       *
 * derived from this software without  specific prior written      *
 * permission.  THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY  *
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION,   *
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A     *
 * PARTICULAR PURPOSE.                                             *
 *                                                                 *
 * ----------------------------------------------------------------*/

/******************************************************************/
/**************** DEFINE FUNCTION PROTOTYPES **********************/
/******************************************************************/

/* Never understood this. Replaced by declarations, jw, dec 2003.
#if defined(__STDC__) || defined(__cplusplus)
#define P_(s) s
#else
#define P_(s) ()
#endif

extern double 	c_con_t P_(()),
		i_con_t P_(()),
		gregorian_day P_(()),
		t_now P_(());



extern void 	t_con_c P_(()),
		c_con_i P_(()),
		i_con_c P_(()),
		t_con_i P_(()),
		gregorian_date P_(());
*/

double c_con_t(char *at);
double i_con_t(int it[8]);
double gregorian_day(int dy, int month, int year);
double t_now();
void c_con_i(char *at, int it[8]);
void i_con_c(int it[8], char *at);
void t_con_i(double t, int it[8]);
void gregorian_date(float d, int *dy, int *month, int *year);
/* end of declarations, jw, dec 2003 */

int IGPPSetEpoch(int epoch);
void t_con_c(double t,char a[]);
#ifndef D_EPOCH
/*Supported time systems :
  cline time                    Jan 01 1966 00:00:000
  Atomic Time (Modified Julian) Jan 01 2000 00:00:000
  Atomic Time (Julian)          Jan 01 2000 12:00:000
*/
enum EPOCH   {Y1966=19660,Y2000=20000,J2000=20005,Y1958=19580};
#define D_EPOCH
#endif
void SetEpoch2AT();
void SetEpoch2JT();
void SetEpoch2SC();
void SetEpoch2CT();
void setepoch2jt();
void setepoch2at();
void setepoch2sc();
void setepoch2ct();
char *FF_EpochLabel();
/* for the FORTRAN LIBRARY */
#define setepoch2at setepoch2at_
#define setepoch2ct setepoch2ct_
#define setepoch2jt setepoch2jt_
#define setepoch2sc setepoch2sc_
int  WhichEpoch();
void SetVerbose();
#define TIME_IGPP

/*****************************************************************/
