/*++++++++++++++
.IDENTIFICATION htm1.h
.LANGUAGE       C
.AUTHOR         Francois Ochsenbein [CDS]
.ENVIRONMENT    
.KEYWORDS       
.VERSION  1.0   20-Jul-2001
.COMMENTS       Direct implementation of HTM -- small, fast !
		Max HTM level (with 32 bits integers): 14
---------------*/

#ifndef HTM1_DEF
#define HTM1_DEF	0

#ifndef _ARGS
#ifdef __STDC__
#define _ARGS(A)        A       /* ANSI */
#else
#define _ARGS(A)        ()      /* Traditional */
#define const
#endif
#endif

#include <math.h>		/* Use system Math Library */

typedef int (*HTM_ACTION)_ARGS((int htm, double *triangle[3], int status));

int htm_level _ARGS((int htm));
int htm_get   _ARGS((void));
int htm_set   _ARGS((int htm));
int htm_u     _ARGS((double u[3]));
int a2htm     _ARGS((char *text));
char *htm2a   _ARGS((int htm));

double htm_triangle _ARGS((double *triangle[3], double u_center[3]));
double htm_info     _ARGS((int htm, double *triangle[3], double u_center[3]));

int htm_circle	_ARGS((double u_center[3], double radius, HTM_ACTION action));
int htm_radec   _ARGS((double RAlim[2], double DElim[2], HTM_ACTION action));

double htm_triangle _ARGS((double *triangle[3], double u_center[3]));

#endif

