libpkgconf argvsplit module

This is a lowlevel module which provides parsing of strings into argument vectors, similar to what a shell would do.

void pkgconf_argv_free(char **argv)

Frees an argument vector.

Parameters:
  • argv (char**) – The argument vector to free.
Returns:

nothing

int pkgconf_argv_split(const char *src, int *argc, char ***argv)

Splits a string into an argument vector.

Parameters:
  • src (char*) – The string to split.
  • argc (int*) – A pointer to an integer to store the argument count.
  • argv (char***) – A pointer to a pointer for an argument vector.
Returns:

0 on success, -1 on error.

Return type:

int