file_name_expand_c
status.i4.v = file_name_expand_c(source_name.i1a.r, source_length.i4.v,
expanded_name.i1a.r, options.u4.v)
This routine will expand a file name starting with a tilde.
source_name file name string to expand
source_length length of file name string (a value of zero
will result in this routine determining
the length of the string)
expanded_name returned null terminated expanded file name
(This can point to the same buffer as "source_name".)
options parsing options (not used)
This function returns ACNET status values as follows:
CLIB_OK success
CLIB_INVARG invalid length
CLIB_SYNTAX no user name present
CLIB_NO_SUCH user doesn't exist
This function requires the following include files:
cbslib_h, acnet_errors_h
Related functions:
file_name_parse_c, file_view_find, file_name_convert_c,
file_exists_c, file_find_in_path_c, str_find_character_c,
file_num_lines
C/C++ usage:
static const char source_name[] = "~hendricks/junk.txt";
char expanded_name[256];
int status;
int source_length = 0;
unsigned int options = 0;
status = file_name_expand_c(source_name,source_length,
expanded_name,options);