diff options
| author | Michael Biebl <biebl@debian.org> | 2020-06-29 22:15:58 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-06-29 22:15:58 +0200 |
| commit | 10ae7d8cd706062742d0cdb1803d49909aef9e06 (patch) | |
| tree | cb89e8b475cec18f22b1abfe45f1d63da7e3f440 /shared/nm-glib-aux/nm-shared-utils.h | |
| parent | a54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 (diff) | |
New upstream version 1.25.91 upstream/1.25.91
Diffstat (limited to 'shared/nm-glib-aux/nm-shared-utils.h')
| -rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h index eeb8be5b..b17c8d1a 100644 --- a/shared/nm-glib-aux/nm-shared-utils.h +++ b/shared/nm-glib-aux/nm-shared-utils.h @@ -680,6 +680,10 @@ nm_utils_escaped_tokens_escape_gstr (const char *str, /*****************************************************************************/ +char **nm_utils_strsplit_quoted (const char *str); + +/*****************************************************************************/ + static inline const char ** nm_utils_escaped_tokens_options_split_list (const char *str) { @@ -803,6 +807,11 @@ gboolean nm_utils_parse_inaddr_prefix (int addr_family, char **out_addr, int *out_prefix); +gboolean nm_utils_parse_next_line (const char **inout_ptr, + gsize *inout_len, + const char **out_line, + gsize *out_line_len); + gint64 nm_g_ascii_strtoll (const char *nptr, char **endptr, guint base); @@ -2024,6 +2033,18 @@ nm_strvarray_add (GArray *array, const char *str) } static inline const char *const* +nm_strvarray_get_strv_non_empty (GArray *arr, guint *length) +{ + if (!arr || arr->len == 0) { + NM_SET_OUT (length, 0); + return NULL; + } + + NM_SET_OUT (length, arr->len); + return &g_array_index (arr, const char *, 0); +} + +static inline const char *const* nm_strvarray_get_strv (GArray **arr, guint *length) { if (!*arr) { |