| Description: |
OriginalBugID: 2053 RFE
Version: 8.1
SubmitDate: '1999-05-12'
LastModified: '1999-11-18'
Severity: MED
Status: Released
Submitter: pat
ChangedBy: hobbs
OS: Windows NT
OSVersion: 4.0 SP3
Machine: X86
FixedDate: '1999-11-18'
FixedInVersion: 8.2.3
Name:
Jan Nijtmans
Comments:
All those patches are adapted from the Cygnus version of Tcl/Tk (Thanks
to Mummit Khan for his assistance!!!!)
DesiredBehavior:
The supplied patch fixes the following problems:
- In tkWinX.c, the header file <zmouse.h> is included, which
is missing in many development systems. In stead of forcing
all developers to download this file from MicroSoft, it is
much easier to supply the definition of WM_MOUSEWHEEL only,
since that is the only symbol used from the header file.
- The function GetCurrentTime() is obsolete (according to Microsoft),
and should be replaced by GetTickCount(). Some other development
environments (e.g. CygWin) don't even bother to implement
GetCurrentTime(),
thereby forcing users to make the switch.
- The GNU compilers (gcc and egcs) don't support strnicmp() and
stricmp().
Use strncasecmp() and strcasecmp() instead.
- "struct TkFontAttributes" is defined in both tkFont.h and tkWinInt.h.
This leads to a warning if both tkWinInt.h and tkFont.h are included
in a C-file. Better remove the definition from the latter; it doesn't
serve any purpose.
Patch:
*** win/tkWinX.c.origThu Apr 29 21:38:44 1999
--- win/tkWinX.cWed May 12 06:30:33 1999
***************
*** 19,25 ****
* The zmouse.h file includes the definition for WM_MOUSEWHEEL.
*/
! #include <zmouse.h>
/*
* Definitions of extern variables supplied by this file.
--- 19,25 ----
* The zmouse.h file includes the definition for WM_MOUSEWHEEL.
*/
! #define WM_MOUSEWHEEL (WM_MOUSELAST+1)
/*
* Definitions of extern variables supplied by this file.
***************
*** 1129,1133 ****
unsigned long
TkpGetMS()
{
! return GetCurrentTime();
}
--- 1129,1133 ----
unsigned long
TkpGetMS()
{
! return GetTickCount();
}
*** win/tkWinPort.h.origThu Apr 29 21:38:43 1999
--- win/tkWinPort.hWed May 12 06:30:32 1999
***************
*** 39,46 ****
--- 39,48 ----
# define hypot _hypot
#endif /* _MSC_VER */
+ #ifndef __GNUC__
#define strncasecmp strnicmp
#define strcasecmp stricmp
+ #endif
#define NBBY 8
*** win/tkWinInt.h.origThu Apr 29 21:38:42 1999
--- win/tkWinInt.hWed May 12 07:40:47 1999
***************
*** 41,48 ****
#define WS_EX_TOOLWINDOW0x00000080L
#endif
- typedef struct TkFontAttributes TkFontAttributes;
-
/*
* The TkWinDCState is used to save the state of a device context
* so that it can be restored later.
--- 41,46 ----
PatchFiles:
tkWinX.c tkWinPort.h tkWinInt.h
The mousewheel stuff we'd rather leave to the std headers and not
import just the one #define.
GetTickCount now used as specified.
ifdef GNUC for str*cmp added.
struct TkFontAttrs removed from tkWinInt.h
-- 11/16/1999 hobbs
|