diff options
| author | Michael Biebl <biebl@debian.org> | 2020-06-29 22:16:54 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-06-29 22:16:54 +0200 |
| commit | 238d328f69e0f4b838f361d7ddac1d6134bfd631 (patch) | |
| tree | 411ff73bb36d725e3a337d2fddbccc7b074622e0 /shared/nm-glib-aux/nm-shared-utils.h | |
| parent | e8d426c51e83b8465f9be527fd014f51443f829d (diff) | |
| parent | 10ae7d8cd706062742d0cdb1803d49909aef9e06 (diff) | |
Update upstream source from tag 'upstream/1.25.91'
Update to upstream version '1.25.91' with Debian dir 82448cadc1dd251ffbe44b7c339cadeb55eb776b
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) { |