From 20bd9d9cabc9db212abbaf9d4dbb18eb490e9f71 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 17 Jul 2019 15:38:17 +0000 Subject: Eliminate "register" keyword _everywhere_ in Tcl. This keyword is deprecated in C++ (removed in C++17, even), and essentially does nothing with most modern compilers. --- compat/mkstemp.c | 2 +- compat/opendir.c | 10 +-- compat/strstr.c | 4 +- compat/strtol.c | 2 +- compat/strtoul.c | 6 +- compat/waitpid.c | 2 +- generic/regcomp.c | 2 +- generic/regcustom.h | 4 +- generic/regguts.h | 2 +- generic/tclAlloc.c | 18 ++--- generic/tclAssembly.c | 2 +- generic/tclBasic.c | 44 +++++------ generic/tclBinary.c | 8 +- generic/tclCmdAH.c | 10 +-- generic/tclCmdIL.c | 28 +++---- generic/tclCmdMZ.c | 14 ++-- generic/tclCompCmds.c | 30 ++++---- generic/tclCompCmdsSZ.c | 8 +- generic/tclCompile.c | 60 +++++++-------- generic/tclCompile.h | 4 +- generic/tclDate.c | 10 +-- generic/tclDisassemble.c | 6 +- generic/tclEnsemble.c | 6 +- generic/tclExecute.c | 34 ++++----- generic/tclFileName.c | 6 +- generic/tclGetDate.y | 10 +-- generic/tclHash.c | 42 +++++------ generic/tclHistory.c | 4 +- generic/tclIO.c | 6 +- generic/tclIORChan.c | 2 +- generic/tclIORTrans.c | 2 +- generic/tclIndexObj.c | 14 ++-- generic/tclInt.h | 5 +- generic/tclInterp.c | 8 +- generic/tclListObj.c | 22 +++--- generic/tclLiteral.c | 44 +++++------ generic/tclNamesp.c | 70 +++++++++--------- generic/tclOO.c | 12 +-- generic/tclOOBasic.c | 4 +- generic/tclOOCall.c | 10 +-- generic/tclOODefineCmds.c | 2 +- generic/tclOOInt.h | 2 +- generic/tclOOMethod.c | 24 +++--- generic/tclObj.c | 182 +++++++++++++++++++++++----------------------- generic/tclParse.c | 44 +++++------ generic/tclPathObj.c | 2 +- generic/tclPipe.c | 4 +- generic/tclProc.c | 48 ++++++------ generic/tclResult.c | 26 +++---- generic/tclTest.c | 12 +-- generic/tclTestObj.c | 4 +- generic/tclThreadAlloc.c | 22 +++--- generic/tclTimer.c | 10 +-- generic/tclTrace.c | 36 ++++----- generic/tclUtf.c | 20 ++--- generic/tclUtil.c | 16 ++-- generic/tclVar.c | 54 +++++++------- macosx/tclMacOSXFCmd.c | 2 +- unix/tclLoadAix.c | 20 ++--- unix/tclUnixCompat.c | 4 +- unix/tclUnixInit.c | 2 +- unix/tclUnixThrd.c | 2 +- win/tclWinInit.c | 2 +- 63 files changed, 559 insertions(+), 558 deletions(-) diff --git a/compat/mkstemp.c b/compat/mkstemp.c index 1a44dfa..6807414 100644 --- a/compat/mkstemp.c +++ b/compat/mkstemp.c @@ -36,7 +36,7 @@ mkstemp( { static const char alphanumerics[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - register char *a, *b; + char *a, *b; int fd, count, alphanumericsLen = strlen(alphanumerics); /* == 62 */ a = template + strlen(template); diff --git a/compat/opendir.c b/compat/opendir.c index 7a49566..ea6831b 100644 --- a/compat/opendir.c +++ b/compat/opendir.c @@ -20,8 +20,8 @@ DIR * opendir( char *name) { - register DIR *dirp; - register int fd; + DIR *dirp; + int fd; char *myname; myname = ((*name == '\0') ? "." : name); @@ -65,9 +65,9 @@ struct olddirect { struct dirent * readdir( - register DIR *dirp) + DIR *dirp) { - register struct olddirect *dp; + struct olddirect *dp; static struct dirent dir; for (;;) { @@ -101,7 +101,7 @@ readdir( void closedir( - register DIR *dirp) + DIR *dirp) { close(dirp->dd_fd); dirp->dd_fd = -1; diff --git a/compat/strstr.c b/compat/strstr.c index e3b9b8d..7f7438e 100644 --- a/compat/strstr.c +++ b/compat/strstr.c @@ -36,10 +36,10 @@ char * strstr( - register char *string, /* String to search. */ + char *string, /* String to search. */ char *substring) /* Substring to try to find in string. */ { - register char *a, *b; + char *a, *b; /* * First scan quickly through the two strings looking for a diff --git a/compat/strtol.c b/compat/strtol.c index b7f6919..22cc1eb 100644 --- a/compat/strtol.c +++ b/compat/strtol.c @@ -45,7 +45,7 @@ strtol( * hex, "0" means octal, anything else means * decimal. */ { - register const char *p; + const char *p; long result; /* diff --git a/compat/strtoul.c b/compat/strtoul.c index e37eb05..bf16f7a 100644 --- a/compat/strtoul.c +++ b/compat/strtoul.c @@ -62,9 +62,9 @@ strtoul( * hex, "0" means octal, anything else means * decimal. */ { - register const char *p; - register unsigned long int result = 0; - register unsigned digit; + const char *p; + unsigned long int result = 0; + unsigned digit; int anyDigits = 0; int negative=0; int overflow=0; diff --git a/compat/waitpid.c b/compat/waitpid.c index d4473a8..626d210 100644 --- a/compat/waitpid.c +++ b/compat/waitpid.c @@ -70,7 +70,7 @@ waitpid( int options) /* OR'ed combination of WNOHANG and * WUNTRACED. */ { - register WaitInfo *waitPtr, *prevPtr; + WaitInfo *waitPtr, *prevPtr; pid_t result; WAIT_STATUS_TYPE status; diff --git a/generic/regcomp.c b/generic/regcomp.c index 49b024f..093cb95 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -512,7 +512,7 @@ freev( struct vars *v, int err) { - register int ret; + int ret; if (v->re != NULL) { rfree(v->re); diff --git a/generic/regcustom.h b/generic/regcustom.h index 095385d..4396399 100644 --- a/generic/regcustom.h +++ b/generic/regcustom.h @@ -131,7 +131,7 @@ typedef int celt; /* Type to hold chr, or NOCELT */ #if 1 #define AllocVars(vPtr) \ static Tcl_ThreadDataKey varsKey; \ - register struct vars *vPtr = (struct vars *) \ + struct vars *vPtr = (struct vars *) \ Tcl_GetThreadData(&varsKey, sizeof(struct vars)) #else /* @@ -140,7 +140,7 @@ typedef int celt; /* Type to hold chr, or NOCELT */ * faster in practice (measured!) */ #define AllocVars(vPtr) \ - register struct vars *vPtr = (struct vars *) MALLOC(sizeof(struct vars)) + struct vars *vPtr = (struct vars *) MALLOC(sizeof(struct vars)) #define FreeVars(vPtr) \ FREE(vPtr) #endif diff --git a/generic/regguts.h b/generic/regguts.h index b3dbaa4..da38ef2 100644 --- a/generic/regguts.h +++ b/generic/regguts.h @@ -411,7 +411,7 @@ struct guts { #ifndef AllocVars #define AllocVars(vPtr) \ struct vars var; \ - register struct vars *vPtr = &var + struct vars *vPtr = &var #endif #ifndef FreeVars #define FreeVars(vPtr) ((void) 0) diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index bad3d8a..669c186 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -253,9 +253,9 @@ char * TclpAlloc( unsigned int numBytes) /* Number of bytes to allocate. */ { - register union overhead *overPtr; - register size_t bucket; - register unsigned amount; + union overhead *overPtr; + size_t bucket; + unsigned amount; struct block *bigBlockPtr = NULL; if (!allocInit) { @@ -387,8 +387,8 @@ static void MoreCore( size_t bucket) /* What bucket to allocate to. */ { - register union overhead *overPtr; - register size_t size; /* size of desired block */ + union overhead *overPtr; + size_t size; /* size of desired block */ size_t amount; /* amount to allocate */ size_t numBlocks; /* how many blocks we get */ struct block *blockPtr; @@ -448,8 +448,8 @@ void TclpFree( char *oldPtr) /* Pointer to memory to free. */ { - register size_t size; - register union overhead *overPtr; + size_t size; + union overhead *overPtr; struct block *bigBlockPtr; if (oldPtr == NULL) { @@ -645,8 +645,8 @@ void mstats( char *s) /* Where to write info. */ { - register unsigned int i, j; - register union overhead *overPtr; + unsigned int i, j; + union overhead *overPtr; size_t totalFree = 0, totalUsed = 0; Tcl_MutexLock(allocMutexPtr); diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index e8ca9ca..8e2edcf 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -853,7 +853,7 @@ CompileAssembleObj( Interp *iPtr = (Interp *) interp; /* Internals of the interpreter */ CompileEnv compEnv; /* Compilation environment structure */ - register ByteCode *codePtr = NULL; + ByteCode *codePtr = NULL; /* Bytecode resulting from the assembly */ Namespace* namespacePtr; /* Namespace in which variable and command * names in the bytecode resolve */ diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 78b9f0c..0f11f04 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -1305,8 +1305,8 @@ int TclHideUnsafeCommands( Tcl_Interp *interp) /* Hide commands in this interpreter. */ { - register const CmdInfo *cmdInfoPtr; - register const UnsafeEnsembleInfo *unsafePtr; + const CmdInfo *cmdInfoPtr; + const UnsafeEnsembleInfo *unsafePtr; if (interp == NULL) { return TCL_ERROR; @@ -2832,7 +2832,7 @@ int TclInvokeStringCommand( ClientData clientData, /* Points to command's Command structure. */ Tcl_Interp *interp, /* Current interpreter. */ - register int objc, /* Number of arguments. */ + int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Command *cmdPtr = clientData; @@ -2881,7 +2881,7 @@ TclInvokeObjectCommand( ClientData clientData, /* Points to command's Command structure. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - register const char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { Command *cmdPtr = clientData; Tcl_Obj *objPtr; @@ -3372,7 +3372,7 @@ Tcl_GetCommandFullName( { Interp *iPtr = (Interp *) interp; - register Command *cmdPtr = (Command *) command; + Command *cmdPtr = (Command *) command; char *name; /* @@ -3656,7 +3656,7 @@ CallCommandTraces( * trigger, either TCL_TRACE_DELETE or * TCL_TRACE_RENAME. */ { - register CommandTrace *tracePtr; + CommandTrace *tracePtr; ActiveCommandTrace active; char *result; Tcl_Obj *oldNamePtr = NULL; @@ -3846,7 +3846,7 @@ CancelEvalProc( void TclCleanupCommand( - register Command *cmdPtr) /* Points to the Command structure to + Command *cmdPtr) /* Points to the Command structure to * be freed. */ { if (cmdPtr->refCount-- <= 1) { @@ -4237,7 +4237,7 @@ int TclInterpReady( Tcl_Interp *interp) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; /* * Reset both the interpreter's string and object results and clear out @@ -4309,7 +4309,7 @@ TclResetCancellation( Tcl_Interp *interp, int force) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; if (iPtr == NULL) { return TCL_ERROR; @@ -4351,7 +4351,7 @@ Tcl_Canceled( Tcl_Interp *interp, int flags) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; /* * Has the current script in progress for this interpreter been canceled @@ -5872,7 +5872,7 @@ TclAdvanceLines( const char *start, const char *end) { - register const char *p; + const char *p; for (p = start; p < end; p++) { if (*p == '\n') { @@ -6398,7 +6398,7 @@ int Tcl_EvalObjEx( Tcl_Interp *interp, /* Token for command interpreter (returned by * a previous call to Tcl_CreateInterp). */ - register Tcl_Obj *objPtr, /* Pointer to object containing commands to + Tcl_Obj *objPtr, /* Pointer to object containing commands to * execute. */ int flags) /* Collection of OR-ed bits that control the * evaluation of the script. Supported values @@ -6411,7 +6411,7 @@ int TclEvalObjEx( Tcl_Interp *interp, /* Token for command interpreter (returned by * a previous call to Tcl_CreateInterp). */ - register Tcl_Obj *objPtr, /* Pointer to object containing commands to + Tcl_Obj *objPtr, /* Pointer to object containing commands to * execute. */ int flags, /* Collection of OR-ed bits that control the * evaluation of the script. Supported values @@ -6430,7 +6430,7 @@ int TclNREvalObjEx( Tcl_Interp *interp, /* Token for command interpreter (returned by * a previous call to Tcl_CreateInterp). */ - register Tcl_Obj *objPtr, /* Pointer to object containing commands to + Tcl_Obj *objPtr, /* Pointer to object containing commands to * execute. */ int flags, /* Collection of OR-ed bits that control the * evaluation of the script. Supported values @@ -6738,7 +6738,7 @@ Tcl_ExprLong( const char *exprstring, /* Expression to evaluate. */ long *ptr) /* Where to store result. */ { - register Tcl_Obj *exprPtr; + Tcl_Obj *exprPtr; int result = TCL_OK; if (*exprstring == '\0') { /* @@ -6765,7 +6765,7 @@ Tcl_ExprDouble( const char *exprstring, /* Expression to evaluate. */ double *ptr) /* Where to store result. */ { - register Tcl_Obj *exprPtr; + Tcl_Obj *exprPtr; int result = TCL_OK; if (*exprstring == '\0') { @@ -6845,7 +6845,7 @@ int Tcl_ExprLongObj( Tcl_Interp *interp, /* Context in which to evaluate the * expression. */ - register Tcl_Obj *objPtr, /* Expression to evaluate. */ + Tcl_Obj *objPtr, /* Expression to evaluate. */ long *ptr) /* Where to store long result. */ { Tcl_Obj *resultPtr; @@ -6892,7 +6892,7 @@ int Tcl_ExprDoubleObj( Tcl_Interp *interp, /* Context in which to evaluate the * expression. */ - register Tcl_Obj *objPtr, /* Expression to evaluate. */ + Tcl_Obj *objPtr, /* Expression to evaluate. */ double *ptr) /* Where to store double result. */ { Tcl_Obj *resultPtr; @@ -6928,7 +6928,7 @@ int Tcl_ExprBooleanObj( Tcl_Interp *interp, /* Context in which to evaluate the * expression. */ - register Tcl_Obj *objPtr, /* Expression to evaluate. */ + Tcl_Obj *objPtr, /* Expression to evaluate. */ int *ptr) /* Where to store 0/1 result. */ { Tcl_Obj *resultPtr; @@ -7040,7 +7040,7 @@ TclNRInvoke( int objc, Tcl_Obj *const objv[]) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; Tcl_HashTable *hTblPtr; /* Table of hidden commands. */ const char *cmdName; /* Name of the command from objv[0]. */ Tcl_HashEntry *hPtr = NULL; @@ -7235,7 +7235,7 @@ Tcl_AddObjErrorInfo( int length) /* The number of bytes in the message. If < 0, * then append all bytes up to a NULL byte. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; /* * If we are just starting to log an error, errorInfo is initialized from @@ -7385,7 +7385,7 @@ Tcl_GlobalEval( * command. */ const char *command) /* Command to evaluate. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; int result; CallFrame *savedVarFramePtr; diff --git a/generic/tclBinary.c b/generic/tclBinary.c index d8b9ae9..027c157 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -2288,8 +2288,8 @@ ScanNumber( if (*numberCachePtrPtr == NULL) { return Tcl_NewWideIntObj(value); } else { - register Tcl_HashTable *tablePtr = *numberCachePtrPtr; - register Tcl_HashEntry *hPtr; + Tcl_HashTable *tablePtr = *numberCachePtrPtr; + Tcl_HashEntry *hPtr; int isNew; hPtr = Tcl_CreateHashEntry(tablePtr, INT2PTR(value), &isNew); @@ -2297,7 +2297,7 @@ ScanNumber( return Tcl_GetHashValue(hPtr); } if (tablePtr->numEntries <= BINARY_SCAN_MAX_CACHE) { - register Tcl_Obj *objPtr = Tcl_NewWideIntObj(value); + Tcl_Obj *objPtr = Tcl_NewWideIntObj(value); Tcl_IncrRefCount(objPtr); Tcl_SetHashValue(hPtr, objPtr); @@ -2416,7 +2416,7 @@ DeleteScanNumberCache( hEntry = Tcl_FirstHashEntry(numberCachePtr, &search); while (hEntry != NULL) { - register Tcl_Obj *value = Tcl_GetHashValue(hEntry); + Tcl_Obj *value = Tcl_GetHashValue(hEntry); if (value != NULL) { Tcl_DecrRefCount(value); diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index dff23a8..deec6ba 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -169,7 +169,7 @@ Tcl_CaseObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register int i; + int i; int body, result, caseObjc; const char *stringPtr, *arg; Tcl_Obj *const *caseObjv; @@ -872,7 +872,7 @@ TclNREvalObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; Interp *iPtr = (Interp *) interp; CmdFrame *invoker = NULL; int word = 0; @@ -2254,7 +2254,7 @@ StoreStatData( * store in varName. */ { Tcl_Obj *field, *value; - register unsigned short mode; + unsigned short mode; /* * Assume Tcl_ObjSetVar2() does not keep a copy of the field name! @@ -2631,7 +2631,7 @@ EachloopCmd( Tcl_Obj *const objv[]) { int numLists = (objc-2) / 2; - register struct ForeachState *statePtr; + struct ForeachState *statePtr; int i, j, result; if (objc < 4 || (objc%2 != 0)) { @@ -2756,7 +2756,7 @@ ForeachLoopStep( Tcl_Interp *interp, int result) { - register struct ForeachState *statePtr = data[0]; + struct ForeachState *statePtr = data[0]; /* * Process the result code from this run of the [foreach] body. Note that diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index cbb40c6..9d4bbf3 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -475,7 +475,7 @@ InfoArgsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; const char *name; Proc *procPtr; CompiledLocal *localPtr; @@ -538,7 +538,7 @@ InfoBodyCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; const char *name, *bytes; Proc *procPtr; int numBytes; @@ -643,7 +643,7 @@ InfoCommandsCmd( { const char *cmdName, *pattern; const char *simplePattern; - register Tcl_HashEntry *entryPtr; + Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Namespace *nsPtr; Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp); @@ -1843,7 +1843,7 @@ InfoProcsCmd( Namespace *currNsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp); Tcl_Obj *listPtr, *elemObjPtr; int specificNsInPattern = 0;/* Init. to avoid compiler warning. */ - register Tcl_HashEntry *entryPtr; + Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Command *cmdPtr, *realCmdPtr; @@ -2415,7 +2415,7 @@ int Tcl_LinsertObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ - register int objc, /* Number of arguments. */ + int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listPtr; @@ -2497,8 +2497,8 @@ int Tcl_ListObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ - register int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* The argument objects. */ { /* @@ -2534,7 +2534,7 @@ Tcl_LlengthObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, result; @@ -2580,7 +2580,7 @@ Tcl_LpopObjCmd( ClientData notUsed, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, result; @@ -2673,7 +2673,7 @@ Tcl_LrangeObjCmd( ClientData notUsed, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, first, last, result; @@ -2859,8 +2859,8 @@ int Tcl_LrepeatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ - register int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* The argument objects. */ { int elementCount, i, totalElems; @@ -2925,7 +2925,7 @@ Tcl_LrepeatObjCmd( CLANG_ASSERT(dataArray || totalElems == 0 ); if (objc == 1) { - register Tcl_Obj *tmpPtr = objv[0]; + Tcl_Obj *tmpPtr = objv[0]; tmpPtr->refCount += elementCount; for (i=0 ; inumLists; dupPtr = ckalloc(sizeof(ForeachInfo) @@ -2961,10 +2961,10 @@ FreeForeachInfo( ClientData clientData) /* The foreach command's compilation auxiliary * data to free. */ { - register ForeachInfo *infoPtr = clientData; - register ForeachVarList *listPtr; + ForeachInfo *infoPtr = clientData; + ForeachVarList *listPtr; int numLists = infoPtr->numLists; - register int i; + int i; for (i = 0; i < numLists; i++) { listPtr = infoPtr->varLists[i]; @@ -2997,8 +2997,8 @@ PrintForeachInfo( ByteCode *codePtr, unsigned int pcOffset) { - register ForeachInfo *infoPtr = clientData; - register ForeachVarList *varsPtr; + ForeachInfo *infoPtr = clientData; + ForeachVarList *varsPtr; int i, j; Tcl_AppendToObj(appendObj, "data=[", -1); @@ -3037,8 +3037,8 @@ PrintNewForeachInfo( ByteCode *codePtr, unsigned int pcOffset) { - register ForeachInfo *infoPtr = clientData; - register ForeachVarList *varsPtr; + ForeachInfo *infoPtr = clientData; + ForeachVarList *varsPtr; int i, j; Tcl_AppendPrintfToObj(appendObj, "jumpOffset=%+d, vars=", @@ -3067,8 +3067,8 @@ DisassembleForeachInfo( ByteCode *codePtr, unsigned int pcOffset) { - register ForeachInfo *infoPtr = clientData; - register ForeachVarList *varsPtr; + ForeachInfo *infoPtr = clientData; + ForeachVarList *varsPtr; int i, j; Tcl_Obj *objPtr, *innerPtr; @@ -3114,8 +3114,8 @@ DisassembleNewForeachInfo( ByteCode *codePtr, unsigned int pcOffset) { - register ForeachInfo *infoPtr = clientData; - register ForeachVarList *varsPtr; + ForeachInfo *infoPtr = clientData; + ForeachVarList *varsPtr; int i, j; Tcl_Obj *objPtr, *innerPtr; @@ -3439,9 +3439,9 @@ TclPushVarName( int *localIndexPtr, /* Must not be NULL. */ int *isScalarPtr) /* Must not be NULL. */ { - register const char *p; + const char *p; const char *last, *name, *elName; - register int n; + int n; Tcl_Token *elemTokenPtr = NULL; int nameLen, elNameLen, simpleVarName, localIndex; int elemTokenCount = 0, allocedTokens = 0, removedParen = 0; diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index da45cb3..bfae433 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -1862,8 +1862,8 @@ TclCompileSwitchCmd( */ for (; numWords>=3 ; tokenPtr=TokenAfter(tokenPtr),numWords--) { - register unsigned size = tokenPtr[1].size; - register const char *chrs = tokenPtr[1].start; + unsigned size = tokenPtr[1].size; + const char *chrs = tokenPtr[1].start; /* * We only process literal options, and we assume that -e, -g and -n @@ -2602,7 +2602,7 @@ PrintJumptableInfo( ByteCode *codePtr, unsigned int pcOffset) { - register JumptableInfo *jtPtr = clientData; + JumptableInfo *jtPtr = clientData; Tcl_HashEntry *hPtr; Tcl_HashSearch search; const char *keyPtr; @@ -2631,7 +2631,7 @@ DisassembleJumptableInfo( ByteCode *codePtr, unsigned int pcOffset) { - register JumptableInfo *jtPtr = clientData; + JumptableInfo *jtPtr = clientData; Tcl_Obj *mapping = Tcl_NewObj(); Tcl_HashEntry *hPtr; Tcl_HashSearch search; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index c10e3ee..8a13eba 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -990,7 +990,7 @@ DupByteCodeInternalRep( static void FreeByteCodeInternalRep( - register Tcl_Obj *objPtr) /* Object whose internal rep to free. */ + Tcl_Obj *objPtr) /* Object whose internal rep to free. */ { ByteCode *codePtr; @@ -1021,14 +1021,14 @@ FreeByteCodeInternalRep( void TclPreserveByteCode( - register ByteCode *codePtr) + ByteCode *codePtr) { codePtr->refCount++; } void TclReleaseByteCode( - register ByteCode *codePtr) + ByteCode *codePtr) { if (codePtr->refCount-- > 1) { return; @@ -1040,14 +1040,14 @@ TclReleaseByteCode( static void CleanupByteCode( - register ByteCode *codePtr) /* Points to the ByteCode to free. */ + ByteCode *codePtr) /* Points to the ByteCode to free. */ { Tcl_Interp *interp = (Tcl_Interp *) *codePtr->interpHandle; Interp *iPtr = (Interp *) interp; int numLitObjects = codePtr->numLitObjects; int numAuxDataItems = codePtr->numAuxDataItems; - register Tcl_Obj **objArrayPtr, *objPtr; - register const AuxData *auxDataPtr; + Tcl_Obj **objArrayPtr, *objPtr; + const AuxData *auxDataPtr; int i; #ifdef TCL_COMPILE_STATS @@ -1392,9 +1392,9 @@ CompileSubstObj( static void FreeSubstCodeInternalRep( - register Tcl_Obj *objPtr) /* Object whose internal rep to free. */ + Tcl_Obj *objPtr) /* Object whose internal rep to free. */ { - register ByteCode *codePtr; + ByteCode *codePtr; ByteCodeGetIntRep(objPtr, &substCodeType, codePtr); assert(codePtr != NULL); @@ -1443,7 +1443,7 @@ void TclInitCompileEnv( Tcl_Interp *interp, /* The interpreter for which a CompileEnv * structure is initialized. */ - register CompileEnv *envPtr,/* Points to the CompileEnv structure to + CompileEnv *envPtr,/* Points to the CompileEnv structure to * initialize. */ const char *stringPtr, /* The source string to be compiled. */ int numBytes, /* Number of bytes in source string. */ @@ -1650,7 +1650,7 @@ TclInitCompileEnv( void TclFreeCompileEnv( - register CompileEnv *envPtr)/* Points to the CompileEnv structure. */ + CompileEnv *envPtr)/* Points to the CompileEnv structure. */ { if (envPtr->localLitTable.buckets != envPtr->localLitTable.staticBuckets){ ckfree(envPtr->localLitTable.buckets); @@ -2782,13 +2782,13 @@ PreventCycle( ByteCode * TclInitByteCode( - register CompileEnv *envPtr)/* Points to the CompileEnv structure from + CompileEnv *envPtr)/* Points to the CompileEnv structure from * which to create a ByteCode structure. */ { - register ByteCode *codePtr; + ByteCode *codePtr; size_t codeBytes, objArrayBytes, exceptArrayBytes, cmdLocBytes; size_t auxDataArrayBytes, structureSize; - register unsigned char *p; + unsigned char *p; #ifdef TCL_COMPILE_DEBUG unsigned char *nextPtr; #endif @@ -2923,7 +2923,7 @@ TclInitByteCodeObj( * and whose string rep contains the source * code. */ const Tcl_ObjType *typePtr, - register CompileEnv *envPtr)/* Points to the CompileEnv structure from + CompileEnv *envPtr)/* Points to the CompileEnv structure from * which to create a ByteCode structure. */ { ByteCode *codePtr; @@ -2968,7 +2968,7 @@ TclInitByteCodeObj( int TclFindCompiledLocal( - register const char *name, /* Points to first character of the name of a + const char *name, /* Points to first character of the name of a * scalar or array variable. If NULL, a * temporary var should be created. */ int nameBytes, /* Number of bytes in the name. */ @@ -2976,9 +2976,9 @@ TclFindCompiledLocal( * variable if it is new. */ CompileEnv *envPtr) /* Points to the current compile environment*/ { - register CompiledLocal *localPtr; + CompiledLocal *localPtr; int localVar = -1; - register int i; + int i; Proc *procPtr; /* @@ -3351,11 +3351,11 @@ EnterCmdWordData( int TclCreateExceptRange( ExceptionRangeType type, /* The kind of ExceptionRange desired. */ - register CompileEnv *envPtr)/* Points to CompileEnv for which to create a + CompileEnv *envPtr)/* Points to CompileEnv for which to create a * new ExceptionRange structure. */ { - register ExceptionRange *rangePtr; - register ExceptionAux *auxPtr; + ExceptionRange *rangePtr; + ExceptionAux *auxPtr; int index = envPtr->exceptArrayNext; if (index >= envPtr->exceptArrayEnd) { @@ -3719,11 +3719,11 @@ TclCreateAuxData( * the new aux data record. */ const AuxDataType *typePtr, /* Pointer to the type to attach to this * AuxData */ - register CompileEnv *envPtr)/* Points to the CompileEnv for which a new + CompileEnv *envPtr)/* Points to the CompileEnv for which a new * aux data structure is to be allocated. */ { int index; /* Index for the new AuxData structure. */ - register AuxData *auxDataPtr; + AuxData *auxDataPtr; /* Points to the new AuxData structure */ index = envPtr->auxDataArrayNext; @@ -3782,7 +3782,7 @@ TclCreateAuxData( void TclInitJumpFixupArray( - register JumpFixupArray *fixupArrayPtr) + JumpFixupArray *fixupArrayPtr) /* Points to the JumpFixupArray structure to * initialize. */ { @@ -3814,7 +3814,7 @@ TclInitJumpFixupArray( void TclExpandJumpFixupArray( - register JumpFixupArray *fixupArrayPtr) + JumpFixupArray *fixupArrayPtr) /* Points to the JumpFixupArray structure to * enlarge. */ { @@ -3863,7 +3863,7 @@ TclExpandJumpFixupArray( void TclFreeJumpFixupArray( - register JumpFixupArray *fixupArrayPtr) + JumpFixupArray *fixupArrayPtr) /* Points to the JumpFixupArray structure to * free. */ { @@ -4310,7 +4310,7 @@ GetCmdLocEncodingSize( * containing the CmdLocation structure to * encode. */ { - register CmdLocation *mapPtr = envPtr->cmdMapPtr; + CmdLocation *mapPtr = envPtr->cmdMapPtr; int numCmds = envPtr->numCommands; int codeDelta, codeLen, srcDelta, srcLen; int codeDeltaNext, codeLengthNext, srcDeltaNext, srcLengthNext; @@ -4394,11 +4394,11 @@ EncodeCmdLocMap( * memory block where the location information * is to be stored. */ { - register CmdLocation *mapPtr = envPtr->cmdMapPtr; + CmdLocation *mapPtr = envPtr->cmdMapPtr; int numCmds = envPtr->numCommands; - register unsigned char *p = startPtr; + unsigned char *p = startPtr; int codeDelta, codeLen, srcDelta, srcLen, prevOffset; - register int i; + int i; /* * Encode the code offset for each command as a sequence of deltas. @@ -4512,7 +4512,7 @@ RecordByteCodeStats( * to add to accumulated statistics. */ { Interp *iPtr = (Interp *) *codePtr->interpHandle; - register ByteCodeStats *statsPtr; + ByteCodeStats *statsPtr; if (iPtr == NULL) { /* Avoid segfaulting in case we're called in a deleted interp */ diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 6b30f8b..5e39a21 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -1217,7 +1217,7 @@ MODULE_SCOPE Tcl_Obj *TclGetInnerContext(Tcl_Interp *interp, const unsigned char *pc, Tcl_Obj **tosPtr); MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst); MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData, - register Tcl_Interp *interp, int objc, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int isLambda); @@ -1405,7 +1405,7 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData, #define TclEmitPush(objIndex, envPtr) \ do { \ - register int _objIndexCopy = (objIndex); \ + int _objIndexCopy = (objIndex); \ if (_objIndexCopy <= 255) { \ TclEmitInstInt1(INST_PUSH1, _objIndexCopy, (envPtr)); \ } else { \ diff --git a/generic/tclDate.c b/generic/tclDate.c index 32c71de..87c6325 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2549,9 +2549,9 @@ LookupWord( YYSTYPE* yylvalPtr, char *buff) { - register char *p; - register char *q; - register const TABLE *tp; + char *p; + char *q; + const TABLE *tp; int i, abbrev; /* @@ -2674,8 +2674,8 @@ TclDatelex( YYLTYPE* location, DateInfo *info) { - register char c; - register char *p; + char c; + char *p; char buff[20]; int Count; diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 76a4d46..3204619 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -542,7 +542,7 @@ FormatInstruction( { Proc *procPtr = codePtr->procPtr; unsigned char opCode = *pc; - register const InstructionDesc *instDesc = &tclInstructionTable[opCode]; + const InstructionDesc *instDesc = &tclInstructionTable[opCode]; unsigned char *codeStart = codePtr->codeStart; unsigned pcOffset = pc - codeStart; int opnd = 0, i, j, numBytes = 1; @@ -863,8 +863,8 @@ PrintSourceToObj( const char *stringPtr, /* The string to print. */ int maxChars) /* Maximum number of chars to print. */ { - register const char *p; - register int i = 0, len; + const char *p; + int i = 0, len; Tcl_UniChar ch = 0; if (stringPtr == NULL) { diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index e7e5c92..416eaad 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -119,7 +119,7 @@ static inline Tcl_Obj * NewNsObj( Tcl_Namespace *namespacePtr) { - register Namespace *nsPtr = (Namespace *) namespacePtr; + Namespace *nsPtr = (Namespace *) namespacePtr; if (namespacePtr == TclGetGlobalNamespace(nsPtr->interp)) { return Tcl_NewStringObj("::", 2); @@ -1813,7 +1813,7 @@ NsEnsembleImplementationCmdNR( subcmdName = TclGetStringFromObj(subObj, &stringLength); for (i=0 ; isubcommandArrayPtr[i], stringLength); @@ -2404,7 +2404,7 @@ MakeCachedEnsembleCommand( Tcl_HashEntry *hPtr, Tcl_Obj *fix) { - register EnsembleCmdRep *ensembleCmd; + EnsembleCmdRep *ensembleCmd; ECRGetIntRep(objPtr, ensembleCmd); if (ensembleCmd) { diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 520c2ee..871a463 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -1327,7 +1327,7 @@ int Tcl_ExprObj( Tcl_Interp *interp, /* Context in which to evaluate the * expression. */ - register Tcl_Obj *objPtr, /* Points to Tcl object containing expression + Tcl_Obj *objPtr, /* Points to Tcl object containing expression * to evaluate. */ Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression * result is stored if no errors occur. */ @@ -1444,7 +1444,7 @@ CompileExprObj( Interp *iPtr = (Interp *) interp; CompileEnv compEnv; /* Compilation environment structure allocated * in frame. */ - register ByteCode *codePtr = NULL; + ByteCode *codePtr = NULL; /* Tcl Internal type of bytecode. Initialized * to avoid compiler warning. */ @@ -1598,8 +1598,8 @@ TclCompileObj( const CmdFrame *invoker, int word) { - register Interp *iPtr = (Interp *) interp; - register ByteCode *codePtr; /* Tcl Internal type of bytecode. */ + Interp *iPtr = (Interp *) interp; + ByteCode *codePtr; /* Tcl Internal type of bytecode. */ Namespace *namespacePtr = iPtr->varFramePtr->nsPtr; /* @@ -2493,7 +2493,7 @@ TEBCresume( #ifdef TCL_COMPILE_DEBUG /* FIXME: What is the right thing to trace? */ { - register int i; + int i; TRACE(("%d [", opnd)); for (i=opnd-1 ; i>=0 ; i--) { @@ -4395,8 +4395,8 @@ TEBCresume( NEXT_INST_F(1, 0, 1); case INST_INFO_LEVEL_ARGS: { int level; - register CallFrame *framePtr = iPtr->varFramePtr; - register CallFrame *rootFramePtr = iPtr->rootFramePtr; + CallFrame *framePtr = iPtr->varFramePtr; + CallFrame *rootFramePtr = iPtr->rootFramePtr; TRACE(("\"%.30s\" => ", O2S(OBJ_AT_TOS))); if (TclGetIntFromObj(interp, OBJ_AT_TOS, &level) != TCL_OK) { @@ -4693,7 +4693,7 @@ TEBCresume( } { - register Method *const mPtr = + Method *const mPtr = contextPtr->callPtr->chain[newDepth].mPtr; return mPtr->typePtr->callProc(mPtr->clientData, interp, @@ -6783,7 +6783,7 @@ TEBCresume( NEXT_INST_F(1, 1, 0); case INST_DICT_EXISTS: { - register int found; + int found; opnd = TclGetUInt4AtPtr(pc+1); TRACE(("%u => ", opnd)); @@ -8884,7 +8884,7 @@ TclCompareTwoNumbers( static void PrintByteCodeInfo( - register ByteCode *codePtr) /* The bytecode whose summary is printed to + ByteCode *codePtr) /* The bytecode whose summary is printed to * stdout. */ { Proc *procPtr = codePtr->procPtr; @@ -8948,7 +8948,7 @@ PrintByteCodeInfo( #ifdef TCL_COMPILE_DEBUG static void ValidatePcAndStackTop( - register ByteCode *codePtr, /* The bytecode whose summary is printed to + ByteCode *codePtr, /* The bytecode whose summary is printed to * stdout. */ const unsigned char *pc, /* Points to first byte of a bytecode * instruction. The program counter. */ @@ -9191,7 +9191,7 @@ GetSrcInfoForPc( * of the command containing the pc should * be stored. */ { - register int pcOffset = (pc - codePtr->codeStart); + int pcOffset = (pc - codePtr->codeStart); int numCmds = codePtr->numCommands; unsigned char *codeDeltaNext, *codeLengthNext; unsigned char *srcDeltaNext, *srcLengthNext; @@ -9344,9 +9344,9 @@ GetExceptRangeForPc( { ExceptionRange *rangeArrayPtr; int numRanges = codePtr->numExceptRanges; - register ExceptionRange *rangePtr; + ExceptionRange *rangePtr; int pcOffset = pc - codePtr->codeStart; - register int start; + int start; if (numRanges == 0) { return NULL; @@ -9478,11 +9478,11 @@ TclExprFloatError( int TclLog2( - register int value) /* The integer for which to compute the log + int value) /* The integer for which to compute the log * base 2. */ { - register int n = value; - register int result = 0; + int n = value; + int result = 0; while (n > 1) { n = n >> 1; diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 98ee37c..3419d7c 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -1072,7 +1072,7 @@ Tcl_TranslateFileName( */ if (tclPlatform == TCL_PLATFORM_WINDOWS) { - register char *p; + char *p; for (p = Tcl_DStringValue(bufferPtr); *p != '\0'; p++) { if (*p == '/') { *p = '\\'; @@ -2077,7 +2077,7 @@ SkipToChar( int match) /* Character to find. */ { int quoted, level; - register char *p; + char *p; quoted = 0; level = 0; @@ -2628,7 +2628,7 @@ Tcl_GetBlocksFromStat( #ifdef HAVE_STRUCT_STAT_ST_BLOCKS return (Tcl_WideUInt) statPtr->st_blocks; #else - register unsigned blksize = Tcl_GetBlockSizeFromStat(statPtr); + unsigned blksize = Tcl_GetBlockSizeFromStat(statPtr); return ((Tcl_WideUInt) statPtr->st_size + blksize - 1) / blksize; #endif diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 59f85bd..210e91c 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -765,9 +765,9 @@ LookupWord( YYSTYPE* yylvalPtr, char *buff) { - register char *p; - register char *q; - register const TABLE *tp; + char *p; + char *q; + const TABLE *tp; int i, abbrev; /* @@ -890,8 +890,8 @@ TclDatelex( YYLTYPE* location, DateInfo *info) { - register char c; - register char *p; + char c; + char *p; char buff[20]; int Count; diff --git a/generic/tclHash.c b/generic/tclHash.c index 8bbb0c7..9ea8807 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -113,7 +113,7 @@ const Tcl_HashKeyType tclStringHashKeyType = { void Tcl_InitHashTable( - register Tcl_HashTable *tablePtr, + Tcl_HashTable *tablePtr, /* Pointer to table record, which is supplied * by the caller. */ int keyType) /* Type of keys to use in table: @@ -151,7 +151,7 @@ Tcl_InitHashTable( void Tcl_InitCustomHashTable( - register Tcl_HashTable *tablePtr, + Tcl_HashTable *tablePtr, /* Pointer to table record, which is supplied * by the caller. */ int keyType, /* Type of keys to use in table: @@ -271,7 +271,7 @@ CreateHashEntry( int *newPtr) /* Store info here telling whether a new entry * was created. */ { - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; const Tcl_HashKeyType *typePtr; unsigned int hash; int index; @@ -392,7 +392,7 @@ void Tcl_DeleteHashEntry( Tcl_HashEntry *entryPtr) { - register Tcl_HashEntry *prevPtr; + Tcl_HashEntry *prevPtr; const Tcl_HashKeyType *typePtr; Tcl_HashTable *tablePtr; Tcl_HashEntry **bucketPtr; @@ -461,9 +461,9 @@ Tcl_DeleteHashEntry( void Tcl_DeleteHashTable( - register Tcl_HashTable *tablePtr) /* Table to delete. */ + Tcl_HashTable *tablePtr) /* Table to delete. */ { - register Tcl_HashEntry *hPtr, *nextPtr; + Tcl_HashEntry *hPtr, *nextPtr; const Tcl_HashKeyType *typePtr; int i; @@ -569,7 +569,7 @@ Tcl_FirstHashEntry( Tcl_HashEntry * Tcl_NextHashEntry( - register Tcl_HashSearch *searchPtr) + Tcl_HashSearch *searchPtr) /* Place to store information about progress * through the table. Must have been * initialized by calling @@ -616,7 +616,7 @@ Tcl_HashStats( #define NUM_COUNTERS 10 int count[NUM_COUNTERS], overflow, i, j; double average, tmp; - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; char *result, *p; /* @@ -686,7 +686,7 @@ AllocArrayEntry( void *keyPtr) /* Key to store in the hash table entry. */ { int *array = (int *) keyPtr; - register int *iPtr1, *iPtr2; + int *iPtr1, *iPtr2; Tcl_HashEntry *hPtr; int count; unsigned int size; @@ -730,8 +730,8 @@ CompareArrayKeys( void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { - register const int *iPtr1 = (const int *) keyPtr; - register const int *iPtr2 = (const int *) hPtr->key.words; + const int *iPtr1 = (const int *) keyPtr; + const int *iPtr2 = (const int *) hPtr->key.words; Tcl_HashTable *tablePtr = hPtr->tablePtr; int count; @@ -769,8 +769,8 @@ HashArrayKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - register const int *array = (const int *) keyPtr; - register unsigned int result; + const int *array = (const int *) keyPtr; + unsigned int result; int count; for (result = 0, count = tablePtr->keyType; count > 0; @@ -838,8 +838,8 @@ CompareStringKeys( void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { - register const char *p1 = (const char *) keyPtr; - register const char *p2 = (const char *) hPtr->key.string; + const char *p1 = (const char *) keyPtr; + const char *p2 = (const char *) hPtr->key.string; return !strcmp(p1, p2); } @@ -866,9 +866,9 @@ HashStringKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - register const char *string = keyPtr; - register unsigned int result; - register char c; + const char *string = keyPtr; + unsigned int result; + char c; /* * I tried a zillion different hash functions and asked many other people @@ -987,12 +987,12 @@ BogusCreate( static void RebuildTable( - register Tcl_HashTable *tablePtr) /* Table to enlarge. */ + Tcl_HashTable *tablePtr) /* Table to enlarge. */ { int count, index, oldSize = tablePtr->numBuckets; Tcl_HashEntry **oldBuckets = tablePtr->buckets; - register Tcl_HashEntry **oldChainPtr, **newChainPtr; - register Tcl_HashEntry *hPtr; + Tcl_HashEntry **oldChainPtr, **newChainPtr; + Tcl_HashEntry *hPtr; const Tcl_HashKeyType *typePtr; /* Avoid outgrowing capability of the memory allocators */ diff --git a/generic/tclHistory.c b/generic/tclHistory.c index 47806d4..46e6989 100644 --- a/generic/tclHistory.c +++ b/generic/tclHistory.c @@ -61,7 +61,7 @@ Tcl_RecordAndEval( * TCL_EVAL_GLOBAL means use Tcl_GlobalEval * instead of Tcl_Eval. */ { - register Tcl_Obj *cmdPtr; + Tcl_Obj *cmdPtr; int result; if (cmd[0]) { @@ -213,7 +213,7 @@ DeleteHistoryObjs( ClientData clientData, Tcl_Interp *interp) { - register HistoryObjs *histObjsPtr = clientData; + HistoryObjs *histObjsPtr = clientData; TclDecrRefCount(histObjsPtr->historyObj); TclDecrRefCount(histObjsPtr->addObj); diff --git a/generic/tclIO.c b/generic/tclIO.c index 118820a..f50ef4a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -7480,7 +7480,7 @@ Tcl_OutputBuffered( bytesBuffered += BytesLeft(bufPtr); } if (statePtr->curOutPtr != NULL) { - register ChannelBuffer *curOutPtr = statePtr->curOutPtr; + ChannelBuffer *curOutPtr = statePtr->curOutPtr; if (IsBufferReady(curOutPtr)) { bytesBuffered += BytesLeft(curOutPtr); @@ -11235,9 +11235,9 @@ Tcl_ChannelTruncateProc( static void DupChannelIntRep( - register Tcl_Obj *srcPtr, /* Object with internal rep to copy. Must have + Tcl_Obj *srcPtr, /* Object with internal rep to copy. Must have * an internal rep of type "Channel". */ - register Tcl_Obj *copyPtr) /* Object with internal rep to set. Must not + Tcl_Obj *copyPtr) /* Object with internal rep to set. Must not * currently have an internal rep.*/ { ResolvedChanName *resPtr; diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 23049fb..1d90def 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -2125,7 +2125,7 @@ static Tcl_Obj * DecodeEventMask( int mask) { - register const char *eventStr; + const char *eventStr; Tcl_Obj *evObj; switch (mask & RANDW) { diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 8e24cf7..8385d88 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -1706,7 +1706,7 @@ static Tcl_Obj * DecodeEventMask( int mask) { - register const char *eventStr; + const char *eventStr; Tcl_Obj *evObj; switch (mask & RANDW) { diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 919db92..e7c3b46 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -426,7 +426,7 @@ Tcl_GetIndexFromObjStruct( static int SetIndexFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ + Tcl_Obj *objPtr) /* The object to convert. */ { if (interp) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -458,7 +458,7 @@ UpdateStringOfIndex( Tcl_Obj *objPtr) { IndexRep *indexRep = TclFetchIntRep(objPtr, &indexType)->twoPtrValue.ptr1; - register const char *indexStr = EXPAND_OF(indexRep); + const char *indexStr = EXPAND_OF(indexRep); Tcl_InitStringRep(objPtr, indexStr, strlen(indexStr)); } @@ -967,7 +967,7 @@ Tcl_WrongNumArgs( const Tcl_ObjIntRep *irPtr; if ((irPtr = TclFetchIntRep(origObjv[i], &indexType))) { - register IndexRep *indexRep = irPtr->twoPtrValue.ptr1; + IndexRep *indexRep = irPtr->twoPtrValue.ptr1; elementStr = EXPAND_OF(indexRep); elemLen = strlen(elementStr); @@ -1016,7 +1016,7 @@ Tcl_WrongNumArgs( const Tcl_ObjIntRep *irPtr; if ((irPtr = TclFetchIntRep(objv[i], &indexType))) { - register IndexRep *indexRep = irPtr->twoPtrValue.ptr1; + IndexRep *indexRep = irPtr->twoPtrValue.ptr1; Tcl_AppendStringsToObj(objPtr, EXPAND_OF(indexRep), NULL); } else { @@ -1107,14 +1107,14 @@ Tcl_ParseArgsObjv( * successful exit. Will include the name of * the command. */ int nrem; /* Size of leftovers.*/ - register const Tcl_ArgvInfo *infoPtr; + const Tcl_ArgvInfo *infoPtr; /* Pointer to the current entry in the table * of argument descriptions. */ const Tcl_ArgvInfo *matchPtr; /* Descriptor that matches current argument */ Tcl_Obj *curArg; /* Current argument */ const char *str = NULL; - register char c; /* Second character of current arg (used for + char c; /* Second character of current arg (used for * quick check for matching; use 2nd char. * because first char. will almost always be * '-'). */ @@ -1362,7 +1362,7 @@ PrintUsage( /* Array of command-specific argument * descriptions. */ { - register const Tcl_ArgvInfo *infoPtr; + const Tcl_ArgvInfo *infoPtr; int width, numSpaces; #define NUM_SPACES 20 static const char spaces[] = " "; diff --git a/generic/tclInt.h b/generic/tclInt.h index 7029173..3a6352a 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3076,6 +3076,7 @@ MODULE_SCOPE void TclInitObjSubsystem(void); MODULE_SCOPE void TclInitSubsystems(void); MODULE_SCOPE int TclInterpReady(Tcl_Interp *interp); MODULE_SCOPE int TclIsSpaceProc(int byte); +MODULE_SCOPE int TclIsDigitProc(int byte); MODULE_SCOPE int TclIsBareword(int byte); MODULE_SCOPE Tcl_Obj * TclJoinPath(int elements, Tcl_Obj * const objv[], int forceRelative); @@ -4534,8 +4535,8 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, #define TclUnpackBignum(objPtr, bignum) \ do { \ - register Tcl_Obj *bignumObj = (objPtr); \ - register int bignumPayload = \ + Tcl_Obj *bignumObj = (objPtr); \ + int bignumPayload = \ PTR2INT(bignumObj->internalRep.twoPtrValue.ptr2); \ if (bignumPayload == -1) { \ (bignum) = *((mp_int *) bignumObj->internalRep.twoPtrValue.ptr1); \ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 92c6159..3188fce 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -3362,7 +3362,7 @@ int Tcl_LimitExceeded( Tcl_Interp *interp) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; return iPtr->limit.exceeded != 0; } @@ -3393,10 +3393,10 @@ int Tcl_LimitReady( Tcl_Interp *interp) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; if (iPtr->limit.active != 0) { - register int ticker = ++iPtr->limit.granularityTicker; + int ticker = ++iPtr->limit.granularityTicker; if ((iPtr->limit.active & TCL_LIMIT_COMMANDS) && ((iPtr->limit.cmdGranularity == 1) || @@ -3440,7 +3440,7 @@ Tcl_LimitCheck( Tcl_Interp *interp) { Interp *iPtr = (Interp *) interp; - register int ticker = iPtr->limit.granularityTicker; + int ticker = iPtr->limit.granularityTicker; if (Tcl_InterpDeleted(interp)) { return TCL_OK; diff --git a/generic/tclListObj.c b/generic/tclListObj.c index ad64971..d4dec9b 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -557,14 +557,14 @@ TclListObjRange( int Tcl_ListObjGetElements( Tcl_Interp *interp, /* Used to report errors if not NULL. */ - register Tcl_Obj *listPtr, /* List object for which an element array is + Tcl_Obj *listPtr, /* List object for which an element array is * to be returned. */ int *objcPtr, /* Where to store the count of objects * referenced by objv. */ Tcl_Obj ***objvPtr) /* Where to store the pointer to an array of * pointers to the list's objects. */ { - register List *listRepPtr; + List *listRepPtr; ListGetIntRep(listPtr, listRepPtr); @@ -614,7 +614,7 @@ Tcl_ListObjGetElements( int Tcl_ListObjAppendList( Tcl_Interp *interp, /* Used to report errors if not NULL. */ - register Tcl_Obj *listPtr, /* List object to append elements to. */ + Tcl_Obj *listPtr, /* List object to append elements to. */ Tcl_Obj *elemListPtr) /* List obj with elements to append. */ { int objc; @@ -673,7 +673,7 @@ Tcl_ListObjAppendElement( Tcl_Obj *listPtr, /* List object to append objPtr to. */ Tcl_Obj *objPtr) /* Object to append to listPtr's list. */ { - register List *listRepPtr, *newPtr = NULL; + List *listRepPtr, *newPtr = NULL; int numElems, numRequired, needGrow, isShared, attempt; if (Tcl_IsShared(listPtr)) { @@ -844,11 +844,11 @@ Tcl_ListObjAppendElement( int Tcl_ListObjIndex( Tcl_Interp *interp, /* Used to report errors if not NULL. */ - register Tcl_Obj *listPtr, /* List object to index into. */ - register int index, /* Index of element to return. */ + Tcl_Obj *listPtr, /* List object to index into. */ + int index, /* Index of element to return. */ Tcl_Obj **objPtrPtr) /* The resulting Tcl_Obj* is stored here. */ { - register List *listRepPtr; + List *listRepPtr; ListGetIntRep(listPtr, listRepPtr); if (listRepPtr == NULL) { @@ -900,10 +900,10 @@ Tcl_ListObjIndex( int Tcl_ListObjLength( Tcl_Interp *interp, /* Used to report errors if not NULL. */ - register Tcl_Obj *listPtr, /* List object whose #elements to return. */ - register int *intPtr) /* The resulting int is stored here. */ + Tcl_Obj *listPtr, /* List object whose #elements to return. */ + int *intPtr) /* The resulting int is stored here. */ { - register List *listRepPtr; + List *listRepPtr; ListGetIntRep(listPtr, listRepPtr); if (listRepPtr == NULL) { @@ -974,7 +974,7 @@ Tcl_ListObjReplace( * insert. */ { List *listRepPtr; - register Tcl_Obj **elemPtrs; + Tcl_Obj **elemPtrs; int needGrow, numElems, numRequired, numAfterLast, start, i, j, isShared; if (Tcl_IsShared(listPtr)) { diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 2f93200..50f8e38 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -58,7 +58,7 @@ static void RebuildLiteralTable(LiteralTable *tablePtr); void TclInitLiteralTable( - register LiteralTable *tablePtr) + LiteralTable *tablePtr) /* Pointer to table structure, which is * supplied by the caller. */ { @@ -389,7 +389,7 @@ int TclRegisterLiteral( void *ePtr, /* Points to the CompileEnv in whose object * array an object is found or created. */ - register const char *bytes, /* Points to string for which to find or + const char *bytes, /* Points to string for which to find or * create an object in CompileEnv's object * array. */ int length, /* Number of bytes in the string. If < 0, the @@ -499,13 +499,13 @@ static LiteralEntry * LookupLiteralEntry( Tcl_Interp *interp, /* Interpreter for which objPtr was created to * hold a literal. */ - register Tcl_Obj *objPtr) /* Points to a Tcl object holding a literal + Tcl_Obj *objPtr) /* Points to a Tcl object holding a literal * that was previously created by a call to * TclRegisterLiteral. */ { Interp *iPtr = (Interp *) interp; LiteralTable *globalTablePtr = &iPtr->literalTable; - register LiteralEntry *entryPtr; + LiteralEntry *entryPtr; const char *bytes; int length, globalHash; @@ -545,7 +545,7 @@ void TclHideLiteral( Tcl_Interp *interp, /* Interpreter for which objPtr was created to * hold a literal. */ - register CompileEnv *envPtr,/* Points to CompileEnv whose literal array + CompileEnv *envPtr,/* Points to CompileEnv whose literal array * contains the entry being hidden. */ int index) /* The index of the entry in the literal * array. */ @@ -609,14 +609,14 @@ TclHideLiteral( int TclAddLiteralObj( - register CompileEnv *envPtr,/* Points to CompileEnv in whose literal array + CompileEnv *envPtr,/* Points to CompileEnv in whose literal array * the object is to be inserted. */ Tcl_Obj *objPtr, /* The object to insert into the array. */ LiteralEntry **litPtrPtr) /* The location where the pointer to the new * literal entry should be stored. May be * NULL. */ { - register LiteralEntry *lPtr; + LiteralEntry *lPtr; int objIndex; if (envPtr->literalArrayNext >= envPtr->literalArrayEnd) { @@ -658,12 +658,12 @@ TclAddLiteralObj( static int AddLocalLiteralEntry( - register CompileEnv *envPtr,/* Points to CompileEnv in whose literal array + CompileEnv *envPtr,/* Points to CompileEnv in whose literal array * the object is to be inserted. */ Tcl_Obj *objPtr, /* The literal to add to the CompileEnv. */ int localHash) /* Hash value for the literal's string. */ { - register LiteralTable *localTablePtr = &envPtr->localLitTable; + LiteralTable *localTablePtr = &envPtr->localLitTable; LiteralEntry *localPtr; int objIndex; @@ -736,7 +736,7 @@ AddLocalLiteralEntry( static void ExpandLocalLiteralArray( - register CompileEnv *envPtr)/* Points to the CompileEnv whose object array + CompileEnv *envPtr)/* Points to the CompileEnv whose object array * must be enlarged. */ { /* @@ -818,13 +818,13 @@ void TclReleaseLiteral( Tcl_Interp *interp, /* Interpreter for which objPtr was created to * hold a literal. */ - register Tcl_Obj *objPtr) /* Points to a literal object that was + Tcl_Obj *objPtr) /* Points to a literal object that was * previously created by a call to * TclRegisterLiteral. */ { Interp *iPtr = (Interp *) interp; LiteralTable *globalTablePtr; - register LiteralEntry *entryPtr, *prevPtr; + LiteralEntry *entryPtr, *prevPtr; const char *bytes; int length; unsigned int index; @@ -898,10 +898,10 @@ TclReleaseLiteral( static unsigned HashString( - register const char *string, /* String for which to compute hash value. */ + const char *string, /* String for which to compute hash value. */ int length) /* Number of bytes in the string. */ { - register unsigned int result = 0; + unsigned int result = 0; /* * I tried a zillion different hash functions and asked many other people @@ -962,12 +962,12 @@ HashString( static void RebuildLiteralTable( - register LiteralTable *tablePtr) + LiteralTable *tablePtr) /* Local or global table to enlarge. */ { LiteralEntry **oldBuckets; - register LiteralEntry **oldChainPtr, **newChainPtr; - register LiteralEntry *entryPtr; + LiteralEntry **oldChainPtr, **newChainPtr; + LiteralEntry *entryPtr; LiteralEntry **bucketPtr; const char *bytes; unsigned int oldSize, index; @@ -1098,7 +1098,7 @@ TclLiteralStats( int overflow; size_t i, j; double average, tmp; - register LiteralEntry *entryPtr; + LiteralEntry *entryPtr; char *result, *p; /* @@ -1169,8 +1169,8 @@ TclVerifyLocalLiteralTable( CompileEnv *envPtr) /* Points to CompileEnv whose literal table is * to be validated. */ { - register LiteralTable *localTablePtr = &envPtr->localLitTable; - register LiteralEntry *localPtr; + LiteralTable *localTablePtr = &envPtr->localLitTable; + LiteralEntry *localPtr; char *bytes; size_t i, count; int length; @@ -1220,8 +1220,8 @@ TclVerifyGlobalLiteralTable( Interp *iPtr) /* Points to interpreter whose global literal * table is to be validated. */ { - register LiteralTable *globalTablePtr = &iPtr->literalTable; - register LiteralEntry *globalPtr; + LiteralTable *globalTablePtr = &iPtr->literalTable; + LiteralEntry *globalPtr; char *bytes; size_t i, count; int length; diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index bbe357d..9f28661 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -240,7 +240,7 @@ TclInitNamespaceSubsystem(void) Tcl_Namespace * Tcl_GetCurrentNamespace( - register Tcl_Interp *interp)/* Interpreter whose current namespace is + Tcl_Interp *interp)/* Interpreter whose current namespace is * being queried. */ { return TclGetCurrentNamespace(interp); @@ -264,7 +264,7 @@ Tcl_GetCurrentNamespace( Tcl_Namespace * Tcl_GetGlobalNamespace( - register Tcl_Interp *interp)/* Interpreter whose global namespace should + Tcl_Interp *interp)/* Interpreter whose global namespace should * be returned. */ { return TclGetGlobalNamespace(interp); @@ -316,8 +316,8 @@ Tcl_PushCallFrame( * variables. */ { Interp *iPtr = (Interp *) interp; - register CallFrame *framePtr = (CallFrame *) callFramePtr; - register Namespace *nsPtr; + CallFrame *framePtr = (CallFrame *) callFramePtr; + Namespace *nsPtr; if (namespacePtr == NULL) { nsPtr = (Namespace *) TclGetCurrentNamespace(interp); @@ -393,8 +393,8 @@ void Tcl_PopCallFrame( Tcl_Interp *interp) /* Interpreter with call frame to pop. */ { - register Interp *iPtr = (Interp *) interp; - register CallFrame *framePtr = iPtr->framePtr; + Interp *iPtr = (Interp *) interp; + CallFrame *framePtr = iPtr->framePtr; Namespace *nsPtr; /* @@ -679,7 +679,7 @@ Tcl_CreateNamespace( * function should be called. */ { Interp *iPtr = (Interp *) interp; - register Namespace *nsPtr, *ancestorPtr; + Namespace *nsPtr, *ancestorPtr; Namespace *parentPtr, *dummy1Ptr, *dummy2Ptr; Namespace *globalNsPtr = iPtr->globalNsPtr; const char *simpleName; @@ -848,7 +848,7 @@ Tcl_CreateNamespace( for (ancestorPtr = nsPtr; ancestorPtr != NULL; ancestorPtr = ancestorPtr->parentPtr) { if (ancestorPtr != globalNsPtr) { - register Tcl_DString *tempPtr = namePtr; + Tcl_DString *tempPtr = namePtr; TclDStringAppendLiteral(buffPtr, "::"); Tcl_DStringAppend(buffPtr, ancestorPtr->name, -1); @@ -922,7 +922,7 @@ void Tcl_DeleteNamespace( Tcl_Namespace *namespacePtr)/* Points to the namespace to delete. */ { - register Namespace *nsPtr = (Namespace *) namespacePtr; + Namespace *nsPtr = (Namespace *) namespacePtr; Interp *iPtr = (Interp *) nsPtr->interp; Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace((Tcl_Interp *) iPtr); @@ -1118,11 +1118,11 @@ TclNamespaceDeleted( void TclTeardownNamespace( - register Namespace *nsPtr) /* Points to the namespace to be dismantled + Namespace *nsPtr) /* Points to the namespace to be dismantled * and unlinked from its parent. */ { Interp *iPtr = (Interp *) nsPtr->interp; - register Tcl_HashEntry *entryPtr; + Tcl_HashEntry *entryPtr; Tcl_HashSearch search; int i; @@ -1311,7 +1311,7 @@ TclTeardownNamespace( static void NamespaceFree( - register Namespace *nsPtr) /* Points to the namespace to free. */ + Namespace *nsPtr) /* Points to the namespace to free. */ { /* * Most of the namespace's contents are freed when the namespace is @@ -1586,7 +1586,7 @@ Tcl_Import( { Namespace *nsPtr, *importNsPtr, *dummyPtr; const char *simplePattern; - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; Tcl_HashSearch search; /* @@ -1865,7 +1865,7 @@ Tcl_ForgetImport( Namespace *nsPtr, *sourceNsPtr, *dummyPtr; const char *simplePattern; char *cmdName; - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; Tcl_HashSearch search; /* @@ -1992,7 +1992,7 @@ TclGetOriginalCommand( Tcl_Command command) /* The imported command for which the original * command should be returned. */ { - register Command *cmdPtr = (Command *) command; + Command *cmdPtr = (Command *) command; ImportedCmdData *dataPtr; if (cmdPtr->deleteProc != DeleteImportedCmd) { @@ -2081,7 +2081,7 @@ DeleteImportedCmd( ImportedCmdData *dataPtr = clientData; Command *realCmdPtr = dataPtr->realCmdPtr; Command *selfPtr = dataPtr->selfPtr; - register ImportRef *refPtr, *prevPtr; + ImportRef *refPtr, *prevPtr; prevPtr = NULL; for (refPtr = realCmdPtr->importRefPtr; refPtr != NULL; @@ -2501,7 +2501,7 @@ Tcl_FindNamespace( * points to namespace in which to resolve * name; if NULL, look up name in the current * namespace. */ - register int flags) /* Flags controlling namespace lookup: an OR'd + int flags) /* Flags controlling namespace lookup: an OR'd * combination of TCL_GLOBAL_ONLY and * TCL_LEAVE_ERR_MSG flags. */ { @@ -2572,8 +2572,8 @@ Tcl_FindCommand( { Interp *iPtr = (Interp *) interp; Namespace *cxtNsPtr; - register Tcl_HashEntry *entryPtr; - register Command *cmdPtr; + Tcl_HashEntry *entryPtr; + Command *cmdPtr; const char *simpleName; int result; @@ -2684,7 +2684,7 @@ Tcl_FindCommand( } } else { Namespace *nsPtr[2]; - register int search; + int search; TclGetNamespaceForQualName(interp, name, cxtNsPtr, flags, &nsPtr[0], &nsPtr[1], &cxtNsPtr, &simpleName); @@ -2758,7 +2758,7 @@ TclResetShadowedCmdRefs( { char *cmdName; Tcl_HashEntry *hPtr; - register Namespace *nsPtr; + Namespace *nsPtr; Namespace *trailNsPtr, *shadowNsPtr; Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace(interp); int found, i; @@ -3008,7 +3008,7 @@ NamespaceChildrenCmd( Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace(interp); const char *pattern = NULL; Tcl_DString buffer; - register Tcl_HashEntry *entryPtr; + Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Tcl_Obj *listPtr, *elemPtr; @@ -3134,7 +3134,7 @@ NamespaceCodeCmd( { Namespace *currNsPtr; Tcl_Obj *listPtr, *objPtr; - register const char *arg; + const char *arg; int length; if (objc != 2) { @@ -3213,7 +3213,7 @@ NamespaceCurrentCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Namespace *currNsPtr; + Namespace *currNsPtr; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -3278,7 +3278,7 @@ NamespaceDeleteCmd( { Tcl_Namespace *namespacePtr; const char *name; - register int i; + int i; if (objc < 1) { Tcl_WrongNumArgs(interp, 1, objv, "?name name...?"); @@ -3633,7 +3633,7 @@ NamespaceForgetCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { const char *pattern; - register int i, result; + int i, result; if (objc < 1) { Tcl_WrongNumArgs(interp, 1, objv, "?pattern pattern...?"); @@ -3699,7 +3699,7 @@ NamespaceImportCmd( { int allowOverwrite = 0; const char *string, *pattern; - register int i, result; + int i, result; int firstArg; if (objc < 1) { @@ -3852,7 +3852,7 @@ NRNamespaceInscopeCmd( cmdObjPtr = objv[2]; } else { Tcl_Obj *concatObjv[2]; - register Tcl_Obj *listPtr; + Tcl_Obj *listPtr; listPtr = Tcl_NewListObj(0, NULL); for (i = 3; i < objc; i++) { @@ -4253,7 +4253,7 @@ NamespaceQualifiersCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register const char *name, *p; + const char *name, *p; int length; if (objc != 2) { @@ -4508,7 +4508,7 @@ NamespaceTailCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register const char *name, *p; + const char *name, *p; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "string"); @@ -4711,7 +4711,7 @@ NamespaceWhichCmd( static void FreeNsNameInternalRep( - register Tcl_Obj *objPtr) /* nsName object with internal representation + Tcl_Obj *objPtr) /* nsName object with internal representation * to free. */ { ResolvedNsName *resNamePtr; @@ -4758,7 +4758,7 @@ FreeNsNameInternalRep( static void DupNsNameInternalRep( Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ - register Tcl_Obj *copyPtr) /* Object with internal rep to set. */ + Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { ResolvedNsName *resNamePtr; @@ -4794,11 +4794,11 @@ SetNsNameFromAny( Tcl_Interp *interp, /* Points to the namespace in which to resolve * name. Also used for error reporting if not * NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ + Tcl_Obj *objPtr) /* The object to convert. */ { const char *dummy; Namespace *nsPtr, *dummy1Ptr, *dummy2Ptr; - register ResolvedNsName *resNamePtr; + ResolvedNsName *resNamePtr; const char *name; if (interp == NULL) { @@ -4921,7 +4921,7 @@ TclLogCommandInfo( Tcl_Obj **tosPtr) /* Current stack of bytecode execution * context */ { - register const char *p; + const char *p; Interp *iPtr = (Interp *) interp; int overflow, limit = 150; Var *varPtr, *arrayPtr; diff --git a/generic/tclOO.c b/generic/tclOO.c index e9cc0f0..1ba262b 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -789,7 +789,7 @@ MyDeleted( ClientData clientData) /* Reference to the object whose [my] has been * squelched. */ { - register Object *oPtr = clientData; + Object *oPtr = clientData; oPtr->myCommand = NULL; } @@ -1652,7 +1652,7 @@ Tcl_NewObjectInstance( int skip) /* Number of arguments to _not_ pass to the * constructor. */ { - register Class *classPtr = (Class *) cls; + Class *classPtr = (Class *) cls; Object *oPtr; ClientData clientData[4]; @@ -1722,7 +1722,7 @@ TclNRNewObjectInstance( Tcl_Object *objectPtr) /* Place to write the object reference upon * successful allocation. */ { - register Class *classPtr = (Class *) cls; + Class *classPtr = (Class *) cls; CallContext *contextPtr; Tcl_InterpState state; Object *oPtr; @@ -2656,7 +2656,7 @@ TclOOObjectCmdCore( methodNamePtr = objv[1]; if (oPtr->mapMethodNameProc != NULL) { - register Class **startClsPtr = &startCls; + Class **startClsPtr = &startCls; Tcl_Obj *mappedMethodName = Tcl_DuplicateObj(methodNamePtr); result = oPtr->mapMethodNameProc(interp, (Tcl_Object) oPtr, @@ -2715,7 +2715,7 @@ TclOOObjectCmdCore( if (startCls != NULL) { for (; contextPtr->index < contextPtr->callPtr->numChain; contextPtr->index++) { - register struct MInvoke *miPtr = + struct MInvoke *miPtr = &contextPtr->callPtr->chain[contextPtr->index]; if (miPtr->isFilter) { @@ -2853,7 +2853,7 @@ TclNRObjectContextInvokeNext( Tcl_Obj *const *objv, int skip) { - register CallContext *contextPtr = (CallContext *) context; + CallContext *contextPtr = (CallContext *) context; if (contextPtr->index + 1 >= contextPtr->callPtr->numChain) { /* diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 13c98f4..6de7513 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -426,7 +426,7 @@ TclOO_Object_Eval( { CallContext *contextPtr = (CallContext *) context; Tcl_Object object = Tcl_ObjectContextObject(context); - register const int skip = Tcl_ObjectContextSkippedArgs(context); + const int skip = Tcl_ObjectContextSkippedArgs(context); CallFrame *framePtr, **framePtrPtr = &framePtr; Tcl_Obj *scriptPtr; CmdFrame *invoker; @@ -1122,7 +1122,7 @@ TclOOSelfObjCmd( Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); return TCL_ERROR; } else { - register struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); + struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); Object *oPtr; const char *type; diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index c0d2e64..f3474b6 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -168,7 +168,7 @@ void TclOODeleteContext( CallContext *contextPtr) { - register Object *oPtr = contextPtr->oPtr; + Object *oPtr = contextPtr->oPtr; TclOODeleteChain(contextPtr->callPtr); if (oPtr != NULL) { @@ -314,7 +314,7 @@ TclOOInvokeContext( int objc, /* The number of arguments. */ Tcl_Obj *const objv[]) /* The arguments as actually seen. */ { - register CallContext *const contextPtr = clientData; + CallContext *const contextPtr = clientData; Method *const mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; const int isFilter = contextPtr->callPtr->chain[contextPtr->index].isFilter; @@ -968,7 +968,7 @@ AddMethodToCallChain( * looking to add things from a mixin and have * not passed a mixin. */ { - register CallChain *callPtr = cbPtr->callChainPtr; + CallChain *callPtr = cbPtr->callChainPtr; int i; /* @@ -1656,7 +1656,7 @@ AddPrivatesFromClassChainToCallContext( (char *) methodName); if (hPtr != NULL) { - register Method *mPtr = Tcl_GetHashValue(hPtr); + Method *mPtr = Tcl_GetHashValue(hPtr); if (IS_PRIVATE(mPtr)) { AddMethodToCallChain(mPtr, cbPtr, doneFilters, filterDecl, @@ -1740,7 +1740,7 @@ AddSimpleClassChainToCallContext( privateDanger |= 1; } if (hPtr != NULL) { - register Method *mPtr = Tcl_GetHashValue(hPtr); + Method *mPtr = Tcl_GetHashValue(hPtr); if (!IS_PRIVATE(mPtr)) { if (!(flags & KNOWN_STATE)) { diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 6a00018..a3aec0b 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -779,7 +779,7 @@ FindCommand( { int length; const char *nameStr, *string = TclGetStringFromObj(stringObj, &length); - register Namespace *const nsPtr = (Namespace *) namespacePtr; + Namespace *const nsPtr = (Namespace *) namespacePtr; FOREACH_HASH_DECLS; Tcl_Command cmd, cmd2; diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index c1a9010..1f44ef8 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -671,7 +671,7 @@ MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr); #undef DUPLICATE /* prevent possible conflict with definition in WINAPI nb30.h */ #define DUPLICATE(target,source,type) \ do { \ - register unsigned len = sizeof(type) * ((target).num=(source).num);\ + unsigned len = sizeof(type) * ((target).num=(source).num);\ if (len != 0) { \ memcpy(((target).list=(type*)ckalloc(len)), (source).list, len); \ } else { \ diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 32dd3c7..78421e1 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -149,8 +149,8 @@ Tcl_NewInstanceMethod( void *clientData) /* Some data associated with the particular * method to be created. */ { - register Object *oPtr = (Object *) object; - register Method *mPtr; + Object *oPtr = (Object *) object; + Method *mPtr; Tcl_HashEntry *hPtr; int isNew; @@ -221,8 +221,8 @@ Tcl_NewMethod( void *clientData) /* Some data associated with the particular * method to be created. */ { - register Class *clsPtr = (Class *) cls; - register Method *mPtr; + Class *clsPtr = (Class *) cls; + Method *mPtr; Tcl_HashEntry *hPtr; int isNew; @@ -344,7 +344,7 @@ TclOONewProcInstanceMethod( * interested. */ { int argsLen; - register ProcedureMethod *pmPtr; + ProcedureMethod *pmPtr; Tcl_Method method; if (Tcl_ListObjLength(interp, argsObj, &argsLen) != TCL_OK) { @@ -396,7 +396,7 @@ TclOONewProcMethod( * interested. */ { int argsLen; /* -1 => delete argsObj before exit */ - register ProcedureMethod *pmPtr; + ProcedureMethod *pmPtr; const char *procName; Tcl_Method method; @@ -796,7 +796,7 @@ PushMethodCallFrame( * frame. */ { Namespace *nsPtr = (Namespace *) contextPtr->oPtr->namespacePtr; - register int result; + int result; const char *namePtr; CallFrame **framePtrPtr = &fdPtr->framePtr; ByteCode *codePtr; @@ -829,7 +829,7 @@ PushMethodCallFrame( */ if (pmPtr->flags & USE_DECLARER_NS) { - register Method *mPtr = + Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; if (mPtr->declaringClassPtr != NULL) { @@ -900,7 +900,7 @@ PushMethodCallFrame( fdPtr->efi.fields[1].proc = pmPtr->gfivProc; fdPtr->efi.fields[1].clientData = pmPtr; } else { - register Tcl_Method method = + Tcl_Method method = Tcl_ObjectContextMethod((Tcl_ObjectContext) contextPtr); if (Tcl_MethodDeclarerObject(method) != NULL) { @@ -1294,7 +1294,7 @@ static void DeleteProcedureMethod( void *clientData) { - register ProcedureMethod *pmPtr = clientData; + ProcedureMethod *pmPtr = clientData; if (pmPtr->refCount-- <= 1) { DeleteProcedureMethodRecord(pmPtr); @@ -1387,7 +1387,7 @@ TclOONewForwardInstanceMethod( * prefix to forward to. */ { int prefixLen; - register ForwardMethod *fmPtr; + ForwardMethod *fmPtr; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; @@ -1426,7 +1426,7 @@ TclOONewForwardMethod( * prefix to forward to. */ { int prefixLen; - register ForwardMethod *fmPtr; + ForwardMethod *fmPtr; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; diff --git a/generic/tclObj.c b/generic/tclObj.c index d329aba..5c8217a 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -811,7 +811,7 @@ TclThreadFinalizeContLines( * * Tcl_RegisterObjType -- * - * This function is called to register a new Tcl object type in the table + * This function is called to a new Tcl object type in the table * of all object types supported by Tcl. * * Results: @@ -870,7 +870,7 @@ Tcl_AppendAllObjTypes( * name of each registered type is appended as * a list element. */ { - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; Tcl_HashSearch search; int numElems; @@ -918,7 +918,7 @@ const Tcl_ObjType * Tcl_GetObjType( const char *typeName) /* Name of Tcl object type to look up. */ { - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; const Tcl_ObjType *typePtr = NULL; Tcl_MutexLock(&tableMutex); @@ -1048,10 +1048,10 @@ TclDbDumpActiveObjects( #ifdef TCL_MEM_DEBUG void TclDbInitNewObj( - register Tcl_Obj *objPtr, - register const char *file, /* The name of the source file calling this + Tcl_Obj *objPtr, + const char *file, /* The name of the source file calling this * function; used for debugging. */ - register int line) /* Line number in the source file; used for + int line) /* Line number in the source file; used for * debugging. */ { objPtr->refCount = 0; @@ -1135,7 +1135,7 @@ Tcl_NewObj(void) Tcl_Obj * Tcl_NewObj(void) { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; /* * Use the macro defined in tclInt.h - it will use the correct allocator. @@ -1177,12 +1177,12 @@ Tcl_NewObj(void) Tcl_Obj * Tcl_DbNewObj( - register const char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ - register int line) /* Line number in the source file; used for + int line) /* Line number in the source file; used for * debugging. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; /* * Use the macro defined in tclInt.h - it will use the correct allocator. @@ -1232,8 +1232,8 @@ TclAllocateFreeObjects(void) { size_t bytesToAlloc = (OBJS_TO_ALLOC_EACH_TIME * sizeof(Tcl_Obj)); char *basePtr; - register Tcl_Obj *prevPtr, *objPtr; - register int i; + Tcl_Obj *prevPtr, *objPtr; + int i; /* * This has been noted by Purify to be a potential leak. The problem is @@ -1284,9 +1284,9 @@ TclAllocateFreeObjects(void) #ifdef TCL_MEM_DEBUG void TclFreeObj( - register Tcl_Obj *objPtr) /* The object to be freed. */ + Tcl_Obj *objPtr) /* The object to be freed. */ { - register const Tcl_ObjType *typePtr = objPtr->typePtr; + const Tcl_ObjType *typePtr = objPtr->typePtr; /* * This macro declares a variable, so must come here... @@ -1409,7 +1409,7 @@ TclFreeObj( void TclFreeObj( - register Tcl_Obj *objPtr) /* The object to be freed. */ + Tcl_Obj *objPtr) /* The object to be freed. */ { /* * Invalidate the string rep first so we can use the bytes value for our @@ -1618,7 +1618,7 @@ TclSetDuplicateObj( char * Tcl_GetString( - register Tcl_Obj *objPtr) /* Object whose string rep byte pointer should + Tcl_Obj *objPtr) /* Object whose string rep byte pointer should * be returned. */ { if (objPtr->bytes == NULL) { @@ -1674,9 +1674,9 @@ Tcl_GetString( char * Tcl_GetStringFromObj( - register Tcl_Obj *objPtr, /* Object whose string rep byte pointer should + Tcl_Obj *objPtr, /* Object whose string rep byte pointer should * be returned. */ - register int *lengthPtr) /* If non-NULL, the location where the string + int *lengthPtr) /* If non-NULL, the location where the string * rep's byte array length should * be stored. * If NULL, no length is stored. */ { @@ -1816,7 +1816,7 @@ Tcl_InitStringRep( void Tcl_InvalidateStringRep( - register Tcl_Obj *objPtr) /* Object whose string rep byte pointer should + Tcl_Obj *objPtr) /* Object whose string rep byte pointer should * be freed. */ { TclInvalidateStringRep(objPtr); @@ -1961,7 +1961,7 @@ Tcl_FreeIntRep( Tcl_Obj * Tcl_NewBooleanObj( - register int boolValue) /* Boolean used to initialize new object. */ + int boolValue) /* Boolean used to initialize new object. */ { return Tcl_DbNewWideIntObj(boolValue!=0, "unknown", 0); } @@ -1970,9 +1970,9 @@ Tcl_NewBooleanObj( Tcl_Obj * Tcl_NewBooleanObj( - register int boolValue) /* Boolean used to initialize new object. */ + int boolValue) /* Boolean used to initialize new object. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclNewIntObj(objPtr, boolValue!=0); return objPtr; @@ -2011,13 +2011,13 @@ Tcl_NewBooleanObj( Tcl_Obj * Tcl_DbNewBooleanObj( - register int boolValue, /* Boolean used to initialize new object. */ + int boolValue, /* Boolean used to initialize new object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclDbNewObj(objPtr, file, line); /* Optimized TclInvalidateStringRep() */ @@ -2032,7 +2032,7 @@ Tcl_DbNewBooleanObj( Tcl_Obj * Tcl_DbNewBooleanObj( - register int boolValue, /* Boolean used to initialize new object. */ + int boolValue, /* Boolean used to initialize new object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for @@ -2063,8 +2063,8 @@ Tcl_DbNewBooleanObj( #undef Tcl_SetBooleanObj void Tcl_SetBooleanObj( - register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ - register int boolValue) /* Boolean used to set object's value. */ + Tcl_Obj *objPtr, /* Object whose internal rep to init. */ + int boolValue) /* Boolean used to set object's value. */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetBooleanObj"); @@ -2096,8 +2096,8 @@ Tcl_SetBooleanObj( int Tcl_GetBooleanFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr, /* The object from which to get boolean. */ - register int *boolPtr) /* Place to store resulting boolean. */ + Tcl_Obj *objPtr, /* The object from which to get boolean. */ + int *boolPtr) /* Place to store resulting boolean. */ { do { if (objPtr->typePtr == &tclIntType) { @@ -2162,7 +2162,7 @@ Tcl_GetBooleanFromObj( int TclSetBooleanFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ + Tcl_Obj *objPtr) /* The object to convert. */ { /* * For some "pure" numeric Tcl_ObjTypes (no string rep), we can determine @@ -2208,7 +2208,7 @@ TclSetBooleanFromAny( static int ParseBoolean( - register Tcl_Obj *objPtr) /* The object to parse/convert. */ + Tcl_Obj *objPtr) /* The object to parse/convert. */ { int newBool; char lowerCase[6]; @@ -2350,7 +2350,7 @@ ParseBoolean( Tcl_Obj * Tcl_NewDoubleObj( - register double dblValue) /* Double used to initialize the object. */ + double dblValue) /* Double used to initialize the object. */ { return Tcl_DbNewDoubleObj(dblValue, "unknown", 0); } @@ -2359,9 +2359,9 @@ Tcl_NewDoubleObj( Tcl_Obj * Tcl_NewDoubleObj( - register double dblValue) /* Double used to initialize the object. */ + double dblValue) /* Double used to initialize the object. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclNewDoubleObj(objPtr, dblValue); return objPtr; @@ -2398,13 +2398,13 @@ Tcl_NewDoubleObj( Tcl_Obj * Tcl_DbNewDoubleObj( - register double dblValue, /* Double used to initialize the object. */ + double dblValue, /* Double used to initialize the object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclDbNewObj(objPtr, file, line); /* Optimized TclInvalidateStringRep() */ @@ -2419,7 +2419,7 @@ Tcl_DbNewDoubleObj( Tcl_Obj * Tcl_DbNewDoubleObj( - register double dblValue, /* Double used to initialize the object. */ + double dblValue, /* Double used to initialize the object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for @@ -2449,8 +2449,8 @@ Tcl_DbNewDoubleObj( void Tcl_SetDoubleObj( - register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ - register double dblValue) /* Double used to set the object's value. */ + Tcl_Obj *objPtr, /* Object whose internal rep to init. */ + double dblValue) /* Double used to set the object's value. */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetDoubleObj"); @@ -2482,8 +2482,8 @@ Tcl_SetDoubleObj( int Tcl_GetDoubleFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr, /* The object from which to get a double. */ - register double *dblPtr) /* Place to store resulting double. */ + Tcl_Obj *objPtr, /* The object from which to get a double. */ + double *dblPtr) /* Place to store resulting double. */ { do { if (objPtr->typePtr == &tclDoubleType) { @@ -2537,7 +2537,7 @@ Tcl_GetDoubleFromObj( static int SetDoubleFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ + Tcl_Obj *objPtr) /* The object to convert. */ { return TclParseNumber(interp, objPtr, "floating-point number", NULL, -1, NULL, 0); @@ -2566,7 +2566,7 @@ SetDoubleFromAny( static void UpdateStringOfDouble( - register Tcl_Obj *objPtr) /* Double obj with string rep to update. */ + Tcl_Obj *objPtr) /* Double obj with string rep to update. */ { char *dst = Tcl_InitStringRep(objPtr, NULL, TCL_DOUBLE_SPACE); @@ -2612,7 +2612,7 @@ UpdateStringOfDouble( Tcl_Obj * Tcl_NewIntObj( - register int intValue) /* Int used to initialize the new object. */ + int intValue) /* Int used to initialize the new object. */ { return Tcl_DbNewWideIntObj((long)intValue, "unknown", 0); } @@ -2621,9 +2621,9 @@ Tcl_NewIntObj( Tcl_Obj * Tcl_NewIntObj( - register int intValue) /* Int used to initialize the new object. */ + int intValue) /* Int used to initialize the new object. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclNewIntObj(objPtr, intValue); return objPtr; @@ -2652,8 +2652,8 @@ Tcl_NewIntObj( #undef Tcl_SetIntObj void Tcl_SetIntObj( - register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ - register int intValue) /* Integer used to set object's value. */ + Tcl_Obj *objPtr, /* Object whose internal rep to init. */ + int intValue) /* Integer used to set object's value. */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetIntObj"); @@ -2692,8 +2692,8 @@ Tcl_SetIntObj( int Tcl_GetIntFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr, /* The object from which to get a int. */ - register int *intPtr) /* Place to store resulting int. */ + Tcl_Obj *objPtr, /* The object from which to get a int. */ + int *intPtr) /* Place to store resulting int. */ { #if (LONG_MAX == INT_MAX) return TclGetLongFromObj(interp, objPtr, (long *) intPtr); @@ -2763,7 +2763,7 @@ SetIntFromAny( static void UpdateStringOfInt( - register Tcl_Obj *objPtr) /* Int object whose string rep to update. */ + Tcl_Obj *objPtr) /* Int object whose string rep to update. */ { char *dst = Tcl_InitStringRep( objPtr, NULL, TCL_INTEGER_SPACE); @@ -2775,7 +2775,7 @@ UpdateStringOfInt( #if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 && !defined(TCL_WIDE_INT_IS_LONG) static void UpdateStringOfOldInt( - register Tcl_Obj *objPtr) /* Int object whose string rep to update. */ + Tcl_Obj *objPtr) /* Int object whose string rep to update. */ { char *dst = Tcl_InitStringRep( objPtr, NULL, TCL_INTEGER_SPACE); @@ -2821,7 +2821,7 @@ UpdateStringOfOldInt( Tcl_Obj * Tcl_NewLongObj( - register long longValue) /* Long integer used to initialize the + long longValue) /* Long integer used to initialize the * new object. */ { return Tcl_DbNewWideIntObj(longValue, "unknown", 0); @@ -2831,10 +2831,10 @@ Tcl_NewLongObj( Tcl_Obj * Tcl_NewLongObj( - register long longValue) /* Long integer used to initialize the + long longValue) /* Long integer used to initialize the * new object. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclNewIntObj(objPtr, longValue); return objPtr; @@ -2880,14 +2880,14 @@ Tcl_NewLongObj( Tcl_Obj * Tcl_DbNewLongObj( - register long longValue, /* Long integer used to initialize the new + long longValue, /* Long integer used to initialize the new * object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclDbNewObj(objPtr, file, line); /* Optimized TclInvalidateStringRep */ @@ -2902,7 +2902,7 @@ Tcl_DbNewLongObj( Tcl_Obj * Tcl_DbNewLongObj( - register long longValue, /* Long integer used to initialize the new + long longValue, /* Long integer used to initialize the new * object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ @@ -2936,8 +2936,8 @@ Tcl_DbNewLongObj( #undef Tcl_SetLongObj void Tcl_SetLongObj( - register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ - register long longValue) /* Long integer used to initialize the + Tcl_Obj *objPtr, /* Object whose internal rep to init. */ + long longValue) /* Long integer used to initialize the * object's value. */ { if (Tcl_IsShared(objPtr)) { @@ -2972,8 +2972,8 @@ Tcl_SetLongObj( int Tcl_GetLongFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr, /* The object from which to get a long. */ - register long *longPtr) /* Place to store resulting long. */ + Tcl_Obj *objPtr, /* The object from which to get a long. */ + long *longPtr) /* Place to store resulting long. */ { do { #ifdef TCL_WIDE_INT_IS_LONG @@ -3086,7 +3086,7 @@ Tcl_GetLongFromObj( Tcl_Obj * Tcl_NewWideIntObj( - register Tcl_WideInt wideValue) + Tcl_WideInt wideValue) /* Wide integer used to initialize the new * object. */ { @@ -3097,11 +3097,11 @@ Tcl_NewWideIntObj( Tcl_Obj * Tcl_NewWideIntObj( - register Tcl_WideInt wideValue) + Tcl_WideInt wideValue) /* Wide integer used to initialize the new * object. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclNewObj(objPtr); TclSetIntObj(objPtr, wideValue); @@ -3145,7 +3145,7 @@ Tcl_NewWideIntObj( Tcl_Obj * Tcl_DbNewWideIntObj( - register Tcl_WideInt wideValue, + Tcl_WideInt wideValue, /* Wide integer used to initialize the new * object. */ const char *file, /* The name of the source file calling this @@ -3153,7 +3153,7 @@ Tcl_DbNewWideIntObj( int line) /* Line number in the source file; used for * debugging. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclDbNewObj(objPtr, file, line); TclSetIntObj(objPtr, wideValue); @@ -3164,7 +3164,7 @@ Tcl_DbNewWideIntObj( Tcl_Obj * Tcl_DbNewWideIntObj( - register Tcl_WideInt wideValue, + Tcl_WideInt wideValue, /* Long integer used to initialize the new * object. */ const char *file, /* The name of the source file calling this @@ -3196,8 +3196,8 @@ Tcl_DbNewWideIntObj( void Tcl_SetWideIntObj( - register Tcl_Obj *objPtr, /* Object w. internal rep to init. */ - register Tcl_WideInt wideValue) + Tcl_Obj *objPtr, /* Object w. internal rep to init. */ + Tcl_WideInt wideValue) /* Wide integer used to initialize the * object's value. */ { @@ -3232,8 +3232,8 @@ Tcl_SetWideIntObj( int Tcl_GetWideIntFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr, /* Object from which to get a wide int. */ - register Tcl_WideInt *wideIntPtr) + Tcl_Obj *objPtr, /* Object from which to get a wide int. */ + Tcl_WideInt *wideIntPtr) /* Place to store resulting long. */ { do { @@ -3925,7 +3925,7 @@ Tcl_IsShared( void Tcl_DbIncrRefCount( - register Tcl_Obj *objPtr, /* The object we are registering a reference + Tcl_Obj *objPtr, /* The object we are registering a reference * to. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ @@ -3988,7 +3988,7 @@ Tcl_DbIncrRefCount( void Tcl_DbDecrRefCount( - register Tcl_Obj *objPtr, /* The object we are releasing a reference + Tcl_Obj *objPtr, /* The object we are releasing a reference * to. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ @@ -4054,7 +4054,7 @@ Tcl_DbDecrRefCount( int Tcl_DbIsShared( - register Tcl_Obj *objPtr, /* The object to test for being shared. */ + Tcl_Obj *objPtr, /* The object to test for being shared. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for @@ -4126,7 +4126,7 @@ Tcl_DbIsShared( void Tcl_InitObjHashTable( - register Tcl_HashTable *tablePtr) + Tcl_HashTable *tablePtr) /* Pointer to table record, which is supplied * by the caller. */ { @@ -4189,8 +4189,8 @@ TclCompareObjKeys( { Tcl_Obj *objPtr1 = keyPtr; Tcl_Obj *objPtr2 = (Tcl_Obj *) hPtr->key.oneWordValue; - register const char *p1, *p2; - register size_t l1, l2; + const char *p1, *p2; + size_t l1, l2; /* * If the object pointers are the same then they match. @@ -4347,13 +4347,13 @@ Tcl_Command Tcl_GetCommandFromObj( Tcl_Interp *interp, /* The interpreter in which to resolve the * command and to report errors. */ - register Tcl_Obj *objPtr) /* The object containing the command's name. + Tcl_Obj *objPtr) /* The object containing the command's name. * If the name starts with "::", will be * looked up in global namespace. Else, looked * up first in the current namespace, then in * global namespace. */ { - register ResolvedCmdName *resPtr; + ResolvedCmdName *resPtr; /* * Get the internal representation, converting to a command type if @@ -4376,12 +4376,12 @@ Tcl_GetCommandFromObj( resPtr = objPtr->internalRep.twoPtrValue.ptr1; if (objPtr->typePtr == &tclCmdNameType) { - register Command *cmdPtr = resPtr->cmdPtr; + Command *cmdPtr = resPtr->cmdPtr; if ((cmdPtr->cmdEpoch == resPtr->cmdEpoch) && (interp == cmdPtr->nsPtr->interp) && !(cmdPtr->nsPtr->flags & NS_DYING)) { - register Namespace *refNsPtr = (Namespace *) + Namespace *refNsPtr = (Namespace *) TclGetCurrentNamespace(interp); if ((resPtr->refNsPtr == NULL) @@ -4483,12 +4483,12 @@ void TclSetCmdNameObj( Tcl_Interp *interp, /* Points to interpreter containing command * that should be cached in objPtr. */ - register Tcl_Obj *objPtr, /* Points to Tcl object to be changed to a + Tcl_Obj *objPtr, /* Points to Tcl object to be changed to a * CmdName object. */ Command *cmdPtr) /* Points to Command structure that the * CmdName object should refer to. */ { - register ResolvedCmdName *resPtr; + ResolvedCmdName *resPtr; if (objPtr->typePtr == &tclCmdNameType) { resPtr = objPtr->internalRep.twoPtrValue.ptr1; @@ -4523,10 +4523,10 @@ TclSetCmdNameObj( static void FreeCmdNameInternalRep( - register Tcl_Obj *objPtr) /* CmdName object with internal + Tcl_Obj *objPtr) /* CmdName object with internal * representation to free. */ { - register ResolvedCmdName *resPtr = objPtr->internalRep.twoPtrValue.ptr1; + ResolvedCmdName *resPtr = objPtr->internalRep.twoPtrValue.ptr1; /* * Decrement the reference count of the ResolvedCmdName structure. If @@ -4571,9 +4571,9 @@ FreeCmdNameInternalRep( static void DupCmdNameInternalRep( Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ - register Tcl_Obj *copyPtr) /* Object with internal rep to set. */ + Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { - register ResolvedCmdName *resPtr = srcPtr->internalRep.twoPtrValue.ptr1; + ResolvedCmdName *resPtr = srcPtr->internalRep.twoPtrValue.ptr1; copyPtr->internalRep.twoPtrValue.ptr1 = resPtr; copyPtr->internalRep.twoPtrValue.ptr2 = NULL; @@ -4605,11 +4605,11 @@ DupCmdNameInternalRep( static int SetCmdNameFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ + Tcl_Obj *objPtr) /* The object to convert. */ { const char *name; - register Command *cmdPtr; - register ResolvedCmdName *resPtr; + Command *cmdPtr; + ResolvedCmdName *resPtr; if (interp == NULL) { return TCL_ERROR; diff --git a/generic/tclParse.c b/generic/tclParse.c index 164905a..4cd335b 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -195,19 +195,19 @@ Tcl_ParseCommand( * NULL, then no error message is provided. */ const char *start, /* First character of string containing one or * more Tcl commands. */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the script consists of all bytes up to the * first null character. */ int nested, /* Non-zero means this is a nested command: * close bracket should be considered a * command terminator. If zero, then close * bracket has no special meaning. */ - register Tcl_Parse *parsePtr) + Tcl_Parse *parsePtr) /* Structure to fill in with information about * the parsed command; any previous * information in the structure is ignored. */ { - register const char *src; /* Points to current character in the + const char *src; /* Points to current character in the * command. */ char type; /* Result returned by CHAR_TYPE(*src). */ Tcl_Token *tokenPtr; /* Pointer to token being filled in. */ @@ -620,14 +620,14 @@ TclIsBareword( static int ParseWhiteSpace( const char *src, /* First character to parse. */ - register int numBytes, /* Max number of bytes to scan. */ + int numBytes, /* Max number of bytes to scan. */ int *incompletePtr, /* Set this boolean memory to true if parsing * indicates an incomplete command. */ char *typePtr) /* Points to location to store character type * of character that ends run of whitespace */ { - register char type = TYPE_NORMAL; - register const char *p = src; + char type = TYPE_NORMAL; + const char *p = src; while (1) { while (numBytes && ((type = CHAR_TYPE(*p)) & TYPE_SPACE)) { @@ -729,7 +729,7 @@ TclParseHex( * conversion is to be written. */ { int result = 0; - register const char *p = src; + const char *p = src; while (numBytes--) { unsigned char digit = UCHAR(*p); @@ -787,7 +787,7 @@ TclParseBackslash( * written. At most TCL_UTF_MAX bytes will be * written there. */ { - register const char *p = src+1; + const char *p = src+1; Tcl_UniChar unichar = 0; int result; int count; @@ -967,12 +967,12 @@ TclParseBackslash( static int ParseComment( const char *src, /* First character to parse. */ - register int numBytes, /* Max number of bytes to scan. */ + int numBytes, /* Max number of bytes to scan. */ Tcl_Parse *parsePtr) /* Information about parse in progress. * Updated if parsing indicates an incomplete * command. */ { - register const char *p = src; + const char *p = src; int incomplete = parsePtr->incomplete; while (numBytes) { @@ -1039,8 +1039,8 @@ ParseComment( static int ParseTokens( - register const char *src, /* First character to parse. */ - register int numBytes, /* Max number of bytes to scan. */ + const char *src, /* First character to parse. */ + int numBytes, /* Max number of bytes to scan. */ int mask, /* Specifies when to stop parsing. The parse * stops at the first unquoted character whose * CHAR_TYPE contains any of the bits in @@ -1318,7 +1318,7 @@ Tcl_ParseVarName( * NULL, then no error message is provided. */ const char *start, /* Start of variable substitution string. * First character must be "$". */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the string consists of all bytes up to the * first null character. */ Tcl_Parse *parsePtr, /* Structure to fill in with information about @@ -1329,7 +1329,7 @@ Tcl_ParseVarName( * reinitialize it. */ { Tcl_Token *tokenPtr; - register const char *src; + const char *src; int varIndex; unsigned array; @@ -1511,13 +1511,13 @@ Tcl_ParseVarName( const char * Tcl_ParseVar( Tcl_Interp *interp, /* Context for looking up variable. */ - register const char *start, /* Start of variable substitution. First + const char *start, /* Start of variable substitution. First * character must be "$". */ const char **termPtr) /* If non-NULL, points to word to fill in with * character just after last one in the * variable specifier. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; int code; Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); @@ -1596,10 +1596,10 @@ Tcl_ParseBraces( * NULL, then no error message is provided. */ const char *start, /* Start of string enclosed in braces. The * first character must be {'. */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the string consists of all bytes up to the * first null character. */ - register Tcl_Parse *parsePtr, + Tcl_Parse *parsePtr, /* Structure to fill in with information about * the string. */ int append, /* Non-zero means append tokens to existing @@ -1612,7 +1612,7 @@ Tcl_ParseBraces( * successful. */ { Tcl_Token *tokenPtr; - register const char *src; + const char *src; int startIndex, level, length; if ((numBytes == 0) || (start == NULL)) { @@ -1738,7 +1738,7 @@ Tcl_ParseBraces( */ { - register int openBrace = 0; + int openBrace = 0; while (--src > start) { switch (*src) { @@ -1798,10 +1798,10 @@ Tcl_ParseQuotedString( * NULL, then no error message is provided. */ const char *start, /* Start of the quoted string. The first * character must be '"'. */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the string consists of all bytes up to the * first null character. */ - register Tcl_Parse *parsePtr, + Tcl_Parse *parsePtr, /* Structure to fill in with information about * the string. */ int append, /* Non-zero means append tokens to existing diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 3703aaf..79a997e 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2501,7 +2501,7 @@ DupFsPathInternalRep( static void UpdateStringOfFsPath( - register Tcl_Obj *pathPtr) /* path obj with string rep to update. */ + Tcl_Obj *pathPtr) /* path obj with string rep to update. */ { FsPath *fsPathPtr = PATHOBJ(pathPtr); int cwdLen; diff --git a/generic/tclPipe.c b/generic/tclPipe.c index 63fd2fa..34b75f7 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -183,7 +183,7 @@ Tcl_DetachPids( * array pointed to by pidPtr. */ Tcl_Pid *pidPtr) /* Array of pids to detach. */ { - register Detached *detPtr; + Detached *detPtr; int i; Tcl_MutexLock(&pipeMutex); @@ -219,7 +219,7 @@ Tcl_DetachPids( void Tcl_ReapDetachedProcs(void) { - register Detached *detPtr; + Detached *detPtr; Detached *nextPtr, *prevPtr; int status, code; diff --git a/generic/tclProc.c b/generic/tclProc.c index afa00ee..e82f249 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -157,7 +157,7 @@ Tcl_ProcObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; Proc *procPtr; const char *procName; const char *simpleName, *procArgs, *procBody; @@ -405,9 +405,9 @@ TclCreateProc( { Interp *iPtr = (Interp *) interp; - register Proc *procPtr = NULL; + Proc *procPtr = NULL; int i, result, numArgs; - register CompiledLocal *localPtr = NULL; + CompiledLocal *localPtr = NULL; Tcl_Obj **argArray; int precompiled = 0; @@ -761,7 +761,7 @@ TclObjGetFrame( CallFrame **framePtrPtr) /* Store pointer to frame here (or NULL if * global frame indicated). */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; int curLevel, level, result; const Tcl_ObjIntRep *irPtr; const char *name = NULL; @@ -898,7 +898,7 @@ TclNRUplevelObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; CmdFrame *invoker = NULL; int word = 0; int result; @@ -1038,7 +1038,7 @@ ProcWrongNumArgs( int skip) { CallFrame *framePtr = ((Interp *)interp)->varFramePtr; - register Proc *procPtr = framePtr->procPtr; + Proc *procPtr = framePtr->procPtr; int localCt = procPtr->numCompiledLocals, numArgs, i; Tcl_Obj **desiredObjs; const char *final = NULL; @@ -1063,7 +1063,7 @@ ProcWrongNumArgs( Tcl_IncrRefCount(desiredObjs[0]); if (localCt > 0) { - register Var *defPtr = (Var *) (&framePtr->localCachePtr->varName0 + localCt); + Var *defPtr = (Var *) (&framePtr->localCachePtr->varName0 + localCt); for (i=1 ; i<=numArgs ; i++, defPtr++) { Tcl_Obj *argObj; @@ -1254,7 +1254,7 @@ InitResolvedLocals( resVarInfo = localPtr->resolveInfo; if (resVarInfo && resVarInfo->fetchProc) { - register Var *resolvedVarPtr = (Var *) + Var *resolvedVarPtr = (Var *) resVarInfo->fetchProc(interp, resVarInfo); if (resolvedVarPtr) { @@ -1277,7 +1277,7 @@ TclFreeLocalCache( Tcl_Obj **namePtrPtr = &localCachePtr->varName0; for (i = 0; i < localCachePtr->numVars; i++, namePtrPtr++) { - register Tcl_Obj *objPtr = *namePtrPtr; + Tcl_Obj *objPtr = *namePtrPtr; if (objPtr) { /* TclReleaseLiteral calls Tcl_DecrRefCount for us */ @@ -1363,16 +1363,16 @@ InitLocalCache( static int InitArgsAndLocals( - register Tcl_Interp *interp,/* Interpreter in which procedure was + Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ Tcl_Obj *procNameObj, /* Procedure name for error reporting. */ int skip) /* Number of initial arguments to be skipped, * i.e., words in the "command name". */ { CallFrame *framePtr = ((Interp *)interp)->varFramePtr; - register Proc *procPtr = framePtr->procPtr; + Proc *procPtr = framePtr->procPtr; ByteCode *codePtr; - register Var *varPtr, *defPtr; + Var *varPtr, *defPtr; int localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax; Tcl_Obj *const *argObjs; @@ -1530,7 +1530,7 @@ int TclPushProcCallFrame( ClientData clientData, /* Record describing procedure to be * interpreted. */ - register Tcl_Interp *interp,/* Interpreter in which procedure was + Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ int objc, /* Count of number of arguments to this * procedure. */ @@ -1622,7 +1622,7 @@ int TclObjInterpProc( ClientData clientData, /* Record describing procedure to be * interpreted. */ - register Tcl_Interp *interp,/* Interpreter in which procedure was + Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ int objc, /* Count of number of arguments to this * procedure. */ @@ -1639,7 +1639,7 @@ int TclNRInterpProc( ClientData clientData, /* Record describing procedure to be * interpreted. */ - register Tcl_Interp *interp,/* Interpreter in which procedure was + Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ int objc, /* Count of number of arguments to this * procedure. */ @@ -1674,7 +1674,7 @@ TclNRInterpProc( int TclNRInterpProcCore( - register Tcl_Interp *interp,/* Interpreter in which procedure was + Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ Tcl_Obj *procNameObj, /* Procedure name for error reporting. */ int skip, /* Number of initial arguments to be skipped, @@ -1683,7 +1683,7 @@ TclNRInterpProcCore( * results of the overall procedure. */ { Interp *iPtr = (Interp *) interp; - register Proc *procPtr = iPtr->varFramePtr->procPtr; + Proc *procPtr = iPtr->varFramePtr->procPtr; int result; CallFrame *freePtr; ByteCode *codePtr; @@ -1700,8 +1700,8 @@ TclNRInterpProcCore( #if defined(TCL_COMPILE_DEBUG) if (tclTraceExec >= 1) { - register CallFrame *framePtr = iPtr->varFramePtr; - register int i; + CallFrame *framePtr = iPtr->varFramePtr; + int i; if (framePtr->isProcCallFrame & FRAME_IS_LAMBDA) { fprintf(stdout, "Calling lambda "); @@ -2119,9 +2119,9 @@ TclProcDeleteProc( void TclProcCleanupProc( - register Proc *procPtr) /* Procedure to be deleted. */ + Proc *procPtr) /* Procedure to be deleted. */ { - register CompiledLocal *localPtr; + CompiledLocal *localPtr; Tcl_Obj *bodyPtr = procPtr->bodyPtr; Tcl_Obj *defPtr; Tcl_ResolvedVarInfo *resVarInfo; @@ -2370,7 +2370,7 @@ ProcBodyFree( static void DupLambdaInternalRep( Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ - register Tcl_Obj *copyPtr) /* Object with internal rep to set. */ + Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { Proc *procPtr; Tcl_Obj *nsObjPtr; @@ -2385,7 +2385,7 @@ DupLambdaInternalRep( static void FreeLambdaInternalRep( - register Tcl_Obj *objPtr) /* CmdName object with internal representation + Tcl_Obj *objPtr) /* CmdName object with internal representation * to free. */ { Proc *procPtr; @@ -2403,7 +2403,7 @@ FreeLambdaInternalRep( static int SetLambdaFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ + Tcl_Obj *objPtr) /* The object to convert. */ { Interp *iPtr = (Interp *) interp; const char *name; diff --git a/generic/tclResult.c b/generic/tclResult.c index 4d14f01..40c452e 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -414,14 +414,14 @@ void Tcl_SetResult( Tcl_Interp *interp, /* Interpreter with which to associate the * return value. */ - register char *result, /* Value to be returned. If NULL, the result + char *result, /* Value to be returned. If NULL, the result * is set to an empty string. */ Tcl_FreeProc *freeProc) /* Gives information about the string: * TCL_STATIC, TCL_VOLATILE, or the address of * a Tcl_FreeProc such as free. */ { Interp *iPtr = (Interp *) interp; - register Tcl_FreeProc *oldFreeProc = iPtr->freeProc; + Tcl_FreeProc *oldFreeProc = iPtr->freeProc; char *oldResult = iPtr->result; if (result == NULL) { @@ -484,7 +484,7 @@ Tcl_SetResult( const char * Tcl_GetStringResult( - register Tcl_Interp *interp)/* Interpreter whose result to return. */ + Tcl_Interp *interp)/* Interpreter whose result to return. */ { Interp *iPtr = (Interp *) interp; /* @@ -523,11 +523,11 @@ void Tcl_SetObjResult( Tcl_Interp *interp, /* Interpreter with which to associate the * return object value. */ - register Tcl_Obj *objPtr) /* Tcl object to be returned. If NULL, the obj + Tcl_Obj *objPtr) /* Tcl object to be returned. If NULL, the obj * result is made an empty string object. */ { - register Interp *iPtr = (Interp *) interp; - register Tcl_Obj *oldObjResult = iPtr->objResultPtr; + Interp *iPtr = (Interp *) interp; + Tcl_Obj *oldObjResult = iPtr->objResultPtr; iPtr->objResultPtr = objPtr; Tcl_IncrRefCount(objPtr); /* since interp result is a reference */ @@ -582,7 +582,7 @@ Tcl_Obj * Tcl_GetObjResult( Tcl_Interp *interp) /* Interpreter whose result to return. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; #ifndef TCL_NO_DEPRECATED Tcl_Obj *objResultPtr; int length; @@ -879,9 +879,9 @@ SetupAppendBuffer( void Tcl_FreeResult( - register Tcl_Interp *interp)/* Interpreter for which to free result. */ + Tcl_Interp *interp)/* Interpreter for which to free result. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; #ifndef TCL_NO_DEPRECATED if (iPtr->freeProc != NULL) { @@ -918,9 +918,9 @@ Tcl_FreeResult( void Tcl_ResetResult( - register Tcl_Interp *interp)/* Interpreter for which to clear result. */ + Tcl_Interp *interp)/* Interpreter for which to clear result. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; ResetObjResult(iPtr); #ifndef TCL_NO_DEPRECATED @@ -983,10 +983,10 @@ Tcl_ResetResult( static void ResetObjResult( - register Interp *iPtr) /* Points to the interpreter whose result + Interp *iPtr) /* Points to the interpreter whose result * object should be reset. */ { - register Tcl_Obj *objResultPtr = iPtr->objResultPtr; + Tcl_Obj *objResultPtr = iPtr->objResultPtr; if (Tcl_IsShared(objResultPtr)) { TclDecrRefCount(objResultPtr); diff --git a/generic/tclTest.c b/generic/tclTest.c index 4eb8519..067d4a0 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -5176,7 +5176,7 @@ TestbytestringObjCmd( static int TestsetCmd( void *data, /* Additional flags for Get/SetVar2. */ - register Tcl_Interp *interp,/* Current interpreter. */ + Tcl_Interp *interp,/* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { @@ -5208,7 +5208,7 @@ TestsetCmd( static int Testset2Cmd( void *data, /* Additional flags for Get/SetVar2. */ - register Tcl_Interp *interp,/* Current interpreter. */ + Tcl_Interp *interp,/* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { @@ -5259,7 +5259,7 @@ Testset2Cmd( static int TestsaveresultCmd( void *dummy, /* Not used. */ - register Tcl_Interp *interp,/* Current interpreter. */ + Tcl_Interp *interp,/* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { @@ -5390,7 +5390,7 @@ TestsaveresultFree( static int TestmainthreadCmd( void *dummy, /* Not used. */ - register Tcl_Interp *interp,/* Current interpreter. */ + Tcl_Interp *interp,/* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { @@ -5451,7 +5451,7 @@ MainLoop(void) static int TestsetmainloopCmd( void *dummy, /* Not used. */ - register Tcl_Interp *interp,/* Current interpreter. */ + Tcl_Interp *interp,/* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { @@ -5480,7 +5480,7 @@ TestsetmainloopCmd( static int TestexitmainloopCmd( void *dummy, /* Not used. */ - register Tcl_Interp *interp,/* Current interpreter. */ + Tcl_Interp *interp,/* Current interpreter. */ int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index c9e4a6f..82a8c45 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -53,7 +53,7 @@ static int TeststringobjCmd(ClientData dummy, Tcl_Interp *interp, static void VarPtrDeleteProc(ClientData clientData, Tcl_Interp *interp) { - register int i; + int i; Tcl_Obj **varPtr = (Tcl_Obj **) clientData; for (i = 0; i < NUMBER_OF_OBJECT_VARS; i++) { if (varPtr[i]) Tcl_DecrRefCount(varPtr[i]); @@ -91,7 +91,7 @@ int TclObjTest_Init( Tcl_Interp *interp) { - register int i; + int i; /* * An array of Tcl_Obj pointers used in the commands that operate on or get * the values of Tcl object-valued variables. varPtr[i] is the i-th variable's diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index 3f1abc2..60d7b0c 100644 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -248,7 +248,7 @@ TclFreeAllocCache( { Cache *cachePtr = arg; Cache **nextPtrPtr; - register unsigned int bucket; + unsigned int bucket; /* * Flush blocks. @@ -305,7 +305,7 @@ TclpAlloc( { Cache *cachePtr; Block *blockPtr; - register int bucket; + int bucket; size_t size; #ifndef __LP64__ @@ -537,8 +537,8 @@ TclpRealloc( Tcl_Obj * TclThreadAllocObj(void) { - register Cache *cachePtr; - register Tcl_Obj *objPtr; + Cache *cachePtr; + Tcl_Obj *objPtr; GETCACHE(cachePtr); @@ -548,7 +548,7 @@ TclThreadAllocObj(void) */ if (cachePtr->numObjects == 0) { - register int numMove; + int numMove; Tcl_MutexLock(objLockPtr); numMove = sharedPtr->numObjects; @@ -709,7 +709,7 @@ MoveObjs( Cache *toPtr, int numMove) { - register Tcl_Obj *objPtr = fromPtr->firstObjPtr; + Tcl_Obj *objPtr = fromPtr->firstObjPtr; Tcl_Obj *fromFirstObjPtr = objPtr; toPtr->numObjects += numMove; @@ -810,7 +810,7 @@ Block2Ptr( int bucket, unsigned int reqSize) { - register void *ptr; + void *ptr; blockPtr->magicNum1 = blockPtr->magicNum2 = MAGIC; blockPtr->sourceBucket = bucket; @@ -826,7 +826,7 @@ static Block * Ptr2Block( char *ptr) { - register Block *blockPtr; + Block *blockPtr; blockPtr = (((Block *) ptr) - 1); if (blockPtr->magicNum1 != MAGIC || blockPtr->magicNum2 != MAGIC) { @@ -960,8 +960,8 @@ GetBlocks( Cache *cachePtr, int bucket) { - register Block *blockPtr; - register int n; + Block *blockPtr; + int n; /* * First, atttempt to move blocks from the shared cache. Note the @@ -1006,7 +1006,7 @@ GetBlocks( } if (cachePtr->buckets[bucket].numFree == 0) { - register size_t size; + size_t size; /* * If no blocks could be moved from shared, first look for a larger diff --git a/generic/tclTimer.c b/generic/tclTimer.c index ea80320..934b329 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -217,7 +217,7 @@ TimerExitProc( Tcl_DeleteEventSource(TimerSetupProc, TimerCheckProc, NULL); if (tsdPtr != NULL) { - register TimerHandler *timerHandlerPtr; + TimerHandler *timerHandlerPtr; timerHandlerPtr = tsdPtr->firstTimerHandlerPtr; while (timerHandlerPtr != NULL) { @@ -294,7 +294,7 @@ TclCreateAbsoluteTimerHandler( Tcl_TimerProc *proc, ClientData clientData) { - register TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr; + TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr; ThreadSpecificData *tsdPtr = InitTimer(); timerHandlerPtr = ckalloc(sizeof(TimerHandler)); @@ -355,7 +355,7 @@ Tcl_DeleteTimerHandler( Tcl_TimerToken token) /* Result previously returned by * Tcl_DeleteTimerHandler. */ { - register TimerHandler *timerHandlerPtr, *prevPtr; + TimerHandler *timerHandlerPtr, *prevPtr; ThreadSpecificData *tsdPtr = InitTimer(); if (token == NULL) { @@ -621,7 +621,7 @@ Tcl_DoWhenIdle( Tcl_IdleProc *proc, /* Function to invoke. */ ClientData clientData) /* Arbitrary value to pass to proc. */ { - register IdleHandler *idlePtr; + IdleHandler *idlePtr; Tcl_Time blockTime; ThreadSpecificData *tsdPtr = InitTimer(); @@ -665,7 +665,7 @@ Tcl_CancelIdleCall( Tcl_IdleProc *proc, /* Function that was previously registered. */ ClientData clientData) /* Arbitrary value to pass to proc. */ { - register IdleHandler *idlePtr, *prevPtr; + IdleHandler *idlePtr, *prevPtr; IdleHandler *nextPtr; ThreadSpecificData *tsdPtr = InitTimer(); diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 1a6d459..ca246fb 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -136,7 +136,7 @@ static int StringTraceProc(ClientData clientData, static void StringTraceDeleteProc(ClientData clientData); static void DisposeTraceResult(int flags, char *result); static int TraceVarEx(Tcl_Interp *interp, const char *part1, - const char *part2, register VarTrace *tracePtr); + const char *part2, VarTrace *tracePtr); /* * The following structure holds the client data for string-based @@ -1049,7 +1049,7 @@ Tcl_CommandTraceInfo( * call will return the first trace. */ { Command *cmdPtr; - register CommandTrace *tracePtr; + CommandTrace *tracePtr; cmdPtr = (Command *) Tcl_FindCommand(interp, cmdName, NULL, TCL_LEAVE_ERR_MSG); @@ -1114,7 +1114,7 @@ Tcl_TraceCommand( ClientData clientData) /* Arbitrary argument to pass to proc. */ { Command *cmdPtr; - register CommandTrace *tracePtr; + CommandTrace *tracePtr; cmdPtr = (Command *) Tcl_FindCommand(interp, cmdName, NULL, TCL_LEAVE_ERR_MSG); @@ -1177,7 +1177,7 @@ Tcl_UntraceCommand( Tcl_CommandTraceProc *proc, /* Function assocated with trace. */ ClientData clientData) /* Arbitrary argument to pass to proc. */ { - register CommandTrace *tracePtr; + CommandTrace *tracePtr; CommandTrace *prevPtr; Command *cmdPtr; Interp *iPtr = (Interp *) interp; @@ -1672,13 +1672,13 @@ TclCheckInterpTraces( static int CallTraceFunction( Tcl_Interp *interp, /* The current interpreter. */ - register Trace *tracePtr, /* Describes the trace function to call. */ + Trace *tracePtr, /* Describes the trace function to call. */ Command *cmdPtr, /* Points to command's Command struct. */ const char *command, /* Points to the first character of the * command's source before substitutions. */ int numChars, /* The number of characters in the command's * source. */ - register int objc, /* Number of arguments for the command. */ + int objc, /* Number of arguments for the command. */ Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */ { Interp *iPtr = (Interp *) interp; @@ -1920,7 +1920,7 @@ TraceExecutionProc( if ((flags & TCL_TRACE_ENTER_EXEC) && (tcmdPtr->stepTrace == NULL) && (tcmdPtr->flags & (TCL_TRACE_ENTER_DURING_EXEC | TCL_TRACE_LEAVE_DURING_EXEC))) { - register unsigned len = strlen(command) + 1; + unsigned len = strlen(command) + 1; tcmdPtr->startLevel = level; tcmdPtr->startCmd = ckalloc(len); @@ -2065,7 +2065,7 @@ TraceVarProc( } } if (destroy && result != NULL) { - register Tcl_Obj *errMsgObj = (Tcl_Obj *) result; + Tcl_Obj *errMsgObj = (Tcl_Obj *) result; Tcl_DecrRefCount(errMsgObj); result = NULL; @@ -2142,8 +2142,8 @@ Tcl_CreateObjTrace( Tcl_CmdObjTraceDeleteProc *delProc) /* Function to call when trace is deleted */ { - register Trace *tracePtr; - register Interp *iPtr = (Interp *) interp; + Trace *tracePtr; + Interp *iPtr = (Interp *) interp; /* * Test if this trace allows inline compilation of commands. @@ -2342,7 +2342,7 @@ Tcl_DeleteTrace( { Interp *iPtr = (Interp *) interp; Trace *prevPtr, *tracePtr = (Trace *) trace; - register Trace **tracePtr2 = &iPtr->tracePtr; + Trace **tracePtr2 = &iPtr->tracePtr; ActiveInterpTrace *activePtr; /* @@ -2534,7 +2534,7 @@ TclCheckArrayTraces( int TclObjCallVarTraces( Interp *iPtr, /* Interpreter containing variable. */ - register Var *arrayPtr, /* Pointer to array variable that contains the + Var *arrayPtr, /* Pointer to array variable that contains the * variable, or NULL if the variable isn't an * element of an array. */ Var *varPtr, /* Variable whose traces are to be invoked. */ @@ -2568,7 +2568,7 @@ TclObjCallVarTraces( int TclCallVarTraces( Interp *iPtr, /* Interpreter containing variable. */ - register Var *arrayPtr, /* Pointer to array variable that contains the + Var *arrayPtr, /* Pointer to array variable that contains the * variable, or NULL if the variable isn't an * element of an array. */ Var *varPtr, /* Variable whose traces are to be invoked. */ @@ -2581,7 +2581,7 @@ TclCallVarTraces( * error, then leave an error message and * stack trace information in *iPTr. */ { - register VarTrace *tracePtr; + VarTrace *tracePtr; ActiveVarTrace active; char *result; const char *openParen, *p; @@ -2911,7 +2911,7 @@ Tcl_UntraceVar2( Tcl_VarTraceProc *proc, /* Function assocated with trace. */ ClientData clientData) /* Arbitrary argument to pass to proc. */ { - register VarTrace *tracePtr; + VarTrace *tracePtr; VarTrace *prevPtr, *nextPtr; Var *varPtr, *arrayPtr; Interp *iPtr = (Interp *) interp; @@ -3103,7 +3103,7 @@ Tcl_VarTraceInfo2( hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); if (hPtr) { - register VarTrace *tracePtr = Tcl_GetHashValue(hPtr); + VarTrace *tracePtr = Tcl_GetHashValue(hPtr); if (prevClientData != NULL) { for (; tracePtr != NULL; tracePtr = tracePtr->nextPtr) { @@ -3201,7 +3201,7 @@ Tcl_TraceVar2( * invoked upon varName. */ ClientData clientData) /* Arbitrary argument to pass to proc. */ { - register VarTrace *tracePtr; + VarTrace *tracePtr; int result; tracePtr = ckalloc(sizeof(VarTrace)); @@ -3246,7 +3246,7 @@ TraceVarEx( const char *part2, /* Name of element within array; NULL means * trace applies to scalar variable or array * as-a-whole. */ - register VarTrace *tracePtr)/* Structure containing flags, traceProc and + VarTrace *tracePtr)/* Structure containing flags, traceProc and * clientData fields. Others should be left * blank. Will be ckfree()d (eventually) if * this function returns TCL_OK, and up to diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 86d1913..542a82a 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -352,8 +352,8 @@ static const unsigned short cp1252[32] = { int Tcl_UtfToUniChar( - register const char *src, /* The UTF-8 string. */ - register Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by + const char *src, /* The UTF-8 string. */ + Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by * the UTF-8 string. */ { Tcl_UniChar byte; @@ -731,12 +731,12 @@ Tcl_UtfCharComplete( int Tcl_NumUtfChars( - register const char *src, /* The UTF-8 string to measure. */ + const char *src, /* The UTF-8 string to measure. */ int length) /* The length of the string in bytes, or -1 * for strlen(string). */ { Tcl_UniChar ch = 0; - register int i = 0; + int i = 0; /* * The separate implementations are faster. @@ -752,7 +752,7 @@ Tcl_NumUtfChars( } if (i < 0) i = INT_MAX; /* Bug [2738427] */ } else { - register const char *endPtr = src + length - 4; + const char *endPtr = src + length - 4; while (src < endPtr) { src += TclUtfToUniChar(src, &ch); @@ -968,8 +968,8 @@ Tcl_UtfPrev( int Tcl_UniCharAtIndex( - register const char *src, /* The UTF-8 string to dereference. */ - register int index) /* The position of the desired character. */ + const char *src, /* The UTF-8 string to dereference. */ + int index) /* The position of the desired character. */ { Tcl_UniChar ch = 0; int fullchar = 0; @@ -1016,8 +1016,8 @@ Tcl_UniCharAtIndex( const char * Tcl_UtfAtIndex( - register const char *src, /* The UTF-8 string. */ - register int index) /* The position of the desired character. */ + const char *src, /* The UTF-8 string. */ + int index) /* The position of the desired character. */ { Tcl_UniChar ch = 0; int len = 0; @@ -1323,7 +1323,7 @@ TclpUtfNcmp2( * fine in the strcmp manner. */ - register int result = 0; + int result = 0; for ( ; numBytes != 0; numBytes--, cs++, ct++) { if (*cs != *ct) { diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 4387c75..8bf3eb3 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -943,8 +943,8 @@ Tcl_SplitList( int Tcl_ScanElement( - register const char *src, /* String to convert to list element. */ - register int *flagPtr) /* Where to store information to guide + const char *src, /* String to convert to list element. */ + int *flagPtr) /* Where to store information to guide * Tcl_ConvertCountedElement. */ { return Tcl_ScanCountedElement(src, -1, flagPtr); @@ -1323,9 +1323,9 @@ TclScanElement( int Tcl_ConvertElement( - register const char *src, /* Source information for list element. */ - register char *dst, /* Place to put list-ified element. */ - register int flags) /* Flags produced by Tcl_ScanElement. */ + const char *src, /* Source information for list element. */ + char *dst, /* Place to put list-ified element. */ + int flags) /* Flags produced by Tcl_ScanElement. */ { return Tcl_ConvertCountedElement(src, -1, dst, flags); } @@ -1353,7 +1353,7 @@ Tcl_ConvertElement( int Tcl_ConvertCountedElement( - register const char *src, /* Source information for list element. */ + const char *src, /* Source information for list element. */ int length, /* Number of bytes in src, or -1. */ char *dst, /* Place to put list-ified element. */ int flags) /* Flags produced by Tcl_ScanElement. */ @@ -1386,7 +1386,7 @@ Tcl_ConvertCountedElement( int TclConvertElement( - register const char *src, /* Source information for list element. */ + const char *src, /* Source information for list element. */ int length, /* Number of bytes in src, or -1. */ char *dst, /* Place to put list-ified element. */ int flags) /* Flags produced by Tcl_ScanElement. */ @@ -4192,7 +4192,7 @@ TclCheckBadOctal( * errors. */ const char *value) /* String to check. */ { - register const char *p = value; + const char *p = value; /* * A frequent mistake is invalid octal values due to an unwanted leading diff --git a/generic/tclVar.c b/generic/tclVar.c index e8ebd3c..4849839 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -532,7 +532,7 @@ TclLookupVar( Var * TclObjLookupVar( Tcl_Interp *interp, /* Interpreter to use for lookup. */ - register Tcl_Obj *part1Ptr, /* If part2 isn't NULL, this is the name of an + Tcl_Obj *part1Ptr, /* If part2 isn't NULL, this is the name of an * array. Otherwise, this is a full variable * name that could include a parenthesized * array element. */ @@ -605,7 +605,7 @@ TclObjLookupVarEx( { Interp *iPtr = (Interp *) interp; CallFrame *varFramePtr = iPtr->varFramePtr; - register Var *varPtr; /* Points to the variable's in-frame Var + Var *varPtr; /* Points to the variable's in-frame Var * structure. */ const char *errMsg = NULL; int index, parsed = 0; @@ -984,7 +984,7 @@ TclLookupSimpleVar( int localLen; for (i=0 ; ikey.objPtr; - register const char *p1, *p2; - register int l1, l2; + const char *p1, *p2; + int l1, l2; /* * If the object pointers are the same then they match. diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 7c65088..bc5998e 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -689,7 +689,7 @@ SetOSTypeFromAny( static void UpdateStringOfOSType( - register Tcl_Obj *objPtr) /* OSType object whose string rep to + Tcl_Obj *objPtr) /* OSType object whose string rep to * update. */ { const int size = TCL_UTF_MAX * 4; diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c index e5d9729..fea9494 100644 --- a/unix/tclLoadAix.c +++ b/unix/tclLoadAix.c @@ -98,7 +98,7 @@ dlopen( const char *path, int mode) { - register ModulePtr mp; + ModulePtr mp; static void *mainModule; /* @@ -191,7 +191,7 @@ dlopen( */ if (mode & RTLD_GLOBAL) { - register ModulePtr mp1; + ModulePtr mp1; for (mp1 = mp->next; mp1; mp1 = mp1->next) { if (loadbind(0, mp1->entry, mp->entry) == -1) { @@ -243,7 +243,7 @@ static void caterr( char *s) { - register char *p = s; + char *p = s; while (*p >= '0' && *p <= '9') { p++; @@ -282,9 +282,9 @@ dlsym( void *handle, const char *symbol) { - register ModulePtr mp = (ModulePtr)handle; - register ExportPtr ep; - register int i; + ModulePtr mp = (ModulePtr)handle; + ExportPtr ep; + int i; /* * Could speed up the search, but I assume that one assigns the result to @@ -317,9 +317,9 @@ int dlclose( void *handle) { - register ModulePtr mp = (ModulePtr)handle; + ModulePtr mp = (ModulePtr)handle; int result; - register ModulePtr mp1; + ModulePtr mp1; if (--mp->refCnt > 0) { return 0; @@ -343,8 +343,8 @@ dlclose( } if (mp->exports) { - register ExportPtr ep; - register int i; + ExportPtr ep; + int i; for (ep = mp->exports, i = mp->nExports; i; i--, ep++) { if (ep->name) { free(ep->name); diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index aa25c6b..1ed3f59 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -685,8 +685,8 @@ CopyGrp( char *buf, int buflen) { - register char *p = buf; - register int copied, len = 0; + char *p = buf; + int copied, len = 0; /* * Copy username. diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 90b5384..004fbff 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -1001,7 +1001,7 @@ TclpFindVariable( * searches). */ { int i, result = -1; - register const char *env, *p1, *p2; + const char *env, *p1, *p2; Tcl_DString envString; Tcl_DStringInit(&envString); diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 60340b0..35eca8d 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -844,7 +844,7 @@ Tcl_Mutex * TclpNewAllocMutex(void) { AllocMutex *lockPtr; - register PMutex *plockPtr; + PMutex *plockPtr; lockPtr = malloc(sizeof(AllocMutex)); if (lockPtr == NULL) { diff --git a/win/tclWinInit.c b/win/tclWinInit.c index f4c6e06..e82d74b 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -628,7 +628,7 @@ TclpFindVariable( * searches). */ { int i, length, result = -1; - register const char *env, *p1, *p2; + const char *env, *p1, *p2; char *envUpper, *nameUpper; Tcl_DString envString; -- cgit v0.12 From 2160b3cc72a88c261c5428c041546cd131e5993c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 11 Aug 2019 22:01:41 +0000 Subject: Mark 3 testcases as knownMsvcBug. See: [e484a8407cb9ec45]: pipe: time-related sporadic hangs in io/chan-io tests --- tests/chanio.test | 3 ++- tests/io.test | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 230d37c..43da3f3 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -43,6 +43,7 @@ namespace eval ::tcl::test::io { testConstraint testfevent [llength [info commands testfevent]] testConstraint testchannelevent [llength [info commands testchannelevent]] testConstraint testmainthread [llength [info commands testmainthread]] + testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] # You need a *very* special environment to do some tests. In particular, # many file systems do not support large-files... @@ -2790,7 +2791,7 @@ test chan-io-29.34 {Tcl_Chan Close, async flush on chan close, using sockets} -s chan puts $s $l } } -} -constraints {socket tempNotMac fileevent} -body { +} -constraints {socket tempNotMac fileevent knownMsvcBug} -body { proc accept {s a p} { variable x chan event $s readable [namespace code [list readit $s]] diff --git a/tests/io.test b/tests/io.test index fe1052a..0a9439b 100644 --- a/tests/io.test +++ b/tests/io.test @@ -43,6 +43,7 @@ testConstraint testfevent [llength [info commands testfevent]] testConstraint testchannelevent [llength [info commands testchannelevent]] testConstraint testmainthread [llength [info commands testmainthread]] testConstraint testobj [llength [info commands testobj]] +testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] # You need a *very* special environment to do some tests. In # particular, many file systems do not support large-files... @@ -2228,7 +2229,7 @@ test io-27.5 {FlushChannel, implicit flush when buffer fills and on close} \ set path(pipe) [makeFile {} pipe] set path(output) [makeFile {} output] test io-27.6 {FlushChannel, async flushing, async close} \ - {stdio asyncPipeClose openpipe} { + {stdio asyncPipeClose openpipe knownMsvcBug} { # This test may fail on old Unix systems (seen on IRIX64 6.5) with # obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197. file delete $path(pipe) @@ -2832,7 +2833,7 @@ test io-29.31 {Tcl_WriteChars, background flush} {stdio openpipe} { set result } ok test io-29.32 {Tcl_WriteChars, background flush to slow reader} \ - {stdio asyncPipeClose openpipe} { + {stdio asyncPipeClose openpipe knownMsvcBug} { # This test may fail on old Unix systems (seen on IRIX64 6.5) with # obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197. file delete $path(pipe) -- cgit v0.12 From 57d789d9a9ccc391a50d6d5b45e10f5e94a8e0d3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 12 Aug 2019 07:27:19 +0000 Subject: Make dateMeridian variable type MERIDIAN (an enum) in stead of int. --- generic/tclDate.c | 24 ++++++++++++------------ generic/tclGetDate.y | 18 +++++++++--------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/generic/tclDate.c b/generic/tclDate.c index 32c71de..bf8a150 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -95,6 +95,17 @@ #endif /* _MSC_VER */ /* + * Meridian: am, pm, or 24-hour style. + */ + +typedef enum _MERIDIAN { + MERam, MERpm, MER24 +} MERIDIAN; + + + + +/* * yyparse will accept a 'struct DateInfo' as its parameter; that's where the * parsed fields will be returned. */ @@ -112,7 +123,7 @@ typedef struct DateInfo { time_t dateHour; time_t dateMinutes; time_t dateSeconds; - int dateMeridian; + MERIDIAN dateMeridian; int dateHaveTime; time_t dateTimezone; @@ -199,17 +210,6 @@ typedef enum _DSTMODE { DSTon, DSToff, DSTmaybe } DSTMODE; -/* - * Meridian: am, pm, or 24-hour style. - */ - -typedef enum _MERIDIAN { - MERam, MERpm, MER24 -} MERIDIAN; - - - - # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULLPTR nullptr diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 59f85bd..d67c32a 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -46,6 +46,14 @@ #endif /* _MSC_VER */ /* + * Meridian: am, pm, or 24-hour style. + */ + +typedef enum _MERIDIAN { + MERam, MERpm, MER24 +} MERIDIAN; + +/* * yyparse will accept a 'struct DateInfo' as its parameter; that's where the * parsed fields will be returned. */ @@ -63,7 +71,7 @@ typedef struct DateInfo { time_t dateHour; time_t dateMinutes; time_t dateSeconds; - int dateMeridian; + MERIDIAN dateMeridian; int dateHaveTime; time_t dateTimezone; @@ -150,14 +158,6 @@ typedef enum _DSTMODE { DSTon, DSToff, DSTmaybe } DSTMODE; -/* - * Meridian: am, pm, or 24-hour style. - */ - -typedef enum _MERIDIAN { - MERam, MERpm, MER24 -} MERIDIAN; - %} %union { -- cgit v0.12 From 9c94b7bd7657d1734dd6ce7d0e91d2606c6d0945 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 12 Aug 2019 19:56:18 +0000 Subject: "utfmax" build should be with TCL_UTF_MAX=6 --- win/rules.vc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win/rules.vc b/win/rules.vc index 34ac230..3fa0704 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -688,7 +688,7 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg # configuration (ignored for Tcl itself) # _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build # (CRT library should support this) -# TCL_UTF_MAX=4 - forces a build using 32-bit Tcl_UniChar in stead of 16-bit. +# TCL_UTF_MAX=6 - forces a build using 32-bit Tcl_UniChar in stead of 16-bit. # Further, LINKERFLAGS are modified based on above. # Default values for all the above @@ -755,7 +755,7 @@ _USE_64BIT_TIME_T = 1 !if [nmakehlp -f $(OPTS) "utfmax"] !message *** Force 32-bit Tcl_UniChar -TCL_UTF_MAX = 4 +TCL_UTF_MAX = 6 !endif # Yes, it's weird that the "symbols" option controls DEBUG and @@ -1321,8 +1321,8 @@ OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64 !if "$(_USE_64BIT_TIME_T)" == "1" OPTDEFINES = $(OPTDEFINES) -D_USE_64BIT_TIME_T !endif -!if "$(TCL_UTF_MAX)" == "4" -OPTDEFINES = $(OPTDEFINES) -DTCL_UTF_MAX=4 +!if "$(TCL_UTF_MAX)" == "6" +OPTDEFINES = $(OPTDEFINES) -DTCL_UTF_MAX=6 !endif # _ATL_XP_TARGETING - Newer SDK's need this to build for XP -- cgit v0.12 From c9376306301e578615cfee52d2121f78cb31a225 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 14 Aug 2019 06:42:58 +0000 Subject: Remove "register" keyword in various places. Also add some type-casts to help C++ compatibility. --- compat/fake-rfc2553.c | 3 ++- compat/gettod.c | 3 ++- compat/mkstemp.c | 13 +++++++------ compat/opendir.c | 12 ++++++------ compat/strstr.c | 4 ++-- compat/strtol.c | 2 +- compat/strtoul.c | 6 +++--- compat/waitpid.c | 2 +- generic/regcomp.c | 2 +- generic/regexec.c | 3 +-- generic/tclDate.c | 10 +++++----- generic/tclGetDate.y | 10 +++++----- generic/tclTrace.c | 2 +- macosx/tclMacOSXFCmd.c | 4 ++-- 14 files changed, 39 insertions(+), 37 deletions(-) diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c index c8e69400..29e2b56 100644 --- a/compat/fake-rfc2553.c +++ b/compat/fake-rfc2553.c @@ -73,6 +73,7 @@ int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, struct sockaddr_in *sin = (struct sockaddr_in *)sa; struct hostent *hp; char tmpserv[16]; + (void)salen; if (sa->sa_family != AF_UNSPEC && sa->sa_family != AF_INET) return (EAI_FAMILY); @@ -153,7 +154,7 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints) { struct addrinfo *ai; - ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in)); + ai = (struct addrinfo *)malloc(sizeof(*ai) + sizeof(struct sockaddr_in)); if (ai == NULL) return (NULL); diff --git a/compat/gettod.c b/compat/gettod.c index ca20cf8..f6651d4 100644 --- a/compat/gettod.c +++ b/compat/gettod.c @@ -21,10 +21,11 @@ gettimeofday( struct timezone *tz) { struct timeb t; + (void)tz; ftime(&t); tp->tv_sec = t.time; - tp->tv_usec = t. millitm * 1000; + tp->tv_usec = t.millitm * 1000; return 0; } diff --git a/compat/mkstemp.c b/compat/mkstemp.c index 1a44dfa..feccfbb 100644 --- a/compat/mkstemp.c +++ b/compat/mkstemp.c @@ -13,6 +13,7 @@ #include #include #include +#include /* *---------------------------------------------------------------------- @@ -32,19 +33,19 @@ int mkstemp( - char *template) /* Template for filename. */ + char *tmpl) /* Template for filename. */ { static const char alphanumerics[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - register char *a, *b; + char *a, *b; int fd, count, alphanumericsLen = strlen(alphanumerics); /* == 62 */ - a = template + strlen(template); - while (a > template && *(a-1) == 'X') { + a = tmpl + strlen(tmpl); + while (a > tmpl && *(a-1) == 'X') { a--; } - if (a == template) { + if (a == tmpl) { errno = ENOENT; return -1; } @@ -71,7 +72,7 @@ mkstemp( * Template is now realized; try to open (with correct options). */ - fd = open(template, O_RDWR|O_CREAT|O_EXCL, 0600); + fd = open(tmpl, O_RDWR|O_CREAT|O_EXCL, 0600); } while (fd == -1 && errno == EEXIST && --count > 0); return fd; diff --git a/compat/opendir.c b/compat/opendir.c index 7a49566..25a7ada 100644 --- a/compat/opendir.c +++ b/compat/opendir.c @@ -20,9 +20,9 @@ DIR * opendir( char *name) { - register DIR *dirp; - register int fd; - char *myname; + DIR *dirp; + int fd; + const char *myname; myname = ((*name == '\0') ? "." : name); if ((fd = open(myname, 0, 0)) == -1) { @@ -65,9 +65,9 @@ struct olddirect { struct dirent * readdir( - register DIR *dirp) + DIR *dirp) { - register struct olddirect *dp; + struct olddirect *dp; static struct dirent dir; for (;;) { @@ -101,7 +101,7 @@ readdir( void closedir( - register DIR *dirp) + DIR *dirp) { close(dirp->dd_fd); dirp->dd_fd = -1; diff --git a/compat/strstr.c b/compat/strstr.c index e3b9b8d..206dca9 100644 --- a/compat/strstr.c +++ b/compat/strstr.c @@ -36,10 +36,10 @@ char * strstr( - register char *string, /* String to search. */ + char *string, /* String to search. */ char *substring) /* Substring to try to find in string. */ { - register char *a, *b; + char *a, *b; /* * First scan quickly through the two strings looking for a diff --git a/compat/strtol.c b/compat/strtol.c index b7f6919..22cc1eb 100644 --- a/compat/strtol.c +++ b/compat/strtol.c @@ -45,7 +45,7 @@ strtol( * hex, "0" means octal, anything else means * decimal. */ { - register const char *p; + const char *p; long result; /* diff --git a/compat/strtoul.c b/compat/strtoul.c index e37eb05..bf16f7a 100644 --- a/compat/strtoul.c +++ b/compat/strtoul.c @@ -62,9 +62,9 @@ strtoul( * hex, "0" means octal, anything else means * decimal. */ { - register const char *p; - register unsigned long int result = 0; - register unsigned digit; + const char *p; + unsigned long int result = 0; + unsigned digit; int anyDigits = 0; int negative=0; int overflow=0; diff --git a/compat/waitpid.c b/compat/waitpid.c index d4473a8..626d210 100644 --- a/compat/waitpid.c +++ b/compat/waitpid.c @@ -70,7 +70,7 @@ waitpid( int options) /* OR'ed combination of WNOHANG and * WUNTRACED. */ { - register WaitInfo *waitPtr, *prevPtr; + WaitInfo *waitPtr, *prevPtr; pid_t result; WAIT_STATUS_TYPE status; diff --git a/generic/regcomp.c b/generic/regcomp.c index 49b024f..093cb95 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -512,7 +512,7 @@ freev( struct vars *v, int err) { - register int ret; + int ret; if (v->re != NULL) { rfree(v->re); diff --git a/generic/regexec.c b/generic/regexec.c index 1a3e114..24c4eac 100644 --- a/generic/regexec.c +++ b/generic/regexec.c @@ -91,7 +91,6 @@ struct smalldfa { struct sset *outsarea[FEWSTATES*2 * FEWCOLORS]; struct arcp incarea[FEWSTATES*2 * FEWCOLORS]; }; -#define DOMALLOC ((struct smalldfa *)NULL) /* force malloc */ /* * Internal variables, bundled for easy passing around. @@ -299,7 +298,7 @@ getsubdfa(struct vars * v, struct subre * t) { if (v->subdfas[t->id] == NULL) { - v->subdfas[t->id] = newDFA(v, &t->cnfa, &v->g->cmap, DOMALLOC); + v->subdfas[t->id] = newDFA(v, &t->cnfa, &v->g->cmap, NULL); if (ISERR()) return NULL; } diff --git a/generic/tclDate.c b/generic/tclDate.c index bf8a150..fb4f3cf 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2549,9 +2549,9 @@ LookupWord( YYSTYPE* yylvalPtr, char *buff) { - register char *p; - register char *q; - register const TABLE *tp; + char *p; + char *q; + const TABLE *tp; int i, abbrev; /* @@ -2674,8 +2674,8 @@ TclDatelex( YYLTYPE* location, DateInfo *info) { - register char c; - register char *p; + char c; + char *p; char buff[20]; int Count; diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index d67c32a..3b6134c 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -765,9 +765,9 @@ LookupWord( YYSTYPE* yylvalPtr, char *buff) { - register char *p; - register char *q; - register const TABLE *tp; + char *p; + char *q; + const TABLE *tp; int i, abbrev; /* @@ -890,8 +890,8 @@ TclDatelex( YYLTYPE* location, DateInfo *info) { - register char c; - register char *p; + char c; + char *p; char buff[20]; int Count; diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 1a6d459..27746b4 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -1920,7 +1920,7 @@ TraceExecutionProc( if ((flags & TCL_TRACE_ENTER_EXEC) && (tcmdPtr->stepTrace == NULL) && (tcmdPtr->flags & (TCL_TRACE_ENTER_DURING_EXEC | TCL_TRACE_LEAVE_DURING_EXEC))) { - register unsigned len = strlen(command) + 1; + size_t len = strlen(command) + 1; tcmdPtr->startLevel = level; tcmdPtr->startCmd = ckalloc(len); diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 7c65088..6ff60aa 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -347,7 +347,7 @@ TclMacOSXSetFileAttribute( Tcl_DStringAppend(&ds, native, -1); Tcl_DStringAppend(&ds, _PATH_RSRCFORKSPEC, -1); - result = truncate(Tcl_DStringValue(&ds), (off_t)0); + result = truncate(Tcl_DStringValue(&ds), 0); if (result != 0) { /* * truncate() on a valid resource fork path may fail with a @@ -689,7 +689,7 @@ SetOSTypeFromAny( static void UpdateStringOfOSType( - register Tcl_Obj *objPtr) /* OSType object whose string rep to + Tcl_Obj *objPtr) /* OSType object whose string rep to * update. */ { const int size = TCL_UTF_MAX * 4; -- cgit v0.12 From 831e40a351cc05df4e170c4606d090020bd80b3a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 14 Aug 2019 19:23:13 +0000 Subject: Minor simplification in test-suite: Because "teststringobj maxchars" has the effect that the value is converted to Unicode for, we don't need a separate function "teststringobj getunicode" for that. So, merge the two functions to one. --- generic/tclTestObj.c | 14 ++++---------- tests/stringObj.test | 4 ++-- tests/utf.test | 16 ++++++++-------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index c9e4a6f..3f2aecd 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -1178,8 +1178,8 @@ TeststringobjCmd( Tcl_Obj **varPtr; static const char *const options[] = { "append", "appendstrings", "get", "get2", "length", "length2", - "set", "set2", "setlength", "maxchars", "getunicode", - "appendself", "appendself2", NULL + "set", "set2", "setlength", "maxchars", "appendself", + "appendself2", NULL }; if (objc < 3) { @@ -1344,13 +1344,7 @@ TeststringobjCmd( } Tcl_SetIntObj(Tcl_GetObjResult(interp), length); break; - case 10: /* getunicode */ - if (objc != 3) { - goto wrongNumArgs; - } - Tcl_GetUnicode(varPtr[varIndex]); - break; - case 11: /* appendself */ + case 10: /* appendself */ if (objc != 4) { goto wrongNumArgs; } @@ -1381,7 +1375,7 @@ TeststringobjCmd( Tcl_AppendToObj(varPtr[varIndex], string + i, length - i); Tcl_SetObjResult(interp, varPtr[varIndex]); break; - case 12: /* appendself2 */ + case 11: /* appendself2 */ if (objc != 4) { goto wrongNumArgs; } diff --git a/tests/stringObj.test b/tests/stringObj.test index a78b5f8..bda7285 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -439,9 +439,9 @@ test stringObj-13.8 {Tcl_GetCharLength with identity nulls} {testobj testbytestr test stringObj-14.1 {Tcl_SetObjLength on pure unicode object} testobj { teststringobj set 1 foo - teststringobj getunicode 1 + teststringobj maxchars 1 teststringobj append 1 bar -1 - teststringobj getunicode 1 + teststringobj maxchars 1 teststringobj append 1 bar -1 teststringobj setlength 1 0 teststringobj append 1 bar -1 diff --git a/tests/utf.test b/tests/utf.test index dc1a435..f75d19e 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -471,8 +471,8 @@ test utf-25.1 {Tcl_UniCharNcasecmp} -constraints teststringobj \ -body { teststringobj set 1 a teststringobj set 2 b - teststringobj getunicode 1 - teststringobj getunicode 2 + teststringobj maxchars 1 + teststringobj maxchars 2 string compare -nocase [teststringobj get 1] [teststringobj get 2] } \ -cleanup { @@ -486,8 +486,8 @@ test utf-25.2 {Tcl_UniCharNcasecmp} -constraints teststringobj \ -body { teststringobj set 1 b teststringobj set 2 a - teststringobj getunicode 1 - teststringobj getunicode 2 + teststringobj maxchars 1 + teststringobj maxchars 2 string compare -nocase [teststringobj get 1] [teststringobj get 2] } \ -cleanup { @@ -501,8 +501,8 @@ test utf-25.3 {Tcl_UniCharNcasecmp} -constraints teststringobj \ -body { teststringobj set 1 B teststringobj set 2 a - teststringobj getunicode 1 - teststringobj getunicode 2 + teststringobj maxchars 1 + teststringobj maxchars 2 string compare -nocase [teststringobj get 1] [teststringobj get 2] } \ -cleanup { @@ -517,8 +517,8 @@ test utf-25.4 {Tcl_UniCharNcasecmp} -constraints teststringobj \ -body { teststringobj set 1 aBcB teststringobj set 2 abca - teststringobj getunicode 1 - teststringobj getunicode 2 + teststringobj maxchars 1 + teststringobj maxchars 2 string compare -nocase [teststringobj get 1] [teststringobj get 2] } \ -cleanup { -- cgit v0.12 From e2bb5b8ee8deb36456ac402ccd936253734af65d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 15 Aug 2019 07:04:56 +0000 Subject: Fix [6de8494984]: Tcl_CreateCommandChannel() documentation bug --- doc/OpenFileChnl.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3 index 582ff4b..82851da 100644 --- a/doc/OpenFileChnl.3 +++ b/doc/OpenFileChnl.3 @@ -277,7 +277,7 @@ If an error occurs while opening the channel, \fBTcl_OpenCommandChannel\fR returns NULL and records a POSIX error code that can be retrieved with \fBTcl_GetErrno\fR. In addition, \fBTcl_OpenCommandChannel\fR leaves an error message in -the interpreter's result if \fIinterp\fR is not NULL. +the interpreter's result. \fIinterp\fR cannot be NULL. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR, described below. -- cgit v0.12