*** tclWinSerial.c.old	Thu Dec 20 18:05:02 2001
--- tclWinSerial.c	Thu Jan 10 07:00:00 2002
***************
*** 1519,1529 ****
   *
   *----------------------------------------------------------------------
   */
- static void str_toupper( char *s ) 
- {
-         while ( (*s = toupper(*s)) != '\0' ) s++ ;
- }
- 
  static int
  SerialSetOptionProc(instanceData, interp, optionName, value)
      ClientData instanceData;    /* File state. */
--- 1519,1524 ----
***************
*** 1618,1632 ****
          dcb.XonLim = (WORD) (infoPtr->sysBufRead*1/2);
          dcb.XoffLim = (WORD) (infoPtr->sysBufRead*1/4);
          
!         str_toupper(value);
!         if (strncmp(value, "NONE", vlen) == 0) {
              /* leave all handshake options disabled */
!         } else if (strncmp(value, "XONXOFF", vlen) == 0) {
              dcb.fOutX = dcb.fInX = TRUE;
!         } else if (strncmp(value, "RTSCTS", vlen) == 0) {
              dcb.fOutxCtsFlow = TRUE;
              dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
!         } else if (strncmp(value, "DTRDSR", vlen) == 0) {
              dcb.fOutxDsrFlow = TRUE;
              dcb.fDtrControl = DTR_CONTROL_HANDSHAKE;
          } else {
--- 1613,1626 ----
          dcb.XonLim = (WORD) (infoPtr->sysBufRead*1/2);
          dcb.XoffLim = (WORD) (infoPtr->sysBufRead*1/4);
  
!         if (strnicmp(value, "NONE", vlen) == 0) {
              /* leave all handshake options disabled */
!         } else if (strnicmp(value, "XONXOFF", vlen) == 0) {
              dcb.fOutX = dcb.fInX = TRUE;
!         } else if (strnicmp(value, "RTSCTS", vlen) == 0) {
              dcb.fOutxCtsFlow = TRUE;
              dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
!         } else if (strnicmp(value, "DTRDSR", vlen) == 0) {
              dcb.fOutxDsrFlow = TRUE;
              dcb.fDtrControl = DTR_CONTROL_HANDSHAKE;
          } else {
***************
*** 1703,1713 ****
              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 (! EscapeCommFunction(infoPtr->handle, flag ? SETDTR : CLRDTR)) {
                      if (interp) {
                          Tcl_AppendResult(interp, 
--- 1697,1706 ----
              return TCL_ERROR;
          }
          while (argc > 1) {
              if (Tcl_GetBoolean(interp, argv[1], &flag) == TCL_ERROR) {
                  return TCL_ERROR;
              }
!             if (strnicmp(argv[0], "DTR", strlen(argv[0])) == 0) {
                  if (! EscapeCommFunction(infoPtr->handle, flag ? SETDTR : CLRDTR)) {
                      if (interp) {
                          Tcl_AppendResult(interp,
***************
*** 1715,1721 ****
                      }
                      return TCL_ERROR;
                  }
!             } else if (strncmp(argv[0], "RTS", strlen(argv[0])) == 0) {
                  if (! EscapeCommFunction(infoPtr->handle, flag ? SETRTS : CLRRTS)) {
                      if (interp) {
                          Tcl_AppendResult(interp, 
--- 1708,1714 ----
                      }
                      return TCL_ERROR;
                  }
!             } else if (strnicmp(argv[0], "RTS", strlen(argv[0])) == 0) {
                  if (! EscapeCommFunction(infoPtr->handle, flag ? SETRTS : CLRRTS)) {
                      if (interp) {
                          Tcl_AppendResult(interp,
***************
*** 1723,1729 ****
                      }
                      return TCL_ERROR;
                  }
!             } else if (strncmp(argv[0], "BREAK", strlen(argv[0])) == 0) {
                  if (! EscapeCommFunction(infoPtr->handle, flag ? SETBREAK : CLRBREAK)) {
                      if (interp) {
                          Tcl_AppendResult(interp, 
--- 1716,1722 ----
                      }
                      return TCL_ERROR;
                  }
!             } else if (strnicmp(argv[0], "BREAK", strlen(argv[0])) == 0) {
                  if (! EscapeCommFunction(infoPtr->handle, flag ? SETBREAK : CLRBREAK)) {
                      if (interp) {
                          Tcl_AppendResult(interp,
