]> Dogcows Code - chaz/openbox/blobdiff - parser/parse.c
woot sexy
[chaz/openbox] / parser / parse.c
index e79eec6e6be3679b041e1d7a5ae06588feb82cd9..933ca4bc7f56e24bd87c5c281e45f66247a0af46 100644 (file)
@@ -1,3 +1,21 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   parse.c for the Openbox window manager
+   Copyright (c) 2003        Ben Jansens
+
+   This program 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 2 of the License, or
+   (at your option) any later version.
+
+   This program 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.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
 #include "parse.h"
 #include <glib.h>
 #include <string.h>
@@ -143,7 +161,7 @@ gboolean parse_load_mem(gpointer data, guint len, const char *rootname,
 
 void parse_close(xmlDocPtr doc)
 {
-    xmlFree(doc);
+    xmlFreeDoc(doc);
 }
 
 void parse_tree(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
@@ -311,8 +329,8 @@ void parse_paths_startup()
                                             g_build_filename
                                             (G_DIR_SEPARATOR_S,
                                              "usr", "share", NULL));
-        xdg_config_dir_paths = g_slist_append(xdg_config_dir_paths,
-                                              g_strdup(DATADIR));
+        xdg_data_dir_paths = g_slist_append(xdg_data_dir_paths,
+                                            g_strdup(DATADIR));
     }
     xdg_data_dir_paths = g_slist_prepend(xdg_data_dir_paths,
                                          xdg_data_home_path);
@@ -330,6 +348,10 @@ void parse_paths_shutdown()
         g_free(it->data);
     g_slist_free(xdg_config_dir_paths);
     xdg_config_dir_paths = NULL;
+    for (it = xdg_data_dir_paths; it; it = g_slist_next(it))
+        g_free(it->data);
+    g_slist_free(xdg_data_dir_paths);
+    xdg_data_dir_paths = NULL;
 }
 
 gchar *parse_expand_tilde(const gchar *f)
This page took 0.021488 seconds and 4 git commands to generate.