diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-09 08:22:05 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-09 08:22:05 +0000 |
commit | 85ba109de7c313449a8d4cd8bcc7b0606d0f15ec (patch) | |
tree | ee0dac5c3f1406d3c39f6ef39148dc40dae2698f /winsup/cygwin/fhandler_registry.cc | |
parent | 9f05d3a44a4f7c12a832b972fad9c4f0cc693421 (diff) | |
download | cygnal-85ba109de7c313449a8d4cd8bcc7b0606d0f15ec.tar.gz cygnal-85ba109de7c313449a8d4cd8bcc7b0606d0f15ec.tar.bz2 cygnal-85ba109de7c313449a8d4cd8bcc7b0606d0f15ec.zip |
Use isdirsep rather than SLASH_P throughout.
* path.cc (iscygdrive): Disallow /cygdrive\x.
(normalize_posix_path): "Normalize" a windows path, if detected, rather than
converting to posix.
* fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and capability
checking for B230400 bitrate.
(fhandler_serial::tcgetattr): Add support for B230400 bitrate.
* include/sys/termios.h: Add B230400 definition for Posix support of 230.4Kbps.
Diffstat (limited to 'winsup/cygwin/fhandler_registry.cc')
-rw-r--r-- | winsup/cygwin/fhandler_registry.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 8a9f27ed9..f1427dc6d 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -114,9 +114,9 @@ fhandler_registry::exists () } pathlen = strlen (path); file = path + pathlen - 1; - if (SLASH_P (*file) && pathlen > 1) + if (isdirsep (*file) && pathlen > 1) file--; - while (!SLASH_P (*file)) + while (!isdirsep (*file)) file--; file++; @@ -240,9 +240,9 @@ fhandler_registry::fstat (struct __stat64 *buf, path_conv *pc) { int pathlen = strlen (path); const char *value_name = path + pathlen - 1; - if (SLASH_P (*value_name) && pathlen > 1) + if (isdirsep (*value_name) && pathlen > 1) value_name--; - while (!SLASH_P (*value_name)) + while (!isdirsep (*value_name)) value_name--; value_name++; DWORD dwSize; @@ -429,9 +429,9 @@ fhandler_registry::open (path_conv * pc, int flags, mode_t mode) path++; pathlen = strlen (path); file = path + pathlen - 1; - if (SLASH_P (*file) && pathlen > 1) + if (isdirsep (*file) && pathlen > 1) file--; - while (!SLASH_P (*file)) + while (!isdirsep (*file)) file--; file++; @@ -625,7 +625,7 @@ open_key (const char *name, REGSAM access, bool isValue) while (*name) { const char *anchor = name; - while (*name && !SLASH_P (*name)) + while (*name && !isdirsep (*name)) name++; strncpy (component, anchor, name - anchor); component[name - anchor] = '\0'; |