diff options
author | deva <deva> | 2008-07-29 12:52:50 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-29 12:52:50 +0000 |
commit | e388de9cf524977c36b523e31ad9d75816207ff5 (patch) | |
tree | 4845b6396c9ca071a11345ca5ce87077542d48d3 /server | |
parent | 42512d40ef93f0f85d107a7dc6d58973f93a1d95 (diff) |
Added configure option to remove pentominos support.
Diffstat (limited to 'server')
-rw-r--r-- | server/configure.in | 17 | ||||
-rw-r--r-- | server/src/Makefile.am | 2 | ||||
-rw-r--r-- | server/src/server.cc | 8 | ||||
-rw-r--r-- | server/xml/macros/example.xml | 33 |
4 files changed, 38 insertions, 22 deletions
diff --git a/server/configure.in b/server/configure.in index 624df8e..79a14e1 100644 --- a/server/configure.in +++ b/server/configure.in @@ -6,12 +6,27 @@ AM_INIT_AUTOMAKE( pracrod, 0.0.1 ) dnl ====================== dnl Compile with debug options dnl ====================== -AC_ARG_WITH(debug, [ --with-debug build with debug support]) +AC_ARG_WITH(debug, + [ --with-debug build with debug support (default=no)], + [with_debug=yes], + [with_debug=no]) if test x$with_debug == xyes; then AC_MSG_WARN([*** Building with debug support!]) CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector -Wall -Werror -g -O0" fi +dnl ====================== +dnl Compile without pentominos support +dnl ====================== +AC_ARG_WITH(pentominos, + [ --with-pentominos build without pentominos support (default=yes)], + [], + [with_pentominos=yes]) +if test x$with_pentominos == xno; then + AC_MSG_WARN([*** Building without pentominos support!]) + CXXFLAGS="$CXXFLAGS -DWITHOUT_PENTOMINOS" +fi + AC_PROG_CXX AC_PROG_LIBTOOL diff --git a/server/src/Makefile.am b/server/src/Makefile.am index 6e197c2..93d830a 100644 --- a/server/src/Makefile.am +++ b/server/src/Makefile.am @@ -82,7 +82,7 @@ test_macroparser: macroparser.cc @../../tools/test macroparser.cc saxparser.cc exception.cc log.cc -lexpat -DXML="\"../xml\"" test_server: server.cc - @../../tools/test server.cc templateparser.cc saxparser.cc queryparser.cc queryhandler.cc luaquerymapper.cc tcpsocket.cc exception.cc log.cc configuration.cc transactionparser.cc widgetgenerator.cc -lexpat $(LUA_LIBS) $(CONFIG_LIBS) -DXML="\"../xml\"" + @../../tools/test server.cc templateparser.cc saxparser.cc queryparser.cc queryhandler.cc luaquerymapper.cc tcpsocket.cc exception.cc log.cc configuration.cc transactionparser.cc widgetgenerator.cc database.cc macroparser.cc xml_encode_decode.cc -lexpat $(LUA_LIBS) $(CONFIG_LIBS) $(PQXX_LIBS) $(PQXX_CXXFLAGS) -DXML="\"../xml\"" #killall -9 test_server diff --git a/server/src/server.cc b/server/src/server.cc index c0ec223..54a2616 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -129,7 +129,8 @@ static void connection(TCPSocket &socket) tp.parse(); Template *templ = tp.getTemplate(); - + +#ifndef WITHOUT_PENTOMINOS // Send the queries to Pentominos (if any) TCPSocket s; s.connect("localhost", 11108); @@ -151,7 +152,10 @@ static void connection(TCPSocket &socket) std::string result = qh.exec(); printf("Got result: [%s]\n", result.c_str()); - +#else + std::string result = ""; +#endif/*WITHOUT_PENTOMINOS*/ + // Parse the result from the queries to pentominos QueryParser qp(result); qp.parse(); diff --git a/server/xml/macros/example.xml b/server/xml/macros/example.xml index f875747..eafcf33 100644 --- a/server/xml/macros/example.xml +++ b/server/xml/macros/example.xml @@ -19,12 +19,11 @@ lensmeter.right.cyl and lensmeter.right.cyl.value and lensmeter.right.cyl.timestamp ) - then - timestamp = lensmeter.right.cyl.value - value = lensmeter.right.cyl.value end - end + then + timestamp = lensmeter.right.cyl.value + value = lensmeter.right.cyl.value end - + return value, timestamp </map> </maps> @@ -44,7 +43,7 @@ <window name="mainwindow" caption="Example Window" width="300" - height="400" + height="500" layout="vbox"> <frame name="linse_frame" caption="Linser:" layout="vbox"> <frame name="linse_framea" layout="hbox"> @@ -61,18 +60,16 @@ </frame> </frame> <frame name="linse_frame" caption="FlereLinser:" layout="vbox"> - <frame name="linse_framea" layout="hbox"> - <label name="a" width="100" caption="Akse rotation2:"/> - <lineedit name="axis2" regexp="[24]*" map="axis" lua="theanswer" value="244"/> - </frame> - <frame name="linse_frameb" layout="hbox"> - <label name="b" width="100" caption="Sphere2:"/> - <lineedit name="sphere2" regexp="[24]*" lua="theanswer" value="42"/> - </frame> - <frame name="linse_framec" layout="hbox"> - <label name="c" width="100" caption="Cyl2:"/> - <lineedit name="cyl2" regexp="[24]*" map="cyl" value=""/> - </frame> + <multilist name="multilisttest" layout="hbox"> + <items layout="hbox"> + <item value="Pillemigselvinavlen"/> + <item value="Øffegøj"/> + </items> + <input> + <label name="c" width="100" caption="Cyl2:"/> + <lineedit name="cyl2" regexp="[24]*" map="cyl" value=""/> + </input> + </multilist> </frame> <frame name="buttons" layout="hbox"> <button name="cancel" caption="Annuller" action="cancel"/> |