diff options
author | hobbs <hobbs> | 2000-11-03 18:46:09 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-11-03 18:46:09 (GMT) |
commit | c3064b1f4544c841d840a76bcebdb93c4caf23f7 (patch) | |
tree | 650d6d7787b065eec9d05f906658a7b7576b148a /generic/tclDecls.h | |
parent | e30a06ccf0b2e7f424f49c357bbca229380e0af9 (diff) | |
download | tcl-c3064b1f4544c841d840a76bcebdb93c4caf23f7.zip tcl-c3064b1f4544c841d840a76bcebdb93c4caf23f7.tar.gz tcl-c3064b1f4544c841d840a76bcebdb93c4caf23f7.tar.bz2 |
* generic/tclStubInit.c:
* generic/tclDecls.h:
* generic/tcl.decls: added Tcl_SetMainLoop proc that allows people
to set a main loop that will run for tclsh.
* generic/tcl.h: added Tcl_MainLoopProc typedef
* generic/tclMain.c (Tcl_SetMainLoop, StdinProc, Prompt): new
StdinProc and Prompt static procs and Tcl_SetMainLoop stubs proc.
The first two handle a fileevent based prompt (taken from
tkMain.c). Tcl_SetMainLoop enables the interactive setting of a
main loop procedure. This enables Tk to be a loadable package.
Diffstat (limited to 'generic/tclDecls.h')
-rw-r--r-- | generic/tclDecls.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 0656d76..743cef2 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.42 2000/09/28 06:38:19 hobbs Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.43 2000/11/03 18:46:11 hobbs Exp $ */ #ifndef _TCLDECLS @@ -913,7 +913,8 @@ EXTERN int Tcl_UnstackChannel _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 283 */ EXTERN Tcl_Channel Tcl_GetStackedChannel _ANSI_ARGS_((Tcl_Channel chan)); -/* Slot 284 is reserved */ +/* 284 */ +EXTERN void Tcl_SetMainLoop _ANSI_ARGS_((Tcl_MainLoopProc * proc)); /* Slot 285 is reserved */ /* 286 */ EXTERN void Tcl_AppendObjToObj _ANSI_ARGS_((Tcl_Obj * objPtr, @@ -1700,7 +1701,7 @@ typedef struct TclStubs { Tcl_Channel (*tcl_StackChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan)); /* 281 */ int (*tcl_UnstackChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 282 */ Tcl_Channel (*tcl_GetStackedChannel) _ANSI_ARGS_((Tcl_Channel chan)); /* 283 */ - void *reserved284; + void (*tcl_SetMainLoop) _ANSI_ARGS_((Tcl_MainLoopProc * proc)); /* 284 */ void *reserved285; void (*tcl_AppendObjToObj) _ANSI_ARGS_((Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr)); /* 286 */ Tcl_Encoding (*tcl_CreateEncoding) _ANSI_ARGS_((Tcl_EncodingType * typePtr)); /* 287 */ @@ -3036,7 +3037,10 @@ extern TclStubs *tclStubsPtr; #define Tcl_GetStackedChannel \ (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ #endif -/* Slot 284 is reserved */ +#ifndef Tcl_SetMainLoop +#define Tcl_SetMainLoop \ + (tclStubsPtr->tcl_SetMainLoop) /* 284 */ +#endif /* Slot 285 is reserved */ #ifndef Tcl_AppendObjToObj #define Tcl_AppendObjToObj \ |