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

📄 tcl7.6.h

📁 一个用在mips体系结构中的操作系统
💻 H
📖 第 1 页 / 共 3 页
字号:
 * 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_APPEND_VALUE	2#define TCL_LIST_ELEMENT	4#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/* * 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 *//* * Macro to free result of interpreter. */#define Tcl_FreeResult(interp)					\    if ((interp)->freeProc != 0) {				\	if (((interp)->freeProc == TCL_DYNAMIC)			\	    || ((interp)->freeProc == (Tcl_FreeProc *) free)) {	\	    ckfree((interp)->result);				\	} else {						\	    (*(interp)->freeProc)((interp)->result);		\	}							\	(interp)->freeProc = 0;					\    }/* * 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 4typedef struct Tcl_HashTable {    Tcl_HashEntry **buckets;		/* Pointer to bucket array.  Each					 * element points to first entry in					 * bucket's hash chain, or NULL. */    Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];					/* Bucket array used for small tables					 * (to avoid mallocs and frees). */    int numBuckets;			/* Total number of buckets allocated					 * at **bucketPtr. */    int numEntries;			/* Total number of entries present					 * in table. */    int rebuildSize;			/* Enlarge table when numEntries gets					 * to be this large. */    int downShift;			/* Shift count used in hashing					 * function.  Designed to use high-					 * order bits of randomized keys. */    int mask;				/* Mask value used in hashing					 * function. */    int keyType;			/* Type of keys used in this table. 					 * It's either TCL_STRING_KEYS,					 * TCL_ONE_WORD_KEYS, or an integer					 * giving the number of ints that                                         * is the size of the key.					 */    Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,	    char *key));    Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,	    char *key, int *newPtr));} Tcl_HashTable;/* * Structure definition for information used to keep track of searches * through hash tables: */typedef struct Tcl_HashSearch {    Tcl_HashTable *tablePtr;		/* Table being searched. */    int nextIndex;			/* Index of next bucket to be					 * enumerated after present one. */    Tcl_HashEntry *nextEntryPtr;	/* Next entry to be enumerated in the					 * the current bucket. */} Tcl_HashSearch;/* * Acceptable key types for hash tables: */#define TCL_STRING_KEYS		0#define TCL_ONE_WORD_KEYS	1/* * Macros for clients to use to access fields of hash entries: */#define Tcl_GetHashValue(h) ((h)->clientData)#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))#define Tcl_GetHashKey(tablePtr, h) \    ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \						: (h)->key.string))/* * Macros to use for clients to use to invoke find and create procedures * for hash tables: */#define Tcl_FindHashEntry(tablePtr, key) \	(*((tablePtr)->findProc))(tablePtr, key)#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \	(*((tablePtr)->createProc))(tablePtr, key, newPtr)/* * Flag values to pass to Tcl_DoOneEvent to disable searches * for some kinds of events: */#define TCL_DONT_WAIT		(1<<1)#define TCL_WINDOW_EVENTS	(1<<2)#define TCL_FILE_EVENTS		(1<<3)#define TCL_TIMER_EVENTS	(1<<4)#define TCL_IDLE_EVENTS		(1<<5)	/* WAS 0x10 ???? */#define TCL_ALL_EVENTS		(~TCL_DONT_WAIT)/* * The following structure defines a generic event for the Tcl event * system.  These are the things that are queued in calls to Tcl_QueueEvent * and serviced later by Tcl_DoOneEvent.  There can be many different * kinds of events with different fields, corresponding to window events, * timer events, etc.  The structure for a particular event consists of * a Tcl_Event header followed by additional information specific to that * event. */struct Tcl_Event {    Tcl_EventProc *proc;	/* Procedure to call to service this event. */    struct Tcl_Event *nextPtr;	/* Next in list of pending events, or NULL. */};/* * Positions to pass to Tk_QueueEvent: */typedef enum {    TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK} Tcl_QueuePosition;/* * The following structure keeps is used to hold a time value, either as * an absolute time (the number of seconds from the epoch) or as an * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT. * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT. */typedef struct Tcl_Time {    long sec;			/* Seconds. */    long usec;			/* Microseconds. */} Tcl_Time;/* * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler * to indicate what sorts of events are of interest: */#define TCL_READABLE	(1<<1)#define TCL_WRITABLE	(1<<2)#define TCL_EXCEPTION	(1<<3)/* * Flag values to pass to Tcl_OpenCommandChannel to indicate the * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR, * are also used in Tcl_GetStdChannel. */#define TCL_STDIN		(1<<1)	#define TCL_STDOUT		(1<<2)#define TCL_STDERR		(1<<3)#define TCL_ENFORCE_MODE	(1<<4)/* * Typedefs for the various operations in a channel type: */typedef int	(Tcl_DriverBlockModeProc) _ANSI_ARGS_((ClientData instanceData,		    int mode));typedef int	(Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,		    Tcl_Interp *interp));typedef int	(Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,		    char *buf, int toRead, int *errorCodePtr));typedef int	(Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,	            char *buf, int toWrite, int *errorCodePtr));typedef int	(Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,		    long offset, int mode, int *errorCodePtr));typedef int	(Tcl_DriverSetOptionProc) _ANSI_ARGS_((		    ClientData instanceData, Tcl_Interp *interp,                    char *optionName, char *value));typedef int	(Tcl_DriverGetOptionProc) _ANSI_ARGS_((		    ClientData instanceData, char *optionName,                    Tcl_DString *dsPtr));typedef void	(Tcl_DriverWatchChannelProc) _ANSI_ARGS_((    		    ClientData instanceData, int mask));typedef int	(Tcl_DriverChannelReadyProc) _ANSI_ARGS_((    		    ClientData instanceData, int mask));typedef Tcl_File (Tcl_DriverGetFileProc) _ANSI_ARGS_((ClientData instanceData,		    int mask));/* * Enum for different end of line translation and recognition modes. */typedef enum Tcl_EolTranslation {    TCL_TRANSLATE_AUTO,			/* Eol == \r, \n and \r\n. */    TCL_TRANSLATE_CR,			/* Eol == \r. */    TCL_TRANSLATE_LF,			/* Eol == \n. */    TCL_TRANSLATE_CRLF			/* Eol == \r\n. */} Tcl_EolTranslation;/* * struct Tcl_ChannelType: * * One such structure exists for each type (kind) of channel. * It collects together in one place all the functions that are * part of the specific channel type. */typedef struct Tcl_ChannelType {    char *typeName;			/* The name of the channel type in Tcl                                         * commands. This storage is owned by                                         * channel type. */    Tcl_DriverBlockModeProc *blockModeProc;    					/* Set blocking mode for the                                         * raw channel. May be NULL. */    Tcl_DriverCloseProc *closeProc;	/* Procedure to call to close                                         * the channel. */    Tcl_DriverInputProc *inputProc;	/* Procedure to call for input                                         * on channel. */    Tcl_DriverOutputProc *outputProc;	/* Procedure to call for output                                         * on channel. */    Tcl_DriverSeekProc *seekProc;	/* Procedure to call to seek                                         * on the channel. May be NULL. */    Tcl_DriverSetOptionProc *setOptionProc;    					/* Set an option on a channel. */    Tcl_DriverGetOptionProc *getOptionProc;    					/* Get an option from a channel. */    Tcl_DriverWatchChannelProc *watchChannelProc;    					/* Set up the notifier to watch                                         * for events on this channel. */    Tcl_DriverChannelReadyProc *channelReadyProc;    					/* Check for events of interest on                                         * this channel. */    Tcl_DriverGetFileProc *getFileProc;	/* Get a Tcl_File from the channel                                         * or NULL if not supported. */} Tcl_ChannelType;/* * The following flags determine whether the blockModeProc above should * set the channel into blocking or nonblocking mode. They are passed * as arguments to the blockModeProc procedure in the above structure. */#define TCL_MODE_BLOCKING 0		/* Put channel into blocking mode. */#define TCL_MODE_NONBLOCKING 1		/* Put channel into nonblocking					 * mode. *//* * Types for file handles: */#define TCL_UNIX_FD	1#define TCL_MAC_FILE	2#define TCL_MAC_SOCKET	3#define TCL_WIN_PIPE	4#define TCL_WIN_FILE	5#define TCL_WIN_SOCKET	6#define TCL_WIN_CONSOLE 7#define TCL_WIN32S_PIPE	8/* * Enum for different types of file paths. */typedef enum Tcl_PathType {    TCL_PATH_ABSOLUTE,    TCL_PATH_RELATIVE,    TCL_PATH_VOLUME_RELATIVE} Tcl_PathType;/* * The following interface is exported for backwards compatibility, but * is only implemented on Unix.  Portable applications should use * Tcl_OpenCommandChannel, instead. */EXTERN int		Tcl_CreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,

⌨️ 快捷键说明

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