NAME

cxFilenameExpand - create a complete pathname from a name with tildes, environment variables, etc.
#include <cx/DataAccess.h>

char *cxFilenameExpand(const char *str)
subroutine cxFilenameExpand(str, expanded)
character*(*) str, expanded
str
This is a string containing the unexpanded filename.
The returned value is the expanded pathname. In Fortran, the expanded pathname is returned in the second argument, expanded. 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).

strftime(3), cxFilenameIndexSet(3E), cxFilenameIndexIncrement(3E)
Last modified: Mon Nov 6 16:33:08 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999