diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-05-14 08:26:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-05-14 08:26:06 (GMT) |
commit | 37d4aa08d3f40d35c2672d95935f59454f849b84 (patch) | |
tree | 678acacedb8ab68f7b04f677fbf2462d10599208 /generic/tclCmdAH.c | |
parent | d3a24bbdf1e4e8f56b6c6c15e9886ed6320b890f (diff) | |
download | tcl-37d4aa08d3f40d35c2672d95935f59454f849b84.zip tcl-37d4aa08d3f40d35c2672d95935f59454f849b84.tar.gz tcl-37d4aa08d3f40d35c2672d95935f59454f849b84.tar.bz2 |
Backout the "dullest commit ever" (not my words ....). It breaks the build.
JN: Many of those changes are actually good, but there are too many changes to be able to search for a bug somewhere. Feel free to re-apply, after assuring it's really only whitespace changes. (my advise: do that after 9.0b2)
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r-- | generic/tclCmdAH.c | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index ce96c9b..ab5fbb0 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -405,21 +405,21 @@ TclInitEncodingCmd( * * EncodingConvertParseOptions -- * - * Common routine for parsing arguments passed to encoding convertfrom - * and encoding convertto. + * Common routine for parsing arguments passed to encoding convertfrom + * and encoding convertto. * * Results: - * TCL_OK or TCL_ERROR. + * TCL_OK or TCL_ERROR. * * Side effects: - * On success, - * - *encPtr is set to the encoding. Must be freed with Tcl_FreeEncoding - * if non-NULL - * - *dataObjPtr is set to the Tcl_Obj containing the data to encode or - * decode - * - *profilePtr is set to encoding error handling profile - * - *failVarPtr is set to -failindex option value or NULL - * On error, all of the above are uninitialized. + * On success, + * - *encPtr is set to the encoding. Must be freed with Tcl_FreeEncoding + * if non-NULL + * - *dataObjPtr is set to the Tcl_Obj containing the data to encode or + * decode + * - *profilePtr is set to encoding error handling profile + * - *failVarPtr is set to -failindex option value or NULL + * On error, all of the above are uninitialized. * *------------------------------------------------------------------------ */ @@ -524,7 +524,7 @@ EncodingConvertfromObjCmd( Tcl_Obj *data; /* Byte array to convert */ Tcl_DString ds; /* Buffer to hold the string */ Tcl_Encoding encoding; /* Encoding to use */ - Tcl_Size length = 0; /* Length of the byte array being converted */ + Tcl_Size length = 0; /* Length of the byte array being converted */ const char *bytesPtr; /* Pointer to the first byte of the array */ int flags; int result; @@ -2346,13 +2346,13 @@ StoreStatData( if (varName == NULL) { TclNewObj(result); Tcl_IncrRefCount(result); -#define DOBJPUT(key, objValue) \ - Tcl_DictObjPut(NULL, result, \ - Tcl_NewStringObj((key), TCL_AUTO_LENGTH), \ - (objValue)); +#define DOBJPUT(key, objValue) \ + Tcl_DictObjPut(NULL, result, \ + Tcl_NewStringObj((key), -1), \ + (objValue)); DOBJPUT("dev", Tcl_NewWideIntObj((long)statPtr->st_dev)); DOBJPUT("ino", Tcl_NewWideIntObj((Tcl_WideInt)statPtr->st_ino)); - DOBJPUT("nlink",Tcl_NewWideIntObj((long)statPtr->st_nlink)); + DOBJPUT("nlink", Tcl_NewWideIntObj((long)statPtr->st_nlink)); DOBJPUT("uid", Tcl_NewWideIntObj((long)statPtr->st_uid)); DOBJPUT("gid", Tcl_NewWideIntObj((long)statPtr->st_gid)); DOBJPUT("size", Tcl_NewWideIntObj((Tcl_WideInt)statPtr->st_size)); @@ -2362,12 +2362,12 @@ StoreStatData( #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE DOBJPUT("blksize", Tcl_NewWideIntObj((long)statPtr->st_blksize)); #endif - DOBJPUT("atime",Tcl_NewWideIntObj(Tcl_GetAccessTimeFromStat(statPtr))); - DOBJPUT("mtime",Tcl_NewWideIntObj(Tcl_GetModificationTimeFromStat(statPtr))); - DOBJPUT("ctime",Tcl_NewWideIntObj(Tcl_GetChangeTimeFromStat(statPtr))); + DOBJPUT("atime", Tcl_NewWideIntObj(Tcl_GetAccessTimeFromStat(statPtr))); + DOBJPUT("mtime", Tcl_NewWideIntObj(Tcl_GetModificationTimeFromStat(statPtr))); + DOBJPUT("ctime", Tcl_NewWideIntObj(Tcl_GetChangeTimeFromStat(statPtr))); mode = (unsigned short) statPtr->st_mode; DOBJPUT("mode", Tcl_NewWideIntObj(mode)); - DOBJPUT("type", Tcl_NewStringObj(GetTypeFromMode(mode), TCL_AUTO_LENGTH)); + DOBJPUT("type", Tcl_NewStringObj(GetTypeFromMode(mode), -1)); #undef DOBJPUT Tcl_SetObjResult(interp, result); Tcl_DecrRefCount(result); @@ -2384,8 +2384,7 @@ StoreStatData( TclNewLiteralStringObj(field, fieldName); \ Tcl_IncrRefCount(field); \ value = (object); \ - if (Tcl_ObjSetVar2(interp, varName, field, value, \ - TCL_LEAVE_ERR_MSG) == NULL) { \ + if (Tcl_ObjSetVar2(interp,varName,field,value,TCL_LEAVE_ERR_MSG)==NULL) { \ TclDecrRefCount(field); \ return TCL_ERROR; \ } \ @@ -2833,7 +2832,7 @@ EachloopCmd( &statePtr->varcList[i], &statePtr->varvList[i]); /* Values */ - if (TclObjTypeHasProc(objv[2+i*2], indexProc)) { + if (TclObjTypeHasProc(objv[2+i*2],indexProc)) { /* Special case for AbstractList */ statePtr->aCopyList[i] = Tcl_DuplicateObj(objv[2+i*2]); if (statePtr->aCopyList[i] == NULL) { @@ -2983,7 +2982,7 @@ ForeachAssignments( for (i=0 ; i<statePtr->numLists ; i++) { int isAbstractList = - TclObjTypeHasProc(statePtr->aCopyList[i], indexProc) != NULL; + TclObjTypeHasProc(statePtr->aCopyList[i],indexProc) != NULL; for (v=0 ; v<statePtr->varcList[i] ; v++) { k = statePtr->index[i]++; |