termaze

maze generation and pathfinding visualizer
git clone git://git.yotsev.xyz/termaze.git
Log | Files | Refs | README | LICENSE

commit e76c6284c4f17d44cfc4f099bd62dabd31d32acb
parent 162583c7a1ebb00854adbf76bf291e21e6d106f8
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Sat, 22 Aug 2020 12:13:12 +0100

Redirecting error messages to error output stream

Diffstat:
Mmain.cpp | 10++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/main.cpp b/main.cpp @@ -7,7 +7,6 @@ #include <time.h> #include <unistd.h> -/* #include "CLI11.hpp" */ #include "colors.hpp" #include "maze_gen.hpp" #include "pathfinding.hpp" @@ -113,11 +112,6 @@ state& s = state::GetInstance(); int main(int argc, char** argv) { - // handling of command line arguments - /* CLI::App app; */ - /* app.add_option("-p,--pathfinder", s.pathfinder, "Select a pathfinder"); */ - /* app.add_option("-g,--generator", s.generator, "Select a generator"); */ - /* CLI11_PARSE(app, argc, argv); */ // setting a suitable seed for the random number generator srand(mix(clock(), time(NULL), getpid())); @@ -129,12 +123,12 @@ int main(int argc, char** argv) curs_set(0); if (!has_colors()) { endwin(); - printf("Your terminal does not support color!\n"); + std::cerr << "Your terminal does not support color!\n"; return -1; } if (!can_change_color()) { endwin(); - printf("Your terminal does not support redefining of colors!\n"); + std::cerr << "Your terminal does not support redefining of colors!\n"; return -1; } start_color();