summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-02 11:48:26 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-02 11:48:26 +0000
commit1e5ca1852e059d640a7d2c080a2d7a79d53b37e8 (patch)
tree52772570ead0b618c781d1f86dd247deba89fee8 /src/main.cpp
parentb8dbdb628ba7a07a785e494d0ed76ebfe9e06615 (diff)
downloadMana-1e5ca1852e059d640a7d2c080a2d7a79d53b37e8.tar.gz
Mana-1e5ca1852e059d640a7d2c080a2d7a79d53b37e8.tar.bz2
Mana-1e5ca1852e059d640a7d2c080a2d7a79d53b37e8.tar.xz
Mana-1e5ca1852e059d640a7d2c080a2d7a79d53b37e8.zip
Prettier errors when things go wrong.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 16a97e61..ce45b460 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -170,10 +170,9 @@ void init_engine()
// If we can't read it, it doesn't exist !
if (tmwFile == NULL) {
// We reopen the file in write mode and we create it
- printf("No file : %s\n, Creating Default Options...\n", configPath);
tmwFile = fopen(configPath, "wt");
if (tmwFile == NULL) {
- printf("Can't create %s file. Using Defaults.\n", configPath);
+ printf("Can't create %s. Using Defaults.\n", configPath);
}
else {
fclose(tmwFile);
@@ -319,6 +318,10 @@ int main(int argc, char *argv[])
xmlInitParser();
LIBXML_TEST_VERSION;
+ // Redirect libxml errors to /dev/null
+ FILE *nullFile = fopen("/dev/null", "w");
+ xmlSetGenericErrorFunc(nullFile, NULL);
+
// Initialize PhysicsFS
PHYSFS_init(argv[0]);