From 720c5a33b6a49cf328fdd7611f49153cf8f60247 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 8 Apr 2020 14:51:57 +0300 Subject: Separate tests and examples into individual packages Also make cli module to be explicitly enabled via the config.cli configuration variable. --- examples/hello/driver.cxx | 58 ----------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 examples/hello/driver.cxx (limited to 'examples/hello/driver.cxx') diff --git a/examples/hello/driver.cxx b/examples/hello/driver.cxx deleted file mode 100644 index 30fdf6e..0000000 --- a/examples/hello/driver.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// file : examples/hello/driver.cxx -// author : Boris Kolpackov -// license : MIT; see accompanying LICENSE file - -#include - -#include "hello.hxx" - -using namespace std; - -void -usage (ostream& os) -{ - os << "usage: driver [options] " << endl - << "options:" << endl; - options::print_usage (os); -} - -int -main (int argc, char* argv[]) -{ - try - { - int end; // End of options. - options o (argc, argv, end); - - if (o.help ()) - { - usage (cout); - return 0; - } - - if (end == argc) - { - cerr << "no names provided" << endl; - usage (cerr); - return 1; - } - - // Print the greetings. - // - for (int i = end; i < argc; i++) - { - cout << o.greeting () << ", " << argv[i]; - - for (unsigned int j = 0; j < o.exclamations (); j++) - cout << '!'; - - cout << endl; - } - } - catch (const cli::exception& e) - { - cerr << e << endl; - usage (cerr); - return 1; - } -} -- cgit v1.1