Code beautification

This commit is contained in:
2014-07-08 10:43:54 +02:00
parent cb1fa1f67a
commit 95e89a4c25
35 changed files with 2023 additions and 439 deletions

View File

@@ -139,89 +139,508 @@ void gswe_init_with_dir(gchar *directory)
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
gswe_planet_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)gswe_planet_info_unref);
gswe_planet_info_table = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify)gswe_planet_info_unref
);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_ASCENDANT, -1, FALSE, _("Ascendant"), 9.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MC, -1, FALSE, _("Midheaven"), 5.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_VERTEX, -1, FALSE, _("Vertex"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON_NODE, SE_MEAN_NODE, TRUE, _("Ascending Moon Node"), 2.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON_APOGEE, SE_MEAN_APOG, TRUE, _("Dark Moon"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_ASCENDANT,
-1,
FALSE,
_("Ascendant"),
9.0,
2
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MC,
-1,
FALSE,
_("Midheaven"),
5.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_VERTEX,
-1,
FALSE,
_("Vertex"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MOON_NODE,
SE_MEAN_NODE,
TRUE,
_("Ascending Moon Node"),
2.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MOON_APOGEE,
SE_MEAN_APOG,
TRUE,
_("Dark Moon"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_SUN, SE_SUN, TRUE, _("Sun"), 13.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MOON, SE_MOON, TRUE, _("Moon"), 9.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MERCURY, SE_MERCURY, TRUE, _("Mercury"), 7.0, 2);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_VENUS, SE_VENUS, TRUE, _("Venus"), 7.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_MARS, SE_MARS, TRUE, _("Mars"), 7.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_JUPITER, SE_JUPITER, TRUE, _("Jupiter"), 9.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_SATURN, SE_SATURN, TRUE, _("Saturn"), 7.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_URANUS, SE_URANUS, TRUE, _("Uranus"), 5.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_NEPTUNE, SE_NEPTUNE, TRUE, _("Neptune"), 5.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_PLUTO, SE_PLUTO, TRUE, _("Pluto"), 3.0, 1);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_SUN,
SE_SUN,
TRUE,
_("Sun"),
13.0,
2
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MOON,
SE_MOON,
TRUE,
_("Moon"),
9.0,
2
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MERCURY,
SE_MERCURY,
TRUE,
_("Mercury"),
7.0,
2
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_VENUS,
SE_VENUS,
TRUE,
_("Venus"),
7.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MARS,
SE_MARS,
TRUE,
_("Mars"),
7.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_JUPITER,
SE_JUPITER,
TRUE,
_("Jupiter"),
9.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_SATURN,
SE_SATURN,
TRUE,
_("Saturn"),
7.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_URANUS,
SE_URANUS,
TRUE,
_("Uranus"),
5.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_NEPTUNE,
SE_NEPTUNE,
TRUE,
_("Neptune"),
5.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_PLUTO,
SE_PLUTO,
TRUE,
_("Pluto"),
3.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_CHIRON, SE_CHIRON, TRUE, _("Chiron"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_CERES, SE_CERES, TRUE, _("Ceres"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_PALLAS, SE_PALLAS, TRUE, _("Pallas"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_JUNO, SE_JUNO, TRUE, _("Juno"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_VESTA, SE_VESTA, TRUE, _("Vesta"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_PHOLUS, SE_PHOLUS, TRUE, _("Pholus"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_NESSUS, SE_AST_OFFSET + 7066, TRUE, _("Nessus"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_CHARIKLO, SE_AST_OFFSET + 10199, TRUE, _("Chariklo"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_SEDNA, SE_AST_OFFSET + 90377, TRUE, _("Sedna"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_ERIS, SE_AST_OFFSET + 136199, TRUE, _("Eris"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_DEJANIRA, SE_AST_OFFSET + 157, TRUE, _("Dejanira"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_CIRCE, SE_AST_OFFSET + 34, TRUE, _("Circe"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_ORCUS, SE_AST_OFFSET + 90482, TRUE, _("Orcus"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_ASBOLUS, SE_AST_OFFSET + 8405, TRUE, _("Asbolus"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info, GSWE_PLANET_HYGIEA, SE_AST_OFFSET + 10, TRUE, _("Hygiea"), 2.0, 0);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_CHIRON,
SE_CHIRON,
TRUE,
_("Chiron"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_CERES,
SE_CERES,
TRUE,
_("Ceres"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_PALLAS,
SE_PALLAS,
TRUE,
_("Pallas"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_JUNO,
SE_JUNO,
TRUE,
_("Juno"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_VESTA,
SE_VESTA,
TRUE,
_("Vesta"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_PHOLUS,
SE_PHOLUS,
TRUE,
_("Pholus"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_NESSUS,
SE_AST_OFFSET + 7066,
TRUE,
_("Nessus"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_CHARIKLO,
SE_AST_OFFSET + 10199,
TRUE,
_("Chariklo"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_SEDNA,
SE_AST_OFFSET + 90377,
TRUE,
_("Sedna"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_ERIS,
SE_AST_OFFSET + 136199,
TRUE,
_("Eris"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_DEJANIRA,
SE_AST_OFFSET + 157,
TRUE,
_("Dejanira"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_CIRCE,
SE_AST_OFFSET + 34,
TRUE,
_("Circe"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_ORCUS,
SE_AST_OFFSET + 90482,
TRUE,
_("Orcus"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_ASBOLUS,
SE_AST_OFFSET + 8405,
TRUE,
_("Asbolus"),
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_HYGIEA,
SE_AST_OFFSET + 10,
TRUE,
_("Hygiea"),
2.0,
0
);
gswe_sign_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)gswe_sign_info_unref);
gswe_sign_info_table = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify)gswe_sign_info_unref
);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_ARIES, _("Aries"), GSWE_ELEMENT_FIRE, GSWE_QUALITY_CARDINAL);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_TAURUS, _("Taurus"), GSWE_ELEMENT_EARTH, GSWE_QUALITY_FIX);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_GEMINI, _("Gemini"), GSWE_ELEMENT_AIR, GSWE_QUALITY_MUTABLE);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_CANCER, _("Cancer"), GSWE_ELEMENT_WATER, GSWE_QUALITY_CARDINAL);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_LEO, _("Leo"), GSWE_ELEMENT_FIRE, GSWE_QUALITY_FIX);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_VIRGO, _("Virgo"), GSWE_ELEMENT_EARTH, GSWE_QUALITY_MUTABLE);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_LIBRA, _("Libra"), GSWE_ELEMENT_AIR, GSWE_QUALITY_CARDINAL);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_SCORPIO, _("Scorpio"), GSWE_ELEMENT_WATER, GSWE_QUALITY_FIX);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_SAGITTARIUS, _("Sagittarius"), GSWE_ELEMENT_FIRE, GSWE_QUALITY_MUTABLE);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_CAPRICORN, _("Capricorn"), GSWE_ELEMENT_EARTH, GSWE_QUALITY_CARDINAL);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_AQUARIUS, _("Aquarius"), GSWE_ELEMENT_AIR, GSWE_QUALITY_FIX);
ADD_SIGN(gswe_sign_info_table, sign_info, GSWE_SIGN_PISCES, _("Pisces"), GSWE_ELEMENT_WATER, GSWE_QUALITY_MUTABLE);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_ARIES,
_("Aries"),
GSWE_ELEMENT_FIRE,
GSWE_QUALITY_CARDINAL
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_TAURUS,
_("Taurus"),
GSWE_ELEMENT_EARTH,
GSWE_QUALITY_FIX
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_GEMINI,
_("Gemini"),
GSWE_ELEMENT_AIR,
GSWE_QUALITY_MUTABLE
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_CANCER,
_("Cancer"),
GSWE_ELEMENT_WATER,
GSWE_QUALITY_CARDINAL
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_LEO,
_("Leo"),
GSWE_ELEMENT_FIRE,
GSWE_QUALITY_FIX
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_VIRGO,
_("Virgo"),
GSWE_ELEMENT_EARTH,
GSWE_QUALITY_MUTABLE
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_LIBRA,
_("Libra"),
GSWE_ELEMENT_AIR,
GSWE_QUALITY_CARDINAL
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_SCORPIO,
_("Scorpio"),
GSWE_ELEMENT_WATER,
GSWE_QUALITY_FIX
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_SAGITTARIUS,
_("Sagittarius"),
GSWE_ELEMENT_FIRE,
GSWE_QUALITY_MUTABLE
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_CAPRICORN,
_("Capricorn"),
GSWE_ELEMENT_EARTH,
GSWE_QUALITY_CARDINAL
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_AQUARIUS,
_("Aquarius"),
GSWE_ELEMENT_AIR,
GSWE_QUALITY_FIX
);
ADD_SIGN(gswe_sign_info_table, sign_info,
GSWE_SIGN_PISCES,
_("Pisces"),
GSWE_ELEMENT_WATER,
GSWE_QUALITY_MUTABLE
);
gswe_house_system_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)gswe_house_system_info_unref);
gswe_house_system_info_table = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify)gswe_house_system_info_unref
);
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info, GSWE_HOUSE_SYSTEM_NONE, 0, _("None"));
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info, GSWE_HOUSE_SYSTEM_PLACIDUS, 'P', _("Placidus"));
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info, GSWE_HOUSE_SYSTEM_KOCH, 'K', _("Koch"));
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info, GSWE_HOUSE_SYSTEM_EQUAL, 'E', _("Equal"));
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info,
GSWE_HOUSE_SYSTEM_NONE,
0,
_("None")
);
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info,
GSWE_HOUSE_SYSTEM_PLACIDUS,
'P',
_("Placidus")
);
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info,
GSWE_HOUSE_SYSTEM_KOCH,
'K',
_("Koch")
);
ADD_HOUSE_SYSTEM(gswe_house_system_info_table, house_system_info,
GSWE_HOUSE_SYSTEM_EQUAL,
'E',
_("Equal")
);
gswe_aspect_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)gswe_aspect_info_unref);
gswe_aspect_info_table = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify)gswe_aspect_info_unref
);
// Note that because all aspects must be <= 180°, GSWE_ASPECT_NONE can
// never really exist. It is provided for name fetching purposes only.
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_NONE, _("None"), 360, 4, FALSE, FALSE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_CONJUCTION, _("Conjuction"), 0, 0, TRUE, TRUE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_OPPOSITION, _("Opposition"), 180, 0, TRUE, TRUE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_TRINE, _("Trine"), 120, 0, TRUE, TRUE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_SQUARE, _("Square"), 90, 0, FALSE, TRUE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_SEXTILE, _("Sextile"), 60, 1, TRUE, TRUE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_QUINCUNX, _("Quincunx"), 150, 2, FALSE, FALSE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_SEMISEXTILE, _("Semi-sextile"), 30, 2, TRUE, FALSE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_SEMISQUARE, _("Semi-square"), 45, 2, FALSE, FALSE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_SESQUISQUARE, _("Sesqui-square"), 135, 2, FALSE, FALSE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_QUINTILE, _("Quintile"), 72, 3, TRUE, FALSE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info, GSWE_ASPECT_BIQUINTILE, _("Bi-quintile"), 144, 3, TRUE, FALSE);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_NONE,
_("None"),
360,
4,
FALSE,
FALSE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_CONJUCTION,
_("Conjuction"),
0,
0,
TRUE,
TRUE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_OPPOSITION,
_("Opposition"),
180,
0,
TRUE,
TRUE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_TRINE,
_("Trine"),
120,
0,
TRUE,
TRUE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_SQUARE,
_("Square"),
90,
0,
FALSE,
TRUE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_SEXTILE,
_("Sextile"),
60,
1,
TRUE,
TRUE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_QUINCUNX,
_("Quincunx"),
150,
2,
FALSE,
FALSE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_SEMISEXTILE,
_("Semi-sextile"),
30,
2,
TRUE,
FALSE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_SEMISQUARE,
_("Semi-square"),
45,
2,
FALSE,
FALSE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_SESQUISQUARE,
_("Sesqui-square"),
135,
2,
FALSE,
FALSE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_QUINTILE,
_("Quintile"),
72,
3,
TRUE,
FALSE
);
ADD_ASPECT(gswe_aspect_info_table, aspect_info,
GSWE_ASPECT_BIQUINTILE,
_("Bi-quintile"),
144,
3,
TRUE,
FALSE
);
gswe_antiscion_axis_info_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)gswe_antiscion_axis_info_unref);
gswe_antiscion_axis_info_table = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify)gswe_antiscion_axis_info_unref
);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info, gswe_sign_info_table, sign_info, GSWE_ANTISCION_AXIS_NONE, _("None"), GSWE_SIGN_NONE, 0.0);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info, gswe_sign_info_table, sign_info, GSWE_ANTISCION_AXIS_ARIES, _("Aries/Libra"), GSWE_SIGN_ARIES, 0.0);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info, gswe_sign_info_table, sign_info, GSWE_ANTISCION_AXIS_MID_TAURUS, _("mid Taurus/Scorpio"), GSWE_SIGN_TAURUS, 15.0);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info, gswe_sign_info_table, sign_info, GSWE_ANTISCION_AXIS_CANCER, _("Cancer/Capricorn"), GSWE_SIGN_CANCER, 0.0);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info, gswe_sign_info_table, sign_info, GSWE_ANTISCION_AXIS_MID_LEO, _("mid Leo/Aquarius"), GSWE_SIGN_LEO, 15.0);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info,
gswe_sign_info_table, sign_info,
GSWE_ANTISCION_AXIS_NONE,
_("None"),
GSWE_SIGN_NONE,
0.0
);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info,
gswe_sign_info_table, sign_info,
GSWE_ANTISCION_AXIS_ARIES,
_("Aries/Libra"),
GSWE_SIGN_ARIES,
0.0
);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info,
gswe_sign_info_table, sign_info,
GSWE_ANTISCION_AXIS_MID_TAURUS,
_("mid Taurus/Scorpio"),
GSWE_SIGN_TAURUS,
15.0
);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info,
gswe_sign_info_table, sign_info,
GSWE_ANTISCION_AXIS_CANCER,
_("Cancer/Capricorn"),
GSWE_SIGN_CANCER,
0.0
);
ADD_ANTISCION(gswe_antiscion_axis_info_table, antiscion_axis_info,
gswe_sign_info_table, sign_info,
GSWE_ANTISCION_AXIS_MID_LEO,
_("mid Leo/Aquarius"),
GSWE_SIGN_LEO,
15.0
);
gswe_full_moon_base_date = gswe_timestamp_new_from_gregorian_full(2005, 5, 8, 3, 48, 0, 0, 0.0);
gswe_full_moon_base_date = gswe_timestamp_new_from_gregorian_full(
2005, 5, 8,
3, 48, 0, 0,
0.0
);
gswe_ephe_path = g_strdup(directory);
swe_set_ephe_path(directory);
@@ -250,10 +669,17 @@ gswe_init(void)
GswePlanetInfo *
gswe_find_planet_info_by_id(GswePlanet planet, GError **err)
{
GswePlanetInfo *ret = g_hash_table_lookup(gswe_planet_info_table, GINT_TO_POINTER(planet));
GswePlanetInfo *ret = g_hash_table_lookup(
gswe_planet_info_table,
GINT_TO_POINTER(planet)
);
if (ret == NULL) {
g_set_error(err, GSWE_ERROR, GSWE_ERROR_UNKNOWN_PLANET, "Planet %d is not registered", planet);
g_set_error(
err,
GSWE_ERROR, GSWE_ERROR_UNKNOWN_PLANET,
"Planet %d is not registered", planet
);
}
return ret;
@@ -269,10 +695,17 @@ gswe_find_planet_info_by_id(GswePlanet planet, GError **err)
GsweSignInfo *
gswe_find_sign_info_by_id(GsweZodiac sign, GError **err)
{
GsweSignInfo *ret = g_hash_table_lookup(gswe_sign_info_table, GINT_TO_POINTER(sign));
GsweSignInfo *ret = g_hash_table_lookup(
gswe_sign_info_table,
GINT_TO_POINTER(sign)
);
if (ret == NULL) {
g_set_error(err, GSWE_ERROR, GSWE_ERROR_UNKNOWN_SIGN, "Sign %d is not registered", sign);
g_set_error(
err,
GSWE_ERROR, GSWE_ERROR_UNKNOWN_SIGN,
"Sign %d is not registered", sign
);
}
return ret;
@@ -288,10 +721,17 @@ gswe_find_sign_info_by_id(GsweZodiac sign, GError **err)
GsweHouseSystemInfo *
gswe_find_house_system_info_by_id(GsweHouseSystem house_system, GError **err)
{
GsweHouseSystemInfo *ret = g_hash_table_lookup(gswe_house_system_info_table, GINT_TO_POINTER(house_system));
GsweHouseSystemInfo *ret = g_hash_table_lookup(
gswe_house_system_info_table,
GINT_TO_POINTER(house_system)
);
if (ret == NULL) {
g_set_error(err, GSWE_ERROR, GSWE_ERROR_UNKNOWN_HSYS, "House system %d is not registered", house_system);
g_set_error(
err,
GSWE_ERROR, GSWE_ERROR_UNKNOWN_HSYS,
"House system %d is not registered", house_system
);
}
return ret;
@@ -307,10 +747,17 @@ gswe_find_house_system_info_by_id(GsweHouseSystem house_system, GError **err)
GsweAspectInfo *
gswe_find_aspect_info_by_id(GsweAspect aspect, GError **err)
{
GsweAspectInfo *ret = g_hash_table_lookup(gswe_aspect_info_table, GINT_TO_POINTER(aspect));
GsweAspectInfo *ret = g_hash_table_lookup(
gswe_aspect_info_table,
GINT_TO_POINTER(aspect)
);
if (ret == NULL) {
g_set_error(err, GSWE_ERROR, GSWE_ERROR_UNKNOWN_ASPECT, "Aspect system %d is not registered", aspect);
g_set_error(
err,
GSWE_ERROR, GSWE_ERROR_UNKNOWN_ASPECT,
"Aspect system %d is not registered", aspect
);
}
return ret;
@@ -321,15 +768,25 @@ gswe_find_aspect_info_by_id(GsweAspect aspect, GError **err)
* @antiscion_axis: an antiscion axis ID registered with SWE-GLib
* @err: a GError
*
* Find the #GsweAntiscionAxisInfo record registered with the id @antiscion_axis.
* Find the #GsweAntiscionAxisInfo record registered with the id
* @antiscion_axis.
*/
GsweAntiscionAxisInfo *
gswe_find_antiscion_axis_info_by_id(GsweAntiscionAxis antiscion_axis, GError **err)
gswe_find_antiscion_axis_info_by_id(
GsweAntiscionAxis antiscion_axis,
GError **err)
{
GsweAntiscionAxisInfo *ret = g_hash_table_lookup(gswe_antiscion_axis_info_table, GINT_TO_POINTER(antiscion_axis));
GsweAntiscionAxisInfo *ret = g_hash_table_lookup(
gswe_antiscion_axis_info_table,
GINT_TO_POINTER(antiscion_axis)
);
if (ret == NULL) {
g_set_error(err, GSWE_ERROR, GSWE_ERROR_UNKNOWN_ANTISCION_AXIS, "Antiscion axis system %d is not registered", antiscion_axis);
g_set_error(
err,
GSWE_ERROR, GSWE_ERROR_UNKNOWN_ANTISCION_AXIS,
"Antiscion axis system %d is not registered", antiscion_axis
);
}
return ret;