# # # patch "asciik.cc" # from [d7c38001cec6d66fce66de977e67ce31be03d16d] # to [6c4d34a89644e4bd6712289b7bb32d0a1f1fb877] # # patch "asciik.hh" # from [81731a9c0939c9e47e375ee780ec9bbb4da2a8b0] # to [5ee111c1d644c8d03784227d9664c14c6631c418] # ============================================================ --- asciik.cc d7c38001cec6d66fce66de977e67ce31be03d16d +++ asciik.cc 6c4d34a89644e4bd6712289b7bb32d0a1f1fb877 @@ -138,9 +138,11 @@ using std::min; using std::insert_iterator; using std::max; using std::min; +using std::ostream; using std::ostream_iterator; using std::pair; using std::set; +using std::string; using std::vector; using boost::algorithm::split; using boost::algorithm::is_any_of; @@ -254,10 +256,11 @@ asciik::draw(const size_t curr_items, co --num_lines; // prints it out - output << F("%s") % line << " " << lines[0] << '\n'; - output << F("%s") % interline << " " << lines[1] << '\n'; + //TODO convert line/interline/interline2 from ASCII to system charset + output << line << " " << lines[0] << '\n'; + output << interline << " " << lines[1] << '\n'; for (int i = 2; i < num_lines; ++i) - output << F("%s") % interline2 << " " << lines[i] << '\n'; + output << interline2 << " " << lines[i] << '\n'; } bool ============================================================ --- asciik.hh 81731a9c0939c9e47e375ee780ec9bbb4da2a8b0 +++ asciik.hh 5ee111c1d644c8d03784227d9664c14c6631c418 @@ -1,7 +1,8 @@ #ifndef __ASCIIK_HH__ #define __ASCIIK_HH__ #include +#include #include #include "revision.hh" @@ -14,17 +15,17 @@ public: // Multiple lines are supported in annotation (the graph will stretch // accordingly); empty newlines at the end will be removed. void print(const revision_id & rev, const std::set & parents, - const string & annotation); + const std::string & annotation); //TODO: cambiare set-parents to vector-next private: void links_cross(const std::set > & links, std::set & crosses) const; void draw(const size_t curr_items, const size_t next_items, const size_t curr_loc, const std::set > & links, - const std::set & curr_ghosts, const string & annotation) const; + const std::set & curr_ghosts, const std::string & annotation) const; bool try_draw(const std::vector & next_row, const size_t curr_loc, const std::set & parents, - const string & annotation) const; + const std::string & annotation) const; // internal state size_t width; std::ostream & output;