From 1c2359595d2d7376f8a7c36c81a0736dcf5390a3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 25 Sep 2023 08:51:37 +0000 Subject: Move CHANNEL_*BUFFERED (internal) flags to higher bits: prevent any possibility for conflicts with public flags TCL_ENCODING_STOPONERROR|TCL_ENCODING_NO_TERMINATE|TCL_ENCODING_CHAR_LIMIT --- generic/tclIO.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/generic/tclIO.h b/generic/tclIO.h index 729db5d..08fff44 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -158,8 +158,10 @@ typedef struct ChannelState { * of line sequences in output? */ int inEofChar; /* If nonzero, use this as a signal of EOF on * input. */ +#if TCL_MAJOR_VERSION < 9 int outEofChar; /* If nonzero, append this to the channel when - * it is closed if it is open for writing. */ + * it is closed if it is open for writing. For Tcl 8.x only */ +#endif int unreportedError; /* Non-zero if an error report was deferred * because it happened in the background. The * value is the POSIX error code. */ @@ -230,12 +232,8 @@ typedef struct ChannelState { * the channel can also have TCL_READABLE (1<<1) and TCL_WRITABLE (1<<2) set. */ -#define CHANNEL_NONBLOCKING (1<<3) /* Channel is currently in nonblocking +#define CHANNEL_NONBLOCKING (1<<6) /* Channel is currently in nonblocking * mode. */ -#define CHANNEL_LINEBUFFERED (1<<4) /* Output to the channel must be - * flushed after every newline. */ -#define CHANNEL_UNBUFFERED (1<<5) /* Output to the channel must always - * be flushed immediately. */ #define BG_FLUSH_SCHEDULED (1<<7) /* A background flush of the queued * output buffers has been * scheduled. */ @@ -278,6 +276,10 @@ typedef struct ChannelState { * encountered an encoding error */ #define CHANNEL_RAW_MODE (1<<16) /* When set, notes that the Raw API is * being used. */ +#define CHANNEL_LINEBUFFERED (1<<17) /* Output to the channel must be + * flushed after every newline. */ +#define CHANNEL_UNBUFFERED (1<<18) /* Output to the channel must always + * be flushed immediately. */ #define CHANNEL_INCLOSE (1<<19) /* Channel is currently being closed. * Its structures are still live and * usable, but it may not be closed -- cgit v0.12