From: <no...@so...> - 2002-01-09 06:46:07
|
Bugs item #500348, was opened at 2002-01-07 03:06 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=500348&group_id=10894 Category: 26. Channel Types Group: None Status: Open Resolution: None Priority: 6 Submitted By: Rolf Schroedter (schroedter) Assigned to: Andreas Kupries (andreas_kupries) Summary: fconfigure for serial ports failure Initial Comment: Tcl version: Current 8.4 CVS, Windows There is a bug in the TIP#35 implementation in SerialSetOptionProc(): It occasionally modifies the 'value' argument to upper case letters. The following script demonstrates the problem: set filename com1 proc openFile {} { global filename chan set chan [open $filename r+] fconfigure $chan -mode 9600,n,8,1 fconfigure $chan -handshake none fconfigure $chan -buffering none } openFile [fconfigure -handshake none] modifies "none" to "NONE". The following [fconfigure -handshake buffering none] reuses the "NONE" value (when byte compiled) and fails. The attached patch uses lower case comparison instead of modifying the 'value' argument. PS: Shouldn't Tcl_DriverSetOptionProc be better declared as (... const char *optionName, const char *value) ? ---------------------------------------------------------------------- >Comment By: Rolf Schroedter (schroedter) Date: 2002-01-08 22:46 Message: Logged In: YES user_id=99573 For Windows there is a strnicmp() function which could be used instead of strCaseEqu(). I see strncasecmp() in the tclPlatStubs API only for MAC_TCL. I need the same for the Unix implementation of TIP#35. Can I rely on strncasecmp() for all Unix*es ? My Linux manual says it's BSD 4.4. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2002-01-07 13:43 Message: Logged In: YES user_id=75003 The definition of 'strCaseEqu' is not required. The C- library provides 'strcasecmp' (or equivalent). This functionis in the stubs API and thus available, along with 'strncasecmp'. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2002-01-07 13:17 Message: Logged In: YES user_id=75003 Regarding the post-skriptum I believe that TIP #27 may apply. Please check with Kevin Kenny (kennykb) and Donald Porter (dgp). ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=500348&group_id=10894 |