Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 464694
Collapse All | Expand All

(-)src/tkButton.c.orig (-3 / +1 lines)
Lines 526-533 Link Here
526
static Blt_TileChangedProc TileChangedProc;
526
static Blt_TileChangedProc TileChangedProc;
527
static Tcl_CmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd;
527
static Tcl_CmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd;
528
528
529
EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp, char *script));
530
531
#if (TK_MAJOR_VERSION > 4)
529
#if (TK_MAJOR_VERSION > 4)
532
EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, 
530
EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, 
533
	int padX, int padY, int innerWidth, int innerHeight, int *xPtr, 
531
	int padX, int padY, int innerWidth, int innerHeight, int *xPtr, 
Lines 1890-1896 Link Here
1890
	}
1888
	}
1891
    }
1889
    }
1892
    if ((butPtr->type != TYPE_LABEL) && (butPtr->command != NULL)) {
1890
    if ((butPtr->type != TYPE_LABEL) && (butPtr->command != NULL)) {
1893
	return TkCopyAndGlobalEval(butPtr->interp, butPtr->command);
1891
	return Tcl_EvalObjEx(butPtr->interp, butPtr->command, TCL_EVAL_GLOBAL);
1894
    }
1892
    }
1895
    return TCL_OK;
1893
    return TCL_OK;
1896
}
1894
}
(-)src/bltVecMath.c.ORIG (-13 / +13 lines)
Lines 745-754 Link Here
745
 *
745
 *
746
 *	This procedure is called when an error occurs during a
746
 *	This procedure is called when an error occurs during a
747
 *	floating-point operation.  It reads errno and sets
747
 *	floating-point operation.  It reads errno and sets
748
 *	interp->result accordingly.
748
 *	Tcl_GetStringResult(interp) accordingly.
749
 *
749
 *
750
 * Results:
750
 * Results:
751
 *	Interp->result is set to hold an error message.
751
 *	Tcl_GetStringResult(interp) is set to hold an error message.
752
 *
752
 *
753
 * Side effects:
753
 * Side effects:
754
 *	None.
754
 *	None.
Lines 764-783 Link Here
764
    if ((errno == EDOM) || (value != value)) {
764
    if ((errno == EDOM) || (value != value)) {
765
	Tcl_AppendResult(interp, "domain error: argument not in valid range",
765
	Tcl_AppendResult(interp, "domain error: argument not in valid range",
766
	    (char *)NULL);
766
	    (char *)NULL);
767
	Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", interp->result,
767
	Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", Tcl_GetStringResult(interp),
768
	    (char *)NULL);
768
	    (char *)NULL);
769
    } else if ((errno == ERANGE) || IS_INF(value)) {
769
    } else if ((errno == ERANGE) || IS_INF(value)) {
770
	if (value == 0.0) {
770
	if (value == 0.0) {
771
	    Tcl_AppendResult(interp, 
771
	    Tcl_AppendResult(interp, 
772
			     "floating-point value too small to represent",
772
			     "floating-point value too small to represent",
773
		(char *)NULL);
773
		(char *)NULL);
774
	    Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", interp->result,
774
	    Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", Tcl_GetStringResult(interp),
775
		(char *)NULL);
775
		(char *)NULL);
776
	} else {
776
	} else {
777
	    Tcl_AppendResult(interp, 
777
	    Tcl_AppendResult(interp, 
778
			     "floating-point value too large to represent",
778
			     "floating-point value too large to represent",
779
		(char *)NULL);
779
		(char *)NULL);
780
	    Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", interp->result,
780
	    Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", Tcl_GetStringResult(interp),
781
		(char *)NULL);
781
		(char *)NULL);
782
	}
782
	}
783
    } else {
783
    } else {
Lines 786-792 Link Here
786
	sprintf(buf, "%d", errno);
786
	sprintf(buf, "%d", errno);
787
	Tcl_AppendResult(interp, "unknown floating-point error, ",
787
	Tcl_AppendResult(interp, "unknown floating-point error, ",
788
	    "errno = ", buf, (char *)NULL);
788
	    "errno = ", buf, (char *)NULL);
789
	Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", interp->result,
789
	Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", Tcl_GetStringResult(interp),
790
	    (char *)NULL);
790
	    (char *)NULL);
791
    }
791
    }
792
}
792
}
Lines 880-886 Link Here
880
 *	was computed successfully.  If the name doesn't match any
880
 *	was computed successfully.  If the name doesn't match any
881
 *	known math function, returns TCL_RETURN. And if a format error
881
 *	known math function, returns TCL_RETURN. And if a format error
882
 *	was found, TCL_ERROR is returned and an error message is left
882
 *	was found, TCL_ERROR is returned and an error message is left
883
 *	in interp->result.
883
 *	in Tcl_GetStringResult(interp).
884
 *
884
 *
885
 *	After a successful return parsePtr will be updated to point to
885
 *	After a successful return parsePtr will be updated to point to
886
 *	the character just after the function call, the token is set
886
 *	the character just after the function call, the token is set
Lines 963-969 Link Here
963
 * Results:
963
 * Results:
964
 *	TCL_OK is returned unless an error occurred while doing lexical
964
 *	TCL_OK is returned unless an error occurred while doing lexical
965
 *	analysis or executing an embedded command.  In that case a
965
 *	analysis or executing an embedded command.  In that case a
966
 *	standard Tcl error is returned, using interp->result to hold
966
 *	standard Tcl error is returned, using Tcl_GetStringResult(interp) to hold
967
 *	an error message.  In the event of a successful return, the token
967
 *	an error message.  In the event of a successful return, the token
968
 *	and field in parsePtr is updated to refer to the next symbol in
968
 *	and field in parsePtr is updated to refer to the next symbol in
969
 *	the expression string, and the expr field is advanced past that
969
 *	the expression string, and the expr field is advanced past that
Lines 1211-1217 Link Here
1211
 *
1211
 *
1212
 * Results:
1212
 * Results:
1213
 *	Normally TCL_OK is returned.  The value of the expression is
1213
 *	Normally TCL_OK is returned.  The value of the expression is
1214
 *	returned in *valuePtr.  If an error occurred, then interp->result
1214
 *	returned in *valuePtr.  If an error occurred, then Tcl_GetStringResult(interp)
1215
 *	contains an error message and TCL_ERROR is returned.
1215
 *	contains an error message and TCL_ERROR is returned.
1216
 *	InfoPtr->token will be left pointing to the token AFTER the
1216
 *	InfoPtr->token will be left pointing to the token AFTER the
1217
 *	expression, and parsePtr->nextPtr will point to the character just
1217
 *	expression, and parsePtr->nextPtr will point to the character just
Lines 1756-1762 Link Here
1756
 *
1756
 *
1757
 * Results:
1757
 * Results:
1758
 *	The result is a standard Tcl return value.  If an error
1758
 *	The result is a standard Tcl return value.  If an error
1759
 *	occurs then an error message is left in interp->result.
1759
 *	occurs then an error message is left in Tcl_GetStringResult(interp).
1760
 *	The value of the expression is returned in *valuePtr, in
1760
 *	The value of the expression is returned in *valuePtr, in
1761
 *	whatever form it ends up in (could be string or integer
1761
 *	whatever form it ends up in (could be string or integer
1762
 *	or double).  Caller may need to convert result.  Caller
1762
 *	or double).  Caller may need to convert result.  Caller
Lines 1822-1828 Link Here
1822
 * Results:
1822
 * Results:
1823
 *	Each procedure returns TCL_OK if it succeeds and places result
1823
 *	Each procedure returns TCL_OK if it succeeds and places result
1824
 *	information at *resultPtr.  If it fails it returns TCL_ERROR
1824
 *	information at *resultPtr.  If it fails it returns TCL_ERROR
1825
 *	and leaves an error message in interp->result.
1825
 *	and leaves an error message in Tcl_GetStringResult(interp).
1826
 *
1826
 *
1827
 * Side effects:
1827
 * Side effects:
1828
 *	None.
1828
 *	None.
Lines 2010-2016 Link Here
2010
 * Results:
2010
 * Results:
2011
 *	Each of the procedures below returns a standard Tcl result.
2011
 *	Each of the procedures below returns a standard Tcl result.
2012
 *	If an error occurs then an error message is left in
2012
 *	If an error occurs then an error message is left in
2013
 *	interp->result.  Otherwise the value of the expression,
2013
 *	Tcl_GetStringResult(interp).  Otherwise the value of the expression,
2014
 *	in the appropriate form, is stored at *resultPtr.  If
2014
 *	in the appropriate form, is stored at *resultPtr.  If
2015
 *	the expression had a result that was incompatible with the
2015
 *	the expression had a result that was incompatible with the
2016
 *	desired form then an error is returned.
2016
 *	desired form then an error is returned.
Lines 2042-2048 Link Here
2042
	Blt_VectorDuplicate(vPtr, value.vPtr);
2042
	Blt_VectorDuplicate(vPtr, value.vPtr);
2043
    } else {
2043
    } else {
2044
	register int i;
2044
	register int i;
2045
	/* No result vector.  Put values in interp->result.  */
2045
	/* No result vector.  Put values in Tcl_GetStringResult(interp).  */
2046
	for (i = 0; i < value.vPtr->length; i++) {
2046
	for (i = 0; i < value.vPtr->length; i++) {
2047
	    string = Blt_Dtoa(interp, value.vPtr->valueArr[i]);
2047
	    string = Blt_Dtoa(interp, value.vPtr->valueArr[i]);
2048
	    Tcl_AppendElement(interp, string);
2048
	    Tcl_AppendElement(interp, string);
(-)src/bltParse.c.ORIG (-3 / +3 lines)
Lines 228-243 Link Here
228
	return result;
228
	return result;
229
    }
229
    }
230
    (*termPtr) += 1;
230
    (*termPtr) += 1;
231
    length = strlen(iPtr->result);
231
    length = strlen(Tcl_GetStringResult(iPtr));
232
    shortfall = length + 1 - (parsePtr->end - parsePtr->next);
232
    shortfall = length + 1 - (parsePtr->end - parsePtr->next);
233
    if (shortfall > 0) {
233
    if (shortfall > 0) {
234
	(*parsePtr->expandProc) (parsePtr, shortfall);
234
	(*parsePtr->expandProc) (parsePtr, shortfall);
235
    }
235
    }
236
    strcpy(parsePtr->next, iPtr->result);
236
    strcpy(parsePtr->next, Tcl_GetStringResult(iPtr));
237
    parsePtr->next += length;
237
    parsePtr->next += length;
238
238
239
    Tcl_FreeResult(interp);
239
    Tcl_FreeResult(interp);
240
    iPtr->result = iPtr->resultSpace;
240
    Tcl_SetResult(iPtr,(char*)iPtr->resultSpace, TCL_VOLATILE);
241
    iPtr->resultSpace[0] = '\0';
241
    iPtr->resultSpace[0] = '\0';
242
    return TCL_OK;
242
    return TCL_OK;
243
}
243
}
(-)src/bltScrollbar.c.ORIG (-1 / +1 lines)
Lines 534-540 Link Here
534
	} else {
534
	} else {
535
	    fraction = ((double)pixels / (double)barWidth);
535
	    fraction = ((double)pixels / (double)barWidth);
536
	}
536
	}
537
	sprintf(interp->result, "%g", fraction);
537
	sprintf(Tcl_GetStringResult(interp), "%s", fraction);
538
    } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) {
538
    } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) {
539
	int x, y, pos, barWidth;
539
	int x, y, pos, barWidth;
540
	double fraction;
540
	double fraction;
(-)src/bltTed.c.ORIG (-3 / +4 lines)
Lines 1504-1510 Link Here
1504
	tablePtr->flags |= ARRANGE_PENDING;
1504
	tablePtr->flags |= ARRANGE_PENDING;
1505
	Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
1505
	Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
1506
    }
1506
    }
1507
    interp->result = Tk_PathName(tedPtr->tkwin);
1507
    
1508
    Tcl_SetResult(interp, Tk_PathName(tedPtr->tkwin), TCL_VOLATILE);
1508
    tedPtr->flags |= LAYOUT_PENDING;
1509
    tedPtr->flags |= LAYOUT_PENDING;
1509
    EventuallyRedraw(tedPtr);
1510
    EventuallyRedraw(tedPtr);
1510
    return TCL_OK;
1511
    return TCL_OK;
Lines 1678-1684 Link Here
1678
	    tedPtr->activeRectArr[4].width = grip - 1;
1679
	    tedPtr->activeRectArr[4].width = grip - 1;
1679
	    tedPtr->activeRectArr[4].height = grip - 1;
1680
	    tedPtr->activeRectArr[4].height = grip - 1;
1680
1681
1681
	    interp->result = Tk_PathName(entryPtr->tkwin);
1682
	    Tcl_SetResult(interp, Tk_PathName(entryPtr->tkwin), TCL_VOLATILE);
1682
	    active = 1;
1683
	    active = 1;
1683
	    break;
1684
	    break;
1684
	}
1685
	}
Lines 1751-1757 Link Here
1751
	tablePtr->flags |= ARRANGE_PENDING;
1752
	tablePtr->flags |= ARRANGE_PENDING;
1752
	Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
1753
	Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
1753
    }
1754
    }
1754
    interp->result = Tk_PathName(tedPtr->tkwin);
1755
    Tcl_SetResult(interp, Tk_PathName(tedPtr->tkwin), TCL_VOLATILE);
1755
    tedPtr->flags |= LAYOUT_PENDING;
1756
    tedPtr->flags |= LAYOUT_PENDING;
1756
    EventuallyRedraw(tedPtr);
1757
    EventuallyRedraw(tedPtr);
1757
    return TCL_OK;
1758
    return TCL_OK;
(-)src/tkConsole.c.ORIG (-3 / +3 lines)
Lines 216-222 Link Here
216
    Tcl_Preserve((ClientData)consoleInterp);
216
    Tcl_Preserve((ClientData)consoleInterp);
217
    if (Tcl_Eval(consoleInterp, initCmd) == TCL_ERROR) {
217
    if (Tcl_Eval(consoleInterp, initCmd) == TCL_ERROR) {
218
	/* goto error; -- no problem for now... */
218
	/* goto error; -- no problem for now... */
219
	printf("Eval error: %s", consoleInterp->result);
219
	printf("Eval error: %s", Tcl_GetStringResult(consoleInterp));
220
    }
220
    }
221
    Tcl_Release((ClientData)consoleInterp);
221
    Tcl_Release((ClientData)consoleInterp);
222
    return TCL_OK;
222
    return TCL_OK;
Lines 487-497 Link Here
487
    Tcl_Preserve((ClientData)otherInterp);
487
    Tcl_Preserve((ClientData)otherInterp);
488
    if ((c == 'e') && (strncmp(argv[1], "eval", length)) == 0) {
488
    if ((c == 'e') && (strncmp(argv[1], "eval", length)) == 0) {
489
	result = Tcl_GlobalEval(otherInterp, argv[2]);
489
	result = Tcl_GlobalEval(otherInterp, argv[2]);
490
	Tcl_AppendResult(interp, otherInterp->result, (char *)NULL);
490
	Tcl_AppendResult(interp, Tcl_GetStringResult(otherInterp), (char *)NULL);
491
    } else if ((c == 'r') && (strncmp(argv[1], "record", length)) == 0) {
491
    } else if ((c == 'r') && (strncmp(argv[1], "record", length)) == 0) {
492
	Tcl_RecordAndEval(otherInterp, argv[2], TCL_EVAL_GLOBAL);
492
	Tcl_RecordAndEval(otherInterp, argv[2], TCL_EVAL_GLOBAL);
493
	result = TCL_OK;
493
	result = TCL_OK;
494
	Tcl_AppendResult(interp, otherInterp->result, (char *)NULL);
494
	Tcl_AppendResult(interp, Tcl_GetStringResult(otherInterp), (char *)NULL);
495
    } else {
495
    } else {
496
	Tcl_AppendResult(interp, "bad option \"", argv[1],
496
	Tcl_AppendResult(interp, "bad option \"", argv[1],
497
	    "\": should be eval or record",
497
	    "\": should be eval or record",
(-)src/tkScrollbar.c.ORIG (-1 / +1 lines)
Lines 533-539 Link Here
533
	} else {
533
	} else {
534
	    fraction = ((double)pixels / (double)barWidth);
534
	    fraction = ((double)pixels / (double)barWidth);
535
	}
535
	}
536
	sprintf(interp->result, "%g", fraction);
536
	sprintf(Tcl_GetStringResult(interp), "%s", fraction);
537
    } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) {
537
    } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) {
538
	int x, y, pos, barWidth;
538
	int x, y, pos, barWidth;
539
	double fraction;
539
	double fraction;

Return to bug 464694