MCPcopy Create free account
hub / github.com/apple/foundationdb / printAtCol

Function printAtCol

fdbcli/fdbcli.actor.cpp:135–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 SO_END_OF_OPTIONS };
134
135void printAtCol(const char* text, int col, FILE* stream = stdout) {
136 const char* iter = text;
137 const char* start = text;
138 const char* space = nullptr;
139
140 do {
141 iter++;
142 if (*iter == '\n' || *iter == ' ' || *iter == '\0')
143 space = iter;
144 if (*iter == '\n' || *iter == '\0' || (iter - start == col)) {
145 if (!space)
146 space = iter;
147 fprintf(stream, "%.*s\n", (int)(space - start), start);
148 start = space;
149 if (*start == ' ' || *start == '\n')
150 start++;
151 space = nullptr;
152 }
153 } while (*iter);
154}
155
156class FdbOptions {
157public:

Callers 3

printHelpStringMethod · 0.85
printHelpFunction · 0.85
fdbcli.actor.cppFile · 0.85

Calls 1

fprintfFunction · 0.85

Tested by

no test coverage detected