summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--win/tclWinSerial.c23
2 files changed, 17 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 7676c49..3aea442 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
-2002-01-12 David Gravereaux <davygrvy@pobox.com>
+2002-01-11 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * win/tclWinSerial.c (SerialSetOptionProc): Applied patch for SF
+ bug #500348 supplied by Rolf Schroedter
+ <schroedter@users.sourceforge.net>. The function modified the
+ contents of the the 'value' string and now does not do this
+ anymore. This is a followup to the change made on 2001-12-17.
+
+2002-01-11 David Gravereaux <davygrvy@pobox.com>
* win/makefile.vc: Removed -GD compiler option. It was intended
for future use, but MS is again changing the future at their whim.
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index d980df4..ae24bdc 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -11,7 +11,7 @@
*
* Serial functionality implemented by Rolf.Schroedter@dlr.de
*
- * RCS: @(#) $Id: tclWinSerial.c,v 1.16 2001/12/19 19:34:18 hobbs Exp $
+ * RCS: @(#) $Id: tclWinSerial.c,v 1.17 2002/01/11 20:21:32 andreas_kupries Exp $
*/
#include "tclWinInt.h"
@@ -1519,11 +1519,6 @@ SerialModemStatusStr(status, dsPtr)
*
*----------------------------------------------------------------------
*/
-static void str_toupper( char *s )
-{
- while ( (*s = toupper(*s)) != '\0' ) s++ ;
-}
-
static int
SerialSetOptionProc(instanceData, interp, optionName, value)
ClientData instanceData; /* File state. */
@@ -1618,15 +1613,14 @@ SerialSetOptionProc(instanceData, interp, optionName, value)
dcb.XonLim = (WORD) (infoPtr->sysBufRead*1/2);
dcb.XoffLim = (WORD) (infoPtr->sysBufRead*1/4);
- str_toupper(value);
- if (strncmp(value, "NONE", vlen) == 0) {
+ if (strnicmp(value, "NONE", vlen) == 0) {
/* leave all handshake options disabled */
- } else if (strncmp(value, "XONXOFF", vlen) == 0) {
+ } else if (strnicmp(value, "XONXOFF", vlen) == 0) {
dcb.fOutX = dcb.fInX = TRUE;
- } else if (strncmp(value, "RTSCTS", vlen) == 0) {
+ } else if (strnicmp(value, "RTSCTS", vlen) == 0) {
dcb.fOutxCtsFlow = TRUE;
dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
- } else if (strncmp(value, "DTRDSR", vlen) == 0) {
+ } else if (strnicmp(value, "DTRDSR", vlen) == 0) {
dcb.fOutxDsrFlow = TRUE;
dcb.fDtrControl = DTR_CONTROL_HANDSHAKE;
} else {
@@ -1703,11 +1697,10 @@ SerialSetOptionProc(instanceData, interp, optionName, value)
return TCL_ERROR;
}
while (argc > 1) {
- str_toupper(argv[0]);
if (Tcl_GetBoolean(interp, argv[1], &flag) == TCL_ERROR) {
return TCL_ERROR;
}
- if (strncmp(argv[0], "DTR", strlen(argv[0])) == 0) {
+ if (strnicmp(argv[0], "DTR", strlen(argv[0])) == 0) {
if (! EscapeCommFunction(infoPtr->handle, flag ? SETDTR : CLRDTR)) {
if (interp) {
Tcl_AppendResult(interp,
@@ -1715,7 +1708,7 @@ SerialSetOptionProc(instanceData, interp, optionName, value)
}
return TCL_ERROR;
}
- } else if (strncmp(argv[0], "RTS", strlen(argv[0])) == 0) {
+ } else if (strnicmp(argv[0], "RTS", strlen(argv[0])) == 0) {
if (! EscapeCommFunction(infoPtr->handle, flag ? SETRTS : CLRRTS)) {
if (interp) {
Tcl_AppendResult(interp,
@@ -1723,7 +1716,7 @@ SerialSetOptionProc(instanceData, interp, optionName, value)
}
return TCL_ERROR;
}
- } else if (strncmp(argv[0], "BREAK", strlen(argv[0])) == 0) {
+ } else if (strnicmp(argv[0], "BREAK", strlen(argv[0])) == 0) {
if (! EscapeCommFunction(infoPtr->handle, flag ? SETBREAK : CLRBREAK)) {
if (interp) {
Tcl_AppendResult(interp,