| 2242 | then print_sep_string() is called. */ |
| 2243 | |
| 2244 | static void |
| 2245 | print_sep_string (void) |
| 2246 | { |
| 2247 | char const *s = col_sep_string; |
| 2248 | int l = col_sep_length; |
| 2249 | |
| 2250 | if (separators_not_printed <= 0) |
| 2251 | { |
| 2252 | /* We'll be starting a line with chars_per_margin, anything else? */ |
| 2253 | if (spaces_not_printed > 0) |
| 2254 | print_white_space (); |
| 2255 | } |
| 2256 | else |
| 2257 | { |
| 2258 | for (; separators_not_printed > 0; --separators_not_printed) |
| 2259 | { |
| 2260 | while (l-- > 0) |
| 2261 | { |
| 2262 | /* 3 types of sep_strings: spaces only, spaces and chars, |
| 2263 | chars only */ |
| 2264 | if (*s == ' ') |
| 2265 | { |
| 2266 | /* We're tabifying output; consecutive spaces in |
| 2267 | sep_string may have to be converted to tabs */ |
| 2268 | s++; |
| 2269 | ++spaces_not_printed; |
| 2270 | } |
| 2271 | else |
| 2272 | { |
| 2273 | if (spaces_not_printed > 0) |
| 2274 | print_white_space (); |
| 2275 | putchar (*s++); |
| 2276 | ++output_position; |
| 2277 | } |
| 2278 | } |
| 2279 | /* sep_string ends with some spaces */ |
| 2280 | if (spaces_not_printed > 0) |
| 2281 | print_white_space (); |
| 2282 | } |
| 2283 | } |
| 2284 | } |
| 2285 | |
| 2286 | /* Print (or store, depending on p->char_func) a clump of N |
| 2287 | characters. */ |
no test coverage detected