1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
** Copyright (C) 2016-2019, NumFOCUS Foundation.
**
** Licensed under a 3-clause BSD style license - see LICENSE
**
** This file is NOT derived from SOFA sources.
**
** The functions here provide an interface to ERFA and SOFA version
** information, and for updating the leap second table.
**
** The eraGetLeapSeconds and eraSetLeapSeconds functions are used as an
** experimental interface for getting and setting the leap second table
** starting in astropy 4.0. They will be supported as long as needed for
** astropy. Comments and ideas about the best way to keep the leap
** second tables up to date for all users of erfa are welcome
** (https://github.com/liberfa/erfa).
**
*/
#ifndef _ERFA_EXTRA_H
#define _ERFA_EXTRA_H
#ifdef __cplusplus
extern "C" {
#endif
/*
** Returns the package version
** as defined in configure.ac
** in string format
*/
const char* eraVersion(void);
/*
** Returns the package major version
** as defined in configure.ac
** as integer
*/
int eraVersionMajor(void);
/*
** Returns the package minor version
** as defined in configure.ac
** as integer
*/
int eraVersionMinor(void);
/*
** Returns the package micro version
** as defined in configure.ac
** as integer
*/
int eraVersionMicro(void);
/*
** Returns the orresponding SOFA version
** as defined in configure.ac
** in string format
*/
const char* eraSofaVersion(void);
/*
** Get and set leap seconds (not supported by SOFA; EXPERIMENTAL)
*/
typedef struct {
int iyear, month;
double delat;
} eraLEAPSECOND;
int eraGetLeapSeconds(eraLEAPSECOND **leapseconds);
void eraSetLeapSeconds(eraLEAPSECOND *leapseconds, int count);
#ifdef __cplusplus
}
#endif
#endif /* _ERFA_EXTRA_H */