Index: tools/CMakeLists.txt
===================================================================
--- tools/CMakeLists.txt	(revision 574)
+++ tools/CMakeLists.txt	(revision 596)
@@ -1,8 +1,8 @@
 INCLUDE_DIRECTORIES(
-  ${CMAKE_SOURCE_DIR}
-  ${CMAKE_BINARY_DIR}
+  ${PROJECT_SOURCE_DIR}
+  ${PROJECT_BINARY_DIR}
 )
 
-LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
+LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
 
 ADD_EXECUTABLE(lgf-gen lgf-gen.cc)
@@ -23,6 +23,6 @@
 IF(NOT WIN32)
   INSTALL(
-    FILES ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
-    RUNTIME DESTINATION bin
+    PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/lemon-0.x-to-1.x.sh
+    DESTINATION bin
     COMPONENT bin)
 ENDIF(NOT WIN32)
Index: tools/dimacs-solver.cc
===================================================================
--- tools/dimacs-solver.cc	(revision 652)
+++ tools/dimacs-solver.cc	(revision 658)
@@ -24,9 +24,8 @@
 ///
 /// See
-/// \verbatim
-///  dimacs-solver --help
-/// \endverbatim
+/// \code
+///   dimacs-solver --help
+/// \endcode
 /// for more info on usage.
-///
 
 #include <iostream>
@@ -44,5 +43,5 @@
 #include <lemon/dijkstra.h>
 #include <lemon/preflow.h>
-#include <lemon/max_matching.h>
+#include <lemon/matching.h>
 #include <lemon/network_simplex.h>
 
@@ -74,5 +73,5 @@
 template<class Value>
 void solve_max(ArgParser &ap, std::istream &is, std::ostream &,
-              DimacsDescriptor &desc)
+               Value infty, DimacsDescriptor &desc)
 {
   bool report = !ap.given("q");
@@ -82,5 +81,5 @@
   Timer ti;
   ti.restart();
-  readDimacsMax(is, g, cap, s, t, desc);
+  readDimacsMax(is, g, cap, s, t, infty, desc);
   if(report) std::cerr << "Read the file: " << ti << '\n';
   ti.restart();
@@ -103,5 +102,5 @@
   Timer ti;
   ti.restart();
-  readDimacsMin(is, g, lower, cap, cost, sup, desc);
+  readDimacsMin(is, g, lower, cap, cost, sup, 0, desc);
   if (report) std::cerr << "Read the file: " << ti << '\n';
   ti.restart();
@@ -139,4 +138,15 @@
            DimacsDescriptor &desc)
 {
+  std::stringstream iss(static_cast<std::string>(ap["infcap"]));
+  Value infty;
+  iss >> infty;
+  if(iss.fail())
+    {
+      std::cerr << "Cannot interpret '"
+                << static_cast<std::string>(ap["infcap"]) << "' as infinite"
+                << std::endl;
+      exit(1);
+    }
+  
   switch(desc.type)
     {
@@ -145,5 +155,5 @@
       break;
     case DimacsDescriptor::MAX:
-      solve_max<Value>(ap,is,os,desc);
+      solve_max<Value>(ap,is,os,infty,desc);
       break;
     case DimacsDescriptor::SP:
@@ -182,4 +192,5 @@
     .optionGroup("datatype","ldouble")
     .onlyOneGroup("datatype")
+    .stringOption("infcap","Value used for 'very high' capacities","0")
     .run();
 
Index: tools/dimacs-to-lgf.cc
===================================================================
--- tools/dimacs-to-lgf.cc	(revision 463)
+++ tools/dimacs-to-lgf.cc	(revision 631)
@@ -25,9 +25,8 @@
 ///
 /// See
-/// \verbatim
-///  dimacs-to-lgf --help
-/// \endverbatim
-/// for more info on usage.
-///
+/// \code
+///   dimacs-to-lgf --help
+/// \endcode
+/// for more info on the usage.
 
 #include <iostream>
@@ -97,5 +96,5 @@
         DoubleArcMap lower(digraph), capacity(digraph), cost(digraph);
         DoubleNodeMap supply(digraph);
-        readDimacsMin(is, digraph, lower, capacity, cost, supply, desc);
+        readDimacsMin(is, digraph, lower, capacity, cost, supply, 0, desc);
         DigraphWriter<Digraph>(digraph, os).
           nodeMap("supply", supply).
@@ -112,5 +111,5 @@
         Node s, t;
         DoubleArcMap capacity(digraph);
-        readDimacsMax(is, digraph, capacity, s, t, desc);
+        readDimacsMax(is, digraph, capacity, s, t, 0, desc);
         DigraphWriter<Digraph>(digraph, os).
           arcMap("capacity", capacity).
Index: tools/lemon-0.x-to-1.x.sh
===================================================================
--- tools/lemon-0.x-to-1.x.sh	(revision 489)
+++ tools/lemon-0.x-to-1.x.sh	(revision 621)
@@ -23,10 +23,9 @@
         -e "s/UGraph/_Gr_aph_label_/g"\
         -e "s/u[Gg]raph/_gr_aph_label_/g"\
-        -e "s/\<Graph\>/_Digr_aph_label_/g"\
+        -e "s/Graph\>/_Digr_aph_label_/g"\
         -e "s/\<graph\>/_digr_aph_label_/g"\
-        -e "s/\<Graphs\>/_Digr_aph_label_s/g"\
+        -e "s/Graphs\>/_Digr_aph_label_s/g"\
         -e "s/\<graphs\>/_digr_aph_label_s/g"\
-        -e "s/_Graph/__Gr_aph_label_/g"\
-        -e "s/\([Gg]\)raph\([a-z_]\)/_\1r_aph_label_\2/g"\
+        -e "s/\([Gg]\)raph\([a-z]\)/_\1r_aph_label_\2/g"\
         -e "s/\([a-z_]\)graph/\1_gr_aph_label_/g"\
         -e "s/Graph/_Digr_aph_label_/g"\
@@ -35,12 +34,12 @@
         -e "s/u[Ee]dge/_ed_ge_label_/g"\
         -e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
-        -e "s/\<Edge\>/_Ar_c_label_/g"\
+        -e "s/Edge\>/_Ar_c_label_/g"\
         -e "s/\<edge\>/_ar_c_label_/g"\
-        -e "s/\<Edges\>/_Ar_c_label_s/g"\
+        -e "s/_edge\>/_ar_c_label_/g"\
+        -e "s/Edges\>/_Ar_c_label_s/g"\
         -e "s/\<edges\>/_ar_c_label_s/g"\
-        -e "s/_Edge/__Ed_ge_label_/g"\
-        -e "s/Edge\([a-z_]\)/_Ed_ge_label_\1/g"\
-        -e "s/edge\([a-z_]\)/_ed_ge_label_\1/g"\
-        -e "s/\([a-z_]\)edge/\1_ed_ge_label_/g"\
+        -e "s/_edges\>/_ar_c_label_s/g"\
+        -e "s/\([Ee]\)dge\([a-z]\)/_\1d_ge_label_\2/g"\
+        -e "s/\([a-z]\)edge/\1_ed_ge_label_/g"\
         -e "s/Edge/_Ar_c_label_/g"\
         -e "s/edge/_ar_c_label_/g"\
@@ -91,4 +90,8 @@
         -e "s/\<StoreBoolMap\>/LoggerBoolMap/g"\
         -e "s/\<storeBoolMap\>/loggerBoolMap/g"\
+        -e "s/\<InvertableMap\>/CrossRefMap/g"\
+        -e "s/\<invertableMap\>/crossRefMap/g"\
+        -e "s/\<DescriptorMap\>/RangeIdMap/g"\
+        -e "s/\<descriptorMap\>/rangeIdMap/g"\
         -e "s/\<BoundingBox\>/Box/g"\
         -e "s/\<readNauty\>/readNautyGraph/g"\
@@ -117,4 +120,9 @@
         -e "s/\<DirGraphAdaptor\>/Orienter/g"\
         -e "s/\<dirGraphAdaptor\>/orienter/g"\
+        -e "s/\<LpCplex\>/CplexLp/g"\
+        -e "s/\<MipCplex\>/CplexMip/g"\
+        -e "s/\<LpGlpk\>/GlpkLp/g"\
+        -e "s/\<MipGlpk\>/GlpkMip/g"\
+        -e "s/\<LpSoplex\>/SoplexLp/g"\
     <$i > $TMP
     mv $TMP $i
Index: tools/lgf-gen.cc
===================================================================
--- tools/lgf-gen.cc	(revision 571)
+++ tools/lgf-gen.cc	(revision 631)
@@ -24,13 +24,12 @@
 ///
 /// See
-/// \verbatim
-///  lgf-gen --help
-/// \endverbatim
+/// \code
+///   lgf-gen --help
+/// \endcode
 /// for more info on the usage.
-///
-
 
 #include <algorithm>
 #include <set>
+#include <ctime>
 #include <lemon/list_graph.h>
 #include <lemon/random.h>
