Import build of Tcl/Tk 8.6.10

This commit is contained in:
Steve Dower
2020-09-24 23:32:28 +01:00
parent 86027ce3ed
commit c0c00d5551
498 changed files with 65344 additions and 64042 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,65 @@
/***********************************************************
Copyright 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/*
* DEC private keysyms
* (29th bit set)
*/
/* two-key compose sequence initiators, chosen to map to Latin1 characters */
#define DXK_ring_accent 0x1000FEB0
#define DXK_circumflex_accent 0x1000FE5E
#define DXK_cedilla_accent 0x1000FE2C
#define DXK_acute_accent 0x1000FE27
#define DXK_grave_accent 0x1000FE60
#define DXK_tilde 0x1000FE7E
#define DXK_diaeresis 0x1000FE22
/* special keysym for LK2** "Remove" key on editing keypad */
#define DXK_Remove 0x1000FF00 /* Remove */

View File

@@ -0,0 +1,164 @@
/*
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Hewlett Packard
or Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. Hewlett-Packard shall not be liable for errors
contained herein or direct, indirect, special, incidental or
consequential damages in connection with the furnishing,
performance, or use of this material.
*/
#ifndef _HPKEYSYM_H
#define _HPKEYSYM_H
#define hpXK_ClearLine 0x1000FF6F
#define hpXK_InsertLine 0x1000FF70
#define hpXK_DeleteLine 0x1000FF71
#define hpXK_InsertChar 0x1000FF72
#define hpXK_DeleteChar 0x1000FF73
#define hpXK_BackTab 0x1000FF74
#define hpXK_KP_BackTab 0x1000FF75
#define hpXK_Modelock1 0x1000FF48
#define hpXK_Modelock2 0x1000FF49
#define hpXK_Reset 0x1000FF6C
#define hpXK_System 0x1000FF6D
#define hpXK_User 0x1000FF6E
#define hpXK_mute_acute 0x100000A8
#define hpXK_mute_grave 0x100000A9
#define hpXK_mute_asciicircum 0x100000AA
#define hpXK_mute_diaeresis 0x100000AB
#define hpXK_mute_asciitilde 0x100000AC
#define hpXK_lira 0x100000AF
#define hpXK_guilder 0x100000BE
#define hpXK_Ydiaeresis 0x100000EE
#define hpXK_IO 0x100000EE
#define hpXK_longminus 0x100000F6
#define hpXK_block 0x100000FC
#ifndef _OSF_Keysyms
#define _OSF_Keysyms
#define osfXK_Copy 0x1004FF02
#define osfXK_Cut 0x1004FF03
#define osfXK_Paste 0x1004FF04
#define osfXK_BackTab 0x1004FF07
#define osfXK_BackSpace 0x1004FF08
#define osfXK_Clear 0x1004FF0B
#define osfXK_Escape 0x1004FF1B
#define osfXK_AddMode 0x1004FF31
#define osfXK_PrimaryPaste 0x1004FF32
#define osfXK_QuickPaste 0x1004FF33
#define osfXK_PageLeft 0x1004FF40
#define osfXK_PageUp 0x1004FF41
#define osfXK_PageDown 0x1004FF42
#define osfXK_PageRight 0x1004FF43
#define osfXK_Activate 0x1004FF44
#define osfXK_MenuBar 0x1004FF45
#define osfXK_Left 0x1004FF51
#define osfXK_Up 0x1004FF52
#define osfXK_Right 0x1004FF53
#define osfXK_Down 0x1004FF54
#define osfXK_EndLine 0x1004FF57
#define osfXK_BeginLine 0x1004FF58
#define osfXK_EndData 0x1004FF59
#define osfXK_BeginData 0x1004FF5A
#define osfXK_PrevMenu 0x1004FF5B
#define osfXK_NextMenu 0x1004FF5C
#define osfXK_PrevField 0x1004FF5D
#define osfXK_NextField 0x1004FF5E
#define osfXK_Select 0x1004FF60
#define osfXK_Insert 0x1004FF63
#define osfXK_Undo 0x1004FF65
#define osfXK_Menu 0x1004FF67
#define osfXK_Cancel 0x1004FF69
#define osfXK_Help 0x1004FF6A
#define osfXK_SelectAll 0x1004FF71
#define osfXK_DeselectAll 0x1004FF72
#define osfXK_Reselect 0x1004FF73
#define osfXK_Extend 0x1004FF74
#define osfXK_Restore 0x1004FF78
#define osfXK_Delete 0x1004FFFF
#endif /* _OSF_Keysyms */
/**************************************************************
* The use of the following macros is deprecated.
* They are listed below only for backwards compatibility.
*/
#define XK_Reset 0x1000FF6C
#define XK_System 0x1000FF6D
#define XK_User 0x1000FF6E
#define XK_ClearLine 0x1000FF6F
#define XK_InsertLine 0x1000FF70
#define XK_DeleteLine 0x1000FF71
#define XK_InsertChar 0x1000FF72
#define XK_DeleteChar 0x1000FF73
#define XK_BackTab 0x1000FF74
#define XK_KP_BackTab 0x1000FF75
#define XK_Ext16bit_L 0x1000FF76
#define XK_Ext16bit_R 0x1000FF77
#define XK_mute_acute 0x100000a8
#define XK_mute_grave 0x100000a9
#define XK_mute_asciicircum 0x100000aa
#define XK_mute_diaeresis 0x100000ab
#define XK_mute_asciitilde 0x100000ac
#define XK_lira 0x100000af
#define XK_guilder 0x100000be
#ifndef XK_Ydiaeresis
#define XK_Ydiaeresis 0x100000ee
#endif
#define XK_IO 0x100000ee
#define XK_longminus 0x100000f6
#define XK_block 0x100000fc
#endif /* _HPKEYSYM_H */

View File

@@ -0,0 +1,106 @@
/*
* Copyright (c) 1991, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/************************************************************
Copyright 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
***********************************************************/
/*
* Floating Accent
*/
#define SunXK_FA_Grave 0x1005FF00
#define SunXK_FA_Circum 0x1005FF01
#define SunXK_FA_Tilde 0x1005FF02
#define SunXK_FA_Acute 0x1005FF03
#define SunXK_FA_Diaeresis 0x1005FF04
#define SunXK_FA_Cedilla 0x1005FF05
/*
* Miscellaneous Functions
*/
#define SunXK_F36 0x1005FF10 /* Labeled F11 */
#define SunXK_F37 0x1005FF11 /* Labeled F12 */
#define SunXK_Sys_Req 0x1005FF60
#define SunXK_Print_Screen 0x0000FF61 /* Same as XK_Print */
/*
* International & Multi-Key Character Composition
*/
#define SunXK_Compose 0x0000FF20 /* Same as XK_Multi_key */
#define SunXK_AltGraph 0x0000FF7E /* Same as XK_Mode_switch */
/*
* Cursor Control
*/
#define SunXK_PageUp 0x0000FF55 /* Same as XK_Prior */
#define SunXK_PageDown 0x0000FF56 /* Same as XK_Next */
/*
* Open Look Functions
*/
#define SunXK_Undo 0x0000FF65 /* Same as XK_Undo */
#define SunXK_Again 0x0000FF66 /* Same as XK_Redo */
#define SunXK_Find 0x0000FF68 /* Same as XK_Find */
#define SunXK_Stop 0x0000FF69 /* Same as XK_Cancel */
#define SunXK_Props 0x1005FF70
#define SunXK_Front 0x1005FF71
#define SunXK_Copy 0x1005FF72
#define SunXK_Open 0x1005FF73
#define SunXK_Paste 0x1005FF74
#define SunXK_Cut 0x1005FF75
#define SunXK_PowerSwitch 0x1005FF76
#define SunXK_AudioLowerVolume 0x1005FF77
#define SunXK_AudioMute 0x1005FF78
#define SunXK_AudioRaiseVolume 0x1005FF79
#define SunXK_VideoDegauss 0x1005FF7A
#define SunXK_VideoLowerBrightness 0x1005FF7B
#define SunXK_VideoRaiseBrightness 0x1005FF7C
#define SunXK_PowerSwitchShift 0x1005FF7D

View File

@@ -41,7 +41,7 @@ SOFTWARE.
/* Resources */
#ifdef _WIN64
typedef __int64 XID;
typedef unsigned __int64 XID;
#else
typedef unsigned long XID;
#endif
@@ -73,7 +73,9 @@ typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
*****************************************************************/
#define None 0L /* universal null resource or null atom */
#ifndef _WIN32
# define None 0L /* See bug [9e31fd9449] and below */
#endif
#define ParentRelative 1L /* background pixmap in CreateWindow
and ChangeWindowAttributes */
@@ -179,13 +181,20 @@ are reserved in the protocol for errors and replies. */
#define ShiftMask (1<<0)
#define LockMask (1<<1)
#define ControlMask (1<<2)
#ifndef _WIN32
# define ControlMask (1<<2) /* See bug [9e31fd9449] and below */
#endif
#define Mod1Mask (1<<3)
#define Mod2Mask (1<<4)
#define Mod3Mask (1<<5)
#define Mod4Mask (1<<6)
#define Mod5Mask (1<<7)
/* See bug [9e31fd9449], this way prevents conflicts with Win32 headers */
#ifdef _WIN32
enum _Bug9e31fd9449 { None = 0, ControlMask = (1<<2) };
#endif
/* modifier names. Used to build a SetModifierMapping request or
to read a GetModifierMapping request. These correspond to the
masks defined above. */

View File

@@ -0,0 +1,230 @@
/*
* XFree86 vendor specific keysyms.
*
* The XFree86 keysym range is 0x10080001 - 0x1008FFFF.
*
* X.Org will not be adding to the XF86 set of keysyms, though they have
* been adopted and are considered a "standard" part of X keysym definitions.
* XFree86 never properly commented these keysyms, so we have done our
* best to explain the semantic meaning of these keys.
*
* XFree86 has removed their mail archives of the period, that might have
* shed more light on some of these definitions. Until/unless we resurrect
* these archives, these are from memory and usage.
*/
/*
* ModeLock
*
* This one is old, and not really used any more since XKB offers this
* functionality.
*/
#define XF86XK_ModeLock 0x1008FF01 /* Mode Switch Lock */
/* Backlight controls. */
#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
#define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
#define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
#define XF86XK_MonBrightnessCycle 0x1008FF07 /* Monitor/panel brightness */
/*
* Keys found on some "Internet" keyboards.
*/
#define XF86XK_Standby 0x1008FF10 /* System into standby mode */
#define XF86XK_AudioLowerVolume 0x1008FF11 /* Volume control down */
#define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */
#define XF86XK_AudioRaiseVolume 0x1008FF13 /* Volume control up */
#define XF86XK_AudioPlay 0x1008FF14 /* Start playing of audio > */
#define XF86XK_AudioStop 0x1008FF15 /* Stop playing audio */
#define XF86XK_AudioPrev 0x1008FF16 /* Previous track */
#define XF86XK_AudioNext 0x1008FF17 /* Next track */
#define XF86XK_HomePage 0x1008FF18 /* Display user's home page */
#define XF86XK_Mail 0x1008FF19 /* Invoke user's mail program */
#define XF86XK_Start 0x1008FF1A /* Start application */
#define XF86XK_Search 0x1008FF1B /* Search */
#define XF86XK_AudioRecord 0x1008FF1C /* Record audio application */
/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */
#define XF86XK_Calculator 0x1008FF1D /* Invoke calculator program */
#define XF86XK_Memo 0x1008FF1E /* Invoke Memo taking program */
#define XF86XK_ToDoList 0x1008FF1F /* Invoke To Do List program */
#define XF86XK_Calendar 0x1008FF20 /* Invoke Calendar program */
#define XF86XK_PowerDown 0x1008FF21 /* Deep sleep the system */
#define XF86XK_ContrastAdjust 0x1008FF22 /* Adjust screen contrast */
#define XF86XK_RockerUp 0x1008FF23 /* Rocker switches exist up */
#define XF86XK_RockerDown 0x1008FF24 /* and down */
#define XF86XK_RockerEnter 0x1008FF25 /* and let you press them */
/* Some more "Internet" keyboard symbols */
#define XF86XK_Back 0x1008FF26 /* Like back on a browser */
#define XF86XK_Forward 0x1008FF27 /* Like forward on a browser */
#define XF86XK_Stop 0x1008FF28 /* Stop current operation */
#define XF86XK_Refresh 0x1008FF29 /* Refresh the page */
#define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */
#define XF86XK_WakeUp 0x1008FF2B /* Wake up system from sleep */
#define XF86XK_Eject 0x1008FF2C /* Eject device (e.g. DVD) */
#define XF86XK_ScreenSaver 0x1008FF2D /* Invoke screensaver */
#define XF86XK_WWW 0x1008FF2E /* Invoke web browser */
#define XF86XK_Sleep 0x1008FF2F /* Put system to sleep */
#define XF86XK_Favorites 0x1008FF30 /* Show favorite locations */
#define XF86XK_AudioPause 0x1008FF31 /* Pause audio playing */
#define XF86XK_AudioMedia 0x1008FF32 /* Launch media collection app */
#define XF86XK_MyComputer 0x1008FF33 /* Display "My Computer" window */
#define XF86XK_VendorHome 0x1008FF34 /* Display vendor home web site */
#define XF86XK_LightBulb 0x1008FF35 /* Light bulb keys exist */
#define XF86XK_Shop 0x1008FF36 /* Display shopping web site */
#define XF86XK_History 0x1008FF37 /* Show history of web surfing */
#define XF86XK_OpenURL 0x1008FF38 /* Open selected URL */
#define XF86XK_AddFavorite 0x1008FF39 /* Add URL to favorites list */
#define XF86XK_HotLinks 0x1008FF3A /* Show "hot" links */
#define XF86XK_BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */
#define XF86XK_Finance 0x1008FF3C /* Display financial site */
#define XF86XK_Community 0x1008FF3D /* Display user's community */
#define XF86XK_AudioRewind 0x1008FF3E /* "rewind" audio track */
#define XF86XK_BackForward 0x1008FF3F /* ??? */
#define XF86XK_Launch0 0x1008FF40 /* Launch Application */
#define XF86XK_Launch1 0x1008FF41 /* Launch Application */
#define XF86XK_Launch2 0x1008FF42 /* Launch Application */
#define XF86XK_Launch3 0x1008FF43 /* Launch Application */
#define XF86XK_Launch4 0x1008FF44 /* Launch Application */
#define XF86XK_Launch5 0x1008FF45 /* Launch Application */
#define XF86XK_Launch6 0x1008FF46 /* Launch Application */
#define XF86XK_Launch7 0x1008FF47 /* Launch Application */
#define XF86XK_Launch8 0x1008FF48 /* Launch Application */
#define XF86XK_Launch9 0x1008FF49 /* Launch Application */
#define XF86XK_LaunchA 0x1008FF4A /* Launch Application */
#define XF86XK_LaunchB 0x1008FF4B /* Launch Application */
#define XF86XK_LaunchC 0x1008FF4C /* Launch Application */
#define XF86XK_LaunchD 0x1008FF4D /* Launch Application */
#define XF86XK_LaunchE 0x1008FF4E /* Launch Application */
#define XF86XK_LaunchF 0x1008FF4F /* Launch Application */
#define XF86XK_ApplicationLeft 0x1008FF50 /* switch to application, left */
#define XF86XK_ApplicationRight 0x1008FF51 /* switch to application, right*/
#define XF86XK_Book 0x1008FF52 /* Launch bookreader */
#define XF86XK_CD 0x1008FF53 /* Launch CD/DVD player */
#define XF86XK_Calculater 0x1008FF54 /* Launch Calculater */
#define XF86XK_Clear 0x1008FF55 /* Clear window, screen */
#define XF86XK_Close 0x1008FF56 /* Close window */
#define XF86XK_Copy 0x1008FF57 /* Copy selection */
#define XF86XK_Cut 0x1008FF58 /* Cut selection */
#define XF86XK_Display 0x1008FF59 /* Output switch key */
#define XF86XK_DOS 0x1008FF5A /* Launch DOS (emulation) */
#define XF86XK_Documents 0x1008FF5B /* Open documents window */
#define XF86XK_Excel 0x1008FF5C /* Launch spread sheet */
#define XF86XK_Explorer 0x1008FF5D /* Launch file explorer */
#define XF86XK_Game 0x1008FF5E /* Launch game */
#define XF86XK_Go 0x1008FF5F /* Go to URL */
#define XF86XK_iTouch 0x1008FF60 /* Logitech iTouch- don't use */
#define XF86XK_LogOff 0x1008FF61 /* Log off system */
#define XF86XK_Market 0x1008FF62 /* ?? */
#define XF86XK_Meeting 0x1008FF63 /* enter meeting in calendar */
#define XF86XK_MenuKB 0x1008FF65 /* distinguish keyboard from PB */
#define XF86XK_MenuPB 0x1008FF66 /* distinguish PB from keyboard */
#define XF86XK_MySites 0x1008FF67 /* Favourites */
#define XF86XK_New 0x1008FF68 /* New (folder, document... */
#define XF86XK_News 0x1008FF69 /* News */
#define XF86XK_OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/
#define XF86XK_Open 0x1008FF6B /* Open */
#define XF86XK_Option 0x1008FF6C /* ?? */
#define XF86XK_Paste 0x1008FF6D /* Paste */
#define XF86XK_Phone 0x1008FF6E /* Launch phone; dial number */
#define XF86XK_Q 0x1008FF70 /* Compaq's Q - don't use */
#define XF86XK_Reply 0x1008FF72 /* Reply e.g., mail */
#define XF86XK_Reload 0x1008FF73 /* Reload web page, file, etc. */
#define XF86XK_RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */
#define XF86XK_RotationPB 0x1008FF75 /* don't use */
#define XF86XK_RotationKB 0x1008FF76 /* don't use */
#define XF86XK_Save 0x1008FF77 /* Save (file, document, state */
#define XF86XK_ScrollUp 0x1008FF78 /* Scroll window/contents up */
#define XF86XK_ScrollDown 0x1008FF79 /* Scrool window/contentd down */
#define XF86XK_ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */
#define XF86XK_Send 0x1008FF7B /* Send mail, file, object */
#define XF86XK_Spell 0x1008FF7C /* Spell checker */
#define XF86XK_SplitScreen 0x1008FF7D /* Split window or screen */
#define XF86XK_Support 0x1008FF7E /* Get support (??) */
#define XF86XK_TaskPane 0x1008FF7F /* Show tasks */
#define XF86XK_Terminal 0x1008FF80 /* Launch terminal emulator */
#define XF86XK_Tools 0x1008FF81 /* toolbox of desktop/app. */
#define XF86XK_Travel 0x1008FF82 /* ?? */
#define XF86XK_UserPB 0x1008FF84 /* ?? */
#define XF86XK_User1KB 0x1008FF85 /* ?? */
#define XF86XK_User2KB 0x1008FF86 /* ?? */
#define XF86XK_Video 0x1008FF87 /* Launch video player */
#define XF86XK_WheelButton 0x1008FF88 /* button from a mouse wheel */
#define XF86XK_Word 0x1008FF89 /* Launch word processor */
#define XF86XK_Xfer 0x1008FF8A
#define XF86XK_ZoomIn 0x1008FF8B /* zoom in view, map, etc. */
#define XF86XK_ZoomOut 0x1008FF8C /* zoom out view, map, etc. */
#define XF86XK_Away 0x1008FF8D /* mark yourself as away */
#define XF86XK_Messenger 0x1008FF8E /* as in instant messaging */
#define XF86XK_WebCam 0x1008FF8F /* Launch web camera app. */
#define XF86XK_MailForward 0x1008FF90 /* Forward in mail */
#define XF86XK_Pictures 0x1008FF91 /* Show pictures */
#define XF86XK_Music 0x1008FF92 /* Launch music application */
#define XF86XK_Battery 0x1008FF93 /* Display battery information */
#define XF86XK_Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */
#define XF86XK_WLAN 0x1008FF95 /* Enable/disable WLAN */
#define XF86XK_UWB 0x1008FF96 /* Enable/disable UWB */
#define XF86XK_AudioForward 0x1008FF97 /* fast-forward audio track */
#define XF86XK_AudioRepeat 0x1008FF98 /* toggle repeat mode */
#define XF86XK_AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */
#define XF86XK_Subtitle 0x1008FF9A /* cycle through subtitle */
#define XF86XK_AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */
#define XF86XK_CycleAngle 0x1008FF9C /* cycle through angles */
#define XF86XK_FrameBack 0x1008FF9D /* video: go one frame back */
#define XF86XK_FrameForward 0x1008FF9E /* video: go one frame forward */
#define XF86XK_Time 0x1008FF9F /* display, or shows an entry for time seeking */
#define XF86XK_Select 0x1008FFA0 /* Select button on joypads and remotes */
#define XF86XK_View 0x1008FFA1 /* Show a view options/properties */
#define XF86XK_TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */
#define XF86XK_Red 0x1008FFA3 /* Red button */
#define XF86XK_Green 0x1008FFA4 /* Green button */
#define XF86XK_Yellow 0x1008FFA5 /* Yellow button */
#define XF86XK_Blue 0x1008FFA6 /* Blue button */
#define XF86XK_Suspend 0x1008FFA7 /* Sleep to RAM */
#define XF86XK_Hibernate 0x1008FFA8 /* Sleep to disk */
#define XF86XK_TouchpadToggle 0x1008FFA9 /* Toggle between touchpad/trackstick */
#define XF86XK_TouchpadOn 0x1008FFB0 /* The touchpad got switched on */
#define XF86XK_TouchpadOff 0x1008FFB1 /* The touchpad got switched off */
#define XF86XK_AudioMicMute 0x1008FFB2 /* Mute the Mic from the system */
#define XF86XK_Keyboard 0x1008FFB3 /* User defined keyboard related action */
#define XF86XK_WWAN 0x1008FFB4 /* Toggle WWAN (LTE, UMTS, etc.) radio */
#define XF86XK_RFKill 0x1008FFB5 /* Toggle radios on/off */
#define XF86XK_AudioPreset 0x1008FFB6 /* Select equalizer preset, e.g. theatre-mode */
#define XF86XK_RotationLockToggle 0x1008FFB7 /* Toggle screen rotation lock on/off */
/* Keys for special action keys (hot keys) */
/* Virtual terminals on some operating systems */
#define XF86XK_Switch_VT_1 0x1008FE01
#define XF86XK_Switch_VT_2 0x1008FE02
#define XF86XK_Switch_VT_3 0x1008FE03
#define XF86XK_Switch_VT_4 0x1008FE04
#define XF86XK_Switch_VT_5 0x1008FE05
#define XF86XK_Switch_VT_6 0x1008FE06
#define XF86XK_Switch_VT_7 0x1008FE07
#define XF86XK_Switch_VT_8 0x1008FE08
#define XF86XK_Switch_VT_9 0x1008FE09
#define XF86XK_Switch_VT_10 0x1008FE0A
#define XF86XK_Switch_VT_11 0x1008FE0B
#define XF86XK_Switch_VT_12 0x1008FE0C
#define XF86XK_Ungrab 0x1008FE20 /* force ungrab */
#define XF86XK_ClearGrab 0x1008FE21 /* kill application with grab */
#define XF86XK_Next_VMode 0x1008FE22 /* next video mode available */
#define XF86XK_Prev_VMode 0x1008FE23 /* prev. video mode available */
#define XF86XK_LogWindowTree 0x1008FE24 /* print window tree to log */
#define XF86XK_LogGrabInfo 0x1008FE25 /* print all active grabs to log */

View File

@@ -530,7 +530,7 @@ typedef struct _XDisplay {
#endif
#ifndef _XEVENT_
#define XMaxTransChars 4
#define XMaxTransChars 7
/*
* Definitions of specific events.
@@ -549,9 +549,9 @@ typedef struct {
unsigned int state; /* key or button mask */
unsigned int keycode; /* detail */
Bool same_screen; /* same screen flag */
char trans_chars[XMaxTransChars];
char trans_chars[XMaxTransChars];
/* translated characters */
int nbytes;
unsigned char nbytes;
} XKeyEvent;
typedef XKeyEvent XKeyPressedEvent;
typedef XKeyEvent XKeyReleasedEvent;

View File

@@ -0,0 +1,51 @@
/******************************************************************
Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.
Copyright 1989 by Hewlett-Packard Company.
All Rights Reserved
Permission to use, duplicate, change, and distribute this software and
its documentation for any purpose and without fee is granted, provided
that the above copyright notice appear in such copy and that this
copyright notice appear in all supporting documentation, and that the
names of Apollo Computer Inc., the Hewlett-Packard Company, or the X
Consortium not be used in advertising or publicity pertaining to
distribution of the software without written prior permission.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. Hewlett-Packard shall not be liable for errors
contained herein or direct, indirect, special, incidental or
consequential damages in connection with the furnishing,
performance, or use of this material.
This software is not subject to any license of the American
Telephone and Telegraph Company or of the Regents of the
University of California.
******************************************************************/
#define apXK_LineDel 0x1000FF00
#define apXK_CharDel 0x1000FF01
#define apXK_Copy 0x1000FF02
#define apXK_Cut 0x1000FF03
#define apXK_Paste 0x1000FF04
#define apXK_Move 0x1000FF05
#define apXK_Grow 0x1000FF06
#define apXK_Cmd 0x1000FF07
#define apXK_Shell 0x1000FF08
#define apXK_LeftBar 0x1000FF09
#define apXK_RightBar 0x1000FF0A
#define apXK_LeftBox 0x1000FF0B
#define apXK_RightBox 0x1000FF0C
#define apXK_UpBox 0x1000FF0D
#define apXK_DownBox 0x1000FF0E
#define apXK_Pop 0x1000FF0F
#define apXK_Read 0x1000FF10
#define apXK_Edit 0x1000FF11
#define apXK_Save 0x1000FF12
#define apXK_Exit 0x1000FF13
#define apXK_Repeat 0x1000FF14
#define apXK_KP_parenleft 0x1000FFA8
#define apXK_KP_parenright 0x1000FFA9

View File

@@ -397,6 +397,7 @@ SOFTWARE.
#define XK_Otilde 0x0d5
#define XK_Odiaeresis 0x0d6
#define XK_multiply 0x0d7
#define XK_Oslash 0x0d8
#define XK_Ooblique 0x0d8
#define XK_Ugrave 0x0d9
#define XK_Uacute 0x0da
@@ -840,6 +841,7 @@ SOFTWARE.
#define XK_Greek_EPSILONaccent 0x7a2
#define XK_Greek_ETAaccent 0x7a3
#define XK_Greek_IOTAaccent 0x7a4
#define XK_Greek_IOTAdieresis 0x7a5
#define XK_Greek_IOTAdiaeresis 0x7a5
#define XK_Greek_OMICRONaccent 0x7a7
#define XK_Greek_UPSILONaccent 0x7a8

View File

@@ -51,10 +51,10 @@ extern "C" {
#define TCL_MAJOR_VERSION 8
#define TCL_MINOR_VERSION 6
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
#define TCL_RELEASE_SERIAL 9
#define TCL_RELEASE_SERIAL 10
#define TCL_VERSION "8.6"
#define TCL_PATCH_LEVEL "8.6.9"
#define TCL_PATCH_LEVEL "8.6.10"
/*
*----------------------------------------------------------------------------
@@ -440,7 +440,7 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
#if defined(_WIN32)
# ifdef __BORLANDC__
typedef struct stati64 Tcl_StatBuf;
# elif defined(_WIN64)
# elif defined(_WIN64) || defined(_USE_64BIT_TIME_T)
typedef struct __stat64 Tcl_StatBuf;
# elif (defined(_MSC_VER) && (_MSC_VER < 1400)) || defined(_USE_32BIT_TIME_T)
typedef struct _stati64 Tcl_StatBuf;

View File

@@ -1816,6 +1816,25 @@ EXTERN int Tcl_FSUnloadFile(Tcl_Interp *interp,
EXTERN void Tcl_ZlibStreamSetCompressionDictionary(
Tcl_ZlibStream zhandle,
Tcl_Obj *compressionDictionaryObj);
/* Slot 631 is reserved */
/* Slot 632 is reserved */
/* Slot 633 is reserved */
/* Slot 634 is reserved */
/* Slot 635 is reserved */
/* Slot 636 is reserved */
/* Slot 637 is reserved */
/* Slot 638 is reserved */
/* Slot 639 is reserved */
/* Slot 640 is reserved */
/* Slot 641 is reserved */
/* Slot 642 is reserved */
/* Slot 643 is reserved */
/* Slot 644 is reserved */
/* Slot 645 is reserved */
/* Slot 646 is reserved */
/* Slot 647 is reserved */
/* 648 */
EXTERN void TclUnusedStubEntry(void);
typedef struct {
const struct TclPlatStubs *tclPlatStubs;
@@ -2482,6 +2501,24 @@ typedef struct TclStubs {
void * (*tcl_FindSymbol) (Tcl_Interp *interp, Tcl_LoadHandle handle, const char *symbol); /* 628 */
int (*tcl_FSUnloadFile) (Tcl_Interp *interp, Tcl_LoadHandle handlePtr); /* 629 */
void (*tcl_ZlibStreamSetCompressionDictionary) (Tcl_ZlibStream zhandle, Tcl_Obj *compressionDictionaryObj); /* 630 */
void (*reserved631)(void);
void (*reserved632)(void);
void (*reserved633)(void);
void (*reserved634)(void);
void (*reserved635)(void);
void (*reserved636)(void);
void (*reserved637)(void);
void (*reserved638)(void);
void (*reserved639)(void);
void (*reserved640)(void);
void (*reserved641)(void);
void (*reserved642)(void);
void (*reserved643)(void);
void (*reserved644)(void);
void (*reserved645)(void);
void (*reserved646)(void);
void (*reserved647)(void);
void (*tclUnusedStubEntry) (void); /* 648 */
} TclStubs;
extern const TclStubs *tclStubsPtr;
@@ -3774,11 +3811,32 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_FSUnloadFile) /* 629 */
#define Tcl_ZlibStreamSetCompressionDictionary \
(tclStubsPtr->tcl_ZlibStreamSetCompressionDictionary) /* 630 */
/* Slot 631 is reserved */
/* Slot 632 is reserved */
/* Slot 633 is reserved */
/* Slot 634 is reserved */
/* Slot 635 is reserved */
/* Slot 636 is reserved */
/* Slot 637 is reserved */
/* Slot 638 is reserved */
/* Slot 639 is reserved */
/* Slot 640 is reserved */
/* Slot 641 is reserved */
/* Slot 642 is reserved */
/* Slot 643 is reserved */
/* Slot 644 is reserved */
/* Slot 645 is reserved */
/* Slot 646 is reserved */
/* Slot 647 is reserved */
#define TclUnusedStubEntry \
(tclStubsPtr->tclUnusedStubEntry) /* 648 */
#endif /* defined(USE_TCL_STUBS) */
/* !END!: Do not edit above this line. */
#undef TclUnusedStubEntry
#if defined(USE_TCL_STUBS)
# undef Tcl_CreateInterp
# undef Tcl_FindExecutable

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,9 @@
#define _TCLTOMMATHDECLS
#include "tcl.h"
#ifndef BN_H_
#include "tclTomMath.h"
#endif
/*
* Define the version of the Stubs table that's exported for tommath
@@ -32,28 +35,22 @@
/* MODULE_SCOPE void* TclBNAlloc( size_t ); */
#define TclBNAlloc(s) ((void*)ckalloc((size_t)(s)))
/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */
#define TclBNCalloc(m,s) memset(ckalloc((size_t)(m)*(size_t)(s)),0,(size_t)(m)*(size_t)(s))
/* MODULE_SCOPE void* TclBNRealloc( void*, size_t ); */
#define TclBNRealloc(x,s) ((void*)ckrealloc((char*)(x),(size_t)(s)))
/* MODULE_SCOPE void TclBNFree( void* ); */
#define TclBNFree(x) (ckfree((char*)(x)))
/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */
/* unused - no macro */
#define XMALLOC(x) TclBNAlloc(x)
#define XFREE(x) TclBNFree(x)
#define XREALLOC(x,n) TclBNRealloc(x,n)
#define XCALLOC(n,x) TclBNCalloc(n,x)
#define MP_MALLOC(size) TclBNAlloc(size)
#define MP_CALLOC(nmemb, size) TclBNCalloc(nmemb, size)
#define MP_REALLOC(mem, oldsize, newsize) TclBNRealloc(mem, newsize)
#define MP_FREE(mem, size) TclBNFree(mem)
/* Rename the global symbols in libtommath to avoid linkage conflicts */
#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff
#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff
#define TOOM_MUL_CUTOFF TclBNToomMulCutoff
#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff
#define bn_reverse TclBN_reverse
#define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs
#define fast_s_mp_sqr TclBN_fast_s_mp_sqr
#define mp_add TclBN_mp_add
#define mp_add_d TclBN_mp_add_d
#define mp_and TclBN_mp_and
@@ -73,6 +70,8 @@
#define mp_div_d TclBN_mp_div_d
#define mp_exch TclBN_mp_exch
#define mp_expt_d TclBN_mp_expt_d
#define mp_expt_d_ex TclBN_mp_expt_d_ex
#define mp_expt_u32 TclBN_mp_expt_d
#define mp_grow TclBN_mp_grow
#define mp_init TclBN_mp_init
#define mp_init_copy TclBN_mp_init_copy
@@ -80,8 +79,6 @@
#define mp_init_set TclBN_mp_init_set
#define mp_init_set_int TclBN_mp_init_set_int
#define mp_init_size TclBN_mp_init_size
#define mp_karatsuba_mul TclBN_mp_karatsuba_mul
#define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr
#define mp_lshd TclBN_mp_lshd
#define mp_mod TclBN_mp_mod
#define mp_mod_2d TclBN_mp_mod_2d
@@ -94,26 +91,43 @@
#define mp_radix_size TclBN_mp_radix_size
#define mp_read_radix TclBN_mp_read_radix
#define mp_rshd TclBN_mp_rshd
#define mp_s_rmap TclBNMpSRmap
#define mp_set TclBN_mp_set
#define mp_set_int TclBN_mp_set_int
#define mp_set_int(a,b) (TclBN_mp_set_int(a,(unsigned int)(b)),MP_OKAY)
#define mp_set_long(a,b) (TclBN_mp_set_int(a,b),MP_OKAY)
#define mp_set_ul(a,b) (void)TclBN_mp_set_int(a,b)
#define mp_set_ull TclBN_mp_set_ull
#define mp_set_u64 TclBN_mp_set_ull
#define mp_shrink TclBN_mp_shrink
#define mp_sqr TclBN_mp_sqr
#define mp_sqrt TclBN_mp_sqrt
#define mp_sub TclBN_mp_sub
#define mp_sub_d TclBN_mp_sub_d
#define mp_signed_rsh TclBN_mp_signed_rsh
#define mp_tc_and TclBN_mp_and
#define mp_tc_div_2d TclBN_mp_signed_rsh
#define mp_tc_or TclBN_mp_or
#define mp_tc_xor TclBN_mp_xor
#define mp_to_unsigned_bin TclBN_mp_to_unsigned_bin
#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n
#define mp_toom_mul TclBN_mp_toom_mul
#define mp_toom_sqr TclBN_mp_toom_sqr
#define mp_toradix_n TclBN_mp_toradix_n
#define mp_unsigned_bin_size TclBN_mp_unsigned_bin_size
#define mp_to_radix TclBN_mp_to_radix
#define mp_to_ubin TclBN_mp_to_ubin
#define mp_ubin_size TclBN_mp_unsigned_bin_size
#define mp_unsigned_bin_size(a) ((int)TclBN_mp_unsigned_bin_size(a))
#define mp_xor TclBN_mp_xor
#define mp_zero TclBN_mp_zero
#define s_mp_add TclBN_s_mp_add
#define s_mp_balance_mul TclBN_mp_balance_mul
#define s_mp_karatsuba_mul TclBN_mp_karatsuba_mul
#define s_mp_karatsuba_sqr TclBN_mp_karatsuba_sqr
#define s_mp_mul_digs TclBN_s_mp_mul_digs
#define s_mp_mul_digs_fast TclBN_fast_s_mp_mul_digs
#define s_mp_reverse TclBN_s_mp_reverse
#define s_mp_sqr TclBN_s_mp_sqr
#define s_mp_sqr_fast TclBN_fast_s_mp_sqr
#define s_mp_sub TclBN_s_mp_sub
#define s_mp_toom_mul TclBN_mp_toom_mul
#define s_mp_toom_sqr TclBN_mp_toom_sqr
#undef TCL_STORAGE_CLASS
#ifdef BUILD_tcl
@@ -147,11 +161,14 @@ EXTERN int TclBN_epoch(void);
/* 1 */
EXTERN int TclBN_revision(void);
/* 2 */
EXTERN int TclBN_mp_add(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_mp_add(const mp_int *a, const mp_int *b,
mp_int *c);
/* 3 */
EXTERN int TclBN_mp_add_d(mp_int *a, mp_digit b, mp_int *c);
EXTERN mp_err TclBN_mp_add_d(const mp_int *a, mp_digit b,
mp_int *c);
/* 4 */
EXTERN int TclBN_mp_and(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_mp_and(const mp_int *a, const mp_int *b,
mp_int *c);
/* 5 */
EXTERN void TclBN_mp_clamp(mp_int *a);
/* 6 */
@@ -159,134 +176,177 @@ EXTERN void TclBN_mp_clear(mp_int *a);
/* 7 */
EXTERN void TclBN_mp_clear_multi(mp_int *a, ...);
/* 8 */
EXTERN int TclBN_mp_cmp(const mp_int *a, const mp_int *b);
EXTERN mp_ord TclBN_mp_cmp(const mp_int *a, const mp_int *b);
/* 9 */
EXTERN int TclBN_mp_cmp_d(const mp_int *a, mp_digit b);
EXTERN mp_ord TclBN_mp_cmp_d(const mp_int *a, mp_digit b);
/* 10 */
EXTERN int TclBN_mp_cmp_mag(const mp_int *a, const mp_int *b);
EXTERN mp_ord TclBN_mp_cmp_mag(const mp_int *a, const mp_int *b);
/* 11 */
EXTERN int TclBN_mp_copy(const mp_int *a, mp_int *b);
EXTERN mp_err TclBN_mp_copy(const mp_int *a, mp_int *b);
/* 12 */
EXTERN int TclBN_mp_count_bits(const mp_int *a);
/* 13 */
EXTERN int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q,
mp_int *r);
EXTERN mp_err TclBN_mp_div(const mp_int *a, const mp_int *b,
mp_int *q, mp_int *r);
/* 14 */
EXTERN int TclBN_mp_div_d(mp_int *a, mp_digit b, mp_int *q,
mp_digit *r);
EXTERN mp_err TclBN_mp_div_d(const mp_int *a, mp_digit b,
mp_int *q, mp_digit *r);
/* 15 */
EXTERN int TclBN_mp_div_2(mp_int *a, mp_int *q);
EXTERN mp_err TclBN_mp_div_2(const mp_int *a, mp_int *q);
/* 16 */
EXTERN int TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q,
EXTERN mp_err TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q,
mp_int *r);
/* 17 */
EXTERN int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit *r);
EXTERN mp_err TclBN_mp_div_3(const mp_int *a, mp_int *q,
mp_digit *r);
/* 18 */
EXTERN void TclBN_mp_exch(mp_int *a, mp_int *b);
/* 19 */
EXTERN int TclBN_mp_expt_d(mp_int *a, mp_digit b, mp_int *c);
EXTERN mp_err TclBN_mp_expt_d(const mp_int *a, unsigned int b,
mp_int *c);
/* 20 */
EXTERN int TclBN_mp_grow(mp_int *a, int size);
EXTERN mp_err TclBN_mp_grow(mp_int *a, int size);
/* 21 */
EXTERN int TclBN_mp_init(mp_int *a);
EXTERN mp_err TclBN_mp_init(mp_int *a);
/* 22 */
EXTERN int TclBN_mp_init_copy(mp_int *a, mp_int *b);
EXTERN mp_err TclBN_mp_init_copy(mp_int *a, const mp_int *b);
/* 23 */
EXTERN int TclBN_mp_init_multi(mp_int *a, ...);
EXTERN mp_err TclBN_mp_init_multi(mp_int *a, ...);
/* 24 */
EXTERN int TclBN_mp_init_set(mp_int *a, mp_digit b);
EXTERN mp_err TclBN_mp_init_set(mp_int *a, mp_digit b);
/* 25 */
EXTERN int TclBN_mp_init_size(mp_int *a, int size);
EXTERN mp_err TclBN_mp_init_size(mp_int *a, int size);
/* 26 */
EXTERN int TclBN_mp_lshd(mp_int *a, int shift);
EXTERN mp_err TclBN_mp_lshd(mp_int *a, int shift);
/* 27 */
EXTERN int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r);
EXTERN mp_err TclBN_mp_mod(const mp_int *a, const mp_int *b,
mp_int *r);
/* 28 */
EXTERN int TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r);
EXTERN mp_err TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r);
/* 29 */
EXTERN int TclBN_mp_mul(mp_int *a, mp_int *b, mp_int *p);
EXTERN mp_err TclBN_mp_mul(const mp_int *a, const mp_int *b,
mp_int *p);
/* 30 */
EXTERN int TclBN_mp_mul_d(mp_int *a, mp_digit b, mp_int *p);
EXTERN mp_err TclBN_mp_mul_d(const mp_int *a, mp_digit b,
mp_int *p);
/* 31 */
EXTERN int TclBN_mp_mul_2(mp_int *a, mp_int *p);
EXTERN mp_err TclBN_mp_mul_2(const mp_int *a, mp_int *p);
/* 32 */
EXTERN int TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p);
EXTERN mp_err TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p);
/* 33 */
EXTERN int TclBN_mp_neg(const mp_int *a, mp_int *b);
EXTERN mp_err TclBN_mp_neg(const mp_int *a, mp_int *b);
/* 34 */
EXTERN int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_mp_or(const mp_int *a, const mp_int *b,
mp_int *c);
/* 35 */
EXTERN int TclBN_mp_radix_size(mp_int *a, int radix, int *size);
EXTERN mp_err TclBN_mp_radix_size(const mp_int *a, int radix,
int *size);
/* 36 */
EXTERN int TclBN_mp_read_radix(mp_int *a, const char *str,
EXTERN mp_err TclBN_mp_read_radix(mp_int *a, const char *str,
int radix);
/* 37 */
EXTERN void TclBN_mp_rshd(mp_int *a, int shift);
/* 38 */
EXTERN int TclBN_mp_shrink(mp_int *a);
EXTERN mp_err TclBN_mp_shrink(mp_int *a);
/* 39 */
EXTERN void TclBN_mp_set(mp_int *a, mp_digit b);
/* 40 */
EXTERN int TclBN_mp_sqr(mp_int *a, mp_int *b);
EXTERN mp_err TclBN_mp_sqr(const mp_int *a, mp_int *b);
/* 41 */
EXTERN int TclBN_mp_sqrt(mp_int *a, mp_int *b);
EXTERN mp_err TclBN_mp_sqrt(const mp_int *a, mp_int *b);
/* 42 */
EXTERN int TclBN_mp_sub(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_mp_sub(const mp_int *a, const mp_int *b,
mp_int *c);
/* 43 */
EXTERN int TclBN_mp_sub_d(mp_int *a, mp_digit b, mp_int *c);
EXTERN mp_err TclBN_mp_sub_d(const mp_int *a, mp_digit b,
mp_int *c);
/* 44 */
EXTERN int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char *b);
EXTERN mp_err TclBN_mp_to_unsigned_bin(const mp_int *a,
unsigned char *b);
/* 45 */
EXTERN int TclBN_mp_to_unsigned_bin_n(mp_int *a,
EXTERN mp_err TclBN_mp_to_unsigned_bin_n(const mp_int *a,
unsigned char *b, unsigned long *outlen);
/* 46 */
EXTERN int TclBN_mp_toradix_n(mp_int *a, char *str, int radix,
int maxlen);
EXTERN mp_err TclBN_mp_toradix_n(const mp_int *a, char *str,
int radix, int maxlen);
/* 47 */
EXTERN int TclBN_mp_unsigned_bin_size(mp_int *a);
EXTERN size_t TclBN_mp_unsigned_bin_size(const mp_int *a);
/* 48 */
EXTERN int TclBN_mp_xor(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_mp_xor(const mp_int *a, const mp_int *b,
mp_int *c);
/* 49 */
EXTERN void TclBN_mp_zero(mp_int *a);
/* 50 */
EXTERN void TclBN_reverse(unsigned char *s, int len);
/* 51 */
EXTERN int TclBN_fast_s_mp_mul_digs(mp_int *a, mp_int *b,
mp_int *c, int digs);
EXTERN mp_err TclBN_fast_s_mp_mul_digs(const mp_int *a,
const mp_int *b, mp_int *c, int digs);
/* 52 */
EXTERN int TclBN_fast_s_mp_sqr(mp_int *a, mp_int *b);
EXTERN mp_err TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b);
/* 53 */
EXTERN int TclBN_mp_karatsuba_mul(mp_int *a, mp_int *b,
mp_int *c);
EXTERN mp_err TclBN_mp_karatsuba_mul(const mp_int *a,
const mp_int *b, mp_int *c);
/* 54 */
EXTERN int TclBN_mp_karatsuba_sqr(mp_int *a, mp_int *b);
EXTERN mp_err TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b);
/* 55 */
EXTERN int TclBN_mp_toom_mul(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_mp_toom_mul(const mp_int *a, const mp_int *b,
mp_int *c);
/* 56 */
EXTERN int TclBN_mp_toom_sqr(mp_int *a, mp_int *b);
EXTERN mp_err TclBN_mp_toom_sqr(const mp_int *a, mp_int *b);
/* 57 */
EXTERN int TclBN_s_mp_add(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_s_mp_add(const mp_int *a, const mp_int *b,
mp_int *c);
/* 58 */
EXTERN int TclBN_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c,
int digs);
EXTERN mp_err TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b,
mp_int *c, int digs);
/* 59 */
EXTERN int TclBN_s_mp_sqr(mp_int *a, mp_int *b);
EXTERN mp_err TclBN_s_mp_sqr(const mp_int *a, mp_int *b);
/* 60 */
EXTERN int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c);
EXTERN mp_err TclBN_s_mp_sub(const mp_int *a, const mp_int *b,
mp_int *c);
/* 61 */
EXTERN int TclBN_mp_init_set_int(mp_int *a, unsigned long i);
EXTERN mp_err TclBN_mp_init_set_int(mp_int *a, unsigned long i);
/* 62 */
EXTERN int TclBN_mp_set_int(mp_int *a, unsigned long i);
EXTERN mp_err TclBN_mp_set_int(mp_int *a, unsigned long i);
/* 63 */
EXTERN int TclBN_mp_cnt_lsb(const mp_int *a);
/* 64 */
EXTERN void TclBNInitBignumFromLong(mp_int *bignum, long initVal);
EXTERN int TclBNInitBignumFromLong(mp_int *bignum, long initVal);
/* 65 */
EXTERN void TclBNInitBignumFromWideInt(mp_int *bignum,
EXTERN int TclBNInitBignumFromWideInt(mp_int *bignum,
Tcl_WideInt initVal);
/* 66 */
EXTERN void TclBNInitBignumFromWideUInt(mp_int *bignum,
EXTERN int TclBNInitBignumFromWideUInt(mp_int *bignum,
Tcl_WideUInt initVal);
/* 67 */
EXTERN mp_err TclBN_mp_expt_d_ex(const mp_int *a, mp_digit b,
mp_int *c, int fast);
/* 68 */
EXTERN void TclBN_mp_set_ull(mp_int *a, Tcl_WideUInt i);
/* Slot 69 is reserved */
/* Slot 70 is reserved */
/* Slot 71 is reserved */
/* Slot 72 is reserved */
/* 73 */
EXTERN mp_err TclBN_mp_tc_and(const mp_int *a, const mp_int *b,
mp_int *c);
/* 74 */
EXTERN mp_err TclBN_mp_tc_or(const mp_int *a, const mp_int *b,
mp_int *c);
/* 75 */
EXTERN mp_err TclBN_mp_tc_xor(const mp_int *a, const mp_int *b,
mp_int *c);
/* 76 */
EXTERN mp_err TclBN_mp_signed_rsh(const mp_int *a, int b,
mp_int *c);
/* Slot 77 is reserved */
/* 78 */
EXTERN int TclBN_mp_to_ubin(const mp_int *a, unsigned char *buf,
size_t maxlen, size_t *written);
/* Slot 79 is reserved */
/* 80 */
EXTERN int TclBN_mp_to_radix(const mp_int *a, char *str,
size_t maxlen, size_t *written, int radix);
typedef struct TclTomMathStubs {
int magic;
@@ -294,71 +354,85 @@ typedef struct TclTomMathStubs {
int (*tclBN_epoch) (void); /* 0 */
int (*tclBN_revision) (void); /* 1 */
int (*tclBN_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 2 */
int (*tclBN_mp_add_d) (mp_int *a, mp_digit b, mp_int *c); /* 3 */
int (*tclBN_mp_and) (mp_int *a, mp_int *b, mp_int *c); /* 4 */
mp_err (*tclBN_mp_add) (const mp_int *a, const mp_int *b, mp_int *c); /* 2 */
mp_err (*tclBN_mp_add_d) (const mp_int *a, mp_digit b, mp_int *c); /* 3 */
mp_err (*tclBN_mp_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 4 */
void (*tclBN_mp_clamp) (mp_int *a); /* 5 */
void (*tclBN_mp_clear) (mp_int *a); /* 6 */
void (*tclBN_mp_clear_multi) (mp_int *a, ...); /* 7 */
int (*tclBN_mp_cmp) (const mp_int *a, const mp_int *b); /* 8 */
int (*tclBN_mp_cmp_d) (const mp_int *a, mp_digit b); /* 9 */
int (*tclBN_mp_cmp_mag) (const mp_int *a, const mp_int *b); /* 10 */
int (*tclBN_mp_copy) (const mp_int *a, mp_int *b); /* 11 */
mp_ord (*tclBN_mp_cmp) (const mp_int *a, const mp_int *b); /* 8 */
mp_ord (*tclBN_mp_cmp_d) (const mp_int *a, mp_digit b); /* 9 */
mp_ord (*tclBN_mp_cmp_mag) (const mp_int *a, const mp_int *b); /* 10 */
mp_err (*tclBN_mp_copy) (const mp_int *a, mp_int *b); /* 11 */
int (*tclBN_mp_count_bits) (const mp_int *a); /* 12 */
int (*tclBN_mp_div) (mp_int *a, mp_int *b, mp_int *q, mp_int *r); /* 13 */
int (*tclBN_mp_div_d) (mp_int *a, mp_digit b, mp_int *q, mp_digit *r); /* 14 */
int (*tclBN_mp_div_2) (mp_int *a, mp_int *q); /* 15 */
int (*tclBN_mp_div_2d) (const mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */
int (*tclBN_mp_div_3) (mp_int *a, mp_int *q, mp_digit *r); /* 17 */
mp_err (*tclBN_mp_div) (const mp_int *a, const mp_int *b, mp_int *q, mp_int *r); /* 13 */
mp_err (*tclBN_mp_div_d) (const mp_int *a, mp_digit b, mp_int *q, mp_digit *r); /* 14 */
mp_err (*tclBN_mp_div_2) (const mp_int *a, mp_int *q); /* 15 */
mp_err (*tclBN_mp_div_2d) (const mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */
mp_err (*tclBN_mp_div_3) (const mp_int *a, mp_int *q, mp_digit *r); /* 17 */
void (*tclBN_mp_exch) (mp_int *a, mp_int *b); /* 18 */
int (*tclBN_mp_expt_d) (mp_int *a, mp_digit b, mp_int *c); /* 19 */
int (*tclBN_mp_grow) (mp_int *a, int size); /* 20 */
int (*tclBN_mp_init) (mp_int *a); /* 21 */
int (*tclBN_mp_init_copy) (mp_int *a, mp_int *b); /* 22 */
int (*tclBN_mp_init_multi) (mp_int *a, ...); /* 23 */
int (*tclBN_mp_init_set) (mp_int *a, mp_digit b); /* 24 */
int (*tclBN_mp_init_size) (mp_int *a, int size); /* 25 */
int (*tclBN_mp_lshd) (mp_int *a, int shift); /* 26 */
int (*tclBN_mp_mod) (mp_int *a, mp_int *b, mp_int *r); /* 27 */
int (*tclBN_mp_mod_2d) (const mp_int *a, int b, mp_int *r); /* 28 */
int (*tclBN_mp_mul) (mp_int *a, mp_int *b, mp_int *p); /* 29 */
int (*tclBN_mp_mul_d) (mp_int *a, mp_digit b, mp_int *p); /* 30 */
int (*tclBN_mp_mul_2) (mp_int *a, mp_int *p); /* 31 */
int (*tclBN_mp_mul_2d) (const mp_int *a, int d, mp_int *p); /* 32 */
int (*tclBN_mp_neg) (const mp_int *a, mp_int *b); /* 33 */
int (*tclBN_mp_or) (mp_int *a, mp_int *b, mp_int *c); /* 34 */
int (*tclBN_mp_radix_size) (mp_int *a, int radix, int *size); /* 35 */
int (*tclBN_mp_read_radix) (mp_int *a, const char *str, int radix); /* 36 */
mp_err (*tclBN_mp_expt_d) (const mp_int *a, unsigned int b, mp_int *c); /* 19 */
mp_err (*tclBN_mp_grow) (mp_int *a, int size); /* 20 */
mp_err (*tclBN_mp_init) (mp_int *a); /* 21 */
mp_err (*tclBN_mp_init_copy) (mp_int *a, const mp_int *b); /* 22 */
mp_err (*tclBN_mp_init_multi) (mp_int *a, ...); /* 23 */
mp_err (*tclBN_mp_init_set) (mp_int *a, mp_digit b); /* 24 */
mp_err (*tclBN_mp_init_size) (mp_int *a, int size); /* 25 */
mp_err (*tclBN_mp_lshd) (mp_int *a, int shift); /* 26 */
mp_err (*tclBN_mp_mod) (const mp_int *a, const mp_int *b, mp_int *r); /* 27 */
mp_err (*tclBN_mp_mod_2d) (const mp_int *a, int b, mp_int *r); /* 28 */
mp_err (*tclBN_mp_mul) (const mp_int *a, const mp_int *b, mp_int *p); /* 29 */
mp_err (*tclBN_mp_mul_d) (const mp_int *a, mp_digit b, mp_int *p); /* 30 */
mp_err (*tclBN_mp_mul_2) (const mp_int *a, mp_int *p); /* 31 */
mp_err (*tclBN_mp_mul_2d) (const mp_int *a, int d, mp_int *p); /* 32 */
mp_err (*tclBN_mp_neg) (const mp_int *a, mp_int *b); /* 33 */
mp_err (*tclBN_mp_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 34 */
mp_err (*tclBN_mp_radix_size) (const mp_int *a, int radix, int *size); /* 35 */
mp_err (*tclBN_mp_read_radix) (mp_int *a, const char *str, int radix); /* 36 */
void (*tclBN_mp_rshd) (mp_int *a, int shift); /* 37 */
int (*tclBN_mp_shrink) (mp_int *a); /* 38 */
mp_err (*tclBN_mp_shrink) (mp_int *a); /* 38 */
void (*tclBN_mp_set) (mp_int *a, mp_digit b); /* 39 */
int (*tclBN_mp_sqr) (mp_int *a, mp_int *b); /* 40 */
int (*tclBN_mp_sqrt) (mp_int *a, mp_int *b); /* 41 */
int (*tclBN_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 42 */
int (*tclBN_mp_sub_d) (mp_int *a, mp_digit b, mp_int *c); /* 43 */
int (*tclBN_mp_to_unsigned_bin) (mp_int *a, unsigned char *b); /* 44 */
int (*tclBN_mp_to_unsigned_bin_n) (mp_int *a, unsigned char *b, unsigned long *outlen); /* 45 */
int (*tclBN_mp_toradix_n) (mp_int *a, char *str, int radix, int maxlen); /* 46 */
int (*tclBN_mp_unsigned_bin_size) (mp_int *a); /* 47 */
int (*tclBN_mp_xor) (mp_int *a, mp_int *b, mp_int *c); /* 48 */
mp_err (*tclBN_mp_sqr) (const mp_int *a, mp_int *b); /* 40 */
mp_err (*tclBN_mp_sqrt) (const mp_int *a, mp_int *b); /* 41 */
mp_err (*tclBN_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 42 */
mp_err (*tclBN_mp_sub_d) (const mp_int *a, mp_digit b, mp_int *c); /* 43 */
mp_err (*tclBN_mp_to_unsigned_bin) (const mp_int *a, unsigned char *b); /* 44 */
mp_err (*tclBN_mp_to_unsigned_bin_n) (const mp_int *a, unsigned char *b, unsigned long *outlen); /* 45 */
mp_err (*tclBN_mp_toradix_n) (const mp_int *a, char *str, int radix, int maxlen); /* 46 */
size_t (*tclBN_mp_unsigned_bin_size) (const mp_int *a); /* 47 */
mp_err (*tclBN_mp_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 48 */
void (*tclBN_mp_zero) (mp_int *a); /* 49 */
void (*tclBN_reverse) (unsigned char *s, int len); /* 50 */
int (*tclBN_fast_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 51 */
int (*tclBN_fast_s_mp_sqr) (mp_int *a, mp_int *b); /* 52 */
int (*tclBN_mp_karatsuba_mul) (mp_int *a, mp_int *b, mp_int *c); /* 53 */
int (*tclBN_mp_karatsuba_sqr) (mp_int *a, mp_int *b); /* 54 */
int (*tclBN_mp_toom_mul) (mp_int *a, mp_int *b, mp_int *c); /* 55 */
int (*tclBN_mp_toom_sqr) (mp_int *a, mp_int *b); /* 56 */
int (*tclBN_s_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 57 */
int (*tclBN_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 58 */
int (*tclBN_s_mp_sqr) (mp_int *a, mp_int *b); /* 59 */
int (*tclBN_s_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 60 */
int (*tclBN_mp_init_set_int) (mp_int *a, unsigned long i); /* 61 */
int (*tclBN_mp_set_int) (mp_int *a, unsigned long i); /* 62 */
mp_err (*tclBN_fast_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 51 */
mp_err (*tclBN_fast_s_mp_sqr) (const mp_int *a, mp_int *b); /* 52 */
mp_err (*tclBN_mp_karatsuba_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 53 */
mp_err (*tclBN_mp_karatsuba_sqr) (const mp_int *a, mp_int *b); /* 54 */
mp_err (*tclBN_mp_toom_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 55 */
mp_err (*tclBN_mp_toom_sqr) (const mp_int *a, mp_int *b); /* 56 */
mp_err (*tclBN_s_mp_add) (const mp_int *a, const mp_int *b, mp_int *c); /* 57 */
mp_err (*tclBN_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 58 */
mp_err (*tclBN_s_mp_sqr) (const mp_int *a, mp_int *b); /* 59 */
mp_err (*tclBN_s_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 60 */
mp_err (*tclBN_mp_init_set_int) (mp_int *a, unsigned long i); /* 61 */
mp_err (*tclBN_mp_set_int) (mp_int *a, unsigned long i); /* 62 */
int (*tclBN_mp_cnt_lsb) (const mp_int *a); /* 63 */
void (*tclBNInitBignumFromLong) (mp_int *bignum, long initVal); /* 64 */
void (*tclBNInitBignumFromWideInt) (mp_int *bignum, Tcl_WideInt initVal); /* 65 */
void (*tclBNInitBignumFromWideUInt) (mp_int *bignum, Tcl_WideUInt initVal); /* 66 */
int (*tclBNInitBignumFromLong) (mp_int *bignum, long initVal); /* 64 */
int (*tclBNInitBignumFromWideInt) (mp_int *bignum, Tcl_WideInt initVal); /* 65 */
int (*tclBNInitBignumFromWideUInt) (mp_int *bignum, Tcl_WideUInt initVal); /* 66 */
mp_err (*tclBN_mp_expt_d_ex) (const mp_int *a, mp_digit b, mp_int *c, int fast); /* 67 */
void (*tclBN_mp_set_ull) (mp_int *a, Tcl_WideUInt i); /* 68 */
void (*reserved69)(void);
void (*reserved70)(void);
void (*reserved71)(void);
void (*reserved72)(void);
mp_err (*tclBN_mp_tc_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 73 */
mp_err (*tclBN_mp_tc_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 74 */
mp_err (*tclBN_mp_tc_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 75 */
mp_err (*tclBN_mp_signed_rsh) (const mp_int *a, int b, mp_int *c); /* 76 */
void (*reserved77)(void);
int (*tclBN_mp_to_ubin) (const mp_int *a, unsigned char *buf, size_t maxlen, size_t *written); /* 78 */
void (*reserved79)(void);
int (*tclBN_mp_to_radix) (const mp_int *a, char *str, size_t maxlen, size_t *written, int radix); /* 80 */
} TclTomMathStubs;
extern const TclTomMathStubs *tclTomMathStubsPtr;
@@ -507,6 +581,28 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
(tclTomMathStubsPtr->tclBNInitBignumFromWideInt) /* 65 */
#define TclBNInitBignumFromWideUInt \
(tclTomMathStubsPtr->tclBNInitBignumFromWideUInt) /* 66 */
#define TclBN_mp_expt_d_ex \
(tclTomMathStubsPtr->tclBN_mp_expt_d_ex) /* 67 */
#define TclBN_mp_set_ull \
(tclTomMathStubsPtr->tclBN_mp_set_ull) /* 68 */
/* Slot 69 is reserved */
/* Slot 70 is reserved */
/* Slot 71 is reserved */
/* Slot 72 is reserved */
#define TclBN_mp_tc_and \
(tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */
#define TclBN_mp_tc_or \
(tclTomMathStubsPtr->tclBN_mp_tc_or) /* 74 */
#define TclBN_mp_tc_xor \
(tclTomMathStubsPtr->tclBN_mp_tc_xor) /* 75 */
#define TclBN_mp_signed_rsh \
(tclTomMathStubsPtr->tclBN_mp_signed_rsh) /* 76 */
/* Slot 77 is reserved */
#define TclBN_mp_to_ubin \
(tclTomMathStubsPtr->tclBN_mp_to_ubin) /* 78 */
/* Slot 79 is reserved */
#define TclBN_mp_to_radix \
(tclTomMathStubsPtr->tclBN_mp_to_radix) /* 80 */
#endif /* defined(USE_TCL_STUBS) */
@@ -515,4 +611,50 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
#ifdef USE_TCL_STUBS
#undef TclBNInitBignumFromLong
#define TclBNInitBignumFromLong(a,b) \
do { \
(a)->dp = NULL; \
(void)tclTomMathStubsPtr->tclBNInitBignumFromLong((a),(b)); \
if ((a)->dp == NULL) { \
Tcl_Panic("initialization failure in TclBNInitBignumFromLong"); \
} \
} while (0)
#undef TclBNInitBignumFromWideInt
#define TclBNInitBignumFromWideInt(a,b) \
do { \
(a)->dp = NULL; \
(void)tclTomMathStubsPtr->tclBNInitBignumFromWideInt((a),(b)); \
if ((a)->dp == NULL) { \
Tcl_Panic("initialization failure in TclBNInitBignumFromWideInt"); \
} \
} while (0)
#undef TclBNInitBignumFromWideUInt
#define TclBNInitBignumFromWideUInt(a,b) \
do { \
(a)->dp = NULL; \
(void)tclTomMathStubsPtr->tclBNInitBignumFromWideUInt((a),(b)); \
if ((a)->dp == NULL) { \
Tcl_Panic("initialization failure in TclBNInitBignumFromWideUInt"); \
} \
} while (0)
#define mp_init_i32(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromLong((a),(int32_t)(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_l(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromLong((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_ll(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromWideInt((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_i64(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromWideInt((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_u32(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromWideUInt((a),(uint32_t)(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_ul(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromWideUInt((a),(unsigned long)(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_ull(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromWideUInt((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_u64(a,b) (((a)->dp=NULL,tclTomMathStubsPtr->tclBNInitBignumFromWideUInt((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#else
#define mp_init_i32(a,b) (((a)->dp=NULL,(TclBNInitBignumFromLong)((a),(int32_t)(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_l(a,b) (((a)->dp=NULL,(TclBNInitBignumFromLong)((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_ll(a,b) (((a)->dp=NULL,(TclBNInitBignumFromWideInt)((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_i64(a,b) (((a)->dp=NULL,(TclBNInitBignumFromWideInt)((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_u32(a,b) (((a)->dp=NULL,(TclBNInitBignumFromWideUInt)((a),(uint32_t)(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_ul(a,b) (((a)->dp=NULL,(TclBNInitBignumFromWideUInt)((a),(unsigned long)(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_ull(a,b) (((a)->dp=NULL,(TclBNInitBignumFromWideUInt)((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#define mp_init_u64(a,b) (((a)->dp=NULL,(TclBNInitBignumFromWideUInt)((a),(b)),(a)->dp)?MP_OKAY:MP_ERR)
#endif /* USE_TCL_STUBS */
#endif /* _TCLINTDECLS */

View File

@@ -75,10 +75,10 @@ extern "C" {
#define TK_MAJOR_VERSION 8
#define TK_MINOR_VERSION 6
#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
#define TK_RELEASE_SERIAL 9
#define TK_RELEASE_SERIAL 10
#define TK_VERSION "8.6"
#define TK_PATCH_LEVEL "8.6.9"
#define TK_PATCH_LEVEL "8.6.10"
/*
* A special definition used to allow this header file to be included from
@@ -92,13 +92,14 @@ extern "C" {
#ifndef RC_INVOKED
#ifndef _XLIB_H
#if !defined(_XLIB_H) && !defined(_X11_XLIB_H_)
# include <X11/Xlib.h>
# ifdef MAC_OSX_TK
# include <X11/X.h>
# endif
#endif
#ifdef __STDC__
#if defined(STDC_HEADERS) || defined(__STDC__) || defined(__C99__FUNC__) \
|| defined(__cplusplus) || defined(_MSC_VER) || defined(__ICC)
# include <stddef.h>
#endif
@@ -266,10 +267,10 @@ typedef struct Tk_ObjCustomOption {
* Computes number of bytes from beginning of structure to a given field.
*/
#ifdef offsetof
#define Tk_Offset(type, field) ((int) offsetof(type, field))
#else
#define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
/* Workaround for platforms missing offsetof(), e.g. VC++ 6.0 */
#ifndef offsetof
# define offsetof(type, field) ((size_t) ((char *) &((type *) 0)->field))
#endif
/*
@@ -676,7 +677,7 @@ typedef struct {
* request. */
Display *display; /* Display the event was read from. */
Window event; /* Window on which event was requested. */
Window root; /* Root window that the event occured on. */
Window root; /* Root window that the event occurred on. */
Window subwindow; /* Child window. */
Time time; /* Milliseconds. */
int x, y; /* Pointer x, y coordinates in event
@@ -813,10 +814,11 @@ typedef struct Tk_FakeWin {
int internalBorderBottom;
int minReqWidth;
int minReqHeight;
char *dummy20; /* geometryMaster */
#ifdef TK_USE_INPUT_METHODS
int dummy21;
int dummy20;
#endif /* TK_USE_INPUT_METHODS */
char *dummy21; /* geomMgrName */
Tk_Window dummy22; /* maintainerPtr */
} Tk_FakeWin;
/*

View File

@@ -450,21 +450,21 @@ EXTERN Status XAllocColor(Display *d, Colormap c, XColor *xp);
/* 13 */
EXTERN int XBell(Display *d, int i);
/* 14 */
EXTERN void XChangeProperty(Display *d, Window w, Atom a1,
EXTERN int XChangeProperty(Display *d, Window w, Atom a1,
Atom a2, int i1, int i2,
_Xconst unsigned char *c, int i3);
/* 15 */
EXTERN void XChangeWindowAttributes(Display *d, Window w,
EXTERN int XChangeWindowAttributes(Display *d, Window w,
unsigned long ul, XSetWindowAttributes *x);
/* 16 */
EXTERN void XConfigureWindow(Display *d, Window w,
EXTERN int XConfigureWindow(Display *d, Window w,
unsigned int i, XWindowChanges *x);
/* 17 */
EXTERN void XCopyArea(Display *d, Drawable dr1, Drawable dr2,
EXTERN int XCopyArea(Display *d, Drawable dr1, Drawable dr2,
GC g, int i1, int i2, unsigned int ui1,
unsigned int ui2, int i3, int i4);
/* 18 */
EXTERN void XCopyPlane(Display *d, Drawable dr1, Drawable dr2,
EXTERN int XCopyPlane(Display *d, Drawable dr1, Drawable dr2,
GC g, int i1, int i2, unsigned int ui1,
unsigned int ui2, int i3, int i4,
unsigned long ul);
@@ -475,23 +475,23 @@ EXTERN Pixmap XCreateBitmapFromData(Display *display, Drawable d,
/* 20 */
EXTERN int XDefineCursor(Display *d, Window w, Cursor c);
/* 21 */
EXTERN void XDestroyWindow(Display *d, Window w);
EXTERN int XDestroyWindow(Display *d, Window w);
/* 22 */
EXTERN void XDrawArc(Display *d, Drawable dr, GC g, int i1,
EXTERN int XDrawArc(Display *d, Drawable dr, GC g, int i1,
int i2, unsigned int ui1, unsigned int ui2,
int i3, int i4);
/* 23 */
EXTERN int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x,
int i1, int i2);
/* 24 */
EXTERN void XDrawRectangle(Display *d, Drawable dr, GC g, int i1,
EXTERN int XDrawRectangle(Display *d, Drawable dr, GC g, int i1,
int i2, unsigned int ui1, unsigned int ui2);
/* 25 */
EXTERN void XFillArc(Display *d, Drawable dr, GC g, int i1,
EXTERN int XFillArc(Display *d, Drawable dr, GC g, int i1,
int i2, unsigned int ui1, unsigned int ui2,
int i3, int i4);
/* 26 */
EXTERN void XFillPolygon(Display *d, Drawable dr, GC g,
EXTERN int XFillPolygon(Display *d, Drawable dr, GC g,
XPoint *x, int i1, int i2, int i3);
/* 27 */
EXTERN int XFillRectangles(Display *d, Drawable dr, GC g,
@@ -523,58 +523,58 @@ EXTERN int XGrabPointer(Display *d, Window w1, Bool b,
/* 35 */
EXTERN KeyCode XKeysymToKeycode(Display *d, KeySym k);
/* 36 */
EXTERN void XMapWindow(Display *d, Window w);
EXTERN int XMapWindow(Display *d, Window w);
/* 37 */
EXTERN void XMoveResizeWindow(Display *d, Window w, int i1,
EXTERN int XMoveResizeWindow(Display *d, Window w, int i1,
int i2, unsigned int ui1, unsigned int ui2);
/* 38 */
EXTERN void XMoveWindow(Display *d, Window w, int i1, int i2);
EXTERN int XMoveWindow(Display *d, Window w, int i1, int i2);
/* 39 */
EXTERN Bool XQueryPointer(Display *d, Window w1, Window *w2,
Window *w3, int *i1, int *i2, int *i3,
int *i4, unsigned int *ui);
/* 40 */
EXTERN void XRaiseWindow(Display *d, Window w);
EXTERN int XRaiseWindow(Display *d, Window w);
/* 41 */
EXTERN void XRefreshKeyboardMapping(XMappingEvent *x);
EXTERN int XRefreshKeyboardMapping(XMappingEvent *x);
/* 42 */
EXTERN void XResizeWindow(Display *d, Window w, unsigned int ui1,
EXTERN int XResizeWindow(Display *d, Window w, unsigned int ui1,
unsigned int ui2);
/* 43 */
EXTERN void XSelectInput(Display *d, Window w, long l);
EXTERN int XSelectInput(Display *d, Window w, long l);
/* 44 */
EXTERN Status XSendEvent(Display *d, Window w, Bool b, long l,
XEvent *x);
/* 45 */
EXTERN void XSetIconName(Display *d, Window w, _Xconst char *c);
EXTERN int XSetIconName(Display *d, Window w, _Xconst char *c);
/* 46 */
EXTERN void XSetInputFocus(Display *d, Window w, int i, Time t);
EXTERN int XSetInputFocus(Display *d, Window w, int i, Time t);
/* 47 */
EXTERN int XSetSelectionOwner(Display *d, Atom a, Window w,
Time t);
/* 48 */
EXTERN void XSetWindowBackground(Display *d, Window w,
EXTERN int XSetWindowBackground(Display *d, Window w,
unsigned long ul);
/* 49 */
EXTERN void XSetWindowBackgroundPixmap(Display *d, Window w,
EXTERN int XSetWindowBackgroundPixmap(Display *d, Window w,
Pixmap p);
/* 50 */
EXTERN void XSetWindowBorder(Display *d, Window w,
EXTERN int XSetWindowBorder(Display *d, Window w,
unsigned long ul);
/* 51 */
EXTERN void XSetWindowBorderPixmap(Display *d, Window w,
EXTERN int XSetWindowBorderPixmap(Display *d, Window w,
Pixmap p);
/* 52 */
EXTERN void XSetWindowBorderWidth(Display *d, Window w,
EXTERN int XSetWindowBorderWidth(Display *d, Window w,
unsigned int ui);
/* 53 */
EXTERN void XSetWindowColormap(Display *d, Window w, Colormap c);
EXTERN int XSetWindowColormap(Display *d, Window w, Colormap c);
/* 54 */
EXTERN void XUngrabKeyboard(Display *d, Time t);
EXTERN int XUngrabKeyboard(Display *d, Time t);
/* 55 */
EXTERN int XUngrabPointer(Display *d, Time t);
/* 56 */
EXTERN void XUnmapWindow(Display *d, Window w);
EXTERN int XUnmapWindow(Display *d, Window w);
/* 57 */
EXTERN int TkPutImage(unsigned long *colors, int ncolors,
Display *display, Drawable d, GC gc,
@@ -629,7 +629,7 @@ EXTERN int XSetLineAttributes(Display *display, GC gc,
/* 75 */
EXTERN int _XInitImageFuncPtrs(XImage *image);
/* 76 */
EXTERN XIC XCreateIC(void);
EXTERN XIC XCreateIC(XIM xim, ...);
/* 77 */
EXTERN XVisualInfo * XGetVisualInfo(Display *display, long vinfo_mask,
XVisualInfo *vinfo_template,
@@ -644,7 +644,7 @@ EXTERN Status XStringListToTextProperty(char **list, int count,
EXTERN int XDrawSegments(Display *display, Drawable d, GC gc,
XSegment *segments, int nsegments);
/* 81 */
EXTERN void XForceScreenSaver(Display *display, int mode);
EXTERN int XForceScreenSaver(Display *display, int mode);
/* 82 */
EXTERN int XDrawLine(Display *d, Drawable dr, GC g, int x1,
int y1, int x2, int y2);
@@ -653,7 +653,7 @@ EXTERN int XFillRectangle(Display *display, Drawable d, GC gc,
int x, int y, unsigned int width,
unsigned int height);
/* 84 */
EXTERN void XClearWindow(Display *d, Window w);
EXTERN int XClearWindow(Display *d, Window w);
/* 85 */
EXTERN int XDrawPoint(Display *display, Drawable d, GC gc,
int x, int y);
@@ -667,16 +667,72 @@ EXTERN int XWarpPointer(Display *display, Window src_w,
unsigned int src_height, int dest_x,
int dest_y);
/* 88 */
EXTERN void XQueryColor(Display *display, Colormap colormap,
EXTERN int XQueryColor(Display *display, Colormap colormap,
XColor *def_in_out);
/* 89 */
EXTERN void XQueryColors(Display *display, Colormap colormap,
EXTERN int XQueryColors(Display *display, Colormap colormap,
XColor *defs_in_out, int ncolors);
/* 90 */
EXTERN Status XQueryTree(Display *d, Window w1, Window *w2,
Window *w3, Window **w4, unsigned int *ui);
/* 91 */
EXTERN int XSync(Display *display, Bool flag);
EXTERN int XSync(Display *display, Bool discard);
/* Slot 92 is reserved */
/* Slot 93 is reserved */
/* Slot 94 is reserved */
/* Slot 95 is reserved */
/* Slot 96 is reserved */
/* Slot 97 is reserved */
/* Slot 98 is reserved */
/* Slot 99 is reserved */
/* Slot 100 is reserved */
/* Slot 101 is reserved */
/* Slot 102 is reserved */
/* Slot 103 is reserved */
/* Slot 104 is reserved */
/* Slot 105 is reserved */
/* Slot 106 is reserved */
/* 107 */
EXTERN int XFlush(Display *display);
/* 108 */
EXTERN int XGrabServer(Display *display);
/* 109 */
EXTERN int XUngrabServer(Display *display);
/* 110 */
EXTERN int XFree(void *data);
/* 111 */
EXTERN int XNoOp(Display *display);
/* 112 */
EXTERN XAfterFunction XSynchronize(Display *display, Bool onoff);
/* Slot 113 is reserved */
/* 114 */
EXTERN VisualID XVisualIDFromVisual(Visual *visual);
/* Slot 115 is reserved */
/* Slot 116 is reserved */
/* Slot 117 is reserved */
/* Slot 118 is reserved */
/* Slot 119 is reserved */
/* Slot 120 is reserved */
/* Slot 121 is reserved */
/* Slot 122 is reserved */
/* Slot 123 is reserved */
/* Slot 124 is reserved */
/* Slot 125 is reserved */
/* Slot 126 is reserved */
/* Slot 127 is reserved */
/* Slot 128 is reserved */
/* Slot 129 is reserved */
/* Slot 130 is reserved */
/* Slot 131 is reserved */
/* Slot 132 is reserved */
/* Slot 133 is reserved */
/* Slot 134 is reserved */
/* Slot 135 is reserved */
/* Slot 136 is reserved */
/* 137 */
EXTERN int XPutImage(Display *d, Drawable dr, GC gc, XImage *im,
int sx, int sy, int dx, int dy,
unsigned int w, unsigned int h);
#endif /* AQUA */
typedef struct TkIntXlibStubs {
@@ -838,19 +894,19 @@ typedef struct TkIntXlibStubs {
XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 11 */
Status (*xAllocColor) (Display *d, Colormap c, XColor *xp); /* 12 */
int (*xBell) (Display *d, int i); /* 13 */
void (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 14 */
void (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 15 */
void (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 16 */
void (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */
void (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */
int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 14 */
int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 15 */
int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 16 */
int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */
int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */
Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 19 */
int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 20 */
void (*xDestroyWindow) (Display *d, Window w); /* 21 */
void (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */
int (*xDestroyWindow) (Display *d, Window w); /* 21 */
int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */
int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 23 */
void (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 24 */
void (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 25 */
void (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 26 */
int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 24 */
int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 25 */
int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 26 */
int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 27 */
int (*xFreeColormap) (Display *d, Colormap c); /* 28 */
int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 29 */
@@ -860,27 +916,27 @@ typedef struct TkIntXlibStubs {
int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 33 */
int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 34 */
KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 35 */
void (*xMapWindow) (Display *d, Window w); /* 36 */
void (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 37 */
void (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 38 */
int (*xMapWindow) (Display *d, Window w); /* 36 */
int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 37 */
int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 38 */
Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 39 */
void (*xRaiseWindow) (Display *d, Window w); /* 40 */
void (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 41 */
void (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */
void (*xSelectInput) (Display *d, Window w, long l); /* 43 */
int (*xRaiseWindow) (Display *d, Window w); /* 40 */
int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 41 */
int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */
int (*xSelectInput) (Display *d, Window w, long l); /* 43 */
Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 44 */
void (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 45 */
void (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 46 */
int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 45 */
int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 46 */
int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 47 */
void (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 48 */
void (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 49 */
void (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 50 */
void (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 51 */
void (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 52 */
void (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 53 */
void (*xUngrabKeyboard) (Display *d, Time t); /* 54 */
int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 48 */
int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 49 */
int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 50 */
int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 51 */
int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 52 */
int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 53 */
int (*xUngrabKeyboard) (Display *d, Time t); /* 54 */
int (*xUngrabPointer) (Display *d, Time t); /* 55 */
void (*xUnmapWindow) (Display *d, Window w); /* 56 */
int (*xUnmapWindow) (Display *d, Window w); /* 56 */
int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 57 */
Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 58 */
GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 59 */
@@ -900,22 +956,68 @@ typedef struct TkIntXlibStubs {
int (*xSetFunction) (Display *display, GC gc, int function); /* 73 */
int (*xSetLineAttributes) (Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 74 */
int (*_XInitImageFuncPtrs) (XImage *image); /* 75 */
XIC (*xCreateIC) (void); /* 76 */
XIC (*xCreateIC) (XIM xim, ...); /* 76 */
XVisualInfo * (*xGetVisualInfo) (Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); /* 77 */
void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 78 */
Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 79 */
int (*xDrawSegments) (Display *display, Drawable d, GC gc, XSegment *segments, int nsegments); /* 80 */
void (*xForceScreenSaver) (Display *display, int mode); /* 81 */
int (*xForceScreenSaver) (Display *display, int mode); /* 81 */
int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 82 */
int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 83 */
void (*xClearWindow) (Display *d, Window w); /* 84 */
int (*xClearWindow) (Display *d, Window w); /* 84 */
int (*xDrawPoint) (Display *display, Drawable d, GC gc, int x, int y); /* 85 */
int (*xDrawPoints) (Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode); /* 86 */
int (*xWarpPointer) (Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y); /* 87 */
void (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */
void (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */
int (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */
int (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */
Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */
int (*xSync) (Display *display, Bool flag); /* 91 */
int (*xSync) (Display *display, Bool discard); /* 91 */
void (*reserved92)(void);
void (*reserved93)(void);
void (*reserved94)(void);
void (*reserved95)(void);
void (*reserved96)(void);
void (*reserved97)(void);
void (*reserved98)(void);
void (*reserved99)(void);
void (*reserved100)(void);
void (*reserved101)(void);
void (*reserved102)(void);
void (*reserved103)(void);
void (*reserved104)(void);
void (*reserved105)(void);
void (*reserved106)(void);
int (*xFlush) (Display *display); /* 107 */
int (*xGrabServer) (Display *display); /* 108 */
int (*xUngrabServer) (Display *display); /* 109 */
int (*xFree) (void *data); /* 110 */
int (*xNoOp) (Display *display); /* 111 */
XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */
void (*reserved113)(void);
VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */
void (*reserved115)(void);
void (*reserved116)(void);
void (*reserved117)(void);
void (*reserved118)(void);
void (*reserved119)(void);
void (*reserved120)(void);
void (*reserved121)(void);
void (*reserved122)(void);
void (*reserved123)(void);
void (*reserved124)(void);
void (*reserved125)(void);
void (*reserved126)(void);
void (*reserved127)(void);
void (*reserved128)(void);
void (*reserved129)(void);
void (*reserved130)(void);
void (*reserved131)(void);
void (*reserved132)(void);
void (*reserved133)(void);
void (*reserved134)(void);
void (*reserved135)(void);
void (*reserved136)(void);
int (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); /* 137 */
#endif /* AQUA */
} TkIntXlibStubs;
@@ -1382,6 +1484,60 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xQueryTree) /* 90 */
#define XSync \
(tkIntXlibStubsPtr->xSync) /* 91 */
/* Slot 92 is reserved */
/* Slot 93 is reserved */
/* Slot 94 is reserved */
/* Slot 95 is reserved */
/* Slot 96 is reserved */
/* Slot 97 is reserved */
/* Slot 98 is reserved */
/* Slot 99 is reserved */
/* Slot 100 is reserved */
/* Slot 101 is reserved */
/* Slot 102 is reserved */
/* Slot 103 is reserved */
/* Slot 104 is reserved */
/* Slot 105 is reserved */
/* Slot 106 is reserved */
#define XFlush \
(tkIntXlibStubsPtr->xFlush) /* 107 */
#define XGrabServer \
(tkIntXlibStubsPtr->xGrabServer) /* 108 */
#define XUngrabServer \
(tkIntXlibStubsPtr->xUngrabServer) /* 109 */
#define XFree \
(tkIntXlibStubsPtr->xFree) /* 110 */
#define XNoOp \
(tkIntXlibStubsPtr->xNoOp) /* 111 */
#define XSynchronize \
(tkIntXlibStubsPtr->xSynchronize) /* 112 */
/* Slot 113 is reserved */
#define XVisualIDFromVisual \
(tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */
/* Slot 115 is reserved */
/* Slot 116 is reserved */
/* Slot 117 is reserved */
/* Slot 118 is reserved */
/* Slot 119 is reserved */
/* Slot 120 is reserved */
/* Slot 121 is reserved */
/* Slot 122 is reserved */
/* Slot 123 is reserved */
/* Slot 124 is reserved */
/* Slot 125 is reserved */
/* Slot 126 is reserved */
/* Slot 127 is reserved */
/* Slot 128 is reserved */
/* Slot 129 is reserved */
/* Slot 130 is reserved */
/* Slot 131 is reserved */
/* Slot 132 is reserved */
/* Slot 133 is reserved */
/* Slot 134 is reserved */
/* Slot 135 is reserved */
/* Slot 136 is reserved */
#define XPutImage \
(tkIntXlibStubsPtr->xPutImage) /* 137 */
#endif /* AQUA */
#endif /* defined(USE_TK_STUBS) */

View File

@@ -1,995 +0,0 @@
#if !(defined(LTM1) && defined(LTM2) && defined(LTM3))
#if defined(LTM2)
#define LTM3
#endif
#if defined(LTM1)
#define LTM2
#endif
#define LTM1
#if defined(LTM_ALL)
#define BN_ERROR_C
#define BN_FAST_MP_INVMOD_C
#define BN_FAST_MP_MONTGOMERY_REDUCE_C
#define BN_FAST_S_MP_MUL_DIGS_C
#define BN_FAST_S_MP_MUL_HIGH_DIGS_C
#define BN_FAST_S_MP_SQR_C
#define BN_MP_2EXPT_C
#define BN_MP_ABS_C
#define BN_MP_ADD_C
#define BN_MP_ADD_D_C
#define BN_MP_ADDMOD_C
#define BN_MP_AND_C
#define BN_MP_CLAMP_C
#define BN_MP_CLEAR_C
#define BN_MP_CLEAR_MULTI_C
#define BN_MP_CMP_C
#define BN_MP_CMP_D_C
#define BN_MP_CMP_MAG_C
#define BN_MP_CNT_LSB_C
#define BN_MP_COPY_C
#define BN_MP_COUNT_BITS_C
#define BN_MP_DIV_C
#define BN_MP_DIV_2_C
#define BN_MP_DIV_2D_C
#define BN_MP_DIV_3_C
#define BN_MP_DIV_D_C
#define BN_MP_DR_IS_MODULUS_C
#define BN_MP_DR_REDUCE_C
#define BN_MP_DR_SETUP_C
#define BN_MP_EXCH_C
#define BN_MP_EXPT_D_C
#define BN_MP_EXPTMOD_C
#define BN_MP_EXPTMOD_FAST_C
#define BN_MP_EXTEUCLID_C
#define BN_MP_FREAD_C
#define BN_MP_FWRITE_C
#define BN_MP_GCD_C
#define BN_MP_GET_INT_C
#define BN_MP_GROW_C
#define BN_MP_INIT_C
#define BN_MP_INIT_COPY_C
#define BN_MP_INIT_MULTI_C
#define BN_MP_INIT_SET_C
#define BN_MP_INIT_SET_INT_C
#define BN_MP_INIT_SIZE_C
#define BN_MP_INVMOD_C
#define BN_MP_INVMOD_SLOW_C
#define BN_MP_IS_SQUARE_C
#define BN_MP_JACOBI_C
#define BN_MP_KARATSUBA_MUL_C
#define BN_MP_KARATSUBA_SQR_C
#define BN_MP_LCM_C
#define BN_MP_LSHD_C
#define BN_MP_MOD_C
#define BN_MP_MOD_2D_C
#define BN_MP_MOD_D_C
#define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C
#define BN_MP_MONTGOMERY_REDUCE_C
#define BN_MP_MONTGOMERY_SETUP_C
#define BN_MP_MUL_C
#define BN_MP_MUL_2_C
#define BN_MP_MUL_2D_C
#define BN_MP_MUL_D_C
#define BN_MP_MULMOD_C
#define BN_MP_N_ROOT_C
#define BN_MP_NEG_C
#define BN_MP_OR_C
#define BN_MP_PRIME_FERMAT_C
#define BN_MP_PRIME_IS_DIVISIBLE_C
#define BN_MP_PRIME_IS_PRIME_C
#define BN_MP_PRIME_MILLER_RABIN_C
#define BN_MP_PRIME_NEXT_PRIME_C
#define BN_MP_PRIME_RABIN_MILLER_TRIALS_C
#define BN_MP_PRIME_RANDOM_EX_C
#define BN_MP_RADIX_SIZE_C
#define BN_MP_RADIX_SMAP_C
#define BN_MP_RAND_C
#define BN_MP_READ_RADIX_C
#define BN_MP_READ_SIGNED_BIN_C
#define BN_MP_READ_UNSIGNED_BIN_C
#define BN_MP_REDUCE_C
#define BN_MP_REDUCE_2K_C
#define BN_MP_REDUCE_2K_L_C
#define BN_MP_REDUCE_2K_SETUP_C
#define BN_MP_REDUCE_2K_SETUP_L_C
#define BN_MP_REDUCE_IS_2K_C
#define BN_MP_REDUCE_IS_2K_L_C
#define BN_MP_REDUCE_SETUP_C
#define BN_MP_RSHD_C
#define BN_MP_SET_C
#define BN_MP_SET_INT_C
#define BN_MP_SHRINK_C
#define BN_MP_SIGNED_BIN_SIZE_C
#define BN_MP_SQR_C
#define BN_MP_SQRMOD_C
#define BN_MP_SQRT_C
#define BN_MP_SUB_C
#define BN_MP_SUB_D_C
#define BN_MP_SUBMOD_C
#define BN_MP_TO_SIGNED_BIN_C
#define BN_MP_TO_SIGNED_BIN_N_C
#define BN_MP_TO_UNSIGNED_BIN_C
#define BN_MP_TO_UNSIGNED_BIN_N_C
#define BN_MP_TOOM_MUL_C
#define BN_MP_TOOM_SQR_C
#define BN_MP_TORADIX_C
#define BN_MP_TORADIX_N_C
#define BN_MP_UNSIGNED_BIN_SIZE_C
#define BN_MP_XOR_C
#define BN_MP_ZERO_C
#define BN_PRIME_TAB_C
#define BN_REVERSE_C
#define BN_S_MP_ADD_C
#define BN_S_MP_EXPTMOD_C
#define BN_S_MP_MUL_DIGS_C
#define BN_S_MP_MUL_HIGH_DIGS_C
#define BN_S_MP_SQR_C
#define BN_S_MP_SUB_C
#define BNCORE_C
#endif
#if defined(BN_ERROR_C)
#define BN_MP_ERROR_TO_STRING_C
#endif
#if defined(BN_FAST_MP_INVMOD_C)
#define BN_MP_ISEVEN_C
#define BN_MP_INIT_MULTI_C
#define BN_MP_COPY_C
#define BN_MP_MOD_C
#define BN_MP_SET_C
#define BN_MP_DIV_2_C
#define BN_MP_ISODD_C
#define BN_MP_SUB_C
#define BN_MP_CMP_C
#define BN_MP_ISZERO_C
#define BN_MP_CMP_D_C
#define BN_MP_ADD_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_MULTI_C
#endif
#if defined(BN_FAST_MP_MONTGOMERY_REDUCE_C)
#define BN_MP_GROW_C
#define BN_MP_RSHD_C
#define BN_MP_CLAMP_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#endif
#if defined(BN_FAST_S_MP_MUL_DIGS_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_FAST_S_MP_MUL_HIGH_DIGS_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_FAST_S_MP_SQR_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_2EXPT_C)
#define BN_MP_ZERO_C
#define BN_MP_GROW_C
#endif
#if defined(BN_MP_ABS_C)
#define BN_MP_COPY_C
#endif
#if defined(BN_MP_ADD_C)
#define BN_S_MP_ADD_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#endif
#if defined(BN_MP_ADD_D_C)
#define BN_MP_GROW_C
#define BN_MP_SUB_D_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_ADDMOD_C)
#define BN_MP_INIT_C
#define BN_MP_ADD_C
#define BN_MP_CLEAR_C
#define BN_MP_MOD_C
#endif
#if defined(BN_MP_AND_C)
#define BN_MP_INIT_COPY_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_CLAMP_C)
#endif
#if defined(BN_MP_CLEAR_C)
#endif
#if defined(BN_MP_CLEAR_MULTI_C)
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_CMP_C)
#define BN_MP_CMP_MAG_C
#endif
#if defined(BN_MP_CMP_D_C)
#endif
#if defined(BN_MP_CMP_MAG_C)
#endif
#if defined(BN_MP_CNT_LSB_C)
#define BN_MP_ISZERO_C
#endif
#if defined(BN_MP_COPY_C)
#define BN_MP_GROW_C
#endif
#if defined(BN_MP_COUNT_BITS_C)
#endif
#if defined(BN_MP_DIV_C)
#define BN_MP_ISZERO_C
#define BN_MP_CMP_MAG_C
#define BN_MP_COPY_C
#define BN_MP_ZERO_C
#define BN_MP_INIT_MULTI_C
#define BN_MP_SET_C
#define BN_MP_COUNT_BITS_C
#define BN_MP_ABS_C
#define BN_MP_MUL_2D_C
#define BN_MP_CMP_C
#define BN_MP_SUB_C
#define BN_MP_ADD_C
#define BN_MP_DIV_2D_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_MULTI_C
#define BN_MP_INIT_SIZE_C
#define BN_MP_INIT_C
#define BN_MP_INIT_COPY_C
#define BN_MP_LSHD_C
#define BN_MP_RSHD_C
#define BN_MP_MUL_D_C
#define BN_MP_CLAMP_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_DIV_2_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_DIV_2D_C)
#define BN_MP_COPY_C
#define BN_MP_ZERO_C
#define BN_MP_INIT_C
#define BN_MP_MOD_2D_C
#define BN_MP_CLEAR_C
#define BN_MP_RSHD_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#endif
#if defined(BN_MP_DIV_3_C)
#define BN_MP_INIT_SIZE_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_DIV_D_C)
#define BN_MP_ISZERO_C
#define BN_MP_COPY_C
#define BN_MP_DIV_2D_C
#define BN_MP_DIV_3_C
#define BN_MP_INIT_SIZE_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_DR_IS_MODULUS_C)
#endif
#if defined(BN_MP_DR_REDUCE_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#endif
#if defined(BN_MP_DR_SETUP_C)
#endif
#if defined(BN_MP_EXCH_C)
#endif
#if defined(BN_MP_EXPT_D_C)
#define BN_MP_INIT_COPY_C
#define BN_MP_SET_C
#define BN_MP_SQR_C
#define BN_MP_CLEAR_C
#define BN_MP_MUL_C
#endif
#if defined(BN_MP_EXPTMOD_C)
#define BN_MP_INIT_C
#define BN_MP_INVMOD_C
#define BN_MP_CLEAR_C
#define BN_MP_ABS_C
#define BN_MP_CLEAR_MULTI_C
#define BN_MP_REDUCE_IS_2K_L_C
#define BN_S_MP_EXPTMOD_C
#define BN_MP_DR_IS_MODULUS_C
#define BN_MP_REDUCE_IS_2K_C
#define BN_MP_ISODD_C
#define BN_MP_EXPTMOD_FAST_C
#endif
#if defined(BN_MP_EXPTMOD_FAST_C)
#define BN_MP_COUNT_BITS_C
#define BN_MP_INIT_C
#define BN_MP_CLEAR_C
#define BN_MP_MONTGOMERY_SETUP_C
#define BN_FAST_MP_MONTGOMERY_REDUCE_C
#define BN_MP_MONTGOMERY_REDUCE_C
#define BN_MP_DR_SETUP_C
#define BN_MP_DR_REDUCE_C
#define BN_MP_REDUCE_2K_SETUP_C
#define BN_MP_REDUCE_2K_C
#define BN_MP_MONTGOMERY_CALC_NORMALIZATION_C
#define BN_MP_MULMOD_C
#define BN_MP_SET_C
#define BN_MP_MOD_C
#define BN_MP_COPY_C
#define BN_MP_SQR_C
#define BN_MP_MUL_C
#define BN_MP_EXCH_C
#endif
#if defined(BN_MP_EXTEUCLID_C)
#define BN_MP_INIT_MULTI_C
#define BN_MP_SET_C
#define BN_MP_COPY_C
#define BN_MP_ISZERO_C
#define BN_MP_DIV_C
#define BN_MP_MUL_C
#define BN_MP_SUB_C
#define BN_MP_NEG_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_MULTI_C
#endif
#if defined(BN_MP_FREAD_C)
#define BN_MP_ZERO_C
#define BN_MP_S_RMAP_C
#define BN_MP_MUL_D_C
#define BN_MP_ADD_D_C
#define BN_MP_CMP_D_C
#endif
#if defined(BN_MP_FWRITE_C)
#define BN_MP_RADIX_SIZE_C
#define BN_MP_TORADIX_C
#endif
#if defined(BN_MP_GCD_C)
#define BN_MP_ISZERO_C
#define BN_MP_ABS_C
#define BN_MP_ZERO_C
#define BN_MP_INIT_COPY_C
#define BN_MP_CNT_LSB_C
#define BN_MP_DIV_2D_C
#define BN_MP_CMP_MAG_C
#define BN_MP_EXCH_C
#define BN_S_MP_SUB_C
#define BN_MP_MUL_2D_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_GET_INT_C)
#endif
#if defined(BN_MP_GROW_C)
#endif
#if defined(BN_MP_INIT_C)
#endif
#if defined(BN_MP_INIT_COPY_C)
#define BN_MP_COPY_C
#endif
#if defined(BN_MP_INIT_MULTI_C)
#define BN_MP_ERR_C
#define BN_MP_INIT_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_INIT_SET_C)
#define BN_MP_INIT_C
#define BN_MP_SET_C
#endif
#if defined(BN_MP_INIT_SET_INT_C)
#define BN_MP_INIT_C
#define BN_MP_SET_INT_C
#endif
#if defined(BN_MP_INIT_SIZE_C)
#define BN_MP_INIT_C
#endif
#if defined(BN_MP_INVMOD_C)
#define BN_MP_ISZERO_C
#define BN_MP_ISODD_C
#define BN_FAST_MP_INVMOD_C
#define BN_MP_INVMOD_SLOW_C
#endif
#if defined(BN_MP_INVMOD_SLOW_C)
#define BN_MP_ISZERO_C
#define BN_MP_INIT_MULTI_C
#define BN_MP_MOD_C
#define BN_MP_COPY_C
#define BN_MP_ISEVEN_C
#define BN_MP_SET_C
#define BN_MP_DIV_2_C
#define BN_MP_ISODD_C
#define BN_MP_ADD_C
#define BN_MP_SUB_C
#define BN_MP_CMP_C
#define BN_MP_CMP_D_C
#define BN_MP_CMP_MAG_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_MULTI_C
#endif
#if defined(BN_MP_IS_SQUARE_C)
#define BN_MP_MOD_D_C
#define BN_MP_INIT_SET_INT_C
#define BN_MP_MOD_C
#define BN_MP_GET_INT_C
#define BN_MP_SQRT_C
#define BN_MP_SQR_C
#define BN_MP_CMP_MAG_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_JACOBI_C)
#define BN_MP_CMP_D_C
#define BN_MP_ISZERO_C
#define BN_MP_INIT_COPY_C
#define BN_MP_CNT_LSB_C
#define BN_MP_DIV_2D_C
#define BN_MP_MOD_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_KARATSUBA_MUL_C)
#define BN_MP_MUL_C
#define BN_MP_INIT_SIZE_C
#define BN_MP_CLAMP_C
#define BN_MP_SUB_C
#define BN_MP_ADD_C
#define BN_MP_LSHD_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_KARATSUBA_SQR_C)
#define BN_MP_INIT_SIZE_C
#define BN_MP_CLAMP_C
#define BN_MP_SQR_C
#define BN_MP_SUB_C
#define BN_S_MP_ADD_C
#define BN_MP_LSHD_C
#define BN_MP_ADD_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_LCM_C)
#define BN_MP_INIT_MULTI_C
#define BN_MP_GCD_C
#define BN_MP_CMP_MAG_C
#define BN_MP_DIV_C
#define BN_MP_MUL_C
#define BN_MP_CLEAR_MULTI_C
#endif
#if defined(BN_MP_LSHD_C)
#define BN_MP_GROW_C
#define BN_MP_RSHD_C
#endif
#if defined(BN_MP_MOD_C)
#define BN_MP_INIT_C
#define BN_MP_DIV_C
#define BN_MP_CLEAR_C
#define BN_MP_ADD_C
#define BN_MP_EXCH_C
#endif
#if defined(BN_MP_MOD_2D_C)
#define BN_MP_ZERO_C
#define BN_MP_COPY_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_MOD_D_C)
#define BN_MP_DIV_D_C
#endif
#if defined(BN_MP_MONTGOMERY_CALC_NORMALIZATION_C)
#define BN_MP_COUNT_BITS_C
#define BN_MP_2EXPT_C
#define BN_MP_SET_C
#define BN_MP_MUL_2_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#endif
#if defined(BN_MP_MONTGOMERY_REDUCE_C)
#define BN_FAST_MP_MONTGOMERY_REDUCE_C
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#define BN_MP_RSHD_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#endif
#if defined(BN_MP_MONTGOMERY_SETUP_C)
#endif
#if defined(BN_MP_MUL_C)
#define BN_MP_TOOM_MUL_C
#define BN_MP_KARATSUBA_MUL_C
#define BN_FAST_S_MP_MUL_DIGS_C
#define BN_S_MP_MUL_C
#define BN_S_MP_MUL_DIGS_C
#endif
#if defined(BN_MP_MUL_2_C)
#define BN_MP_GROW_C
#endif
#if defined(BN_MP_MUL_2D_C)
#define BN_MP_COPY_C
#define BN_MP_GROW_C
#define BN_MP_LSHD_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_MUL_D_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_MULMOD_C)
#define BN_MP_INIT_C
#define BN_MP_MUL_C
#define BN_MP_CLEAR_C
#define BN_MP_MOD_C
#endif
#if defined(BN_MP_N_ROOT_C)
#define BN_MP_INIT_C
#define BN_MP_SET_C
#define BN_MP_COPY_C
#define BN_MP_EXPT_D_C
#define BN_MP_MUL_C
#define BN_MP_SUB_C
#define BN_MP_MUL_D_C
#define BN_MP_DIV_C
#define BN_MP_CMP_C
#define BN_MP_SUB_D_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_NEG_C)
#define BN_MP_COPY_C
#define BN_MP_ISZERO_C
#endif
#if defined(BN_MP_OR_C)
#define BN_MP_INIT_COPY_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_PRIME_FERMAT_C)
#define BN_MP_CMP_D_C
#define BN_MP_INIT_C
#define BN_MP_EXPTMOD_C
#define BN_MP_CMP_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_PRIME_IS_DIVISIBLE_C)
#define BN_MP_MOD_D_C
#endif
#if defined(BN_MP_PRIME_IS_PRIME_C)
#define BN_MP_CMP_D_C
#define BN_MP_PRIME_IS_DIVISIBLE_C
#define BN_MP_INIT_C
#define BN_MP_SET_C
#define BN_MP_PRIME_MILLER_RABIN_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_PRIME_MILLER_RABIN_C)
#define BN_MP_CMP_D_C
#define BN_MP_INIT_COPY_C
#define BN_MP_SUB_D_C
#define BN_MP_CNT_LSB_C
#define BN_MP_DIV_2D_C
#define BN_MP_EXPTMOD_C
#define BN_MP_CMP_C
#define BN_MP_SQRMOD_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_PRIME_NEXT_PRIME_C)
#define BN_MP_CMP_D_C
#define BN_MP_SET_C
#define BN_MP_SUB_D_C
#define BN_MP_ISEVEN_C
#define BN_MP_MOD_D_C
#define BN_MP_INIT_C
#define BN_MP_ADD_D_C
#define BN_MP_PRIME_MILLER_RABIN_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_PRIME_RABIN_MILLER_TRIALS_C)
#endif
#if defined(BN_MP_PRIME_RANDOM_EX_C)
#define BN_MP_READ_UNSIGNED_BIN_C
#define BN_MP_PRIME_IS_PRIME_C
#define BN_MP_SUB_D_C
#define BN_MP_DIV_2_C
#define BN_MP_MUL_2_C
#define BN_MP_ADD_D_C
#endif
#if defined(BN_MP_RADIX_SIZE_C)
#define BN_MP_COUNT_BITS_C
#define BN_MP_INIT_COPY_C
#define BN_MP_ISZERO_C
#define BN_MP_DIV_D_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_RADIX_SMAP_C)
#define BN_MP_S_RMAP_C
#endif
#if defined(BN_MP_RAND_C)
#define BN_MP_ZERO_C
#define BN_MP_ADD_D_C
#define BN_MP_LSHD_C
#endif
#if defined(BN_MP_READ_RADIX_C)
#define BN_MP_ZERO_C
#define BN_MP_S_RMAP_C
#define BN_MP_RADIX_SMAP_C
#define BN_MP_MUL_D_C
#define BN_MP_ADD_D_C
#define BN_MP_ISZERO_C
#endif
#if defined(BN_MP_READ_SIGNED_BIN_C)
#define BN_MP_READ_UNSIGNED_BIN_C
#endif
#if defined(BN_MP_READ_UNSIGNED_BIN_C)
#define BN_MP_GROW_C
#define BN_MP_ZERO_C
#define BN_MP_MUL_2D_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_REDUCE_C)
#define BN_MP_REDUCE_SETUP_C
#define BN_MP_INIT_COPY_C
#define BN_MP_RSHD_C
#define BN_MP_MUL_C
#define BN_S_MP_MUL_HIGH_DIGS_C
#define BN_FAST_S_MP_MUL_HIGH_DIGS_C
#define BN_MP_MOD_2D_C
#define BN_S_MP_MUL_DIGS_C
#define BN_MP_SUB_C
#define BN_MP_CMP_D_C
#define BN_MP_SET_C
#define BN_MP_LSHD_C
#define BN_MP_ADD_C
#define BN_MP_CMP_C
#define BN_S_MP_SUB_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_REDUCE_2K_C)
#define BN_MP_INIT_C
#define BN_MP_COUNT_BITS_C
#define BN_MP_DIV_2D_C
#define BN_MP_MUL_D_C
#define BN_S_MP_ADD_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_REDUCE_2K_L_C)
#define BN_MP_INIT_C
#define BN_MP_COUNT_BITS_C
#define BN_MP_DIV_2D_C
#define BN_MP_MUL_C
#define BN_S_MP_ADD_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_REDUCE_2K_SETUP_C)
#define BN_MP_INIT_C
#define BN_MP_COUNT_BITS_C
#define BN_MP_2EXPT_C
#define BN_MP_CLEAR_C
#define BN_S_MP_SUB_C
#endif
#if defined(BN_MP_REDUCE_2K_SETUP_L_C)
#define BN_MP_INIT_C
#define BN_MP_2EXPT_C
#define BN_MP_COUNT_BITS_C
#define BN_S_MP_SUB_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_REDUCE_IS_2K_C)
#define BN_MP_REDUCE_2K_C
#define BN_MP_COUNT_BITS_C
#endif
#if defined(BN_MP_REDUCE_IS_2K_L_C)
#endif
#if defined(BN_MP_REDUCE_SETUP_C)
#define BN_MP_2EXPT_C
#define BN_MP_DIV_C
#endif
#if defined(BN_MP_RSHD_C)
#define BN_MP_ZERO_C
#endif
#if defined(BN_MP_SET_C)
#define BN_MP_ZERO_C
#endif
#if defined(BN_MP_SET_INT_C)
#define BN_MP_ZERO_C
#define BN_MP_MUL_2D_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_SHRINK_C)
#endif
#if defined(BN_MP_SIGNED_BIN_SIZE_C)
#define BN_MP_UNSIGNED_BIN_SIZE_C
#endif
#if defined(BN_MP_SQR_C)
#define BN_MP_TOOM_SQR_C
#define BN_MP_KARATSUBA_SQR_C
#define BN_FAST_S_MP_SQR_C
#define BN_S_MP_SQR_C
#endif
#if defined(BN_MP_SQRMOD_C)
#define BN_MP_INIT_C
#define BN_MP_SQR_C
#define BN_MP_CLEAR_C
#define BN_MP_MOD_C
#endif
#if defined(BN_MP_SQRT_C)
#define BN_MP_N_ROOT_C
#define BN_MP_ISZERO_C
#define BN_MP_ZERO_C
#define BN_MP_INIT_COPY_C
#define BN_MP_RSHD_C
#define BN_MP_DIV_C
#define BN_MP_ADD_C
#define BN_MP_DIV_2_C
#define BN_MP_CMP_MAG_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_SUB_C)
#define BN_S_MP_ADD_C
#define BN_MP_CMP_MAG_C
#define BN_S_MP_SUB_C
#endif
#if defined(BN_MP_SUB_D_C)
#define BN_MP_GROW_C
#define BN_MP_ADD_D_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_MP_SUBMOD_C)
#define BN_MP_INIT_C
#define BN_MP_SUB_C
#define BN_MP_CLEAR_C
#define BN_MP_MOD_C
#endif
#if defined(BN_MP_TO_SIGNED_BIN_C)
#define BN_MP_TO_UNSIGNED_BIN_C
#endif
#if defined(BN_MP_TO_SIGNED_BIN_N_C)
#define BN_MP_SIGNED_BIN_SIZE_C
#define BN_MP_TO_SIGNED_BIN_C
#endif
#if defined(BN_MP_TO_UNSIGNED_BIN_C)
#define BN_MP_INIT_COPY_C
#define BN_MP_ISZERO_C
#define BN_MP_DIV_2D_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_TO_UNSIGNED_BIN_N_C)
#define BN_MP_UNSIGNED_BIN_SIZE_C
#define BN_MP_TO_UNSIGNED_BIN_C
#endif
#if defined(BN_MP_TOOM_MUL_C)
#define BN_MP_INIT_MULTI_C
#define BN_MP_MOD_2D_C
#define BN_MP_COPY_C
#define BN_MP_RSHD_C
#define BN_MP_MUL_C
#define BN_MP_MUL_2_C
#define BN_MP_ADD_C
#define BN_MP_SUB_C
#define BN_MP_DIV_2_C
#define BN_MP_MUL_2D_C
#define BN_MP_MUL_D_C
#define BN_MP_DIV_3_C
#define BN_MP_LSHD_C
#define BN_MP_CLEAR_MULTI_C
#endif
#if defined(BN_MP_TOOM_SQR_C)
#define BN_MP_INIT_MULTI_C
#define BN_MP_MOD_2D_C
#define BN_MP_COPY_C
#define BN_MP_RSHD_C
#define BN_MP_SQR_C
#define BN_MP_MUL_2_C
#define BN_MP_ADD_C
#define BN_MP_SUB_C
#define BN_MP_DIV_2_C
#define BN_MP_MUL_2D_C
#define BN_MP_MUL_D_C
#define BN_MP_DIV_3_C
#define BN_MP_LSHD_C
#define BN_MP_CLEAR_MULTI_C
#endif
#if defined(BN_MP_TORADIX_C)
#define BN_MP_ISZERO_C
#define BN_MP_INIT_COPY_C
#define BN_MP_DIV_D_C
#define BN_MP_CLEAR_C
#define BN_MP_S_RMAP_C
#endif
#if defined(BN_MP_TORADIX_N_C)
#define BN_MP_ISZERO_C
#define BN_MP_INIT_COPY_C
#define BN_MP_DIV_D_C
#define BN_MP_CLEAR_C
#define BN_MP_S_RMAP_C
#endif
#if defined(BN_MP_UNSIGNED_BIN_SIZE_C)
#define BN_MP_COUNT_BITS_C
#endif
#if defined(BN_MP_XOR_C)
#define BN_MP_INIT_COPY_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_MP_ZERO_C)
#endif
#if defined(BN_PRIME_TAB_C)
#endif
#if defined(BN_REVERSE_C)
#endif
#if defined(BN_S_MP_ADD_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#endif
#if defined(BN_S_MP_EXPTMOD_C)
#define BN_MP_COUNT_BITS_C
#define BN_MP_INIT_C
#define BN_MP_CLEAR_C
#define BN_MP_REDUCE_SETUP_C
#define BN_MP_REDUCE_C
#define BN_MP_REDUCE_2K_SETUP_L_C
#define BN_MP_REDUCE_2K_L_C
#define BN_MP_MOD_C
#define BN_MP_COPY_C
#define BN_MP_SQR_C
#define BN_MP_MUL_C
#define BN_MP_SET_C
#define BN_MP_EXCH_C
#endif
#if defined(BN_S_MP_MUL_DIGS_C)
#define BN_FAST_S_MP_MUL_DIGS_C
#define BN_MP_INIT_SIZE_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_S_MP_MUL_HIGH_DIGS_C)
#define BN_FAST_S_MP_MUL_HIGH_DIGS_C
#define BN_MP_INIT_SIZE_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_S_MP_SQR_C)
#define BN_MP_INIT_SIZE_C
#define BN_MP_CLAMP_C
#define BN_MP_EXCH_C
#define BN_MP_CLEAR_C
#endif
#if defined(BN_S_MP_SUB_C)
#define BN_MP_GROW_C
#define BN_MP_CLAMP_C
#endif
#if defined(BNCORE_C)
#endif
#ifdef LTM3
#define LTM_LAST
#endif
#include <tommath_superclass.h>
#include <tommath_class.h>
#else
#define LTM_LAST
#endif

View File

@@ -1,72 +0,0 @@
/* super class file for PK algos */
/* default ... include all MPI */
#define LTM_ALL
/* RSA only (does not support DH/DSA/ECC) */
/* #define SC_RSA_1 */
/* For reference.... On an Athlon64 optimizing for speed...
LTM's mpi.o with all functions [striped] is 142KiB in size.
*/
/* Works for RSA only, mpi.o is 68KiB */
#ifdef SC_RSA_1
#define BN_MP_SHRINK_C
#define BN_MP_LCM_C
#define BN_MP_PRIME_RANDOM_EX_C
#define BN_MP_INVMOD_C
#define BN_MP_GCD_C
#define BN_MP_MOD_C
#define BN_MP_MULMOD_C
#define BN_MP_ADDMOD_C
#define BN_MP_EXPTMOD_C
#define BN_MP_SET_INT_C
#define BN_MP_INIT_MULTI_C
#define BN_MP_CLEAR_MULTI_C
#define BN_MP_UNSIGNED_BIN_SIZE_C
#define BN_MP_TO_UNSIGNED_BIN_C
#define BN_MP_MOD_D_C
#define BN_MP_PRIME_RABIN_MILLER_TRIALS_C
#define BN_REVERSE_C
#define BN_PRIME_TAB_C
/* other modifiers */
#define BN_MP_DIV_SMALL /* Slower division, not critical */
/* here we are on the last pass so we turn things off. The functions classes are still there
* but we remove them specifically from the build. This also invokes tweaks in functions
* like removing support for even moduli, etc...
*/
#ifdef LTM_LAST
#undef BN_MP_TOOM_MUL_C
#undef BN_MP_TOOM_SQR_C
#undef BN_MP_KARATSUBA_MUL_C
#undef BN_MP_KARATSUBA_SQR_C
#undef BN_MP_REDUCE_C
#undef BN_MP_REDUCE_SETUP_C
#undef BN_MP_DR_IS_MODULUS_C
#undef BN_MP_DR_SETUP_C
#undef BN_MP_DR_REDUCE_C
#undef BN_MP_REDUCE_IS_2K_C
#undef BN_MP_REDUCE_2K_SETUP_C
#undef BN_MP_REDUCE_2K_C
#undef BN_S_MP_EXPTMOD_C
#undef BN_MP_DIV_3_C
#undef BN_S_MP_MUL_HIGH_DIGS_C
#undef BN_FAST_S_MP_MUL_HIGH_DIGS_C
#undef BN_FAST_MP_INVMOD_C
/* To safely undefine these you have to make sure your RSA key won't exceed the Comba threshold
* which is roughly 255 digits [7140 bits for 32-bit machines, 15300 bits for 64-bit machines]
* which means roughly speaking you can handle upto 2536-bit RSA keys with these defined without
* trouble.
*/
#undef BN_S_MP_MUL_DIGS_C
#undef BN_S_MP_SQR_C
#undef BN_MP_MONTGOMERY_REDUCE_C
#endif
#endif

View File

@@ -1,7 +1,7 @@
if {([info commands ::tcl::pkgconfig] eq "")
|| ([info sharedlibextension] ne ".dll")} return
if {![package vsatisfies [package provide Tcl] 8.5]} return
if {[info sharedlibextension] != ".dll"} return
if {[::tcl::pkgconfig get debug]} {
package ifneeded dde 1.4.1 [list load [file join $dir tcldde14g.dll] dde]
package ifneeded dde 1.4.2 [list load [file join $dir tcldde14g.dll] dde]
} else {
package ifneeded dde 1.4.1 [list load [file join $dir tcldde14.dll] dde]
package ifneeded dde 1.4.2 [list load [file join $dir tcldde14.dll] dde]
}

Binary file not shown.

View File

@@ -643,7 +643,7 @@ SubstituteFile(
}
/* debug: dump the list */
#ifdef _DEBUG
#ifndef NDEBUG
{
int n = 0;
list_item_t *p = NULL;
@@ -686,10 +686,10 @@ SubstituteFile(
BOOL FileExists(LPCTSTR szPath)
{
#ifndef INVALID_FILE_ATTRIBUTES
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif
DWORD pathAttr = GetFileAttributes(szPath);
return (pathAttr != INVALID_FILE_ATTRIBUTES &&
return (pathAttr != INVALID_FILE_ATTRIBUTES &&
!(pathAttr & FILE_ATTRIBUTE_DIRECTORY));
}
@@ -740,7 +740,7 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
#if 0 /* This function is not available in Visual C++ 6 */
/*
* Use numerics 0 -> FindExInfoStandard,
* 1 -> FindExSearchLimitToDirectories,
* 1 -> FindExSearchLimitToDirectories,
* as these are not defined in Visual C++ 6
*/
hSearch = FindFirstFileEx(path, 0, &finfo, 1, NULL, 0);
@@ -755,7 +755,7 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
do {
int sublen;
/*
* We need to check it is a directory despite the
* We need to check it is a directory despite the
* FindExSearchLimitToDirectories in the above call. See SDK docs
*/
if ((finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -786,15 +786,15 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
* that is used to confirm it is the correct directory.
* The search path for the package directory is currently only
* the parent and grandparent of the current working directory.
* If found, the command prints
* If found, the command prints
* name_DIRPATH=<full path of located directory>
* and returns 0. If not found, does not print anything and returns 1.
*/
static int LocateDependency(const char *keypath)
{
int i, ret;
static char *paths[] = {"..", "..\\..", "..\\..\\.."};
static const char *paths[] = {"..", "..\\..", "..\\..\\.."};
for (i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) {
ret = LocateDependencyHelper(paths[i], keypath);
if (ret == 0)

File diff suppressed because it is too large Load Diff

View File

@@ -1,98 +1,98 @@
#------------------------------------------------------------- -*- makefile -*-
# targets.vc --
#
# Part of the nmake based build system for Tcl and its extensions.
# This file defines some standard targets for the convenience of extensions
# and can be optionally included by the extension makefile.
# See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for docs.
$(PROJECT): setup pkgindex $(PRJLIB)
!ifdef PRJ_STUBOBJS
$(PROJECT): $(PRJSTUBLIB)
$(PRJSTUBLIB): $(PRJ_STUBOBJS)
$(LIBCMD) $**
$(PRJ_STUBOBJS):
$(CCSTUBSCMD) %s
!endif # PRJ_STUBOBJS
!ifdef PRJ_MANIFEST
$(PROJECT): $(PRJLIB).manifest
$(PRJLIB).manifest: $(PRJ_MANIFEST)
@nmakehlp -s << $** >$@
@MACHINE@ $(MACHINE:IX86=X86)
<<
!endif
!if "$(PROJECT)" != "tcl" && "$(PROJECT)" != "tk"
$(PRJLIB): $(PRJ_OBJS) $(RESFILE)
!if $(STATIC_BUILD)
$(LIBCMD) $**
!else
$(DLLCMD) $**
$(_VC_MANIFEST_EMBED_DLL)
!endif
-@del $*.exp
!endif
!if "$(PRJ_HEADERS)" != "" && "$(PRJ_OBJS)" != ""
$(PRJ_OBJS): $(PRJ_HEADERS)
!endif
# If parent makefile has defined stub objects, add their installation
# to the default install
!if "$(PRJ_STUBOBJS)" != ""
default-install: default-install-stubs
!endif
# Unlike the other default targets, these cannot be in rules.vc because
# the executed command depends on existence of macro PRJ_HEADERS_PUBLIC
# that the parent makefile will not define until after including rules-ext.vc
!if "$(PRJ_HEADERS_PUBLIC)" != ""
default-install: default-install-headers
default-install-headers:
@echo Installing headers to '$(INCLUDE_INSTALL_DIR)'
@for %f in ($(PRJ_HEADERS_PUBLIC)) do @$(COPY) %f "$(INCLUDE_INSTALL_DIR)"
!endif
!if "$(DISABLE_STANDARD_TARGETS)" == ""
DISABLE_STANDARD_TARGETS = 0
!endif
!if "$(DISABLE_TARGET_setup)" == ""
DISABLE_TARGET_setup = 0
!endif
!if "$(DISABLE_TARGET_install)" == ""
DISABLE_TARGET_install = 0
!endif
!if "$(DISABLE_TARGET_clean)" == ""
DISABLE_TARGET_clean = 0
!endif
!if "$(DISABLE_TARGET_test)" == ""
DISABLE_TARGET_test = 0
!endif
!if "$(DISABLE_TARGET_shell)" == ""
DISABLE_TARGET_shell = 0
!endif
!if !$(DISABLE_STANDARD_TARGETS)
!if !$(DISABLE_TARGET_setup)
setup: default-setup
!endif
!if !$(DISABLE_TARGET_install)
install: default-install
!endif
!if !$(DISABLE_TARGET_clean)
clean: default-clean
realclean: hose
hose: default-hose
distclean: realclean default-distclean
!endif
!if !$(DISABLE_TARGET_test)
test: default-test
!endif
!if !$(DISABLE_TARGET_shell)
shell: default-shell
!endif
!endif # DISABLE_STANDARD_TARGETS
#------------------------------------------------------------- -*- makefile -*-
# targets.vc --
#
# Part of the nmake based build system for Tcl and its extensions.
# This file defines some standard targets for the convenience of extensions
# and can be optionally included by the extension makefile.
# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for docs.
$(PROJECT): setup pkgindex $(PRJLIB)
!ifdef PRJ_STUBOBJS
$(PROJECT): $(PRJSTUBLIB)
$(PRJSTUBLIB): $(PRJ_STUBOBJS)
$(LIBCMD) $**
$(PRJ_STUBOBJS):
$(CCSTUBSCMD) %s
!endif # PRJ_STUBOBJS
!ifdef PRJ_MANIFEST
$(PROJECT): $(PRJLIB).manifest
$(PRJLIB).manifest: $(PRJ_MANIFEST)
@nmakehlp -s << $** >$@
@MACHINE@ $(MACHINE:IX86=X86)
<<
!endif
!if "$(PROJECT)" != "tcl" && "$(PROJECT)" != "tk"
$(PRJLIB): $(PRJ_OBJS) $(RESFILE)
!if $(STATIC_BUILD)
$(LIBCMD) $**
!else
$(DLLCMD) $**
$(_VC_MANIFEST_EMBED_DLL)
!endif
-@del $*.exp
!endif
!if "$(PRJ_HEADERS)" != "" && "$(PRJ_OBJS)" != ""
$(PRJ_OBJS): $(PRJ_HEADERS)
!endif
# If parent makefile has defined stub objects, add their installation
# to the default install
!if "$(PRJ_STUBOBJS)" != ""
default-install: default-install-stubs
!endif
# Unlike the other default targets, these cannot be in rules.vc because
# the executed command depends on existence of macro PRJ_HEADERS_PUBLIC
# that the parent makefile will not define until after including rules-ext.vc
!if "$(PRJ_HEADERS_PUBLIC)" != ""
default-install: default-install-headers
default-install-headers:
@echo Installing headers to '$(INCLUDE_INSTALL_DIR)'
@for %f in ($(PRJ_HEADERS_PUBLIC)) do @$(COPY) %f "$(INCLUDE_INSTALL_DIR)"
!endif
!if "$(DISABLE_STANDARD_TARGETS)" == ""
DISABLE_STANDARD_TARGETS = 0
!endif
!if "$(DISABLE_TARGET_setup)" == ""
DISABLE_TARGET_setup = 0
!endif
!if "$(DISABLE_TARGET_install)" == ""
DISABLE_TARGET_install = 0
!endif
!if "$(DISABLE_TARGET_clean)" == ""
DISABLE_TARGET_clean = 0
!endif
!if "$(DISABLE_TARGET_test)" == ""
DISABLE_TARGET_test = 0
!endif
!if "$(DISABLE_TARGET_shell)" == ""
DISABLE_TARGET_shell = 0
!endif
!if !$(DISABLE_STANDARD_TARGETS)
!if !$(DISABLE_TARGET_setup)
setup: default-setup
!endif
!if !$(DISABLE_TARGET_install)
install: default-install
!endif
!if !$(DISABLE_TARGET_clean)
clean: default-clean
realclean: hose
hose: default-hose
distclean: realclean default-distclean
!endif
!if !$(DISABLE_TARGET_test)
test: default-test
!endif
!if !$(DISABLE_TARGET_shell)
shell: default-shell
!endif
!endif # DISABLE_STANDARD_TARGETS

View File

@@ -1,5 +1,4 @@
CORE_MACHINE = AMD64
CORE_DEBUG = 0
CORE_TCL_THREADS = 1
CORE_USE_THREAD_ALLOC = 1
CORE_USE_WIDECHAR_API = 1
CORE_MACHINE = AMD64
CORE_DEBUG = 0
CORE_TCL_THREADS = 1
CORE_USE_THREAD_ALLOC = 1

View File

@@ -1,9 +1,9 @@
if {([info commands ::tcl::pkgconfig] eq "")
|| ([info sharedlibextension] ne ".dll")} return
if {![package vsatisfies [package provide Tcl] 8.5]} return
if {[info sharedlibextension] != ".dll"} return
if {[::tcl::pkgconfig get debug]} {
package ifneeded registry 1.3.3 \
package ifneeded registry 1.3.4 \
[list load [file join $dir tclreg13g.dll] registry]
} else {
package ifneeded registry 1.3.3 \
package ifneeded registry 1.3.4 \
[list load [file join $dir tclreg13.dll] registry]
}

Binary file not shown.

View File

@@ -16,7 +16,7 @@
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
package require -exact Tcl 8.6.9
package require -exact Tcl 8.6.10
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
@@ -668,7 +668,9 @@ proc auto_execok name {
}
set path "[file dirname [info nameof]];.;"
if {[info exists env(WINDIR)]} {
if {[info exists env(SystemRoot)]} {
set windir $env(SystemRoot)
} elseif {[info exists env(WINDIR)]} {
set windir $env(WINDIR)
}
if {[info exists windir]} {

View File

@@ -40,5 +40,5 @@ namespace eval ::tcl::clock {
::msgcat::mcset ja LOCALE_DATE_FORMAT "%EY\u5e74%m\u6708%d\u65e5"
::msgcat::mcset ja LOCALE_TIME_FORMAT "%H\u6642%M\u5206%S\u79d2"
::msgcat::mcset ja LOCALE_DATE_TIME_FORMAT "%EY\u5e74%m\u6708%d\u65e5 (%a) %H\u6642%M\u5206%S\u79d2 %z"
::msgcat::mcset ja LOCALE_ERAS "\u007b-9223372036854775808 \u897f\u66a6 0\u007d \u007b-3061011600 \u660e\u6cbb 1867\u007d \u007b-1812186000 \u5927\u6b63 1911\u007d \u007b-1357635600 \u662d\u548c 1925\u007d \u007b600220800 \u5e73\u6210 1988\u007d"
::msgcat::mcset ja LOCALE_ERAS "{-9223372036854775808 \u897f\u66a6 0} {-3061011600 \u660e\u6cbb 1867} {-1812186000 \u5927\u6b63 1911} {-1357635600 \u662d\u548c 1925} {600220800 \u5e73\u6210 1988} {1556668800 \u4ee4\u548c 2018}"
}

View File

@@ -73,3 +73,6 @@ set auto_index(::tcl::tm::Defaults) [list source [file join $dir tm.tcl]]
set auto_index(::tcl::tm::UnknownHandler) [list source [file join $dir tm.tcl]]
set auto_index(::tcl::tm::roots) [list source [file join $dir tm.tcl]]
set auto_index(::tcl::tm::path) [list source [file join $dir tm.tcl]]
if {[namespace exists ::tcl::unsupported]} {
set auto_index(timerate) {namespace import ::tcl::unsupported::timerate}
}

View File

@@ -311,7 +311,7 @@ proc ::tcl::tm::UnknownHandler {original name args} {
proc ::tcl::tm::Defaults {} {
global env tcl_platform
lassign [split [info tclversion] .] major minor
regexp {^(\d+)\.(\d+)} [package provide Tcl] - major minor
set exe [file normalize [info nameofexecutable]]
# Note that we're using [::list], not [list] because [list] means
@@ -354,7 +354,7 @@ proc ::tcl::tm::Defaults {} {
# Calls 'path add' to paths to the list of module search paths.
proc ::tcl::tm::roots {paths} {
regexp {^(\d+)\.(\d+)} [package present Tcl] - major minor
regexp {^(\d+)\.(\d+)} [package provide Tcl] - major minor
foreach pa $paths {
set p [file join $pa tcl$major]
for {set n $minor} {$n >= 0} {incr n -1} {

View File

@@ -56,5 +56,147 @@ set TZData(:Africa/Casablanca) {
{1521943200 3600 1 +00}
{1526176800 0 0 +00}
{1529200800 3600 1 +00}
{1540598400 3600 0 +01}
{1540695600 3600 0 +01}
{1557021600 0 1 +01}
{1560045600 3600 0 +01}
{1587261600 0 1 +01}
{1590285600 3600 0 +01}
{1618106400 0 1 +01}
{1621130400 3600 0 +01}
{1648346400 0 1 +01}
{1651975200 3600 0 +01}
{1679191200 0 1 +01}
{1682215200 3600 0 +01}
{1710036000 0 1 +01}
{1713060000 3600 0 +01}
{1740276000 0 1 +01}
{1743904800 3600 0 +01}
{1771120800 0 1 +01}
{1774144800 3600 0 +01}
{1801965600 0 1 +01}
{1804989600 3600 0 +01}
{1832205600 0 1 +01}
{1835229600 3600 0 +01}
{1863050400 0 1 +01}
{1866074400 3600 0 +01}
{1893290400 0 1 +01}
{1896919200 3600 0 +01}
{1924135200 0 1 +01}
{1927159200 3600 0 +01}
{1954980000 0 1 +01}
{1958004000 3600 0 +01}
{1985220000 0 1 +01}
{1988848800 3600 0 +01}
{2016064800 0 1 +01}
{2019088800 3600 0 +01}
{2046304800 0 1 +01}
{2049933600 3600 0 +01}
{2077149600 0 1 +01}
{2080173600 3600 0 +01}
{2107994400 0 1 +01}
{2111018400 3600 0 +01}
{2138234400 0 1 +01}
{2141863200 3600 0 +01}
{2169079200 0 1 +01}
{2172103200 3600 0 +01}
{2199924000 0 1 +01}
{2202948000 3600 0 +01}
{2230164000 0 1 +01}
{2233792800 3600 0 +01}
{2261008800 0 1 +01}
{2264032800 3600 0 +01}
{2291248800 0 1 +01}
{2294877600 3600 0 +01}
{2322093600 0 1 +01}
{2325117600 3600 0 +01}
{2352938400 0 1 +01}
{2355962400 3600 0 +01}
{2383178400 0 1 +01}
{2386807200 3600 0 +01}
{2414023200 0 1 +01}
{2417047200 3600 0 +01}
{2444868000 0 1 +01}
{2447892000 3600 0 +01}
{2475108000 0 1 +01}
{2478736800 3600 0 +01}
{2505952800 0 1 +01}
{2508976800 3600 0 +01}
{2536192800 0 1 +01}
{2539821600 3600 0 +01}
{2567037600 0 1 +01}
{2570061600 3600 0 +01}
{2597882400 0 1 +01}
{2600906400 3600 0 +01}
{2628122400 0 1 +01}
{2631751200 3600 0 +01}
{2658967200 0 1 +01}
{2661991200 3600 0 +01}
{2689812000 0 1 +01}
{2692836000 3600 0 +01}
{2720052000 0 1 +01}
{2723680800 3600 0 +01}
{2750896800 0 1 +01}
{2753920800 3600 0 +01}
{2781136800 0 1 +01}
{2784765600 3600 0 +01}
{2811981600 0 1 +01}
{2815005600 3600 0 +01}
{2842826400 0 1 +01}
{2845850400 3600 0 +01}
{2873066400 0 1 +01}
{2876695200 3600 0 +01}
{2903911200 0 1 +01}
{2906935200 3600 0 +01}
{2934756000 0 1 +01}
{2937780000 3600 0 +01}
{2964996000 0 1 +01}
{2968020000 3600 0 +01}
{2995840800 0 1 +01}
{2998864800 3600 0 +01}
{3026080800 0 1 +01}
{3029709600 3600 0 +01}
{3056925600 0 1 +01}
{3059949600 3600 0 +01}
{3087770400 0 1 +01}
{3090794400 3600 0 +01}
{3118010400 0 1 +01}
{3121639200 3600 0 +01}
{3148855200 0 1 +01}
{3151879200 3600 0 +01}
{3179700000 0 1 +01}
{3182724000 3600 0 +01}
{3209940000 0 1 +01}
{3212964000 3600 0 +01}
{3240784800 0 1 +01}
{3243808800 3600 0 +01}
{3271024800 0 1 +01}
{3274653600 3600 0 +01}
{3301869600 0 1 +01}
{3304893600 3600 0 +01}
{3332714400 0 1 +01}
{3335738400 3600 0 +01}
{3362954400 0 1 +01}
{3366583200 3600 0 +01}
{3393799200 0 1 +01}
{3396823200 3600 0 +01}
{3424644000 0 1 +01}
{3427668000 3600 0 +01}
{3454884000 0 1 +01}
{3457908000 3600 0 +01}
{3485728800 0 1 +01}
{3488752800 3600 0 +01}
{3515968800 0 1 +01}
{3519597600 3600 0 +01}
{3546813600 0 1 +01}
{3549837600 3600 0 +01}
{3577658400 0 1 +01}
{3580682400 3600 0 +01}
{3607898400 0 1 +01}
{3611527200 3600 0 +01}
{3638743200 0 1 +01}
{3641767200 3600 0 +01}
{3669588000 0 1 +01}
{3672612000 3600 0 +01}
{3699828000 0 1 +01}
{3702852000 3600 0 +01}
}

View File

@@ -45,5 +45,147 @@ set TZData(:Africa/El_Aaiun) {
{1521943200 3600 1 +00}
{1526176800 0 0 +00}
{1529200800 3600 1 +00}
{1540598400 3600 0 +01}
{1540695600 3600 0 +01}
{1557021600 0 1 +01}
{1560045600 3600 0 +01}
{1587261600 0 1 +01}
{1590285600 3600 0 +01}
{1618106400 0 1 +01}
{1621130400 3600 0 +01}
{1648346400 0 1 +01}
{1651975200 3600 0 +01}
{1679191200 0 1 +01}
{1682215200 3600 0 +01}
{1710036000 0 1 +01}
{1713060000 3600 0 +01}
{1740276000 0 1 +01}
{1743904800 3600 0 +01}
{1771120800 0 1 +01}
{1774144800 3600 0 +01}
{1801965600 0 1 +01}
{1804989600 3600 0 +01}
{1832205600 0 1 +01}
{1835229600 3600 0 +01}
{1863050400 0 1 +01}
{1866074400 3600 0 +01}
{1893290400 0 1 +01}
{1896919200 3600 0 +01}
{1924135200 0 1 +01}
{1927159200 3600 0 +01}
{1954980000 0 1 +01}
{1958004000 3600 0 +01}
{1985220000 0 1 +01}
{1988848800 3600 0 +01}
{2016064800 0 1 +01}
{2019088800 3600 0 +01}
{2046304800 0 1 +01}
{2049933600 3600 0 +01}
{2077149600 0 1 +01}
{2080173600 3600 0 +01}
{2107994400 0 1 +01}
{2111018400 3600 0 +01}
{2138234400 0 1 +01}
{2141863200 3600 0 +01}
{2169079200 0 1 +01}
{2172103200 3600 0 +01}
{2199924000 0 1 +01}
{2202948000 3600 0 +01}
{2230164000 0 1 +01}
{2233792800 3600 0 +01}
{2261008800 0 1 +01}
{2264032800 3600 0 +01}
{2291248800 0 1 +01}
{2294877600 3600 0 +01}
{2322093600 0 1 +01}
{2325117600 3600 0 +01}
{2352938400 0 1 +01}
{2355962400 3600 0 +01}
{2383178400 0 1 +01}
{2386807200 3600 0 +01}
{2414023200 0 1 +01}
{2417047200 3600 0 +01}
{2444868000 0 1 +01}
{2447892000 3600 0 +01}
{2475108000 0 1 +01}
{2478736800 3600 0 +01}
{2505952800 0 1 +01}
{2508976800 3600 0 +01}
{2536192800 0 1 +01}
{2539821600 3600 0 +01}
{2567037600 0 1 +01}
{2570061600 3600 0 +01}
{2597882400 0 1 +01}
{2600906400 3600 0 +01}
{2628122400 0 1 +01}
{2631751200 3600 0 +01}
{2658967200 0 1 +01}
{2661991200 3600 0 +01}
{2689812000 0 1 +01}
{2692836000 3600 0 +01}
{2720052000 0 1 +01}
{2723680800 3600 0 +01}
{2750896800 0 1 +01}
{2753920800 3600 0 +01}
{2781136800 0 1 +01}
{2784765600 3600 0 +01}
{2811981600 0 1 +01}
{2815005600 3600 0 +01}
{2842826400 0 1 +01}
{2845850400 3600 0 +01}
{2873066400 0 1 +01}
{2876695200 3600 0 +01}
{2903911200 0 1 +01}
{2906935200 3600 0 +01}
{2934756000 0 1 +01}
{2937780000 3600 0 +01}
{2964996000 0 1 +01}
{2968020000 3600 0 +01}
{2995840800 0 1 +01}
{2998864800 3600 0 +01}
{3026080800 0 1 +01}
{3029709600 3600 0 +01}
{3056925600 0 1 +01}
{3059949600 3600 0 +01}
{3087770400 0 1 +01}
{3090794400 3600 0 +01}
{3118010400 0 1 +01}
{3121639200 3600 0 +01}
{3148855200 0 1 +01}
{3151879200 3600 0 +01}
{3179700000 0 1 +01}
{3182724000 3600 0 +01}
{3209940000 0 1 +01}
{3212964000 3600 0 +01}
{3240784800 0 1 +01}
{3243808800 3600 0 +01}
{3271024800 0 1 +01}
{3274653600 3600 0 +01}
{3301869600 0 1 +01}
{3304893600 3600 0 +01}
{3332714400 0 1 +01}
{3335738400 3600 0 +01}
{3362954400 0 1 +01}
{3366583200 3600 0 +01}
{3393799200 0 1 +01}
{3396823200 3600 0 +01}
{3424644000 0 1 +01}
{3427668000 3600 0 +01}
{3454884000 0 1 +01}
{3457908000 3600 0 +01}
{3485728800 0 1 +01}
{3488752800 3600 0 +01}
{3515968800 0 1 +01}
{3519597600 3600 0 +01}
{3546813600 0 1 +01}
{3549837600 3600 0 +01}
{3577658400 0 1 +01}
{3580682400 3600 0 +01}
{3607898400 0 1 +01}
{3611527200 3600 0 +01}
{3638743200 0 1 +01}
{3641767200 3600 0 +01}
{3669588000 0 1 +01}
{3672612000 3600 0 +01}
{3699828000 0 1 +01}
{3702852000 3600 0 +01}
}

View File

@@ -5,4 +5,5 @@ set TZData(:Africa/Sao_Tome) {
{-2713912016 -2205 0 LMT}
{-1830384000 0 0 GMT}
{1514768400 3600 0 WAT}
{1546304400 0 0 GMT}
}

View File

@@ -93,165 +93,4 @@ set TZData(:America/Campo_Grande) {
{1518922800 -14400 0 -04}
{1541304000 -10800 1 -04}
{1550372400 -14400 0 -04}
{1572753600 -10800 1 -04}
{1581822000 -14400 0 -04}
{1604203200 -10800 1 -04}
{1613876400 -14400 0 -04}
{1636257600 -10800 1 -04}
{1645326000 -14400 0 -04}
{1667707200 -10800 1 -04}
{1677380400 -14400 0 -04}
{1699156800 -10800 1 -04}
{1708225200 -14400 0 -04}
{1730606400 -10800 1 -04}
{1739674800 -14400 0 -04}
{1762056000 -10800 1 -04}
{1771729200 -14400 0 -04}
{1793505600 -10800 1 -04}
{1803178800 -14400 0 -04}
{1825560000 -10800 1 -04}
{1834628400 -14400 0 -04}
{1857009600 -10800 1 -04}
{1866078000 -14400 0 -04}
{1888459200 -10800 1 -04}
{1897527600 -14400 0 -04}
{1919908800 -10800 1 -04}
{1928977200 -14400 0 -04}
{1951358400 -10800 1 -04}
{1960426800 -14400 0 -04}
{1983412800 -10800 1 -04}
{1992481200 -14400 0 -04}
{2014862400 -10800 1 -04}
{2024535600 -14400 0 -04}
{2046312000 -10800 1 -04}
{2055380400 -14400 0 -04}
{2077761600 -10800 1 -04}
{2086830000 -14400 0 -04}
{2109211200 -10800 1 -04}
{2118884400 -14400 0 -04}
{2140660800 -10800 1 -04}
{2150334000 -14400 0 -04}
{2172715200 -10800 1 -04}
{2181783600 -14400 0 -04}
{2204164800 -10800 1 -04}
{2213233200 -14400 0 -04}
{2235614400 -10800 1 -04}
{2244682800 -14400 0 -04}
{2267064000 -10800 1 -04}
{2276132400 -14400 0 -04}
{2298513600 -10800 1 -04}
{2307582000 -14400 0 -04}
{2329963200 -10800 1 -04}
{2339636400 -14400 0 -04}
{2362017600 -10800 1 -04}
{2371086000 -14400 0 -04}
{2393467200 -10800 1 -04}
{2402535600 -14400 0 -04}
{2424916800 -10800 1 -04}
{2433985200 -14400 0 -04}
{2456366400 -10800 1 -04}
{2465434800 -14400 0 -04}
{2487816000 -10800 1 -04}
{2497489200 -14400 0 -04}
{2519870400 -10800 1 -04}
{2528938800 -14400 0 -04}
{2551320000 -10800 1 -04}
{2560388400 -14400 0 -04}
{2582769600 -10800 1 -04}
{2591838000 -14400 0 -04}
{2614219200 -10800 1 -04}
{2623287600 -14400 0 -04}
{2645668800 -10800 1 -04}
{2654737200 -14400 0 -04}
{2677118400 -10800 1 -04}
{2686791600 -14400 0 -04}
{2709172800 -10800 1 -04}
{2718241200 -14400 0 -04}
{2740622400 -10800 1 -04}
{2749690800 -14400 0 -04}
{2772072000 -10800 1 -04}
{2781140400 -14400 0 -04}
{2803521600 -10800 1 -04}
{2812590000 -14400 0 -04}
{2834971200 -10800 1 -04}
{2844039600 -14400 0 -04}
{2867025600 -10800 1 -04}
{2876094000 -14400 0 -04}
{2898475200 -10800 1 -04}
{2907543600 -14400 0 -04}
{2929924800 -10800 1 -04}
{2938993200 -14400 0 -04}
{2961374400 -10800 1 -04}
{2970442800 -14400 0 -04}
{2992824000 -10800 1 -04}
{3001892400 -14400 0 -04}
{3024273600 -10800 1 -04}
{3033946800 -14400 0 -04}
{3056328000 -10800 1 -04}
{3065396400 -14400 0 -04}
{3087777600 -10800 1 -04}
{3096846000 -14400 0 -04}
{3119227200 -10800 1 -04}
{3128295600 -14400 0 -04}
{3150676800 -10800 1 -04}
{3159745200 -14400 0 -04}
{3182126400 -10800 1 -04}
{3191194800 -14400 0 -04}
{3213576000 -10800 1 -04}
{3223249200 -14400 0 -04}
{3245630400 -10800 1 -04}
{3254698800 -14400 0 -04}
{3277080000 -10800 1 -04}
{3286148400 -14400 0 -04}
{3308529600 -10800 1 -04}
{3317598000 -14400 0 -04}
{3339979200 -10800 1 -04}
{3349047600 -14400 0 -04}
{3371428800 -10800 1 -04}
{3381102000 -14400 0 -04}
{3403483200 -10800 1 -04}
{3412551600 -14400 0 -04}
{3434932800 -10800 1 -04}
{3444001200 -14400 0 -04}
{3466382400 -10800 1 -04}
{3475450800 -14400 0 -04}
{3497832000 -10800 1 -04}
{3506900400 -14400 0 -04}
{3529281600 -10800 1 -04}
{3538350000 -14400 0 -04}
{3560731200 -10800 1 -04}
{3570404400 -14400 0 -04}
{3592785600 -10800 1 -04}
{3601854000 -14400 0 -04}
{3624235200 -10800 1 -04}
{3633303600 -14400 0 -04}
{3655684800 -10800 1 -04}
{3664753200 -14400 0 -04}
{3687134400 -10800 1 -04}
{3696202800 -14400 0 -04}
{3718584000 -10800 1 -04}
{3727652400 -14400 0 -04}
{3750638400 -10800 1 -04}
{3759706800 -14400 0 -04}
{3782088000 -10800 1 -04}
{3791156400 -14400 0 -04}
{3813537600 -10800 1 -04}
{3822606000 -14400 0 -04}
{3844987200 -10800 1 -04}
{3854055600 -14400 0 -04}
{3876436800 -10800 1 -04}
{3885505200 -14400 0 -04}
{3907886400 -10800 1 -04}
{3917559600 -14400 0 -04}
{3939940800 -10800 1 -04}
{3949009200 -14400 0 -04}
{3971390400 -10800 1 -04}
{3980458800 -14400 0 -04}
{4002840000 -10800 1 -04}
{4011908400 -14400 0 -04}
{4034289600 -10800 1 -04}
{4043358000 -14400 0 -04}
{4065739200 -10800 1 -04}
{4074807600 -14400 0 -04}
{4097188800 -10800 1 -04}
}

View File

@@ -93,165 +93,4 @@ set TZData(:America/Cuiaba) {
{1518922800 -14400 0 -04}
{1541304000 -10800 1 -04}
{1550372400 -14400 0 -04}
{1572753600 -10800 1 -04}
{1581822000 -14400 0 -04}
{1604203200 -10800 1 -04}
{1613876400 -14400 0 -04}
{1636257600 -10800 1 -04}
{1645326000 -14400 0 -04}
{1667707200 -10800 1 -04}
{1677380400 -14400 0 -04}
{1699156800 -10800 1 -04}
{1708225200 -14400 0 -04}
{1730606400 -10800 1 -04}
{1739674800 -14400 0 -04}
{1762056000 -10800 1 -04}
{1771729200 -14400 0 -04}
{1793505600 -10800 1 -04}
{1803178800 -14400 0 -04}
{1825560000 -10800 1 -04}
{1834628400 -14400 0 -04}
{1857009600 -10800 1 -04}
{1866078000 -14400 0 -04}
{1888459200 -10800 1 -04}
{1897527600 -14400 0 -04}
{1919908800 -10800 1 -04}
{1928977200 -14400 0 -04}
{1951358400 -10800 1 -04}
{1960426800 -14400 0 -04}
{1983412800 -10800 1 -04}
{1992481200 -14400 0 -04}
{2014862400 -10800 1 -04}
{2024535600 -14400 0 -04}
{2046312000 -10800 1 -04}
{2055380400 -14400 0 -04}
{2077761600 -10800 1 -04}
{2086830000 -14400 0 -04}
{2109211200 -10800 1 -04}
{2118884400 -14400 0 -04}
{2140660800 -10800 1 -04}
{2150334000 -14400 0 -04}
{2172715200 -10800 1 -04}
{2181783600 -14400 0 -04}
{2204164800 -10800 1 -04}
{2213233200 -14400 0 -04}
{2235614400 -10800 1 -04}
{2244682800 -14400 0 -04}
{2267064000 -10800 1 -04}
{2276132400 -14400 0 -04}
{2298513600 -10800 1 -04}
{2307582000 -14400 0 -04}
{2329963200 -10800 1 -04}
{2339636400 -14400 0 -04}
{2362017600 -10800 1 -04}
{2371086000 -14400 0 -04}
{2393467200 -10800 1 -04}
{2402535600 -14400 0 -04}
{2424916800 -10800 1 -04}
{2433985200 -14400 0 -04}
{2456366400 -10800 1 -04}
{2465434800 -14400 0 -04}
{2487816000 -10800 1 -04}
{2497489200 -14400 0 -04}
{2519870400 -10800 1 -04}
{2528938800 -14400 0 -04}
{2551320000 -10800 1 -04}
{2560388400 -14400 0 -04}
{2582769600 -10800 1 -04}
{2591838000 -14400 0 -04}
{2614219200 -10800 1 -04}
{2623287600 -14400 0 -04}
{2645668800 -10800 1 -04}
{2654737200 -14400 0 -04}
{2677118400 -10800 1 -04}
{2686791600 -14400 0 -04}
{2709172800 -10800 1 -04}
{2718241200 -14400 0 -04}
{2740622400 -10800 1 -04}
{2749690800 -14400 0 -04}
{2772072000 -10800 1 -04}
{2781140400 -14400 0 -04}
{2803521600 -10800 1 -04}
{2812590000 -14400 0 -04}
{2834971200 -10800 1 -04}
{2844039600 -14400 0 -04}
{2867025600 -10800 1 -04}
{2876094000 -14400 0 -04}
{2898475200 -10800 1 -04}
{2907543600 -14400 0 -04}
{2929924800 -10800 1 -04}
{2938993200 -14400 0 -04}
{2961374400 -10800 1 -04}
{2970442800 -14400 0 -04}
{2992824000 -10800 1 -04}
{3001892400 -14400 0 -04}
{3024273600 -10800 1 -04}
{3033946800 -14400 0 -04}
{3056328000 -10800 1 -04}
{3065396400 -14400 0 -04}
{3087777600 -10800 1 -04}
{3096846000 -14400 0 -04}
{3119227200 -10800 1 -04}
{3128295600 -14400 0 -04}
{3150676800 -10800 1 -04}
{3159745200 -14400 0 -04}
{3182126400 -10800 1 -04}
{3191194800 -14400 0 -04}
{3213576000 -10800 1 -04}
{3223249200 -14400 0 -04}
{3245630400 -10800 1 -04}
{3254698800 -14400 0 -04}
{3277080000 -10800 1 -04}
{3286148400 -14400 0 -04}
{3308529600 -10800 1 -04}
{3317598000 -14400 0 -04}
{3339979200 -10800 1 -04}
{3349047600 -14400 0 -04}
{3371428800 -10800 1 -04}
{3381102000 -14400 0 -04}
{3403483200 -10800 1 -04}
{3412551600 -14400 0 -04}
{3434932800 -10800 1 -04}
{3444001200 -14400 0 -04}
{3466382400 -10800 1 -04}
{3475450800 -14400 0 -04}
{3497832000 -10800 1 -04}
{3506900400 -14400 0 -04}
{3529281600 -10800 1 -04}
{3538350000 -14400 0 -04}
{3560731200 -10800 1 -04}
{3570404400 -14400 0 -04}
{3592785600 -10800 1 -04}
{3601854000 -14400 0 -04}
{3624235200 -10800 1 -04}
{3633303600 -14400 0 -04}
{3655684800 -10800 1 -04}
{3664753200 -14400 0 -04}
{3687134400 -10800 1 -04}
{3696202800 -14400 0 -04}
{3718584000 -10800 1 -04}
{3727652400 -14400 0 -04}
{3750638400 -10800 1 -04}
{3759706800 -14400 0 -04}
{3782088000 -10800 1 -04}
{3791156400 -14400 0 -04}
{3813537600 -10800 1 -04}
{3822606000 -14400 0 -04}
{3844987200 -10800 1 -04}
{3854055600 -14400 0 -04}
{3876436800 -10800 1 -04}
{3885505200 -14400 0 -04}
{3907886400 -10800 1 -04}
{3917559600 -14400 0 -04}
{3939940800 -10800 1 -04}
{3949009200 -14400 0 -04}
{3971390400 -10800 1 -04}
{3980458800 -14400 0 -04}
{4002840000 -10800 1 -04}
{4011908400 -14400 0 -04}
{4034289600 -10800 1 -04}
{4043358000 -14400 0 -04}
{4065739200 -10800 1 -04}
{4074807600 -14400 0 -04}
{4097188800 -10800 1 -04}
}

View File

@@ -11,6 +11,11 @@ set TZData(:America/Detroit) {
{-757364400 -18000 0 EST}
{-684349200 -14400 1 EDT}
{-671047200 -18000 0 EST}
{-80506740 -14400 0 EDT}
{-68666400 -18000 0 EST}
{-52938000 -14400 1 EDT}
{-37216800 -18000 0 EST}
{-31518000 -18000 0 EST}
{94712400 -18000 0 EST}
{104914800 -14400 1 EDT}
{120636000 -18000 0 EST}

View File

@@ -20,10 +20,6 @@ set TZData(:America/Edmonton) {
{-765388800 -25200 0 MST}
{-715791600 -21600 1 MDT}
{-702489600 -25200 0 MST}
{-84380400 -21600 1 MDT}
{-68659200 -25200 0 MST}
{-21481200 -21600 1 MDT}
{-5760000 -25200 0 MST}
{73472400 -21600 1 MDT}
{89193600 -25200 0 MST}
{104922000 -21600 1 MDT}

View File

@@ -11,12 +11,6 @@ set TZData(:America/Indiana/Tell_City) {
{-769395600 -18000 1 CPT}
{-765392400 -21600 0 CST}
{-757360800 -21600 0 CST}
{-747244800 -18000 1 CDT}
{-733942800 -21600 0 CST}
{-526492800 -18000 1 CDT}
{-513190800 -21600 0 CST}
{-495043200 -18000 1 CDT}
{-481741200 -21600 0 CST}
{-462996000 -18000 1 CDT}
{-450291600 -21600 0 CST}
{-431539200 -18000 1 CDT}
@@ -28,16 +22,18 @@ set TZData(:America/Indiana/Tell_City) {
{-337190400 -18000 1 CDT}
{-323888400 -21600 0 CST}
{-305740800 -18000 1 CDT}
{-289414800 -21600 0 CST}
{-292438800 -21600 0 CST}
{-273686400 -18000 1 CDT}
{-260989200 -21600 0 CST}
{-257965200 -21600 0 CST}
{-242236800 -18000 1 CDT}
{-226515600 -21600 0 CST}
{-210787200 -18000 1 CDT}
{-195066000 -21600 0 CST}
{-179337600 -18000 0 EST}
{-31518000 -18000 0 EST}
{-21488400 -14400 1 EDT}
{-68662800 -21600 0 CST}
{-52934400 -18000 1 CDT}
{-37213200 -21600 0 CST}
{-21484800 -14400 0 EDT}
{-5767200 -18000 0 EST}
{9961200 -14400 1 EDT}
{25682400 -18000 0 EST}

View File

@@ -17,12 +17,9 @@ set TZData(:America/Kentucky/Louisville) {
{-769395600 -18000 1 CPT}
{-765392400 -21600 0 CST}
{-757360800 -21600 0 CST}
{-747244800 -18000 1 CDT}
{-747251940 -18000 1 CDT}
{-744224400 -21600 0 CST}
{-715795200 -18000 1 CDT}
{-684349200 -18000 1 CDT}
{-652899600 -18000 1 CDT}
{-620845200 -18000 1 CDT}
{-620841600 -18000 1 CDT}
{-608144400 -21600 0 CST}
{-589392000 -18000 1 CDT}
{-576090000 -21600 0 CST}
@@ -45,7 +42,7 @@ set TZData(:America/Kentucky/Louisville) {
{-305740800 -18000 1 CDT}
{-289414800 -21600 0 CST}
{-273686400 -18000 1 CDT}
{-266432400 -18000 0 EST}
{-266428800 -18000 0 EST}
{-63140400 -18000 0 EST}
{-52938000 -14400 1 EDT}
{-37216800 -18000 0 EST}

View File

@@ -46,7 +46,8 @@ set TZData(:America/Metlakatla) {
{1489316400 -28800 1 AKDT}
{1509876000 -32400 0 AKST}
{1520766000 -28800 1 AKDT}
{1541325600 -32400 0 AKST}
{1541329200 -28800 0 PST}
{1547978400 -32400 0 AKST}
{1552215600 -28800 1 AKDT}
{1572775200 -32400 0 AKST}
{1583665200 -28800 1 AKDT}

View File

@@ -94,165 +94,4 @@ set TZData(:America/Sao_Paulo) {
{1518919200 -10800 0 -03}
{1541300400 -7200 1 -03}
{1550368800 -10800 0 -03}
{1572750000 -7200 1 -03}
{1581818400 -10800 0 -03}
{1604199600 -7200 1 -03}
{1613872800 -10800 0 -03}
{1636254000 -7200 1 -03}
{1645322400 -10800 0 -03}
{1667703600 -7200 1 -03}
{1677376800 -10800 0 -03}
{1699153200 -7200 1 -03}
{1708221600 -10800 0 -03}
{1730602800 -7200 1 -03}
{1739671200 -10800 0 -03}
{1762052400 -7200 1 -03}
{1771725600 -10800 0 -03}
{1793502000 -7200 1 -03}
{1803175200 -10800 0 -03}
{1825556400 -7200 1 -03}
{1834624800 -10800 0 -03}
{1857006000 -7200 1 -03}
{1866074400 -10800 0 -03}
{1888455600 -7200 1 -03}
{1897524000 -10800 0 -03}
{1919905200 -7200 1 -03}
{1928973600 -10800 0 -03}
{1951354800 -7200 1 -03}
{1960423200 -10800 0 -03}
{1983409200 -7200 1 -03}
{1992477600 -10800 0 -03}
{2014858800 -7200 1 -03}
{2024532000 -10800 0 -03}
{2046308400 -7200 1 -03}
{2055376800 -10800 0 -03}
{2077758000 -7200 1 -03}
{2086826400 -10800 0 -03}
{2109207600 -7200 1 -03}
{2118880800 -10800 0 -03}
{2140657200 -7200 1 -03}
{2150330400 -10800 0 -03}
{2172711600 -7200 1 -03}
{2181780000 -10800 0 -03}
{2204161200 -7200 1 -03}
{2213229600 -10800 0 -03}
{2235610800 -7200 1 -03}
{2244679200 -10800 0 -03}
{2267060400 -7200 1 -03}
{2276128800 -10800 0 -03}
{2298510000 -7200 1 -03}
{2307578400 -10800 0 -03}
{2329959600 -7200 1 -03}
{2339632800 -10800 0 -03}
{2362014000 -7200 1 -03}
{2371082400 -10800 0 -03}
{2393463600 -7200 1 -03}
{2402532000 -10800 0 -03}
{2424913200 -7200 1 -03}
{2433981600 -10800 0 -03}
{2456362800 -7200 1 -03}
{2465431200 -10800 0 -03}
{2487812400 -7200 1 -03}
{2497485600 -10800 0 -03}
{2519866800 -7200 1 -03}
{2528935200 -10800 0 -03}
{2551316400 -7200 1 -03}
{2560384800 -10800 0 -03}
{2582766000 -7200 1 -03}
{2591834400 -10800 0 -03}
{2614215600 -7200 1 -03}
{2623284000 -10800 0 -03}
{2645665200 -7200 1 -03}
{2654733600 -10800 0 -03}
{2677114800 -7200 1 -03}
{2686788000 -10800 0 -03}
{2709169200 -7200 1 -03}
{2718237600 -10800 0 -03}
{2740618800 -7200 1 -03}
{2749687200 -10800 0 -03}
{2772068400 -7200 1 -03}
{2781136800 -10800 0 -03}
{2803518000 -7200 1 -03}
{2812586400 -10800 0 -03}
{2834967600 -7200 1 -03}
{2844036000 -10800 0 -03}
{2867022000 -7200 1 -03}
{2876090400 -10800 0 -03}
{2898471600 -7200 1 -03}
{2907540000 -10800 0 -03}
{2929921200 -7200 1 -03}
{2938989600 -10800 0 -03}
{2961370800 -7200 1 -03}
{2970439200 -10800 0 -03}
{2992820400 -7200 1 -03}
{3001888800 -10800 0 -03}
{3024270000 -7200 1 -03}
{3033943200 -10800 0 -03}
{3056324400 -7200 1 -03}
{3065392800 -10800 0 -03}
{3087774000 -7200 1 -03}
{3096842400 -10800 0 -03}
{3119223600 -7200 1 -03}
{3128292000 -10800 0 -03}
{3150673200 -7200 1 -03}
{3159741600 -10800 0 -03}
{3182122800 -7200 1 -03}
{3191191200 -10800 0 -03}
{3213572400 -7200 1 -03}
{3223245600 -10800 0 -03}
{3245626800 -7200 1 -03}
{3254695200 -10800 0 -03}
{3277076400 -7200 1 -03}
{3286144800 -10800 0 -03}
{3308526000 -7200 1 -03}
{3317594400 -10800 0 -03}
{3339975600 -7200 1 -03}
{3349044000 -10800 0 -03}
{3371425200 -7200 1 -03}
{3381098400 -10800 0 -03}
{3403479600 -7200 1 -03}
{3412548000 -10800 0 -03}
{3434929200 -7200 1 -03}
{3443997600 -10800 0 -03}
{3466378800 -7200 1 -03}
{3475447200 -10800 0 -03}
{3497828400 -7200 1 -03}
{3506896800 -10800 0 -03}
{3529278000 -7200 1 -03}
{3538346400 -10800 0 -03}
{3560727600 -7200 1 -03}
{3570400800 -10800 0 -03}
{3592782000 -7200 1 -03}
{3601850400 -10800 0 -03}
{3624231600 -7200 1 -03}
{3633300000 -10800 0 -03}
{3655681200 -7200 1 -03}
{3664749600 -10800 0 -03}
{3687130800 -7200 1 -03}
{3696199200 -10800 0 -03}
{3718580400 -7200 1 -03}
{3727648800 -10800 0 -03}
{3750634800 -7200 1 -03}
{3759703200 -10800 0 -03}
{3782084400 -7200 1 -03}
{3791152800 -10800 0 -03}
{3813534000 -7200 1 -03}
{3822602400 -10800 0 -03}
{3844983600 -7200 1 -03}
{3854052000 -10800 0 -03}
{3876433200 -7200 1 -03}
{3885501600 -10800 0 -03}
{3907882800 -7200 1 -03}
{3917556000 -10800 0 -03}
{3939937200 -7200 1 -03}
{3949005600 -10800 0 -03}
{3971386800 -7200 1 -03}
{3980455200 -10800 0 -03}
{4002836400 -7200 1 -03}
{4011904800 -10800 0 -03}
{4034286000 -7200 1 -03}
{4043354400 -10800 0 -03}
{4065735600 -7200 1 -03}
{4074804000 -10800 0 -03}
{4097185200 -7200 1 -03}
}

View File

@@ -9,7 +9,7 @@ set TZData(:America/Vancouver) {
{-769395600 -25200 1 PPT}
{-765385200 -28800 0 PST}
{-747237600 -25200 1 PDT}
{-732726000 -28800 0 PST}
{-733935600 -28800 0 PST}
{-715788000 -25200 1 PDT}
{-702486000 -28800 0 PST}
{-684338400 -25200 1 PDT}

View File

@@ -40,6 +40,10 @@ set TZData(:Asia/Gaza) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
{334015200 10800 1 IDT}
{337644000 7200 0 IST}
{452556000 10800 1 IDT}
{462232800 7200 0 IST}
{482277600 10800 1 IDT}
{495579600 7200 0 IST}
{516751200 10800 1 IDT}
@@ -113,166 +117,166 @@ set TZData(:Asia/Gaza) {
{1509141600 7200 0 EET}
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
{1553295600 10800 1 EEST}
{1553810400 10800 1 EEST}
{1572040800 7200 0 EET}
{1585350000 10800 1 EEST}
{1585260000 10800 1 EEST}
{1604095200 7200 0 EET}
{1616799600 10800 1 EEST}
{1616709600 10800 1 EEST}
{1635544800 7200 0 EET}
{1648249200 10800 1 EEST}
{1648159200 10800 1 EEST}
{1666994400 7200 0 EET}
{1679698800 10800 1 EEST}
{1680213600 10800 1 EEST}
{1698444000 7200 0 EET}
{1711148400 10800 1 EEST}
{1711663200 10800 1 EEST}
{1729893600 7200 0 EET}
{1742598000 10800 1 EEST}
{1743112800 10800 1 EEST}
{1761343200 7200 0 EET}
{1774652400 10800 1 EEST}
{1774562400 10800 1 EEST}
{1793397600 7200 0 EET}
{1806102000 10800 1 EEST}
{1806012000 10800 1 EEST}
{1824847200 7200 0 EET}
{1837551600 10800 1 EEST}
{1838066400 10800 1 EEST}
{1856296800 7200 0 EET}
{1869001200 10800 1 EEST}
{1869516000 10800 1 EEST}
{1887746400 7200 0 EET}
{1900450800 10800 1 EEST}
{1900965600 10800 1 EEST}
{1919196000 7200 0 EET}
{1931900400 10800 1 EEST}
{1932415200 10800 1 EEST}
{1950645600 7200 0 EET}
{1963954800 10800 1 EEST}
{1963864800 10800 1 EEST}
{1982700000 7200 0 EET}
{1995404400 10800 1 EEST}
{1995314400 10800 1 EEST}
{2014149600 7200 0 EET}
{2026854000 10800 1 EEST}
{2027368800 10800 1 EEST}
{2045599200 7200 0 EET}
{2058303600 10800 1 EEST}
{2058818400 10800 1 EEST}
{2077048800 7200 0 EET}
{2089753200 10800 1 EEST}
{2090268000 10800 1 EEST}
{2108498400 7200 0 EET}
{2121807600 10800 1 EEST}
{2121717600 10800 1 EEST}
{2140552800 7200 0 EET}
{2153257200 10800 1 EEST}
{2153167200 10800 1 EEST}
{2172002400 7200 0 EET}
{2184706800 10800 1 EEST}
{2184616800 10800 1 EEST}
{2203452000 7200 0 EET}
{2216156400 10800 1 EEST}
{2216671200 10800 1 EEST}
{2234901600 7200 0 EET}
{2247606000 10800 1 EEST}
{2248120800 10800 1 EEST}
{2266351200 7200 0 EET}
{2279055600 10800 1 EEST}
{2279570400 10800 1 EEST}
{2297800800 7200 0 EET}
{2311110000 10800 1 EEST}
{2311020000 10800 1 EEST}
{2329855200 7200 0 EET}
{2342559600 10800 1 EEST}
{2342469600 10800 1 EEST}
{2361304800 7200 0 EET}
{2374009200 10800 1 EEST}
{2374524000 10800 1 EEST}
{2392754400 7200 0 EET}
{2405458800 10800 1 EEST}
{2405973600 10800 1 EEST}
{2424204000 7200 0 EET}
{2436908400 10800 1 EEST}
{2437423200 10800 1 EEST}
{2455653600 7200 0 EET}
{2468962800 10800 1 EEST}
{2468872800 10800 1 EEST}
{2487708000 7200 0 EET}
{2500412400 10800 1 EEST}
{2500322400 10800 1 EEST}
{2519157600 7200 0 EET}
{2531862000 10800 1 EEST}
{2531772000 10800 1 EEST}
{2550607200 7200 0 EET}
{2563311600 10800 1 EEST}
{2563826400 10800 1 EEST}
{2582056800 7200 0 EET}
{2594761200 10800 1 EEST}
{2595276000 10800 1 EEST}
{2613506400 7200 0 EET}
{2626210800 10800 1 EEST}
{2626725600 10800 1 EEST}
{2644956000 7200 0 EET}
{2658265200 10800 1 EEST}
{2658175200 10800 1 EEST}
{2677010400 7200 0 EET}
{2689714800 10800 1 EEST}
{2689624800 10800 1 EEST}
{2708460000 7200 0 EET}
{2721164400 10800 1 EEST}
{2721679200 10800 1 EEST}
{2739909600 7200 0 EET}
{2752614000 10800 1 EEST}
{2753128800 10800 1 EEST}
{2771359200 7200 0 EET}
{2784063600 10800 1 EEST}
{2784578400 10800 1 EEST}
{2802808800 7200 0 EET}
{2815513200 10800 1 EEST}
{2816028000 10800 1 EEST}
{2834258400 7200 0 EET}
{2847567600 10800 1 EEST}
{2847477600 10800 1 EEST}
{2866312800 7200 0 EET}
{2879017200 10800 1 EEST}
{2878927200 10800 1 EEST}
{2897762400 7200 0 EET}
{2910466800 10800 1 EEST}
{2910981600 10800 1 EEST}
{2929212000 7200 0 EET}
{2941916400 10800 1 EEST}
{2942431200 10800 1 EEST}
{2960661600 7200 0 EET}
{2973366000 10800 1 EEST}
{2973880800 10800 1 EEST}
{2992111200 7200 0 EET}
{3005420400 10800 1 EEST}
{3005330400 10800 1 EEST}
{3024165600 7200 0 EET}
{3036870000 10800 1 EEST}
{3036780000 10800 1 EEST}
{3055615200 7200 0 EET}
{3068319600 10800 1 EEST}
{3068229600 10800 1 EEST}
{3087064800 7200 0 EET}
{3099769200 10800 1 EEST}
{3100284000 10800 1 EEST}
{3118514400 7200 0 EET}
{3131218800 10800 1 EEST}
{3131733600 10800 1 EEST}
{3149964000 7200 0 EET}
{3162668400 10800 1 EEST}
{3163183200 10800 1 EEST}
{3181413600 7200 0 EET}
{3194722800 10800 1 EEST}
{3194632800 10800 1 EEST}
{3213468000 7200 0 EET}
{3226172400 10800 1 EEST}
{3226082400 10800 1 EEST}
{3244917600 7200 0 EET}
{3257622000 10800 1 EEST}
{3258136800 10800 1 EEST}
{3276367200 7200 0 EET}
{3289071600 10800 1 EEST}
{3289586400 10800 1 EEST}
{3307816800 7200 0 EET}
{3320521200 10800 1 EEST}
{3321036000 10800 1 EEST}
{3339266400 7200 0 EET}
{3352575600 10800 1 EEST}
{3352485600 10800 1 EEST}
{3371320800 7200 0 EET}
{3384025200 10800 1 EEST}
{3383935200 10800 1 EEST}
{3402770400 7200 0 EET}
{3415474800 10800 1 EEST}
{3415384800 10800 1 EEST}
{3434220000 7200 0 EET}
{3446924400 10800 1 EEST}
{3447439200 10800 1 EEST}
{3465669600 7200 0 EET}
{3478374000 10800 1 EEST}
{3478888800 10800 1 EEST}
{3497119200 7200 0 EET}
{3509823600 10800 1 EEST}
{3510338400 10800 1 EEST}
{3528568800 7200 0 EET}
{3541878000 10800 1 EEST}
{3541788000 10800 1 EEST}
{3560623200 7200 0 EET}
{3573327600 10800 1 EEST}
{3573237600 10800 1 EEST}
{3592072800 7200 0 EET}
{3604777200 10800 1 EEST}
{3605292000 10800 1 EEST}
{3623522400 7200 0 EET}
{3636226800 10800 1 EEST}
{3636741600 10800 1 EEST}
{3654972000 7200 0 EET}
{3667676400 10800 1 EEST}
{3668191200 10800 1 EEST}
{3686421600 7200 0 EET}
{3699126000 10800 1 EEST}
{3699640800 10800 1 EEST}
{3717871200 7200 0 EET}
{3731180400 10800 1 EEST}
{3731090400 10800 1 EEST}
{3749925600 7200 0 EET}
{3762630000 10800 1 EEST}
{3762540000 10800 1 EEST}
{3781375200 7200 0 EET}
{3794079600 10800 1 EEST}
{3794594400 10800 1 EEST}
{3812824800 7200 0 EET}
{3825529200 10800 1 EEST}
{3826044000 10800 1 EEST}
{3844274400 7200 0 EET}
{3856978800 10800 1 EEST}
{3857493600 10800 1 EEST}
{3875724000 7200 0 EET}
{3889033200 10800 1 EEST}
{3888943200 10800 1 EEST}
{3907778400 7200 0 EET}
{3920482800 10800 1 EEST}
{3920392800 10800 1 EEST}
{3939228000 7200 0 EET}
{3951932400 10800 1 EEST}
{3951842400 10800 1 EEST}
{3970677600 7200 0 EET}
{3983382000 10800 1 EEST}
{3983896800 10800 1 EEST}
{4002127200 7200 0 EET}
{4014831600 10800 1 EEST}
{4015346400 10800 1 EEST}
{4033576800 7200 0 EET}
{4046281200 10800 1 EEST}
{4046796000 10800 1 EEST}
{4065026400 7200 0 EET}
{4078335600 10800 1 EEST}
{4078245600 10800 1 EEST}
{4097080800 7200 0 EET}
}

View File

@@ -40,6 +40,10 @@ set TZData(:Asia/Hebron) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
{334015200 10800 1 IDT}
{337644000 7200 0 IST}
{452556000 10800 1 IDT}
{462232800 7200 0 IST}
{482277600 10800 1 IDT}
{495579600 7200 0 IST}
{516751200 10800 1 IDT}
@@ -112,166 +116,166 @@ set TZData(:Asia/Hebron) {
{1509141600 7200 0 EET}
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
{1553295600 10800 1 EEST}
{1553810400 10800 1 EEST}
{1572040800 7200 0 EET}
{1585350000 10800 1 EEST}
{1585260000 10800 1 EEST}
{1604095200 7200 0 EET}
{1616799600 10800 1 EEST}
{1616709600 10800 1 EEST}
{1635544800 7200 0 EET}
{1648249200 10800 1 EEST}
{1648159200 10800 1 EEST}
{1666994400 7200 0 EET}
{1679698800 10800 1 EEST}
{1680213600 10800 1 EEST}
{1698444000 7200 0 EET}
{1711148400 10800 1 EEST}
{1711663200 10800 1 EEST}
{1729893600 7200 0 EET}
{1742598000 10800 1 EEST}
{1743112800 10800 1 EEST}
{1761343200 7200 0 EET}
{1774652400 10800 1 EEST}
{1774562400 10800 1 EEST}
{1793397600 7200 0 EET}
{1806102000 10800 1 EEST}
{1806012000 10800 1 EEST}
{1824847200 7200 0 EET}
{1837551600 10800 1 EEST}
{1838066400 10800 1 EEST}
{1856296800 7200 0 EET}
{1869001200 10800 1 EEST}
{1869516000 10800 1 EEST}
{1887746400 7200 0 EET}
{1900450800 10800 1 EEST}
{1900965600 10800 1 EEST}
{1919196000 7200 0 EET}
{1931900400 10800 1 EEST}
{1932415200 10800 1 EEST}
{1950645600 7200 0 EET}
{1963954800 10800 1 EEST}
{1963864800 10800 1 EEST}
{1982700000 7200 0 EET}
{1995404400 10800 1 EEST}
{1995314400 10800 1 EEST}
{2014149600 7200 0 EET}
{2026854000 10800 1 EEST}
{2027368800 10800 1 EEST}
{2045599200 7200 0 EET}
{2058303600 10800 1 EEST}
{2058818400 10800 1 EEST}
{2077048800 7200 0 EET}
{2089753200 10800 1 EEST}
{2090268000 10800 1 EEST}
{2108498400 7200 0 EET}
{2121807600 10800 1 EEST}
{2121717600 10800 1 EEST}
{2140552800 7200 0 EET}
{2153257200 10800 1 EEST}
{2153167200 10800 1 EEST}
{2172002400 7200 0 EET}
{2184706800 10800 1 EEST}
{2184616800 10800 1 EEST}
{2203452000 7200 0 EET}
{2216156400 10800 1 EEST}
{2216671200 10800 1 EEST}
{2234901600 7200 0 EET}
{2247606000 10800 1 EEST}
{2248120800 10800 1 EEST}
{2266351200 7200 0 EET}
{2279055600 10800 1 EEST}
{2279570400 10800 1 EEST}
{2297800800 7200 0 EET}
{2311110000 10800 1 EEST}
{2311020000 10800 1 EEST}
{2329855200 7200 0 EET}
{2342559600 10800 1 EEST}
{2342469600 10800 1 EEST}
{2361304800 7200 0 EET}
{2374009200 10800 1 EEST}
{2374524000 10800 1 EEST}
{2392754400 7200 0 EET}
{2405458800 10800 1 EEST}
{2405973600 10800 1 EEST}
{2424204000 7200 0 EET}
{2436908400 10800 1 EEST}
{2437423200 10800 1 EEST}
{2455653600 7200 0 EET}
{2468962800 10800 1 EEST}
{2468872800 10800 1 EEST}
{2487708000 7200 0 EET}
{2500412400 10800 1 EEST}
{2500322400 10800 1 EEST}
{2519157600 7200 0 EET}
{2531862000 10800 1 EEST}
{2531772000 10800 1 EEST}
{2550607200 7200 0 EET}
{2563311600 10800 1 EEST}
{2563826400 10800 1 EEST}
{2582056800 7200 0 EET}
{2594761200 10800 1 EEST}
{2595276000 10800 1 EEST}
{2613506400 7200 0 EET}
{2626210800 10800 1 EEST}
{2626725600 10800 1 EEST}
{2644956000 7200 0 EET}
{2658265200 10800 1 EEST}
{2658175200 10800 1 EEST}
{2677010400 7200 0 EET}
{2689714800 10800 1 EEST}
{2689624800 10800 1 EEST}
{2708460000 7200 0 EET}
{2721164400 10800 1 EEST}
{2721679200 10800 1 EEST}
{2739909600 7200 0 EET}
{2752614000 10800 1 EEST}
{2753128800 10800 1 EEST}
{2771359200 7200 0 EET}
{2784063600 10800 1 EEST}
{2784578400 10800 1 EEST}
{2802808800 7200 0 EET}
{2815513200 10800 1 EEST}
{2816028000 10800 1 EEST}
{2834258400 7200 0 EET}
{2847567600 10800 1 EEST}
{2847477600 10800 1 EEST}
{2866312800 7200 0 EET}
{2879017200 10800 1 EEST}
{2878927200 10800 1 EEST}
{2897762400 7200 0 EET}
{2910466800 10800 1 EEST}
{2910981600 10800 1 EEST}
{2929212000 7200 0 EET}
{2941916400 10800 1 EEST}
{2942431200 10800 1 EEST}
{2960661600 7200 0 EET}
{2973366000 10800 1 EEST}
{2973880800 10800 1 EEST}
{2992111200 7200 0 EET}
{3005420400 10800 1 EEST}
{3005330400 10800 1 EEST}
{3024165600 7200 0 EET}
{3036870000 10800 1 EEST}
{3036780000 10800 1 EEST}
{3055615200 7200 0 EET}
{3068319600 10800 1 EEST}
{3068229600 10800 1 EEST}
{3087064800 7200 0 EET}
{3099769200 10800 1 EEST}
{3100284000 10800 1 EEST}
{3118514400 7200 0 EET}
{3131218800 10800 1 EEST}
{3131733600 10800 1 EEST}
{3149964000 7200 0 EET}
{3162668400 10800 1 EEST}
{3163183200 10800 1 EEST}
{3181413600 7200 0 EET}
{3194722800 10800 1 EEST}
{3194632800 10800 1 EEST}
{3213468000 7200 0 EET}
{3226172400 10800 1 EEST}
{3226082400 10800 1 EEST}
{3244917600 7200 0 EET}
{3257622000 10800 1 EEST}
{3258136800 10800 1 EEST}
{3276367200 7200 0 EET}
{3289071600 10800 1 EEST}
{3289586400 10800 1 EEST}
{3307816800 7200 0 EET}
{3320521200 10800 1 EEST}
{3321036000 10800 1 EEST}
{3339266400 7200 0 EET}
{3352575600 10800 1 EEST}
{3352485600 10800 1 EEST}
{3371320800 7200 0 EET}
{3384025200 10800 1 EEST}
{3383935200 10800 1 EEST}
{3402770400 7200 0 EET}
{3415474800 10800 1 EEST}
{3415384800 10800 1 EEST}
{3434220000 7200 0 EET}
{3446924400 10800 1 EEST}
{3447439200 10800 1 EEST}
{3465669600 7200 0 EET}
{3478374000 10800 1 EEST}
{3478888800 10800 1 EEST}
{3497119200 7200 0 EET}
{3509823600 10800 1 EEST}
{3510338400 10800 1 EEST}
{3528568800 7200 0 EET}
{3541878000 10800 1 EEST}
{3541788000 10800 1 EEST}
{3560623200 7200 0 EET}
{3573327600 10800 1 EEST}
{3573237600 10800 1 EEST}
{3592072800 7200 0 EET}
{3604777200 10800 1 EEST}
{3605292000 10800 1 EEST}
{3623522400 7200 0 EET}
{3636226800 10800 1 EEST}
{3636741600 10800 1 EEST}
{3654972000 7200 0 EET}
{3667676400 10800 1 EEST}
{3668191200 10800 1 EEST}
{3686421600 7200 0 EET}
{3699126000 10800 1 EEST}
{3699640800 10800 1 EEST}
{3717871200 7200 0 EET}
{3731180400 10800 1 EEST}
{3731090400 10800 1 EEST}
{3749925600 7200 0 EET}
{3762630000 10800 1 EEST}
{3762540000 10800 1 EEST}
{3781375200 7200 0 EET}
{3794079600 10800 1 EEST}
{3794594400 10800 1 EEST}
{3812824800 7200 0 EET}
{3825529200 10800 1 EEST}
{3826044000 10800 1 EEST}
{3844274400 7200 0 EET}
{3856978800 10800 1 EEST}
{3857493600 10800 1 EEST}
{3875724000 7200 0 EET}
{3889033200 10800 1 EEST}
{3888943200 10800 1 EEST}
{3907778400 7200 0 EET}
{3920482800 10800 1 EEST}
{3920392800 10800 1 EEST}
{3939228000 7200 0 EET}
{3951932400 10800 1 EEST}
{3951842400 10800 1 EEST}
{3970677600 7200 0 EET}
{3983382000 10800 1 EEST}
{3983896800 10800 1 EEST}
{4002127200 7200 0 EET}
{4014831600 10800 1 EEST}
{4015346400 10800 1 EEST}
{4033576800 7200 0 EET}
{4046281200 10800 1 EEST}
{4046796000 10800 1 EEST}
{4065026400 7200 0 EET}
{4078335600 10800 1 EEST}
{4078245600 10800 1 EEST}
{4097080800 7200 0 EET}
}

View File

@@ -2,25 +2,25 @@
set TZData(:Asia/Hong_Kong) {
{-9223372036854775808 27402 0 LMT}
{-2056693002 28800 0 HKT}
{-907389000 32400 1 HKST}
{-891667800 28800 0 HKT}
{-884246400 32400 0 JST}
{-766746000 28800 0 HKT}
{-747981000 32400 1 HKST}
{-728544600 28800 0 HKT}
{-2056690800 28800 0 HKT}
{-900910800 32400 1 HKST}
{-891579600 30600 1 HKWT}
{-884248200 32400 0 JST}
{-761209200 28800 0 HKT}
{-747907200 32400 1 HKST}
{-728541000 28800 0 HKT}
{-717049800 32400 1 HKST}
{-694503000 28800 0 HKT}
{-697091400 28800 0 HKT}
{-683785800 32400 1 HKST}
{-668064600 28800 0 HKT}
{-668061000 28800 0 HKT}
{-654755400 32400 1 HKST}
{-636615000 28800 0 HKT}
{-636611400 28800 0 HKT}
{-623305800 32400 1 HKST}
{-605165400 28800 0 HKT}
{-605161800 28800 0 HKT}
{-591856200 32400 1 HKST}
{-573715800 28800 0 HKT}
{-573712200 28800 0 HKT}
{-559801800 32400 1 HKST}
{-542352600 28800 0 HKT}
{-541657800 28800 0 HKT}
{-528352200 32400 1 HKST}
{-510211800 28800 0 HKT}
{-498112200 32400 1 HKST}

View File

@@ -39,6 +39,10 @@ set TZData(:Asia/Jerusalem) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
{334015200 10800 1 IDT}
{337644000 7200 0 IST}
{452556000 10800 1 IDT}
{462232800 7200 0 IST}
{482277600 10800 1 IDT}
{495579600 7200 0 IST}
{516751200 10800 1 IDT}

View File

@@ -0,0 +1,58 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Asia/Qostanay) {
{-9223372036854775808 15268 0 LMT}
{-1441167268 14400 0 +04}
{-1247544000 18000 0 +05}
{354913200 21600 1 +06}
{370720800 21600 0 +06}
{386445600 18000 0 +05}
{386449200 21600 1 +05}
{402256800 18000 0 +05}
{417985200 21600 1 +05}
{433792800 18000 0 +05}
{449607600 21600 1 +05}
{465339600 18000 0 +05}
{481064400 21600 1 +05}
{496789200 18000 0 +05}
{512514000 21600 1 +05}
{528238800 18000 0 +05}
{543963600 21600 1 +05}
{559688400 18000 0 +05}
{575413200 21600 1 +05}
{591138000 18000 0 +05}
{606862800 21600 1 +05}
{622587600 18000 0 +05}
{638312400 21600 1 +05}
{654642000 18000 0 +05}
{670366800 14400 0 +04}
{670370400 18000 1 +04}
{686095200 14400 0 +04}
{695772000 18000 0 +05}
{701816400 21600 1 +05}
{717541200 18000 0 +05}
{733266000 21600 1 +05}
{748990800 18000 0 +05}
{764715600 21600 1 +05}
{780440400 18000 0 +05}
{796165200 21600 1 +05}
{811890000 18000 0 +05}
{828219600 21600 1 +05}
{846363600 18000 0 +05}
{859669200 21600 1 +05}
{877813200 18000 0 +05}
{891118800 21600 1 +05}
{909262800 18000 0 +05}
{922568400 21600 1 +05}
{941317200 18000 0 +05}
{954018000 21600 1 +05}
{972766800 18000 0 +05}
{985467600 21600 1 +05}
{1004216400 18000 0 +05}
{1017522000 21600 1 +05}
{1035666000 18000 0 +05}
{1048971600 21600 1 +05}
{1067115600 18000 0 +05}
{1080421200 21600 1 +05}
{1099170000 21600 0 +06}
}

View File

@@ -54,4 +54,5 @@ set TZData(:Asia/Qyzylorda) {
{1067115600 18000 0 +05}
{1080421200 21600 1 +05}
{1099170000 21600 0 +06}
{1545328800 18000 0 +05}
}

View File

@@ -5,6 +5,14 @@ set TZData(:Asia/Seoul) {
{-1948782472 30600 0 KST}
{-1830414600 32400 0 JST}
{-767350800 32400 0 KST}
{-681210000 36000 1 KDT}
{-672228000 32400 0 KST}
{-654771600 36000 1 KDT}
{-640864800 32400 0 KST}
{-623408400 36000 1 KDT}
{-609415200 32400 0 KST}
{-588848400 36000 1 KDT}
{-577965600 32400 0 KST}
{-498128400 30600 0 KST}
{-462702600 34200 1 KDT}
{-451733400 30600 0 KST}

View File

@@ -102,106 +102,106 @@ set TZData(:Asia/Tehran) {
{2105551800 12600 0 +0330}
{2121193800 16200 1 +0330}
{2137087800 12600 0 +0330}
{2152729800 16200 1 +0330}
{2168623800 12600 0 +0330}
{2184265800 16200 1 +0330}
{2200159800 12600 0 +0330}
{2152816200 16200 1 +0330}
{2168710200 12600 0 +0330}
{2184352200 16200 1 +0330}
{2200246200 12600 0 +0330}
{2215888200 16200 1 +0330}
{2231782200 12600 0 +0330}
{2247424200 16200 1 +0330}
{2263318200 12600 0 +0330}
{2278960200 16200 1 +0330}
{2294854200 12600 0 +0330}
{2310496200 16200 1 +0330}
{2326390200 12600 0 +0330}
{2279046600 16200 1 +0330}
{2294940600 12600 0 +0330}
{2310582600 16200 1 +0330}
{2326476600 12600 0 +0330}
{2342118600 16200 1 +0330}
{2358012600 12600 0 +0330}
{2373654600 16200 1 +0330}
{2389548600 12600 0 +0330}
{2405190600 16200 1 +0330}
{2421084600 12600 0 +0330}
{2436726600 16200 1 +0330}
{2452620600 12600 0 +0330}
{2405277000 16200 1 +0330}
{2421171000 12600 0 +0330}
{2436813000 16200 1 +0330}
{2452707000 12600 0 +0330}
{2468349000 16200 1 +0330}
{2484243000 12600 0 +0330}
{2499885000 16200 1 +0330}
{2515779000 12600 0 +0330}
{2531421000 16200 1 +0330}
{2547315000 12600 0 +0330}
{2562957000 16200 1 +0330}
{2578851000 12600 0 +0330}
{2531507400 16200 1 +0330}
{2547401400 12600 0 +0330}
{2563043400 16200 1 +0330}
{2578937400 12600 0 +0330}
{2594579400 16200 1 +0330}
{2610473400 12600 0 +0330}
{2626115400 16200 1 +0330}
{2642009400 12600 0 +0330}
{2657651400 16200 1 +0330}
{2673545400 12600 0 +0330}
{2689187400 16200 1 +0330}
{2705081400 12600 0 +0330}
{2657737800 16200 1 +0330}
{2673631800 12600 0 +0330}
{2689273800 16200 1 +0330}
{2705167800 12600 0 +0330}
{2720809800 16200 1 +0330}
{2736703800 12600 0 +0330}
{2752345800 16200 1 +0330}
{2768239800 12600 0 +0330}
{2783881800 16200 1 +0330}
{2799775800 12600 0 +0330}
{2815417800 16200 1 +0330}
{2831311800 12600 0 +0330}
{2783968200 16200 1 +0330}
{2799862200 12600 0 +0330}
{2815504200 16200 1 +0330}
{2831398200 12600 0 +0330}
{2847040200 16200 1 +0330}
{2862934200 12600 0 +0330}
{2878576200 16200 1 +0330}
{2894470200 12600 0 +0330}
{2910112200 16200 1 +0330}
{2926006200 12600 0 +0330}
{2941648200 16200 1 +0330}
{2957542200 12600 0 +0330}
{2941734600 16200 1 +0330}
{2957628600 12600 0 +0330}
{2973270600 16200 1 +0330}
{2989164600 12600 0 +0330}
{3004806600 16200 1 +0330}
{3020700600 12600 0 +0330}
{3036342600 16200 1 +0330}
{3052236600 12600 0 +0330}
{3067878600 16200 1 +0330}
{3083772600 12600 0 +0330}
{3067965000 16200 1 +0330}
{3083859000 12600 0 +0330}
{3099501000 16200 1 +0330}
{3115395000 12600 0 +0330}
{3131037000 16200 1 +0330}
{3146931000 12600 0 +0330}
{3162573000 16200 1 +0330}
{3178467000 12600 0 +0330}
{3194109000 16200 1 +0330}
{3210003000 12600 0 +0330}
{3194195400 16200 1 +0330}
{3210089400 12600 0 +0330}
{3225731400 16200 1 +0330}
{3241625400 12600 0 +0330}
{3257267400 16200 1 +0330}
{3273161400 12600 0 +0330}
{3288803400 16200 1 +0330}
{3304697400 12600 0 +0330}
{3320339400 16200 1 +0330}
{3336233400 12600 0 +0330}
{3320425800 16200 1 +0330}
{3336319800 12600 0 +0330}
{3351961800 16200 1 +0330}
{3367855800 12600 0 +0330}
{3383497800 16200 1 +0330}
{3399391800 12600 0 +0330}
{3415033800 16200 1 +0330}
{3430927800 12600 0 +0330}
{3446569800 16200 1 +0330}
{3462463800 12600 0 +0330}
{3446656200 16200 1 +0330}
{3462550200 12600 0 +0330}
{3478192200 16200 1 +0330}
{3494086200 12600 0 +0330}
{3509728200 16200 1 +0330}
{3525622200 12600 0 +0330}
{3541264200 16200 1 +0330}
{3557158200 12600 0 +0330}
{3572800200 16200 1 +0330}
{3588694200 12600 0 +0330}
{3572886600 16200 1 +0330}
{3588780600 12600 0 +0330}
{3604422600 16200 1 +0330}
{3620316600 12600 0 +0330}
{3635958600 16200 1 +0330}
{3651852600 12600 0 +0330}
{3667494600 16200 1 +0330}
{3683388600 12600 0 +0330}
{3699030600 16200 1 +0330}
{3714924600 12600 0 +0330}
{3699117000 16200 1 +0330}
{3715011000 12600 0 +0330}
{3730653000 16200 1 +0330}
{3746547000 12600 0 +0330}
{3762189000 16200 1 +0330}

View File

@@ -1,5 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Etc/UCT) {
{-9223372036854775808 0 0 UCT}
if {![info exists TZData(Etc/UTC)]} {
LoadTimeZoneFile Etc/UTC
}
set TZData(:Etc/UCT) $TZData(:Etc/UTC)

View File

@@ -3,7 +3,7 @@
set TZData(:Europe/Brussels) {
{-9223372036854775808 1050 0 LMT}
{-2840141850 1050 0 BMT}
{-2450953050 0 0 WET}
{-2450995200 0 0 WET}
{-1740355200 3600 0 CET}
{-1693702800 7200 0 CEST}
{-1680483600 3600 0 CET}

View File

@@ -16,13 +16,11 @@ set TZData(:Europe/Istanbul) {
{-1428030000 7200 0 EET}
{-1409709600 10800 1 EEST}
{-1396494000 7200 0 EET}
{-931140000 10800 1 EEST}
{-922762800 7200 0 EET}
{-931053600 10800 1 EEST}
{-922676400 7200 0 EET}
{-917834400 10800 1 EEST}
{-892436400 7200 0 EET}
{-875844000 10800 1 EEST}
{-857358000 7200 0 EET}
{-781063200 10800 1 EEST}
{-764737200 7200 0 EET}
{-744343200 10800 1 EEST}
{-733806000 7200 0 EET}
@@ -32,45 +30,32 @@ set TZData(:Europe/Istanbul) {
{-670474800 7200 0 EET}
{-654141600 10800 1 EEST}
{-639025200 7200 0 EET}
{-621828000 10800 1 EEST}
{-622087200 10800 1 EEST}
{-606970800 7200 0 EET}
{-590032800 10800 1 EEST}
{-575434800 7200 0 EET}
{-575521200 7200 0 EET}
{-235620000 10800 1 EEST}
{-228279600 7200 0 EET}
{-194842800 7200 0 EET}
{-177732000 10800 1 EEST}
{-165726000 7200 0 EET}
{10533600 10800 1 EEST}
{23835600 7200 0 EET}
{41983200 10800 1 EEST}
{55285200 7200 0 EET}
{74037600 10800 1 EEST}
{87339600 7200 0 EET}
{107910000 10800 1 EEST}
{121219200 7200 0 EET}
{121215600 7200 0 EET}
{133920000 10800 1 EEST}
{152676000 7200 0 EET}
{165362400 10800 1 EEST}
{183502800 7200 0 EET}
{202428000 10800 1 EEST}
{215557200 7200 0 EET}
{228866400 10800 1 EEST}
{245797200 7200 0 EET}
{260316000 10800 1 EEST}
{277246800 14400 0 +04}
{291769200 14400 1 +04}
{308779200 10800 0 +03}
{323827200 14400 1 +04}
{340228800 10800 0 +03}
{354672000 14400 1 +04}
{371678400 10800 0 +03}
{386121600 14400 1 +04}
{403128000 10800 0 +03}
{428446800 14400 1 +04}
{433886400 10800 0 +03}
{482792400 7200 0 EET}
{482796000 10800 1 EEST}
{496702800 7200 0 EET}
{152665200 7200 0 EET}
{164678400 10800 1 EEST}
{184114800 7200 0 EET}
{196214400 10800 1 EEST}
{215564400 7200 0 EET}
{228873600 10800 1 EEST}
{245804400 7200 0 EET}
{260323200 10800 1 EEST}
{267919200 10800 0 +03}
{277254000 10800 0 +03}
{428454000 14400 1 +04}
{433893600 10800 0 +03}
{468111600 7200 0 EET}
{482799600 10800 1 EEST}
{496710000 7200 0 EET}
{512521200 10800 1 EEST}
{528246000 7200 0 EET}
{543970800 10800 1 EEST}

View File

@@ -15,10 +15,11 @@ set TZData(:Europe/Kaliningrad) {
{-828226800 3600 0 CET}
{-812502000 7200 1 CEST}
{-796777200 3600 0 CET}
{-788922000 7200 0 CET}
{-778730400 10800 1 CEST}
{-762663600 7200 0 CET}
{-757389600 10800 0 MSD}
{-781052400 7200 1 CEST}
{-780368400 7200 0 EET}
{-778730400 10800 1 EEST}
{-762663600 7200 0 EET}
{-749095200 10800 0 MSD}
{354920400 14400 1 MSD}
{370728000 10800 0 MSK}
{386456400 14400 1 MSD}

View File

@@ -2,7 +2,7 @@
set TZData(:Europe/Rome) {
{-9223372036854775808 2996 0 LMT}
{-3259097396 2996 0 RMT}
{-3252098996 2996 0 RMT}
{-2403565200 3600 0 CET}
{-1690765200 7200 1 CEST}
{-1680487200 3600 0 CET}

View File

@@ -22,7 +22,7 @@ set TZData(:Europe/Vienna) {
{-780188400 3600 0 CET}
{-757386000 3600 0 CET}
{-748479600 7200 1 CEST}
{-733359600 3600 0 CET}
{-733273200 3600 0 CET}
{-717634800 7200 1 CEST}
{-701910000 3600 0 CET}
{-684975600 7200 1 CEST}

View File

@@ -1,6 +1,11 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Pacific/Chuuk) {
{-9223372036854775808 36428 0 LMT}
{-9223372036854775808 -49972 0 LMT}
{-3944628428 36428 0 LMT}
{-2177489228 36000 0 +10}
{-1743674400 32400 0 +09}
{-1606813200 36000 0 +10}
{-907408800 32400 0 +09}
{-770634000 36000 0 +10}
}

View File

@@ -27,165 +27,165 @@ set TZData(:Pacific/Fiji) {
{1515852000 43200 0 +12}
{1541253600 46800 1 +12}
{1547301600 43200 0 +12}
{1572703200 46800 1 +12}
{1579356000 43200 0 +12}
{1604152800 46800 1 +12}
{1573308000 46800 1 +12}
{1578751200 43200 0 +12}
{1604757600 46800 1 +12}
{1610805600 43200 0 +12}
{1636207200 46800 1 +12}
{1636812000 46800 1 +12}
{1642255200 43200 0 +12}
{1667656800 46800 1 +12}
{1668261600 46800 1 +12}
{1673704800 43200 0 +12}
{1699106400 46800 1 +12}
{1699711200 46800 1 +12}
{1705154400 43200 0 +12}
{1730556000 46800 1 +12}
{1737208800 43200 0 +12}
{1762005600 46800 1 +12}
{1731160800 46800 1 +12}
{1736604000 43200 0 +12}
{1762610400 46800 1 +12}
{1768658400 43200 0 +12}
{1793455200 46800 1 +12}
{1794060000 46800 1 +12}
{1800108000 43200 0 +12}
{1825509600 46800 1 +12}
{1826114400 46800 1 +12}
{1831557600 43200 0 +12}
{1856959200 46800 1 +12}
{1857564000 46800 1 +12}
{1863007200 43200 0 +12}
{1888408800 46800 1 +12}
{1889013600 46800 1 +12}
{1894456800 43200 0 +12}
{1919858400 46800 1 +12}
{1926511200 43200 0 +12}
{1951308000 46800 1 +12}
{1920463200 46800 1 +12}
{1925906400 43200 0 +12}
{1951912800 46800 1 +12}
{1957960800 43200 0 +12}
{1983362400 46800 1 +12}
{1983967200 46800 1 +12}
{1989410400 43200 0 +12}
{2014812000 46800 1 +12}
{2015416800 46800 1 +12}
{2020860000 43200 0 +12}
{2046261600 46800 1 +12}
{2046866400 46800 1 +12}
{2052309600 43200 0 +12}
{2077711200 46800 1 +12}
{2078316000 46800 1 +12}
{2083759200 43200 0 +12}
{2109160800 46800 1 +12}
{2109765600 46800 1 +12}
{2115813600 43200 0 +12}
{2140610400 46800 1 +12}
{2141215200 46800 1 +12}
{2147263200 43200 0 +12}
{2172664800 46800 1 +12}
{2173269600 46800 1 +12}
{2178712800 43200 0 +12}
{2204114400 46800 1 +12}
{2204719200 46800 1 +12}
{2210162400 43200 0 +12}
{2235564000 46800 1 +12}
{2236168800 46800 1 +12}
{2241612000 43200 0 +12}
{2267013600 46800 1 +12}
{2273666400 43200 0 +12}
{2298463200 46800 1 +12}
{2267618400 46800 1 +12}
{2273061600 43200 0 +12}
{2299068000 46800 1 +12}
{2305116000 43200 0 +12}
{2329912800 46800 1 +12}
{2330517600 46800 1 +12}
{2336565600 43200 0 +12}
{2361967200 46800 1 +12}
{2362572000 46800 1 +12}
{2368015200 43200 0 +12}
{2393416800 46800 1 +12}
{2394021600 46800 1 +12}
{2399464800 43200 0 +12}
{2424866400 46800 1 +12}
{2425471200 46800 1 +12}
{2430914400 43200 0 +12}
{2456316000 46800 1 +12}
{2462968800 43200 0 +12}
{2487765600 46800 1 +12}
{2456920800 46800 1 +12}
{2462364000 43200 0 +12}
{2488370400 46800 1 +12}
{2494418400 43200 0 +12}
{2519820000 46800 1 +12}
{2520424800 46800 1 +12}
{2525868000 43200 0 +12}
{2551269600 46800 1 +12}
{2551874400 46800 1 +12}
{2557317600 43200 0 +12}
{2582719200 46800 1 +12}
{2583324000 46800 1 +12}
{2588767200 43200 0 +12}
{2614168800 46800 1 +12}
{2620821600 43200 0 +12}
{2645618400 46800 1 +12}
{2614773600 46800 1 +12}
{2620216800 43200 0 +12}
{2646223200 46800 1 +12}
{2652271200 43200 0 +12}
{2677068000 46800 1 +12}
{2677672800 46800 1 +12}
{2683720800 43200 0 +12}
{2709122400 46800 1 +12}
{2709727200 46800 1 +12}
{2715170400 43200 0 +12}
{2740572000 46800 1 +12}
{2741176800 46800 1 +12}
{2746620000 43200 0 +12}
{2772021600 46800 1 +12}
{2772626400 46800 1 +12}
{2778069600 43200 0 +12}
{2803471200 46800 1 +12}
{2810124000 43200 0 +12}
{2834920800 46800 1 +12}
{2804076000 46800 1 +12}
{2809519200 43200 0 +12}
{2835525600 46800 1 +12}
{2841573600 43200 0 +12}
{2866975200 46800 1 +12}
{2867580000 46800 1 +12}
{2873023200 43200 0 +12}
{2898424800 46800 1 +12}
{2899029600 46800 1 +12}
{2904472800 43200 0 +12}
{2929874400 46800 1 +12}
{2930479200 46800 1 +12}
{2935922400 43200 0 +12}
{2961324000 46800 1 +12}
{2961928800 46800 1 +12}
{2967372000 43200 0 +12}
{2992773600 46800 1 +12}
{2993378400 46800 1 +12}
{2999426400 43200 0 +12}
{3024223200 46800 1 +12}
{3024828000 46800 1 +12}
{3030876000 43200 0 +12}
{3056277600 46800 1 +12}
{3056882400 46800 1 +12}
{3062325600 43200 0 +12}
{3087727200 46800 1 +12}
{3088332000 46800 1 +12}
{3093775200 43200 0 +12}
{3119176800 46800 1 +12}
{3119781600 46800 1 +12}
{3125224800 43200 0 +12}
{3150626400 46800 1 +12}
{3157279200 43200 0 +12}
{3182076000 46800 1 +12}
{3151231200 46800 1 +12}
{3156674400 43200 0 +12}
{3182680800 46800 1 +12}
{3188728800 43200 0 +12}
{3213525600 46800 1 +12}
{3214130400 46800 1 +12}
{3220178400 43200 0 +12}
{3245580000 46800 1 +12}
{3246184800 46800 1 +12}
{3251628000 43200 0 +12}
{3277029600 46800 1 +12}
{3277634400 46800 1 +12}
{3283077600 43200 0 +12}
{3308479200 46800 1 +12}
{3309084000 46800 1 +12}
{3314527200 43200 0 +12}
{3339928800 46800 1 +12}
{3346581600 43200 0 +12}
{3371378400 46800 1 +12}
{3340533600 46800 1 +12}
{3345976800 43200 0 +12}
{3371983200 46800 1 +12}
{3378031200 43200 0 +12}
{3403432800 46800 1 +12}
{3404037600 46800 1 +12}
{3409480800 43200 0 +12}
{3434882400 46800 1 +12}
{3435487200 46800 1 +12}
{3440930400 43200 0 +12}
{3466332000 46800 1 +12}
{3466936800 46800 1 +12}
{3472380000 43200 0 +12}
{3497781600 46800 1 +12}
{3504434400 43200 0 +12}
{3529231200 46800 1 +12}
{3498386400 46800 1 +12}
{3503829600 43200 0 +12}
{3529836000 46800 1 +12}
{3535884000 43200 0 +12}
{3560680800 46800 1 +12}
{3561285600 46800 1 +12}
{3567333600 43200 0 +12}
{3592735200 46800 1 +12}
{3593340000 46800 1 +12}
{3598783200 43200 0 +12}
{3624184800 46800 1 +12}
{3624789600 46800 1 +12}
{3630232800 43200 0 +12}
{3655634400 46800 1 +12}
{3656239200 46800 1 +12}
{3661682400 43200 0 +12}
{3687084000 46800 1 +12}
{3693736800 43200 0 +12}
{3718533600 46800 1 +12}
{3687688800 46800 1 +12}
{3693132000 43200 0 +12}
{3719138400 46800 1 +12}
{3725186400 43200 0 +12}
{3750588000 46800 1 +12}
{3751192800 46800 1 +12}
{3756636000 43200 0 +12}
{3782037600 46800 1 +12}
{3782642400 46800 1 +12}
{3788085600 43200 0 +12}
{3813487200 46800 1 +12}
{3814092000 46800 1 +12}
{3819535200 43200 0 +12}
{3844936800 46800 1 +12}
{3845541600 46800 1 +12}
{3850984800 43200 0 +12}
{3876386400 46800 1 +12}
{3876991200 46800 1 +12}
{3883039200 43200 0 +12}
{3907836000 46800 1 +12}
{3908440800 46800 1 +12}
{3914488800 43200 0 +12}
{3939890400 46800 1 +12}
{3940495200 46800 1 +12}
{3945938400 43200 0 +12}
{3971340000 46800 1 +12}
{3971944800 46800 1 +12}
{3977388000 43200 0 +12}
{4002789600 46800 1 +12}
{4003394400 46800 1 +12}
{4008837600 43200 0 +12}
{4034239200 46800 1 +12}
{4040892000 43200 0 +12}
{4065688800 46800 1 +12}
{4034844000 46800 1 +12}
{4040287200 43200 0 +12}
{4066293600 46800 1 +12}
{4072341600 43200 0 +12}
{4097138400 46800 1 +12}
{4097743200 46800 1 +12}
}

View File

@@ -4,5 +4,23 @@ set TZData(:Pacific/Guam) {
{-9223372036854775808 -51660 0 LMT}
{-3944626740 34740 0 LMT}
{-2177487540 36000 0 GST}
{-885549600 32400 0 +09}
{-802256400 36000 0 GST}
{-331891200 39600 1 GDT}
{-281610000 36000 0 GST}
{-73728000 39600 1 GDT}
{-29415540 36000 0 GST}
{-16704000 39600 1 GDT}
{-10659600 36000 0 GST}
{9907200 39600 1 GDT}
{21394800 36000 0 GST}
{41356800 39600 1 GDT}
{52844400 36000 0 GST}
{124819200 39600 1 GDT}
{130863600 36000 0 GST}
{201888000 39600 1 GDT}
{209487660 36000 0 GST}
{230659200 39600 1 GDT}
{241542000 36000 0 GST}
{977493600 36000 0 ChST}
}

View File

@@ -1,8 +1,14 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Pacific/Kosrae) {
{-9223372036854775808 39116 0 LMT}
{-9223372036854775808 -47284 0 LMT}
{-3944631116 39116 0 LMT}
{-2177491916 39600 0 +11}
{-1743678000 32400 0 +09}
{-1606813200 39600 0 +11}
{-1041418800 36000 0 +10}
{-907408800 32400 0 +09}
{-770634000 39600 0 +11}
{-7988400 43200 0 +12}
{915105600 39600 0 +11}
}

View File

@@ -3,6 +3,9 @@
set TZData(:Pacific/Kwajalein) {
{-9223372036854775808 40160 0 LMT}
{-2177492960 39600 0 +11}
{-1041418800 36000 0 +10}
{-907408800 32400 0 +09}
{-817462800 39600 0 +11}
{-7988400 -43200 0 -12}
{745848000 43200 0 +12}
{745934400 43200 0 +12}
}

View File

@@ -3,5 +3,10 @@
set TZData(:Pacific/Majuro) {
{-9223372036854775808 41088 0 LMT}
{-2177493888 39600 0 +11}
{-1743678000 32400 0 +09}
{-1606813200 39600 0 +11}
{-1041418800 36000 0 +10}
{-907408800 32400 0 +09}
{-818067600 39600 0 +11}
{-7988400 43200 0 +12}
}

View File

@@ -3,7 +3,7 @@
set TZData(:Pacific/Nauru) {
{-9223372036854775808 40060 0 LMT}
{-1545131260 41400 0 +1130}
{-877347000 32400 0 +09}
{-800960400 41400 0 +1130}
{294323400 43200 0 +12}
{-862918200 32400 0 +09}
{-767350800 41400 0 +1130}
{287418600 43200 0 +12}
}

View File

@@ -5,6 +5,168 @@ set TZData(:Pacific/Norfolk) {
{-2177493112 40320 0 +1112}
{-599656320 41400 0 +1130}
{152029800 45000 1 +1230}
{162912600 41400 0 +1130}
{162916200 41400 0 +1130}
{1443882600 39600 0 +11}
{1561899600 39600 0 +12}
{1570287600 43200 1 +12}
{1586012400 39600 0 +12}
{1601737200 43200 1 +12}
{1617462000 39600 0 +12}
{1633186800 43200 1 +12}
{1648911600 39600 0 +12}
{1664636400 43200 1 +12}
{1680361200 39600 0 +12}
{1696086000 43200 1 +12}
{1712415600 39600 0 +12}
{1728140400 43200 1 +12}
{1743865200 39600 0 +12}
{1759590000 43200 1 +12}
{1775314800 39600 0 +12}
{1791039600 43200 1 +12}
{1806764400 39600 0 +12}
{1822489200 43200 1 +12}
{1838214000 39600 0 +12}
{1853938800 43200 1 +12}
{1869663600 39600 0 +12}
{1885993200 43200 1 +12}
{1901718000 39600 0 +12}
{1917442800 43200 1 +12}
{1933167600 39600 0 +12}
{1948892400 43200 1 +12}
{1964617200 39600 0 +12}
{1980342000 43200 1 +12}
{1996066800 39600 0 +12}
{2011791600 43200 1 +12}
{2027516400 39600 0 +12}
{2043241200 43200 1 +12}
{2058966000 39600 0 +12}
{2075295600 43200 1 +12}
{2091020400 39600 0 +12}
{2106745200 43200 1 +12}
{2122470000 39600 0 +12}
{2138194800 43200 1 +12}
{2153919600 39600 0 +12}
{2169644400 43200 1 +12}
{2185369200 39600 0 +12}
{2201094000 43200 1 +12}
{2216818800 39600 0 +12}
{2233148400 43200 1 +12}
{2248873200 39600 0 +12}
{2264598000 43200 1 +12}
{2280322800 39600 0 +12}
{2296047600 43200 1 +12}
{2311772400 39600 0 +12}
{2327497200 43200 1 +12}
{2343222000 39600 0 +12}
{2358946800 43200 1 +12}
{2374671600 39600 0 +12}
{2390396400 43200 1 +12}
{2406121200 39600 0 +12}
{2422450800 43200 1 +12}
{2438175600 39600 0 +12}
{2453900400 43200 1 +12}
{2469625200 39600 0 +12}
{2485350000 43200 1 +12}
{2501074800 39600 0 +12}
{2516799600 43200 1 +12}
{2532524400 39600 0 +12}
{2548249200 43200 1 +12}
{2563974000 39600 0 +12}
{2579698800 43200 1 +12}
{2596028400 39600 0 +12}
{2611753200 43200 1 +12}
{2627478000 39600 0 +12}
{2643202800 43200 1 +12}
{2658927600 39600 0 +12}
{2674652400 43200 1 +12}
{2690377200 39600 0 +12}
{2706102000 43200 1 +12}
{2721826800 39600 0 +12}
{2737551600 43200 1 +12}
{2753276400 39600 0 +12}
{2769606000 43200 1 +12}
{2785330800 39600 0 +12}
{2801055600 43200 1 +12}
{2816780400 39600 0 +12}
{2832505200 43200 1 +12}
{2848230000 39600 0 +12}
{2863954800 43200 1 +12}
{2879679600 39600 0 +12}
{2895404400 43200 1 +12}
{2911129200 39600 0 +12}
{2926854000 43200 1 +12}
{2942578800 39600 0 +12}
{2958908400 43200 1 +12}
{2974633200 39600 0 +12}
{2990358000 43200 1 +12}
{3006082800 39600 0 +12}
{3021807600 43200 1 +12}
{3037532400 39600 0 +12}
{3053257200 43200 1 +12}
{3068982000 39600 0 +12}
{3084706800 43200 1 +12}
{3100431600 39600 0 +12}
{3116761200 43200 1 +12}
{3132486000 39600 0 +12}
{3148210800 43200 1 +12}
{3163935600 39600 0 +12}
{3179660400 43200 1 +12}
{3195385200 39600 0 +12}
{3211110000 43200 1 +12}
{3226834800 39600 0 +12}
{3242559600 43200 1 +12}
{3258284400 39600 0 +12}
{3274009200 43200 1 +12}
{3289734000 39600 0 +12}
{3306063600 43200 1 +12}
{3321788400 39600 0 +12}
{3337513200 43200 1 +12}
{3353238000 39600 0 +12}
{3368962800 43200 1 +12}
{3384687600 39600 0 +12}
{3400412400 43200 1 +12}
{3416137200 39600 0 +12}
{3431862000 43200 1 +12}
{3447586800 39600 0 +12}
{3463311600 43200 1 +12}
{3479641200 39600 0 +12}
{3495366000 43200 1 +12}
{3511090800 39600 0 +12}
{3526815600 43200 1 +12}
{3542540400 39600 0 +12}
{3558265200 43200 1 +12}
{3573990000 39600 0 +12}
{3589714800 43200 1 +12}
{3605439600 39600 0 +12}
{3621164400 43200 1 +12}
{3636889200 39600 0 +12}
{3653218800 43200 1 +12}
{3668943600 39600 0 +12}
{3684668400 43200 1 +12}
{3700393200 39600 0 +12}
{3716118000 43200 1 +12}
{3731842800 39600 0 +12}
{3747567600 43200 1 +12}
{3763292400 39600 0 +12}
{3779017200 43200 1 +12}
{3794742000 39600 0 +12}
{3810466800 43200 1 +12}
{3826191600 39600 0 +12}
{3842521200 43200 1 +12}
{3858246000 39600 0 +12}
{3873970800 43200 1 +12}
{3889695600 39600 0 +12}
{3905420400 43200 1 +12}
{3921145200 39600 0 +12}
{3936870000 43200 1 +12}
{3952594800 39600 0 +12}
{3968319600 43200 1 +12}
{3984044400 39600 0 +12}
{4000374000 43200 1 +12}
{4016098800 39600 0 +12}
{4031823600 43200 1 +12}
{4047548400 39600 0 +12}
{4063273200 43200 1 +12}
{4078998000 39600 0 +12}
{4094722800 43200 1 +12}
}

View File

@@ -1,6 +1,7 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Pacific/Palau) {
{-9223372036854775808 32276 0 LMT}
{-9223372036854775808 -54124 0 LMT}
{-3944624276 32276 0 LMT}
{-2177485076 32400 0 +09}
}

View File

@@ -1,6 +1,12 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Pacific/Pohnpei) {
{-9223372036854775808 37972 0 LMT}
{-9223372036854775808 -48428 0 LMT}
{-3944629972 37972 0 LMT}
{-2177490772 39600 0 +11}
{-1743678000 32400 0 +09}
{-1606813200 39600 0 +11}
{-1041418800 36000 0 +10}
{-907408800 32400 0 +09}
{-770634000 39600 0 +11}
}

View File

@@ -1,5 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
if {![info exists TZData(Etc/UCT)]} {
LoadTimeZoneFile Etc/UCT
if {![info exists TZData(Etc/UTC)]} {
LoadTimeZoneFile Etc/UTC
}
set TZData(:UCT) $TZData(:Etc/UCT)
set TZData(:UCT) $TZData(:Etc/UTC)

View File

@@ -22,7 +22,7 @@ namespace eval tcltest {
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the install directory in the Makefiles. When the minor version
# changes (new feature) be sure to update the man page as well.
variable Version 2.5.0
variable Version 2.5.1
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
@@ -3072,7 +3072,12 @@ proc tcltest::removeFile {name {directory ""}} {
Warn "removeFile removing \"$fullName\":\n not a file"
}
}
return [file delete -- $fullName]
if {[catch {file delete -- $fullName} msg ]} {
DebugDo 1 {
Warn "removeFile removing \"$fullName\":\n failed: $msg"
}
}
return
}
# tcltest::makeDirectory --

View File

@@ -11,7 +11,7 @@
package require Tcl 8.6-
# Keep this in sync with pkgIndex.tcl and with the install directories in
# Makefiles
package provide http 2.9.0
package provide http 2.9.1
namespace eval http {
# Allow resourcing to not clobber existing data
@@ -2978,7 +2978,7 @@ proc http::IsBinaryContentType {type} {
# and so on.
if {$major eq "application"} {
set minor [string trimright $minor]
if {$minor in {"xml" "xml-external-parsed-entity" "xml-dtd"}} {
if {$minor in {"json" "xml" "xml-external-parsed-entity" "xml-dtd"}} {
return false
}
}

Binary file not shown.

View File

@@ -1,181 +1,181 @@
# tclConfig.sh --
#
# This shell script (for sh) is generated automatically by Tcl's
# configure script. It will create shell variables for most of
# the configuration options discovered by the configure script.
# This script is intended to be included by the configure scripts
# for Tcl extensions so that they don't have to figure this all
# out for themselves.
#
# The information in this file is specific to a single platform.
TCL_DLL_FILE="tcl86t.dll"
# Tcl's version number.
TCL_VERSION='8.6'
TCL_MAJOR_VERSION='8'
TCL_MINOR_VERSION='6'
TCL_PATCH_LEVEL='8.6.9'
# C compiler to use for compilation.
TCL_CC='cl'
# -D flags for use with the C compiler.
TCL_DEFS='-nologo -c /D_ATL_XP_TARGETING /DUNICODE /D_UNICODE -W3 -wd4311 -wd4312 -wd4311 -wd4312 -FpC:\_work\11\b\tcl-core-8.6.9.0\win\Release_AMD64_VC13\tcl_ThreadedDynamic\ -fp:strict -O2 -GS -GL -MD -I"C:\_work\11\b\tcl-core-8.6.9.0\win\..\win" -I"C:\_work\11\b\tcl-core-8.6.9.0\win\..\generic" -I"C:\_work\11\b\tcl-core-8.6.9.0\win\..\libtommath" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline -DHAVE_ZLIB=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DNDEBUG -DTCL_CFG_OPTIMIZED -DTCL_CFG_DO64BIT -DBUILD_tcl'
# If TCL was built with debugging symbols, generated libraries contain
# this string at the end of the library name (before the extension).
TCL_DBGX=t
# Default flags used in an optimized and debuggable build, respectively.
TCL_CFLAGS_DEBUG='-nologo -c -W3 -YX -FpC:\_work\11\b\tcl-core-8.6.9.0\win\Release_AMD64_VC13\tcl_ThreadedDynamic\ -MDd'
TCL_CFLAGS_OPTIMIZE='-nologo -c -W3 -YX -FpC:\_work\11\b\tcl-core-8.6.9.0\win\Release_AMD64_VC13\tcl_ThreadedDynamic\ -MD'
# Default linker flags used in an optimized and debuggable build, respectively.
TCL_LDFLAGS_DEBUG='-nologo -machine:AMD64 -debug -debugtype:cv'
TCL_LDFLAGS_OPTIMIZE='-nologo -machine:AMD64 -release -opt:ref -opt:icf,3'
# Flag, 1: we built a shared lib, 0 we didn't
TCL_SHARED_BUILD=1
# The name of the Tcl library (may be either a .a file or a shared library):
TCL_LIB_FILE='tcl86t.lib'
# Flag to indicate whether shared libraries need export files.
TCL_NEEDS_EXP_FILE=
# String that can be evaluated to generate the part of the export file
# name that comes after the "libxxx" (includes version number, if any,
# extension, and anything else needed). May depend on the variables
# VERSION. On most UNIX systems this is ${VERSION}.exp.
TCL_EXPORT_FILE_SUFFIX='86t.lib'
# Additional libraries to use when linking Tcl.
TCL_LIBS='kernel32.lib advapi32.lib netapi32.lib user32.lib userenv.lib ws2_32.lib ucrt.lib netapi32.lib user32.lib userenv.lib ws2_32.lib'
# Top-level directory in which Tcl's platform-independent files are
# installed.
TCL_PREFIX='C:\_work\11\b\tcltk-8.6.9.0\amd64'
# Top-level directory in which Tcl's platform-specific files (e.g.
# executables) are installed.
TCL_EXEC_PREFIX='C:\_work\11\b\tcltk-8.6.9.0\amd64\bin'
# Flags to pass to cc when compiling the components of a shared library:
TCL_SHLIB_CFLAGS=''
# Flags to pass to cc to get warning messages
TCL_CFLAGS_WARNING='-W3'
# Extra flags to pass to cc:
TCL_EXTRA_CFLAGS='-YX'
# Base command to use for combining object files into a shared library:
TCL_SHLIB_LD='link -nologo -machine:AMD64 -ltcg -release -opt:ref -opt:icf,3 -nodefaultlib:libucrt.lib -dll'
# Base command to use for combining object files into a static library:
TCL_STLIB_LD='lib -nologo'
# Either '$LIBS' (if dependent libraries should be included when linking
# shared libraries) or an empty string. See Tcl's configure.in for more
# explanation.
TCL_SHLIB_LD_LIBS='kernel32.lib advapi32.lib netapi32.lib user32.lib userenv.lib ws2_32.lib ucrt.lib netapi32.lib user32.lib userenv.lib ws2_32.lib'
# Suffix to use for the name of a shared library.
TCL_SHLIB_SUFFIX='.dll'
# Library file(s) to include in tclsh and other base applications
# in order to provide facilities needed by DLOBJ above.
TCL_DL_LIBS=''
# Flags to pass to the compiler when linking object files into
# an executable tclsh or tcltest binary.
TCL_LD_FLAGS=''
# Flags to pass to cc/ld, such as "-R /usr/local/tcl/lib", that tell the
# run-time dynamic linker where to look for shared libraries such as
# libtcl.so. Used when linking applications. Only works if there
# is a variable "LIB_RUNTIME_DIR" defined in the Makefile.
TCL_CC_SEARCH_FLAGS=''
TCL_LD_SEARCH_FLAGS=''
# Additional object files linked with Tcl to provide compatibility
# with standard facilities from ANSI C or POSIX.
TCL_COMPAT_OBJS=''
# Name of the ranlib program to use.
TCL_RANLIB=''
# -l flag to pass to the linker to pick up the Tcl library
TCL_LIB_FLAG=''
# String to pass to linker to pick up the Tcl library from its
# build directory.
TCL_BUILD_LIB_SPEC=''
# String to pass to linker to pick up the Tcl library from its
# installed directory.
TCL_LIB_SPEC='C:\_work\11\b\tcltk-8.6.9.0\amd64\lib\tcl86t.lib'
# String to pass to the compiler so that an extension can
# find installed Tcl headers.
TCL_INCLUDE_SPEC='-IC:\_work\11\b\tcltk-8.6.9.0\amd64\include'
# Indicates whether a version numbers should be used in -l switches
# ("ok" means it's safe to use switches like -ltcl7.5; "nodots" means
# use switches like -ltcl75). SunOS and FreeBSD require "nodots", for
# example.
TCL_LIB_VERSIONS_OK=''
# String that can be evaluated to generate the part of a shared library
# name that comes after the "libxxx" (includes version number, if any,
# extension, and anything else needed). May depend on the variables
# VERSION and SHLIB_SUFFIX. On most UNIX systems this is
# ${VERSION}${SHLIB_SUFFIX}.
TCL_SHARED_LIB_SUFFIX='86t.dll'
# String that can be evaluated to generate the part of an unshared library
# name that comes after the "libxxx" (includes version number, if any,
# extension, and anything else needed). May depend on the variable
# VERSION. On most UNIX systems this is ${VERSION}.a.
TCL_UNSHARED_LIB_SUFFIX='86t.lib'
# Location of the top-level source directory from which Tcl was built.
# This is the directory that contains a README file as well as
# subdirectories such as generic, unix, etc. If Tcl was compiled in a
# different place than the directory containing the source files, this
# points to the location of the sources, not the location where Tcl was
# compiled.
TCL_SRC_DIR='C:\_work\11\b\tcl-core-8.6.9.0\win\..'
# List of standard directories in which to look for packages during
# "package require" commands. Contains the "prefix" directory plus also
# the "exec_prefix" directory, if it is different.
TCL_PACKAGE_PATH=''
# Tcl supports stub.
TCL_SUPPORTS_STUBS=1
# The name of the Tcl stub library (.a):
TCL_STUB_LIB_FILE='tclstub86.lib'
# -l flag to pass to the linker to pick up the Tcl stub library
TCL_STUB_LIB_FLAG='tclstub86.lib'
# String to pass to linker to pick up the Tcl stub library from its
# build directory.
TCL_BUILD_STUB_LIB_SPEC='-LC:\_work\11\b\tcl-core-8.6.9.0\win\Release_AMD64_VC13 tclstub86.lib'
# String to pass to linker to pick up the Tcl stub library from its
# installed directory.
TCL_STUB_LIB_SPEC='-LC:\_work\11\b\tcltk-8.6.9.0\amd64\lib tclstub86.lib'
# Path to the Tcl stub library in the build directory.
TCL_BUILD_STUB_LIB_PATH='C:\_work\11\b\tcl-core-8.6.9.0\win\Release_AMD64_VC13\tclstub86.lib'
# Path to the Tcl stub library in the install directory.
TCL_STUB_LIB_PATH='C:\_work\11\b\tcltk-8.6.9.0\amd64\lib\tclstub86.lib'
# Flag, 1: we built Tcl with threads enabled, 0 we didn't
TCL_THREADS=1
# tclConfig.sh --
#
# This shell script (for sh) is generated automatically by Tcl's
# configure script. It will create shell variables for most of
# the configuration options discovered by the configure script.
# This script is intended to be included by the configure scripts
# for Tcl extensions so that they don't have to figure this all
# out for themselves.
#
# The information in this file is specific to a single platform.
TCL_DLL_FILE="tcl86t.dll"
# Tcl's version number.
TCL_VERSION='8.6'
TCL_MAJOR_VERSION='8'
TCL_MINOR_VERSION='6'
TCL_PATCH_LEVEL='8.6.10'
# C compiler to use for compilation.
TCL_CC='cl'
# -D flags for use with the C compiler.
TCL_DEFS='-nologo -c /D_ATL_XP_TARGETING -W3 -wd4311 -wd4312 -wd4311 -wd4312 -FpC:\A\32\b\tcl-core-8.6.10.0\win\Release_AMD64_VC13\tcl_ThreadedDynamic\ -fp:strict -O2 -GS -GL -MD -I"C:\A\32\b\tcl-core-8.6.10.0\win\..\win" -I"C:\A\32\b\tcl-core-8.6.10.0\win\..\generic" -I"C:\A\32\b\tcl-core-8.6.10.0\win\..\libtommath" /DTCL_TOMMATH /DMP_PREC=4 /Dinline=__inline /DHAVE_ZLIB=1 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DMP_FIXED_CUTOFFS /DMP_NO_STDINT /DTCL_CFGVAL_ENCODING=\"cp1252\" /DSTDC_HEADERS /DTCL_THREADS=1 /DUSE_THREAD_ALLOC=1 /DNDEBUG /DTCL_CFG_OPTIMIZED /DTCL_CFG_DO64BIT /DBUILD_tcl'
# If TCL was built with debugging symbols, generated libraries contain
# this string at the end of the library name (before the extension).
TCL_DBGX=t
# Default flags used in an optimized and debuggable build, respectively.
TCL_CFLAGS_DEBUG='-nologo -c -W3 -YX -FpC:\A\32\b\tcl-core-8.6.10.0\win\Release_AMD64_VC13\tcl_ThreadedDynamic\ -MDd'
TCL_CFLAGS_OPTIMIZE='-nologo -c -W3 -YX -FpC:\A\32\b\tcl-core-8.6.10.0\win\Release_AMD64_VC13\tcl_ThreadedDynamic\ -MD'
# Default linker flags used in an optimized and debuggable build, respectively.
TCL_LDFLAGS_DEBUG='-nologo -machine:AMD64 -debug -debugtype:cv'
TCL_LDFLAGS_OPTIMIZE='-nologo -machine:AMD64 -release -opt:ref -opt:icf,3'
# Flag, 1: we built a shared lib, 0 we didn't
TCL_SHARED_BUILD=1
# The name of the Tcl library (may be either a .a file or a shared library):
TCL_LIB_FILE='tcl86t.lib'
# Flag to indicate whether shared libraries need export files.
TCL_NEEDS_EXP_FILE=
# String that can be evaluated to generate the part of the export file
# name that comes after the "libxxx" (includes version number, if any,
# extension, and anything else needed). May depend on the variables
# VERSION. On most UNIX systems this is ${VERSION}.exp.
TCL_EXPORT_FILE_SUFFIX='86t.lib'
# Additional libraries to use when linking Tcl.
TCL_LIBS='kernel32.lib advapi32.lib netapi32.lib user32.lib userenv.lib ws2_32.lib ucrt.lib netapi32.lib user32.lib userenv.lib ws2_32.lib'
# Top-level directory in which Tcl's platform-independent files are
# installed.
TCL_PREFIX='C:\A\32\b\tcltk-8.6.10.0\amd64'
# Top-level directory in which Tcl's platform-specific files (e.g.
# executables) are installed.
TCL_EXEC_PREFIX='C:\A\32\b\tcltk-8.6.10.0\amd64\bin'
# Flags to pass to cc when compiling the components of a shared library:
TCL_SHLIB_CFLAGS=''
# Flags to pass to cc to get warning messages
TCL_CFLAGS_WARNING='-W3'
# Extra flags to pass to cc:
TCL_EXTRA_CFLAGS='-YX'
# Base command to use for combining object files into a shared library:
TCL_SHLIB_LD='link -nologo -machine:AMD64 -ltcg -release -opt:ref -opt:icf,3 -nodefaultlib:libucrt.lib -dll'
# Base command to use for combining object files into a static library:
TCL_STLIB_LD='lib -nologo'
# Either '$LIBS' (if dependent libraries should be included when linking
# shared libraries) or an empty string. See Tcl's configure.in for more
# explanation.
TCL_SHLIB_LD_LIBS='kernel32.lib advapi32.lib netapi32.lib user32.lib userenv.lib ws2_32.lib ucrt.lib netapi32.lib user32.lib userenv.lib ws2_32.lib'
# Suffix to use for the name of a shared library.
TCL_SHLIB_SUFFIX='.dll'
# Library file(s) to include in tclsh and other base applications
# in order to provide facilities needed by DLOBJ above.
TCL_DL_LIBS=''
# Flags to pass to the compiler when linking object files into
# an executable tclsh or tcltest binary.
TCL_LD_FLAGS=''
# Flags to pass to cc/ld, such as "-R /usr/local/tcl/lib", that tell the
# run-time dynamic linker where to look for shared libraries such as
# libtcl.so. Used when linking applications. Only works if there
# is a variable "LIB_RUNTIME_DIR" defined in the Makefile.
TCL_CC_SEARCH_FLAGS=''
TCL_LD_SEARCH_FLAGS=''
# Additional object files linked with Tcl to provide compatibility
# with standard facilities from ANSI C or POSIX.
TCL_COMPAT_OBJS=''
# Name of the ranlib program to use.
TCL_RANLIB=''
# -l flag to pass to the linker to pick up the Tcl library
TCL_LIB_FLAG=''
# String to pass to linker to pick up the Tcl library from its
# build directory.
TCL_BUILD_LIB_SPEC=''
# String to pass to linker to pick up the Tcl library from its
# installed directory.
TCL_LIB_SPEC='C:\A\32\b\tcltk-8.6.10.0\amd64\lib\tcl86t.lib'
# String to pass to the compiler so that an extension can
# find installed Tcl headers.
TCL_INCLUDE_SPEC='-IC:\A\32\b\tcltk-8.6.10.0\amd64\include'
# Indicates whether a version numbers should be used in -l switches
# ("ok" means it's safe to use switches like -ltcl7.5; "nodots" means
# use switches like -ltcl75). SunOS and FreeBSD require "nodots", for
# example.
TCL_LIB_VERSIONS_OK=''
# String that can be evaluated to generate the part of a shared library
# name that comes after the "libxxx" (includes version number, if any,
# extension, and anything else needed). May depend on the variables
# VERSION and SHLIB_SUFFIX. On most UNIX systems this is
# ${VERSION}${SHLIB_SUFFIX}.
TCL_SHARED_LIB_SUFFIX='86t.dll'
# String that can be evaluated to generate the part of an unshared library
# name that comes after the "libxxx" (includes version number, if any,
# extension, and anything else needed). May depend on the variable
# VERSION. On most UNIX systems this is ${VERSION}.a.
TCL_UNSHARED_LIB_SUFFIX='86t.lib'
# Location of the top-level source directory from which Tcl was built.
# This is the directory that contains a README file as well as
# subdirectories such as generic, unix, etc. If Tcl was compiled in a
# different place than the directory containing the source files, this
# points to the location of the sources, not the location where Tcl was
# compiled.
TCL_SRC_DIR='C:\A\32\b\tcl-core-8.6.10.0\win\..'
# List of standard directories in which to look for packages during
# "package require" commands. Contains the "prefix" directory plus also
# the "exec_prefix" directory, if it is different.
TCL_PACKAGE_PATH=''
# Tcl supports stub.
TCL_SUPPORTS_STUBS=1
# The name of the Tcl stub library (.a):
TCL_STUB_LIB_FILE='tclstub86.lib'
# -l flag to pass to the linker to pick up the Tcl stub library
TCL_STUB_LIB_FLAG='tclstub86.lib'
# String to pass to linker to pick up the Tcl stub library from its
# build directory.
TCL_BUILD_STUB_LIB_SPEC='-LC:\A\32\b\tcl-core-8.6.10.0\win\Release_AMD64_VC13 tclstub86.lib'
# String to pass to linker to pick up the Tcl stub library from its
# installed directory.
TCL_STUB_LIB_SPEC='-LC:\A\32\b\tcltk-8.6.10.0\amd64\lib tclstub86.lib'
# Path to the Tcl stub library in the build directory.
TCL_BUILD_STUB_LIB_PATH='C:\A\32\b\tcl-core-8.6.10.0\win\Release_AMD64_VC13\tclstub86.lib'
# Path to the Tcl stub library in the install directory.
TCL_STUB_LIB_PATH='C:\A\32\b\tcltk-8.6.10.0\amd64\lib\tclstub86.lib'
# Flag, 1: we built Tcl with threads enabled, 0 we didn't
TCL_THREADS=1

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,120 +1,120 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: BtnBox.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
#
# BtnBox.tcl --
#
# Implements the tixButtonBox widget
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixButtonBox {
-superclass tixPrimitive
-classname TixButtonBox
-method {
add invoke button buttons
}
-flag {
-orientation -orient -padx -pady -state
}
-static {
-orientation
}
-configspec {
{-orientation orientation Orientation horizontal}
{-padx padX Pad 0}
{-pady padY Pad 0}
{-state state State normal}
}
-alias {
{-orient -orientation}
}
-default {
{.borderWidth 1}
{.relief raised}
{.padX 5}
{.padY 10}
{*Button.anchor c}
{*Button.padX 5}
}
}
proc tixButtonBox:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
set data(g:buttons) ""
}
#----------------------------------------------------------------------
# CONFIG OPTIONS
#----------------------------------------------------------------------
proc tixButtonBox:config-padx {w arg} {
upvar #0 $w data
foreach item $data(g:buttons) {
pack configure $w.$item -padx $arg
}
}
proc tixButtonBox:config-pady {w arg} {
upvar #0 $w data
foreach item $data(g:buttons) {
pack configure $w.$item -pady $arg
}
}
proc tixButtonBox:config-state {w arg} {
upvar #0 $w data
foreach item $data(g:buttons) {
$w.$item config -state $arg
}
}
#----------------------------------------------------------------------
# Methods
# WIDGET COMMANDS
#----------------------------------------------------------------------
proc tixButtonBox:add {w name args} {
upvar #0 $w data
eval button $w.$name $args
if {$data(-orientation) == "horizontal"} {
pack $w.$name -side left -expand yes -fill y\
-padx $data(-padx) -pady $data(-pady)
} else {
pack $w.$name -side top -expand yes -fill x\
-padx $data(-padx) -pady $data(-pady)
}
# allow for subwidget access
#
lappend data(g:buttons) $name
set data(w:$name) $w.$name
return $w.$name
}
proc tixButtonBox:button {w name args} {
return [eval tixCallMethod $w subwidget $name $args]
}
proc tixButtonBox:buttons {w args} {
return [eval tixCallMethod $w subwidgets -group buttons $args]
}
#
# call the command
proc tixButtonBox:invoke {w name} {
upvar #0 $w data
$w.$name invoke
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: BtnBox.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
#
# BtnBox.tcl --
#
# Implements the tixButtonBox widget
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixButtonBox {
-superclass tixPrimitive
-classname TixButtonBox
-method {
add invoke button buttons
}
-flag {
-orientation -orient -padx -pady -state
}
-static {
-orientation
}
-configspec {
{-orientation orientation Orientation horizontal}
{-padx padX Pad 0}
{-pady padY Pad 0}
{-state state State normal}
}
-alias {
{-orient -orientation}
}
-default {
{.borderWidth 1}
{.relief raised}
{.padX 5}
{.padY 10}
{*Button.anchor c}
{*Button.padX 5}
}
}
proc tixButtonBox:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
set data(g:buttons) ""
}
#----------------------------------------------------------------------
# CONFIG OPTIONS
#----------------------------------------------------------------------
proc tixButtonBox:config-padx {w arg} {
upvar #0 $w data
foreach item $data(g:buttons) {
pack configure $w.$item -padx $arg
}
}
proc tixButtonBox:config-pady {w arg} {
upvar #0 $w data
foreach item $data(g:buttons) {
pack configure $w.$item -pady $arg
}
}
proc tixButtonBox:config-state {w arg} {
upvar #0 $w data
foreach item $data(g:buttons) {
$w.$item config -state $arg
}
}
#----------------------------------------------------------------------
# Methods
# WIDGET COMMANDS
#----------------------------------------------------------------------
proc tixButtonBox:add {w name args} {
upvar #0 $w data
eval button $w.$name $args
if {$data(-orientation) == "horizontal"} {
pack $w.$name -side left -expand yes -fill y\
-padx $data(-padx) -pady $data(-pady)
} else {
pack $w.$name -side top -expand yes -fill x\
-padx $data(-padx) -pady $data(-pady)
}
# allow for subwidget access
#
lappend data(g:buttons) $name
set data(w:$name) $w.$name
return $w.$name
}
proc tixButtonBox:button {w name args} {
return [eval tixCallMethod $w subwidget $name $args]
}
proc tixButtonBox:buttons {w args} {
return [eval tixCallMethod $w subwidgets -group buttons $args]
}
#
# call the command
proc tixButtonBox:invoke {w name} {
upvar #0 $w data
$w.$name invoke
}

View File

@@ -1,360 +1,360 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: CObjView.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
#
# CObjView.tcl --
#
# This file implements the Canvas Object View widget. This is a base
# class of IconView. It implements:
# (1) Automatic placement/adjustment of the scrollbars according
# to the canvas objects inside the canvas subwidget. The
# scrollbars are adjusted so that the canvas is just large
# enough to see all the objects.
#
# (2) D+D bindings of the objects (%% not implemented)
#
# (3) Keyboard traversal of the objects (%% not implemented). By the
# virtual method :SelectObject.
#
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixCObjView {
-classname TixCObjView
-superclass tixScrolledWidget
-method {
adjustscrollregion
}
-flag {
-xscrollincrement -yscrollincrement
}
-static {
}
-configspec {
{-xscrollincrement xScrollIncrement ScrollIncrement 10}
{-yscrollincrement yScrollIncrement ScrollIncrement 10}
}
-default {
{.scrollbar auto}
{*borderWidth 1}
{*canvas.background #c3c3c3}
{*canvas.highlightBackground #d9d9d9}
{*canvas.relief sunken}
{*canvas.takeFocus 1}
{*Scrollbar.takeFocus 0}
}
-forcecall {
-scrollbar
}
}
proc tixCObjView:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:canvas) \
[canvas $w.canvas]
set data(w:hsb) \
[scrollbar $w.hsb -orient horizontal]
set data(w:vsb) \
[scrollbar $w.vsb -orient vertical]
set data(pw:client) $data(w:canvas)
set data(xorig) 0
set data(yorig) 0
set data(sx1) 0
set data(sy1) 0
set data(sx2) 0
set data(sy2) 0
}
proc tixCObjView:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
# %% scan/drag of canvas??
#
# $data(w:canvas) config \
# -xscrollcommand "tixCObjView:XScroll $w"\
# -yscrollcommand "tixCObjView:YScroll $w"
$data(w:hsb) config -command "tixCObjView:UserScroll $w x"
$data(w:vsb) config -command "tixCObjView:UserScroll $w y"
}
#----------------------------------------------------------------------
#
# option configs
#----------------------------------------------------------------------
proc tixCObjView:config-takefocus {w value} {
upvar #0 $w data
$data(w:canvas) config -takefocus $value
}
#----------------------------------------------------------------------
#
# Widget commands
#----------------------------------------------------------------------
proc tixCObjView:adjustscrollregion {w} {
upvar #0 $w data
set cW [tixWinWidth $data(w:canvas)]
set cH [tixWinHeight $data(w:canvas)]
tixCObjView:GetScrollRegion $w $cW $cH 1 1
}
#----------------------------------------------------------------------
#
# Private Methods
#----------------------------------------------------------------------
proc tixCObjView:GeometryInfo {w cW cH} {
upvar #0 $w data
set bd \
[expr [$data(w:canvas) cget -bd] + [$data(w:canvas) cget -highlightthickness]]
incr cW -[expr {2*$bd}]
incr cH -[expr {2*$bd}]
return [tixCObjView:GetScrollRegion $w $cW $cH 0 0]
}
proc tixCObjView:PlaceWindow {w} {
upvar #0 $w data
set cW [tixWinWidth $data(w:canvas)]
set cH [tixWinHeight $data(w:canvas)]
tixCObjView:GetScrollRegion $w $cW $cH 1 0
tixChainMethod $w PlaceWindow
}
proc tixCObjView:GetScrollRegion {w cW cH setReg callConfig} {
upvar #0 $w data
set x1max $data(xorig)
set y1max $data(yorig)
set x2min [expr {$x1max + $cW - 1}]
set y2min [expr {$y1max + $cH - 1}]
set bbox [$data(w:canvas) bbox all]
if {$bbox == ""} {
set bbox {0 0 1 1}
}
set x1 [lindex $bbox 0]
set y1 [lindex $bbox 1]
set x2 [lindex $bbox 2]
set y2 [lindex $bbox 3]
set bd \
[expr [$data(w:canvas) cget -bd] + [$data(w:canvas) cget -highlightthickness]]
incr x1 -$bd
incr y1 -$bd
incr x2 -$bd
incr y2 -$bd
if {$x1 > $x1max} {
set x1 $x1max
}
if {$y1 > $y1max} {
set y1 $y1max
}
if {$x2 < $x2min} {
set x2 $x2min
}
if {$y2 < $y2min} {
set y2 $y2min
}
set data(sx1) $x1
set data(sy1) $y1
set data(sx2) $x2
set data(sy2) $y2
set sW [expr {$x2 - $x1 + 1}]
set sH [expr {$y2 - $y1 + 1}]
# puts "sregion = {$x1 $y1 $x2 $y2}; sW=$sW; cW=$cW"
if {$sW > $cW} {
set hsbSpec {0.5 1}
} else {
set hsbSpec {0 1}
}
if {$sH > $cH} {
set vsbSpec {0.5 1}
} else {
set vsbSpec {0 1}
}
if $setReg {
tixCObjView:SetScrollBars $w $cW $cH $sW $sH
}
if $callConfig {
tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
}
return [list $hsbSpec $vsbSpec]
}
#xF = xFirst
#
proc tixCObjView:SetScrollBars {w cW cH sW sH} {
upvar #0 $w data
# puts "$data(xorig) <--> $data(sx1)"
set xF [expr ($data(xorig).0-$data(sx1).0)/$sW.0]
set xL [expr $cW.0/$sW.0 + $xF]
set yF [expr ($data(yorig).0-$data(sy1).0)/$sH.0]
set yL [expr $cH.0/$sH.0 + $yF]
# puts "$xF $xL : $yF $yL"
$data(w:hsb) set $xF $xL
$data(w:vsb) set $yF $yL
}
proc tixCObjView:UserScroll {w dir type args} {
upvar #0 $w data
$data(w:canvas) config -xscrollincrement 1 -yscrollincrement 1
case $dir {
x {
set n $data(xorig)
set orig $data(xorig)
set s1 $data(sx1)
set total [expr {$data(sx2)-$data(sx1)}]
set page [tixWinWidth $data(w:canvas)]
set min $data(sx1)
set max [expr {$data(sx1)+$total-$page}]
set inc $data(-xscrollincrement)
}
y {
set n $data(yorig)
set orig $data(yorig)
set s1 $data(sy1)
set total [expr {$data(sy2)-$data(sy1)}]
set page [tixWinHeight $data(w:canvas)]
set min $data(sy1)
set max [expr {$data(sy1)+$total-$page}]
set inc $data(-yscrollincrement)
}
}
case $type {
scroll {
set amt [lindex $args 0]
set unit [lindex $args 1]
case $unit {
units {
incr n [expr int($inc)*$amt]
}
pages {
incr n [expr {$page*$amt}]
}
}
}
moveto {
set first [lindex $args 0]
set n [expr round($first*$total)+$s1]
}
}
if {$n < $min} {
set n $min
}
if {$n > $max} {
set n $max
}
# puts "n=$n min=$min max=$max"
case $dir {
x {
$data(w:canvas) xview scroll [expr {$n-$orig}] units
set data(xorig) $n
}
y {
$data(w:canvas) yview scroll [expr {$n-$orig}] units
set data(yorig) $n
}
}
set cW [tixWinWidth $data(w:canvas)]
set cH [tixWinHeight $data(w:canvas)]
set sW [expr {$data(sx2)-$data(sx1)+1}]
set sH [expr {$data(sy2)-$data(sy1)+1}]
tixCObjView:SetScrollBars $w $cW $cH $sW $sH
}
# Junk
#
#
proc tixCObjView:XScroll {w first last} {
upvar #0 $w data
set sc [$data(w:canvas) cget -scrollregion]
if {$sc == ""} {
set x1 1
set x2 [tixWinWidth $data(w:canvas)]
} else {
set x1 [lindex $sc 0]
set x2 [lindex $sc 2]
}
set W [expr {$x2 - $x1}]
if {$W < 1} {
set W 1
}
$data(w:hsb) set $first $last
# tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
}
# Junk
#
proc tixCObjView:YScroll {w first last} {
upvar #0 $w data
set sc [$data(w:canvas) cget -scrollregion]
if {$sc == ""} {
set y1 1
set y2 [tixWinHeight $data(w:canvas)]
} else {
set y1 [lindex $sc 1]
set y2 [lindex $sc 3]
}
set H [expr {$y2 - $y1}]
if {$H < 1} {
set H 1
}
$data(w:vsb) set $first $last
# tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: CObjView.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
#
# CObjView.tcl --
#
# This file implements the Canvas Object View widget. This is a base
# class of IconView. It implements:
# (1) Automatic placement/adjustment of the scrollbars according
# to the canvas objects inside the canvas subwidget. The
# scrollbars are adjusted so that the canvas is just large
# enough to see all the objects.
#
# (2) D+D bindings of the objects (%% not implemented)
#
# (3) Keyboard traversal of the objects (%% not implemented). By the
# virtual method :SelectObject.
#
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixCObjView {
-classname TixCObjView
-superclass tixScrolledWidget
-method {
adjustscrollregion
}
-flag {
-xscrollincrement -yscrollincrement
}
-static {
}
-configspec {
{-xscrollincrement xScrollIncrement ScrollIncrement 10}
{-yscrollincrement yScrollIncrement ScrollIncrement 10}
}
-default {
{.scrollbar auto}
{*borderWidth 1}
{*canvas.background #c3c3c3}
{*canvas.highlightBackground #d9d9d9}
{*canvas.relief sunken}
{*canvas.takeFocus 1}
{*Scrollbar.takeFocus 0}
}
-forcecall {
-scrollbar
}
}
proc tixCObjView:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:canvas) \
[canvas $w.canvas]
set data(w:hsb) \
[scrollbar $w.hsb -orient horizontal]
set data(w:vsb) \
[scrollbar $w.vsb -orient vertical]
set data(pw:client) $data(w:canvas)
set data(xorig) 0
set data(yorig) 0
set data(sx1) 0
set data(sy1) 0
set data(sx2) 0
set data(sy2) 0
}
proc tixCObjView:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
# %% scan/drag of canvas??
#
# $data(w:canvas) config \
# -xscrollcommand "tixCObjView:XScroll $w"\
# -yscrollcommand "tixCObjView:YScroll $w"
$data(w:hsb) config -command "tixCObjView:UserScroll $w x"
$data(w:vsb) config -command "tixCObjView:UserScroll $w y"
}
#----------------------------------------------------------------------
#
# option configs
#----------------------------------------------------------------------
proc tixCObjView:config-takefocus {w value} {
upvar #0 $w data
$data(w:canvas) config -takefocus $value
}
#----------------------------------------------------------------------
#
# Widget commands
#----------------------------------------------------------------------
proc tixCObjView:adjustscrollregion {w} {
upvar #0 $w data
set cW [tixWinWidth $data(w:canvas)]
set cH [tixWinHeight $data(w:canvas)]
tixCObjView:GetScrollRegion $w $cW $cH 1 1
}
#----------------------------------------------------------------------
#
# Private Methods
#----------------------------------------------------------------------
proc tixCObjView:GeometryInfo {w cW cH} {
upvar #0 $w data
set bd \
[expr [$data(w:canvas) cget -bd] + [$data(w:canvas) cget -highlightthickness]]
incr cW -[expr {2*$bd}]
incr cH -[expr {2*$bd}]
return [tixCObjView:GetScrollRegion $w $cW $cH 0 0]
}
proc tixCObjView:PlaceWindow {w} {
upvar #0 $w data
set cW [tixWinWidth $data(w:canvas)]
set cH [tixWinHeight $data(w:canvas)]
tixCObjView:GetScrollRegion $w $cW $cH 1 0
tixChainMethod $w PlaceWindow
}
proc tixCObjView:GetScrollRegion {w cW cH setReg callConfig} {
upvar #0 $w data
set x1max $data(xorig)
set y1max $data(yorig)
set x2min [expr {$x1max + $cW - 1}]
set y2min [expr {$y1max + $cH - 1}]
set bbox [$data(w:canvas) bbox all]
if {$bbox == ""} {
set bbox {0 0 1 1}
}
set x1 [lindex $bbox 0]
set y1 [lindex $bbox 1]
set x2 [lindex $bbox 2]
set y2 [lindex $bbox 3]
set bd \
[expr [$data(w:canvas) cget -bd] + [$data(w:canvas) cget -highlightthickness]]
incr x1 -$bd
incr y1 -$bd
incr x2 -$bd
incr y2 -$bd
if {$x1 > $x1max} {
set x1 $x1max
}
if {$y1 > $y1max} {
set y1 $y1max
}
if {$x2 < $x2min} {
set x2 $x2min
}
if {$y2 < $y2min} {
set y2 $y2min
}
set data(sx1) $x1
set data(sy1) $y1
set data(sx2) $x2
set data(sy2) $y2
set sW [expr {$x2 - $x1 + 1}]
set sH [expr {$y2 - $y1 + 1}]
# puts "sregion = {$x1 $y1 $x2 $y2}; sW=$sW; cW=$cW"
if {$sW > $cW} {
set hsbSpec {0.5 1}
} else {
set hsbSpec {0 1}
}
if {$sH > $cH} {
set vsbSpec {0.5 1}
} else {
set vsbSpec {0 1}
}
if $setReg {
tixCObjView:SetScrollBars $w $cW $cH $sW $sH
}
if $callConfig {
tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
}
return [list $hsbSpec $vsbSpec]
}
#xF = xFirst
#
proc tixCObjView:SetScrollBars {w cW cH sW sH} {
upvar #0 $w data
# puts "$data(xorig) <--> $data(sx1)"
set xF [expr ($data(xorig).0-$data(sx1).0)/$sW.0]
set xL [expr $cW.0/$sW.0 + $xF]
set yF [expr ($data(yorig).0-$data(sy1).0)/$sH.0]
set yL [expr $cH.0/$sH.0 + $yF]
# puts "$xF $xL : $yF $yL"
$data(w:hsb) set $xF $xL
$data(w:vsb) set $yF $yL
}
proc tixCObjView:UserScroll {w dir type args} {
upvar #0 $w data
$data(w:canvas) config -xscrollincrement 1 -yscrollincrement 1
case $dir {
x {
set n $data(xorig)
set orig $data(xorig)
set s1 $data(sx1)
set total [expr {$data(sx2)-$data(sx1)}]
set page [tixWinWidth $data(w:canvas)]
set min $data(sx1)
set max [expr {$data(sx1)+$total-$page}]
set inc $data(-xscrollincrement)
}
y {
set n $data(yorig)
set orig $data(yorig)
set s1 $data(sy1)
set total [expr {$data(sy2)-$data(sy1)}]
set page [tixWinHeight $data(w:canvas)]
set min $data(sy1)
set max [expr {$data(sy1)+$total-$page}]
set inc $data(-yscrollincrement)
}
}
case $type {
scroll {
set amt [lindex $args 0]
set unit [lindex $args 1]
case $unit {
units {
incr n [expr int($inc)*$amt]
}
pages {
incr n [expr {$page*$amt}]
}
}
}
moveto {
set first [lindex $args 0]
set n [expr round($first*$total)+$s1]
}
}
if {$n < $min} {
set n $min
}
if {$n > $max} {
set n $max
}
# puts "n=$n min=$min max=$max"
case $dir {
x {
$data(w:canvas) xview scroll [expr {$n-$orig}] units
set data(xorig) $n
}
y {
$data(w:canvas) yview scroll [expr {$n-$orig}] units
set data(yorig) $n
}
}
set cW [tixWinWidth $data(w:canvas)]
set cH [tixWinHeight $data(w:canvas)]
set sW [expr {$data(sx2)-$data(sx1)+1}]
set sH [expr {$data(sy2)-$data(sy1)+1}]
tixCObjView:SetScrollBars $w $cW $cH $sW $sH
}
# Junk
#
#
proc tixCObjView:XScroll {w first last} {
upvar #0 $w data
set sc [$data(w:canvas) cget -scrollregion]
if {$sc == ""} {
set x1 1
set x2 [tixWinWidth $data(w:canvas)]
} else {
set x1 [lindex $sc 0]
set x2 [lindex $sc 2]
}
set W [expr {$x2 - $x1}]
if {$W < 1} {
set W 1
}
$data(w:hsb) set $first $last
# tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
}
# Junk
#
proc tixCObjView:YScroll {w first last} {
upvar #0 $w data
set sc [$data(w:canvas) cget -scrollregion]
if {$sc == ""} {
set y1 1
set y2 [tixWinHeight $data(w:canvas)]
} else {
set y1 [lindex $sc 1]
set y2 [lindex $sc 3]
}
set H [expr {$y2 - $y1}]
if {$H < 1} {
set H 1
}
$data(w:vsb) set $first $last
# tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
}

View File

@@ -1,239 +1,239 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: ChkList.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
#
# ChkList.tcl --
#
# This file implements the TixCheckList widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixCheckList {
-classname TixCheckList
-superclass tixTree
-method {
getselection getstatus setstatus
}
-flag {
-radio
}
-configspec {
{-radio radio Radio false tixVerifyBoolean}
{-ignoreinvoke ignoreInvoke IgnoreInvoke true tixVerifyBoolean}
}
-static {
-radio
}
-default {
{.scrollbar auto}
{.doubleClick false}
{*Scrollbar.takeFocus 0}
{*borderWidth 1}
{*hlist.background #c3c3c3}
{*hlist.drawBranch 1}
{*hlist.height 10}
{*hlist.highlightBackground #d9d9d9}
{*hlist.indicator 1}
{*hlist.indent 20}
{*hlist.itemType imagetext}
{*hlist.padX 3}
{*hlist.padY 0}
{*hlist.relief sunken}
{*hlist.takeFocus 1}
{*hlist.wideSelection 0}
{*hlist.width 20}
}
}
proc tixCheckList:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
if {$data(-radio)} {
set data(selected) ""
}
}
#----------------------------------------------------------------------
#
# Widget commands
#
#----------------------------------------------------------------------
# Helper function for getselection
#
proc tixCheckList:GetSel {w var ent mode} {
upvar #0 $w data
upvar $var img
set ents ""
catch {
if {[$data(w:hlist) entrycget $ent -bitmap] eq $img($mode)} {
lappend ents $ent
}
}
foreach child [$data(w:hlist) info children $ent] {
set ents [concat $ents [tixCheckList:GetSel $w img $child $mode]]
}
return $ents
}
# Mode can be on, off, default
#
proc tixCheckList:getselection {w {mode on}} {
upvar #0 $w data
set img(on) [tix getbitmap ck_on]
set img(off) [tix getbitmap ck_off]
set img(default) [tix getbitmap ck_def]
set ents ""
foreach child [$data(w:hlist) info children] {
set ents [concat $ents [tixCheckList:GetSel $w img $child $mode]]
}
return $ents
}
proc tixCheckList:getstatus {w ent} {
upvar #0 $w data
if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
set img(on) [tix getbitmap ck_on]
set img(off) [tix getbitmap ck_off]
set img(default) [tix getbitmap ck_def]
set bitmap [$data(w:hlist) entrycget $ent -bitmap]
if {$bitmap eq $img(on)} {
set status on
}
if {$bitmap eq $img(off)} {
set status off
}
if {$bitmap eq $img(default)} {
set status default
}
}
if {[info exists status]} {
return $status
} else {
return "none"
}
}
proc tixCheckList:setstatus {w ent {mode on}} {
upvar #0 $w data
if {$data(-radio)} {
set status [tixCheckList:getstatus $w $ent]
if {$status eq $mode} {
return
}
if {$mode eq "on"} {
if {$data(selected) != ""} {
tixCheckList:Select $w $data(selected) off
}
set data(selected) $ent
tixCheckList:Select $w $ent $mode
} elseif {$mode eq "off"} {
if {$data(selected) eq $ent} {
return
}
tixCheckList:Select $w $ent $mode
} else {
tixCheckList:Select $w $ent $mode
}
} else {
tixCheckList:Select $w $ent $mode
}
}
proc tixCheckList:Select {w ent mode} {
upvar #0 $w data
if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
set img(on) ck_on
set img(off) ck_off
set img(default) ck_def
if [catch {
set bitmap [tix getbitmap $img($mode)]
$data(w:hlist) entryconfig $ent -bitmap $bitmap
}] {
# must be the "none" mode
#
catch {
$data(w:hlist) entryconfig $ent -bitmap ""
}
}
}
return $mode
}
proc tixCheckList:HandleCheck {w ent} {
upvar #0 $w data
if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
set img(on) [tix getbitmap ck_on]
set img(off) [tix getbitmap ck_off]
set img(default) [tix getbitmap ck_def]
set curMode [tixCheckList:getstatus $w $ent]
case $curMode {
on {
tixCheckList:setstatus $w $ent off
}
off {
tixCheckList:setstatus $w $ent on
}
none {
return
}
default {
tixCheckList:setstatus $w $ent on
}
}
}
}
proc tixCheckList:Command {w B} {
upvar #0 $w data
upvar $B bind
set ent [tixEvent flag V]
tixCheckList:HandleCheck $w $ent
tixChainMethod $w Command $B
}
proc tixCheckList:BrowseCmd {w B} {
upvar #0 $w data
upvar $B bind
set ent [tixEvent flag V]
case [tixEvent type] {
{<ButtonPress-1> <space>} {
tixCheckList:HandleCheck $w $ent
}
}
tixChainMethod $w BrowseCmd $B
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: ChkList.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
#
# ChkList.tcl --
#
# This file implements the TixCheckList widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixCheckList {
-classname TixCheckList
-superclass tixTree
-method {
getselection getstatus setstatus
}
-flag {
-radio
}
-configspec {
{-radio radio Radio false tixVerifyBoolean}
{-ignoreinvoke ignoreInvoke IgnoreInvoke true tixVerifyBoolean}
}
-static {
-radio
}
-default {
{.scrollbar auto}
{.doubleClick false}
{*Scrollbar.takeFocus 0}
{*borderWidth 1}
{*hlist.background #c3c3c3}
{*hlist.drawBranch 1}
{*hlist.height 10}
{*hlist.highlightBackground #d9d9d9}
{*hlist.indicator 1}
{*hlist.indent 20}
{*hlist.itemType imagetext}
{*hlist.padX 3}
{*hlist.padY 0}
{*hlist.relief sunken}
{*hlist.takeFocus 1}
{*hlist.wideSelection 0}
{*hlist.width 20}
}
}
proc tixCheckList:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
if {$data(-radio)} {
set data(selected) ""
}
}
#----------------------------------------------------------------------
#
# Widget commands
#
#----------------------------------------------------------------------
# Helper function for getselection
#
proc tixCheckList:GetSel {w var ent mode} {
upvar #0 $w data
upvar $var img
set ents ""
catch {
if {[$data(w:hlist) entrycget $ent -bitmap] eq $img($mode)} {
lappend ents $ent
}
}
foreach child [$data(w:hlist) info children $ent] {
set ents [concat $ents [tixCheckList:GetSel $w img $child $mode]]
}
return $ents
}
# Mode can be on, off, default
#
proc tixCheckList:getselection {w {mode on}} {
upvar #0 $w data
set img(on) [tix getbitmap ck_on]
set img(off) [tix getbitmap ck_off]
set img(default) [tix getbitmap ck_def]
set ents ""
foreach child [$data(w:hlist) info children] {
set ents [concat $ents [tixCheckList:GetSel $w img $child $mode]]
}
return $ents
}
proc tixCheckList:getstatus {w ent} {
upvar #0 $w data
if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
set img(on) [tix getbitmap ck_on]
set img(off) [tix getbitmap ck_off]
set img(default) [tix getbitmap ck_def]
set bitmap [$data(w:hlist) entrycget $ent -bitmap]
if {$bitmap eq $img(on)} {
set status on
}
if {$bitmap eq $img(off)} {
set status off
}
if {$bitmap eq $img(default)} {
set status default
}
}
if {[info exists status]} {
return $status
} else {
return "none"
}
}
proc tixCheckList:setstatus {w ent {mode on}} {
upvar #0 $w data
if {$data(-radio)} {
set status [tixCheckList:getstatus $w $ent]
if {$status eq $mode} {
return
}
if {$mode eq "on"} {
if {$data(selected) != ""} {
tixCheckList:Select $w $data(selected) off
}
set data(selected) $ent
tixCheckList:Select $w $ent $mode
} elseif {$mode eq "off"} {
if {$data(selected) eq $ent} {
return
}
tixCheckList:Select $w $ent $mode
} else {
tixCheckList:Select $w $ent $mode
}
} else {
tixCheckList:Select $w $ent $mode
}
}
proc tixCheckList:Select {w ent mode} {
upvar #0 $w data
if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
set img(on) ck_on
set img(off) ck_off
set img(default) ck_def
if [catch {
set bitmap [tix getbitmap $img($mode)]
$data(w:hlist) entryconfig $ent -bitmap $bitmap
}] {
# must be the "none" mode
#
catch {
$data(w:hlist) entryconfig $ent -bitmap ""
}
}
}
return $mode
}
proc tixCheckList:HandleCheck {w ent} {
upvar #0 $w data
if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
set img(on) [tix getbitmap ck_on]
set img(off) [tix getbitmap ck_off]
set img(default) [tix getbitmap ck_def]
set curMode [tixCheckList:getstatus $w $ent]
case $curMode {
on {
tixCheckList:setstatus $w $ent off
}
off {
tixCheckList:setstatus $w $ent on
}
none {
return
}
default {
tixCheckList:setstatus $w $ent on
}
}
}
}
proc tixCheckList:Command {w B} {
upvar #0 $w data
upvar $B bind
set ent [tixEvent flag V]
tixCheckList:HandleCheck $w $ent
tixChainMethod $w Command $B
}
proc tixCheckList:BrowseCmd {w B} {
upvar #0 $w data
upvar $B bind
set ent [tixEvent flag V]
case [tixEvent type] {
{<ButtonPress-1> <space>} {
tixCheckList:HandleCheck $w $ent
}
}
tixChainMethod $w BrowseCmd $B
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +1,33 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Compat.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
#
# Compat.tcl --
#
# This file wraps around many incompatibilities from Tix 3.6
# to Tix 4.0.
#
# (1) "box" to "Box" changes
# (2) "DlgBtns" to "ButtonBox" changes
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
foreach {old new} {
tixDlgBtns tixButtonBox
tixStdDlgBtns tixStdButtonBox
tixCombobox tixComboBox
tixFileSelectbox tixFileSelectBox
tixScrolledListbox tixScrolledListBox
} {
interp alias {} $old {} $new
}
proc tixInit {args} {
eval tix config $args
puts stderr "tixInit no longer needed for this version of Tix"
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Compat.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
#
# Compat.tcl --
#
# This file wraps around many incompatibilities from Tix 3.6
# to Tix 4.0.
#
# (1) "box" to "Box" changes
# (2) "DlgBtns" to "ButtonBox" changes
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
foreach {old new} {
tixDlgBtns tixButtonBox
tixStdDlgBtns tixStdButtonBox
tixCombobox tixComboBox
tixFileSelectbox tixFileSelectBox
tixScrolledListbox tixScrolledListBox
} {
interp alias {} $old {} $new
}
proc tixInit {args} {
eval tix config $args
puts stderr "tixInit no longer needed for this version of Tix"
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,482 +1,482 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Control.tcl,v 1.9 2004/03/28 02:44:57 hobbs Exp $
#
# Control.tcl --
#
# Implements the TixControl Widget. It is called the "SpinBox"
# in other toolkits.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixControl {
-classname TixControl
-superclass tixLabelWidget
-method {
incr decr invoke update
}
-flag {
-allowempty -autorepeat -command -decrcmd -disablecallback
-disabledforeground -incrcmd -initwait -integer -llimit
-repeatrate -max -min -selectmode -step -state -validatecmd
-value -variable -ulimit
}
-forcecall {
-variable -state
}
-configspec {
{-allowempty allowEmpty AllowEmpty false}
{-autorepeat autoRepeat AutoRepeat true}
{-command command Command ""}
{-decrcmd decrCmd DecrCmd ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-disabledforeground disabledForeground DisabledForeground #303030}
{-incrcmd incrCmd IncrCmd ""}
{-initwait initWait InitWait 500}
{-integer integer Integer false}
{-max max Max ""}
{-min min Min ""}
{-repeatrate repeatRate RepeatRate 50}
{-step step Step 1}
{-state state State normal}
{-selectmode selectMode SelectMode normal}
{-validatecmd validateCmd ValidateCmd ""}
{-value value Value 0}
{-variable variable Variable ""}
}
-alias {
{-llimit -min}
{-ulimit -max}
}
-default {
{.borderWidth 0}
{*entry.relief sunken}
{*entry.width 5}
{*label.anchor e}
{*label.borderWidth 0}
{*Button.anchor c}
{*Button.borderWidth 2}
{*Button.highlightThickness 1}
{*Button.takeFocus 0}
}
}
proc tixControl:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
set data(varInited) 0
set data(serial) 0
}
proc tixControl:ConstructFramedWidget {w frame} {
upvar #0 $w data
tixChainMethod $w ConstructFramedWidget $frame
set data(w:entry) [entry $frame.entry]
set data(w:incr) \
[button $frame.incr -bitmap [tix getbitmap incr] -takefocus 0]
set data(w:decr) \
[button $frame.decr -bitmap [tix getbitmap decr] -takefocus 0]
# tixForm $data(w:entry) -left 0 -top 0 -bottom -1 -right $data(w:decr)
# tixForm $data(w:incr) -right -1 -top 0 -bottom %50
# tixForm $data(w:decr) -right -1 -top $data(w:incr) -bottom -1
pack $data(w:entry) -side left -expand yes -fill both
pack $data(w:decr) -side bottom -fill both -expand yes
pack $data(w:incr) -side top -fill both -expand yes
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $data(-value)
# This value is used to configure the disable/normal fg of the ebtry
set data(entryfg) [$data(w:entry) cget -fg]
set data(labelfg) [$data(w:label) cget -fg]
}
proc tixControl:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
bind $data(w:incr) <ButtonPress-1> \
[list after idle tixControl:StartRepeat $w 1]
bind $data(w:decr) <ButtonPress-1> \
[list after idle tixControl:StartRepeat $w -1]
# These bindings will stop the button autorepeat when the
# mouse button is up
foreach btn [list $data(w:incr) $data(w:decr)] {
bind $btn <ButtonRelease-1> [list tixControl:StopRepeat $w]
}
tixSetMegaWidget $data(w:entry) $w
# If user press <return>, verify the value and call the -command
#
tixAddBindTag $data(w:entry) TixControl:Entry
}
proc tixControlBind {} {
tixBind TixControl:Entry <Return> {
tixControl:Invoke [tixGetMegaWidget %W] 1
}
tixBind TixControl:Entry <Escape> {
tixControl:Escape [tixGetMegaWidget %W]
}
tixBind TixControl:Entry <Up> {
[tixGetMegaWidget %W] incr
}
tixBind TixControl:Entry <Down> {
[tixGetMegaWidget %W] decr
}
tixBind TixControl:Entry <FocusOut> {
if {"%d" eq "NotifyNonlinear" || "%d" eq "NotifyNonlinearVirtual"} {
tixControl:Tab [tixGetMegaWidget %W] %d
}
}
tixBind TixControl:Entry <Any-KeyPress> {
tixControl:KeyPress [tixGetMegaWidget %W]
}
tixBind TixControl:Entry <Any-Tab> {
# This has a higher priority than the <Any-KeyPress> binding
# --> so that data(edited) is not set
}
}
#----------------------------------------------------------------------
# CONFIG OPTIONS
#----------------------------------------------------------------------
proc tixControl:config-state {w arg} {
upvar #0 $w data
if {$arg eq "normal"} {
$data(w:incr) config -state $arg
$data(w:decr) config -state $arg
catch {
$data(w:label) config -fg $data(labelfg)
}
$data(w:entry) config -state $arg -fg $data(entryfg)
} else {
$data(w:incr) config -state $arg
$data(w:decr) config -state $arg
catch {
$data(w:label) config -fg $data(-disabledforeground)
}
$data(w:entry) config -state $arg -fg $data(-disabledforeground)
}
}
proc tixControl:config-value {w value} {
upvar #0 $w data
tixControl:SetValue $w $value 0 1
# This will tell the Intrinsics: "Please use this value"
# because "value" might be altered by SetValues
#
return $data(-value)
}
proc tixControl:config-variable {w arg} {
upvar #0 $w data
if {[tixVariable:ConfigVariable $w $arg]} {
# The value of data(-value) is changed if tixVariable:ConfigVariable
# returns true
tixControl:SetValue $w $data(-value) 1 1
}
catch {
unset data(varInited)
}
set data(-variable) $arg
}
#----------------------------------------------------------------------
# User Commands
#----------------------------------------------------------------------
proc tixControl:incr {w {by 1}} {
upvar #0 $w data
if {$data(-state) ne "disabled"} {
if {![catch {$data(w:entry) index sel.first}]} {
$data(w:entry) select from end
$data(w:entry) select to end
}
# CYGNUS - why set value before changing it?
#tixControl:SetValue $w [$data(w:entry) get] 0 1
tixControl:AdjustValue $w $by
}
}
proc tixControl:decr {w {by 1}} {
upvar #0 $w data
if {$data(-state) ne "disabled"} {
if {![catch {$data(w:entry) index sel.first}]} {
$data(w:entry) select from end
$data(w:entry) select to end
}
# CYGNUS - why set value before changing it?
#tixControl:SetValue $w [$data(w:entry) get] 0 1
tixControl:AdjustValue $w [expr {0 - $by}]
}
}
proc tixControl:invoke {w} {
upvar #0 $w data
tixControl:Invoke $w 0
}
proc tixControl:update {w} {
upvar #0 $w data
if {[info exists data(edited)]} {
tixControl:invoke $w
}
}
#----------------------------------------------------------------------
# Internal Commands
#----------------------------------------------------------------------
# Change the value by a multiple of the data(-step)
#
proc tixControl:AdjustValue {w amount} {
upvar #0 $w data
if {$amount == 1 && [llength $data(-incrcmd)]} {
set newValue [tixEvalCmdBinding $w $data(-incrcmd) "" $data(-value)]
} elseif {$amount == -1 && [llength $data(-decrcmd)]} {
set newValue [tixEvalCmdBinding $w $data(-decrcmd) "" $data(-value)]
} else {
set newValue [expr {$data(-value) + $amount * $data(-step)}]
}
if {$data(-state) ne "disabled"} {
tixControl:SetValue $w $newValue 0 1
}
}
proc tixControl:SetValue {w newvalue noUpdate forced} {
upvar #0 $w data
if {[$data(w:entry) selection present]} {
set oldSelection [list [$data(w:entry) index sel.first] \
[$data(w:entry) index sel.last]]
}
set oldvalue $data(-value)
set oldCursor [$data(w:entry) index insert]
set changed 0
if {[llength $data(-validatecmd)]} {
# Call the user supplied validation command
#
set data(-value) [tixEvalCmdBinding $w $data(-validatecmd) "" $newvalue]
} else {
# Here we only allow int or floating numbers
#
# If the new value is not a valid number, the old value will be
# kept due to the "catch" statements
#
if {[catch {expr 0+$newvalue}]} {
set newvalue 0
set data(-value) 0
set changed 1
}
if {$newvalue == ""} {
if {![string is true -strict $data(-allowempty)]} {
set newvalue 0
set changed 1
} else {
set data(-value) ""
}
}
if {$newvalue != ""} {
# Change this to a valid decimal string (trim leading 0)
#
regsub -- {^[0]*} $newvalue "" newvalue
if {[catch {expr 0+$newvalue}]} {
set newvalue 0
set data(-value) 0
set changed 1
}
if {$newvalue == ""} {
set newvalue 0
}
if {[string is true -strict $data(-integer)]} {
set data(-value) [tixGetInt -nocomplain $newvalue]
} else {
if {[catch {set data(-value) [format "%d" $newvalue]}]} {
if {[catch {set data(-value) [expr $newvalue+0.0]}]} {
set data(-value) $oldvalue
}
}
}
# Now perform boundary checking
#
if {$data(-max) != "" && $data(-value) > $data(-max)} {
set data(-value) $data(-max)
}
if {$data(-min) != "" && $data(-value) < $data(-min)} {
set data(-value) $data(-min)
}
}
}
if {! $noUpdate} {
tixVariable:UpdateVariable $w
}
if {$forced || ($newvalue ne $data(-value)) || $changed} {
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $data(-value)
$data(w:entry) icursor $oldCursor
if {[info exists oldSelection]} {
eval [list $data(w:entry) selection range] $oldSelection
}
}
if {!$data(-disablecallback) && $data(-command) != ""} {
if {![info exists data(varInited)]} {
set bind(specs) ""
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
}
proc tixControl:Invoke {w forced} {
upvar #0 $w data
catch {
unset data(edited)
}
if {[catch {$data(w:entry) index sel.first}] == 0} {
# THIS ENTRY OWNS SELECTION --> TURN IT OFF
#
$data(w:entry) select from end
$data(w:entry) select to end
}
tixControl:SetValue $w [$data(w:entry) get] 0 $forced
}
#----------------------------------------------------------------------
# The three functions StartRepeat, Repeat and StopRepeat make use of the
# data(serial) variable to discard spurious repeats: If a button is clicked
# repeatedly but is not hold down, the serial counter will increase
# successively and all "after" time event handlers will be discarded
#----------------------------------------------------------------------
proc tixControl:StartRepeat {w amount} {
if {![winfo exists $w]} {
return
}
upvar #0 $w data
incr data(serial)
# CYGNUS bug fix
# Need to set a local variable because otherwise the buttonrelease
# callback could change the value of data(serial) between now and
# the time the repeat is scheduled.
set serial $data(serial)
if {![catch {$data(w:entry) index sel.first}]} {
$data(w:entry) select from end
$data(w:entry) select to end
}
if {[info exists data(edited)]} {
unset data(edited)
tixControl:SetValue $w [$data(w:entry) get] 0 1
}
tixControl:AdjustValue $w $amount
if {$data(-autorepeat)} {
after $data(-initwait) tixControl:Repeat $w $amount $serial
}
focus $data(w:entry)
}
proc tixControl:Repeat {w amount serial} {
if {![winfo exists $w]} {
return
}
upvar #0 $w data
if {$serial eq $data(serial)} {
tixControl:AdjustValue $w $amount
if {$data(-autorepeat)} {
after $data(-repeatrate) tixControl:Repeat $w $amount $serial
}
}
}
proc tixControl:StopRepeat {w} {
upvar #0 $w data
incr data(serial)
}
proc tixControl:Destructor {w} {
tixVariable:DeleteVariable $w
# Chain this to the superclass
#
tixChainMethod $w Destructor
}
# ToDo: maybe should return -code break if the value is not good ...
#
proc tixControl:Tab {w detail} {
upvar #0 $w data
if {![info exists data(edited)]} {
return
} else {
unset data(edited)
}
tixControl:invoke $w
}
proc tixControl:Escape {w} {
upvar #0 $w data
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $data(-value)
}
proc tixControl:KeyPress {w} {
upvar #0 $w data
if {$data(-selectmode) eq "normal"} {
set data(edited) 0
return
} else {
# == "immediate"
after 1 tixControl:invoke $w
}
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Control.tcl,v 1.9 2004/03/28 02:44:57 hobbs Exp $
#
# Control.tcl --
#
# Implements the TixControl Widget. It is called the "SpinBox"
# in other toolkits.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixControl {
-classname TixControl
-superclass tixLabelWidget
-method {
incr decr invoke update
}
-flag {
-allowempty -autorepeat -command -decrcmd -disablecallback
-disabledforeground -incrcmd -initwait -integer -llimit
-repeatrate -max -min -selectmode -step -state -validatecmd
-value -variable -ulimit
}
-forcecall {
-variable -state
}
-configspec {
{-allowempty allowEmpty AllowEmpty false}
{-autorepeat autoRepeat AutoRepeat true}
{-command command Command ""}
{-decrcmd decrCmd DecrCmd ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-disabledforeground disabledForeground DisabledForeground #303030}
{-incrcmd incrCmd IncrCmd ""}
{-initwait initWait InitWait 500}
{-integer integer Integer false}
{-max max Max ""}
{-min min Min ""}
{-repeatrate repeatRate RepeatRate 50}
{-step step Step 1}
{-state state State normal}
{-selectmode selectMode SelectMode normal}
{-validatecmd validateCmd ValidateCmd ""}
{-value value Value 0}
{-variable variable Variable ""}
}
-alias {
{-llimit -min}
{-ulimit -max}
}
-default {
{.borderWidth 0}
{*entry.relief sunken}
{*entry.width 5}
{*label.anchor e}
{*label.borderWidth 0}
{*Button.anchor c}
{*Button.borderWidth 2}
{*Button.highlightThickness 1}
{*Button.takeFocus 0}
}
}
proc tixControl:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
set data(varInited) 0
set data(serial) 0
}
proc tixControl:ConstructFramedWidget {w frame} {
upvar #0 $w data
tixChainMethod $w ConstructFramedWidget $frame
set data(w:entry) [entry $frame.entry]
set data(w:incr) \
[button $frame.incr -bitmap [tix getbitmap incr] -takefocus 0]
set data(w:decr) \
[button $frame.decr -bitmap [tix getbitmap decr] -takefocus 0]
# tixForm $data(w:entry) -left 0 -top 0 -bottom -1 -right $data(w:decr)
# tixForm $data(w:incr) -right -1 -top 0 -bottom %50
# tixForm $data(w:decr) -right -1 -top $data(w:incr) -bottom -1
pack $data(w:entry) -side left -expand yes -fill both
pack $data(w:decr) -side bottom -fill both -expand yes
pack $data(w:incr) -side top -fill both -expand yes
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $data(-value)
# This value is used to configure the disable/normal fg of the ebtry
set data(entryfg) [$data(w:entry) cget -fg]
set data(labelfg) [$data(w:label) cget -fg]
}
proc tixControl:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
bind $data(w:incr) <ButtonPress-1> \
[list after idle tixControl:StartRepeat $w 1]
bind $data(w:decr) <ButtonPress-1> \
[list after idle tixControl:StartRepeat $w -1]
# These bindings will stop the button autorepeat when the
# mouse button is up
foreach btn [list $data(w:incr) $data(w:decr)] {
bind $btn <ButtonRelease-1> [list tixControl:StopRepeat $w]
}
tixSetMegaWidget $data(w:entry) $w
# If user press <return>, verify the value and call the -command
#
tixAddBindTag $data(w:entry) TixControl:Entry
}
proc tixControlBind {} {
tixBind TixControl:Entry <Return> {
tixControl:Invoke [tixGetMegaWidget %W] 1
}
tixBind TixControl:Entry <Escape> {
tixControl:Escape [tixGetMegaWidget %W]
}
tixBind TixControl:Entry <Up> {
[tixGetMegaWidget %W] incr
}
tixBind TixControl:Entry <Down> {
[tixGetMegaWidget %W] decr
}
tixBind TixControl:Entry <FocusOut> {
if {"%d" eq "NotifyNonlinear" || "%d" eq "NotifyNonlinearVirtual"} {
tixControl:Tab [tixGetMegaWidget %W] %d
}
}
tixBind TixControl:Entry <Any-KeyPress> {
tixControl:KeyPress [tixGetMegaWidget %W]
}
tixBind TixControl:Entry <Any-Tab> {
# This has a higher priority than the <Any-KeyPress> binding
# --> so that data(edited) is not set
}
}
#----------------------------------------------------------------------
# CONFIG OPTIONS
#----------------------------------------------------------------------
proc tixControl:config-state {w arg} {
upvar #0 $w data
if {$arg eq "normal"} {
$data(w:incr) config -state $arg
$data(w:decr) config -state $arg
catch {
$data(w:label) config -fg $data(labelfg)
}
$data(w:entry) config -state $arg -fg $data(entryfg)
} else {
$data(w:incr) config -state $arg
$data(w:decr) config -state $arg
catch {
$data(w:label) config -fg $data(-disabledforeground)
}
$data(w:entry) config -state $arg -fg $data(-disabledforeground)
}
}
proc tixControl:config-value {w value} {
upvar #0 $w data
tixControl:SetValue $w $value 0 1
# This will tell the Intrinsics: "Please use this value"
# because "value" might be altered by SetValues
#
return $data(-value)
}
proc tixControl:config-variable {w arg} {
upvar #0 $w data
if {[tixVariable:ConfigVariable $w $arg]} {
# The value of data(-value) is changed if tixVariable:ConfigVariable
# returns true
tixControl:SetValue $w $data(-value) 1 1
}
catch {
unset data(varInited)
}
set data(-variable) $arg
}
#----------------------------------------------------------------------
# User Commands
#----------------------------------------------------------------------
proc tixControl:incr {w {by 1}} {
upvar #0 $w data
if {$data(-state) ne "disabled"} {
if {![catch {$data(w:entry) index sel.first}]} {
$data(w:entry) select from end
$data(w:entry) select to end
}
# CYGNUS - why set value before changing it?
#tixControl:SetValue $w [$data(w:entry) get] 0 1
tixControl:AdjustValue $w $by
}
}
proc tixControl:decr {w {by 1}} {
upvar #0 $w data
if {$data(-state) ne "disabled"} {
if {![catch {$data(w:entry) index sel.first}]} {
$data(w:entry) select from end
$data(w:entry) select to end
}
# CYGNUS - why set value before changing it?
#tixControl:SetValue $w [$data(w:entry) get] 0 1
tixControl:AdjustValue $w [expr {0 - $by}]
}
}
proc tixControl:invoke {w} {
upvar #0 $w data
tixControl:Invoke $w 0
}
proc tixControl:update {w} {
upvar #0 $w data
if {[info exists data(edited)]} {
tixControl:invoke $w
}
}
#----------------------------------------------------------------------
# Internal Commands
#----------------------------------------------------------------------
# Change the value by a multiple of the data(-step)
#
proc tixControl:AdjustValue {w amount} {
upvar #0 $w data
if {$amount == 1 && [llength $data(-incrcmd)]} {
set newValue [tixEvalCmdBinding $w $data(-incrcmd) "" $data(-value)]
} elseif {$amount == -1 && [llength $data(-decrcmd)]} {
set newValue [tixEvalCmdBinding $w $data(-decrcmd) "" $data(-value)]
} else {
set newValue [expr {$data(-value) + $amount * $data(-step)}]
}
if {$data(-state) ne "disabled"} {
tixControl:SetValue $w $newValue 0 1
}
}
proc tixControl:SetValue {w newvalue noUpdate forced} {
upvar #0 $w data
if {[$data(w:entry) selection present]} {
set oldSelection [list [$data(w:entry) index sel.first] \
[$data(w:entry) index sel.last]]
}
set oldvalue $data(-value)
set oldCursor [$data(w:entry) index insert]
set changed 0
if {[llength $data(-validatecmd)]} {
# Call the user supplied validation command
#
set data(-value) [tixEvalCmdBinding $w $data(-validatecmd) "" $newvalue]
} else {
# Here we only allow int or floating numbers
#
# If the new value is not a valid number, the old value will be
# kept due to the "catch" statements
#
if {[catch {expr 0+$newvalue}]} {
set newvalue 0
set data(-value) 0
set changed 1
}
if {$newvalue == ""} {
if {![string is true -strict $data(-allowempty)]} {
set newvalue 0
set changed 1
} else {
set data(-value) ""
}
}
if {$newvalue != ""} {
# Change this to a valid decimal string (trim leading 0)
#
regsub -- {^[0]*} $newvalue "" newvalue
if {[catch {expr 0+$newvalue}]} {
set newvalue 0
set data(-value) 0
set changed 1
}
if {$newvalue == ""} {
set newvalue 0
}
if {[string is true -strict $data(-integer)]} {
set data(-value) [tixGetInt -nocomplain $newvalue]
} else {
if {[catch {set data(-value) [format "%d" $newvalue]}]} {
if {[catch {set data(-value) [expr $newvalue+0.0]}]} {
set data(-value) $oldvalue
}
}
}
# Now perform boundary checking
#
if {$data(-max) != "" && $data(-value) > $data(-max)} {
set data(-value) $data(-max)
}
if {$data(-min) != "" && $data(-value) < $data(-min)} {
set data(-value) $data(-min)
}
}
}
if {! $noUpdate} {
tixVariable:UpdateVariable $w
}
if {$forced || ($newvalue ne $data(-value)) || $changed} {
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $data(-value)
$data(w:entry) icursor $oldCursor
if {[info exists oldSelection]} {
eval [list $data(w:entry) selection range] $oldSelection
}
}
if {!$data(-disablecallback) && $data(-command) != ""} {
if {![info exists data(varInited)]} {
set bind(specs) ""
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
}
proc tixControl:Invoke {w forced} {
upvar #0 $w data
catch {
unset data(edited)
}
if {[catch {$data(w:entry) index sel.first}] == 0} {
# THIS ENTRY OWNS SELECTION --> TURN IT OFF
#
$data(w:entry) select from end
$data(w:entry) select to end
}
tixControl:SetValue $w [$data(w:entry) get] 0 $forced
}
#----------------------------------------------------------------------
# The three functions StartRepeat, Repeat and StopRepeat make use of the
# data(serial) variable to discard spurious repeats: If a button is clicked
# repeatedly but is not hold down, the serial counter will increase
# successively and all "after" time event handlers will be discarded
#----------------------------------------------------------------------
proc tixControl:StartRepeat {w amount} {
if {![winfo exists $w]} {
return
}
upvar #0 $w data
incr data(serial)
# CYGNUS bug fix
# Need to set a local variable because otherwise the buttonrelease
# callback could change the value of data(serial) between now and
# the time the repeat is scheduled.
set serial $data(serial)
if {![catch {$data(w:entry) index sel.first}]} {
$data(w:entry) select from end
$data(w:entry) select to end
}
if {[info exists data(edited)]} {
unset data(edited)
tixControl:SetValue $w [$data(w:entry) get] 0 1
}
tixControl:AdjustValue $w $amount
if {$data(-autorepeat)} {
after $data(-initwait) tixControl:Repeat $w $amount $serial
}
focus $data(w:entry)
}
proc tixControl:Repeat {w amount serial} {
if {![winfo exists $w]} {
return
}
upvar #0 $w data
if {$serial eq $data(serial)} {
tixControl:AdjustValue $w $amount
if {$data(-autorepeat)} {
after $data(-repeatrate) tixControl:Repeat $w $amount $serial
}
}
}
proc tixControl:StopRepeat {w} {
upvar #0 $w data
incr data(serial)
}
proc tixControl:Destructor {w} {
tixVariable:DeleteVariable $w
# Chain this to the superclass
#
tixChainMethod $w Destructor
}
# ToDo: maybe should return -code break if the value is not good ...
#
proc tixControl:Tab {w detail} {
upvar #0 $w data
if {![info exists data(edited)]} {
return
} else {
unset data(edited)
}
tixControl:invoke $w
}
proc tixControl:Escape {w} {
upvar #0 $w data
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $data(-value)
}
proc tixControl:KeyPress {w} {
upvar #0 $w data
if {$data(-selectmode) eq "normal"} {
set data(edited) 0
return
} else {
# == "immediate"
after 1 tixControl:invoke $w
}
}

View File

@@ -1,103 +1,103 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DefSchm.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
#
# DefSchm.tcl --
#
# Implements the default color and font schemes for Tix.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
proc tixSetDefaultFontset {} {
global tixOption tcl_platform
switch -- $tcl_platform(platform) "windows" {
# This should be Tahoma for Win2000/XP
set font "MS Sans Serif"
set fixedfont "Courier New"
set size 8
} unix {
set font "helvetica"
set fixedfont "courier"
set size -12
}
set tixOption(font) [list $font $size]
set tixOption(bold_font) [list $font $size bold]
set tixOption(menu_font) [list $font $size]
set tixOption(italic_font) [list $font $size bold italic]
set tixOption(fixed_font) [list $fixedfont $size]
set tixOption(border1) 1
}
proc tixSetDefaultScheme-Color {} {
global tixOption
set tixOption(bg) #d9d9d9
set tixOption(fg) black
set tixOption(dark1_bg) #c3c3c3
set tixOption(dark1_fg) black
set tixOption(dark2_bg) #a3a3a3
set tixOption(dark2_fg) black
set tixOption(inactive_bg) #a3a3a3
set tixOption(inactive_fg) black
set tixOption(light1_bg) #ececec
set tixOption(light1_fg) white
set tixOption(light2_bg) #fcfcfc
set tixOption(light2_fg) white
set tixOption(active_bg) $tixOption(dark1_bg)
set tixOption(active_fg) $tixOption(fg)
set tixOption(disabled_fg) gray55
set tixOption(input1_bg) #d9d9d9
set tixOption(input2_bg) #d9d9d9
set tixOption(output1_bg) $tixOption(dark1_bg)
set tixOption(output2_bg) $tixOption(bg)
set tixOption(select_fg) black
set tixOption(select_bg) #c3c3c3
set tixOption(selector) #b03060
}
proc tixSetDefaultScheme-Mono {} {
global tixOption
set tixOption(bg) lightgray
set tixOption(fg) black
set tixOption(dark1_bg) gray70
set tixOption(dark1_fg) black
set tixOption(dark2_bg) gray60
set tixOption(dark2_fg) white
set tixOption(inactive_bg) lightgray
set tixOption(inactive_fg) black
set tixOption(light1_bg) gray90
set tixOption(light1_fg) white
set tixOption(light2_bg) gray95
set tixOption(light2_fg) white
set tixOption(active_bg) gray90
set tixOption(active_fg) $tixOption(fg)
set tixOption(disabled_fg) gray55
set tixOption(input1_bg) $tixOption(light1_bg)
set tixOption(input2_bg) $tixOption(light1_bg)
set tixOption(output1_bg) $tixOption(light1_bg)
set tixOption(output2_bg) $tixOption(light1_bg)
set tixOption(select_fg) white
set tixOption(select_bg) black
set tixOption(selector) black
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DefSchm.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
#
# DefSchm.tcl --
#
# Implements the default color and font schemes for Tix.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
proc tixSetDefaultFontset {} {
global tixOption tcl_platform
switch -- $tcl_platform(platform) "windows" {
# This should be Tahoma for Win2000/XP
set font "MS Sans Serif"
set fixedfont "Courier New"
set size 8
} unix {
set font "helvetica"
set fixedfont "courier"
set size -12
}
set tixOption(font) [list $font $size]
set tixOption(bold_font) [list $font $size bold]
set tixOption(menu_font) [list $font $size]
set tixOption(italic_font) [list $font $size bold italic]
set tixOption(fixed_font) [list $fixedfont $size]
set tixOption(border1) 1
}
proc tixSetDefaultScheme-Color {} {
global tixOption
set tixOption(bg) #d9d9d9
set tixOption(fg) black
set tixOption(dark1_bg) #c3c3c3
set tixOption(dark1_fg) black
set tixOption(dark2_bg) #a3a3a3
set tixOption(dark2_fg) black
set tixOption(inactive_bg) #a3a3a3
set tixOption(inactive_fg) black
set tixOption(light1_bg) #ececec
set tixOption(light1_fg) white
set tixOption(light2_bg) #fcfcfc
set tixOption(light2_fg) white
set tixOption(active_bg) $tixOption(dark1_bg)
set tixOption(active_fg) $tixOption(fg)
set tixOption(disabled_fg) gray55
set tixOption(input1_bg) #d9d9d9
set tixOption(input2_bg) #d9d9d9
set tixOption(output1_bg) $tixOption(dark1_bg)
set tixOption(output2_bg) $tixOption(bg)
set tixOption(select_fg) black
set tixOption(select_bg) #c3c3c3
set tixOption(selector) #b03060
}
proc tixSetDefaultScheme-Mono {} {
global tixOption
set tixOption(bg) lightgray
set tixOption(fg) black
set tixOption(dark1_bg) gray70
set tixOption(dark1_fg) black
set tixOption(dark2_bg) gray60
set tixOption(dark2_fg) white
set tixOption(inactive_bg) lightgray
set tixOption(inactive_fg) black
set tixOption(light1_bg) gray90
set tixOption(light1_fg) white
set tixOption(light2_bg) gray95
set tixOption(light2_fg) white
set tixOption(active_bg) gray90
set tixOption(active_fg) $tixOption(fg)
set tixOption(disabled_fg) gray55
set tixOption(input1_bg) $tixOption(light1_bg)
set tixOption(input2_bg) $tixOption(light1_bg)
set tixOption(output1_bg) $tixOption(light1_bg)
set tixOption(output2_bg) $tixOption(light1_bg)
set tixOption(select_fg) white
set tixOption(select_bg) black
set tixOption(selector) black
}

View File

@@ -1,175 +1,175 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DialogS.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# DialogS.tcl --
#
#
# Implements the DialogShell widget. It tells the window
# manager that it is a dialog window and should be treated specially.
# The exact treatment depends on the treatment of the window
# manager
#
# Copyright (c) 1994-1996, Expert Interface Technologies
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDialogShell {
-superclass tixShell
-classname TixDialogShell
-method {
popdown popup center
}
-flag {
-mapped -minheight -minwidth -parent -transient
}
-static {}
-configspec {
{-mapped mapped Mapped 0}
{-minwidth minWidth MinWidth 0}
{-minheight minHeight MinHeight 0}
{-transient transient Transient true}
{-parent parent Parent ""}
}
}
#----------------------------------------------------------------------
# Construct widget
#----------------------------------------------------------------------
proc tixDialogShell:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
# Set the title of this shell appropriately
#
if {$data(-title) == ""} {
# dynamically sets the title
#
set data(-title) [winfo name $w]
}
wm title $w $data(-title)
# Set the parent of this dialog shell
#
if {$data(-parent) == ""} {
set data(-parent) [winfo parent $w]
}
# Set the minsize and maxsize of the thing
#
wm minsize $w $data(-minwidth) $data(-minheight)
wm transient $w ""
}
# The next procedures manage the dialog boxes
#
proc tixDialogShell:popup {w {parent ""}} {
upvar #0 $w data
# First update to make sure the boxes are the right size
#
update idletask
# Then we set the position and update
#
# tixDialogShell:center $w $parent
# and now make it visible. Viola! Centered over parent.
#
wm deiconify $w
after idle raise $w
}
# This procedure centers a dialog box over a window making sure that the
# dialog box doesn't appear off the screen
#
# However, if the parent is smaller than this dialog, make this dialog
# appear at parent(x,y) + (20,20)
#
proc tixDialogShell:center {w {parent ""}} {
upvar #0 $w data
# Tell the WM that we'll do this ourselves.
wm sizefrom $w user
wm positionfrom $w user
if {$parent == ""} {
set parent $data(-parent)
}
if {$parent == "" || [catch {set parent [winfo toplevel $parent]}]} {
set parent "."
}
# Where is my parent and what are it's dimensions
#
if {$parent != ""} {
set pargeo [split [wm geometry $parent] "+x"]
set parentW [lindex $pargeo 0]
set parentH [lindex $pargeo 1]
set parx [lindex $pargeo 2]
set pary [lindex $pargeo 3]
if {[string is true -strict $data(-transient)]} {
wm transient $w $parent
}
} else {
set parentW [winfo screenwidth $w]
set parentH [winfo screenheight $w]
set parx 0
set pary 0
set parent [winfo parent $w]
}
# What are is the offset of the virtual window
set vrootx [winfo vrootx $parent]
set vrooty [winfo vrooty $parent]
# What are my dimensions ?
set dialogW [winfo reqwidth $w]
set dialogH [winfo reqheight $w]
if {$dialogW < $parentW-30 || $dialogW < $parentH-30} {
set dialogx [expr {$parx+($parentW-$dialogW)/2+$vrootx}]
set dialogy [expr {$pary+($parentH-$dialogH)/2+$vrooty}]
} else {
# This dialog is too big. Place it at (parentx, parenty) + (20,20)
#
set dialogx [expr {$parx+20+$vrootx}]
set dialogy [expr {$pary+20+$vrooty}]
}
set maxx [expr {[winfo screenwidth $parent] - $dialogW}]
set maxy [expr {[winfo screenheight $parent] - $dialogH}]
# Make sure it doesn't go off screen
#
if {$dialogx < 0} {
set dialogx 0
} else {
if {$dialogx > $maxx} {
set dialogx $maxx
}
}
if {$dialogy < 0} {
set dialogy 0
} else {
if {$dialogy > $maxy} {
set dialogy $maxy
}
}
# set my new position (and dimensions)
#
if {[wm geometry $w] == "1x1+0+0"} {
wm geometry $w ${dialogW}x${dialogH}+${dialogx}+${dialogy}
}
}
proc tixDialogShell:popdown {w args} {
wm withdraw $w
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DialogS.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# DialogS.tcl --
#
#
# Implements the DialogShell widget. It tells the window
# manager that it is a dialog window and should be treated specially.
# The exact treatment depends on the treatment of the window
# manager
#
# Copyright (c) 1994-1996, Expert Interface Technologies
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDialogShell {
-superclass tixShell
-classname TixDialogShell
-method {
popdown popup center
}
-flag {
-mapped -minheight -minwidth -parent -transient
}
-static {}
-configspec {
{-mapped mapped Mapped 0}
{-minwidth minWidth MinWidth 0}
{-minheight minHeight MinHeight 0}
{-transient transient Transient true}
{-parent parent Parent ""}
}
}
#----------------------------------------------------------------------
# Construct widget
#----------------------------------------------------------------------
proc tixDialogShell:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
# Set the title of this shell appropriately
#
if {$data(-title) == ""} {
# dynamically sets the title
#
set data(-title) [winfo name $w]
}
wm title $w $data(-title)
# Set the parent of this dialog shell
#
if {$data(-parent) == ""} {
set data(-parent) [winfo parent $w]
}
# Set the minsize and maxsize of the thing
#
wm minsize $w $data(-minwidth) $data(-minheight)
wm transient $w ""
}
# The next procedures manage the dialog boxes
#
proc tixDialogShell:popup {w {parent ""}} {
upvar #0 $w data
# First update to make sure the boxes are the right size
#
update idletask
# Then we set the position and update
#
# tixDialogShell:center $w $parent
# and now make it visible. Viola! Centered over parent.
#
wm deiconify $w
after idle raise $w
}
# This procedure centers a dialog box over a window making sure that the
# dialog box doesn't appear off the screen
#
# However, if the parent is smaller than this dialog, make this dialog
# appear at parent(x,y) + (20,20)
#
proc tixDialogShell:center {w {parent ""}} {
upvar #0 $w data
# Tell the WM that we'll do this ourselves.
wm sizefrom $w user
wm positionfrom $w user
if {$parent == ""} {
set parent $data(-parent)
}
if {$parent == "" || [catch {set parent [winfo toplevel $parent]}]} {
set parent "."
}
# Where is my parent and what are it's dimensions
#
if {$parent != ""} {
set pargeo [split [wm geometry $parent] "+x"]
set parentW [lindex $pargeo 0]
set parentH [lindex $pargeo 1]
set parx [lindex $pargeo 2]
set pary [lindex $pargeo 3]
if {[string is true -strict $data(-transient)]} {
wm transient $w $parent
}
} else {
set parentW [winfo screenwidth $w]
set parentH [winfo screenheight $w]
set parx 0
set pary 0
set parent [winfo parent $w]
}
# What are is the offset of the virtual window
set vrootx [winfo vrootx $parent]
set vrooty [winfo vrooty $parent]
# What are my dimensions ?
set dialogW [winfo reqwidth $w]
set dialogH [winfo reqheight $w]
if {$dialogW < $parentW-30 || $dialogW < $parentH-30} {
set dialogx [expr {$parx+($parentW-$dialogW)/2+$vrootx}]
set dialogy [expr {$pary+($parentH-$dialogH)/2+$vrooty}]
} else {
# This dialog is too big. Place it at (parentx, parenty) + (20,20)
#
set dialogx [expr {$parx+20+$vrootx}]
set dialogy [expr {$pary+20+$vrooty}]
}
set maxx [expr {[winfo screenwidth $parent] - $dialogW}]
set maxy [expr {[winfo screenheight $parent] - $dialogH}]
# Make sure it doesn't go off screen
#
if {$dialogx < 0} {
set dialogx 0
} else {
if {$dialogx > $maxx} {
set dialogx $maxx
}
}
if {$dialogy < 0} {
set dialogy 0
} else {
if {$dialogy > $maxy} {
set dialogy $maxy
}
}
# set my new position (and dimensions)
#
if {[wm geometry $w] == "1x1+0+0"} {
wm geometry $w ${dialogW}x${dialogH}+${dialogx}+${dialogy}
}
}
proc tixDialogShell:popdown {w args} {
wm withdraw $w
}

View File

@@ -1,207 +1,207 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirBox.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
#
# DirBox.tcl --
#
# Implements the tixDirSelectBox widget.
#
# - overrides the -browsecmd and -command options of the
# HList subwidget
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDirSelectBox {
-classname TixDirSelectBox
-superclass tixPrimitive
-method {
}
-flag {
-command -disablecallback -value
}
-configspec {
{-command command Command ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-label label Label "Directory:"}
{-value value Value ""}
}
-forcecall {
-value -label
}
-default {
{*combo*listbox.height 5}
{*combo.label.anchor w}
{*combo.labelSide top}
{*combo.history true}
{*combo.historyLimit 20}
}
}
proc tixDirSelectBox:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
}
proc tixDirSelectBox:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:dircbx) [tixFileComboBox $w.dircbx]
set data(w:dirlist) [tixDirList $w.dirlist]
pack $data(w:dircbx) -side top -fill x -padx 4 -pady 2
pack $data(w:dirlist) -side top -fill both -expand yes -padx 4 -pady 2
if {$data(-value) eq ""} {
set data(-value) [pwd]
}
}
proc tixDirSelectBox:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:dircbx) config -command [list tixDirSelectBox:Cmd-DirCbx $w]
$data(w:dirlist) config -command [list tixDirSelectBox:Cmd-DirList $w]\
-browsecmd [list tixDirSelectBox:Browse-DirList $w]
}
#----------------------------------------------------------------------
# Incoming event: User
#----------------------------------------------------------------------
# User activates the FileComboBox
#
#
proc tixDirSelectBox:Cmd-DirCbx {w args} {
upvar #0 $w data
set fInfo [tixEvent value]
set path [lindex $fInfo 0]
if {![file exists $path]} {
# 1.1 Check for validity. The pathname cannot contain invalid chars
#
if {![tixFSIsValid $path]} {
tk_messageBox -title "Invalid Directory" \
-type ok -icon error \
-message "\"$path\" is not a valid directory name"
$data(w:dircbx) config \
-text [tixFSDisplayName [file normalize $data(-value)]] \
-directory $data(-value)
return
}
# 1.2 Prompt for creation
#
set choice [tk_messageBox -title "Create Directory?" \
-type yesno -icon question \
-message "Directory \"$path\" does not exist.\
\nDo you want to create it?"]
if {$choice eq "yes"
&& [catch {file mkdir [file dirname $path]} err]} {
tk_messageBox -title "Error Creating Directory" \
-icon error -type ok \
-message "Cannot create directory \"$path\":\n$err"
set choice "no"
}
if {$choice eq "no"} {
$data(w:dircbx) config \
-text [tixFSDisplayName [file normalize $data(-value)]] \
-directory $data(-value)
return
}
tixDirSelectBox:SetValue $w $path 1 1
} elseif {![file isdirectory $path]} {
# 2.1: Can't choose a non-directory file
#
tk_messageBox -title "Invalid Directory" \
-type ok -icon error \
-message "\"$path\" is not a directory"
$data(w:dircbx) config \
-text [tixFSDisplayName [file normalize $data(-value)]] \
-directory $data(-value)
return
} else {
# OK. It is an existing directory
#
tixDirSelectBox:SetValue $w $path 1 1
}
}
# User activates the dir list
#
#
proc tixDirSelectBox:Cmd-DirList {w args} {
upvar #0 $w data
set dir $data(-value)
catch {set dir [tixEvent flag V]}
set dir [tixFSNormalize $dir]
tixDirSelectBox:SetValue $w $dir 0 0
}
# User browses the dir list
#
#
proc tixDirSelectBox:Browse-DirList {w args} {
upvar #0 $w data
set dir $data(-value)
catch {set dir [tixEvent flag V]}
set dir [tixFSNormalize $dir]
tixDirSelectBox:SetValue $w $dir 0 0
}
#----------------------------------------------------------------------
# Incoming event: Application
#----------------------------------------------------------------------
proc tixDirSelectBox:config-value {w value} {
upvar #0 $w data
set value [tixFSNormalize $value]
tixDirSelectBox:SetValue $w $value 1 1
return $value
}
proc tixDirSelectBox:config-label {w value} {
upvar #0 $w data
$data(w:dircbx) subwidget combo config -label $value
}
#----------------------------------------------------------------------
#
# Internal functions
#
#----------------------------------------------------------------------
# Arguments:
# callback:Bool Should we invoke the the -command.
# setlist:Bool Should we set the -value of the DirList subwidget.
#
proc tixDirSelectBox:SetValue {w dir callback setlist} {
upvar #0 $w data
set data(-value) $dir
$data(w:dircbx) config -text [tixFSDisplayName $dir] -directory $dir
if {$setlist && [file isdirectory $dir]} {
tixSetSilent $data(w:dirlist) $dir
}
if {$callback} {
if {!$data(-disablecallback) && [llength $data(-command)]} {
set bind(specs) {%V}
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirBox.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
#
# DirBox.tcl --
#
# Implements the tixDirSelectBox widget.
#
# - overrides the -browsecmd and -command options of the
# HList subwidget
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDirSelectBox {
-classname TixDirSelectBox
-superclass tixPrimitive
-method {
}
-flag {
-command -disablecallback -value
}
-configspec {
{-command command Command ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-label label Label "Directory:"}
{-value value Value ""}
}
-forcecall {
-value -label
}
-default {
{*combo*listbox.height 5}
{*combo.label.anchor w}
{*combo.labelSide top}
{*combo.history true}
{*combo.historyLimit 20}
}
}
proc tixDirSelectBox:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
}
proc tixDirSelectBox:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:dircbx) [tixFileComboBox $w.dircbx]
set data(w:dirlist) [tixDirList $w.dirlist]
pack $data(w:dircbx) -side top -fill x -padx 4 -pady 2
pack $data(w:dirlist) -side top -fill both -expand yes -padx 4 -pady 2
if {$data(-value) eq ""} {
set data(-value) [pwd]
}
}
proc tixDirSelectBox:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:dircbx) config -command [list tixDirSelectBox:Cmd-DirCbx $w]
$data(w:dirlist) config -command [list tixDirSelectBox:Cmd-DirList $w]\
-browsecmd [list tixDirSelectBox:Browse-DirList $w]
}
#----------------------------------------------------------------------
# Incoming event: User
#----------------------------------------------------------------------
# User activates the FileComboBox
#
#
proc tixDirSelectBox:Cmd-DirCbx {w args} {
upvar #0 $w data
set fInfo [tixEvent value]
set path [lindex $fInfo 0]
if {![file exists $path]} {
# 1.1 Check for validity. The pathname cannot contain invalid chars
#
if {![tixFSIsValid $path]} {
tk_messageBox -title "Invalid Directory" \
-type ok -icon error \
-message "\"$path\" is not a valid directory name"
$data(w:dircbx) config \
-text [tixFSDisplayName [file normalize $data(-value)]] \
-directory $data(-value)
return
}
# 1.2 Prompt for creation
#
set choice [tk_messageBox -title "Create Directory?" \
-type yesno -icon question \
-message "Directory \"$path\" does not exist.\
\nDo you want to create it?"]
if {$choice eq "yes"
&& [catch {file mkdir [file dirname $path]} err]} {
tk_messageBox -title "Error Creating Directory" \
-icon error -type ok \
-message "Cannot create directory \"$path\":\n$err"
set choice "no"
}
if {$choice eq "no"} {
$data(w:dircbx) config \
-text [tixFSDisplayName [file normalize $data(-value)]] \
-directory $data(-value)
return
}
tixDirSelectBox:SetValue $w $path 1 1
} elseif {![file isdirectory $path]} {
# 2.1: Can't choose a non-directory file
#
tk_messageBox -title "Invalid Directory" \
-type ok -icon error \
-message "\"$path\" is not a directory"
$data(w:dircbx) config \
-text [tixFSDisplayName [file normalize $data(-value)]] \
-directory $data(-value)
return
} else {
# OK. It is an existing directory
#
tixDirSelectBox:SetValue $w $path 1 1
}
}
# User activates the dir list
#
#
proc tixDirSelectBox:Cmd-DirList {w args} {
upvar #0 $w data
set dir $data(-value)
catch {set dir [tixEvent flag V]}
set dir [tixFSNormalize $dir]
tixDirSelectBox:SetValue $w $dir 0 0
}
# User browses the dir list
#
#
proc tixDirSelectBox:Browse-DirList {w args} {
upvar #0 $w data
set dir $data(-value)
catch {set dir [tixEvent flag V]}
set dir [tixFSNormalize $dir]
tixDirSelectBox:SetValue $w $dir 0 0
}
#----------------------------------------------------------------------
# Incoming event: Application
#----------------------------------------------------------------------
proc tixDirSelectBox:config-value {w value} {
upvar #0 $w data
set value [tixFSNormalize $value]
tixDirSelectBox:SetValue $w $value 1 1
return $value
}
proc tixDirSelectBox:config-label {w value} {
upvar #0 $w data
$data(w:dircbx) subwidget combo config -label $value
}
#----------------------------------------------------------------------
#
# Internal functions
#
#----------------------------------------------------------------------
# Arguments:
# callback:Bool Should we invoke the the -command.
# setlist:Bool Should we set the -value of the DirList subwidget.
#
proc tixDirSelectBox:SetValue {w dir callback setlist} {
upvar #0 $w data
set data(-value) $dir
$data(w:dircbx) config -text [tixFSDisplayName $dir] -directory $dir
if {$setlist && [file isdirectory $dir]} {
tixSetSilent $data(w:dirlist) $dir
}
if {$callback} {
if {!$data(-disablecallback) && [llength $data(-command)]} {
set bind(specs) {%V}
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
}

View File

@@ -1,95 +1,95 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirDlg.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
#
# DirDlg.tcl --
#
# Implements the Directory Selection Dialog widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDirSelectDialog {
-classname TixDirSelectDialog
-superclass tixDialogShell
-method {}
-flag {
-command
}
-configspec {
{-command command Command ""}
{-title title Title "Select A Directory"}
}
-default {
{*ok.text "OK"}
{*ok.underline 0}
{*ok.width 6}
{*cancel.text "Cancel"}
{*cancel.underline 0}
{*cancel.width 6}
{*dirbox.borderWidth 1}
{*dirbox.relief raised}
}
}
proc tixDirSelectDialog:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
# the buttons
frame $w.f -relief raised -bd 1
set data(w:ok) [button $w.f.ok -command \
"tixDirSelectDialog:OK $w"]
set data(w:cancel) [button $w.f.cancel -command \
"tixDirSelectDialog:Cancel $w"]
pack $data(w:ok) $data(w:cancel) -side left -expand yes -padx 10 -pady 8
pack $w.f -side bottom -fill x
# the dir select box
set data(w:dirbox) [tixDirSelectBox $w.dirbox \
-command [list tixDirSelectDialog:DirBoxCmd $w]]
pack $data(w:dirbox) -expand yes -fill both
}
proc tixDirSelectDialog:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
bind $w <Alt-Key-d> "focus [$data(w:dirbox) subwidget dircbx]"
}
proc tixDirSelectDialog:OK {w} {
upvar #0 $w data
wm withdraw $w
$data(w:dirbox) subwidget dircbx invoke
}
proc tixDirSelectDialog:DirBoxCmd {w args} {
upvar #0 $w data
set value [tixEvent flag V]
wm withdraw $w
tixDirSelectDialog:CallCmd $w $value
}
proc tixDirSelectDialog:CallCmd {w value} {
upvar #0 $w data
if {$data(-command) != ""} {
set bind(specs) "%V"
set bind(%V) $value
tixEvalCmdBinding $w $data(-command) bind $value
}
}
proc tixDirSelectDialog:Cancel {w} {
wm withdraw $w
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirDlg.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
#
# DirDlg.tcl --
#
# Implements the Directory Selection Dialog widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDirSelectDialog {
-classname TixDirSelectDialog
-superclass tixDialogShell
-method {}
-flag {
-command
}
-configspec {
{-command command Command ""}
{-title title Title "Select A Directory"}
}
-default {
{*ok.text "OK"}
{*ok.underline 0}
{*ok.width 6}
{*cancel.text "Cancel"}
{*cancel.underline 0}
{*cancel.width 6}
{*dirbox.borderWidth 1}
{*dirbox.relief raised}
}
}
proc tixDirSelectDialog:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
# the buttons
frame $w.f -relief raised -bd 1
set data(w:ok) [button $w.f.ok -command \
"tixDirSelectDialog:OK $w"]
set data(w:cancel) [button $w.f.cancel -command \
"tixDirSelectDialog:Cancel $w"]
pack $data(w:ok) $data(w:cancel) -side left -expand yes -padx 10 -pady 8
pack $w.f -side bottom -fill x
# the dir select box
set data(w:dirbox) [tixDirSelectBox $w.dirbox \
-command [list tixDirSelectDialog:DirBoxCmd $w]]
pack $data(w:dirbox) -expand yes -fill both
}
proc tixDirSelectDialog:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
bind $w <Alt-Key-d> "focus [$data(w:dirbox) subwidget dircbx]"
}
proc tixDirSelectDialog:OK {w} {
upvar #0 $w data
wm withdraw $w
$data(w:dirbox) subwidget dircbx invoke
}
proc tixDirSelectDialog:DirBoxCmd {w args} {
upvar #0 $w data
set value [tixEvent flag V]
wm withdraw $w
tixDirSelectDialog:CallCmd $w $value
}
proc tixDirSelectDialog:CallCmd {w value} {
upvar #0 $w data
if {$data(-command) != ""} {
set bind(specs) "%V"
set bind(%V) $value
tixEvalCmdBinding $w $data(-command) bind $value
}
}
proc tixDirSelectDialog:Cancel {w} {
wm withdraw $w
}

View File

@@ -1,272 +1,272 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirList.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# DirList.tcl --
#
# Implements the tixDirList widget.
#
# - overrides the -browsecmd and -command options of the
# HList subwidget
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDirList {
-classname TixDirList
-superclass tixScrolledHList
-method {
chdir
}
-flag {
-browsecmd -command -dircmd -disablecallback
-root -rootname -showhidden -value
}
-configspec {
{-browsecmd browseCmd BrowseCmd ""}
{-command command Command ""}
{-dircmd dirCmd DirCmd ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-root root Root ""}
{-rootname rootName RootName ""}
{-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
{-value value Value ""}
}
-default {
{.scrollbar auto}
{*borderWidth 1}
{*hlist.background #c3c3c3}
{*hlist.indent 7}
{*hlist.relief sunken}
{*hlist.height 10}
{*hlist.width 20}
{*hlist.padX 2}
{*hlist.padY 0}
{*hlist.wideSelection 0}
{*hlist.drawBranch 0}
{*hlist.highlightBackground #d9d9d9}
{*hlist.itemType imagetext}
{*hlist.takeFocus 1}
}
-forcecall {
-value
}
}
# Important data members:
#
# data(vpath)
# The currently selected vpath. This internal variable is useful on
# the Win95 platform, where an directory may correspond to more than
# one node in the hierarchy. For example, C:\Windows\Desktop\Foo
# can appead as "Desktop\Foo" and
# "Desktop\My Computer\C:\Windows\Desktop\Foo". This variable tells us
# which icon should we show given the same DOS pathname.
#
proc tixDirList:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
}
proc tixDirList:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
$data(w:hlist) config -separator [tixFSSep] -selectmode "single"
}
proc tixDirList:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:hlist) config \
-browsecmd [list tixDirList:Browse $w] \
-command [list tixDirList:Command $w]
if {$data(-value) eq ""
|| [catch {set data(-value) [tixFSNormalize $data(-value)]}]} {
set data(-value) [pwd]
}
set data(vpath) [tixFSInternal $data(-value)]
}
#----------------------------------------------------------------------
# Incoming-Events
#----------------------------------------------------------------------
proc tixDirList:Browse {w args} {
upvar #0 $w data
set vpath [tixEvent flag V]
set value [$data(w:hlist) info data $vpath]
tixDirList:HighLight $w $vpath
set data(vpath) $vpath
set data(-value) [tixFSExternal $value]
tixDirList:CallBrowseCmd $w $data(-value)
}
proc tixDirList:Command {w args} {
upvar #0 $w data
set vpath [tixEvent value]
set value [$data(w:hlist) info data $vpath]
set data(-value) [tixFSExternal $value]
tixDirList:LoadDir $w [tixFSNativeNorm $value] $vpath
tixDirList:HighLight $w $vpath
set data(vpath) $vpath
tixDirList:CallCommand $w $data(-value)
}
#----------------------------------------------------------------------
# Outgoing-Events
#----------------------------------------------------------------------
proc tixDirList:CallBrowseCmd {w npath} {
upvar #0 $w data
if {[llength $data(-browsecmd)]} {
set bind(specs) "%V"
set bind(%V) $npath
tixEvalCmdBinding $w $data(-browsecmd) bind $npath
}
}
proc tixDirList:CallCommand {w npath} {
upvar #0 $w data
if {[llength $data(-command)] && !$data(-disablecallback)} {
set bind(specs) "%V"
set bind(%V) $npath
tixEvalCmdBinding $w $data(-command) bind $npath
}
}
#----------------------------------------------------------------------
# Directory loading
#----------------------------------------------------------------------
proc tixDirList:LoadDir {w {npath ""} {vpath ""}} {
upvar #0 $w data
tixBusy $w on $data(w:hlist)
$data(w:hlist) delete all
if {$npath eq ""} {
set npath [tixFSNativeNorm $data(-value)]
set vpath [tixFSInternal $npath]
}
tixDirList:ListHierachy $w $npath $vpath
tixDirList:ListSubDirs $w $npath $vpath
tixWidgetDoWhenIdle tixBusy $w off $data(w:hlist)
}
proc tixDirList:ListHierachy {w npath vpath} {
upvar #0 $w data
set img [tix getimage openfold]
set curpath ""
foreach part [tixFSAncestors $npath] {
set curpath [file join $curpath $part]
set text [tixFSDisplayFileName $curpath]
set vpath [tixFSInternal $curpath]
$data(w:hlist) add $vpath -text $text -data $curpath -image $img
}
}
proc tixDirList:ListSubDirs {w npath vpath} {
upvar #0 $w data
$data(w:hlist) entryconfig $vpath -image [tix getimage act_fold]
set img [tix getimage folder]
foreach ent [tixFSListDir $npath 1 0 0 $data(-showhidden)] {
set curpath [file join $npath $ent]
set vp [tixFSInternal $curpath]
if {![$data(w:hlist) info exists $vp]} {
$data(w:hlist) add $vp -text $ent -data $curpath -image $img
}
}
}
proc tixDirList:SetValue {w npath vpath {flag ""}} {
upvar #0 $w data
if {$flag eq "reload" || ![$data(w:hlist) info exists $vpath]} {
tixDirList:LoadDir $w $npath $vpath
}
tixDirList:HighLight $w $vpath
set data(-value) [tixFSNativeNorm $npath]
set data(vpath) $vpath
tixDirList:CallCommand $w $data(-value)
}
proc tixDirList:HighLight {w vpath} {
upvar #0 $w data
if {$data(vpath) ne $vpath} {
set old $data(vpath)
if {[$data(w:hlist) info exists $old]} {
# Un-highlight the originally selected entry by changing its
# folder image
if {[llength [$data(w:hlist) info children $old]]} {
set img [tix getimage openfold]
} else {
set img [tix getimage folder]
}
$data(w:hlist) entryconfig $old -image $img
}
}
# Highlight the newly selected entry
#
$data(w:hlist) entryconfig $vpath -image [tix getimage act_fold]
$data(w:hlist) anchor set $vpath
$data(w:hlist) select clear
$data(w:hlist) select set $vpath
$data(w:hlist) see $vpath
}
#----------------------------------------------------------------------
# Config options
#----------------------------------------------------------------------
proc tixDirList:config-value {w value} {
upvar #0 $w data
tixDirList:chdir $w $value
return $data(-value)
}
proc tixDirList:config-showhidden {w value} {
upvar #0 $w data
tixWidgetDoWhenIdle tixDirList:LoadDir $w
}
#----------------------------------------------------------------------
# Public methods
#----------------------------------------------------------------------
proc tixDirList:chdir {w value} {
upvar #0 $w data
set npath [tixFSNativeNorm $value]
tixDirList:SetValue $w $npath [tixFSInternal $npath]
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirList.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# DirList.tcl --
#
# Implements the tixDirList widget.
#
# - overrides the -browsecmd and -command options of the
# HList subwidget
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDirList {
-classname TixDirList
-superclass tixScrolledHList
-method {
chdir
}
-flag {
-browsecmd -command -dircmd -disablecallback
-root -rootname -showhidden -value
}
-configspec {
{-browsecmd browseCmd BrowseCmd ""}
{-command command Command ""}
{-dircmd dirCmd DirCmd ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-root root Root ""}
{-rootname rootName RootName ""}
{-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
{-value value Value ""}
}
-default {
{.scrollbar auto}
{*borderWidth 1}
{*hlist.background #c3c3c3}
{*hlist.indent 7}
{*hlist.relief sunken}
{*hlist.height 10}
{*hlist.width 20}
{*hlist.padX 2}
{*hlist.padY 0}
{*hlist.wideSelection 0}
{*hlist.drawBranch 0}
{*hlist.highlightBackground #d9d9d9}
{*hlist.itemType imagetext}
{*hlist.takeFocus 1}
}
-forcecall {
-value
}
}
# Important data members:
#
# data(vpath)
# The currently selected vpath. This internal variable is useful on
# the Win95 platform, where an directory may correspond to more than
# one node in the hierarchy. For example, C:\Windows\Desktop\Foo
# can appead as "Desktop\Foo" and
# "Desktop\My Computer\C:\Windows\Desktop\Foo". This variable tells us
# which icon should we show given the same DOS pathname.
#
proc tixDirList:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
}
proc tixDirList:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
$data(w:hlist) config -separator [tixFSSep] -selectmode "single"
}
proc tixDirList:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:hlist) config \
-browsecmd [list tixDirList:Browse $w] \
-command [list tixDirList:Command $w]
if {$data(-value) eq ""
|| [catch {set data(-value) [tixFSNormalize $data(-value)]}]} {
set data(-value) [pwd]
}
set data(vpath) [tixFSInternal $data(-value)]
}
#----------------------------------------------------------------------
# Incoming-Events
#----------------------------------------------------------------------
proc tixDirList:Browse {w args} {
upvar #0 $w data
set vpath [tixEvent flag V]
set value [$data(w:hlist) info data $vpath]
tixDirList:HighLight $w $vpath
set data(vpath) $vpath
set data(-value) [tixFSExternal $value]
tixDirList:CallBrowseCmd $w $data(-value)
}
proc tixDirList:Command {w args} {
upvar #0 $w data
set vpath [tixEvent value]
set value [$data(w:hlist) info data $vpath]
set data(-value) [tixFSExternal $value]
tixDirList:LoadDir $w [tixFSNativeNorm $value] $vpath
tixDirList:HighLight $w $vpath
set data(vpath) $vpath
tixDirList:CallCommand $w $data(-value)
}
#----------------------------------------------------------------------
# Outgoing-Events
#----------------------------------------------------------------------
proc tixDirList:CallBrowseCmd {w npath} {
upvar #0 $w data
if {[llength $data(-browsecmd)]} {
set bind(specs) "%V"
set bind(%V) $npath
tixEvalCmdBinding $w $data(-browsecmd) bind $npath
}
}
proc tixDirList:CallCommand {w npath} {
upvar #0 $w data
if {[llength $data(-command)] && !$data(-disablecallback)} {
set bind(specs) "%V"
set bind(%V) $npath
tixEvalCmdBinding $w $data(-command) bind $npath
}
}
#----------------------------------------------------------------------
# Directory loading
#----------------------------------------------------------------------
proc tixDirList:LoadDir {w {npath ""} {vpath ""}} {
upvar #0 $w data
tixBusy $w on $data(w:hlist)
$data(w:hlist) delete all
if {$npath eq ""} {
set npath [tixFSNativeNorm $data(-value)]
set vpath [tixFSInternal $npath]
}
tixDirList:ListHierachy $w $npath $vpath
tixDirList:ListSubDirs $w $npath $vpath
tixWidgetDoWhenIdle tixBusy $w off $data(w:hlist)
}
proc tixDirList:ListHierachy {w npath vpath} {
upvar #0 $w data
set img [tix getimage openfold]
set curpath ""
foreach part [tixFSAncestors $npath] {
set curpath [file join $curpath $part]
set text [tixFSDisplayFileName $curpath]
set vpath [tixFSInternal $curpath]
$data(w:hlist) add $vpath -text $text -data $curpath -image $img
}
}
proc tixDirList:ListSubDirs {w npath vpath} {
upvar #0 $w data
$data(w:hlist) entryconfig $vpath -image [tix getimage act_fold]
set img [tix getimage folder]
foreach ent [tixFSListDir $npath 1 0 0 $data(-showhidden)] {
set curpath [file join $npath $ent]
set vp [tixFSInternal $curpath]
if {![$data(w:hlist) info exists $vp]} {
$data(w:hlist) add $vp -text $ent -data $curpath -image $img
}
}
}
proc tixDirList:SetValue {w npath vpath {flag ""}} {
upvar #0 $w data
if {$flag eq "reload" || ![$data(w:hlist) info exists $vpath]} {
tixDirList:LoadDir $w $npath $vpath
}
tixDirList:HighLight $w $vpath
set data(-value) [tixFSNativeNorm $npath]
set data(vpath) $vpath
tixDirList:CallCommand $w $data(-value)
}
proc tixDirList:HighLight {w vpath} {
upvar #0 $w data
if {$data(vpath) ne $vpath} {
set old $data(vpath)
if {[$data(w:hlist) info exists $old]} {
# Un-highlight the originally selected entry by changing its
# folder image
if {[llength [$data(w:hlist) info children $old]]} {
set img [tix getimage openfold]
} else {
set img [tix getimage folder]
}
$data(w:hlist) entryconfig $old -image $img
}
}
# Highlight the newly selected entry
#
$data(w:hlist) entryconfig $vpath -image [tix getimage act_fold]
$data(w:hlist) anchor set $vpath
$data(w:hlist) select clear
$data(w:hlist) select set $vpath
$data(w:hlist) see $vpath
}
#----------------------------------------------------------------------
# Config options
#----------------------------------------------------------------------
proc tixDirList:config-value {w value} {
upvar #0 $w data
tixDirList:chdir $w $value
return $data(-value)
}
proc tixDirList:config-showhidden {w value} {
upvar #0 $w data
tixWidgetDoWhenIdle tixDirList:LoadDir $w
}
#----------------------------------------------------------------------
# Public methods
#----------------------------------------------------------------------
proc tixDirList:chdir {w value} {
upvar #0 $w data
set npath [tixFSNativeNorm $value]
tixDirList:SetValue $w $npath [tixFSInternal $npath]
}

View File

@@ -1,350 +1,350 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirTree.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
#
# DirTree.tcl --
#
# Implements directory tree for Unix file systems
#
# What the indicators mean:
#
# (+): There are some subdirectories in this directory which are not
# currently visible.
# (-): This directory has some subdirectories and they are all visible
#
# none: The dir has no subdirectori(es).
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
##
## The tixDirTree require special FS handling due to it's limited
## separator idea (instead of real tree).
##
tixWidgetClass tixDirTree {
-classname TixDirTree
-superclass tixVTree
-method {
activate chdir refresh
}
-flag {
-browsecmd -command -directory -disablecallback -showhidden -value
}
-configspec {
{-browsecmd browseCmd BrowseCmd ""}
{-command command Command ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
{-value value Value ""}
}
-alias {
{-directory -value}
}
-default {
{.scrollbar auto}
{*Scrollbar.takeFocus 0}
{*borderWidth 1}
{*hlist.indicator 1}
{*hlist.background #c3c3c3}
{*hlist.drawBranch 1}
{*hlist.height 10}
{*hlist.highlightBackground #d9d9d9}
{*hlist.indent 20}
{*hlist.itemType imagetext}
{*hlist.padX 3}
{*hlist.padY 0}
{*hlist.relief sunken}
{*hlist.takeFocus 1}
{*hlist.wideSelection 0}
{*hlist.width 20}
}
}
proc tixDirTree:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
if {$data(-value) == ""} {
set data(-value) [pwd]
}
tixDirTree:SetDir $w [file normalize $data(-value)]
}
proc tixDirTree:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
tixDoWhenMapped $w [list tixDirTree:StartUp $w]
$data(w:hlist) config -separator [tixFSSep] \
-selectmode "single" -drawbranch 1
# We must creat an extra copy of these images to avoid flashes on
# the screen when user changes directory
#
set data(images) [image create compound -window $data(w:hlist)]
$data(images) add image -image [tix getimage act_fold]
$data(images) add image -image [tix getimage folder]
$data(images) add image -image [tix getimage openfold]
}
proc tixDirTree:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
}
# Add one dir into the node (parent directory), sorted alphabetically
#
proc tixDirTree:AddToList {w fsdir image} {
upvar #0 $w data
set dir [tixFSInternal $fsdir]
if {[$data(w:hlist) info exists $dir]} { return }
set parent [file dirname $fsdir]
if {$fsdir eq $parent} {
# root node
set node ""
} else {
# regular node
set node [tixFSInternal $parent]
}
set added 0
set text [tixFSDisplayFileName $fsdir]
foreach sib [$data(w:hlist) info children $node] {
if {[string compare $dir $sib] < 0} {
$data(w:hlist) add $dir -before $sib -text $text -image $image
set added 1
break
}
}
if {!$added} {
$data(w:hlist) add $dir -text $text -image $image
}
# Check to see if we have children (%% optimize!)
if {[llength [tixFSListDir $fsdir 1 0 0 $data(-showhidden)]]} {
tixVTree:SetMode $w $dir open
}
}
proc tixDirTree:LoadDir {w fsdir {mode toggle}} {
if {![winfo exists $w]} { return }
upvar #0 $w data
# Add the directory and set it to the active directory
#
set fsdir [tixFSNormalize $fsdir]
set dir [tixFSInternal $fsdir]
if {![$data(w:hlist) info exists $dir]} {
# Add $dir and all ancestors of $dir into the HList widget
set fspath ""
set imgopenfold [tix getimage openfold]
foreach part [tixFSAncestors $fsdir] {
set fspath [file join $fspath $part]
tixDirTree:AddToList $w $fspath $imgopenfold
}
}
$data(w:hlist) entryconfig $dir -image [tix getimage act_fold]
if {$mode eq "toggle"} {
if {[llength [$data(w:hlist) info children $dir]]} {
set mode flatten
} else {
set mode expand
}
}
if {$mode eq "expand"} {
# Add all the sub directories of fsdir into the HList widget
tixBusy $w on $data(w:hlist)
set imgfolder [tix getimage folder]
foreach part [tixFSListDir $fsdir 1 0 0 $data(-showhidden)] {
tixDirTree:AddToList $w [file join $fsdir $part] $imgfolder
}
tixWidgetDoWhenIdle tixBusy $w off $data(w:hlist)
# correct indicator to represent children status (added above)
if {[llength [$data(w:hlist) info children $dir]]} {
tixVTree:SetMode $w $dir close
} else {
tixVTree:SetMode $w $dir none
}
} else {
$data(w:hlist) delete offsprings $dir
tixVTree:SetMode $w $dir open
}
}
proc tixDirTree:ToggleDir {w value mode} {
upvar #0 $w data
tixDirTree:LoadDir $w $value $mode
tixDirTree:CallCommand $w
}
proc tixDirTree:CallCommand {w} {
upvar #0 $w data
if {[llength $data(-command)] && !$data(-disablecallback)} {
set bind(specs) {%V}
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
proc tixDirTree:CallBrowseCmd {w ent} {
upvar #0 $w data
if {[llength $data(-browsecmd)] && !$data(-disablecallback)} {
set bind(specs) {%V}
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-browsecmd) bind [list $data(-value)]
}
}
proc tixDirTree:StartUp {w} {
if {![winfo exists $w]} { return }
upvar #0 $w data
# make sure that all the basic volumes are listed
set imgopenfold [tix getimage openfold]
foreach fspath [tixFSVolumes] {
tixDirTree:AddToList $w $fspath $imgopenfold
}
tixDirTree:LoadDir $w [tixFSExternal $data(i-directory)]
}
proc tixDirTree:ChangeDir {w fsdir {forced 0}} {
upvar #0 $w data
set dir [tixFSInternal $fsdir]
if {!$forced && $data(i-directory) eq $dir} {
return
}
if {!$forced && [$data(w:hlist) info exists $dir]} {
# Set the old directory to "non active"
#
if {[$data(w:hlist) info exists $data(i-directory)]} {
$data(w:hlist) entryconfig $data(i-directory) \
-image [tix getimage folder]
}
$data(w:hlist) entryconfig $dir -image [tix getimage act_fold]
} else {
if {$forced} {
if {[llength [$data(w:hlist) info children $dir]]} {
set mode expand
} else {
set mode flatten
}
} else {
set mode toggle
}
tixDirTree:LoadDir $w $fsdir $mode
tixDirTree:CallCommand $w
}
tixDirTree:SetDir $w $fsdir
}
proc tixDirTree:SetDir {w path} {
upvar #0 $w data
set data(i-directory) [tixFSInternal $path]
set data(-value) [tixFSNativeNorm $path]
}
#----------------------------------------------------------------------
#
# Virtual Methods
#
#----------------------------------------------------------------------
proc tixDirTree:OpenCmd {w ent} {
set fsdir [tixFSExternal $ent]
tixDirTree:ToggleDir $w $fsdir expand
tixDirTree:ChangeDir $w $fsdir
tixDirTree:CallBrowseCmd $w $fsdir
}
proc tixDirTree:CloseCmd {w ent} {
set fsdir [tixFSExternal $ent]
tixDirTree:ToggleDir $w $fsdir flatten
tixDirTree:ChangeDir $w $fsdir
tixDirTree:CallBrowseCmd $w $fsdir
}
proc tixDirTree:Command {w B} {
upvar #0 $w data
upvar $B bind
set ent [tixEvent flag V]
tixChainMethod $w Command $B
if {[llength $data(-command)]} {
set fsdir [tixFSExternal $ent]
tixEvalCmdBinding $w $data(-command) bind $fsdir
}
}
# This is a virtual method
#
proc tixDirTree:BrowseCmd {w B} {
upvar #0 $w data
upvar 1 $B bind
set ent [tixEvent flag V]
set fsdir [tixFSExternal $ent]
# This is a hack because %V may have been modified by callbrowsecmd
set fsdir [file normalize $fsdir]
tixDirTree:ChangeDir $w $fsdir
tixDirTree:CallBrowseCmd $w $fsdir
}
#----------------------------------------------------------------------
#
# Public Methods
#
#----------------------------------------------------------------------
proc tixDirTree:chdir {w value} {
tixDirTree:ChangeDir $w [file normalize $value]
}
proc tixDirTree:refresh {w {dir ""}} {
upvar #0 $w data
if {$dir eq ""} {
set dir $data(-value)
}
set dir [file normalize $dir]
tixDirTree:ChangeDir $w $dir 1
# Delete any stale directories that no longer exist
#
foreach child [$data(w:hlist) info children [tixFSInternal $dir]] {
if {![file exists [tixFSExternal $child]]} {
$data(w:hlist) delete entry $child
}
}
}
proc tixDirTree:config-directory {w value} {
tixDirTree:ChangeDir $w [file normalize $value]
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirTree.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
#
# DirTree.tcl --
#
# Implements directory tree for Unix file systems
#
# What the indicators mean:
#
# (+): There are some subdirectories in this directory which are not
# currently visible.
# (-): This directory has some subdirectories and they are all visible
#
# none: The dir has no subdirectori(es).
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
##
## The tixDirTree require special FS handling due to it's limited
## separator idea (instead of real tree).
##
tixWidgetClass tixDirTree {
-classname TixDirTree
-superclass tixVTree
-method {
activate chdir refresh
}
-flag {
-browsecmd -command -directory -disablecallback -showhidden -value
}
-configspec {
{-browsecmd browseCmd BrowseCmd ""}
{-command command Command ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
{-value value Value ""}
}
-alias {
{-directory -value}
}
-default {
{.scrollbar auto}
{*Scrollbar.takeFocus 0}
{*borderWidth 1}
{*hlist.indicator 1}
{*hlist.background #c3c3c3}
{*hlist.drawBranch 1}
{*hlist.height 10}
{*hlist.highlightBackground #d9d9d9}
{*hlist.indent 20}
{*hlist.itemType imagetext}
{*hlist.padX 3}
{*hlist.padY 0}
{*hlist.relief sunken}
{*hlist.takeFocus 1}
{*hlist.wideSelection 0}
{*hlist.width 20}
}
}
proc tixDirTree:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
if {$data(-value) == ""} {
set data(-value) [pwd]
}
tixDirTree:SetDir $w [file normalize $data(-value)]
}
proc tixDirTree:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
tixDoWhenMapped $w [list tixDirTree:StartUp $w]
$data(w:hlist) config -separator [tixFSSep] \
-selectmode "single" -drawbranch 1
# We must creat an extra copy of these images to avoid flashes on
# the screen when user changes directory
#
set data(images) [image create compound -window $data(w:hlist)]
$data(images) add image -image [tix getimage act_fold]
$data(images) add image -image [tix getimage folder]
$data(images) add image -image [tix getimage openfold]
}
proc tixDirTree:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
}
# Add one dir into the node (parent directory), sorted alphabetically
#
proc tixDirTree:AddToList {w fsdir image} {
upvar #0 $w data
set dir [tixFSInternal $fsdir]
if {[$data(w:hlist) info exists $dir]} { return }
set parent [file dirname $fsdir]
if {$fsdir eq $parent} {
# root node
set node ""
} else {
# regular node
set node [tixFSInternal $parent]
}
set added 0
set text [tixFSDisplayFileName $fsdir]
foreach sib [$data(w:hlist) info children $node] {
if {[string compare $dir $sib] < 0} {
$data(w:hlist) add $dir -before $sib -text $text -image $image
set added 1
break
}
}
if {!$added} {
$data(w:hlist) add $dir -text $text -image $image
}
# Check to see if we have children (%% optimize!)
if {[llength [tixFSListDir $fsdir 1 0 0 $data(-showhidden)]]} {
tixVTree:SetMode $w $dir open
}
}
proc tixDirTree:LoadDir {w fsdir {mode toggle}} {
if {![winfo exists $w]} { return }
upvar #0 $w data
# Add the directory and set it to the active directory
#
set fsdir [tixFSNormalize $fsdir]
set dir [tixFSInternal $fsdir]
if {![$data(w:hlist) info exists $dir]} {
# Add $dir and all ancestors of $dir into the HList widget
set fspath ""
set imgopenfold [tix getimage openfold]
foreach part [tixFSAncestors $fsdir] {
set fspath [file join $fspath $part]
tixDirTree:AddToList $w $fspath $imgopenfold
}
}
$data(w:hlist) entryconfig $dir -image [tix getimage act_fold]
if {$mode eq "toggle"} {
if {[llength [$data(w:hlist) info children $dir]]} {
set mode flatten
} else {
set mode expand
}
}
if {$mode eq "expand"} {
# Add all the sub directories of fsdir into the HList widget
tixBusy $w on $data(w:hlist)
set imgfolder [tix getimage folder]
foreach part [tixFSListDir $fsdir 1 0 0 $data(-showhidden)] {
tixDirTree:AddToList $w [file join $fsdir $part] $imgfolder
}
tixWidgetDoWhenIdle tixBusy $w off $data(w:hlist)
# correct indicator to represent children status (added above)
if {[llength [$data(w:hlist) info children $dir]]} {
tixVTree:SetMode $w $dir close
} else {
tixVTree:SetMode $w $dir none
}
} else {
$data(w:hlist) delete offsprings $dir
tixVTree:SetMode $w $dir open
}
}
proc tixDirTree:ToggleDir {w value mode} {
upvar #0 $w data
tixDirTree:LoadDir $w $value $mode
tixDirTree:CallCommand $w
}
proc tixDirTree:CallCommand {w} {
upvar #0 $w data
if {[llength $data(-command)] && !$data(-disablecallback)} {
set bind(specs) {%V}
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
proc tixDirTree:CallBrowseCmd {w ent} {
upvar #0 $w data
if {[llength $data(-browsecmd)] && !$data(-disablecallback)} {
set bind(specs) {%V}
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-browsecmd) bind [list $data(-value)]
}
}
proc tixDirTree:StartUp {w} {
if {![winfo exists $w]} { return }
upvar #0 $w data
# make sure that all the basic volumes are listed
set imgopenfold [tix getimage openfold]
foreach fspath [tixFSVolumes] {
tixDirTree:AddToList $w $fspath $imgopenfold
}
tixDirTree:LoadDir $w [tixFSExternal $data(i-directory)]
}
proc tixDirTree:ChangeDir {w fsdir {forced 0}} {
upvar #0 $w data
set dir [tixFSInternal $fsdir]
if {!$forced && $data(i-directory) eq $dir} {
return
}
if {!$forced && [$data(w:hlist) info exists $dir]} {
# Set the old directory to "non active"
#
if {[$data(w:hlist) info exists $data(i-directory)]} {
$data(w:hlist) entryconfig $data(i-directory) \
-image [tix getimage folder]
}
$data(w:hlist) entryconfig $dir -image [tix getimage act_fold]
} else {
if {$forced} {
if {[llength [$data(w:hlist) info children $dir]]} {
set mode expand
} else {
set mode flatten
}
} else {
set mode toggle
}
tixDirTree:LoadDir $w $fsdir $mode
tixDirTree:CallCommand $w
}
tixDirTree:SetDir $w $fsdir
}
proc tixDirTree:SetDir {w path} {
upvar #0 $w data
set data(i-directory) [tixFSInternal $path]
set data(-value) [tixFSNativeNorm $path]
}
#----------------------------------------------------------------------
#
# Virtual Methods
#
#----------------------------------------------------------------------
proc tixDirTree:OpenCmd {w ent} {
set fsdir [tixFSExternal $ent]
tixDirTree:ToggleDir $w $fsdir expand
tixDirTree:ChangeDir $w $fsdir
tixDirTree:CallBrowseCmd $w $fsdir
}
proc tixDirTree:CloseCmd {w ent} {
set fsdir [tixFSExternal $ent]
tixDirTree:ToggleDir $w $fsdir flatten
tixDirTree:ChangeDir $w $fsdir
tixDirTree:CallBrowseCmd $w $fsdir
}
proc tixDirTree:Command {w B} {
upvar #0 $w data
upvar $B bind
set ent [tixEvent flag V]
tixChainMethod $w Command $B
if {[llength $data(-command)]} {
set fsdir [tixFSExternal $ent]
tixEvalCmdBinding $w $data(-command) bind $fsdir
}
}
# This is a virtual method
#
proc tixDirTree:BrowseCmd {w B} {
upvar #0 $w data
upvar 1 $B bind
set ent [tixEvent flag V]
set fsdir [tixFSExternal $ent]
# This is a hack because %V may have been modified by callbrowsecmd
set fsdir [file normalize $fsdir]
tixDirTree:ChangeDir $w $fsdir
tixDirTree:CallBrowseCmd $w $fsdir
}
#----------------------------------------------------------------------
#
# Public Methods
#
#----------------------------------------------------------------------
proc tixDirTree:chdir {w value} {
tixDirTree:ChangeDir $w [file normalize $value]
}
proc tixDirTree:refresh {w {dir ""}} {
upvar #0 $w data
if {$dir eq ""} {
set dir $data(-value)
}
set dir [file normalize $dir]
tixDirTree:ChangeDir $w $dir 1
# Delete any stale directories that no longer exist
#
foreach child [$data(w:hlist) info children [tixFSInternal $dir]] {
if {![file exists [tixFSExternal $child]]} {
$data(w:hlist) delete entry $child
}
}
}
proc tixDirTree:config-directory {w value} {
tixDirTree:ChangeDir $w [file normalize $value]
}

View File

@@ -1,166 +1,166 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DragDrop.tcl,v 1.4 2001/12/09 05:04:02 idiscovery Exp $
#
# DragDrop.tcl ---
#
# Implements drag+drop for Tix widgets.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixClass tixDragDropContext {
-superclass {}
-classname TixDragDropContext
-method {
cget configure drag drop set startdrag
}
-flag {
-command -source
}
-configspec {
{-command ""}
{-source ""}
}
}
proc tixDragDropContext:Constructor {w} {
upvar #0 $w data
}
#----------------------------------------------------------------------
# Private methods
#
#----------------------------------------------------------------------
proc tixDragDropContext:CallCommand {w target command X Y} {
upvar #0 $w data
set x [expr $X-[winfo rootx $target]]
set y [expr $Y-[winfo rooty $target]]
regsub %x $command $x command
regsub %y $command $y command
regsub %X $command $X command
regsub %Y $command $Y command
regsub %W $command $target command
regsub %S $command [list $data(-command)] command
eval $command
}
proc tixDragDropContext:Send {w target event X Y} {
upvar #0 $w data
global tixDrop
foreach tag [tixDropBindTags $target] {
if {[info exists tixDrop($tag,$event)]} {
tixDragDropContext:CallCommand $w $target \
$tixDrop($tag,$event) $X $Y
}
}
}
#----------------------------------------------------------------------
# set --
#
# Set the "small data" of the type supported by the source widget
#----------------------------------------------------------------------
proc tixDragDropContext:set {w type data} {
}
#----------------------------------------------------------------------
# startdrag --
#
# Start the dragging action
#----------------------------------------------------------------------
proc tixDragDropContext:startdrag {w x y} {
upvar #0 $w data
set data(oldTarget) ""
$data(-source) config -cursor "[tix getbitmap drop] black"
tixDragDropContext:drag $w $x $y
}
#----------------------------------------------------------------------
# drag --
#
# Continue the dragging action
#----------------------------------------------------------------------
proc tixDragDropContext:drag {w X Y} {
upvar #0 $w data
global tixDrop
set target [winfo containing -displayof $w $X $Y]
if {$target != $data(oldTarget)} {
if {$data(oldTarget) != ""} {
tixDragDropContext:Send $w $data(oldTarget) <Out> $X $Y
}
if {$target != ""} {
tixDragDropContext:Send $w $target <In> $X $Y
}
set data(oldTarget) $target
}
if {$target != ""} {
tixDragDropContext:Send $w $target <Over> $X $Y
}
}
proc tixDragDropContext:drop {w X Y} {
upvar #0 $w data
global tixDrop
set target [winfo containing -displayof $w $X $Y]
if {$target != ""} {
tixDragDropContext:Send $w $target <Drop> $X $Y
}
if {$data(-source) != ""} {
$data(-source) config -cursor ""
}
set data(-source) ""
}
#----------------------------------------------------------------------
# Public Procedures -- This is NOT a member of the tixDragDropContext
# class!
#
# parameters :
# $w: who wants to start dragging? (currently ignored)
#----------------------------------------------------------------------
proc tixGetDragDropContext {w} {
global tixDD
if {[info exists tixDD]} {
return tixDD
}
return [tixDragDropContext tixDD]
}
proc tixDropBind {w event command} {
global tixDrop
set tixDrop($w) 1
set tixDrop($w,$event) $command
}
proc tixDropBindTags {w args} {
global tixDropTags
if {$args == ""} {
if {[info exists tixDropTags($w)]} {
return $tixDropTags($w)
} else {
return [list [winfo class $w] $w]
}
} else {
set tixDropTags($w) $args
}
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DragDrop.tcl,v 1.4 2001/12/09 05:04:02 idiscovery Exp $
#
# DragDrop.tcl ---
#
# Implements drag+drop for Tix widgets.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixClass tixDragDropContext {
-superclass {}
-classname TixDragDropContext
-method {
cget configure drag drop set startdrag
}
-flag {
-command -source
}
-configspec {
{-command ""}
{-source ""}
}
}
proc tixDragDropContext:Constructor {w} {
upvar #0 $w data
}
#----------------------------------------------------------------------
# Private methods
#
#----------------------------------------------------------------------
proc tixDragDropContext:CallCommand {w target command X Y} {
upvar #0 $w data
set x [expr $X-[winfo rootx $target]]
set y [expr $Y-[winfo rooty $target]]
regsub %x $command $x command
regsub %y $command $y command
regsub %X $command $X command
regsub %Y $command $Y command
regsub %W $command $target command
regsub %S $command [list $data(-command)] command
eval $command
}
proc tixDragDropContext:Send {w target event X Y} {
upvar #0 $w data
global tixDrop
foreach tag [tixDropBindTags $target] {
if {[info exists tixDrop($tag,$event)]} {
tixDragDropContext:CallCommand $w $target \
$tixDrop($tag,$event) $X $Y
}
}
}
#----------------------------------------------------------------------
# set --
#
# Set the "small data" of the type supported by the source widget
#----------------------------------------------------------------------
proc tixDragDropContext:set {w type data} {
}
#----------------------------------------------------------------------
# startdrag --
#
# Start the dragging action
#----------------------------------------------------------------------
proc tixDragDropContext:startdrag {w x y} {
upvar #0 $w data
set data(oldTarget) ""
$data(-source) config -cursor "[tix getbitmap drop] black"
tixDragDropContext:drag $w $x $y
}
#----------------------------------------------------------------------
# drag --
#
# Continue the dragging action
#----------------------------------------------------------------------
proc tixDragDropContext:drag {w X Y} {
upvar #0 $w data
global tixDrop
set target [winfo containing -displayof $w $X $Y]
if {$target != $data(oldTarget)} {
if {$data(oldTarget) != ""} {
tixDragDropContext:Send $w $data(oldTarget) <Out> $X $Y
}
if {$target != ""} {
tixDragDropContext:Send $w $target <In> $X $Y
}
set data(oldTarget) $target
}
if {$target != ""} {
tixDragDropContext:Send $w $target <Over> $X $Y
}
}
proc tixDragDropContext:drop {w X Y} {
upvar #0 $w data
global tixDrop
set target [winfo containing -displayof $w $X $Y]
if {$target != ""} {
tixDragDropContext:Send $w $target <Drop> $X $Y
}
if {$data(-source) != ""} {
$data(-source) config -cursor ""
}
set data(-source) ""
}
#----------------------------------------------------------------------
# Public Procedures -- This is NOT a member of the tixDragDropContext
# class!
#
# parameters :
# $w: who wants to start dragging? (currently ignored)
#----------------------------------------------------------------------
proc tixGetDragDropContext {w} {
global tixDD
if {[info exists tixDD]} {
return tixDD
}
return [tixDragDropContext tixDD]
}
proc tixDropBind {w event command} {
global tixDrop
set tixDrop($w) 1
set tixDrop($w,$event) $command
}
proc tixDropBindTags {w args} {
global tixDropTags
if {$args == ""} {
if {[info exists tixDropTags($w)]} {
return $tixDropTags($w)
} else {
return [list [winfo class $w] $w]
}
} else {
set tixDropTags($w) $args
}
}

View File

@@ -1,49 +1,49 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DtlList.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
#
# DtlList.tcl --
#
# This file implements DetailList widgets
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDetailList {
-classname TixDetailList
-superclass tixScrolledGrid
-method {
}
-flag {
-hdrbackground
}
-configspec {
{-hdrbackground hdrBackground HdrBackground #606060}
}
-alias {
{-hdrbg -hdrbackground}
}
-default {
{*grid.topMargin 1}
{*grid.leftMargin 0}
}
}
proc tixDetailList:FormatCmd {w area x1 y1 x2 y2} {
upvar #0 $w data
case $area {
main {
}
default {
$data(w:grid) format border $x1 $y1 $x2 $y2 \
-filled 1 \
-relief raised -bd 1 -bg $data(-hdrbackground)
}
}
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DtlList.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
#
# DtlList.tcl --
#
# This file implements DetailList widgets
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixDetailList {
-classname TixDetailList
-superclass tixScrolledGrid
-method {
}
-flag {
-hdrbackground
}
-configspec {
{-hdrbackground hdrBackground HdrBackground #606060}
}
-alias {
{-hdrbg -hdrbackground}
}
-default {
{*grid.topMargin 1}
{*grid.leftMargin 0}
}
}
proc tixDetailList:FormatCmd {w area x1 y1 x2 y2} {
upvar #0 $w data
case $area {
main {
}
default {
$data(w:grid) format border $x1 $y1 $x2 $y2 \
-filled 1 \
-relief raised -bd 1 -bg $data(-hdrbackground)
}
}
}

View File

@@ -1,436 +1,436 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: EFileBox.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# EFileBox.tcl --
#
# Implements the Extended File Selection Box widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#
# ToDo
# (1) If user has entered an invalid directory, give an error dialog
#
tixWidgetClass tixExFileSelectBox {
-classname TixExFileSelectBox
-superclass tixPrimitive
-method {
filter invoke
}
-flag {
-browsecmd -command -dialog -dir -dircmd -directory
-disablecallback -filetypes -pattern -selection -showhidden -value
}
-forcecall {
-filetypes
}
-configspec {
{-browsecmd browseCmd BrowseCmd ""}
{-command command Command ""}
{-dialog dialog Dialog ""}
{-dircmd dirCmd DirCmd ""}
{-directory directory Directory ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-filetypes fileTypes FileTypes ""}
{-pattern pattern Pattern *}
{-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
{-value value Value ""}
}
-alias {
{-dir -directory}
{-selection -value}
}
-default {
{*dir.label {Directories:}}
{*dir.editable true}
{*dir.history true}
{*dir*listbox.height 5}
{*file.label Files:}
{*file.editable true}
{*file.history false}
{*file*listbox.height 5}
{*types.label {List Files of Type:}}
{*types*listbox.height 3}
{*TixComboBox.labelSide top}
{*TixComboBox*Label.anchor w}
{*dir.label.underline 0}
{*file.label.underline 0}
{*types.label.underline 14}
{*TixComboBox.anchor e}
{*TixHList.height 7}
{*filelist*listbox.height 7}
{*hidden.wrapLength 3c}
{*hidden.justify left}
}
}
proc tixExFileSelectBox:InitWidgetRec {w} {
upvar #0 $w data
global env
tixChainMethod $w InitWidgetRec
if {$data(-directory) eq ""} {
set data(-directory) [pwd]
}
set data(oldDir) ""
set data(flag) 0
}
#----------------------------------------------------------------------
# Construct widget
#----------------------------------------------------------------------
proc tixExFileSelectBox:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
# listbox frame
set lf [frame $w.lf]
# The pane that contains the two listboxes
#
set pane [tixPanedWindow $lf.pane -orientation horizontal]
set dpane [$pane add 1 -size 160]
set fpane [$pane add 2 -size 160]
$dpane config -relief flat
$fpane config -relief flat
# The File List Pane
#
set data(w:file) [tixComboBox $fpane.file\
-command [list tixExFileSelectBox:Cmd-FileCombo $w]\
-prunehistory true \
-options {
label.anchor w
}]
set data(w:filelist) \
[tixScrolledListBox $fpane.filelist \
-command [list tixExFileSelectBox:Cmd-FileList $w 1] \
-browsecmd [list tixExFileSelectBox:Cmd-FileList $w 0]]
pack $data(w:file) -padx 8 -pady 4 -side top -fill x
pack $data(w:filelist) -padx 8 -pady 4 -side top -fill both -expand yes
# The Directory Pane
#
set data(w:dir) [tixComboBox $dpane.dir \
-command [list tixExFileSelectBox:Cmd-DirCombo $w]\
-prunehistory true \
-options {
label.anchor w
}]
set data(w:dirlist) \
[tixDirList $dpane.dirlist \
-command [list tixExFileSelectBox:Cmd-DirList $w]\
-browsecmd [list tixExFileSelectBox:Browse-DirList $w]]
pack $data(w:dir) -padx 8 -pady 4 -side top -fill x
pack $data(w:dirlist) -padx 8 -pady 4 -side top -fill both -expand yes
# The file types listbox
#
set data(w:types) [tixComboBox $lf.types\
-command [list tixExFileSelectBox:Cmd-TypeCombo $w]\
-options {
label.anchor w
}]
pack $data(w:types) -padx 12 -pady 4 -side bottom -fill x -anchor w
pack $pane -side top -padx 4 -pady 4 -expand yes -fill both
# Buttons to the right
#
set bf [frame $w.bf]
set data(w:ok) [button $bf.ok -text Ok -width 6 \
-underline 0 -command [list tixExFileSelectBox:Ok $w]]
set data(w:cancel) [button $bf.cancel -text Cancel -width 6 \
-underline 0 -command [list tixExFileSelectBox:Cancel $w]]
set data(w:hidden) [checkbutton $bf.hidden -text "Show Hidden Files"\
-underline 0\
-variable [format %s(-showhidden) $w] -onvalue 1 -offvalue 0\
-command [list tixExFileSelectBox:SetShowHidden $w]]
pack $data(w:ok) $data(w:cancel) $data(w:hidden)\
-side top -fill x -padx 6 -pady 3
pack $bf -side right -fill y -pady 6
pack $lf -side left -expand yes -fill both
tixDoWhenMapped $w [list tixExFileSelectBox:Map $w]
if {$data(-filetypes) == ""} {
$data(w:types) config -state disabled
}
}
#----------------------------------------------------------------------
# Configuration
#----------------------------------------------------------------------
proc tixExFileSelectBox:config-showhidden {w value} {
upvar #0 $w data
set data(-showhidden) $value
tixExFileSelectBox:SetShowHidden $w
}
# Update both DirList and {file list and dir combo}
#
proc tixExFileSelectBox:config-directory {w value} {
upvar #0 $w data
set data(-directory) [tixFSNormalize $value]
tixSetSilent $data(w:dirlist) $data(-directory)
tixSetSilent $data(w:dir) $data(-directory)
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
return $data(-directory)
}
proc tixExFileSelectBox:config-filetypes {w value} {
upvar #0 $w data
$data(w:types) subwidget listbox delete 0 end
foreach name [array names data] {
if {[string match type,* $name]} {
catch {unset data($name)}
}
}
if {$value == ""} {
$data(w:types) config -state disabled
} else {
$data(w:types) config -state normal
foreach type $value {
$data(w:types) insert end [lindex $type 1]
set data(type,[lindex $type 1]) [lindex $type 0]
}
tixSetSilent $data(w:types) ""
}
}
#----------------------------------------------------------------------
# MISC Methods
#----------------------------------------------------------------------
proc tixExFileSelectBox:SetShowHidden {w} {
upvar #0 $w data
$data(w:dirlist) config -showhidden $data(-showhidden)
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
}
# User activates the dir combobox
#
#
proc tixExFileSelectBox:Cmd-DirCombo {w args} {
upvar #0 $w data
set dir [tixEvent flag V]
set dir [tixFSExternal $dir]
if {![file isdirectory $dir]} {
return
}
set dir [tixFSNormalize $dir]
$data(w:dirlist) config -value $dir
set data(-directory) $dir
}
# User activates the dir list
#
#
proc tixExFileSelectBox:Cmd-DirList {w args} {
upvar #0 $w data
set dir $data(-directory)
catch {set dir [tixEvent flag V]}
set dir [tixFSNormalize [tixFSExternal $dir]]
tixSetSilent $data(w:dir) $dir
set data(-directory) $dir
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w noreload
}
# User activates the dir list
#
#
proc tixExFileSelectBox:Browse-DirList {w args} {
upvar #0 $w data
set dir [tixEvent flag V]
set dir [tixFSNormalize [tixFSExternal $dir]]
tixExFileSelectBox:Cmd-DirList $w $dir
}
proc tixExFileSelectBox:IsPattern {w string} {
return [regexp "\[\[\\\{\\*\\?\]" $string]
}
proc tixExFileSelectBox:Cmd-FileCombo {w value} {
upvar #0 $w data
if {[tixEvent type] eq "<Return>"} {
tixExFileSelectBox:Ok $w
}
}
proc tixExFileSelectBox:Ok {w} {
upvar #0 $w data
set value [string trim [$data(w:file) subwidget entry get]]
if {$value == ""} {
set value $data(-pattern)
}
tixSetSilent $data(w:file) $value
if {[tixExFileSelectBox:IsPattern $w $value]} {
set data(-pattern) $value
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
} else {
# ensure absolute path
set value [file join $data(-directory) $value]; # native
set data(-value) [tixFSNativeNorm $value]
tixExFileSelectBox:Invoke $w
}
}
proc tixExFileSelectBox:Cancel {w} {
upvar #0 $w data
if {$data(-dialog) != ""} {
eval $data(-dialog) popdown
}
}
proc tixExFileSelectBox:Invoke {w} {
upvar #0 $w data
# Save some old history
#
$data(w:dir) addhistory [$data(w:dir) cget -value]
$data(w:file) addhistory $data(-pattern)
$data(w:file) addhistory $data(-value)
if {$data(-dialog) != ""} {
eval $data(-dialog) popdown
}
if {$data(-command) != "" && !$data(-disablecallback)} {
set bind(specs) "%V"
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
proc tixExFileSelectBox:Cmd-FileList {w invoke args} {
upvar #0 $w data
set index [lindex [$data(w:filelist) subwidget listbox curselection] 0]
if {$index == ""} {
set index 0
}
set file [$data(w:filelist) subwidget listbox get $index]
tixSetSilent $data(w:file) $file
set value [file join $data(-directory) $file]
set data(-value) [tixFSNativeNorm $value]
if {$invoke == 1} {
tixExFileSelectBox:Invoke $w
} elseif {$data(-browsecmd) != ""} {
tixEvalCmdBinding $w $data(-browsecmd) "" $data(-value)
}
}
proc tixExFileSelectBox:Cmd-TypeCombo {w args} {
upvar #0 $w data
set value [tixEvent flag V]
if {[info exists data(type,$value)]} {
set data(-pattern) $data(type,$value)
tixSetSilent $data(w:file) $data(-pattern)
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
}
}
proc tixExFileSelectBox:LoadFiles {w flag} {
upvar #0 $w data
if {$flag ne "reload" && $data(-directory) eq $data(oldDir)} {
return
}
if {![winfo ismapped [winfo toplevel $w]]} {
tixDoWhenMapped [winfo toplevel $w] \
[list tixExFileSelectBox:LoadFiles $w $flag]
return
}
set listbox [$data(w:filelist) subwidget listbox]
$listbox delete 0 end
set data(-value) ""
tixBusy $w on [$data(w:dirlist) subwidget hlist]
# wrap in a catch so you can't get stuck in a Busy state
if {[catch {
foreach name [tixFSListDir $data(-directory) 0 1 0 \
$data(-showhidden) $data(-pattern)] {
$listbox insert end $name
}
if {$data(oldDir) ne $data(-directory)} {
# Otherwise if the user has already selected a file and then
# presses "show hidden", the selection won't be wiped out.
tixSetSilent $data(w:file) $data(-pattern)
}
} err]} {
tixDebug "tixExFileSelectBox:LoadFiles error for $w\n$err"
}
set data(oldDir) $data(-directory)
tixWidgetDoWhenIdle tixBusy $w off [$data(w:dirlist) subwidget hlist]
}
#
# Called when thd listbox is first mapped
proc tixExFileSelectBox:Map {w} {
if {![winfo exists $w]} {
return
}
upvar #0 $w data
set bind(specs) "%V"
set bind(%V) $data(-value)
tixEvalCmdBinding $w bind \
[list tixExFileSelectBox:Cmd-DirList $w] $data(-directory)
}
#----------------------------------------------------------------------
# Public commands
#
#----------------------------------------------------------------------
proc tixExFileSelectBox:invoke {w} {
tixExFileSelectBox:Invoke $w
}
proc tixExFileSelectBox:filter {w} {
tixExFileSelectBox:LoadFiles $w reload
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: EFileBox.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# EFileBox.tcl --
#
# Implements the Extended File Selection Box widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#
# ToDo
# (1) If user has entered an invalid directory, give an error dialog
#
tixWidgetClass tixExFileSelectBox {
-classname TixExFileSelectBox
-superclass tixPrimitive
-method {
filter invoke
}
-flag {
-browsecmd -command -dialog -dir -dircmd -directory
-disablecallback -filetypes -pattern -selection -showhidden -value
}
-forcecall {
-filetypes
}
-configspec {
{-browsecmd browseCmd BrowseCmd ""}
{-command command Command ""}
{-dialog dialog Dialog ""}
{-dircmd dirCmd DirCmd ""}
{-directory directory Directory ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-filetypes fileTypes FileTypes ""}
{-pattern pattern Pattern *}
{-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
{-value value Value ""}
}
-alias {
{-dir -directory}
{-selection -value}
}
-default {
{*dir.label {Directories:}}
{*dir.editable true}
{*dir.history true}
{*dir*listbox.height 5}
{*file.label Files:}
{*file.editable true}
{*file.history false}
{*file*listbox.height 5}
{*types.label {List Files of Type:}}
{*types*listbox.height 3}
{*TixComboBox.labelSide top}
{*TixComboBox*Label.anchor w}
{*dir.label.underline 0}
{*file.label.underline 0}
{*types.label.underline 14}
{*TixComboBox.anchor e}
{*TixHList.height 7}
{*filelist*listbox.height 7}
{*hidden.wrapLength 3c}
{*hidden.justify left}
}
}
proc tixExFileSelectBox:InitWidgetRec {w} {
upvar #0 $w data
global env
tixChainMethod $w InitWidgetRec
if {$data(-directory) eq ""} {
set data(-directory) [pwd]
}
set data(oldDir) ""
set data(flag) 0
}
#----------------------------------------------------------------------
# Construct widget
#----------------------------------------------------------------------
proc tixExFileSelectBox:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
# listbox frame
set lf [frame $w.lf]
# The pane that contains the two listboxes
#
set pane [tixPanedWindow $lf.pane -orientation horizontal]
set dpane [$pane add 1 -size 160]
set fpane [$pane add 2 -size 160]
$dpane config -relief flat
$fpane config -relief flat
# The File List Pane
#
set data(w:file) [tixComboBox $fpane.file\
-command [list tixExFileSelectBox:Cmd-FileCombo $w]\
-prunehistory true \
-options {
label.anchor w
}]
set data(w:filelist) \
[tixScrolledListBox $fpane.filelist \
-command [list tixExFileSelectBox:Cmd-FileList $w 1] \
-browsecmd [list tixExFileSelectBox:Cmd-FileList $w 0]]
pack $data(w:file) -padx 8 -pady 4 -side top -fill x
pack $data(w:filelist) -padx 8 -pady 4 -side top -fill both -expand yes
# The Directory Pane
#
set data(w:dir) [tixComboBox $dpane.dir \
-command [list tixExFileSelectBox:Cmd-DirCombo $w]\
-prunehistory true \
-options {
label.anchor w
}]
set data(w:dirlist) \
[tixDirList $dpane.dirlist \
-command [list tixExFileSelectBox:Cmd-DirList $w]\
-browsecmd [list tixExFileSelectBox:Browse-DirList $w]]
pack $data(w:dir) -padx 8 -pady 4 -side top -fill x
pack $data(w:dirlist) -padx 8 -pady 4 -side top -fill both -expand yes
# The file types listbox
#
set data(w:types) [tixComboBox $lf.types\
-command [list tixExFileSelectBox:Cmd-TypeCombo $w]\
-options {
label.anchor w
}]
pack $data(w:types) -padx 12 -pady 4 -side bottom -fill x -anchor w
pack $pane -side top -padx 4 -pady 4 -expand yes -fill both
# Buttons to the right
#
set bf [frame $w.bf]
set data(w:ok) [button $bf.ok -text Ok -width 6 \
-underline 0 -command [list tixExFileSelectBox:Ok $w]]
set data(w:cancel) [button $bf.cancel -text Cancel -width 6 \
-underline 0 -command [list tixExFileSelectBox:Cancel $w]]
set data(w:hidden) [checkbutton $bf.hidden -text "Show Hidden Files"\
-underline 0\
-variable [format %s(-showhidden) $w] -onvalue 1 -offvalue 0\
-command [list tixExFileSelectBox:SetShowHidden $w]]
pack $data(w:ok) $data(w:cancel) $data(w:hidden)\
-side top -fill x -padx 6 -pady 3
pack $bf -side right -fill y -pady 6
pack $lf -side left -expand yes -fill both
tixDoWhenMapped $w [list tixExFileSelectBox:Map $w]
if {$data(-filetypes) == ""} {
$data(w:types) config -state disabled
}
}
#----------------------------------------------------------------------
# Configuration
#----------------------------------------------------------------------
proc tixExFileSelectBox:config-showhidden {w value} {
upvar #0 $w data
set data(-showhidden) $value
tixExFileSelectBox:SetShowHidden $w
}
# Update both DirList and {file list and dir combo}
#
proc tixExFileSelectBox:config-directory {w value} {
upvar #0 $w data
set data(-directory) [tixFSNormalize $value]
tixSetSilent $data(w:dirlist) $data(-directory)
tixSetSilent $data(w:dir) $data(-directory)
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
return $data(-directory)
}
proc tixExFileSelectBox:config-filetypes {w value} {
upvar #0 $w data
$data(w:types) subwidget listbox delete 0 end
foreach name [array names data] {
if {[string match type,* $name]} {
catch {unset data($name)}
}
}
if {$value == ""} {
$data(w:types) config -state disabled
} else {
$data(w:types) config -state normal
foreach type $value {
$data(w:types) insert end [lindex $type 1]
set data(type,[lindex $type 1]) [lindex $type 0]
}
tixSetSilent $data(w:types) ""
}
}
#----------------------------------------------------------------------
# MISC Methods
#----------------------------------------------------------------------
proc tixExFileSelectBox:SetShowHidden {w} {
upvar #0 $w data
$data(w:dirlist) config -showhidden $data(-showhidden)
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
}
# User activates the dir combobox
#
#
proc tixExFileSelectBox:Cmd-DirCombo {w args} {
upvar #0 $w data
set dir [tixEvent flag V]
set dir [tixFSExternal $dir]
if {![file isdirectory $dir]} {
return
}
set dir [tixFSNormalize $dir]
$data(w:dirlist) config -value $dir
set data(-directory) $dir
}
# User activates the dir list
#
#
proc tixExFileSelectBox:Cmd-DirList {w args} {
upvar #0 $w data
set dir $data(-directory)
catch {set dir [tixEvent flag V]}
set dir [tixFSNormalize [tixFSExternal $dir]]
tixSetSilent $data(w:dir) $dir
set data(-directory) $dir
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w noreload
}
# User activates the dir list
#
#
proc tixExFileSelectBox:Browse-DirList {w args} {
upvar #0 $w data
set dir [tixEvent flag V]
set dir [tixFSNormalize [tixFSExternal $dir]]
tixExFileSelectBox:Cmd-DirList $w $dir
}
proc tixExFileSelectBox:IsPattern {w string} {
return [regexp "\[\[\\\{\\*\\?\]" $string]
}
proc tixExFileSelectBox:Cmd-FileCombo {w value} {
upvar #0 $w data
if {[tixEvent type] eq "<Return>"} {
tixExFileSelectBox:Ok $w
}
}
proc tixExFileSelectBox:Ok {w} {
upvar #0 $w data
set value [string trim [$data(w:file) subwidget entry get]]
if {$value == ""} {
set value $data(-pattern)
}
tixSetSilent $data(w:file) $value
if {[tixExFileSelectBox:IsPattern $w $value]} {
set data(-pattern) $value
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
} else {
# ensure absolute path
set value [file join $data(-directory) $value]; # native
set data(-value) [tixFSNativeNorm $value]
tixExFileSelectBox:Invoke $w
}
}
proc tixExFileSelectBox:Cancel {w} {
upvar #0 $w data
if {$data(-dialog) != ""} {
eval $data(-dialog) popdown
}
}
proc tixExFileSelectBox:Invoke {w} {
upvar #0 $w data
# Save some old history
#
$data(w:dir) addhistory [$data(w:dir) cget -value]
$data(w:file) addhistory $data(-pattern)
$data(w:file) addhistory $data(-value)
if {$data(-dialog) != ""} {
eval $data(-dialog) popdown
}
if {$data(-command) != "" && !$data(-disablecallback)} {
set bind(specs) "%V"
set bind(%V) $data(-value)
tixEvalCmdBinding $w $data(-command) bind $data(-value)
}
}
proc tixExFileSelectBox:Cmd-FileList {w invoke args} {
upvar #0 $w data
set index [lindex [$data(w:filelist) subwidget listbox curselection] 0]
if {$index == ""} {
set index 0
}
set file [$data(w:filelist) subwidget listbox get $index]
tixSetSilent $data(w:file) $file
set value [file join $data(-directory) $file]
set data(-value) [tixFSNativeNorm $value]
if {$invoke == 1} {
tixExFileSelectBox:Invoke $w
} elseif {$data(-browsecmd) != ""} {
tixEvalCmdBinding $w $data(-browsecmd) "" $data(-value)
}
}
proc tixExFileSelectBox:Cmd-TypeCombo {w args} {
upvar #0 $w data
set value [tixEvent flag V]
if {[info exists data(type,$value)]} {
set data(-pattern) $data(type,$value)
tixSetSilent $data(w:file) $data(-pattern)
tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
}
}
proc tixExFileSelectBox:LoadFiles {w flag} {
upvar #0 $w data
if {$flag ne "reload" && $data(-directory) eq $data(oldDir)} {
return
}
if {![winfo ismapped [winfo toplevel $w]]} {
tixDoWhenMapped [winfo toplevel $w] \
[list tixExFileSelectBox:LoadFiles $w $flag]
return
}
set listbox [$data(w:filelist) subwidget listbox]
$listbox delete 0 end
set data(-value) ""
tixBusy $w on [$data(w:dirlist) subwidget hlist]
# wrap in a catch so you can't get stuck in a Busy state
if {[catch {
foreach name [tixFSListDir $data(-directory) 0 1 0 \
$data(-showhidden) $data(-pattern)] {
$listbox insert end $name
}
if {$data(oldDir) ne $data(-directory)} {
# Otherwise if the user has already selected a file and then
# presses "show hidden", the selection won't be wiped out.
tixSetSilent $data(w:file) $data(-pattern)
}
} err]} {
tixDebug "tixExFileSelectBox:LoadFiles error for $w\n$err"
}
set data(oldDir) $data(-directory)
tixWidgetDoWhenIdle tixBusy $w off [$data(w:dirlist) subwidget hlist]
}
#
# Called when thd listbox is first mapped
proc tixExFileSelectBox:Map {w} {
if {![winfo exists $w]} {
return
}
upvar #0 $w data
set bind(specs) "%V"
set bind(%V) $data(-value)
tixEvalCmdBinding $w bind \
[list tixExFileSelectBox:Cmd-DirList $w] $data(-directory)
}
#----------------------------------------------------------------------
# Public commands
#
#----------------------------------------------------------------------
proc tixExFileSelectBox:invoke {w} {
tixExFileSelectBox:Invoke $w
}
proc tixExFileSelectBox:filter {w} {
tixExFileSelectBox:LoadFiles $w reload
}

View File

@@ -1,65 +1,65 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: EFileDlg.tcl,v 1.3 2002/01/24 09:13:58 idiscovery Exp $
#
# EFileDlg.tcl --
#
# Implements the Extended File Selection Dialog widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
foreach fun {tkButtonInvoke} {
if {![llength [info commands $fun]]} {
tk::unsupported::ExposePrivateCommand $fun
}
}
unset fun
tixWidgetClass tixExFileSelectDialog {
-classname TixExFileSelectDialog
-superclass tixDialogShell
-method {}
-flag {
-command
}
-configspec {
{-command command Command ""}
{-title title Title "Select A File"}
}
}
proc tixExFileSelectDialog:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:fsbox) [tixExFileSelectBox $w.fsbox -dialog $w \
-command $data(-command)]
pack $data(w:fsbox) -expand yes -fill both
}
proc tixExFileSelectDialog:config-command {w value} {
upvar #0 $w data
$data(w:fsbox) config -command $value
}
proc tixExFileSelectDialog:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
bind $w <Alt-Key-f> "focus [$data(w:fsbox) subwidget file]"
bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget types]"
bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dir]"
bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:fsbox) subwidget ok]"
bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:fsbox) subwidget cancel]"
bind $w <Alt-Key-s> "tkButtonInvoke [$data(w:fsbox) subwidget hidden]"
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: EFileDlg.tcl,v 1.3 2002/01/24 09:13:58 idiscovery Exp $
#
# EFileDlg.tcl --
#
# Implements the Extended File Selection Dialog widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
foreach fun {tkButtonInvoke} {
if {![llength [info commands $fun]]} {
tk::unsupported::ExposePrivateCommand $fun
}
}
unset fun
tixWidgetClass tixExFileSelectDialog {
-classname TixExFileSelectDialog
-superclass tixDialogShell
-method {}
-flag {
-command
}
-configspec {
{-command command Command ""}
{-title title Title "Select A File"}
}
}
proc tixExFileSelectDialog:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:fsbox) [tixExFileSelectBox $w.fsbox -dialog $w \
-command $data(-command)]
pack $data(w:fsbox) -expand yes -fill both
}
proc tixExFileSelectDialog:config-command {w value} {
upvar #0 $w data
$data(w:fsbox) config -command $value
}
proc tixExFileSelectDialog:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
bind $w <Alt-Key-f> "focus [$data(w:fsbox) subwidget file]"
bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget types]"
bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dir]"
bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:fsbox) subwidget ok]"
bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:fsbox) subwidget cancel]"
bind $w <Alt-Key-s> "tkButtonInvoke [$data(w:fsbox) subwidget hidden]"
}

View File

@@ -1,217 +1,217 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Event.tcl,v 1.6 2004/04/09 21:37:01 hobbs Exp $
#
# Event.tcl --
#
# Handles the event bindings of the -command and -browsecmd options
# (and various of others such as -validatecmd).
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#----------------------------------------------------------------------
# Evaluate high-level bindings (-command, -browsecmd, etc):
# with % subsitution or without (compatibility mode)
#
#
# BUG : if a -command is intercepted by a hook, the hook must use
# the same record name as the issuer of the -command. For the time
# being, you must use the name "bind" as the record name!!!!!
#
#----------------------------------------------------------------------
namespace eval ::tix {
variable event_flags ""
set evs [list % \# a b c d f h k m o p s t w x y A B E K N R S T W X Y]
foreach ev $evs {
lappend event_flags "%$ev"
}
# This is a "name stack" for storing the "bind" structures
#
# The bottom of the event stack is usually a raw event (generated by
# tixBind) but it may also be a programatically triggered (caused by
# tixEvalCmdBinding)
variable EVENT
set EVENT(nameStack) ""
set EVENT(stackLevel) 0
}
proc tixBind {tag event action} {
set cmd [linsert $::tix::event_flags 0 _tixRecordFlags $event]
append cmd "; $action; _tixDeleteFlags;"
bind $tag $event $cmd
}
proc tixPushEventStack {} {
variable ::tix::EVENT
set lastEvent [lindex $EVENT(nameStack) 0]
incr EVENT(stackLevel)
set thisEvent ::tix::_event$EVENT(stackLevel)
set EVENT(nameStack) [list $thisEvent $EVENT(nameStack)]
if {$lastEvent == ""} {
upvar #0 $thisEvent this
set this(type) <Application>
} else {
upvar #0 $lastEvent last
upvar #0 $thisEvent this
foreach name [array names last] {
set this($name) $last($name)
}
}
return $thisEvent
}
proc tixPopEventStack {varName} {
variable ::tix::EVENT
if {$varName ne [lindex $EVENT(nameStack) 0]} {
error "unmatched tixPushEventStack and tixPopEventStack calls"
}
incr EVENT(stackLevel) -1
set EVENT(nameStack) [lindex $EVENT(nameStack) 1]
global $varName
unset $varName
}
# Events triggered by tixBind
#
proc _tixRecordFlags [concat event $::tix::event_flags] {
set thisName [tixPushEventStack]; upvar #0 $thisName this
set this(type) $event
foreach f $::tix::event_flags {
set this($f) [set $f]
}
}
proc _tixDeleteFlags {} {
variable ::tix::EVENT
tixPopEventStack [lindex $EVENT(nameStack) 0]
}
# programatically trigged events
#
proc tixEvalCmdBinding {w cmd {subst ""} args} {
global tixPriv tix
variable ::tix::EVENT
set thisName [tixPushEventStack]; upvar #0 $thisName this
if {$subst != ""} {
upvar $subst bind
if {[info exists bind(specs)]} {
foreach spec $bind(specs) {
set this($spec) $bind($spec)
}
}
if {[info exists bind(type)]} {
set this(type) $bind(type)
}
}
if {[catch {
if {![info exists tix(-extracmdargs)]
|| [string is true -strict $tix(-extracmdargs)]} {
# Compatibility mode
set ret [uplevel \#0 $cmd $args]
} else {
set ret [uplevel 1 $cmd]
}
} error]} {
if {[catch {tixCmdErrorHandler $error} error]} {
# double fault: just print out
tixBuiltInCmdErrorHandler $error
}
tixPopEventStack $thisName
return ""
} else {
tixPopEventStack $thisName
return $ret
}
}
proc tixEvent {option args} {
global tixPriv
variable ::tix::EVENT
set varName [lindex $EVENT(nameStack) 0]
if {$varName == ""} {
error "tixEvent called when no event is being processed"
} else {
upvar #0 $varName event
}
switch -exact -- $option {
type {
return $event(type)
}
value {
if {[info exists event(%V)]} {
return $event(%V)
} else {
return ""
}
}
flag {
set f %[lindex $args 0]
if {[info exists event($f)]} {
return $event($f)
}
error "The flag \"[lindex $args 0]\" does not exist"
}
match {
return [string match [lindex $args 0] $event(type)]
}
default {
error "unknown option \"$option\""
}
}
}
# tixBuiltInCmdErrorHandler --
#
# Default method to report command handler errors. This procedure is
# also called if double-fault happens (command handler causes error,
# then tixCmdErrorHandler causes error).
#
proc tixBuiltInCmdErrorHandler {errorMsg} {
global errorInfo tcl_platform
if {![info exists errorInfo]} {
set errorInfo "???"
}
if {$tcl_platform(platform) eq "windows"} {
bgerror "Tix Error: $errorMsg"
} else {
puts "Error:\n $errorMsg\n$errorInfo"
}
}
# tixCmdErrorHandler --
#
# You can redefine this command to handle the errors that occur
# in the command handlers. See the programmer's documentation
# for details
#
if {![llength [info commands tixCmdErrorHandler]]} {
proc tixCmdErrorHandler {errorMsg} {
tixBuiltInCmdErrorHandler $errorMsg
}
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Event.tcl,v 1.6 2004/04/09 21:37:01 hobbs Exp $
#
# Event.tcl --
#
# Handles the event bindings of the -command and -browsecmd options
# (and various of others such as -validatecmd).
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#----------------------------------------------------------------------
# Evaluate high-level bindings (-command, -browsecmd, etc):
# with % subsitution or without (compatibility mode)
#
#
# BUG : if a -command is intercepted by a hook, the hook must use
# the same record name as the issuer of the -command. For the time
# being, you must use the name "bind" as the record name!!!!!
#
#----------------------------------------------------------------------
namespace eval ::tix {
variable event_flags ""
set evs [list % \# a b c d f h k m o p s t w x y A B E K N R S T W X Y]
foreach ev $evs {
lappend event_flags "%$ev"
}
# This is a "name stack" for storing the "bind" structures
#
# The bottom of the event stack is usually a raw event (generated by
# tixBind) but it may also be a programatically triggered (caused by
# tixEvalCmdBinding)
variable EVENT
set EVENT(nameStack) ""
set EVENT(stackLevel) 0
}
proc tixBind {tag event action} {
set cmd [linsert $::tix::event_flags 0 _tixRecordFlags $event]
append cmd "; $action; _tixDeleteFlags;"
bind $tag $event $cmd
}
proc tixPushEventStack {} {
variable ::tix::EVENT
set lastEvent [lindex $EVENT(nameStack) 0]
incr EVENT(stackLevel)
set thisEvent ::tix::_event$EVENT(stackLevel)
set EVENT(nameStack) [list $thisEvent $EVENT(nameStack)]
if {$lastEvent == ""} {
upvar #0 $thisEvent this
set this(type) <Application>
} else {
upvar #0 $lastEvent last
upvar #0 $thisEvent this
foreach name [array names last] {
set this($name) $last($name)
}
}
return $thisEvent
}
proc tixPopEventStack {varName} {
variable ::tix::EVENT
if {$varName ne [lindex $EVENT(nameStack) 0]} {
error "unmatched tixPushEventStack and tixPopEventStack calls"
}
incr EVENT(stackLevel) -1
set EVENT(nameStack) [lindex $EVENT(nameStack) 1]
global $varName
unset $varName
}
# Events triggered by tixBind
#
proc _tixRecordFlags [concat event $::tix::event_flags] {
set thisName [tixPushEventStack]; upvar #0 $thisName this
set this(type) $event
foreach f $::tix::event_flags {
set this($f) [set $f]
}
}
proc _tixDeleteFlags {} {
variable ::tix::EVENT
tixPopEventStack [lindex $EVENT(nameStack) 0]
}
# programatically trigged events
#
proc tixEvalCmdBinding {w cmd {subst ""} args} {
global tixPriv tix
variable ::tix::EVENT
set thisName [tixPushEventStack]; upvar #0 $thisName this
if {$subst != ""} {
upvar $subst bind
if {[info exists bind(specs)]} {
foreach spec $bind(specs) {
set this($spec) $bind($spec)
}
}
if {[info exists bind(type)]} {
set this(type) $bind(type)
}
}
if {[catch {
if {![info exists tix(-extracmdargs)]
|| [string is true -strict $tix(-extracmdargs)]} {
# Compatibility mode
set ret [uplevel \#0 $cmd $args]
} else {
set ret [uplevel 1 $cmd]
}
} error]} {
if {[catch {tixCmdErrorHandler $error} error]} {
# double fault: just print out
tixBuiltInCmdErrorHandler $error
}
tixPopEventStack $thisName
return ""
} else {
tixPopEventStack $thisName
return $ret
}
}
proc tixEvent {option args} {
global tixPriv
variable ::tix::EVENT
set varName [lindex $EVENT(nameStack) 0]
if {$varName == ""} {
error "tixEvent called when no event is being processed"
} else {
upvar #0 $varName event
}
switch -exact -- $option {
type {
return $event(type)
}
value {
if {[info exists event(%V)]} {
return $event(%V)
} else {
return ""
}
}
flag {
set f %[lindex $args 0]
if {[info exists event($f)]} {
return $event($f)
}
error "The flag \"[lindex $args 0]\" does not exist"
}
match {
return [string match [lindex $args 0] $event(type)]
}
default {
error "unknown option \"$option\""
}
}
}
# tixBuiltInCmdErrorHandler --
#
# Default method to report command handler errors. This procedure is
# also called if double-fault happens (command handler causes error,
# then tixCmdErrorHandler causes error).
#
proc tixBuiltInCmdErrorHandler {errorMsg} {
global errorInfo tcl_platform
if {![info exists errorInfo]} {
set errorInfo "???"
}
if {$tcl_platform(platform) eq "windows"} {
bgerror "Tix Error: $errorMsg"
} else {
puts "Error:\n $errorMsg\n$errorInfo"
}
}
# tixCmdErrorHandler --
#
# You can redefine this command to handle the errors that occur
# in the command handlers. See the programmer's documentation
# for details
#
if {![llength [info commands tixCmdErrorHandler]]} {
proc tixCmdErrorHandler {errorMsg} {
tixBuiltInCmdErrorHandler $errorMsg
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,108 +1,108 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FileCbx.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# tixFileCombobox --
#
# A combobox widget for entering file names, directory names, file
# patterns, etc.
#
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# tixFileComboBox displays and accepts the DOS pathnames only. It doesn't
# recognize UNC file names or Tix VPATHS.
#
tixWidgetClass tixFileComboBox {
-classname TixFileComboBox
-superclass tixPrimitive
-method {
invoke
}
-flag {
-command -defaultfile -directory -text
}
-forcecall {
-directory
}
-configspec {
{-defaultfile defaultFile DefaultFile ""}
{-directory directory Directory ""}
{-command command Command ""}
{-text text Text ""}
}
-default {
}
}
proc tixFileComboBox:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
if {$data(-directory) eq ""} {
set data(-directory) [pwd]
}
}
proc tixFileComboBox:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:combo) [tixComboBox $w.combo -editable true -dropdown true]
pack $data(w:combo) -expand yes -fill both
}
proc tixFileComboBox:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:combo) config -command [list tixFileComboBox:OnComboCmd $w]
}
proc tixFileComboBox:OnComboCmd {w args} {
upvar #0 $w data
set text [string trim [tixEvent value]]
set path [tixFSJoin $data(-directory) $text]
if {[file isdirectory $path]} {
set path [tixFSJoin $path $data(-defaultfile)]
set tail $data(-defaultfile)
} else {
set tail [file tail $path]
}
set norm [tixFSNormalize $path]
tixSetSilent $data(w:combo) $norm
if {[llength $data(-command)]} {
set bind(specs) {%V}
set bind(%V) [list $norm $path $tail ""]
tixEvalCmdBinding $w $data(-command) bind $bind(%V)
}
}
proc tixFileComboBox:config-text {w val} {
upvar #0 $w data
tixSetSilent $data(w:combo) $val
}
proc tixFileComboBox:config-directory {w val} {
upvar #0 $w data
set data(-directory) [tixFSNormalize $val]
return $data(-directory)
}
proc tixFileComboBox:invoke {w} {
upvar #0 $w data
$data(w:combo) invoke
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FileCbx.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
#
# tixFileCombobox --
#
# A combobox widget for entering file names, directory names, file
# patterns, etc.
#
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# tixFileComboBox displays and accepts the DOS pathnames only. It doesn't
# recognize UNC file names or Tix VPATHS.
#
tixWidgetClass tixFileComboBox {
-classname TixFileComboBox
-superclass tixPrimitive
-method {
invoke
}
-flag {
-command -defaultfile -directory -text
}
-forcecall {
-directory
}
-configspec {
{-defaultfile defaultFile DefaultFile ""}
{-directory directory Directory ""}
{-command command Command ""}
{-text text Text ""}
}
-default {
}
}
proc tixFileComboBox:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
if {$data(-directory) eq ""} {
set data(-directory) [pwd]
}
}
proc tixFileComboBox:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:combo) [tixComboBox $w.combo -editable true -dropdown true]
pack $data(w:combo) -expand yes -fill both
}
proc tixFileComboBox:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:combo) config -command [list tixFileComboBox:OnComboCmd $w]
}
proc tixFileComboBox:OnComboCmd {w args} {
upvar #0 $w data
set text [string trim [tixEvent value]]
set path [tixFSJoin $data(-directory) $text]
if {[file isdirectory $path]} {
set path [tixFSJoin $path $data(-defaultfile)]
set tail $data(-defaultfile)
} else {
set tail [file tail $path]
}
set norm [tixFSNormalize $path]
tixSetSilent $data(w:combo) $norm
if {[llength $data(-command)]} {
set bind(specs) {%V}
set bind(%V) [list $norm $path $tail ""]
tixEvalCmdBinding $w $data(-command) bind $bind(%V)
}
}
proc tixFileComboBox:config-text {w val} {
upvar #0 $w data
tixSetSilent $data(w:combo) $val
}
proc tixFileComboBox:config-directory {w val} {
upvar #0 $w data
set data(-directory) [tixFSNormalize $val]
return $data(-directory)
}
proc tixFileComboBox:invoke {w} {
upvar #0 $w data
$data(w:combo) invoke
}

View File

@@ -1,75 +1,75 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FileDlg.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
#
# FileDlg.tcl --
#
# Implements the File Selection Dialog widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixFileSelectDialog {
-classname TixFileSelectDialog
-superclass tixStdDialogShell
-method {
}
-flag {
-command
}
-configspec {
{-command command Command ""}
{-title title Title "Select A File"}
}
}
proc tixFileSelectDialog:ConstructTopFrame {w frame} {
upvar #0 $w data
tixChainMethod $w ConstructTopFrame $frame
set data(w:fsbox) [tixFileSelectBox $frame.fsbox \
-command [list tixFileSelectDialog:Invoke $w]]
pack $data(w:fsbox) -expand yes -fill both
}
proc tixFileSelectDialog:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:btns) subwidget ok config -command "$data(w:fsbox) invoke" \
-underline 0
$data(w:btns) subwidget apply config -command "$data(w:fsbox) filter" \
-text Filter -underline 0
$data(w:btns) subwidget cancel config -command "wm withdraw $w" \
-underline 0
$data(w:btns) subwidget help config -underline 0
bind $w <Alt-Key-l> "focus [$data(w:fsbox) subwidget filelist]"
bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dirlist]"
bind $w <Alt-Key-s> "focus [$data(w:fsbox) subwidget selection]"
bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget filter]"
bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:btns) subwidget ok]"
bind $w <Alt-Key-f> "tkButtonInvoke [$data(w:btns) subwidget apply]"
bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:btns) subwidget cancel]"
bind $w <Alt-Key-h> "tkButtonInvoke [$data(w:btns) subwidget help]"
}
proc tixFileSelectDialog:Invoke {w filename} {
upvar #0 $w data
wm withdraw $w
if {$data(-command) != ""} {
set bind(specs) "%V"
set bind(%V) $filename
tixEvalCmdBinding $w $data(-command) bind $filename
}
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FileDlg.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
#
# FileDlg.tcl --
#
# Implements the File Selection Dialog widget.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixFileSelectDialog {
-classname TixFileSelectDialog
-superclass tixStdDialogShell
-method {
}
-flag {
-command
}
-configspec {
{-command command Command ""}
{-title title Title "Select A File"}
}
}
proc tixFileSelectDialog:ConstructTopFrame {w frame} {
upvar #0 $w data
tixChainMethod $w ConstructTopFrame $frame
set data(w:fsbox) [tixFileSelectBox $frame.fsbox \
-command [list tixFileSelectDialog:Invoke $w]]
pack $data(w:fsbox) -expand yes -fill both
}
proc tixFileSelectDialog:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:btns) subwidget ok config -command "$data(w:fsbox) invoke" \
-underline 0
$data(w:btns) subwidget apply config -command "$data(w:fsbox) filter" \
-text Filter -underline 0
$data(w:btns) subwidget cancel config -command "wm withdraw $w" \
-underline 0
$data(w:btns) subwidget help config -underline 0
bind $w <Alt-Key-l> "focus [$data(w:fsbox) subwidget filelist]"
bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dirlist]"
bind $w <Alt-Key-s> "focus [$data(w:fsbox) subwidget selection]"
bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget filter]"
bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:btns) subwidget ok]"
bind $w <Alt-Key-f> "tkButtonInvoke [$data(w:btns) subwidget apply]"
bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:btns) subwidget cancel]"
bind $w <Alt-Key-h> "tkButtonInvoke [$data(w:btns) subwidget help]"
}
proc tixFileSelectDialog:Invoke {w filename} {
upvar #0 $w data
wm withdraw $w
if {$data(-command) != ""} {
set bind(specs) "%V"
set bind(%V) $filename
tixEvalCmdBinding $w $data(-command) bind $filename
}
}

View File

@@ -1,270 +1,270 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FileEnt.tcl,v 1.7 2004/03/28 02:44:57 hobbs Exp $
#
# FileEnt.tcl --
#
# TixFileEntry Widget: an entry box for entering filenames.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixFileEntry {
-classname TixFileEntry
-superclass tixLabelWidget
-method {
invoke filedialog update
}
-flag {
-activatecmd -command -dialogtype -disablecallback -disabledforeground
-filebitmap -selectmode -state -validatecmd -value -variable
}
-forcecall {
-variable
}
-static {
-filebitmap
}
-configspec {
{-activatecmd activateCmd ActivateCmd ""}
{-command command Command ""}
{-dialogtype dialogType DialogType ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-disabledforeground disabledForeground DisabledForeground #303030}
{-filebitmap fileBitmap FileBitmap ""}
{-selectmode selectMode SelectMode normal}
{-state state State normal}
{-validatecmd validateCmd ValidateCmd ""}
{-value value Value ""}
{-variable variable Variable ""}
}
-default {
{*frame.borderWidth 2}
{*frame.relief sunken}
{*Button.highlightThickness 0}
{*Entry.highlightThickness 0}
{*Entry.borderWidth 0}
}
}
proc tixFileEntry:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
set data(varInited) 0
if {$data(-filebitmap) eq ""} {
set data(-filebitmap) [tix getbitmap openfile]
}
}
proc tixFileEntry:ConstructFramedWidget {w frame} {
upvar #0 $w data
tixChainMethod $w ConstructFramedWidget $frame
set data(w:entry) [entry $frame.entry]
set data(w:button) [button $frame.button -bitmap $data(-filebitmap) \
-takefocus 0]
set data(entryfg) [$data(w:entry) cget -fg]
pack $data(w:button) -side right -fill both
pack $data(w:entry) -side left -expand yes -fill both
}
proc tixFileEntry:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:button) config -command [list tixFileEntry:OpenFile $w]
tixSetMegaWidget $data(w:entry) $w
# If user press <return>, verify the value and call the -command
#
bind $data(w:entry) <Return> [list tixFileEntry:invoke $w]
bind $data(w:entry) <KeyPress> {
if {[set [tixGetMegaWidget %W](-selectmode)] eq "immediate"} {
tixFileEntry:invoke [tixGetMegaWidget %W]
}
}
bind $data(w:entry) <FocusOut> {
if {"%d" eq "NotifyNonlinear" || "%d" eq "NotifyNonlinearVirtual"} {
tixFileEntry:invoke [tixGetMegaWidget %W]
}
}
bind $w <FocusIn> [list focus $data(w:entry)]
}
#----------------------------------------------------------------------
# CONFIG OPTIONS
#----------------------------------------------------------------------
proc tixFileEntry:config-state {w value} {
upvar #0 $w data
if {$value eq "normal"} {
$data(w:button) config -state $value
$data(w:entry) config -state $value -fg $data(entryfg)
catch {$data(w:label) config -fg $data(entryfg)}
} else {
$data(w:button) config -state $value
$data(w:entry) config -state $value -fg $data(-disabledforeground)
catch {$data(w:label) config -fg $data(-disabledforeground)}
}
return ""
}
proc tixFileEntry:config-value {w value} {
tixFileEntry:SetValue $w $value
}
proc tixFileEntry:config-variable {w arg} {
upvar #0 $w data
if {[tixVariable:ConfigVariable $w $arg]} {
# The value of data(-value) is changed if tixVariable:ConfigVariable
# returns true
tixFileEntry:SetValue $w $data(-value)
}
catch {
unset data(varInited)
}
set data(-variable) $arg
}
#----------------------------------------------------------------------
# User Commands
#----------------------------------------------------------------------
proc tixFileEntry:invoke {w} {
upvar #0 $w data
if {![catch {$data(w:entry) index sel.first}]} {
# THIS ENTRY OWNS SELECTION --> TURN IT OFF
#
$data(w:entry) select from end
$data(w:entry) select to end
}
tixFileEntry:SetValue $w [$data(w:entry) get]
}
proc tixFileEntry:filedialog {w args} {
upvar #0 $w data
if {[llength $args]} {
return [eval [tix filedialog $data(-dialogtype)] $args]
} else {
return [tix filedialog $data(-dialogtype)]
}
}
proc tixFileEntry:update {w} {
upvar #0 $w data
if {[$data(w:entry) get] ne $data(-value)} {
tixFileEntry:invoke $w
}
}
#----------------------------------------------------------------------
# Internal Commands
#----------------------------------------------------------------------
proc tixFileEntry:OpenFile {w} {
upvar #0 $w data
if {$data(-activatecmd) != ""} {
uplevel #0 $data(-activatecmd)
}
switch -- $data(-dialogtype) tk_chooseDirectory {
set args [list -parent [winfo toplevel $w]]
if {[set initial $data(-value)] != ""} {
lappend args -initialdir $data(value)
}
set retval [eval [linsert $args 0 tk_chooseDirectory]]
if {$retval != ""} {tixFileEntry:SetValue $w [tixFSNative $retval]}
} tk_getOpenFile - tk_getSaveFile {
set args [list -parent [winfo toplevel $w]]
if {[set initial [$data(w:entry) get]] != ""} {
switch -glob -- $initial *.py {
set types [list {"Python Files" {.py .pyw}} {"All Files" *}]
} *.txt {
set types [list {"Text Files" .txt} {"All Files" *}]
} *.tcl {
set types [list {"Tcl Files" .tcl} {"All Files" *}]
} * - default {
set types [list {"All Files" *}]
}
if {[file isfile $initial]} {
lappend args -initialdir [file dir $initial] \
-initialfile $initial
} elseif {[file isdir $initial]} {
lappend args -initialdir $initial
}
} else {
set types [list {"All Files" *}]
}
lappend args -filetypes $types
set retval [eval $data(-dialogtype) $args]
if {$retval != ""} {tixFileEntry:SetValue $w [tixFSNative $retval]}
} default {
set filedlg [tix filedialog $data(-dialogtype)]
$filedlg config -parent [winfo toplevel $w] \
-command [list tixFileEntry:FileDlgCallback $w]
focus $data(w:entry)
$filedlg popup
}
}
proc tixFileEntry:FileDlgCallback {w args} {
set filename [tixEvent flag V]
tixFileEntry:SetValue $w $filename
}
proc tixFileEntry:SetValue {w value} {
upvar #0 $w data
if {[llength $data(-validatecmd)]} {
set value [tixEvalCmdBinding $w $data(-validatecmd) "" $value]
}
if {$data(-state) eq "normal"} {
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $value
$data(w:entry) xview end
}
set data(-value) $value
tixVariable:UpdateVariable $w
if {[llength $data(-command)] && !$data(-disablecallback)} {
if {![info exists data(varInited)]} {
set bind(specs) ""
tixEvalCmdBinding $w $data(-command) bind $value
}
}
}
proc tixFileEntry:Destructor {w} {
upvar #0 $w data
tixUnsetMegaWidget $data(w:entry)
tixVariable:DeleteVariable $w
# Chain this to the superclass
#
tixChainMethod $w Destructor
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FileEnt.tcl,v 1.7 2004/03/28 02:44:57 hobbs Exp $
#
# FileEnt.tcl --
#
# TixFileEntry Widget: an entry box for entering filenames.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixFileEntry {
-classname TixFileEntry
-superclass tixLabelWidget
-method {
invoke filedialog update
}
-flag {
-activatecmd -command -dialogtype -disablecallback -disabledforeground
-filebitmap -selectmode -state -validatecmd -value -variable
}
-forcecall {
-variable
}
-static {
-filebitmap
}
-configspec {
{-activatecmd activateCmd ActivateCmd ""}
{-command command Command ""}
{-dialogtype dialogType DialogType ""}
{-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
{-disabledforeground disabledForeground DisabledForeground #303030}
{-filebitmap fileBitmap FileBitmap ""}
{-selectmode selectMode SelectMode normal}
{-state state State normal}
{-validatecmd validateCmd ValidateCmd ""}
{-value value Value ""}
{-variable variable Variable ""}
}
-default {
{*frame.borderWidth 2}
{*frame.relief sunken}
{*Button.highlightThickness 0}
{*Entry.highlightThickness 0}
{*Entry.borderWidth 0}
}
}
proc tixFileEntry:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
set data(varInited) 0
if {$data(-filebitmap) eq ""} {
set data(-filebitmap) [tix getbitmap openfile]
}
}
proc tixFileEntry:ConstructFramedWidget {w frame} {
upvar #0 $w data
tixChainMethod $w ConstructFramedWidget $frame
set data(w:entry) [entry $frame.entry]
set data(w:button) [button $frame.button -bitmap $data(-filebitmap) \
-takefocus 0]
set data(entryfg) [$data(w:entry) cget -fg]
pack $data(w:button) -side right -fill both
pack $data(w:entry) -side left -expand yes -fill both
}
proc tixFileEntry:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
$data(w:button) config -command [list tixFileEntry:OpenFile $w]
tixSetMegaWidget $data(w:entry) $w
# If user press <return>, verify the value and call the -command
#
bind $data(w:entry) <Return> [list tixFileEntry:invoke $w]
bind $data(w:entry) <KeyPress> {
if {[set [tixGetMegaWidget %W](-selectmode)] eq "immediate"} {
tixFileEntry:invoke [tixGetMegaWidget %W]
}
}
bind $data(w:entry) <FocusOut> {
if {"%d" eq "NotifyNonlinear" || "%d" eq "NotifyNonlinearVirtual"} {
tixFileEntry:invoke [tixGetMegaWidget %W]
}
}
bind $w <FocusIn> [list focus $data(w:entry)]
}
#----------------------------------------------------------------------
# CONFIG OPTIONS
#----------------------------------------------------------------------
proc tixFileEntry:config-state {w value} {
upvar #0 $w data
if {$value eq "normal"} {
$data(w:button) config -state $value
$data(w:entry) config -state $value -fg $data(entryfg)
catch {$data(w:label) config -fg $data(entryfg)}
} else {
$data(w:button) config -state $value
$data(w:entry) config -state $value -fg $data(-disabledforeground)
catch {$data(w:label) config -fg $data(-disabledforeground)}
}
return ""
}
proc tixFileEntry:config-value {w value} {
tixFileEntry:SetValue $w $value
}
proc tixFileEntry:config-variable {w arg} {
upvar #0 $w data
if {[tixVariable:ConfigVariable $w $arg]} {
# The value of data(-value) is changed if tixVariable:ConfigVariable
# returns true
tixFileEntry:SetValue $w $data(-value)
}
catch {
unset data(varInited)
}
set data(-variable) $arg
}
#----------------------------------------------------------------------
# User Commands
#----------------------------------------------------------------------
proc tixFileEntry:invoke {w} {
upvar #0 $w data
if {![catch {$data(w:entry) index sel.first}]} {
# THIS ENTRY OWNS SELECTION --> TURN IT OFF
#
$data(w:entry) select from end
$data(w:entry) select to end
}
tixFileEntry:SetValue $w [$data(w:entry) get]
}
proc tixFileEntry:filedialog {w args} {
upvar #0 $w data
if {[llength $args]} {
return [eval [tix filedialog $data(-dialogtype)] $args]
} else {
return [tix filedialog $data(-dialogtype)]
}
}
proc tixFileEntry:update {w} {
upvar #0 $w data
if {[$data(w:entry) get] ne $data(-value)} {
tixFileEntry:invoke $w
}
}
#----------------------------------------------------------------------
# Internal Commands
#----------------------------------------------------------------------
proc tixFileEntry:OpenFile {w} {
upvar #0 $w data
if {$data(-activatecmd) != ""} {
uplevel #0 $data(-activatecmd)
}
switch -- $data(-dialogtype) tk_chooseDirectory {
set args [list -parent [winfo toplevel $w]]
if {[set initial $data(-value)] != ""} {
lappend args -initialdir $data(value)
}
set retval [eval [linsert $args 0 tk_chooseDirectory]]
if {$retval != ""} {tixFileEntry:SetValue $w [tixFSNative $retval]}
} tk_getOpenFile - tk_getSaveFile {
set args [list -parent [winfo toplevel $w]]
if {[set initial [$data(w:entry) get]] != ""} {
switch -glob -- $initial *.py {
set types [list {"Python Files" {.py .pyw}} {"All Files" *}]
} *.txt {
set types [list {"Text Files" .txt} {"All Files" *}]
} *.tcl {
set types [list {"Tcl Files" .tcl} {"All Files" *}]
} * - default {
set types [list {"All Files" *}]
}
if {[file isfile $initial]} {
lappend args -initialdir [file dir $initial] \
-initialfile $initial
} elseif {[file isdir $initial]} {
lappend args -initialdir $initial
}
} else {
set types [list {"All Files" *}]
}
lappend args -filetypes $types
set retval [eval $data(-dialogtype) $args]
if {$retval != ""} {tixFileEntry:SetValue $w [tixFSNative $retval]}
} default {
set filedlg [tix filedialog $data(-dialogtype)]
$filedlg config -parent [winfo toplevel $w] \
-command [list tixFileEntry:FileDlgCallback $w]
focus $data(w:entry)
$filedlg popup
}
}
proc tixFileEntry:FileDlgCallback {w args} {
set filename [tixEvent flag V]
tixFileEntry:SetValue $w $filename
}
proc tixFileEntry:SetValue {w value} {
upvar #0 $w data
if {[llength $data(-validatecmd)]} {
set value [tixEvalCmdBinding $w $data(-validatecmd) "" $value]
}
if {$data(-state) eq "normal"} {
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $value
$data(w:entry) xview end
}
set data(-value) $value
tixVariable:UpdateVariable $w
if {[llength $data(-command)] && !$data(-disablecallback)} {
if {![info exists data(varInited)]} {
set bind(specs) ""
tixEvalCmdBinding $w $data(-command) bind $value
}
}
}
proc tixFileEntry:Destructor {w} {
upvar #0 $w data
tixUnsetMegaWidget $data(w:entry)
tixVariable:DeleteVariable $w
# Chain this to the superclass
#
tixChainMethod $w Destructor
}

View File

@@ -1,132 +1,132 @@
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FloatEnt.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
#
# FloatEnt.tcl --
#
# An entry widget that can be attached on top of any widget to
# provide dynamic editing. It is used to provide dynamic editing
# for the tixGrid widget, among other things.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixFloatEntry {
-classname TixFloatEntry
-superclass tixPrimitive
-method {
invoke post unpost
}
-flag {
-command -value
}
-configspec {
{-value value Value ""}
{-command command Command ""}
}
-default {
{.entry.highlightThickness 0}
}
}
#----------------------------------------------------------------------
#
# Initialization bindings
#
#----------------------------------------------------------------------
proc tixFloatEntry:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
}
proc tixFloatEntry:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:entry) [entry $w.entry]
pack $data(w:entry) -expand yes -fill both
}
proc tixFloatEntry:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
tixBind $data(w:entry) <Return> [list tixFloatEntry:invoke $w]
}
#----------------------------------------------------------------------
#
# Class bindings
#
#----------------------------------------------------------------------
proc tixFloatEntryBind {} {
tixBind TixFloatEntry <FocusIn> {
if {[focus -displayof [set %W(w:entry)]] ne [set %W(w:entry)]} {
focus [%W subwidget entry]
[set %W(w:entry)] selection from 0
[set %W(w:entry)] selection to end
[set %W(w:entry)] icursor end
}
}
}
#----------------------------------------------------------------------
#
# Public methods
#
#----------------------------------------------------------------------
proc tixFloatEntry:post {w x y {width ""} {height ""}} {
upvar #0 $w data
if {$width == ""} {
set width [winfo reqwidth $data(w:entry)]
}
if {$height == ""} {
set height [winfo reqheight $data(w:entry)]
}
place $w -x $x -y $y -width $width -height $height -bordermode ignore
raise $w
focus $data(w:entry)
}
proc tixFloatEntry:unpost {w} {
upvar #0 $w data
place forget $w
}
proc tixFloatEntry:config-value {w val} {
upvar #0 $w data
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $val
$data(w:entry) selection from 0
$data(w:entry) selection to end
$data(w:entry) icursor end
}
#----------------------------------------------------------------------
#
# Private methods
#
#----------------------------------------------------------------------
proc tixFloatEntry:invoke {w} {
upvar #0 $w data
if {[llength $data(-command)]} {
set bind(specs) {%V}
set bind(%V) [$data(w:entry) get]
tixEvalCmdBinding $w $data(-command) bind $bind(%V)
}
}
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: FloatEnt.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
#
# FloatEnt.tcl --
#
# An entry widget that can be attached on top of any widget to
# provide dynamic editing. It is used to provide dynamic editing
# for the tixGrid widget, among other things.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
tixWidgetClass tixFloatEntry {
-classname TixFloatEntry
-superclass tixPrimitive
-method {
invoke post unpost
}
-flag {
-command -value
}
-configspec {
{-value value Value ""}
{-command command Command ""}
}
-default {
{.entry.highlightThickness 0}
}
}
#----------------------------------------------------------------------
#
# Initialization bindings
#
#----------------------------------------------------------------------
proc tixFloatEntry:InitWidgetRec {w} {
upvar #0 $w data
tixChainMethod $w InitWidgetRec
}
proc tixFloatEntry:ConstructWidget {w} {
upvar #0 $w data
tixChainMethod $w ConstructWidget
set data(w:entry) [entry $w.entry]
pack $data(w:entry) -expand yes -fill both
}
proc tixFloatEntry:SetBindings {w} {
upvar #0 $w data
tixChainMethod $w SetBindings
tixBind $data(w:entry) <Return> [list tixFloatEntry:invoke $w]
}
#----------------------------------------------------------------------
#
# Class bindings
#
#----------------------------------------------------------------------
proc tixFloatEntryBind {} {
tixBind TixFloatEntry <FocusIn> {
if {[focus -displayof [set %W(w:entry)]] ne [set %W(w:entry)]} {
focus [%W subwidget entry]
[set %W(w:entry)] selection from 0
[set %W(w:entry)] selection to end
[set %W(w:entry)] icursor end
}
}
}
#----------------------------------------------------------------------
#
# Public methods
#
#----------------------------------------------------------------------
proc tixFloatEntry:post {w x y {width ""} {height ""}} {
upvar #0 $w data
if {$width == ""} {
set width [winfo reqwidth $data(w:entry)]
}
if {$height == ""} {
set height [winfo reqheight $data(w:entry)]
}
place $w -x $x -y $y -width $width -height $height -bordermode ignore
raise $w
focus $data(w:entry)
}
proc tixFloatEntry:unpost {w} {
upvar #0 $w data
place forget $w
}
proc tixFloatEntry:config-value {w val} {
upvar #0 $w data
$data(w:entry) delete 0 end
$data(w:entry) insert 0 $val
$data(w:entry) selection from 0
$data(w:entry) selection to end
$data(w:entry) icursor end
}
#----------------------------------------------------------------------
#
# Private methods
#
#----------------------------------------------------------------------
proc tixFloatEntry:invoke {w} {
upvar #0 $w data
if {[llength $data(-command)]} {
set bind(specs) {%V}
set bind(%V) [$data(w:entry) get]
tixEvalCmdBinding $w $data(-command) bind $bind(%V)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More