]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/graph/example/print-edges.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / graph / example / print-edges.cpp
index 7616022bcd0c10e85533514ba3b7bbc7a9bb94d7..d4d67046cbe87ae82f957c0a41dfdfaab5c77c95 100644 (file)
@@ -48,7 +48,7 @@ print_dependencies(std::ostream & out, const Graph & g,
 
 
 int
-main()
+main(int argc, const char** argv)
 {
   typedef adjacency_list < listS,       // Store out-edges of each vertex in a std::list
     vecS,                       // Store vertex set in a std::vector
@@ -57,8 +57,8 @@ main()
    >graph_type;
 
   graph_type g;                 // use default constructor to create empty graph
-  const char* dep_file_name = "makefile-dependencies.dat";
-  const char* target_file_name = "makefile-target-names.dat";
+  const char* dep_file_name = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+  const char* target_file_name = argc >= 3 ? argv[2] : "makefile-target-names.dat";
   std::ifstream file_in(dep_file_name), name_in(target_file_name);
   if (!file_in) {
     std::cerr << "** Error: could not open file " << dep_file_name