summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixChan.c')
-rw-r--r--unix/tclUnixChan.c46
1 files changed, 42 insertions, 4 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index fdc9d1d..b4b2739 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -792,7 +792,7 @@ TtySetOptionProc(
*
* Results:
* A standard Tcl result. Also sets the supplied DString to the string
- * value of the option(s) returned. Sets error message if needed
+ * value of the option(s) returned. Sets error message if needed
* (by calling Tcl_BadChannelOption).
*
*----------------------------------------------------------------------
@@ -988,6 +988,39 @@ static const struct {int baud; speed_t speed;} speeds[] = {
#ifdef B460800
{460800, B460800},
#endif
+#ifdef B500000
+ {500000, B500000},
+#endif
+#ifdef B576000
+ {576000, B576000},
+#endif
+#ifdef B921600
+ {921600, B921600},
+#endif
+#ifdef B1000000
+ {1000000, B1000000},
+#endif
+#ifdef B1152000
+ {1152000, B1152000},
+#endif
+#ifdef B1500000
+ {1500000,B1500000},
+#endif
+#ifdef B2000000
+ {2000000, B2000000},
+#endif
+#ifdef B2500000
+ {2500000,B2500000},
+#endif
+#ifdef B3000000
+ {3000000,B3000000},
+#endif
+#ifdef B3500000
+ {3500000,B3500000},
+#endif
+#ifdef B4000000
+ {4000000,B4000000},
+#endif
{-1, 0}
};
@@ -1201,7 +1234,7 @@ TtyParseMode(
char parity;
const char *bad = "bad value for -mode";
- i = sscanf(mode, "%d,%c,%d,%d%n",
+ i = sscanf(mode, "%d,%c,%d,%d%n",
&ttyPtr->baud,
&parity,
&ttyPtr->data,
@@ -1292,7 +1325,7 @@ TtyInit(
|| iostate.c_lflag != 0
|| iostate.c_cflag & CREAD
|| iostate.c_cc[VMIN] != 1
- || iostate.c_cc[VTIME] != 0)
+ || iostate.c_cc[VTIME] != 0)
{
iostate.c_iflag = IGNBRK;
iostate.c_oflag = 0;
@@ -1361,6 +1394,11 @@ TclpOpenFileChannel(
native = Tcl_FSGetNativePath(pathPtr);
if (native == NULL) {
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "couldn't open \"",
+ TclGetString(pathPtr), "\": filename is invalid on this platform",
+ NULL);
+ }
return NULL;
}
@@ -1819,7 +1857,7 @@ TclUnixWaitForFile(
if (FD_ISSET(fd, &writableMask)) {
SET_BITS(result, TCL_WRITABLE);
}
- if (FD_ISSET(fd, &exceptionMask)) {
+ if (FD_ISSET(fd, &exceptionMask)) {
SET_BITS(result, TCL_EXCEPTION);
}
result &= mask;