diff options
author | stanton <stanton@noemail.net> | 1999-04-15 22:38:46 (GMT) |
---|---|---|
committer | stanton <stanton@noemail.net> | 1999-04-15 22:38:46 (GMT) |
commit | bae97612cdb911cd4512a88a184794f8fa51971e (patch) | |
tree | e29ecad719da73c67d437be2a057cc01dca684e9 /mac/tclMacChan.c | |
parent | e4b92ec177a9756d4959006f67e37331d0a90625 (diff) | |
download | tcl-bae97612cdb911cd4512a88a184794f8fa51971e.zip tcl-bae97612cdb911cd4512a88a184794f8fa51971e.tar.gz tcl-bae97612cdb911cd4512a88a184794f8fa51971e.tar.bz2 |
* Merge 8.0.5 changes:
- Mac changes for final release
- Minor fixes to tools configure file
* win/tclWinSock.c: Apply patch to allow write access to a socket
if FD_WRITE is sent but FD_CONNECT is not. Some strange problem
with either Win32 or a socket driver. [Bug: 1664 1776]
FossilOrigin-Name: 08c27030dc1053223d15e60941c667b9adfcc185
Diffstat (limited to 'mac/tclMacChan.c')
-rw-r--r-- | mac/tclMacChan.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mac/tclMacChan.c b/mac/tclMacChan.c index 38be0a4..fc53f42 100644 --- a/mac/tclMacChan.c +++ b/mac/tclMacChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacChan.c,v 1.4 1999/03/10 05:52:51 stanton Exp $ + * RCS: @(#) $Id: tclMacChan.c,v 1.5 1999/04/15 22:38:46 stanton Exp $ */ #include "tclInt.h" @@ -87,6 +87,12 @@ typedef struct FileEvent { * pointer. */ } FileEvent; +/* + * This is defined in tclMacSerial.c. + */ + +EXTERN Tcl_Channel TclMacOpenSerialChannel _ANSI_ARGS_((Tcl_Interp *interp, + char *fileName, int *errorCode)); /* * Static routines for this file: @@ -761,13 +767,17 @@ TclpOpenFileChannel( int mode; char *nativeName; Tcl_DString buffer; - int errorCode; + int errorCode, port = 0; mode = GetOpenMode(interp, modeString); if (mode == -1) { return NULL; } + /* + * Look for the magic cookies that refer to the modem ports. + */ + nativeName = Tcl_TranslateFileName(interp, fileName, &buffer); if (nativeName == NULL) { return NULL; @@ -775,7 +785,7 @@ TclpOpenFileChannel( chan = OpenFileChannel(nativeName, mode, permissions, &errorCode); Tcl_DStringFree(&buffer); - + if (chan == NULL) { Tcl_SetErrno(errorCode); if (interp != (Tcl_Interp *) NULL) { |