help now shows titles in bold chars

This commit is contained in:
Louis 2015-07-23 13:35:02 +02:00
parent 65e8f4966d
commit 41a783cfd8
2 changed files with 11 additions and 1 deletions

View file

@ -1,7 +1,7 @@
program::keyword_t program::_keywords[] =
{
//GENERAL
{ cmd_keyword, "", NULL, "\nGENERAL"},
{ cmd_undef, "", NULL, "\nGENERAL"},
{ cmd_keyword, "nop", &program::nop, "no operation"},
{ cmd_keyword, "?", &program::help, "" },
{ cmd_keyword, "h", &program::help, "" },

View file

@ -30,8 +30,18 @@ void help()
// keywords
for(unsigned int i=0; i<sizeof(_keywords)/sizeof(_keywords[0]); i++)
{
if (_keywords[i].comment.size() != 0)
{
// titles in bold
if (_keywords[i].type==cmd_undef)
cout<<ATTR_BOLD;
// show title or keyword + comment
cout<<_keywords[i].name<<"\t"<<_keywords[i].comment<<endl;
if (_keywords[i].type==cmd_undef)
cout<<ATTR_OFF;
}
}
cout<<endl;
// different modes