summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Exceptions.h3
-rw-r--r--include/generic.h2
-rw-r--r--lib/Main.cc4
-rw-r--r--lib/generic.cc2
-rw-r--r--po/fr.po2
5 files changed, 7 insertions, 6 deletions
diff --git a/include/Exceptions.h b/include/Exceptions.h
index 79078e5..a3fad9e 100644
--- a/include/Exceptions.h
+++ b/include/Exceptions.h
@@ -8,6 +8,8 @@
#include <string.h>
#include <stdlib.h>
+class String;
+
class Base {
public:
static char * strdup(const char * s);
@@ -23,6 +25,7 @@ class Base {
static int pipe(int * p, int flag = 0);
static pid_t fork();
static void exit(int);
+ static void printm(int level, String fmt, ...);
};
class String;
diff --git a/include/generic.h b/include/generic.h
index f9ec000..4b9c455 100644
--- a/include/generic.h
+++ b/include/generic.h
@@ -77,8 +77,6 @@ extern char verbosity;
char ** split(char * s, char t);
#ifdef __cplusplus
-#include <String.h>
-void printm(int level, String fmt, ...);
#ifndef MAX
template<class T>
diff --git a/lib/Main.cc b/lib/Main.cc
index 774cf08..64cdc7d 100644
--- a/lib/Main.cc
+++ b/lib/Main.cc
@@ -31,12 +31,12 @@ int main(int argc, char ** argv, char ** enve) {
r = e.GetCode();
}
catch (GeneralException e) {
- printm(M_ERROR, "The application caused an exception: %s\n", e.GetMsg());
+ Base::printm(M_ERROR, "The application caused an exception: %s\n", e.GetMsg());
delete Application;
exit(-1);
}
catch (...) {
- printm(M_ERROR, "The application caused an unknow exception\n");
+ Base::printm(M_ERROR, "The application caused an unknow exception\n");
delete Application;
exit(-1);
}
diff --git a/lib/generic.cc b/lib/generic.cc
index bade101..357779f 100644
--- a/lib/generic.cc
+++ b/lib/generic.cc
@@ -26,7 +26,7 @@ char verbosity = 0;
char * heads[] = {"EE", "--", "WW", "II"};
-void printm(int level, String m, ...) {
+void Base::printm(int level, String m, ...) {
va_list ap;
if (verbosity < level) {
diff --git a/po/fr.po b/po/fr.po
index 2d7192d..8cea32b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Baltisot 1.0.0\n"
-"POT-Creation-Date: 2002-12-06 01:46+0100\n"
+"POT-Creation-Date: 2002-12-07 03:03+0100\n"
"PO-Revision-Date: 2001-10-29 08:26GMT\n"
"Last-Translator: Nicolas Noble <nicolas@nobis-crew.org>\n"
"Language-Team: French <fr@li.org>\n"