diff options
| author | andreask@activestate.com <andreas_kupries> | 2005-08-24 17:56:23 (GMT) |
|---|---|---|
| committer | andreask@activestate.com <andreas_kupries> | 2005-08-24 17:56:23 (GMT) |
| commit | f10a4f62580ca7ee7063a31ace43b939cfdc2c77 (patch) | |
| tree | 20a737ae03097f905f0e9230c85c04123e5b5894 /generic/tclInt.h | |
| parent | 1ecd2b4645d7d73d70beceb34604490396946eed (diff) | |
| download | tcl-f10a4f62580ca7ee7063a31ace43b939cfdc2c77.zip tcl-f10a4f62580ca7ee7063a31ace43b939cfdc2c77.tar.gz tcl-f10a4f62580ca7ee7063a31ace43b939cfdc2c77.tar.bz2 | |
TIP#219 IMPLEMENTATION
* doc/SetChanErr.3: ** New File **. Documentation of the new
channel API functions.
* generic/tcl.decls: Stub declarations of the new channel API.
* generic/tclDecls.h: Regenerated
* generic/tclStubInit.c:
* tclIORChan.c: ** New File **. Implementation of the reflected
channel.
* generic/tclInt.h: Integration of reflected channel and new error
* generic/tclIO.c: propagation into the generic I/O core.
* generic/tclIOCmd.c:
* generic/tclIO.h:
* library/init.tcl:
* tests/io.test: Extended testsuite.
* tests/ioCmd.test:
* tests/chan.test:
* generic/tclTest.c:
* generic/tclThreadTest.c:
* unix/Makefile.in: Integration into the build machinery.
* win/Makefile.in:
* win/Makefile.vc:
Diffstat (limited to 'generic/tclInt.h')
| -rw-r--r-- | generic/tclInt.h | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 8ba85b6..1da1a43 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.245 2005/08/11 22:06:47 kennykb Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.246 2005/08/24 17:56:23 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -1515,6 +1515,15 @@ typedef struct Interp { * inserted by an ensemble. */ } ensembleRewrite; + /* TIP #219 ... Global info for the I/O system ... + * Error message set by channel drivers, for the propagation of + * arbitrary Tcl errors. This information, if present (chanMsg not + * NULL), takes precedence over a posix error code returned by a + * channel operation. + */ + + Tcl_Obj* chanMsg; + /* * Statistical information about the bytecode compiler and interpreter's * operation. @@ -1527,6 +1536,42 @@ typedef struct Interp { } Interp; /* + * General list of interpreters. Doubly linked for easier + * removal of items deep in the list. + */ + +typedef struct InterpList { + Interp* interpPtr; + struct InterpList* prevPtr; + struct InterpList* nextPtr; +} InterpList; + +/* + * Macros for splicing into and out of doubly linked lists. + * They assume existence of struct items 'prevPtr' and 'nextPtr'. + * + * a = element to add or remove. + * b = list head. + * + * TclSpliceIn adds to the head of the list. + */ + +#define TclSpliceIn(a,b) \ + (a)->nextPtr = (b); \ + if ((b) != NULL) \ + (b)->prevPtr = (a); \ + (a)->prevPtr = NULL, (b) = (a); + +#define TclSpliceOut(a,b) \ + if ((a)->prevPtr != NULL) \ + (a)->prevPtr->nextPtr = (a)->nextPtr; \ + else \ + (b) = (a)->nextPtr; \ + if ((a)->nextPtr != NULL) \ + (a)->nextPtr->prevPtr = (a)->prevPtr; + + +/* * EvalFlag bits for Interp structures: * * TCL_ALLOW_EXCEPTIONS 1 means it's OK for the script to terminate with @@ -1941,6 +1986,12 @@ MODULE_SCOPE int TclArraySet _ANSI_ARGS_((Tcl_Interp *interp, MODULE_SCOPE double TclBignumToDouble _ANSI_ARGS_((mp_int* bignum)); MODULE_SCOPE int TclCheckBadOctal _ANSI_ARGS_((Tcl_Interp *interp, CONST char *value)); +MODULE_SCOPE int TclChanCreateObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +MODULE_SCOPE int TclChanPostEventObjCmd _ANSI_ARGS_((ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); +MODULE_SCOPE int TclChanCaughtErrorBypass _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Channel chan)); MODULE_SCOPE void TclCleanupLiteralTable _ANSI_ARGS_(( Tcl_Interp* interp, LiteralTable* tablePtr)); MODULE_SCOPE int TclDoubleDigits _ANSI_ARGS_((char* buf, |
