Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getcdf(3C) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

showcdf(1)

malloc(3C)

cdf(4)

GETCDF(3C)  —  HP-UX

Series 300 Diskless Only

NAME

getcdf − return the expanded path that matches a path name

SYNOPSIS

char ∗getcdf (path, buf, size)
char ∗path;
char ∗buf;
int size;

DESCRIPTION

Getcdf returns a pointer to the expanded path matching the path name in path.  The path name can be a context dependent file (CDF).  If path is a CDF, a path name with all hidden directories expanded is returned.  If path is not a CDF, the original path name is returned. 

The value of size must be at least one greater than the length of the path name to be returned. 

If buf is not a NULL pointer, getcdf copies the file name into the array buf.  If buf is a NULL pointer, getcdf obtains size bytes of space using malloc(3C). In this case, the pointer returned by getcdf can be used as an argument in a subsequent call to free (see malloc(3C)).

DIAGNOSTICS

Returns NULL with errno set if size is not large enough, or the path name in buf does not exist or cannot be accessed. 

EXAMPLES

char ∗path, ∗cdf, ∗getcdf();
int size;
.
.
.
if ((cdf = getcdf(path, NULL, size)) == NULL) {

perror("getcdf");
exit(1);

}
printf("%s\n", cdf);

AUTHOR

Getcdf was developed by HP. 

SEE ALSO

showcdf(1), malloc(3C), cdf(4). 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026