diff options
author | nijtmans <nijtmans> | 2010-01-10 22:58:39 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-01-10 22:58:39 (GMT) |
commit | a81c8243240443b1ffe54faec5e49d7e5dba4ee6 (patch) | |
tree | dbbc67aa5fc759bc2ea978873fb23e5c3a614329 /win/tclWinReg.c | |
parent | 997d61c0f6049d4bc0dd57aefc84e5f7f12c4ac2 (diff) | |
download | tcl-a81c8243240443b1ffe54faec5e49d7e5dba4ee6.zip tcl-a81c8243240443b1ffe54faec5e49d7e5dba4ee6.tar.gz tcl-a81c8243240443b1ffe54faec5e49d7e5dba4ee6.tar.bz2 |
* win/tclWinDde.c: VC++ 6.0 doesn't have
* win/tclWinReg.c PDWORD_PTR
* win/tclWinThrd.c: Fix various minor gcc warnings.
* win/tclWinTime.c
* win/tclWinConsole.c Put channel type definitions
* win/tclWinChan.c in static const memory
* win/tclWinPipe.c
* win/tclWinSerial.c
* win/tclWinSock.c
* generic/tclIOGT.c
* generic/tclIORChan.c
* generic/tclIORTrans.c
* unix/tclUnixChan.c
* unix/tclUnixPipe.c
* unix/tclUnixSock.c
* unix/configure (regenerated with autoconf 2.59)
* tests/info.test: Make test independant from
tcltest implementation.
Diffstat (limited to 'win/tclWinReg.c')
-rw-r--r-- | win/tclWinReg.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 4e6ba89..195afd2 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.49 2009/11/23 20:17:36 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.50 2010/01/10 22:58:40 nijtmans Exp $ */ #undef STATIC_BUILD @@ -709,8 +709,7 @@ GetType( DWORD result; DWORD type; Tcl_DString ds; - const char *valueName; - const char *nativeValue; + const char *valueName, *nativeValue; int length; /* @@ -778,8 +777,7 @@ GetValue( Tcl_Obj *valueNameObj) /* Name of value to get. */ { HKEY key; - const char *valueName; - const char *nativeValue; + const char *valueName, *nativeValue; DWORD result, length, type; Tcl_DString data, buf; int nameLen; @@ -880,7 +878,7 @@ GetValue( */ Tcl_SetObjResult(interp, Tcl_NewByteArrayObj( - (const unsigned char *)Tcl_DStringValue(&data), (int) length)); + (BYTE *) Tcl_DStringValue(&data), (int) length)); } Tcl_DStringFree(&data); return result; @@ -1394,15 +1392,15 @@ SetValue( (DWORD) type, (BYTE *) data, (DWORD) length); Tcl_DStringFree(&buf); } else { - char *data; + BYTE *data; /* * Store binary data in the registry. */ - data = (char *) Tcl_GetByteArrayFromObj(dataObj, &length); + data = (BYTE *) Tcl_GetByteArrayFromObj(dataObj, &length); result = regWinProcs->regSetValueExProc(key, valueName, 0, - (DWORD) type, (BYTE *) data, (DWORD) length); + (DWORD) type, data, (DWORD) length); } Tcl_DStringFree(&nameBuf); @@ -1440,7 +1438,8 @@ BroadcastValue( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - LRESULT result, sendResult; + LRESULT result; + DWORD sendResult; UINT timeout = 3000; int len; const char *str; @@ -1473,7 +1472,7 @@ BroadcastValue( */ result = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, - (WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, (PDWORD_PTR) &sendResult); + (WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, &sendResult); objPtr = Tcl_NewObj(); Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewLongObj((long) result)); @@ -1606,7 +1605,7 @@ ConvertDWORD( */ localType = (*((char*) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; - return (type != localType) ? (DWORD)SWAPLONG(value) : value; + return (type != localType) ? (DWORD) SWAPLONG(value) : value; } /* |