From 5dbd27941858c9de228eb8d45e3367bd6dd02fb0 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 7 May 2017 20:14:05 +0430 Subject: added a bunch a things --- bruiser/bruiser.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/bruiser/bruiser.h b/bruiser/bruiser.h index cdb5141..1f1a3f9 100644 --- a/bruiser/bruiser.h +++ b/bruiser/bruiser.h @@ -62,6 +62,23 @@ namespace bruiser #define YELLOW "\033[1;33m" #define NORMAL "\033[0m" #define CLEAR "\033[2J" + +#define SHELL_HISTORY_SIZE 100 + +#define NOT_IMPLEMENTED \ + do{\ + std::cout << BROWN << "not implemented yet\n" << NORMAL;\ + }while(0) + +#define PRINT_WITH_COLOR(X,Y) \ + do{\ + std::cout << X << Y << NORMAL;\ + }while(0) + +#define PRINT_WITH_COLOR_LB(X,Y) \ + do{\ + std::cout << X << Y << "\n" << NORMAL;\ + }while(0) /**********************************************************************************************************************/ /*Error Codes*/ #define M0_ERROR_CODES \ @@ -81,7 +98,7 @@ struct help std::string retval; }; -help CMDHelp[] ={ +help CMDHelp[] = { {"help", "", "display general help", "", ""}, {"quit", "", "quit bruiser", "", ""}, {"exit", "", "quit bruiser", "", ""}, @@ -90,7 +107,8 @@ help CMDHelp[] ={ {"clear", "", "clears the terminal", "", ""}, {"shell", "", "opens up a bash shell inside bruiser", "", ""}, {"history", "", "prints bruiser's history", "", ""}, - {"!", "", "prints the command from history", "", ""} + {"!", "", "prints the command from history", "", ""}, + {"list", "list functions", "lists the names of all available types", "", ""} }; /**********************************************************************************************************************/ /** @@ -205,7 +223,7 @@ class ShellHistory { public: ShellHistory() {} - boost::circular_buffer History{100}; + boost::circular_buffer History{SHELL_HISTORY_SIZE}; }; /**********************************************************************************************************************/ class Daemonize -- cgit v1.2.3