summaryrefslogtreecommitdiffstats
path: root/generic/tkSelect.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't use sizeof(struct) when the structure has a char array as last ↵jan.nijtmans2017-05-081-2/+2
| | | | element: If the size of this array changes, we'll be in trouble.
* 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]
* Revert [ac229dabaa]. There is a reason the Tcl_GetIndexFromObj wrapper jenglish2013-02-271-10/+10
| | | exists and is used.
* Eliminate all Tcl_GetIndexFromObj calls, which is only a thin wrapper around ↵jan.nijtmans2013-02-271-10/+10
| | | | Tcl_GetIndexFromObjStruct.
* Much more cleaning up of result handling.dkf2012-07-231-46/+41
|
* Purge RCS Keywordsdgp2011-06-081-2/+0
|\
| * Purge RCS Keywords.dgp2011-06-081-2/+0
| |\
| | * Purge RCS Keywords.dgp2011-06-081-2/+0
| | |
| | * [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]
| | * Backport of fixes for [Bug 1353414]dkf2005-11-221-12/+15
| | |
| * | [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]
* | | Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to bedkf2011-03-121-16/+16
| | | | | | | | | using useful casts internally.
* | | tkSelect.c: Fix for [Bug #3164879] (memory allocation bugjenglish2011-01-241-3/+3
| | | | | | | | | | | | introduced by [Patch #3129527])
* | | [Bug 3129527]: Fix buffer overflow w/ GCC 4.5 and -D_FORTIFY_SOURCE=2nijtmans2010-12-061-4/+4
| | |
* | | Fix various 64-bit gcc(-4.5.2) warnings: cast from pointer to integer of ↵nijtmans2010-11-291-4/+4
| | | | | | | | | | | | different size
* | | SMALL FIX: Remove useless explicit casts now that we require C89 or later.dkf2010-01-021-9/+9
| | |
* | | Fix [Bug 2441988]. Also squelch use of TkCopyAndGlobalEval, we can do better!dkf2009-07-231-16/+23
| | |
* | | Merge of TkAqua Cocoa portmacosx_cocoa_mergedas2009-06-291-2/+2
| | |
* | | - eliminate some unnessary type castsnijtmans2009-02-031-8/+10
| | | | | | | | | | | | | | | - some internal const decorations - spacing
* | | 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:
* | | Lots of small changes to make code more pretty and C89-like.dkf2008-11-081-7/+7
| | |
* | | CONSTify TkPrintPadAmount, TkCreateFrame, TkCreateMainWindownijtmans2008-10-281-3/+3
| | | | | | | | | | | | | | | and Tk_ParseArgv. move TkSelGetSelection to internal stub table (needed in tkWinTest.c)
* | | 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.
* | | Greatly clean up Tk's handling of the writability of the Tcl result object.dkf2008-10-051-4/+2
| | |
* | | fix [2021443] inconsistant "wrong # args" messages (for Tk)nijtmans2008-07-231-6/+6
| | |
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-26/+26
|/ /
* | Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-2/+2
| |
* | Plug potential memory leak...dkf2005-11-221-1/+2
| |
* | ANSIfy and reduce casting of NULL to promote readabilitydkf2005-11-171-13/+12
| |
* | Fix problem in default selection handler outlined by test select-9.5dkf2005-11-141-12/+14
| |
* | Format for style and remove non-ANSI declsdkf2005-10-171-587/+585
| |
* | Removed support for Mac OS Classic platform [Patch 918139]das2004-03-171-2/+2
| |
* | * 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:
* * 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.
* *** 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
* 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)
* * 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]
* * 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]
* * 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.
* * 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.
* * 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.
* Fixed ANSI-style function definitions so that they work on K&Rredman1999-08-131-2/+2
| | | | compilers properly.
* * 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]
* * Merged 8.1 branch into the main trunkstanton1999-04-161-36/+94
|
* Replaced SCCS strings, fixed binary filesstanton1998-09-141-1/+1
|
* Initial revisionrjohnson1998-04-011-0/+1341