summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-01-06 09:49:38 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-01-06 09:49:38 (GMT)
commitc31d26b2fa5378c81cb71e2ba8b60af670107fa7 (patch)
treece516c5e7d960b482d78b988d16220c31a22b3e3 /generic
parent2bd21827f89256fadc04c51eaba0c8b82bdcc75b (diff)
downloadtcl-c31d26b2fa5378c81cb71e2ba8b60af670107fa7.zip
tcl-c31d26b2fa5378c81cb71e2ba8b60af670107fa7.tar.gz
tcl-c31d26b2fa5378c81cb71e2ba8b60af670107fa7.tar.bz2
Comment formatting improvements.
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h91
-rw-r--r--generic/tclInt.h215
2 files changed, 159 insertions, 147 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index c3426f1..dc8d3f7 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tcl.h,v 1.285 2008/12/19 03:54:44 dgp Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.286 2009/01/06 09:49:38 dkf Exp $
*/
#ifndef _TCL
@@ -274,7 +274,7 @@ extern "C" {
#endif
/*
- * Make sure EXTERN isn't defined elsewhere
+ * Make sure EXTERN isn't defined elsewhere.
*/
#ifdef EXTERN
@@ -538,9 +538,10 @@ typedef void (Tcl_ThreadCreateProc) (ClientData clientData);
* given to Tcl_CreateThread.
*/
-#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack */
-#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default behaviour */
-#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable */
+#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack. */
+#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default
+ * behaviour. */
+#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable. */
/*
* Flag values passed to Tcl_StringCaseMatch.
@@ -552,20 +553,20 @@ typedef void (Tcl_ThreadCreateProc) (ClientData clientData);
* Flag values passed to Tcl_GetRegExpFromObj.
*/
-#define TCL_REG_BASIC 000000 /* BREs (convenience) */
-#define TCL_REG_EXTENDED 000001 /* EREs */
-#define TCL_REG_ADVF 000002 /* advanced features in EREs */
-#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs) */
-#define TCL_REG_QUOTE 000004 /* no special characters, none */
-#define TCL_REG_NOCASE 000010 /* ignore case */
-#define TCL_REG_NOSUB 000020 /* don't care about subexpressions */
-#define TCL_REG_EXPANDED 000040 /* expanded format, white space &
- * comments */
+#define TCL_REG_BASIC 000000 /* BREs (convenience). */
+#define TCL_REG_EXTENDED 000001 /* EREs. */
+#define TCL_REG_ADVF 000002 /* Advanced features in EREs. */
+#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs). */
+#define TCL_REG_QUOTE 000004 /* No special characters, none. */
+#define TCL_REG_NOCASE 000010 /* Ignore case. */
+#define TCL_REG_NOSUB 000020 /* Don't care about subexpressions. */
+#define TCL_REG_EXPANDED 000040 /* Expanded format, white space &
+ * comments. */
#define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */
-#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before */
-#define TCL_REG_NEWLINE 000300 /* newlines are line terminators */
-#define TCL_REG_CANMATCH 001000 /* report details on partial/limited
- * matches */
+#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before. */
+#define TCL_REG_NEWLINE 000300 /* Newlines are line terminators. */
+#define TCL_REG_CANMATCH 001000 /* Report details on partial/limited
+ * matches. */
/*
* Flags values passed to Tcl_RegExpExecObj.
@@ -777,19 +778,19 @@ typedef struct Tcl_Obj {
* internal rep. NULL indicates the object has
* no internal rep (has no type). */
union { /* The internal representation: */
- long longValue; /* - an long integer value */
- double doubleValue; /* - a double-precision floating value */
- VOID *otherValuePtr; /* - another, type-specific value */
- Tcl_WideInt wideValue; /* - a long long value */
- struct { /* - internal rep as two pointers */
+ long longValue; /* - an long integer value. */
+ double doubleValue; /* - a double-precision floating value. */
+ VOID *otherValuePtr; /* - another, type-specific value. */
+ Tcl_WideInt wideValue; /* - a long long value. */
+ struct { /* - internal rep as two pointers. */
VOID *ptr1;
VOID *ptr2;
} twoPtrValue;
struct { /* - internal rep as a wide int, tightly
- * packed fields */
- VOID *ptr; /* Pointer to digits */
+ * packed fields. */
+ VOID *ptr; /* Pointer to digits. */
unsigned long value;/* Alloc, used, and signum packed into a
- * single word */
+ * single word. */
} ptrAndLongRep;
} internalRep;
} Tcl_Obj;
@@ -1038,10 +1039,10 @@ typedef struct Tcl_DString {
#define TCL_LEAVE_ERR_MSG 0x200
#define TCL_TRACE_ARRAY 0x800
#ifndef TCL_REMOVE_OBSOLETE_TRACES
-/* Required to support old variable/vdelete/vinfo traces */
+/* Required to support old variable/vdelete/vinfo traces. */
#define TCL_TRACE_OLD_STYLE 0x1000
#endif
-/* Indicate the semantics of the result of a trace */
+/* Indicate the semantics of the result of a trace. */
#define TCL_TRACE_RESULT_DYNAMIC 0x8000
#define TCL_TRACE_RESULT_OBJECT 0x10000
@@ -1409,7 +1410,7 @@ typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData);
#define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5)
/*
- * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc
+ * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc.
*/
#define TCL_CHANNEL_THREAD_INSERT (0)
@@ -1501,7 +1502,7 @@ typedef struct Tcl_ChannelType {
/* Set blocking mode for the raw channel. May
* be NULL. */
/*
- * Only valid in TCL_CHANNEL_VERSION_2 channels or later
+ * Only valid in TCL_CHANNEL_VERSION_2 channels or later.
*/
Tcl_DriverFlushProc *flushProc;
/* Function to call to flush a channel. May be
@@ -1511,7 +1512,7 @@ typedef struct Tcl_ChannelType {
* This will be passed up the stacked channel
* chain. */
/*
- * Only valid in TCL_CHANNEL_VERSION_3 channels or later
+ * Only valid in TCL_CHANNEL_VERSION_3 channels or later.
*/
Tcl_DriverWideSeekProc *wideSeekProc;
/* Function to call to seek on the channel
@@ -1519,8 +1520,8 @@ typedef struct Tcl_ChannelType {
* NULL, and must be NULL if seekProc is
* NULL. */
/*
- * Only valid in TCL_CHANNEL_VERSION_4 channels or later
- * TIP #218, Channel Thread Actions
+ * Only valid in TCL_CHANNEL_VERSION_4 channels or later.
+ * TIP #218, Channel Thread Actions.
*/
Tcl_DriverThreadActionProc *threadActionProc;
/* Function to call to notify the driver of
@@ -1528,8 +1529,8 @@ typedef struct Tcl_ChannelType {
* be NULL. */
/*
- * Only valid in TCL_CHANNEL_VERSION_5 channels or later
- * TIP #208, File Truncation
+ * Only valid in TCL_CHANNEL_VERSION_5 channels or later.
+ * TIP #208, File Truncation.
*/
Tcl_DriverTruncateProc *truncateProc;
/* Function to call to truncate the underlying
@@ -1563,14 +1564,14 @@ typedef enum Tcl_PathType {
*/
typedef struct Tcl_GlobTypeData {
- int type; /* Corresponds to bcdpfls as in 'find -t' */
- int perm; /* Corresponds to file permissions */
- Tcl_Obj *macType; /* Acceptable mac type */
- Tcl_Obj *macCreator; /* Acceptable mac creator */
+ int type; /* Corresponds to bcdpfls as in 'find -t'. */
+ int perm; /* Corresponds to file permissions. */
+ Tcl_Obj *macType; /* Acceptable Mac type. */
+ Tcl_Obj *macCreator; /* Acceptable Mac creator. */
} Tcl_GlobTypeData;
/*
- * Type and permission definitions for glob command
+ * Type and permission definitions for glob command.
*/
#define TCL_GLOB_TYPE_BLOCK (1<<0)
@@ -1589,7 +1590,7 @@ typedef struct Tcl_GlobTypeData {
#define TCL_GLOB_PERM_X (1<<4)
/*
- * Flags for the unload callback function
+ * Flags for the unload callback function.
*/
#define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0)
@@ -2162,9 +2163,9 @@ typedef unsigned short Tcl_UniChar;
typedef struct Tcl_Config {
const char *key; /* Configuration key to register. ASCII
- * encoded, thus UTF-8 */
+ * encoded, thus UTF-8. */
const char *value; /* The value associated with the key. System
- * encoding */
+ * encoding. */
} Tcl_Config;
/*
@@ -2346,7 +2347,7 @@ EXTERN void Tcl_GetMemoryInfo (Tcl_DString *dsPtr);
/*
- * Single public declaration for NRE
+ * Single public declaration for NRE.
*/
typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp,
@@ -2413,7 +2414,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp,
# define Tcl_IncrRefCount(objPtr) \
++(objPtr)->refCount
/*
- * Use do/while0 idiom for optimum correctness without compiler warnings
+ * Use do/while0 idiom for optimum correctness without compiler warnings.
* http://c2.com/cgi/wiki?TrivialDoWhileLoop
*/
# define Tcl_DecrRefCount(objPtr) \
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 7551956..67ba634 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,14 +15,14 @@
* 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.411 2009/01/05 09:48:11 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.412 2009/01/06 09:49:39 dkf Exp $
*/
#ifndef _TCLINT
#define _TCLINT
/*
- * Some numerics configuration options
+ * Some numerics configuration options.
*/
#undef NO_WIDE_TYPE
@@ -274,9 +274,9 @@ typedef struct Namespace {
* is currently allocated. */
int cmdRefEpoch; /* Incremented if a newly added command
* shadows a command for which this namespace
- * has already cached a Command * pointer;
- * this causes all its cached Command*
- * pointers to be invalidated. */
+ * has already cached a Command* pointer; this
+ * causes all its cached Command* pointers to
+ * be invalidated. */
int resolverEpoch; /* Incremented whenever (a) the name
* resolution rules change for this namespace
* or (b) a newly added command shadows a
@@ -654,7 +654,7 @@ typedef struct VarInHash {
#define VAR_ALL_HASH \
(VAR_IN_HASHTABLE|VAR_DEAD_HASH|VAR_NAMESPACE_VAR|VAR_ARRAY_ELEMENT)
-/* Trace and search state */
+/* Trace and search state. */
#define VAR_TRACED_READ 0x10 /* TCL_TRACE_READS */
#define VAR_TRACED_WRITE 0x20 /* TCL_TRACE_WRITES */
@@ -665,7 +665,7 @@ typedef struct VarInHash {
#define VAR_ALL_TRACES \
(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET)
-/* Special handling on initialisation (only CompiledLocal) */
+/* Special handling on initialisation (only CompiledLocal). */
#define VAR_ARGUMENT 0x100 /* KEEP OLD VALUE! See tclProc.c */
#define VAR_TEMPORARY 0x200 /* KEEP OLD VALUE! See tclProc.c */
#define VAR_IS_ARGS 0x400
@@ -781,7 +781,7 @@ typedef struct VarInHash {
((VarInHash *) (varPtr))->refCount
/*
- * Macros for direct variable access by TEBC
+ * Macros for direct variable access by TEBC.
*/
#define TclIsVarDirectReadable(varPtr) \
@@ -919,9 +919,9 @@ typedef struct Trace {
ClientData clientData; /* Arbitrary value to pass to proc. */
struct Trace *nextPtr; /* Next in list of traces for this interp. */
int flags; /* Flags governing the trace - see
- * Tcl_CreateObjTrace for details */
+ * Tcl_CreateObjTrace for details. */
Tcl_CmdObjTraceDeleteProc *delProc;
- /* Procedure to call when trace is deleted */
+ /* Procedure to call when trace is deleted. */
} Trace;
/*
@@ -1093,15 +1093,15 @@ typedef struct CmdFrame {
*/
int type; /* Values see below. */
- int level; /* #Frames in stack, prevent O(n) scan of
- * list. */
- int numLevels; /* value of interp's numLevels when the frame
- * was pushed */
+ int level; /* Number of frames in stack, prevent O(n)
+ * scan of list. */
+ int numLevels; /* Value of interp's numLevels when the frame
+ * was pushed. */
int *line; /* Lines the words of the command start on. */
int nline;
CallFrame *framePtr; /* Procedure activation record, may be
* NULL. */
- struct CmdFrame *nextPtr; /* Link to calling frame */
+ struct CmdFrame *nextPtr; /* Link to calling frame. */
/*
* Data needed for Eval vs TEBC
@@ -1139,27 +1139,28 @@ typedef struct CmdFrame {
* in. */
} eval;
struct {
- const void *codePtr;/* Byte code currently executed */
- const char *pc; /* and instruction pointer. */
+ const void *codePtr;/* Byte code currently executed... */
+ const char *pc; /* ... and instruction pointer. */
} tebc;
} data;
union {
struct {
- const char *cmd; /* The executed command, if possible */
- int len; /* And its length */
+ const char *cmd; /* The executed command, if possible... */
+ int len; /* ... and its length. */
} str;
- Tcl_Obj *listPtr; /* Tcl_EvalObjEx, cmd list */
+ Tcl_Obj *listPtr; /* Tcl_EvalObjEx, cmd list. */
} cmd;
} CmdFrame;
typedef struct CFWord {
- CmdFrame *framePtr; /* CmdFrame to acess */
- int word; /* Index of the word in the command */
- int refCount; /* #times the word is on the stack */
+ CmdFrame *framePtr; /* CmdFrame to access. */
+ int word; /* Index of the word in the command. */
+ int refCount; /* Number of times the word is on the
+ * stack. */
} CFWord;
typedef struct ExtIndex {
- Tcl_Obj *obj; /* Reference to the word */
+ Tcl_Obj *obj; /* Reference to the word. */
int pc; /* Instruction pointer of a command in
* ExtCmdLoc.loc[.] */
int word; /* Index of word in
@@ -1167,9 +1168,10 @@ typedef struct ExtIndex {
} ExtIndex;
typedef struct CFWordBC {
- CmdFrame *framePtr; /* CmdFrame to acess */
- ExtIndex *eiPtr; /* Word info: PC and index */
- int refCount; /* #times the word is on the stack */
+ CmdFrame *framePtr; /* CmdFrame to access. */
+ ExtIndex *eiPtr; /* Word info: PC and index. */
+ int refCount; /* Number of times the word is on the
+ * stack. */
} CFWordBC;
/*
@@ -1190,15 +1192,15 @@ typedef struct CFWordBC {
* types, per the context of the byte code in execution.
*/
-#define TCL_LOCATION_EVAL (0) /* Location in a dynamic eval script */
+#define TCL_LOCATION_EVAL (0) /* Location in a dynamic eval script. */
#define TCL_LOCATION_EVAL_LIST (1) /* Location in a dynamic eval script,
- * list-path */
-#define TCL_LOCATION_BC (2) /* Location in byte code */
+ * list-path. */
+#define TCL_LOCATION_BC (2) /* Location in byte code. */
#define TCL_LOCATION_PREBC (3) /* Location in precompiled byte code, no
- * location */
-#define TCL_LOCATION_SOURCE (4) /* Location in a file */
-#define TCL_LOCATION_PROC (5) /* Location in a dynamic proc */
-#define TCL_LOCATION_LAST (6) /* Number of values in the enum */
+ * location. */
+#define TCL_LOCATION_SOURCE (4) /* Location in a file. */
+#define TCL_LOCATION_PROC (5) /* Location in a dynamic proc. */
+#define TCL_LOCATION_LAST (6) /* Number of values in the enum. */
/*
* Structure passed to describe procedure-like "procedures" that are not
@@ -1335,16 +1337,21 @@ typedef struct CorContext {
} CorContext;
typedef struct CoroutineData {
- struct Command *cmdPtr;
- struct ExecEnv *eePtr;
- struct ExecEnv *callerEEPtr;
+ struct Command *cmdPtr; /* The command handle for the coroutine. */
+ struct ExecEnv *eePtr; /* The special execution environment (stacks,
+ * etc.) for the coroutine. */
+ struct ExecEnv *callerEEPtr;/* The execution environment for the caller of
+ * the coroutine, which might be the
+ * interpreter global environment or another
+ * coroutine. */
CorContext caller;
CorContext running;
CorContext base;
int *stackLevel;
- int auxNumLevels; /* While the coroutine is running the numLevels of the
- * create/resume command is stored here; for suspended
- * coroutines it holds the nesting numLevels at yield*/
+ int auxNumLevels; /* While the coroutine is running the
+ * numLevels of the create/resume command is
+ * stored here; for suspended coroutines it
+ * holds the nesting numLevels at yield. */
} CoroutineData;
typedef struct ExecEnv {
@@ -1353,7 +1360,7 @@ typedef struct ExecEnv {
Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" objs. */
struct Tcl_Interp *interp;
struct TEOV_callback *callbackPtr;
- /* Top callback in TEOV's stack */
+ /* Top callback in TEOV's stack. */
struct CoroutineData *corPtr;
struct BottomData *bottomPtr;
int rewind;
@@ -1451,15 +1458,16 @@ typedef struct ByteCodeStats {
/*
* Structure used in implementation of those core ensembles which are
- * partially compiled.
+ * partially compiled. Used as an array of these, with a terminating field
+ * whose 'name' is NULL.
*/
typedef struct {
- const char *name; /* The name of the subcommand */
- Tcl_ObjCmdProc *proc; /* The implementation of the subcommand */
- CompileProc *compileProc; /* The compiler for the subcommand */
- Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */
- ClientData clientData; /* Any clientData to give the command */
+ const char *name; /* The name of the subcommand. */
+ Tcl_ObjCmdProc *proc; /* The implementation of the subcommand. */
+ CompileProc *compileProc; /* The compiler for the subcommand. */
+ Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command. */
+ ClientData clientData; /* Any clientData to give the command. */
} EnsembleImplMap;
/*
@@ -1552,7 +1560,7 @@ typedef struct Command {
* command. */
CommandTrace *tracePtr; /* First in list of all traces set for this
* command. */
- Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */
+ Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command. */
} Command;
/*
@@ -1638,10 +1646,10 @@ enum PkgPreferOptions {
*/
typedef struct AllocCache {
- struct Cache *nextPtr; /* Linked list of cache entries */
+ struct Cache *nextPtr; /* Linked list of cache entries. */
Tcl_ThreadId owner; /* Which thread's cache is this? */
- Tcl_Obj *firstObjPtr; /* List of free objects for thread */
- int numObjects; /* Number of objects for thread */
+ Tcl_Obj *firstObjPtr; /* List of free objects for thread. */
+ int numObjects; /* Number of objects for thread. */
} AllocCache;
/*
@@ -1726,10 +1734,11 @@ typedef struct Interp {
ActiveVarTrace *activeVarTracePtr;
/* First in list of active traces for interp,
* or NULL if no active traces. */
- int returnCode; /* [return -code] parameter */
- CallFrame *rootFramePtr; /* Global frame pointer for this interpreter */
+ int returnCode; /* [return -code] parameter. */
+ CallFrame *rootFramePtr; /* Global frame pointer for this
+ * interpreter. */
Namespace *lookupNsPtr; /* Namespace to use ONLY on the next
- * TCL_EVAL_INVOKE call to Tcl_EvalObjv */
+ * TCL_EVAL_INVOKE call to Tcl_EvalObjv. */
/*
* Information used by Tcl_AppendResult to keep track of partial results.
@@ -1809,7 +1818,7 @@ typedef struct Interp {
Tcl_Obj *objResultPtr; /* If the last command returned an object
* result, this points to it. Should not be
* accessed directly; see comment above. */
- Tcl_ThreadId threadId; /* ID of thread that owns the interpreter */
+ Tcl_ThreadId threadId; /* ID of thread that owns the interpreter. */
ActiveCommandTrace *activeCmdTracePtr;
/* First in list of active command traces for
@@ -1818,19 +1827,22 @@ typedef struct Interp {
/* First in list of active traces for interp,
* or NULL if no active traces. */
- int tracesForbiddingInline; /* Count of traces (in the list headed by
+ int tracesForbiddingInline; /* Count of traces (in the list headed by
* tracePtr) that forbid inline bytecode
- * compilation */
+ * compilation. */
+
+ /*
+ * Fields used to manage extensible return options (TIP 90).
+ */
- /* Fields used to manage extensible return options (TIP 90) */
Tcl_Obj *returnOpts; /* A dictionary holding the options to the
- * last [return] command */
+ * last [return] command. */
- Tcl_Obj *errorInfo; /* errorInfo value (now as a Tcl_Obj) */
- Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable */
- Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj) */
- Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable */
- int returnLevel; /* [return -level] parameter */
+ Tcl_Obj *errorInfo; /* errorInfo value (now as a Tcl_Obj). */
+ Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable. */
+ Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj). */
+ Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable. */
+ int returnLevel; /* [return -level] parameter. */
/*
* Resource limiting framework support (TIP#143).
@@ -1888,7 +1900,7 @@ typedef struct Interp {
} ensembleRewrite;
/*
- * TIP #219 ... Global info for the I/O system ...
+ * TIP #219: Global info for the I/O system.
*/
Tcl_Obj *chanMsg; /* Error message set by channel drivers, for
@@ -1910,7 +1922,10 @@ typedef struct Interp {
* over the default error messages returned by
* a script cancellation operation. */
- /* TIP #280 */
+ /*
+ * Source code origin information (TIP #280).
+ */
+
CmdFrame *cmdFramePtr; /* Points to the command frame containing the
* location information for the current
* command. */
@@ -1954,13 +1969,13 @@ typedef struct Interp {
int packagePrefer; /* Current package selection mode. */
/*
- * Hashtables for variable traces and searches
+ * Hashtables for variable traces and searches.
*/
Tcl_HashTable varTraces; /* Hashtable holding the start of a variable's
* active trace list; varPtr is the key. */
Tcl_HashTable varSearches; /* Hashtable holding the start of a variable's
- * active searches list; varPtr is the key */
+ * active searches list; varPtr is the key. */
/*
* The thread-specific data ekeko: cache pointers or values that
* (a) do not change during the thread's lifetime
@@ -2135,9 +2150,10 @@ struct LimitHandler {
/* The handler callback. */
ClientData clientData; /* Opaque argument to the handler callback. */
Tcl_LimitHandlerDeleteProc *deleteProc;
- /* How to delete the clientData */
- LimitHandler *prevPtr; /* Previous item in linked list of handlers */
- LimitHandler *nextPtr; /* Next item in linked list of handlers */
+ /* How to delete the clientData. */
+ LimitHandler *prevPtr; /* Previous item in linked list of
+ * handlers. */
+ LimitHandler *nextPtr; /* Next item in linked list of handlers. */
};
/*
@@ -2163,7 +2179,7 @@ struct LimitHandler {
/*
* This macro is used to properly align the memory allocated by Tcl, giving
- * the same alignment as the native malloc
+ * the same alignment as the native malloc.
*/
#if defined(__APPLE__)
@@ -2203,7 +2219,7 @@ typedef enum {
/*
* The following enum values are used to indicate the translation of a Tcl
* channel. Declared here so that each platform can define
- * TCL_PLATFORM_TRANSLATION to the native translation on that platform
+ * TCL_PLATFORM_TRANSLATION to the native translation on that platform.
*/
typedef enum TclEolTranslation {
@@ -2450,19 +2466,21 @@ typedef struct ProcessGlobalValue {
*/
#define TCL_PARSE_DECIMAL_ONLY 1
- /* Leading zero doesn't denote octal or hex */
+ /* Leading zero doesn't denote octal or
+ * hex. */
#define TCL_PARSE_OCTAL_ONLY 2
- /* Parse octal even without prefix */
+ /* Parse octal even without prefix. */
#define TCL_PARSE_HEXADECIMAL_ONLY 4
- /* Parse hexadecimal even without prefix */
+ /* Parse hexadecimal even without prefix. */
#define TCL_PARSE_INTEGER_ONLY 8
- /* Disable floating point parsing */
+ /* Disable floating point parsing. */
#define TCL_PARSE_SCAN_PREFIXES 16
- /* Use [scan] rules dealing with 0? prefixes */
+ /* Use [scan] rules dealing with 0?
+ * prefixes. */
#define TCL_PARSE_NO_WHITESPACE 32
- /* Reject leading/trailing whitespace */
+ /* Reject leading/trailing whitespace. */
#define TCL_PARSE_BINARY_ONLY 64
- /* Parse binary even without prefix */
+ /* Parse binary even without prefix. */
/*
*----------------------------------------------------------------------
@@ -2609,7 +2627,7 @@ MODULE_SCOPE void TclCleanupLiteralTable(Tcl_Interp *interp,
LiteralTable *tablePtr);
MODULE_SCOPE int TclDoubleDigits(char *buf, double value, int *signum);
MODULE_SCOPE void TclDeleteNamespaceVars(Namespace *nsPtr);
-/* TIP #280 - Modified token based evulation, with line information */
+/* TIP #280 - Modified token based evulation, with line information. */
MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script,
int numBytes, int flags, int line);
MODULE_SCOPE int TclFileAttrsCmd(Tcl_Interp *interp,
@@ -3502,7 +3520,7 @@ typedef const char* TclDTraceStr;
* Invalidate the string rep first so we can use the bytes value for our
* pointer chain, and signal an obj deletion (as opposed to shimmering) with
* 'length == -1'.
- * Use empty 'if ; else' to handle use in unbraced outer if/else conditions
+ * Use empty 'if ; else' to handle use in unbraced outer if/else conditions.
*/
# define TclDecrRefCount(objPtr) \
@@ -3527,7 +3545,7 @@ typedef const char* TclDTraceStr;
* The PURIFY mode is like the regular mode, but instead of doing block
* Tcl_Obj allocation and keeping a freed list for efficiency, it always
* allocates and frees a single Tcl_Obj so that tools like Purify can better
- * track memory leaks
+ * track memory leaks.
*/
# define TclAllocObjStorageEx(interp, objPtr) \
@@ -4008,7 +4026,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum,
/*
*----------------------------------------------------------------
- * Inline version of Tcl_GetCurrentNamespace and Tcl_GetGlobalNamespace
+ * Inline version of Tcl_GetCurrentNamespace and Tcl_GetGlobalNamespace.
*/
#define TclGetCurrentNamespace(interp) \
@@ -4052,11 +4070,11 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum,
? 1 : 0)))
/*
- * Compile-time assertions: these produce a compile time error if
- * the expression is not known to be true at compile time.
- * If the assertion is known to be false, the compiler (or optimizer?) will
- * error out with "division by zero". If the assertion cannot be evaluated at
- * compile time, the compiler will error out with "non-static initializer".
+ * Compile-time assertions: these produce a compile time error if the
+ * expression is not known to be true at compile time. If the assertion is
+ * known to be false, the compiler (or optimizer?) will error out with
+ * "division by zero". If the assertion cannot be evaluated at compile time,
+ * the compiler will error out with "non-static initializer".
*
* Adapted with permission from
* http://www.pixelbeat.org/programming/gcc/static_assert.html
@@ -4139,24 +4157,17 @@ typedef struct TEOV_callback {
#define TOP_CB(iPtr) (((Interp *)(iPtr))->execEnvPtr->callbackPtr)
/*
- * Inline version of Tcl_NRAddCallback
+ * Inline version of Tcl_NRAddCallback.
*/
-#define TclNRAddCallback( \
- interp, \
- postProcPtr, \
- data0, \
- data1, \
- data2, \
- data3) \
- { \
+#define TclNRAddCallback(interp,postProcPtr,data0,data1,data2,data3) { \
TEOV_callback *callbackPtr; \
TCLNR_ALLOC((interp), (callbackPtr)); \
callbackPtr->procPtr = (postProcPtr); \
- callbackPtr->data[0] = (ClientData)(data0);\
- callbackPtr->data[1] = (ClientData)(data1);\
- callbackPtr->data[2] = (ClientData)(data2);\
- callbackPtr->data[3] = (ClientData)(data3);\
+ callbackPtr->data[0] = (ClientData)(data0); \
+ callbackPtr->data[1] = (ClientData)(data1); \
+ callbackPtr->data[2] = (ClientData)(data2); \
+ callbackPtr->data[3] = (ClientData)(data3); \
callbackPtr->nextPtr = TOP_CB(interp); \
TOP_CB(interp) = callbackPtr; \
}