From 006c8ae137e1d12bdc4da9861b30fcbc2f2a0b51 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Fri, 6 Sep 2013 11:09:45 +0200 Subject: [PATCH] gswe_init() requires no parameters from now on SwEph path is automatically initialized to $(pkgdatadir) --- src/Makefile.am | 2 +- src/swe-glib.c | 6 +++--- src/swe-glib.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 15ad9e5..15c900f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -DG_LOG_DOMAIN=\"SWE-GLib\" -DLOCALEDIR=\"$(localedir)\" -D__SWE_GLIB_BUILDING__ +AM_CPPFLAGS = -DG_LOG_DOMAIN=\"SWE-GLib\" -DLOCALEDIR=\"$(localedir)\" -D__SWE_GLIB_BUILDING__ -DPKGDATADIR=\"$(pkgdatadir)\" lib_LTLIBRARIES = libswe-glib-1.0.la diff --git a/src/swe-glib.c b/src/swe-glib.c index e5160dc..141085f 100644 --- a/src/swe-glib.c +++ b/src/swe-glib.c @@ -101,7 +101,7 @@ gswe_free_mirror_info(gpointer mirror_info) * are made. */ void -gswe_init(gchar *sweph_path) +gswe_init(void) { GswePlanetInfo *planet_info; GsweSignInfo *sign_info; @@ -184,8 +184,8 @@ gswe_init(gchar *sweph_path) 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(sweph_path); - swe_set_ephe_path(sweph_path); + gswe_ephe_path = g_strdup(PKGDATADIR); + swe_set_ephe_path(PKGDATADIR); gswe_initialized = TRUE; } diff --git a/src/swe-glib.h b/src/swe-glib.h index 3e3a9a3..287bb08 100644 --- a/src/swe-glib.h +++ b/src/swe-glib.h @@ -12,7 +12,7 @@ extern GHashTable *gswe_house_system_info_table; extern GHashTable *gswe_aspect_info_table; extern GHashTable *gswe_mirror_info_table; -void gswe_init(gchar *sweph_path); +void gswe_init(); #endif /* __SWE_GLIB_H__ */