Function

Vipsguess_prefix

Declaration [src]

const char*
vips_guess_prefix (
  const char* argv0,
  const char* env_name
)

Description [src]

vips_guess_prefix() tries to guess the install directory. You should pass in the value of argv[0] (the name your program was run as) as a clue to help it out, plus the name of the environment variable you let the user override your package install area with (eg. “VIPSHOME”).

On success, vips_guess_prefix() returns the prefix it discovered, and as a side effect, sets the environment variable (if it’s not set).

Don’t free the return string!

See also

vips_guess_libdir().

Parameters

argv0

Type: const char*

Program name (typically argv[0]).

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
env_name

Type: const char*

Save prefix in this environment variable.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: const char*

The install prefix as a static string, do not free.

The data is owned by the called function.
The value is a NUL terminated UTF-8 string.