[Xfce4-commits] <xfce4-weather-plugin:master> Rename parse_xml_timestring to parse_timestring and make it public.

Harald Judt noreply at xfce.org
Sun Dec 9 23:44:14 CET 2012


Updating branch refs/heads/master
         to 7c0c6c7dab09b58e2f70acf596ab82546fbcda51 (commit)
       from bb9cc2acb6f9038d3af9fa60677324607485b1c2 (commit)

commit 7c0c6c7dab09b58e2f70acf596ab82546fbcda51
Author: Harald Judt <h.judt at gmx.at>
Date:   Sun Dec 9 19:24:26 2012 +0100

    Rename parse_xml_timestring to parse_timestring and make it public.

 panel-plugin/weather-parsers.c |   18 +++++++++---------
 panel-plugin/weather-parsers.h |    3 +++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index f51b5f3..08c9a64 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -89,9 +89,9 @@ get_timeslice(xml_weather *wd,
 }
 
 
-static time_t
-parse_xml_timestring(const gchar *ts,
-                     gchar *format) {
+time_t
+parse_timestring(const gchar *ts,
+                 gchar *format) {
     time_t t;
     struct tm tm;
 
@@ -233,11 +233,11 @@ parse_time(xmlNode *cur_node,
     xmlFree(datatype);
 
     from = PROP(cur_node, "from");
-    start_t = parse_xml_timestring(from, NULL);
+    start_t = parse_timestring(from, NULL);
     xmlFree(from);
 
     to = PROP(cur_node, "to");
-    end_t = parse_xml_timestring(to, NULL);
+    end_t = parse_timestring(to, NULL);
     xmlFree(to);
 
     if (G_UNLIKELY(!start_t || !end_t))
@@ -335,11 +335,11 @@ parse_astro_location(xmlNode *cur_node,
             xmlFree(never_sets);
 
             sunrise = PROP(child_node, "rise");
-            astro->sunrise = parse_xml_timestring(sunrise, NULL);
+            astro->sunrise = parse_timestring(sunrise, NULL);
             xmlFree(sunrise);
 
             sunset = PROP(child_node, "set");
-            astro->sunset = parse_xml_timestring(sunset, NULL);
+            astro->sunset = parse_timestring(sunset, NULL);
             xmlFree(sunset);
         }
 
@@ -363,11 +363,11 @@ parse_astro_location(xmlNode *cur_node,
             xmlFree(never_sets);
 
             moonrise = PROP(child_node, "rise");
-            astro->moonrise = parse_xml_timestring(moonrise, NULL);
+            astro->moonrise = parse_timestring(moonrise, NULL);
             xmlFree(moonrise);
 
             moonset = PROP(child_node, "set");
-            astro->moonset = parse_xml_timestring(moonset, NULL);
+            astro->moonset = parse_timestring(moonset, NULL);
             xmlFree(moonset);
 
             astro->moon_phase = PROP(child_node, "phase");
diff --git a/panel-plugin/weather-parsers.h b/panel-plugin/weather-parsers.h
index a7c8fd6..daf6210 100644
--- a/panel-plugin/weather-parsers.h
+++ b/panel-plugin/weather-parsers.h
@@ -123,6 +123,9 @@ typedef struct {
 
 xml_time *make_timeslice(void);
 
+time_t parse_timestring(const gchar *ts,
+                        gchar *format);
+
 void parse_weather(xmlNode *cur_node,
                    xml_weather *wd);
 


More information about the Xfce4-commits mailing list