summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-03-14 23:36:44 +0000
committerMike Buland <eichlan@xagasoft.com>2007-03-14 23:36:44 +0000
commit571f489db6a49809e29c6b1f9c3f2fd08089f012 (patch)
tree81a9e61026e0eea7b71133f952cc6d8ce250fc0a /src
parent33523ddc865d55db1c7e45eca504f97a97aa5ce0 (diff)
downloadlibbu++-571f489db6a49809e29c6b1f9c3f2fd08089f012.tar.gz
libbu++-571f489db6a49809e29c6b1f9c3f2fd08089f012.tar.bz2
libbu++-571f489db6a49809e29c6b1f9c3f2fd08089f012.tar.xz
libbu++-571f489db6a49809e29c6b1f9c3f2fd08089f012.zip
The param proc now actually uses the extra field.
Diffstat (limited to 'src')
-rw-r--r--src/paramproc.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/paramproc.cpp b/src/paramproc.cpp
index 906ec21..a352e66 100644
--- a/src/paramproc.cpp
+++ b/src/paramproc.cpp
@@ -446,8 +446,8 @@ int ParamProc::help( int argc, char *argv[] )
446 int len=0; 446 int len=0;
447 for( i = lArg.begin(); i != lArg.end(); i++ ) 447 for( i = lArg.begin(); i != lArg.end(); i++ )
448 { 448 {
449 if( len < (*i)->sWord.getLength() ) 449 if( len < (*i)->sWord.getLength() + (*i)->sExtra.getLength() )
450 len = (*i)->sWord.getLength(); 450 len = (*i)->sWord.getLength() + (*i)->sExtra.getLength();
451 } 451 }
452 char fmt[10]; 452 char fmt[10];
453 sprintf( fmt, "%%-%ds ", len ); 453 sprintf( fmt, "%%-%ds ", len );
@@ -481,7 +481,10 @@ int ParamProc::help( int argc, char *argv[] )
481 if( (*i)->sWord.getString() ) 481 if( (*i)->sWord.getString() )
482 { 482 {
483 printf("--"); 483 printf("--");
484 printf( fmt, (*i)->sWord.getString() ); 484 std::string sTmp = (*i)->sWord.getString();
485 if( (*i)->sExtra.getString() )
486 sTmp += (*i)->sExtra.getString();
487 printf( fmt, sTmp.c_str() );
485 } 488 }
486 else 489 else
487 { 490 {