Tcl Source Code

Check-in [14a510d9c1]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:
[kennykb-numerics-branch]
* generic/tclStringObj.c: Bug fix: Missing cast to large enough integral size before << operations led to broken [format %llx] results. Thanks to Robert Henry for reporting the bug.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | kennykb-numerics-branch
Files: files | file ages | folders
SHA1:14a510d9c130f270424fdc4ed953e3461cd79c8d
User & Date: dgp 2005-09-30 17:02:03
Context
2005-10-03
15:50
[kennykb-numerics-branch]
* generic/tclBasic.c: Re-implemented ExprRoundFunc to u...
check-in: c247119234 user: dgp tags: kennykb-numerics-branch
2005-09-30
17:02
[kennykb-numerics-branch]
* generic/tclStringObj.c: Bug fix: Missing cast to ...
check-in: 14a510d9c1 user: dgp tags: kennykb-numerics-branch
2005-09-28
00:23
formatting check-in: 255d501bf2 user: dgp tags: kennykb-numerics-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.









1
2
3
4
5
6
7








2005-09-27  Don Porter  <dgp@users.sourceforge.net>

	[kennykb-numerics-branch]

	* generic/tcl.h:	Changed name of the new Tcl_Obj intrep field
	* generic/tclObj.c:	from "bignumValue" to "ptrAndLongRep" as
	* generic/tclProc.c:	described in TIP 237, and more suitable for
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2005-09-30  Don Porter  <dgp@users.sourceforge.net>

	[kennykb-numerics-branch]

	* generic/tclStringObj.c:	Bug fix: Missing cast to large enough
	integral size before << operations led to broken [format %llx] results.
	Thanks to Robert Henry for reporting the bug.

2005-09-27  Don Porter  <dgp@users.sourceforge.net>

	[kennykb-numerics-branch]

	* generic/tcl.h:	Changed name of the new Tcl_Obj intrep field
	* generic/tclObj.c:	from "bignumValue" to "ptrAndLongRep" as
	* generic/tclProc.c:	described in TIP 237, and more suitable for

Changes to generic/tclStringObj.c.

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
....
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 * Copyright (c) 1999 by Scriptics Corporation.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclStringObj.c,v 1.35.2.10 2005/09/16 19:29:02 dgp Exp $ */

#include "tclInt.h"
#include "tommath.h"

/*
 * Prototypes for functions defined later in this file:
 */
................................................................................
		Tcl_SetObjLength(pure, numDigits);
		bytes = Tcl_GetString(pure);
		length = numDigits;
		while (numDigits--) {
		    int digitOffset;
		    if (useBig) {
			if (shift<CHAR_BIT*sizeof(Tcl_WideUInt)-DIGIT_BIT) {
			    bits |= (big.dp[index++] << shift);
			    shift += DIGIT_BIT;
			}
			shift -= numBits;
		    }
		    digitOffset = (int) (bits % base);
		    if (digitOffset > 9) {
			bytes[numDigits] = 'a' + digitOffset - 10;







|







 







|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
....
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 * Copyright (c) 1999 by Scriptics Corporation.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclStringObj.c,v 1.35.2.11 2005/09/30 17:02:03 dgp Exp $ */

#include "tclInt.h"
#include "tommath.h"

/*
 * Prototypes for functions defined later in this file:
 */
................................................................................
		Tcl_SetObjLength(pure, numDigits);
		bytes = Tcl_GetString(pure);
		length = numDigits;
		while (numDigits--) {
		    int digitOffset;
		    if (useBig) {
			if (shift<CHAR_BIT*sizeof(Tcl_WideUInt)-DIGIT_BIT) {
			    bits |= (((Tcl_WideUInt)big.dp[index++]) << shift);
			    shift += DIGIT_BIT;
			}
			shift -= numBits;
		    }
		    digitOffset = (int) (bits % base);
		    if (digitOffset > 9) {
			bytes[numDigits] = 'a' + digitOffset - 10;