Export a column helper

Make the find_column function public so we can use
it in more places.

Closes: #2409
Approved by: alexlarsson
This commit is contained in:
Matthias Clasen
2018-12-08 20:38:46 -05:00
committed by Atomic Bot
parent e843f63804
commit 64b2bb33b1
2 changed files with 5 additions and 2 deletions

View File

@@ -797,7 +797,7 @@ get_permission_tables (XdpDbusPermissionStore *store)
/*** column handling ***/
static int
int
find_column (Column *columns,
const char *name,
GError **error)
@@ -846,7 +846,7 @@ column_filter (Column *columns,
for (i = 0; i < n_cols; i++)
{
int idx = find_column (columns, cols[i], error);
if (idx == -1)
if (idx < 0)
return FALSE;
result[i] = columns[idx];
}

View File

@@ -119,6 +119,9 @@ typedef struct {
gboolean def;
} Column;
int find_column (Column *columns,
const char *name,
GError **error);
char *column_help (Column *columns);
Column *handle_column_args (Column *all_columns,
gboolean opt_show_all,