summaryrefslogtreecommitdiffstats
path: root/generic/tkSelect.c
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate all usage of __WIN32__ macro: Some compilers (e.g. Clang/LLVM) ↵jan.nijtmans2014-02-101-1/+1
| | | | | | | don't define it, and _WIN32 is much more portable anyway. See: [http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#WindowsCygwinnonPOSIXandMinGW] FossilOrigin-Name: 9e254137a80dc4fb5afc12b6eca9112b54764181
* Revert [ac229dabaa]. There is a reason the Tcl_GetIndexFromObj wrapper jenglish2013-02-271-10/+10
| | | | | exists and is used. FossilOrigin-Name: 6c26562fe3f83eea390818ed36601930e1cbe0d9
* Eliminate all Tcl_GetIndexFromObj calls, which is only a thin wrapper around ↵jan.nijtmans2013-02-271-10/+10
| | | | | Tcl_GetIndexFromObjStruct. FossilOrigin-Name: ac229dabaa17d676525667523b87cdab837c473d
* Much more cleaning up of result handling.dkf2012-07-231-46/+41
| | | FossilOrigin-Name: 016ad9dac31d39cbc9ded6a6e8e75c11618318a8
* Purge RCS Keywordsdgp2011-06-081-2/+0
|\ | | | | FossilOrigin-Name: b8a1385217cc117d6962c234f0a4d28ff10e089c
| * Purge RCS Keywords.dgp2011-06-081-2/+0
| |\ | | | | | | FossilOrigin-Name: 3f95fbe0ce14948fd409844b915c18ef25d7d0a0
| | * Purge RCS Keywords.dgp2011-06-081-2/+0
| | | | | | | | | FossilOrigin-Name: a74f32bb6369d3e66e661145c81a98a14ed79b3a
| | * [Patch #3129527]: Fix buffer overflow w/ GCC 4.5 and -D_FORTIFY_SOURCE=2.nijtmans2011-01-251-3/+3
| | | | | | | | | | | | | | | | | | Just the strcpy->memcpy part, to prevent anything like [Bug #3164879] FossilOrigin-Name: c3b14185eab0f5d8361f6e97bab0dbf0fde1357e
| | * Backport of fixes for [Bug 1353414]dkf2005-11-221-12/+15
| | | | | | | | | FossilOrigin-Name: 2ec30a4b5bc3f503838bfb75ed3128d4323643be
| * | [Patch #3129527]: Fix buffer overflow w/ GCC 4.5 and -D_FORTIFY_SOURCE=2.nijtmans2011-01-251-2/+2
| | | | | | | | | | | | | | | | | | Just the strcpy->memcpy part, to prevent anything like [Bug #3164879] FossilOrigin-Name: eea2c8aa548422c8fbabaaf713485156bf3c44f2
* | | Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to bedkf2011-03-121-16/+16
| | | | | | | | | | | | | | | using useful casts internally. FossilOrigin-Name: 142e016e7b17277d81257da90477297eb9aaa05a
* | | tkSelect.c: Fix for [Bug #3164879] (memory allocation bugjenglish2011-01-241-3/+3
| | | | | | | | | | | | | | | | | | introduced by [Patch #3129527]) FossilOrigin-Name: 129bebcc66febc0d2c4465f29ae717a637e096de
* | | [Bug 3129527]: Fix buffer overflow w/ GCC 4.5 and -D_FORTIFY_SOURCE=2nijtmans2010-12-061-4/+4
| | | | | | | | | FossilOrigin-Name: 7ac32814b4672de5c7760947d10671ca66a3aba2
* | | Fix various 64-bit gcc(-4.5.2) warnings: cast from pointer to integer of ↵nijtmans2010-11-291-4/+4
| | | | | | | | | | | | | | | different size FossilOrigin-Name: c6ea063c82eed28c54d2acd2d4dc1bad3c45d004
* | | SMALL FIX: Remove useless explicit casts now that we require C89 or later.dkf2010-01-021-9/+9
| | | | | | | | | FossilOrigin-Name: 270544288f23a8c9f860bd4744422c376ee4b471
* | | Fix [Bug 2441988]. Also squelch use of TkCopyAndGlobalEval, we can do better!dkf2009-07-231-16/+23
| | | | | | | | | FossilOrigin-Name: bd1165a06d17b3df426b97cda3e7df675656a81e
* | | Merge of TkAqua Cocoa portmacosx-cocoa-mergedas2009-06-291-2/+2
| | | | | | | | | FossilOrigin-Name: 05bd0a2cb86bb730d85069b3282e569b6c23d911
* | | - eliminate some unnessary type castsnijtmans2009-02-031-8/+10
| | | | | | | | | | | | | | | | | | | | | - some internal const decorations - spacing FossilOrigin-Name: 02ca10b00f1aed5c76ff8149fdbac48018e8bfa0
* | | TIP 337dgp2008-12-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tkBind.c: Updated callers of Tcl_BackgroundError() * generic/tkCanvas.c: to use the new routine * generic/tkEntry.c: Tcl_BackgroundException() as appropriate. * generic/tkImgBmap.c: * generic/tkListbox.c: * generic/tkSelect.c: * generic/tkTextDisp.c: * generic/tkTextWind.c: * macosx/tkMacOSXHLEvents.c: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXScale.c: * macosx/tkMacOSXWindowEvent.c: * unix/tkUnixScale.c: * unix/tkUnixWm.c: * win/tkWinButton.c: * win/tkWinMenu.c: * win/tkWinScrlbr.c: * win/tkWinWm.c: FossilOrigin-Name: 8390c9df2a3de24d02b3414ba3ef502bc1349814
* | | Lots of small changes to make code more pretty and C89-like.dkf2008-11-081-7/+7
| | | | | | | | | FossilOrigin-Name: 782ccc1d4281d79d7cd4e7db9add4b5aceba18fe
* | | CONSTify TkPrintPadAmount, TkCreateFrame, TkCreateMainWindownijtmans2008-10-281-3/+3
| | | | | | | | | | | | | | | | | | | | | and Tk_ParseArgv. move TkSelGetSelection to internal stub table (needed in tkWinTest.c) FossilOrigin-Name: 17c2598fc31e8f5a5ad87a7e318c7f069e149dc5
* | | Add "const" to many internalnijtmans2008-10-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries. FossilOrigin-Name: da3819dbb53904a418b6098f3b103df483c53304
* | | Greatly clean up Tk's handling of the writability of the Tcl result object.dkf2008-10-051-4/+2
| | | | | | | | | FossilOrigin-Name: a83341a36174d2059bc339dea19260a38eda5a01
* | | fix [2021443] inconsistant "wrong # args" messages (for Tk)nijtmans2008-07-231-6/+6
| | | | | | | | | FossilOrigin-Name: def570d7bdd7211b4c17c706781050222d16890f
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-26/+26
|/ / | | | | FossilOrigin-Name: ddfd8bb6f7ecfa71a218a5dc88075a419e3e1d5c
* | Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-2/+2
| | | | | | FossilOrigin-Name: df83633276978bd5f3b373829d5e1a75ef6b7d8d
* | Plug potential memory leak...dkf2005-11-221-1/+2
| | | | | | FossilOrigin-Name: 911c8564376ab2fd9759975edc042ade8875b914
* | ANSIfy and reduce casting of NULL to promote readabilitydkf2005-11-171-13/+12
| | | | | | FossilOrigin-Name: b6c2c77cac3cacef0e58af5c6be63af4359a2949
* | Fix problem in default selection handler outlined by test select-9.5dkf2005-11-141-12/+14
| | | | | | FossilOrigin-Name: 86521c09de741088f352649b261bb012b66372e6
* | Format for style and remove non-ANSI declsdkf2005-10-171-587/+585
| | | | | | FossilOrigin-Name: 803d1abe2314837da1238b0342167840d1226aaa
* | Removed support for Mac OS Classic platform [Patch 918139]das2004-03-171-2/+2
| | | | | | FossilOrigin-Name: 28ec831e756a8fba6e184ce2667ee594c4901904
* | * generic/tk3d.c: All uses of 'panic' (the macro) changeddavygrvy2004-01-131-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tkBind.c: to 'Tcl_Panic' (the function). The #define * generic/tkBitmap.c: of panic in tcl.h clearly states it is * generic/tkCanvArc.c: deprecated in the comments. * generic/tkCanvBmap.c: [Tcl Patch 865264] * generic/tkCanvImg.c: * generic/tkCanvLine.c: * generic/tkCanvPoly.c: * generic/tkCanvText.c: * generic/tkCanvWind.c: * generic/tkColor.c: * generic/tkConfig.c: * generic/tkCursor.c: * generic/tkError.c: * generic/tkEvent.c: * generic/tkFocus.c: * generic/tkFont.c: * generic/tkFrame.c: * generic/tkGC.c: * generic/tkGrid.c: * generic/tkImgBmap.c: * generic/tkImgPhoto.c: * generic/tkImgUtil.c: * generic/tkMenu.c: * generic/tkObj.c: * generic/tkPack.c: * generic/tkPlace.c: * generic/tkRectOval.c: * generic/tkSelect.c: * generic/tkText.c: * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextImage.c: * generic/tkTextIndex.c: * generic/tkTextMark.c: * generic/tkTextWind.c: * generic/tkVisual.c: * generic/tkWindow.c: * mac/tkMacAppInit.c: * mac/tkMacAppearanceStubs.c: * mac/tkMacButton.c: * mac/tkMacDraw.c: * mac/tkMacEmbed.c: * mac/tkMacFont.c: * mac/tkMacInit.c: * mac/tkMacMenus.c: * mac/tkMacPort.h: * mac/tkMacSubwindows.c: * mac/tkMacWm.c: * mac/tkMacXStubs.c: * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXPort.h: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * unix/tkUnix3d.c: * unix/tkUnixColor.c: * unix/tkUnixEmbed.c: * unix/tkUnixEvent.c: * unix/tkUnixFocus.c: * unix/tkUnixFont.c: * unix/tkUnixSelect.c: * unix/tkUnixSend.c: * unix/tkUnixWm.c: * win/tkWin3d.c: * win/tkWinButton.c: * win/tkWinColor.c: * win/tkWinDialog.c: * win/tkWinDraw.c: * win/tkWinEmbed.c: * win/tkWinFont.c: * win/tkWinPixmap.c: * win/tkWinPointer.c: * win/tkWinScrlbr.c: * win/tkWinWm.c: * win/tkWinX.c: FossilOrigin-Name: a08e5aacfc9f6c5a344c2d05454773dac90710c2
* * generic/tkSelect.c (Tk_CreateSelHandler):jenglish2003-01-141-4/+5
| | | | | | | Fix for #666346 "Selection handling crashes under KDE 3.0" * tests/unixSelect.test (unixSelect-1.20): Added test case. FossilOrigin-Name: d6fd320a3fbd5ed8fcdfeb9ed2b6da8ebdf5f859
* *** macosx-8-4-branch merged into the mainline [tcl patch #602770] ***macosx-8-4-merge-2002-08-31-trunkdas2002-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tk.decls: * generic/tkInt.decls: added new "aqua" specific entries to the stubs tables. Changed all "unix" entries to "x11" to allow us to distinguish and build both "aqua" on MacOSX and "x11" on MacOSX. * generic/tk.h: added a #ifnded RESOURCE_INCLUDED so that tk.h can be passed to the resource compiler. * generic/tkCmds.c (Tk_TkObjCmd): added [tk windowingsystem] subcommand: returns "x11" when running on X11, "win32" on Windows, "classic" on MacOS9 and "aqua" on MacOSX Aqua (i.e. Carbon) * generic/tkFont.c (TkFontGetFirstTextLayout): new private function returning the first chunk of a Tk_TextLayout, i.e. until the first font change on the first line (or the whole first line if there is no such font change). * generic/tkMain.c: made Tcl_ThreadDataKey static * library/demos/puzzle.tcl: fixed button metrics for aqua * tests/cursor.test: check for presence of arrow cursor instead of heart cursor * xlib/xcolors.c: changed xColors static initialization to more standard C * macosx/Wish.pbproj/jingham.pbxuser (new): * macosx/Wish.pbproj/project.pbxproj (new): project for Apple's ProjectBuilder IDE. * macosx/Makefile (new): simple makefile for building the project from the command line via the ProjectBuilder tool 'pbxbuild'. * macosx/tkMacOSXAppInit.c (new): macosx specific AppInit looking for a AppMain.tcl file in its bundled Resources/Scripts folder. If present, argv[1] is set to that file and the Scripts folder is added to the auto_path. This allows tk apps to embed scripts within their bundle directory structure. * macosx/tkMacOSXInit.c (new): macosx adapted version of tkUnixInit.c: we initialize & cache the Carbon native encoding (e.g. 'macRoman') and try to find the tk script library files inside Tk packaged as a framework. * macosx/tkMacOSXNotify.c (new): new macosx specific merged Carbon/select-based notifier. * macosx/tkMacOSXEvent.c (new): * macosx/tkMacOSXEvent.h (new): * macosx/tkMacOSXKeyEvent.c (new): * macosx/tkMacOSXMouseEvent.c (new): * macosx/tkMacOSXWindowEvent.c (new): new macosx specific event handling functionality. * macosx/tkMacOSX.h (new): * macosx/tkMacOSXBitmap.c (new): * macosx/tkMacOSXButton.c (new): * macosx/tkMacOSXClipboard.c (new): * macosx/tkMacOSXColor.c (new): * macosx/tkMacOSXConfig.c (new): * macosx/tkMacOSXCursor.c (new): * macosx/tkMacOSXDefault.h (new): * macosx/tkMacOSXDialog.c (new): * macosx/tkMacOSXDraw.c (new): * macosx/tkMacOSXEmbed.c (new): * macosx/tkMacOSXFont.c (new): * macosx/tkMacOSXHLEvents.c (new): * macosx/tkMacOSXInt.h (new): * macosx/tkMacOSXKeyboard.c (new): * macosx/tkMacOSXMenu.c (new): * macosx/tkMacOSXMenubutton.c (new): * macosx/tkMacOSXMenus.c (new): * macosx/tkMacOSXPort.h (new): * macosx/tkMacOSXRegion.c (new): * macosx/tkMacOSXScale.c (new): * macosx/tkMacOSXScrlbr.c (new): * macosx/tkMacOSXSubwindows.c (new): * macosx/tkMacOSXTest.c (new): * macosx/tkMacOSXUtil.c (new): * macosx/tkMacOSXUtil.h (new): * macosx/tkMacOSXWm.c (new): * macosx/tkMacOSXWm.h (new): * macosx/tkMacOSXXStubs.c (new): macosx ports of classic mac Tk implementation in tk/mac. * macosx/tkMacOSXSend.c (new): only send to local interp implemented currently. * macosx/tkMacOSXDebug.h (new): * macosx/tkMacOSXDebug.c (new): new macosx specific functions for debugging MacOS events, regions, etc. * macosx/tkAboutDlg.r (new): * macosx/tkMacOSXApplication.r (new): * macosx/tkMacOSXCursors.r (new): * macosx/tkMacOSXLibrary.r (new): * macosx/tkMacOSXMenu.r (new): * macosx/tkMacOSXResource.r (new): * macosx/tkMacOSXXCursors.r (new): * macosx/tclets.r (new): sources for Rez resource compiler. * macosx/Wish.icns (new): Wish application icon. * generic/tk.h: * generic/default.h: * generic/tkBind.c: * generic/tkCmds.c: * generic/tkGrab.c: * generic/tkPointer.c: * generic/tkPort.h: * generic/tkSelect.c: * generic/tkStubLib.c: * generic/tkTest.c: * generic/tkText.c: * generic/tkWindow.c: * unix/tkUnix3d.c: * xlib/xgc.c: * xlib/X11/X.h: * xlib/X11/Xlib.h: * xlib/X11/Xutil.h: added #includes and #ifdefs for macosx * library/bgerror.tcl: * library/button.tcl: * library/console.tcl: * library/dialog.tcl: * library/entry.tcl: * library/listbox.tcl: * library/menu.tcl: * library/msgbox.tcl: * library/scrlbar.tcl: * library/spinbox.tcl: * library/text.tcl: * library/tk.tcl: * library/demos/menu.tcl: * library/demos/menubu.tcl: * library/demos/widget: check [tk windowingsystem] instead of and/or in addition to $tcl_platform(platform). * generic/tkInt.h: * mac/tkMacBitmap.c: * mac/tkMacWm.c: added missing CONSTification * generic/tkIntDecls.h: * generic/tkIntPlatDecls.h: * generic/tkIntXlibDecls.h: * generic/tkPlatDecls.h: * generic/tkStubInit.c: regen FossilOrigin-Name: 6b4c1410c56a191e66a5d9fdeed5b10c8b44eaa0
* Applied companion patch for Tcl Patch 585105,dgp2002-08-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | updating Tk to use Tcl 8.4's fully CONST-ified interface, and fully CONSTifying Tk at the same time. This patch includes purging Tk of its last direct access to interp->result. [Bug 589853] The substantial changes include copying event sequence strings into Tcl_DStrings in tkBind.c, and copying [text] indices into Tcl_DStrings because parsing them involved overwriting them. If this causes performance trouble, that can be resolved by further converting them to Tcl_Obj's. The #defines USE_NON_CONST and USE_COMPAT_CONST have the same effect for Tk as they do for Tcl. (They actually change tcl.h) FossilOrigin-Name: 5603f01aa35a127f83db9bb68f3b1ff9e5bb64de
* * Updates to handle change in type of tablePtrdgp2002-01-171-10/+14
| | | | | | | argument of Tcl_GetIndexFromObj(Struct) from (char **) to (CONST char **). [TIP 27] [Patch 504705] FossilOrigin-Name: 85e5c7aa1baa3bd2b7bdb971f3cf83f4f5573723
* * Updated callers of Tcl_Utf* and Tcl_Regexp* APIs to reflect TIP 27dgp2002-01-171-2/+2
| | | | | | API changes (see Tcl Patch 471509). [Patch 471513] FossilOrigin-Name: 061e364d6f7bae391846089032e5501a301d0dde
* * generic/tkBind.c (TkBindFree):dgp2002-01-041-3/+3
| | | | | | | | * generic/tkGrid.c (ResolveConstraints,CheckSlotData,DestroyGrid): * generic/tkSelect.c (Tk_DeleteSelHandler,TkSelDeadWindow): Replaced Tcl_Free calls with ckfree so that memory debugging is fully supported. FossilOrigin-Name: 7eae11202e53a732b5f73da88eaf3b2550df3c5c
* * library/console.tcl:hobbs2001-07-031-17/+102
| | | | | | | | | | | | | | | | | | | | | | | * library/entry.tcl: * library/spinbox.tcl: * library/text.tcl: * library/tk.tcl: added private ::tk::GetSelection command to handle requesting selection. This is to support requesting UTF8_STRING before generic STRING on Unix. Changed Text, Spinbox, Entry and Console to use this command. * tests/select.test: * generic/tkSelect.c (Tk_CreateSelHandler, Tk_DeleteSelHandler): on Unix, a UTF8_STRING handler will be created when the user requests a STRING handler (in addition to the STRING handler). This provides implicit support for the new UTF8_STRING selection target. * unix/tkUnixSelect.c (TkSelEventProc, ConvertSelection): Added support for UTF8_STRING target. [RFE #418653, Patch #433283] * generic/tkInt.h: added utf8Atom to TkDisplay structure. FossilOrigin-Name: 3993717faaae94fc303c678c9c3637465ce2c0a4
* * generic/tkWindow.c: Updated [selection] command entry to useericm2000-08-071-254/+298
| | | | | | | | | | | | | | | new Tcl_Obj interface. * generic/tkInt.h: Replaced Tk_SelectionCmd prototype with Tk_SelectionObjCmd prototype. * tests/select.test: Updated test suite to recognize standardized error messages. * generic/tkSelect.c (Tk_SelectionObjCmd): Tcl_Obj'ified [selection] command. FossilOrigin-Name: 710af28cbcfe1e1df92d60de1e3d19ce0291b1ab
* Fixed ANSI-style function definitions so that they work on K&Rredman1999-08-131-2/+2
| | | | | | compilers properly. FossilOrigin-Name: 416e0059d299b474d6e20272739c9c761471a4c2
* * unix/tkUnixSelect.c:stanton1999-06-031-20/+87
| | | | | | | | * tests/unixSelect.test: * generic/tkSelect.c: Fixed selection code to handle Unicode data in COMPOUND_TEXT and STRING selections. [Bug: 1791] FossilOrigin-Name: 0b25ecf24d82bddbf8ea891086f2b369146793db
* * Merged 8.1 branch into the main trunkstanton1999-04-161-36/+94
| | | FossilOrigin-Name: 1120dc4257448ed1955333e682de48e2940cc741
* Replaced SCCS strings, fixed binary filesstanton1998-09-141-1/+1
| | | FossilOrigin-Name: fb58b663f313796e8ed3115f92d657f0cae1d575
* Initial revisionrjohnson1998-04-011-0/+1341
FossilOrigin-Name: 2bf55ca9aa942b581137b9f474da5ad9c1480de4