diff options
author | Christopher Faylor <me@cgf.cx> | 2001-06-27 17:38:40 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-06-27 17:38:40 +0000 |
commit | c135faa8b30fd29a8b8e20cda6b07a882a042cbe (patch) | |
tree | 725efeb3e27e5f0e35a3b21fa52802e578fa1ee4 /winsup/utils/regtool.cc | |
parent | 07c3cd5bb1d74bd173c1b98501e3e77ff0ba862a (diff) | |
download | newlib-c135faa8b30fd29a8b8e20cda6b07a882a042cbe.zip newlib-c135faa8b30fd29a8b8e20cda6b07a882a042cbe.tar.gz newlib-c135faa8b30fd29a8b8e20cda6b07a882a042cbe.tar.bz2 |
* regtool.cc (find_key): Allow '/' as a synonym for '\\'.
Diffstat (limited to 'winsup/utils/regtool.cc')
-rw-r--r-- | winsup/utils/regtool.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index ef67bfc..9ea9c14 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) |