⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcl8.0.h

📁 一个用在mips体系结构中的操作系统
💻 H
📖 第 1 页 / 共 4 页
字号:
				 * of the old type. Returns TCL_ERROR on				 * failure. */} Tcl_ObjType;/* * One of the following structures exists for each object in the Tcl * system. An object stores a value as either a string, some internal * representation, or both. */typedef struct Tcl_Obj {    int refCount;		/* When 0 the object will be freed. */    char *bytes;		/* This points to the first byte of the				 * object's string representation. The array				 * must be followed by a null byte (i.e., at				 * offset length) but may also contain				 * embedded null characters. The array's				 * storage is allocated by ckalloc. NULL				 * means the string rep is invalid and must				 * be regenerated from the internal rep.				 * Clients should use Tcl_GetStringFromObj				 * to get a pointer to the byte array as a				 * readonly value. */    int length;			/* The number of bytes at *bytes, not				 * including the terminating null. */    Tcl_ObjType *typePtr;	/* Denotes the object's type. Always				 * corresponds to the type of the object's				 * internal rep. NULL indicates the object				 * has no internal rep (has no type). */    union {			/* The internal representation: */#ifdef  USE_LONGLONG_EXPR        Tcl_IntValueType longValue;#else	long longValue;		/*   - an long integer value */#endif	double doubleValue;	/*   - a double-precision floating value */	VOID *otherValuePtr;	/*   - another, type-specific value */	struct {		/*   - internal rep as two pointers */	    VOID *ptr1;	    VOID *ptr2;	} twoPtrValue;    } internalRep;} Tcl_Obj;/* * Macros to increment and decrement a Tcl_Obj's reference count, and to * test whether an object is shared (i.e. has reference count > 1). * Note: clients should use Tcl_DecrRefCount() when they are finished using * an object, and should never call TclFreeObj() directly. TclFreeObj() is * only defined and made public in tcl.h to support Tcl_DecrRefCount's macro * definition. Note also that Tcl_DecrRefCount() refers to the parameter * "obj" twice. This means that you should avoid calling it with an * expression that is expensive to compute or has side effects. */EXTERN void		Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));EXTERN void		Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));EXTERN int		Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));#ifdef TCL_MEM_DEBUG#   define Tcl_IncrRefCount(objPtr) \	Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)#   define Tcl_DecrRefCount(objPtr) \	Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)#   define Tcl_IsShared(objPtr) \	Tcl_DbIsShared(objPtr, __FILE__, __LINE__)#else#   define Tcl_IncrRefCount(objPtr) \	++(objPtr)->refCount#   define Tcl_DecrRefCount(objPtr) \	if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)#   define Tcl_IsShared(objPtr) \	((objPtr)->refCount > 1)#endif/* * Macros and definitions that help to debug the use of Tcl objects. * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are  * overridden to call debugging versions of the object creation procedures. */EXTERN Tcl_Obj *	Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));EXTERN Tcl_Obj *	Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));EXTERN Tcl_Obj *	Tcl_NewListObj _ANSI_ARGS_((int objc,			    Tcl_Obj *CONST objv[]));EXTERN Tcl_Obj *	Tcl_NewObj _ANSI_ARGS_((void));EXTERN Tcl_Obj *	Tcl_NewStringObj _ANSI_ARGS_((char *bytes,			    int length));#ifdef USE_LONGLONG_EXPREXTERN Tcl_Obj *	Tcl_NewIntObj _ANSI_ARGS_((Tcl_IntValueType intValue));EXTERN Tcl_Obj *	Tcl_NewLongObj _ANSI_ARGS_((Tcl_IntValueType longValue));#elseEXTERN Tcl_Obj *	Tcl_NewIntObj _ANSI_ARGS_((int intValue));EXTERN Tcl_Obj *	Tcl_NewLongObj _ANSI_ARGS_((long longValue));#endif#ifdef TCL_MEM_DEBUG#  define Tcl_NewBooleanObj(val) \     Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)#  define Tcl_NewDoubleObj(val) \     Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)#  define Tcl_NewIntObj(val) \     Tcl_DbNewLongObj(val, __FILE__, __LINE__)#  define Tcl_NewListObj(objc, objv) \     Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)#  define Tcl_NewLongObj(val) \     Tcl_DbNewLongObj(val, __FILE__, __LINE__)#  define Tcl_NewObj() \     Tcl_DbNewObj(__FILE__, __LINE__)#  define Tcl_NewStringObj(bytes, len) \     Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)#endif /* TCL_MEM_DEBUG *//* * The following definitions support Tcl's namespace facility. * Note: the first five fields must match exactly the fields in a * Namespace structure (see tcl.h).  */typedef struct Tcl_Namespace {    char *name;                 /* The namespace's name within its parent				 * namespace. This contains no ::'s. The				 * name of the global namespace is ""				 * although "::" is an synonym. */    char *fullName;             /* The namespace's fully qualified name.				 * This starts with ::. */    ClientData clientData;      /* Arbitrary value associated with this				 * namespace. */    Tcl_NamespaceDeleteProc* deleteProc;                                /* Procedure invoked when deleting the				 * namespace to, e.g., free clientData. */    struct Tcl_Namespace* parentPtr;                                /* Points to the namespace that contains				 * this one. NULL if this is the global				 * namespace. */} Tcl_Namespace;/* * The following structure represents a call frame, or activation record. * A call frame defines a naming context for a procedure call: its local * scope (for local variables) and its namespace scope (used for non-local * variables; often the global :: namespace). A call frame can also define * the naming context for a namespace eval or namespace inscope command: * the namespace in which the command's code should execute. The * Tcl_CallFrame structures exist only while procedures or namespace * eval/inscope's are being executed, and provide a Tcl call stack. *  * A call frame is initialized and pushed using Tcl_PushCallFrame and * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be * provided by the Tcl_PushCallFrame caller, and callers typically allocate * them on the C call stack for efficiency. For this reason, Tcl_CallFrame * is defined as a structure and not as an opaque token. However, most * Tcl_CallFrame fields are hidden since applications should not access * them directly; others are declared as "dummyX". * * WARNING!! The structure definition must be kept consistent with the * CallFrame structure in tclInt.h. If you change one, change the other. */typedef struct Tcl_CallFrame {    Tcl_Namespace *nsPtr;    int dummy1;    int dummy2;    char *dummy3;    char *dummy4;    char *dummy5;    int dummy6;    char *dummy7;    char *dummy8;    int dummy9;    char* dummy10;} Tcl_CallFrame;/* * Information about commands that is returned by Tcl_GetCommandInfo and * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based * command procedure while proc is a traditional Tcl argc/argv * string-based procedure. Tcl_CreateObjCommand and Tcl_CreateCommand * ensure that both objProc and proc are non-NULL and can be called to * execute the command. However, it may be faster to call one instead of * the other. The member isNativeObjectProc is set to 1 if an * object-based procedure was registered by Tcl_CreateObjCommand, and to * 0 if a string-based procedure was registered by Tcl_CreateCommand. * The other procedure is typically set to a compatibility wrapper that * does string-to-object or object-to-string argument conversions then * calls the other procedure. */     typedef struct Tcl_CmdInfo {    int isNativeObjectProc;	 /* 1 if objProc was registered by a call to				  * Tcl_CreateObjCommand; 0 otherwise.				  * Tcl_SetCmdInfo does not modify this				  * field. */    Tcl_ObjCmdProc *objProc;	 /* Command's object-based procedure. */    ClientData objClientData;	 /* ClientData for object proc. */    Tcl_CmdProc *proc;		 /* Command's string-based procedure. */    ClientData clientData;	 /* ClientData for string proc. */    Tcl_CmdDeleteProc *deleteProc;                                 /* Procedure to call when command is                                  * deleted. */    ClientData deleteData;	 /* Value to pass to deleteProc (usually				  * the same as clientData). */    Tcl_Namespace *namespacePtr; /* Points to the namespace that contains				  * this command. Note that Tcl_SetCmdInfo				  * will not change a command's namespace;				  * use Tcl_RenameCommand to do that. */} Tcl_CmdInfo;/* * The structure defined below is used to hold dynamic strings.  The only * field that clients should use is the string field, and they should * never modify it. */#define TCL_DSTRING_STATIC_SIZE 200typedef struct Tcl_DString {    char *string;		/* Points to beginning of string:  either				 * staticSpace below or a malloced array. */    int length;			/* Number of non-NULL characters in the				 * string. */    int spaceAvl;		/* Total number of bytes available for the				 * string and its terminating NULL char. */    char staticSpace[TCL_DSTRING_STATIC_SIZE];				/* Space to use in common case where string				 * is small. */} Tcl_DString;#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)#define Tcl_DStringTrunc Tcl_DStringSetLength/* * Definitions for the maximum number of digits of precision that may * be specified in the "tcl_precision" variable, and the number of * characters of buffer space required by Tcl_PrintDouble. */ #define TCL_MAX_PREC 17#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)/* * Flag that may be passed to Tcl_ConvertElement to force it not to * output braces (careful!  if you change this flag be sure to change * the definitions at the front of tclUtil.c). */#define TCL_DONT_USE_BRACES	1/* * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow * abbreviated strings. */#define TCL_EXACT	1/* * Flag values passed to Tcl_RecordAndEval. * WARNING: these bit choices must not conflict with the bit choices * for evalFlag bits in tclInt.h!! */#define TCL_NO_EVAL		0x10000#define TCL_EVAL_GLOBAL		0x20000/* * Special freeProc values that may be passed to Tcl_SetResult (see * the man page for details): */#define TCL_VOLATILE	((Tcl_FreeProc *) 1)#define TCL_STATIC	((Tcl_FreeProc *) 0)#define TCL_DYNAMIC	((Tcl_FreeProc *) 3)/* * Flag values passed to variable-related procedures. */#define TCL_GLOBAL_ONLY		 1#define TCL_NAMESPACE_ONLY	 2#define TCL_APPEND_VALUE	 4#define TCL_LIST_ELEMENT	 8#define TCL_TRACE_READS		 0x10#define TCL_TRACE_WRITES	 0x20#define TCL_TRACE_UNSETS	 0x40#define TCL_TRACE_DESTROYED	 0x80#define TCL_INTERP_DESTROYED	 0x100#define TCL_LEAVE_ERR_MSG	 0x200#define TCL_PARSE_PART1		 0x400/* * Types for linked variables: */#define TCL_LINK_INT		1#define TCL_LINK_DOUBLE		2#define TCL_LINK_BOOLEAN	3#define TCL_LINK_STRING		4#define TCL_LINK_READ_ONLY	0x80/* * The following declarations either map ckalloc and ckfree to * malloc and free, or they map them to procedures with all sorts * of debugging hooks defined in tclCkalloc.c. */EXTERN char *		Tcl_Alloc _ANSI_ARGS_((unsigned int size));EXTERN void		Tcl_Free _ANSI_ARGS_((char *ptr));EXTERN char *		Tcl_Realloc _ANSI_ARGS_((char *ptr,			    unsigned int size));#ifdef TCL_MEM_DEBUG#  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)#  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)#  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)#  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)#  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)#  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)EXTERN int		Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));EXTERN void		Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,			    int line));#else#  if USE_TCLALLOC#     define ckalloc(x) Tcl_Alloc(x)#     define ckfree(x) Tcl_Free(x)#     define ckrealloc(x,y) Tcl_Realloc(x,y)#  else#     define ckalloc(x) malloc(x)#     define ckfree(x)  free(x)#     define ckrealloc(x,y) realloc(x,y)#  endif#  define Tcl_DumpActiveMemory(x)#  define Tcl_ValidateAllMemory(x,y)#endif /* TCL_MEM_DEBUG *//* * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers * to prevent errors when the forward reference to Tcl_HashTable is * encountered in the Tcl_HashEntry structure. */#ifdef __cplusplusstruct Tcl_HashTable;#endif/* * Structure definition for an entry in a hash table.  No-one outside * Tcl should access any of these fields directly;  use the macros * defined below. */typedef struct Tcl_HashEntry {    struct Tcl_HashEntry *nextPtr;	/* Pointer to next entry in this					 * hash bucket, or NULL for end of					 * chain. */    struct Tcl_HashTable *tablePtr;	/* Pointer to table containing entry. */    struct Tcl_HashEntry **bucketPtr;	/* Pointer to bucket that points to					 * first entry in this entry's chain:					 * used for deleting the entry. */    ClientData clientData;		/* Application stores something here					 * with Tcl_SetHashValue. */    union {				/* Key has one of these forms: */	char *oneWordValue;		/* One-word value for key. */	int words[1];			/* Multiple integer words for key.					 * The actual size will be as large					 * as necessary for this table's					 * keys. */	char string[4];			/* String for key.  The actual size					 * will be as large as needed to hold					 * the key. */    } key;				/* MUST BE LAST FIELD IN RECORD!! */} Tcl_HashEntry;/* * Structure definition for a hash table.  Must be in tcl.h so clients * can allocate space for these structures, but clients should never * access any fields in this structure. */#define TCL_SMALL_HASH_TABLE 4

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -