mirror of
https://github.com/louisrubet/rpn
synced 2025-01-01 18:20:06 +01:00
help now shows titles in bold chars
This commit is contained in:
parent
65e8f4966d
commit
41a783cfd8
2 changed files with 11 additions and 1 deletions
|
@ -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, "" },
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue