diff options
author | jenglish <jenglish@flightlab.com> | 2013-03-02 07:22:21 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2013-03-02 07:22:21 (GMT) |
commit | 22e489629417558fba1a0a22da4cb24ccbc91874 (patch) | |
tree | 2b75e863c806b5c4596b3dc9a0c4c0759b42c176 /unix/tclUnixChan.c | |
parent | 05d33e0fe726e8459925eecf9e24f91df21c5315 (diff) | |
download | tcl-22e489629417558fba1a0a22da4cb24ccbc91874.zip tcl-22e489629417558fba1a0a22da4cb24ccbc91874.tar.gz tcl-22e489629417558fba1a0a22da4cb24ccbc91874.tar.bz2 |
Do not use strncasecmp(). It is nonstandard and not portable.
Use Tcl_UtfNcasecmp() instead.
Diffstat (limited to 'unix/tclUnixChan.c')
-rw-r--r-- | unix/tclUnixChan.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index fb47f6a..178c0bc 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -630,20 +630,20 @@ TtySetOptionProc( #ifdef CRTSCTS CLEAR_BITS(iostate.c_cflag, CRTSCTS); #endif /* CRTSCTS */ - if (strncasecmp(value, "NONE", vlen) == 0) { + if (Tcl_UtfNcasecmp(value, "NONE", vlen) == 0) { /* * Leave all handshake options disabled. */ - } else if (strncasecmp(value, "XONXOFF", vlen) == 0) { + } else if (Tcl_UtfNcasecmp(value, "XONXOFF", vlen) == 0) { SET_BITS(iostate.c_iflag, IXON | IXOFF | IXANY); - } else if (strncasecmp(value, "RTSCTS", vlen) == 0) { + } else if (Tcl_UtfNcasecmp(value, "RTSCTS", vlen) == 0) { #ifdef CRTSCTS SET_BITS(iostate.c_cflag, CRTSCTS); #else /* !CRTSTS */ UNSUPPORTED_OPTION("-handshake RTSCTS"); return TCL_ERROR; #endif /* CRTSCTS */ - } else if (strncasecmp(value, "DTRDSR", vlen) == 0) { + } else if (Tcl_UtfNcasecmp(value, "DTRDSR", vlen) == 0) { UNSUPPORTED_OPTION("-handshake DTRDSR"); return TCL_ERROR; } else { @@ -741,19 +741,19 @@ TtySetOptionProc( ckfree(argv); return TCL_ERROR; } - if (strncasecmp(argv[i], "DTR", strlen(argv[i])) == 0) { + if (Tcl_UtfNcasecmp(argv[i], "DTR", strlen(argv[i])) == 0) { if (flag) { SET_BITS(control, TIOCM_DTR); } else { CLEAR_BITS(control, TIOCM_DTR); } - } else if (strncasecmp(argv[i], "RTS", strlen(argv[i])) == 0) { + } else if (Tcl_UtfNcasecmp(argv[i], "RTS", strlen(argv[i])) == 0) { if (flag) { SET_BITS(control, TIOCM_RTS); } else { CLEAR_BITS(control, TIOCM_RTS); } - } else if (strncasecmp(argv[i], "BREAK", strlen(argv[i])) == 0) { + } else if (Tcl_UtfNcasecmp(argv[i], "BREAK", strlen(argv[i])) == 0) { #if defined(TIOCSBRK) && defined(TIOCCBRK) if (flag) { ioctl(fsPtr->fd, TIOCSBRK, NULL); |