From 91829aee248a07868196b9ae0dafd42e3e7b3e7f Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 20 Sep 2001 23:33:47 +0000 Subject: First bugfixes --- lib/Makefile.am | 6 +++--- src/Main.cc | 14 +------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 5149387..a9d8bc4 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -3,10 +3,10 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ AM_CFLAGS = -O3 -Wall -Wstrict-prototypes $(CFLAGS) AM_CXXFLAGS = -O3 -Wall -Wstrict-prototypes $(CXXFLAGS) INCLUDES = -I. -I.. -I$(includedir) -I../include -lib_LTLIBRARIES = libClasses.la +lib_LTLIBRARIES = libBaltisot.la -libClasses_la_SOURCES = Exceptions.cc Handle.cc Output.cc String.cc\ +libBaltisot_la_SOURCES = Exceptions.cc Handle.cc Output.cc String.cc\ Socket.cc Input.cc HttpServ.cc Variables.cc Action.cc Menu.cc Message.cc\ Form.cc Confirm.cc Table.cc checkargs.c datecalc.c -libClasses_la_LDFLAGS = -version-info $(Classes_VERSION_INFO) +libBaltisot_la_LDFLAGS = -version-info $(Baltisot_VERSION_INFO) diff --git a/src/Main.cc b/src/Main.cc index f3bf0d7..d4692a1 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -24,17 +24,8 @@ class InPipe : public Handle { int m_out; } * in; -extern Action * MenuAdmin, * MenuGestionMatos, * MenuGestionChantier, * MenuGestionPieces, * MenuGestionFournisseurs, * MenuInterventions, * MenuGestionLocations; -Action * ListeMenuPrincipal[] = {MenuAdmin, MenuGestionMatos, MenuGestionChantier, MenuGestionPieces, MenuGestionFournisseurs, MenuInterventions, MenuGestionLocations}; -String MenuPrincipalLabels[] = {"Administration", "Gestion du materiel", "Gestion des chantiers", "Gestion du stock de pièces", "Gestion des fournisseurs", "Interventions", "Locations"}; - -Action * buildmenu(void) { - return new Menu("Menu Principal", "start", MenuPrincipalLabels, ListeMenuPrincipal, 7); -} - int main(int argc, char ** argv) { int p[2], c; - String port = "1500"; if (pipe(p)) { cerr << "Error creating pipe.\n"; @@ -57,7 +48,6 @@ int main(int argc, char ** argv) { while ((c = getopt(argc, argv, "p:")) != EOF) { switch (c) { case 'p': - port = optarg; break; default: cerr << "Usage: " << argv[0] << " [-p port]\n"; @@ -66,12 +56,10 @@ int main(int argc, char ** argv) { } try { - HttpServ h(port.to_int()); - - h.MainLoop(buildmenu()); } catch (GeneralException e) { cerr << e.GetMsg() << endl; + delete in; exit(-1); } -- cgit v1.2.3