X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=parser%2Fparse.c;h=933ca4bc7f56e24bd87c5c281e45f66247a0af46;hb=dc9c39d042c186126d83124ef815451a492fedb2;hp=e79eec6e6be3679b041e1d7a5ae06588feb82cd9;hpb=c1b2fc5324522f74a14a5cfa210c95e1509a6e7f;p=chaz%2Fopenbox diff --git a/parser/parse.c b/parser/parse.c index e79eec6e..933ca4bc 100644 --- a/parser/parse.c +++ b/parser/parse.c @@ -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 #include @@ -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)