From 1966d1f50399d7b55cf152313ed0e377184d62af Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Tue, 3 Sep 2013 11:35:37 +0200 Subject: [PATCH] Removed unneeded structs from executable code --- src/astrognome.c | 44 -------------------------------------------- src/calculate.h | 20 -------------------- 2 files changed, 64 deletions(-) diff --git a/src/astrognome.c b/src/astrognome.c index 89e088f..b9a5366 100644 --- a/src/astrognome.c +++ b/src/astrognome.c @@ -7,12 +7,6 @@ #define EPHEDIR "/home/polesz/Projektek/c/astrognome/swe/data" -typedef struct { - int signId; - signElement_t element; - signType_t type; -} signData_t; - typedef struct { int planetId; gchar *name; @@ -25,21 +19,6 @@ typedef struct { fall; } planetData_t; -const char *signTypeName[] = { - NULL, - "Cardinal", - "Fix", - "Mutable" -}; - -const char *signElementName[] = { - NULL, - "Fire", - "Earth", - "Air", - "Water" -}; - const char *moonStateName[] = { "New Moon", "Waxing Crescent Moon", @@ -52,22 +31,6 @@ const char *moonStateName[] = { "Dark Moon" }; -const char *signName[] = { - NULL, - "Aries", - "Taurus", - "Gemini", - "Cancer", - "Leo", - "Virgo", - "Libra", - "Scorpio", - "Sagittarius", - "Capricorn", - "Aquarius", - "Pisces" -}; - typedef struct { gchar *name; guint size; @@ -104,12 +67,6 @@ const mirrorpointData_t mirrorpointData[] = { { "mid Leo/Aquarius", SIGN_LEO, TRUE }, }; -#define ADD_SIGN(ht, v, s, e, t) (v) = g_new0(signData_t, 1); \ - (v)->signId = (s); \ - (v)->element = (e); \ - (v)->type = (t); \ - g_hash_table_replace((ht), GINT_TO_POINTER(s), (v)); - #define ADD_PLANET(ht, v, i, n, o, dom1, dom2, exi1, exi2, exa, fal) (v) = g_new0(planetData_t, 1); \ (v)->planetId = (i); \ (v)->name = g_strdup(n); \ @@ -364,7 +321,6 @@ main(int argc, char *argv[]) ADD_PLANET(planetDataTable, planetData, SE_NPLANETS + SE_MC, "Midheaven", 5.0, SIGN_NONE, SIGN_NONE, SIGN_NONE, SIGN_NONE, SIGN_NONE, SIGN_NONE); ADD_PLANET(planetDataTable, planetData, SE_NPLANETS + SE_VERTEX, "Vertex", 2.0, SIGN_NONE, SIGN_NONE, SIGN_NONE, SIGN_NONE, SIGN_NONE, SIGN_NONE); - swe_set_ephe_path(EPHEDIR); gswe_init(EPHEDIR); timestamp = gswe_timestamp_new_from_gregorian_full(year, month, day, hour, min, sec, 0, 1.0); diff --git a/src/calculate.h b/src/calculate.h index 947473d..b774685 100644 --- a/src/calculate.h +++ b/src/calculate.h @@ -1,8 +1,5 @@ #include "../swe/src/swephexp.h" -#define SYNODIC 29.53058867 -#define MSPERDAY 86400000 - typedef enum { SIGN_NONE, SIGN_ARIES, @@ -42,23 +39,6 @@ typedef struct { int fallingPlanet; } signTypePair_t; -typedef enum { - MOON_STATE_NEW, - MOON_STATE_WAXING_CRESCENT, - MOON_STATE_WAXING_HALF, - MOON_STATE_WAXING_GIBBOUS, - MOON_STATE_FULL, - MOON_STATE_WANING_GIBBOUS, - MOON_STATE_WANING_HALF, - MOON_STATE_WANING_CRESCENT, - MOON_STATE_DARK -} moonState; - -typedef struct { - moonState phase; - double visiblePercentage; -} moonPhase; - typedef struct { double position; zodiacSign sign;