diff options
Diffstat (limited to 'tk/generic/tkClipboard.c')
-rw-r--r-- | tk/generic/tkClipboard.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tk/generic/tkClipboard.c b/tk/generic/tkClipboard.c index c50a80e7c8a..c1a8c81ba5f 100644 --- a/tk/generic/tkClipboard.c +++ b/tk/generic/tkClipboard.c @@ -6,7 +6,7 @@ * supplied on demand to requesting applications. * * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1995 Sun Microsystems, Inc. + * Copyright (c) 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -222,18 +222,18 @@ ClipboardLostSel(clientData) * * Take control of the clipboard and clear out the previous * contents. This procedure must be invoked before any - * calls to Tk_AppendToClipboard. + * calls to Tk_ClipboardAppend. * * Results: * A standard Tcl result. If an error occurs, an error message is - * left in interp->result. + * left in the interp's result. * * Side effects: * From now on, requests for the CLIPBOARD selection will be * directed to the clipboard manager routines associated with * clipWindow for the display of tkwin. In order to guarantee * atomicity, no event handling should occur between - * Tk_ClipboardClear and the following Tk_AppendToClipboard + * Tk_ClipboardClear and the following Tk_ClipboardAppend * calls. This procedure may cause a user-defined LostSel command * to be invoked when the CLIPBOARD is claimed, so any calling * function should be reentrant at the point Tk_ClipboardClear is @@ -307,11 +307,11 @@ Tk_ClipboardClear(interp, tkwin) * be returned. Tk_ClipboardClear must be called before a sequence * of Tk_ClipboardAppend calls can be issued. In order to guarantee * atomicity, no event handling should occur between Tk_ClipboardClear - * and the following Tk_AppendToClipboard calls. + * and the following Tk_ClipboardAppend calls. * * Results: * A standard Tcl result. If an error is returned, an error message - * is left in interp->result. + * is left in the interp's result. * * Side effects: * The specified buffer will be copied onto the end of the clipboard. @@ -528,9 +528,10 @@ Tk_ClipboardCmd(clientData, interp, argc, argv) } return Tk_ClipboardClear(interp, tkwin); } else { - sprintf(interp->result, - "bad option \"%.50s\": must be clear or append", - argv[1]); + char buf[100 + TCL_INTEGER_SPACE]; + + sprintf(buf, "bad option \"%.50s\": must be clear or append", argv[1]); + Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_ERROR; } } @@ -546,8 +547,8 @@ Tk_ClipboardCmd(clientData, interp, argc, argv) * * Results: * The result is a standard Tcl return value, which is normally TCL_OK. - * If an error occurs then an error message is left in interp->result - * and TCL_ERROR is returned. + * If an error occurs then an error message is left in the interp's + * result and TCL_ERROR is returned. * * Side effects: * Sets up the clipWindow and related data structures. @@ -604,3 +605,4 @@ TkClipInit(interp, dispPtr) (ClientData) dispPtr, XA_STRING); return TCL_OK; } + |