Skip to content

Commit

Permalink
Merge pull request #40 from atkit/upgrade-swisseph-2.06
Browse files Browse the repository at this point in the history
swisseph updgrade to latest version (2.06) - 2017
  • Loading branch information
mivion authored Sep 14, 2017
2 parents 3f14c8a + 1d72c41 commit d58d708
Show file tree
Hide file tree
Showing 23 changed files with 4,001 additions and 1,030 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ addons:
packages:
- g++-4.8
node_js:
- 0.10
- 0.12
- iojs-v1.4.3
- iojs-v3.1.0
- 6
- 7
install:
- export CXX=g++-4.8
- $CXX --version
Expand Down
869 changes: 786 additions & 83 deletions deps/swisseph/swecl.c

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions deps/swisseph/swedate.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@
# include "swephexp.h"
# include "sweph.h"

static AS_BOOL init_leapseconds_done = FALSE;
static TLS AS_BOOL init_leapseconds_done = FALSE;


int FAR PASCAL_CONV swe_date_conversion(int y,
int CALL_CONV swe_date_conversion(int y,
int m,
int d, /* day, month, year */
double uttime, /* UT in hours (decimal) */
Expand Down Expand Up @@ -161,7 +161,7 @@ int FAR PASCAL_CONV swe_date_conversion(int y,
and notifies errors like 32 January.
****************************************************************/

double FAR PASCAL_CONV swe_julday(int year, int month, int day, double hour, int gregflag)
double CALL_CONV swe_julday(int year, int month, int day, double hour, int gregflag)
{
double jd;
double u,u0,u1,u2;
Expand Down Expand Up @@ -202,7 +202,7 @@ double FAR PASCAL_CONV swe_julday(int year, int month, int day, double hour, int
Original author Mark Pottenger, Los Angeles.
with bug fix for year < -4711 16-aug-88 Alois Treindl
*************************************************************************/
void FAR PASCAL_CONV swe_revjul (double jd, int gregflag,
void CALL_CONV swe_revjul (double jd, int gregflag,
int *jyear, int *jmon, int *jday, double *jut)
{
double u0,u1,u2,u3,u4;
Expand Down Expand Up @@ -236,7 +236,7 @@ void FAR PASCAL_CONV swe_revjul (double jd, int gregflag,
* For conversion from local time to utc, use +d_timezone.
* For conversion from utc to local time, use -d_timezone.
*/
void FAR PASCAL_CONV swe_utc_time_zone(
void CALL_CONV swe_utc_time_zone(
int32 iyear, int32 imonth, int32 iday,
int32 ihour, int32 imin, double dsec,
double d_timezone,
Expand Down Expand Up @@ -276,9 +276,9 @@ void FAR PASCAL_CONV swe_utc_time_zone(
*/

/* Leap seconds were inserted at the end of the following days:*/
#define NLEAP_SECONDS 26
#define NLEAP_SECONDS 27
#define NLEAP_SECONDS_SPACE 100
static int leap_seconds[NLEAP_SECONDS_SPACE] = {
static TLS int leap_seconds[NLEAP_SECONDS_SPACE] = {
19720630,
19721231,
19731231,
Expand All @@ -305,6 +305,7 @@ static int leap_seconds[NLEAP_SECONDS_SPACE] = {
20081231,
20120630,
20150630,
20161231,
0 /* keep this 0 as end mark */
};
#define J1972 2441317.5
Expand Down Expand Up @@ -376,7 +377,7 @@ static int init_leapsec(void)
* the leap seconds table (or the Swiss Ephemeris version) is not updated
* for a long time.
*/
int32 FAR PASCAL_CONV swe_utc_to_jd(int32 iyear, int32 imonth, int32 iday, int32 ihour, int32 imin, double dsec, int32 gregflag, double *dret, char *serr)
int32 CALL_CONV swe_utc_to_jd(int32 iyear, int32 imonth, int32 iday, int32 ihour, int32 imin, double dsec, int32 gregflag, double *dret, char *serr)
{
double tjd_ut1, tjd_et, tjd_et_1972, dhour, d;
int iyear2, imonth2, iday2;
Expand Down Expand Up @@ -487,7 +488,7 @@ int32 FAR PASCAL_CONV swe_utc_to_jd(int32 iyear, int32 imonth, int32 iday, int32
* the leap seconds table (or the Swiss Ephemeris version) has not been
* updated for a long time.
*/
void FAR PASCAL_CONV swe_jdet_to_utc(double tjd_et, int32 gregflag, int32 *iyear, int32 *imonth, int32 *iday, int32 *ihour, int32 *imin, double *dsec)
void CALL_CONV swe_jdet_to_utc(double tjd_et, int32 gregflag, int32 *iyear, int32 *imonth, int32 *iday, int32 *ihour, int32 *imin, double *dsec)
{
int i;
int second_60 = 0;
Expand Down Expand Up @@ -584,7 +585,7 @@ void FAR PASCAL_CONV swe_jdet_to_utc(double tjd_et, int32 gregflag, int32 *iyear
* the leap seconds table (or the Swiss Ephemeris version) has not been
* updated for a long time.
*/
void FAR PASCAL_CONV swe_jdut1_to_utc(double tjd_ut, int32 gregflag, int32 *iyear, int32 *imonth, int32 *iday, int32 *ihour, int32 *imin, double *dsec)
void CALL_CONV swe_jdut1_to_utc(double tjd_ut, int32 gregflag, int32 *iyear, int32 *imonth, int32 *iday, int32 *ihour, int32 *imin, double *dsec)
{
double tjd_et = tjd_ut + swe_deltat_ex(tjd_ut, -1, NULL);
swe_jdet_to_utc(tjd_et, gregflag, iyear, imonth, iday, ihour, imin, dsec);
Expand Down
6 changes: 3 additions & 3 deletions deps/swisseph/swedate.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ extern "C" {
#endif

#ifndef _SWEDLL_H
extern EXP32 int FAR PASCAL_CONV EXP16 swe_date_conversion (
extern EXP32 int swe_date_conversion (
int y , int m , int d , /* year, month, day */
double utime, /* universal time in hours (decimal) */
char c, /* calendar g[regorian]|j[ulian]|a[stro = greg] */
double *tgmt);

extern EXP32 double *FAR PASCAL_CONV EXP16 swe_julday(
extern EXP32 double *swe_julday(
int year, int month, int day, double hour,
int gregflag);

extern EXP32 void FAR PASCAL_CONV EXP16 swe_revjul (
extern EXP32 void swe_revjul (
double jd,
int gregflag,
int *jyear, int *jmon, int *jday, double *jut);
Expand Down
Loading

0 comments on commit d58d708

Please sign in to comment.