Functions | |
void | Show_Pathname_Expansion (const char *pathname, char *expansion) |
void Show_Pathname_Expansion | ( | const char * | pathname, | |
char * | expansion | |||
) |
Identifies the full absolute pathname corresponding to a relative pathname.
pathname | - A relative pathname with no wildcards. | |
expansion | - The absolute segment name corresponding to pathname. Passed by reference always. Returned to user. |
As a shortcut to determine the currently open segment, use "." as pathname. (An "open segment search" also can find the currently open segment, but it's more work.)
This routine is most often used when you want to "put your thumb" on a spot in the segment tree---since the expanded name includes the complete specification, you can come back later without worrying about the currently open segment, changes in alias names, etc.
Pathname is expanded whether or not the referenced segments exist at the time of the call, i.e. in the above example, the segment "and a three" need not exist. Use Find_Segment ( Begin_Segment_Search() ) to see if a segment exists.
Any aliases in pathname are replaced by their definitions such that expansion contains no explicit aliases. Use Show_Alias() to see the actual definition of an alias.
Wildcards in a pathname ("*", "%") and anything inside parentheses are returned "as is".