11 Commits
v1.0.3 ... 1.x

Author SHA1 Message Date
fc6f7ea159 Fixet protector definition in gswe-types.h 2013-09-22 23:18:33 +02:00
835dfddccd Added comment block at the beginning of gswe-types.c 2013-09-22 23:03:30 +02:00
20aacb8c6d Typo fix - = instead of == 2013-09-22 22:58:18 +02:00
a918338bdf Added some comments, mostly TODO items 2013-09-22 18:59:19 +02:00
67979d9890 Made HOUSE_SYSTEM_NONE a valid and working house system
Solves #1
2013-09-22 18:59:01 +02:00
4f61aea449 Now using enum values instead of numbers in gswe_calculate_data_by_position()
It's just more beautiful.
2013-09-22 18:56:55 +02:00
cac67e57e3 Fixed licensing issue
Fixes #2
2013-09-22 18:22:13 +02:00
ac012aada2 Bug fix in find_antiscion()
Was assuming that first parameter is a pointer to an enum. It is
actually an int converted to a pointer with GINT_TO_POINTER.
2013-09-18 22:15:53 +02:00
5b0a2b33c1 Bug fix - house, aspect and antiscia lists were not freed correctly
After calling g_list_free_full(), the list must be set to NULL.
2013-09-18 21:55:49 +02:00
984ed5d527 Setting the time zone value now doesn't validate the Gregorian date 2013-09-18 21:54:52 +02:00
a790512f13 Fixed GsweTimestamp to comply with documentation
Although documentation states that an "empty" timestamp object has
the current date and time in the current time zone, it was not true.
2013-09-18 21:54:17 +02:00
13 changed files with 182 additions and 148 deletions

View File

@@ -109,3 +109,7 @@ The size of all data files provided by Astrodienst is around 40MB. Although it s
### Fixed stars are not known yet
Although Swiss Ephemeris has the functionality to calculate the position of fixed stars, SWE-GLib doesn't provide such functionality. This, however, is a planned feature for the close future.
## Licencing
As the underlying Swiss Ephemeris is published under GPL (or a commercial license I can not afford), SWE-GLib is also uses that. This means that you can currently use SWE-GLib in software published under the GNU GPL v3.

View File

@@ -1,6 +1,6 @@
m4_define([swe_glib_major_version], [1])
m4_define([swe_glib_minor_version], [0])
m4_define([swe_glib_micro_version], [3])
m4_define([swe_glib_micro_version], [5])
m4_define([swe_glib_version], [swe_glib_major_version.swe_glib_minor_version.swe_glib_micro_version])
m4_define([swe_glib_api_version], [swe_glib_major_version.0])

View File

@@ -1,21 +1,20 @@
/*** BEGIN file-header ***/
/* gswe-enumtypes.c - Enumeration types for SWE-GLib
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "gswe-enumtypes.h"
#include "@filename@"

View File

@@ -1,21 +1,20 @@
/*** BEGIN file-header ***/
/* gswe-enumtypes.h - Enumeration types for SWE-GLib
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GSWE_ENUM_TYPES_H__
#define __GSWE_ENUM_TYPES_H__

View File

@@ -1,20 +1,19 @@
/* gswe-moment.c - Planetary moment object for SWE-GLib
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "swe-glib.h"
#include "gswe-types.h"
@@ -420,7 +419,7 @@ gswe_moment_new(void)
* @altitude: the altitude part of the coordinates, in meters. As also noted in
* the README, it is safe to pass a value of around 400.0, unless
* you want to create a *really* precise chart
* @house_system: the house system you want to use. WARNING! Using GSWE_HOUSE_SYSTEM_NONE is currently a bad idea, the results are unpredicted
* @house_system: the house system you want to use
*
* Creates a new GsweMoment object with the timestamp, coordinates and house system set. This is the preferred way to create a GsweMoment object.
*
@@ -439,10 +438,6 @@ gswe_moment_new_full(GsweTimestamp *timestamp, gdouble longitude, gdouble latitu
moment->priv->coordinates.altitude = altitude;
moment->priv->house_system = house_system;
if (house_system == GSWE_HOUSE_SYSTEM_NONE) {
g_warning("Using GSWE_HOUSE_SYSTEM_NONE is unsafe. You have been warned!");
}
return moment;
}
@@ -478,8 +473,8 @@ gswe_calculate_data_by_position(GsweMoment *moment, GswePlanet planet, gdouble p
// If position happens to be exactly 0, this calculation yields
// GSWE_SIGN_NONE, but should be GSWE_SIGN_ARIES
if (sign == 0) {
sign = 1;
if (sign == GSWE_SIGN_NONE) {
sign = GSWE_SIGN_ARIES;
}
if ((sign_info = g_hash_table_lookup(gswe_sign_info_table, GINT_TO_POINTER(sign))) == NULL) {
@@ -506,6 +501,17 @@ gswe_moment_calculate_house_positions(GsweMoment *moment, GError **err)
return;
}
g_list_free_full(moment->priv->house_list, g_free);
moment->priv->house_list = NULL;
// If no house system is set, we need no calculations at all. Just leave
// the list empty and return
if (moment->priv->house_system == GSWE_HOUSE_SYSTEM_NONE) {
moment->priv->house_revision = moment->priv->revision;
return;
}
if ((house_system_data = g_hash_table_lookup(gswe_house_system_info_table, GINT_TO_POINTER(moment->priv->house_system))) == NULL) {
g_set_error(err, GSWE_MOMENT_ERROR, GSWE_MOMENT_ERROR_UNKNOWN_HSYS, "Unknown house system");
@@ -514,15 +520,14 @@ gswe_moment_calculate_house_positions(GsweMoment *moment, GError **err)
jd = gswe_timestamp_get_julian_day(moment->priv->timestamp, err);
// If Julian Day calculation yields error, we don't do anything. err is
// already filled with the error message, so let's just return
if ((err) && (*err)) {
return;
}
swe_houses(jd, moment->priv->coordinates.latitude, moment->priv->coordinates.longitude, house_system_data->sweph_id, cusps, ascmc);
g_list_free_full(moment->priv->house_list, g_free);
moment->priv->house_list = NULL;
/* TODO: SWE house system 'G' (Gauquelin sector cusps) have 36 houses; we
* should detect that somehow (house system 'G' is not implemented yet in
* GsweHouseSystem, and all other house systems have exactly 12 houses, so
@@ -535,6 +540,8 @@ gswe_moment_calculate_house_positions(GsweMoment *moment, GError **err)
if ((house_data->sign = g_hash_table_lookup(gswe_sign_info_table, GINT_TO_POINTER((gint)ceilf(cusps[i] / 30.0)))) == NULL) {
g_list_free_full(moment->priv->house_list, g_free);
moment->priv->house_list = NULL;
moment->priv->house_revision = 0;
g_set_error(err, GSWE_MOMENT_ERROR, GSWE_MOMENT_ERROR_UNKNOWN_SIGN, "Calculation brought an unknown sign");
return;
@@ -545,6 +552,8 @@ gswe_moment_calculate_house_positions(GsweMoment *moment, GError **err)
moment->priv->house_revision = moment->priv->revision;
// The Ascendent, MC and Vertex points are also calculated by swe_houses(),
// so let's update them.
if (gswe_moment_has_planet(moment, GSWE_PLANET_ASCENDENT)) {
gswe_calculate_data_by_position(moment, GSWE_PLANET_ASCENDENT, ascmc[0], err);
}
@@ -610,6 +619,10 @@ gswe_moment_add_planet(GsweMoment *moment, GswePlanet planet)
}
if ((planet_info = g_hash_table_lookup(gswe_planet_info_table, GINT_TO_POINTER(planet))) == NULL) {
// TODO: Some real error checking should be done here, like checking if
// @planet is really from GswePlanet. If so, that is a fatal error.
// Otherwise, the developer erred, and a warning may be still issued.
// Also, a GError ** should be added to the parameters.
g_warning("Unknown planet ID: %d", planet);
return;
@@ -618,7 +631,7 @@ gswe_moment_add_planet(GsweMoment *moment, GswePlanet planet)
planet_data->planet_id = planet;
planet_data->planet_info = planet_info;
planet_data->position = 0.0;
planet_data->house = 1;
planet_data->house = 0;
planet_data->sign = NULL;
planet_data->revision = 0;
@@ -664,6 +677,7 @@ gswe_moment_calculate_planet(GsweMoment *moment, GswePlanet planet, GError **err
return;
}
// TODO: This function should know about Ascendant, MC and Vertex, so it could calculate their positions, too
if (planet_data->planet_info->real_body == FALSE) {
g_warning("The position data of planet %d can not be calculated by this function", planet);
@@ -771,6 +785,11 @@ gswe_moment_get_house_planets(GsweMoment *moment, guint house)
GList *ret = NULL,
*planet;
// If the house system is none, we always return NULL
if (moment->priv->house_system == GSWE_HOUSE_SYSTEM_NONE) {
return NULL;
}
gswe_moment_calculate_all_planets(moment);
for (planet = moment->priv->planet_list; planet; planet = g_list_next(planet)) {
@@ -1061,6 +1080,7 @@ gswe_moment_calculate_aspects(GsweMoment *moment)
gswe_moment_calculate_all_planets(moment);
g_list_free_full(moment->priv->aspect_list, g_free);
moment->priv->aspect_list = NULL;
for (oplanet = moment->priv->planet_list; oplanet; oplanet = oplanet->next) {
for (iplanet = moment->priv->planet_list; iplanet; iplanet = iplanet->next) {
@@ -1158,13 +1178,14 @@ gswe_moment_get_planet_aspects(GsweMoment *moment, GswePlanet planet, GError **e
}
static gboolean
find_antiscion(GsweAntiscionAxis *axis, GsweAntiscionAxisInfo *antiscion_info, GsweAntiscionData *antiscion_data)
find_antiscion(gpointer axis_p, GsweAntiscionAxisInfo *antiscion_info, GsweAntiscionData *antiscion_data)
{
GsweAntiscionAxis axis;
gdouble start_point,
axis_position,
planet_orb;
if (*axis == GSWE_ANTISCION_AXIS_NONE) {
if ((axis = GPOINTER_TO_INT(axis_p)) == GSWE_ANTISCION_AXIS_NONE) {
return FALSE;
}
@@ -1183,7 +1204,7 @@ find_antiscion(GsweAntiscionAxis *axis, GsweAntiscionAxisInfo *antiscion_info, G
if ((antiscion_data->difference = fabs(antiscion_data->planet2->position - axis_position)) <= planet_orb) {
antiscion_data->antiscion_info = antiscion_info;
antiscion_data->axis = *axis;
antiscion_data->axis = axis;
return TRUE;
} else {
@@ -1215,6 +1236,7 @@ gswe_moment_calculate_antiscia(GsweMoment *moment)
gswe_moment_calculate_all_planets(moment);
g_list_free_full(moment->priv->antiscia_list, g_free);
moment->priv->antiscia_list = NULL;
for (oplanet = moment->priv->planet_list; oplanet; oplanet = oplanet->next) {
for (iplanet = moment->priv->planet_list; iplanet; iplanet = iplanet->next) {

View File

@@ -1,20 +1,19 @@
/* gswe-moment.h - Planetary moment object for SWE-GLib
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GSWE_MOMENT_H__
#define __GSWE_MOMENT_H__

View File

@@ -1,21 +1,20 @@
/* gswe-timestamp.c - Converter GObject between Gregorian calendar date and
* Julian day
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <math.h>
#include <glib.h>
@@ -94,6 +93,7 @@ gswe_timestamp_class_init(GsweTimestampClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
GDateTime *local_time = g_date_time_new_now_local();
GTimeZone *local_timezone = g_time_zone_new_local();
g_type_class_add_private(klass, sizeof(GsweTimestampPrivate));
@@ -118,7 +118,7 @@ gswe_timestamp_class_init(GsweTimestampClass *klass)
* Otherwise, the values are recalculated only upon request (e.g. on
* calling gswe_timestamp_get_julian_day()).
*/
g_object_class_install_property(gobject_class, PROP_INSTANT_RECALC, g_param_spec_boolean("instant-recalc", "Instant recalculation", "Instantly recalculate values upon parameter change", FALSE, G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_INSTANT_RECALC, g_param_spec_boolean("instant-recalc", "Instant recalculation", "Instantly recalculate values upon parameter change", FALSE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-valid:
@@ -135,56 +135,56 @@ gswe_timestamp_class_init(GsweTimestampClass *klass)
*
* The Gregorian year of the timestamp
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_YEAR, g_param_spec_int("gregorian-year", "Gregorian year", "The year according to the Gregorian calendar", G_MININT, G_MAXINT, g_date_time_get_year(local_time), G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_YEAR, g_param_spec_int("gregorian-year", "Gregorian year", "The year according to the Gregorian calendar", G_MININT, G_MAXINT, g_date_time_get_year(local_time), G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-month:
*
* The Gregorian month of the timestamp
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_MONTH, g_param_spec_int("gregorian-month", "Gregorian month", "The month according to the Gregorian calendar", 1, 12, g_date_time_get_month(local_time), G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_MONTH, g_param_spec_int("gregorian-month", "Gregorian month", "The month according to the Gregorian calendar", 1, 12, g_date_time_get_month(local_time), G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-day:
*
* The Gregorian day of the timestamp
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_DAY, g_param_spec_int("gregorian-day", "Gregorian day", "The day according to the Gregorian calendar", 1, 31, g_date_time_get_day_of_month(local_time), G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_DAY, g_param_spec_int("gregorian-day", "Gregorian day", "The day according to the Gregorian calendar", 1, 31, g_date_time_get_day_of_month(local_time), G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-hour:
*
* The Gregorian hour of the timestamp
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_HOUR, g_param_spec_int("gregorian-hour", "Gregorian hour", "The hour according to the Gregorian calendar", 0, 23, g_date_time_get_hour(local_time), G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_HOUR, g_param_spec_int("gregorian-hour", "Gregorian hour", "The hour according to the Gregorian calendar", 0, 23, g_date_time_get_hour(local_time), G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-minute:
*
* The Gregorian minute of the timestamp
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_MINUTE, g_param_spec_int("gregorian-minute", "Gregorian minute", "The minute according to the Gregorian calendar", 0, 59, g_date_time_get_minute(local_time), G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_MINUTE, g_param_spec_int("gregorian-minute", "Gregorian minute", "The minute according to the Gregorian calendar", 0, 59, g_date_time_get_minute(local_time), G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-second:
*
* The Gregorian second of the timestamp
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_SECOND, g_param_spec_int("gregorian-second", "Gregorian second", "The second according to the Gregorian calendar", 0, 61, g_date_time_get_second(local_time), G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_SECOND, g_param_spec_int("gregorian-second", "Gregorian second", "The second according to the Gregorian calendar", 0, 61, g_date_time_get_second(local_time), G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-microsecond:
*
* The Gregorian microsecond of the timestamp
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_MICROSECOND, g_param_spec_int("gregorian-microsecond", "Gregorian microsecond", "The microsecond according to the Gregorian calendar", 0, G_MAXINT, g_date_time_get_microsecond(local_time), G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_MICROSECOND, g_param_spec_int("gregorian-microsecond", "Gregorian microsecond", "The microsecond according to the Gregorian calendar", 0, G_MAXINT, g_date_time_get_microsecond(local_time), G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:gregorian-timezone-offset:
*
* The time zone offset in hours, relative to UTC
*/
g_object_class_install_property(gobject_class, PROP_GREGORIAN_TIMEZONE_OFFSET, g_param_spec_double("gregorian-timezone-offset", "Gregorian timezone offset", "The offset relative to UTC in the Gregorian calendar", -24.0, 24.0, 0.0, G_PARAM_READWRITE));
g_object_class_install_property(gobject_class, PROP_GREGORIAN_TIMEZONE_OFFSET, g_param_spec_double("gregorian-timezone-offset", "Gregorian timezone offset", "The offset relative to UTC in the Gregorian calendar", -24.0, 24.0, g_time_zone_get_offset(local_timezone, 1) / 3600.0, G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
/**
* GsweTimestamp:julian-day-valid:
@@ -764,7 +764,6 @@ void
gswe_timestamp_set_gregorian_timezone(GsweTimestamp *timestamp, gdouble gregorian_timezone_offset, GError **err)
{
timestamp->priv->gregorian_timezone_offset = gregorian_timezone_offset;
timestamp->priv->valid_dates = VALID_GREGORIAN;
if (timestamp->priv->instant_recalc == TRUE) {
gswe_timestamp_calculate_all(timestamp, err);

View File

@@ -1,21 +1,20 @@
/* gswe-timestamp.h - Converter GObject between Gregorian calendar date and
* Julian day
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SWE_GLIB_GSWE_TIMESTAMP_H__
#define __SWE_GLIB_GSWE_TIMESTAMP_H__

View File

@@ -1,3 +1,20 @@
/* gswe-types.h - Basic types of SWE-GLib
*
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "gswe-types.h"
static GsweMoonPhaseData *

View File

@@ -1,23 +1,22 @@
/* gswe-types.h - Basic types of SWE-GLib
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SWE_GLIB_GSWE_PLANETS_H__
#define __SWE_GLIB_GSWE_PLANETS_H__
#ifndef __SWE_GLIB_GSWE_TYPES_H__
#define __SWE_GLIB_GSWE_TYPES_H__
#include <glib.h>
#include <glib-object.h>
@@ -475,5 +474,5 @@ typedef struct {
GType gswe_antiscion_data_get_type(void);
#define GSWE_TYPE_ANTISCION_DATA (gswe_antiscion_data_get_type())
#endif /* __SWE_GLIB_GSWE_PLANETS_H__ */
#endif /* __SWE_GLIB_GSWE_TYPES_H__ */

View File

@@ -1,19 +1,18 @@
/*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef __SWE_GLIB_BUILDING__
#ifndef __SWE_GLIB_PRIVATE_H__

View File

@@ -1,20 +1,19 @@
/* SWE-GLib - GLib style wrapper library around Astrodienst's Swiss Ephemeris
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
#define GETTEXT_PACKAGE "swe-glib"

View File

@@ -1,20 +1,19 @@
/* SWE-GLib - GLib style wrapper library around Astrodienst's Swiss Ephemeris
*
* Copyright (C) 2013 Gergely Polonkai
* Copyright © 2013 Gergely Polonkai
*
* SWE-GLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your opinion)
* any later version.
* SWE-GLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* SWE-GLib is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* SWE-GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SWE_GLIB_H__
#define __SWE_GLIB_H__