summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-01-11 15:35:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-01-11 15:35:39 (GMT)
commita7b45de808c4bca805fab7b4eb90aa6e6f09e2ac (patch)
tree9afda096b9165b4f20fb70975876d2bf0c1c2c29 /win/tkWinX.c
parenta46a8df372318c40d2d0c346578eef7412a7b257 (diff)
downloadtk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.zip
tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.gz
tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.bz2
Many minute fixes to reduce number of minor warnings from GCC.
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r--win/tkWinX.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 5614385..145eb6d 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinX.c,v 1.54 2006/08/30 21:55:51 hobbs Exp $
+ * RCS: @(#) $Id: tkWinX.c,v 1.55 2007/01/11 15:35:41 dkf Exp $
*/
/*
@@ -173,8 +173,8 @@ TkGetServerInfo(
os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&os);
- sprintf(buffer, "Windows %d.%d %d %s", os.dwMajorVersion,
- os.dwMinorVersion, os.dwBuildNumber,
+ sprintf(buffer, "Windows %d.%d %d %s", (int)os.dwMajorVersion,
+ (int)os.dwMinorVersion, (int)os.dwBuildNumber,
#ifdef _WIN64
"Win64"
#else
@@ -316,7 +316,7 @@ TkWinXInit(
LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
(LPTSTR) &lpCP, sizeof(lpCP)/sizeof(TCHAR))
&& TranslateCharsetInfo((DWORD *)lpCP, &lpCs, TCI_SRCCODEPAGE)) {
- UpdateInputLanguage(lpCs.ciCharset);
+ UpdateInputLanguage((int) lpCs.ciCharset);
}
/*
@@ -818,7 +818,7 @@ TkWinChildProc(
switch (message) {
case WM_INPUTLANGCHANGE:
- UpdateInputLanguage(wParam);
+ UpdateInputLanguage((int) wParam);
result = 1;
break;
@@ -1263,7 +1263,7 @@ GenerateXEvent(
event.type = KeyPress;
event.xany.send_event = -3;
event.xkey.keycode = wParam;
- event.xkey.nbytes = Tcl_UniCharToUtf(wParam, buffer);
+ event.xkey.nbytes = Tcl_UniCharToUtf((int)wParam, buffer);
for (i=0; i<event.xkey.nbytes && i<TCL_UTF_MAX; ++i) {
event.xkey.trans_chars[i] = buffer[i];
}
@@ -1600,18 +1600,20 @@ HandleIMEComposition(
}
if (n > 0) {
- char *buff = ckalloc(n);
+ char *buff = ckalloc((unsigned) n);
TkWindow *winPtr;
XEvent event;
int i;
if (isWinNT) {
- n = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, buff, n);
+ n = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, buff,
+ (unsigned) n);
} else {
Tcl_DString utfString, unicodeString;
Tcl_Encoding unicodeEncoding = TkWinGetUnicodeEncoding();
- n = ImmGetCompositionStringA(hIMC, GCS_RESULTSTR, buff, n);
+ n = ImmGetCompositionStringA(hIMC, GCS_RESULTSTR, buff,
+ (unsigned) n);
Tcl_DStringInit(&utfString);
Tcl_ExternalToUtfDString(keyInputEncoding, buff, n, &utfString);
Tcl_UtfToExternalDString(unicodeEncoding,
@@ -1625,10 +1627,10 @@ HandleIMEComposition(
*/
ckfree((char *) buff);
- buff = (char *) ckalloc(i);
+ buff = (char *) ckalloc((unsigned) i);
}
n = i;
- memcpy(buff, Tcl_DStringValue(&unicodeString), n);
+ memcpy(buff, Tcl_DStringValue(&unicodeString), (unsigned) n);
Tcl_DStringFree(&utfString);
Tcl_DStringFree(&unicodeString);
}