OSDN Git Service

* regtool.cc (find_key): Allow '/' as a synonym for '\\'.
authorcgf <cgf>
Wed, 27 Jun 2001 17:38:40 +0000 (17:38 +0000)
committercgf <cgf>
Wed, 27 Jun 2001 17:38:40 +0000 (17:38 +0000)
winsup/utils/ChangeLog
winsup/utils/regtool.cc

index e7c95ad..76ff4d4 100644 (file)
@@ -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
index ef67bfc..9ea9c14 100644 (file)
@@ -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)