shared/format-table: drop unused table_sync_column_widths()
The variadic pair-wise variant was only used by the hand-written help() functions to synchronize their verb and option tables. Those are all gone, and the verbs machinery uses table_sync_all_column_widths().
This commit is contained in:
@@ -2218,38 +2218,6 @@ int table_set_column_width(Table *t, size_t column, size_t width) {
|
||||
return r;
|
||||
}
|
||||
|
||||
int _table_sync_column_widths(size_t column, Table *a, ...) {
|
||||
size_t max = 0;
|
||||
va_list ap;
|
||||
int r = 0;
|
||||
|
||||
assert(a);
|
||||
|
||||
/* Make the specified column have the same width in the tables. */
|
||||
|
||||
va_start(ap, a);
|
||||
for (Table *t = a; t; t = va_arg(ap, Table*)) {
|
||||
size_t w;
|
||||
|
||||
r = table_data_requested_width(t, column, &w);
|
||||
if (r < 0)
|
||||
break;
|
||||
|
||||
max = MAX(max, w);
|
||||
}
|
||||
va_end(ap);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to query table column width: %m");
|
||||
|
||||
r = 0;
|
||||
va_start(ap, a);
|
||||
for (Table *t = a; t; t = va_arg(ap, Table*))
|
||||
RET_GATHER(r, table_set_column_width(t, column, max));
|
||||
va_end(ap);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int table_sync_all_column_widths(size_t column, Table **a) {
|
||||
size_t max = 0;
|
||||
int r;
|
||||
|
||||
@@ -147,8 +147,6 @@ int table_hide_column_from_display_internal(Table *t, ...);
|
||||
int table_data_requested_width(Table *table, size_t column, size_t *ret);
|
||||
|
||||
int table_set_column_width(Table *t, size_t column, size_t width);
|
||||
int _table_sync_column_widths(size_t column, Table *a, ...);
|
||||
#define table_sync_column_widths(column, a, ...) _table_sync_column_widths(column, a, __VA_ARGS__, NULL)
|
||||
int table_sync_all_column_widths(size_t column, Table **a);
|
||||
|
||||
int table_print_full(Table *t, FILE *f, bool flush);
|
||||
|
||||
Reference in New Issue
Block a user