debian man page for fnqualify

Query: fnqualify

OS: debian

Section: 3pub

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

FNQUALIFY(3pub) 					       C Programmer's Manual						   FNQUALIFY(3pub)

NAME
fnqualify - qualify a filename
SYNOPSIS
#include <publib.h> size_t fnqualify(char *result, const char *path, size_t max);
DESCRIPTION
fname_qualify qualifies a filename. This means that if the input name is not an absolute name (i.e. starts from the root directory, e.g. is foo, not /tmp/foo), the current directory will be prepended to it. Also, tilde conversion is done: if the filename begins with a tilde (~), the tilde is replaced with the home directory of the user, and if it begins with a tilde and a username, both are replaced with the home directory of the given user. Simplifications like replacing /./ with /, and /foo/../bar with /bar are not done because of problems with symbolic links.
RETURNS
The function returns -1 if there was some error, or the total size of the full name otherwise. The return value may be greater than the maximum size given by the last argument; only as much as allowed by that is actually written, though.
SEE ALSO
publib(3), fname(3)
AUTHOR
Lars Wirzenius (lars.wirzenius@helsinki.fi) Publib C Programmer's Manual FNQUALIFY(3pub)
Related Man Pages
strgsub(3) - debian
strltrim(3pub) - debian
strsub(3pub) - debian
strvars(3pub) - debian
xmalloc(3pub) - debian
Similar Topics in the Unix Linux Community
size of my home directory
How to parse filename and one level up directory name?
How to ignore delimiter between the quotes?
Tilde prefix returns invalid home directory.
Remove trailing tilde(&quot;~&quot;)