ephio_func.h
1/***************************************************************************
2 *
3 * Copyright (C) 2000 by Willem van Straten
4 * Licensed under the Academic Free License version 2.1
5 *
6 ***************************************************************************/
7/*
8 ADVICE!: Do not include this file directly. Instead, #include "ephio.h"
9
10 $Source: /cvsroot/psrchive/psrchive/Util/tempo/ephio_func.h
11*/
12
13#ifndef __EPHIO_FUNC_H
14#define __EPHIO_FUNC_H
15
16#define EPH_TYPE_STRING 0
17#define EPH_TYPE_REAL 1
18#define EPH_TYPE_HMS 2
19#define EPH_TYPE_DMS 3
20#define EPH_TYPE_MJD 4
21#define EPH_TYPE_INT 5
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27 extern int eph_rd (char* filename, int* parmStatus,
28 char strs[EPH_NUM_KEYS][EPH_STR_LEN],
29 double* value, int* integer, double* error);
30
31 extern int eph_rd_lun (int lun, int* parmStatus,
32 char strs[EPH_NUM_KEYS][EPH_STR_LEN],
33 double* value, int* integer, double* error);
34
35 extern int eph_wr (char* filename, int* parmStatus,
36 char strs[EPH_NUM_KEYS][EPH_STR_LEN],
37 double* value, int* integer, double* error);
38
39 extern int eph_wr_lun (int lun, int* parmStatus,
40 char strs[EPH_NUM_KEYS][EPH_STR_LEN],
41 double* value, int* integer, double* error);
42
43 /* ***********************************************************************
44 eph_rd_str - parse from a string
45
46 Use this function to parse one string at a time.
47 As with eph_rd*, the user must supply arrays of size EPH_NUM_KEYS.
48 This function will parse the values into the appropriate element of the
49 arrays.
50
51 The user must initialize the arrays before repeatedly calling this routine
52 and call 'convertUnits_' to correct the units after completion
53 */
54 int eph_rd_str (int* parmStatus,
55 char* strs,
56 double* value, int* integer,
57 double* error, int* convert,
58 int* isOldEphem, char* parsethis);
59
60 /* writes a string into buffer that could be parsed by eph_rd_str */
61 int eph_wr_str (char *buffer, int buflen, int ephind, int parmStatus,
62 char* value_str, double value, int integer, double error);
63
64#ifdef __cplusplus
65 }
66#endif
67
68#endif

Generated using doxygen 1.14.0