Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-06-27 21:38:40 +0400
committerChristopher Faylor <me@cgf.cx>2001-06-27 21:38:40 +0400
commitc135faa8b30fd29a8b8e20cda6b07a882a042cbe (patch)
tree725efeb3e27e5f0e35a3b21fa52802e578fa1ee4 /winsup/utils
parent07c3cd5bb1d74bd173c1b98501e3e77ff0ba862a (diff)
* regtool.cc (find_key): Allow '/' as a synonym for '\\'.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog4
-rw-r--r--winsup/utils/regtool.cc9
2 files changed, 10 insertions, 3 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index e7c95add5..76ff4d4e6 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jun 27 13:37:41 2001 Keith Starsmeare" <keith_starsmeare@yahoo.co.uk>
+
+ * regtool.cc (find_key): Allow '/' as a synonym for '\\'.
+
Fri Jun 15 00:49:21 2001 Christopher Faylor <cgf@cygnus.com>
* mkpasswd.c (main): Output passwd file in binary mode so that there
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index ef67bfc49..9ea9c14b5 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -194,10 +194,13 @@ find_key (int howmanyparts, REGSAM access)
int i;
if (*n == '/')
translate (n);
- while (*n == '\\')
+ while ((*n == '\\') || (*n == '/'))
n++;
- for (e = n; *e && *e != '\\'; e++);
- c = *e;
+ for (e = n; *e && *e != '\\' && *e != '/'; e++);
+ if (*e == '/')
+ c = '\\';
+ else
+ c = *e;
*e = 0;
for (i = 0; wkprefixes[i].string; i++)
if (strcmp (wkprefixes[i].string, n) == 0)