MCPcopy Create free account
hub / github.com/coreutils/coreutils / finalize_tab_stops

Function finalize_tab_stops

src/expand-common.c:267–280  ·  view source on GitHub ↗

Called after all command-line options have been parsed, and add_tab_stop/parse_tab_stops have been called. Will validate the tab-stop values, and set the final values to: tab-stops = 8 (if no tab-stops given on command line) tab-stops = N (if value N specified as the only value). tab-stops = distinct values given on command line (if multiple values given). */

Source from the content-addressed store, hash-verified

265 tab-stops = distinct values given on command line (if multiple values given).
266*/
267extern void
268finalize_tab_stops (void)
269{
270 validate_tab_stops (tab_list, first_free_tab);
271
272 if (first_free_tab == 0)
273 tab_size = max_column_width = extend_size
274 ? extend_size : increment_size
275 ? increment_size : 8;
276 else if (first_free_tab == 1 && ! extend_size && ! increment_size)
277 tab_size = tab_list[0];
278 else
279 tab_size = 0;
280}
281
282
283/* Return number of first tab stop after COLUMN. TAB_INDEX specifies

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 1

validate_tab_stopsFunction · 0.85

Tested by

no test coverage detected