| 133 | SO_END_OF_OPTIONS }; |
| 134 | |
| 135 | void 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 | |
| 156 | class FdbOptions { |
| 157 | public: |
no test coverage detected