Synopsis
char *OMget_path(int which);
char *OMget_path_index(
int which,
int path_index,
char *buffer);
int OMget_num_paths(int which);
Description
These routines provide access to the path variables of the current AVS/Express session. The different paths defined by the system are:
|
Path name
|
Description
|
|
OM_PATH |
The value of the XP_PATH variable, |
|
OM_VPATH |
The path to search for loading of V files. Usually this includes the v subdirectories of XP_PATH and the current directory. |
|
OM_BINPATH |
The path to search for executables. This includes both the bin directory and the machine specific directory. |
|
OM_RUNTIMEPATH |
The path of the runtime directories. Usually this includes the runtime subdirectories of XP_PATH. |
Arguments
which
The path this operation works on as defined by one of the constants above (e.g., OM_PATH).
path_index
The path returned. This number should be a value between 0 and the value returned by OMget_num_paths.
buffer
This specifies a piece of memory that the routine OMget_path_index uses to store the returned path. This buffer should be defined to be large enough to contain the maximum length path name for the machine. The AVS_PATH_MAX constant can be used for this purpose.
Returned value
OMget_path returns a read-only character string that contains the list of directories in the specified path. The paths are separated by a space character. You should not free or modify the memory returned.
OMget_num_paths returns the number of directories in the specified path.
OMget_path_index copies the specified directory name into the buffer you specified and returns a pointer to that buffer.