cygwin_posix_to_win32_path_listextern "C" void
cygwin_posix_to_win32_path_listconst char *posixchar *win32Given a POSIX path-style string (i.e. /foo:/bar) convert it to
the equivalent Win32 path-style string (i.e. d:\;e:\bar).
win32 must point to a sufficiently large
buffer.Example use of cygwin_posix_to_win32_path_list
char *_epath;
char *_win32epath;
_epath = _win32epath = getenv (NAME);
/* If we have a POSIX path list, convert to win32 path list */
if (_epath != NULL && *_epath != 0
&& cygwin_posix_path_list_p (_epath))
{
_win32epath = (char *) xmalloc
(cygwin_posix_to_win32_path_list_buf_size (_epath));
cygwin_posix_to_win32_path_list (_epath, _win32epath);
}
See also
cygwin_posix_to_win32_path_list_buf_sizecygwin_win32_to_posix_path_listextern "C" void
cygwin_win32_to_posix_path_listconst char *win32char *posixGiven a Win32 path-style string (i.e. d:\;e:\bar) convert it to
the equivalent POSIX path-style string (i.e. /foo:/bar).
posix must point to a sufficiently large
buffer. See also
cygwin_win32_to_posix_path_list_buf_sizecygwin_posix_to_win32_path_list_buf_sizeextern "C" int
cygwin_posix_to_win32_path_list_buf_sizeconst char *path_listReturns the number of bytes needed to hold the result of calling
cygwin_posix_to_win32_path_list.cygwin_win32_to_posix_path_list_buf_sizeextern "C" int
cygwin_win32_to_posix_path_list_buf_sizeconst char *path_listTells you how many bytes are needed for the results of
cygwin_win32_to_posix_path_list.cygwin_conv_to_posix_pathextern "C" void
cygwin_conv_to_posix_pathconst char *pathchar *posix_pathConverts a Win32 path to a POSIX path. If
path is already a POSIX path, leaves it alone.
If path is relative, then
posix_path will also be relative. Note that
posix_path must point to a buffer of sufficient
size; use MAX_PATH if needed.cygwin_conv_to_win32_pathextern "C" void
cygwin_conv_to_win32_pathconst char *pathchar *win32_pathConverts a POSIX path to a Win32 path. If
path is already a Win32 path, leaves it alone.
If path is relative, then
win32_path will also be relative. Note that
win32_path must point to a buffer of sufficient
size; use MAX_PATH if needed.cygwin_conv_to_full_posix_pathextern "C" void
cygwin_conv_to_full_posix_pathconst char *pathchar *posix_pathConverts a Win32 path to a POSIX path. If
path is already a POSIX path, leaves it alone.
If path is relative, then
posix_path will be converted to an absolute
path. Note that posix_path must point to a
buffer of sufficient size; use MAX_PATH if needed.cygwin_conv_to_full_win32_pathextern "C" void
cygwin_conv_to_full_win32_pathconst char *pathchar *win32_pathConverts a POSIX path to a Win32 path. If
path is already a Win32 path, leaves it alone.
If path is relative, then
win32_path will be converted to an absolute
path. Note that win32_path must point to a
buffer of sufficient size; use MAX_PATH if needed.cygwin_posix_path_list_pextern "C" int
posix_path_list_pconst char *pathThis function tells you if the supplied
path is a POSIX-style path (i.e. posix names,
forward slashes, colon delimiters) or a Win32-style path (drive
letters, reverse slashes, semicolon delimiters. The return value is
true if the path is a POSIX path. Note that "_p" means "predicate", a
lisp term meaning that the function tells you something about the
parameter.cygwin_split_pathextern "C" void
cygwin_split_pathconst char * pathchar * dirchar * fileSplit a path into the directory and the file portions. Both
dir and file are
expected to point to buffers of sufficient size. Example use of cygwin_split_path
char dir[200], file[100];
cygwin_split_path("c:/foo/bar.c", dir, file);
printf("dir=%s, file=%s\n", dir, file);