Freeciv-3.2
Loading...
Searching...
No Matches
registry.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* libxml2 */
19#ifdef FREECIV_HAVE_XML_REGISTRY
20#include <libxml/parser.h>
21#endif /* FREECIV_HAVE_XML_REGISTRY */
22
23#include "registry_xml.h"
24
25#include "registry.h"
26
27/*********************************************************************/
31{
32#ifdef FREECIV_HAVE_XML_REGISTRY
34#endif /* FREECIV_HAVE_XML_REGISTRY */
35}
36
37/*********************************************************************/
41{
42#ifdef FREECIV_HAVE_XML_REGISTRY
44#endif /* FREECIV_HAVE_XML_REGISTRY */
45}
46
47/*********************************************************************/
50struct section_file *secfile_load(const char *filename,
52{
53#ifdef FREECIV_HAVE_XML_REGISTRY
54 struct stat buf;
55
56 if (fc_stat(filename, &buf) == 0) {
58
60 if (sec_doc != NULL) {
61 return xmlfile_load(sec_doc, filename);
62 }
63 }
64#endif /* FREECIV_HAVE_XML_REGISTRY */
65
66 return secfile_load_section(filename, NULL, allow_duplicates);
67}
char * incite_cost
Definition comments.c:75
struct section_file * secfile_load(const char *filename, bool allow_duplicates)
Definition registry.c:50
void registry_module_init(void)
Definition registry.c:30
void registry_module_close(void)
Definition registry.c:40
struct section_file * secfile_load_section(const char *filename, const char *section, bool allow_duplicates)
bool allow_duplicates
int fc_stat(const char *filename, struct stat *buf)
Definition support.c:576