From 571f489db6a49809e29c6b1f9c3f2fd08089f012 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 14 Mar 2007 23:36:44 +0000 Subject: The param proc now actually uses the extra field. --- src/paramproc.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') 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[] ) int len=0; for( i = lArg.begin(); i != lArg.end(); i++ ) { - if( len < (*i)->sWord.getLength() ) - len = (*i)->sWord.getLength(); + if( len < (*i)->sWord.getLength() + (*i)->sExtra.getLength() ) + len = (*i)->sWord.getLength() + (*i)->sExtra.getLength(); } char fmt[10]; sprintf( fmt, "%%-%ds ", len ); @@ -481,7 +481,10 @@ int ParamProc::help( int argc, char *argv[] ) if( (*i)->sWord.getString() ) { printf("--"); - printf( fmt, (*i)->sWord.getString() ); + std::string sTmp = (*i)->sWord.getString(); + if( (*i)->sExtra.getString() ) + sTmp += (*i)->sExtra.getString(); + printf( fmt, sTmp.c_str() ); } else { -- cgit v1.2.3