summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-11-08 18:44:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-11-08 18:44:39 (GMT)
commit1411b2f26b3d46b402c4774770fb5356cd47ef95 (patch)
tree080187f8a151cf82a630512856d2315e712cedf9 /win
parent4f2679372f637fcd2f0d997b9d97165a6b558f12 (diff)
downloadtk-1411b2f26b3d46b402c4774770fb5356cd47ef95.zip
tk-1411b2f26b3d46b402c4774770fb5356cd47ef95.tar.gz
tk-1411b2f26b3d46b402c4774770fb5356cd47ef95.tar.bz2
Lots of small changes to make code more pretty and C89-like.
Diffstat (limited to 'win')
-rw-r--r--win/nmakehlp.c10
-rw-r--r--win/tkWinClipboard.c4
-rw-r--r--win/tkWinDialog.c5
-rw-r--r--win/tkWinDraw.c10
-rw-r--r--win/tkWinMenu.c4
-rw-r--r--win/tkWinTest.c11
6 files changed, 24 insertions, 20 deletions
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index ace6d2b..b5f494e 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -11,7 +11,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* ----------------------------------------------------------------------------
- * RCS: @(#) $Id: nmakehlp.c,v 1.11 2007/12/14 02:19:43 patthoyts Exp $
+ * RCS: @(#) $Id: nmakehlp.c,v 1.12 2008/11/08 18:44:40 dkf Exp $
* ----------------------------------------------------------------------------
*/
@@ -592,7 +592,10 @@ typedef struct list_item_t {
/* insert a list item into the list (list may be null) */
static list_item_t *
-list_insert(list_item_t **listPtrPtr, const char *key, const char *value)
+list_insert(
+ list_item_t **listPtrPtr,
+ const char *key,
+ const char *value)
{
list_item_t *itemPtr = malloc(sizeof(list_item_t));
if (itemPtr) {
@@ -609,7 +612,8 @@ list_insert(list_item_t **listPtrPtr, const char *key, const char *value)
}
static void
-list_free(list_item_t **listPtrPtr)
+list_free(
+ list_item_t **listPtrPtr)
{
list_item_t *tmpPtr, *listPtr = *listPtrPtr;
while (listPtr) {
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c
index 093280c..6c021dd 100644
--- a/win/tkWinClipboard.c
+++ b/win/tkWinClipboard.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinClipboard.c,v 1.9 2007/01/11 15:35:40 dkf Exp $
+ * RCS: @(#) $Id: tkWinClipboard.c,v 1.10 2008/11/08 18:44:40 dkf Exp $
*/
#include "tkWinInt.h"
@@ -158,7 +158,7 @@ TkSelGetSelection(
* Pass the data off to the selection procedure.
*/
- result = (*proc)(clientData, interp, Tcl_DStringValue(&ds));
+ result = proc(clientData, interp, Tcl_DStringValue(&ds));
Tcl_DStringFree(&ds);
CloseClipboard();
return result;
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 871eeee..8f41788 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDialog.c,v 1.54 2008/10/17 23:18:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.55 2008/11/08 18:44:40 dkf Exp $
*
*/
@@ -467,8 +467,7 @@ ColorDlgHookProc(
if ((title != NULL) && (title[0] != '\0')) {
Tcl_DString ds;
- (*tkWinProcs->setWindowText)(hDlg,
- Tcl_WinUtfToTChar(title, -1, &ds));
+ tkWinProcs->setWindowText(hDlg, Tcl_WinUtfToTChar(title,-1,&ds));
Tcl_DStringFree(&ds);
}
if (tsdPtr->debugFlag) {
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index c082b58..15821f3 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.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: tkWinDraw.c,v 1.21 2008/04/27 22:39:16 dkf Exp $
+ * RCS: @(#) $Id: tkWinDraw.c,v 1.22 2008/11/08 18:44:40 dkf Exp $
*/
#include "tkWinInt.h"
@@ -814,7 +814,7 @@ RenderObject(
SetPolyFillMode(dcMem, (gc->fill_rule == EvenOddRule) ? ALTERNATE
: WINDING);
oldMemBrush = SelectObject(dcMem, CreateSolidBrush(gc->foreground));
- (*func)(dcMem, winPoints, npoints);
+ func(dcMem, winPoints, npoints);
BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0, COPYFG);
/*
@@ -826,7 +826,7 @@ RenderObject(
if (gc->fill_style == FillOpaqueStippled) {
DeleteObject(SelectObject(dcMem,
CreateSolidBrush(gc->background)));
- (*func)(dcMem, winPoints, npoints);
+ func(dcMem, winPoints, npoints);
BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0,
COPYBG);
}
@@ -842,9 +842,7 @@ RenderObject(
SetPolyFillMode(dc, (gc->fill_rule == EvenOddRule) ? ALTERNATE
: WINDING);
-
- (*func)(dc, winPoints, npoints);
-
+ func(dc, winPoints, npoints);
SelectObject(dc, oldPen);
}
DeleteObject(SelectObject(dc, oldBrush));
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 727c0c4..2d38ae1 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.60 2008/10/17 23:18:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.61 2008/11/08 18:44:40 dkf Exp $
*/
#define OEMRESOURCE
@@ -669,7 +669,7 @@ ReconfigureWindowsMenu(
}
}
if (!systemMenu) {
- (*tkWinProcs->insertMenu)(winMenuHdl, 0xFFFFFFFF, flags,
+ tkWinProcs->insertMenu(winMenuHdl, 0xFFFFFFFF, flags,
itemID, lpNewItem);
}
Tcl_DStringFree(&translatedText);
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index 4b9480f..bd7c3e3 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.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: tkWinTest.c,v 1.20 2008/11/03 22:44:22 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinTest.c,v 1.21 2008/11/08 18:44:40 dkf Exp $
*/
#include "tkWinInt.h"
@@ -393,10 +393,13 @@ TestfindwindowObjCmd(
}
static BOOL CALLBACK
-EnumChildrenProc(HWND hwnd, LPARAM lParam)
+EnumChildrenProc(
+ HWND hwnd,
+ LPARAM lParam)
{
- Tcl_Obj *listObj = (Tcl_Obj *)lParam;
- Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewLongObj((long)hwnd));
+ Tcl_Obj *listObj = (Tcl_Obj *) lParam;
+
+ Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewLongObj((long) hwnd));
return TRUE;
}