ABSPATH C-3

NAME

abspath - return absolute pathname of a file

SYNOPSIS

char *abspath (homedir, relname)

char *homedir;

char *relname;

DESCRIPTION

Abspath returns the absolute pathname of a file. Homedir is a pointer to the base directory, usually the database home directory. Relname is a pathname of the file relative to the database home directory, or it may be an absolute pathname.

If relname is an absolute path name, abspath returns it. Otherwise, abspath constructs an absolute pathname by catenating homedir, a path separator character \, and relname.

If the result is larger than 200 characters, abspath calls malloc to allocate space for the result.

SEE ALSO

dbpath(C-3)

DIAGNOSTICS

Abspath returns an empty string if it cannot allocate space for the result.

NOTES

When the result contains 200 characters or less, the return value points to static data whose contents are overwritten with every call.