Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1369)

Unified Diff: tools/flags/SkCommandLineFlags.cpp

Issue 1105593002: dm||nanobench --help looks nice when $COLUMNS == 80. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-04-23 (Thursday) 10:50:54 EDT Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/flags/SkCommonFlags.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommandLineFlags.cpp
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp
index 8929c38375f329bb3c9a703cd0e6d360930182ae..719e1634e4867284b8e72f65ce37bf6536ba7aa7 100644
--- a/tools/flags/SkCommandLineFlags.cpp
+++ b/tools/flags/SkCommandLineFlags.cpp
@@ -140,10 +140,10 @@ void SkCommandLineFlags::SetUsage(const char* usage) {
}
// Maximum line length for the help message.
-#define LINE_LENGTH 80
+#define LINE_LENGTH 72
static void print_help_for_flag(const SkFlagInfo* flag) {
- SkDebugf("\t--%s", flag->name().c_str());
+ SkDebugf(" --%s", flag->name().c_str());
const SkString& shortName = flag->shortName();
if (shortName.size() > 0) {
SkDebugf(" or -%s", shortName.c_str());
@@ -160,7 +160,7 @@ static void print_help_for_flag(const SkFlagInfo* flag) {
while (currLine < stop) {
if (strlen(currLine) < LINE_LENGTH) {
// Only one line length's worth of text left.
- SkDebugf("\t\t%s\n", currLine);
+ SkDebugf(" %s\n", currLine);
break;
}
int lineBreak = SkStrFind(currLine, "\n");
@@ -180,12 +180,12 @@ static void print_help_for_flag(const SkFlagInfo* flag) {
// Skip the space on the next line
gap = 1;
}
- SkDebugf("\t\t%.*s\n", spaceIndex, currLine);
+ SkDebugf(" %.*s\n", spaceIndex, currLine);
currLine += spaceIndex + gap;
} else {
// the line break is within the limit. Break there.
lineBreak++;
- SkDebugf("\t\t%.*s", lineBreak, currLine);
+ SkDebugf(" %.*s", lineBreak, currLine);
currLine += lineBreak;
}
}
@@ -256,7 +256,7 @@ void SkCommandLineFlags::Parse(int argc, char** argv) {
if (helpFlags.count() > 0) {
SkDebugf("Requested help for unrecognized flags:\n");
for (int k = 0; k < helpFlags.count(); k++) {
- SkDebugf("\t--%s\n", helpFlags[k]);
+ SkDebugf(" --%s\n", helpFlags[k]);
}
}
helpPrinted = true;
« no previous file with comments | « no previous file | tools/flags/SkCommonFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698