This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Unix pathname -> DOS pathname
- To: gnu-win32 at cygnus dot com
- Subject: Re: Unix pathname -> DOS pathname
- From: Anders Norlander <anorland at hem2 dot passagen dot se>
- Date: Thu, 24 Sep 1998 21:26:41 +0200
- References: <1.5.4.16.19980924022008.0eaf73ec@fox.nstn.ca>
Tony Pires wrote:
>
> You will need to write some code to get the mount points from the registry
> in order to perform the magic. Can you code?
There actually seems to be a much better way to accomplish
Unix -> dos path conversion.
According to the FAQ there are some intersting functions:
cygwin32_conv_to_full_posix_path
cygwin32_conv_to_full_win32_path
cygwin32_conv_to_posix_path
cygwin32_conv_to_win32_path
cygwin32_posix_path_list_p
cygwin32_posix_to_win32_path_list
cygwin32_posix_to_win32_path_list_buf_size
cygwin32_split_path
cygwin32_win32_to_posix_path_list
cygwin32_win32_to_posix_path_list_buf_size
I don't know the prototypes for these functions, but if
I call cygwin32_conv_to_win32_path with the unix path
as the first argument and a buffer to hold the converted
path as the second argument I get the win32 path.
By looking at the source it would be possible to get the
exact prototypes. The developers ought to know about this.
/Anders
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".