/* Bygfoot Football Manager -- a small and simple GTK2-based football management game. http://bygfoot.sourceforge.net Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com) 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "cup.h" #include "file.h" #include "misc.h" #include "xml.h" #include "variables.h" #include "xml_loadsave_misc.h" #include "xml_loadsave_cup.h" #include "xml_loadsave_league.h" enum XmlLoadSaveCountryTags { TAG_MISC = TAG_START_MISC, TAG_MISC_SEASON, TAG_MISC_WEEK, TAG_MISC_WEEK_ROUND, TAG_MISC_COUNTER, TAG_MISC_ALLCUP, TAG_END }; gint state, countidx; void xml_loadsave_misc_start_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error) { gint i; gint tag = xml_get_tag_from_name(element_name); gboolean valid_tag = FALSE; for(i=TAG_MISC;i\n", TAG_MISC); xml_write_string(fil, country.name, TAG_NAME, I0); xml_write_string(fil, country.symbol, TAG_SYMBOL, I0); xml_write_string(fil, country.sid, TAG_SID, I0); xml_write_int(fil, season, TAG_MISC_SEASON, I0); xml_write_int(fil, week, TAG_MISC_WEEK, I0); xml_write_int(fil, week_round, TAG_MISC_WEEK_ROUND, I0); for(i=0;ilen;i++) xml_write_int(fil, acp(i)->id, TAG_MISC_ALLCUP, I0); fprintf(fil, "\n", TAG_MISC); fclose(fil); }