void C_StringListCommandLineOption::printStringOptions (const uint32_t inDisplayLength) { C_StringListCommandLineOption * p = gFirstStringListOption ; while (p != NULL) { uint32_t charCount = 0 ; if (p->mCommandChar != '\0') { co.setForeColor (kBlueForeColor) ; co.setTextAttribute (kBoldTextAttribute) ; co << "-" << cStringWithCharacter (p->mCommandChar) << "=string" ; co.setTextAttribute (kAllAttributesOff) ; charCount += 2 + (uint32_t) strlen ("=string") ; if (p->mCommandString [0] != '\0') { co << ", " ; charCount += 2 ; } } if (p->mCommandString [0] != '\0') { co.setForeColor (kBlueForeColor) ; co.setTextAttribute (kBoldTextAttribute) ; co << "--" << p->mCommandString << "=string" ; co.setTextAttribute (kAllAttributesOff) ; charCount += 2 + (uint32_t) (strlen (p->mCommandString) + strlen ("=string")) ; } if (charCount > inDisplayLength) { co << "\n" ; charCount = 0 ; } for (uint32_t i=charCount ; i<=inDisplayLength ; i++) { co << " " ; } p = p->mNext ; } }
void C_StringListCommandLineOption::printStringOptions (void) { C_StringListCommandLineOption * p = gFirstStringListOption ; while (p != NULL) { if (p->mCommandChar != '\0') { for (uint32_t i=0 ; i<2 ; i++) { if (i != 0) { co << " " ; } co.setForeColor (kBlueForeColor) ; co.setTextAttribute (kBoldTextAttribute) ; co << "-" << cStringWithCharacter (p->mCommandChar) << "=string" ; co.setTextAttribute (kAllAttributesOff) ; } co << " ...\n" ; } if (p->mCommandString [0] != '\0') { for (uint32_t i=0 ; i<2 ; i++) { if (i != 0) { co << " " ; } co.setForeColor (kBlueForeColor) ; co.setTextAttribute (kBoldTextAttribute) ; co << "--" << p->mCommandString << "=string" ; co.setTextAttribute (kAllAttributesOff) ; } co << " ...\n" ; } co << " " << p->mComment << "\n" ; p = p->mNext ; } }