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

Function add_tab_stop

src/expand-common.c:83–94  ·  view source on GitHub ↗

Add tab stop TABVAL to the end of 'tab_list'. */

Source from the content-addressed store, hash-verified

81
82/* Add tab stop TABVAL to the end of 'tab_list'. */
83extern void
84add_tab_stop (colno tabval)
85{
86 colno prev_column = first_free_tab ? tab_list[first_free_tab - 1] : 0;
87 colno column_width = prev_column <= tabval ? tabval - prev_column : 0;
88
89 if (first_free_tab == n_tabs_allocated)
90 tab_list = xpalloc (tab_list, &n_tabs_allocated, 1, -1, sizeof *tab_list);
91 tab_list[first_free_tab++] = tabval;
92
93 set_max_column_width (column_width);
94}
95
96static bool
97set_extend_size (colno tabval)

Callers 2

parse_tab_stopsFunction · 0.85
mainFunction · 0.85

Calls 1

set_max_column_widthFunction · 0.85

Tested by

no test coverage detected