mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-18 23:12:15 +08:00
* cygpath.cc (main): Support -w for Windows (System) directories and return
physical correct orthography for the Windows System dir.
This commit is contained in:
parent
3ca6bcc4d0
commit
da3ea61edd
@ -1,3 +1,8 @@
|
|||||||
|
2001-08-14 Joerg Schaible <joerg.schaible@gmx.de>
|
||||||
|
|
||||||
|
* cygpath.cc (main): Support -w for Windows (System) directories and
|
||||||
|
return physical correct orthography for the Windows System dir.
|
||||||
|
|
||||||
2001-07-14 Chris Genly <chgenly@alum.mit.edu>
|
2001-07-14 Chris Genly <chgenly@alum.mit.edu>
|
||||||
|
|
||||||
* regtool.cc (find_key): Handle keys with only one subkey.
|
* regtool.cc (find_key): Handle keys with only one subkey.
|
||||||
|
@ -208,6 +208,7 @@ main (int argc, char **argv)
|
|||||||
int options_from_file_flag;
|
int options_from_file_flag;
|
||||||
char *filename;
|
char *filename;
|
||||||
char buf[MAX_PATH], buf2[MAX_PATH];
|
char buf[MAX_PATH], buf2[MAX_PATH];
|
||||||
|
WIN32_FIND_DATA w32_fd;
|
||||||
|
|
||||||
prog_name = strrchr (argv[0], '/');
|
prog_name = strrchr (argv[0], '/');
|
||||||
if (prog_name == NULL)
|
if (prog_name == NULL)
|
||||||
@ -266,13 +267,21 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
case 'W':
|
case 'W':
|
||||||
GetWindowsDirectory(buf, MAX_PATH);
|
GetWindowsDirectory(buf, MAX_PATH);
|
||||||
cygwin_conv_to_posix_path(buf, buf2);
|
if (!windows_flag)
|
||||||
|
cygwin_conv_to_posix_path(buf, buf2);
|
||||||
|
else
|
||||||
|
strcpy(buf2, buf);
|
||||||
printf("%s\n", buf2);
|
printf("%s\n", buf2);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
case 'S':
|
case 'S':
|
||||||
GetSystemDirectory(buf, MAX_PATH);
|
GetSystemDirectory(buf, MAX_PATH);
|
||||||
cygwin_conv_to_posix_path(buf, buf2);
|
FindFirstFile(buf, &w32_fd);
|
||||||
|
strcpy(strrchr(buf, '\\')+1, w32_fd.cFileName);
|
||||||
|
if (!windows_flag)
|
||||||
|
cygwin_conv_to_posix_path(buf, buf2);
|
||||||
|
else
|
||||||
|
strcpy(buf2, buf);
|
||||||
printf("%s\n", buf2);
|
printf("%s\n", buf2);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user