summaryrefslogtreecommitdiff
path: root/src/Main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.cc')
-rw-r--r--src/Main.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/Main.cc b/src/Main.cc
index d70c310..333328a 100644
--- a/src/Main.cc
+++ b/src/Main.cc
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <unistd.h>
#include <list>
#include <sys/types.h>
@@ -18,6 +21,7 @@
#include "Image.h"
#include "CopyJob.h"
#include "IRC.h"
+#include "Main.h"
InPipe * in;
@@ -137,17 +141,21 @@ Send this file: <INPUT NAME=\"userfile\" TYPE=\"file\">
Action * Liste[] = {a1, a2, a3, a4, a5, ad, java, up};
String Labels[] = {"Action 1", "Action 2", "Action 3", "Action 4", "Action 5", "Action dynamique", "Essai de java", "Test d'upload"};
+CODE_BEGINS
+
Action * buildmenu(void) {
- return new Menu("Menu Principal", "start", Labels, Liste, 8);
+ Action * m = new Menu("Menu Principal", "start", Labels, Liste, 8);
+ return m;
}
-int main(int argc, char ** argv) {
+int startup() {
int c;
String port = "1500";
std::list<String> testlist;
testlist.push_front("poide");
-
+
+/*
in = new InPipe();
in->Hook();
@@ -160,6 +168,7 @@ int main(int argc, char ** argv) {
std::cerr << "The stdout redirect has failed.\n";
exit(-1);
}
+*/
while ((c = getopt(argc, argv, "p:")) != EOF) {
switch (c) {
@@ -173,7 +182,7 @@ int main(int argc, char ** argv) {
}
try {
- HttpServ h(buildmenu(), port.to_int());
+ HttpServ h(buildmenu(), port.to_int(), "testing");
// IRC i("botalacon");
// i.Connect();
// i.MainLoop();
@@ -190,5 +199,6 @@ int main(int argc, char ** argv) {
}
delete in;
- exit(0);
+ return 0;
}
+CODE_ENDS