summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--doc/dde.n2
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclIntPlatDecls.h8
-rw-r--r--generic/tclStubInit.c10
-rw-r--r--tools/genStubs.tcl4
6 files changed, 29 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 647d85a..666e3ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-05-24 Jan Nijtmans <nijtmans@users.sf.net>
+ * tools/genStubs.tcl: Take cygwin handling of X11 into account.
+ * generic/tcl*Decls.h: re-generated
+ * generic/tclStubInit.c: Implement TclpIsAtty, Cygwin only.
+ * doc/dde.n: Doc fix: "dde execute iexplore" doesn't work
+ without -async, because iexplore doesn't return a value
+
+2012-05-24 Jan Nijtmans <nijtmans@users.sf.net>
+
* tools/genStubs.tcl: Let cygwin share stub table with win32
* win/tclWinSock.c: implement TclpInetNtoa for win32
* generic/tclInt.decls: Revert most of [3caedf05df], since when
diff --git a/doc/dde.n b/doc/dde.n
index e97bbe9..e4b51b7 100644
--- a/doc/dde.n
+++ b/doc/dde.n
@@ -173,7 +173,7 @@ particularly important website:
.PP
.CS
package require dde
-\fBdde execute\fR iexplore WWW_OpenURL http://www.tcl.tk/
+\fBdde execute\fR -async iexplore WWW_OpenURL http://www.tcl.tk/
.CE
.SH "SEE ALSO"
tk(n), winfo(n), send(n)
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 9eb8320..97517ea 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -1084,6 +1084,10 @@ declare 15 win {
const char **argv, TclFile inputFile, TclFile outputFile,
TclFile errorFile, Tcl_Pid *pidPtr)
}
+# new for 8.4.20+/8.5.12+ Cygwin only
+declare 16 win {
+ int TclpIsAtty(int fd)
+}
# Signature changed in 8.1:
# declare 16 win {
# TclFile TclpCreateTempFile(char *contents, Tcl_DString *namePtr)
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 77cf197..960a4f2 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -138,7 +138,8 @@ EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
const char **argv, TclFile inputFile,
TclFile outputFile, TclFile errorFile,
Tcl_Pid *pidPtr);
-/* Slot 16 is reserved */
+/* 16 */
+EXTERN int TclpIsAtty(int fd);
/* Slot 17 is reserved */
/* 18 */
EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
@@ -287,7 +288,7 @@ typedef struct TclIntPlatStubs {
Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 13 */
int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 14 */
int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 15 */
- void (*reserved16)(void);
+ int (*tclpIsAtty) (int fd); /* 16 */
void (*reserved17)(void);
TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */
TclFile (*tclpOpenFile) (const char *fname, int mode); /* 19 */
@@ -430,7 +431,8 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
(tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */
#define TclpCreateProcess \
(tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */
-/* Slot 16 is reserved */
+#define TclpIsAtty \
+ (tclIntPlatStubsPtr->tclpIsAtty) /* 16 */
/* Slot 17 is reserved */
#define TclpMakeFile \
(tclIntPlatStubsPtr->tclpMakeFile) /* 18 */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 0f0665b..1cbcf84 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -56,7 +56,9 @@ static int TclSockMinimumBuffersOld(int sock, int size)
#ifdef __WIN32__
# define TclUnixWaitForFile 0
# define TclpReaddir 0
+# define TclpIsAtty 0
#elif defined(__CYGWIN__)
+# define TclpIsAtty TclPlatIsAtty
# define TclWinSetInterfaces (void (*) (int)) doNothing
# define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing
# define TclWinFlushDirtyChannels doNothing
@@ -64,6 +66,12 @@ static int TclSockMinimumBuffersOld(int sock, int size)
static Tcl_Encoding winTCharEncoding;
+static int
+TclpIsAtty(int fd)
+{
+ return isatty(fd);
+}
+
int
TclWinGetPlatformId()
{
@@ -489,7 +497,7 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TclpCreateCommandChannel, /* 13 */
TclpCreatePipe, /* 14 */
TclpCreateProcess, /* 15 */
- 0, /* 16 */
+ TclpIsAtty, /* 16 */
0, /* 17 */
TclpMakeFile, /* 18 */
TclpOpenFile, /* 19 */
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index bb584b2..abfc93e 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -299,7 +299,7 @@ proc genStubs::addPlatformGuard {plat iftxt {eltxt {}} {withCygwin 0}} {
append text " && !defined(__CYGWIN__)"
}
append text " && !defined(MAC_TCL)\
- /* UNIX */\n${iftxt}"
+ /* UNIX */\n${iftxt}"
if {$eltxt ne ""} {
append text "#else /* UNIX */\n${eltxt}"
}
@@ -325,7 +325,7 @@ proc genStubs::addPlatformGuard {plat iftxt {eltxt {}} {withCygwin 0}} {
append text " || defined(__CYGWIN__)"
}
append text " || defined(MAC_OSX_TK))\
- /* X11 */\n${iftxt}"
+ /* X11 */\n${iftxt}"
if {$eltxt ne ""} {
append text "#else /* X11 */\n${eltxt}"
}