-/*
- * Returns a pointer to the part of @path following the first colon in the last
- * path component, or NULL if the last path component does not contain a colon.
- */
-const char *path_stream_name(const char *path)
-{
- const char *base = path_basename(path);
- const char *stream_name = strchr(base, ':');
- if (!stream_name)
- return NULL;
- else
- return stream_name + 1;
-}
-
-/*
- * Splits a file path into the part before the first '/', or the entire name if
- * there is no '/', and the part after the first sequence of '/' characters.
- *
- * @path: The file path to split.
- * @first_part_len_ret: A pointer to a `size_t' into which the length of the
- * first part of the path will be returned.
- * @return: A pointer to the next part of the path, after the first
- * sequence of '/', or a pointer to the terminating
- * null byte in the case of a path without any '/'.
- */
-const char *path_next_part(const char *path, size_t *first_part_len_ret)
-{
- size_t i;
- const char *next_part;
-
- i = 0;
- while (path[i] != '/' && path[i] != '\0')
- i++;
- if (first_part_len_ret)
- *first_part_len_ret = i;
- next_part = &path[i];
- while (*next_part == '/')
- next_part++;
- return next_part;
-}
-
-/* Returns the number of components of @path. */
-int get_num_path_components(const char *path)
-{
- int num_components = 0;
- while (*path) {
- while (*path == '/')
- path++;
- if (*path)
- num_components++;
- while (*path && *path != '/')
- path++;
- }
- return num_components;
-}
-
-
-/*
- * Prints a string. Printable characters are printed as-is, while unprintable
- * characters are printed as their octal escape codes.
- */
-void print_string(const void *string, size_t len)