NAME

cxFilenameExpand - create a complete pathname from a name with tildes, environment variables, etc.

C SPECIFICATION

#include <cx/DataAccess.h>

char *cxFilenameExpand(char *str)

FORTRAN SPECIFICATION

subroutine cxFilenameExpand(str, expanded)
character*(*) str, expanded

PARAMETERS

str
This is a string containing the unexpanded filename.

FUNCTION RETURN VALUE

The returned value is the expanded pathname. In Fortran, the expanded pathname is returned in the second argument, expanded.

DESCRIPTION

This function expands a filename containing tildes and references to environment variables into a complete path. It is often used on parameter input strings. The original string is not modified; newly malloced storage for the expanded filename is returned.

This function will also accept embedded strftime(3) time format codes. For example, %m%d%y.dat outputs a name with the current month, day, and year. There is one change from the standard codes - %n is replaced by an index instead of a newline. The index is an integer that can be set with cxFilenameIndexSet(3E) or cxFilenameIndexIncrement(3E).

SEE ALSO

strftime(3), cxFilenameIndexSet(3E), cxFilenameIndexIncrement(3E)
Last modified: Aug 03 13:48 1999
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999