Lines Matching full:prefix

53                                 const char *prefix);
55 static void qdict_flatten_qlist(QList *qlist, QDict *target, const char *prefix) in qdict_flatten_qlist() argument
64 /* This function is never called with prefix == NULL, i.e., it is always in qdict_flatten_qlist()
68 assert(prefix); in qdict_flatten_qlist()
76 new_key = g_strdup_printf("%s.%i", prefix, i); in qdict_flatten_qlist()
94 static void qdict_flatten_qdict(QDict *qdict, QDict *target, const char *prefix) in qdict_flatten_qdict() argument
110 if (prefix) { in qdict_flatten_qdict()
111 key = new_key = g_strdup_printf("%s.%s", prefix, entry->key); in qdict_flatten_qdict()
208 * output QList with the key prefix removed, if that prefix is "%u.". If the
211 * QDict with a prefix directly (incrementally) following the last one; it also
228 char indexstr[32], prefix[32]; in qdict_array_split() local
236 snprintf_ret = snprintf(prefix, 32, "%u.", i); in qdict_array_split()
240 is_subqdict = qdict_count_prefixed_entries(src, prefix); in qdict_array_split()
252 qdict_extract_subqdict(src, &subqdict, prefix); in qdict_array_split()
266 * @prefix: non-NULL pointer to hold extracted prefix
274 * 'foo.0.bar' -> prefix='foo' and suffix='0.bar'
275 * 'foo..0.bar' -> prefix='foo.0' and suffix='bar'
277 * The '..' sequence will be unescaped in the returned 'prefix'
282 * The caller is responsible for freeing the string returned in @prefix
285 static void qdict_split_flat_key(const char *key, char **prefix, in qdict_split_flat_key() argument
304 *prefix = g_strndup(key, separator - key); in qdict_split_flat_key()
307 *prefix = g_strdup(key); in qdict_split_flat_key()
312 for (i = 0, j = 0; (*prefix)[i] != '\0'; i++, j++) { in qdict_split_flat_key()
313 if ((*prefix)[i] == '.') { in qdict_split_flat_key()
314 assert((*prefix)[i + 1] == '.'); in qdict_split_flat_key()
317 (*prefix)[j] = (*prefix)[i]; in qdict_split_flat_key()
319 (*prefix)[j] = '\0'; in qdict_split_flat_key()
431 char *prefix = NULL; in qdict_crumple() local
447 qdict_split_flat_key(ent->key, &prefix, &suffix); in qdict_crumple()
448 child = qdict_get(two_level, prefix); in qdict_crumple()
453 * If @child_dict, then all previous keys with this prefix in qdict_crumple()
466 qdict_put(two_level, prefix, child_dict); in qdict_crumple()
470 qdict_put_obj(two_level, prefix, qobject_ref(ent->value)); in qdict_crumple()
473 g_free(prefix); in qdict_crumple()
474 prefix = NULL; in qdict_crumple()
528 g_free(prefix); in qdict_crumple()
591 * sub-QDict of src specified by the prefix in subqdict (or src itself for
592 * prefix == "") is valid as an array, i.e. the length of the created list if
611 char *prefix = g_strdup_printf("%s%u.", subqdict, i); in qdict_array_entries() local
613 subqdict_entries = qdict_count_prefixed_entries(src, prefix); in qdict_array_entries()
616 prefix[strlen(prefix) - 1] = 0; in qdict_array_entries()
617 subqobj = qdict_get(src, prefix); in qdict_array_entries()
619 g_free(prefix); in qdict_array_entries()