summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-01-29 12:41:11 (GMT)
committernijtmans <nijtmans>2010-01-29 12:41:11 (GMT)
commit72a2e7f509b932f6409e5e2e2e39dfde6da89897 (patch)
tree77377fb3841d63142de26c8498d841817d531636 /generic/tkText.c
parent8653f8ec25290721bc6fac2a9c68bbff0a4c4eb3 (diff)
downloadtk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.zip
tk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.tar.gz
tk-72a2e7f509b932f6409e5e2e2e39dfde6da89897.tar.bz2
Fix various gcc-4.4 warnings and formatting, all
backported from HEAD.
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 75d253f..518af81 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.79.2.4 2009/10/22 21:41:20 dkf Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.79.2.5 2010/01/29 12:41:11 nijtmans Exp $
*/
#include "default.h"
@@ -240,7 +240,7 @@ static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
DEF_TEXT_YSCROLL_COMMAND, -1, Tk_Offset(TkText, yScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_END}
+ {TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0}
};
/*
@@ -417,6 +417,8 @@ static SearchLineIndexProc TextSearchGetLineIndex;
static Tk_ClassProcs textClass = {
sizeof(Tk_ClassProcs), /* size */
TextWorldChangedCallback, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
@@ -3392,16 +3394,16 @@ TkTextSelectionEvent(
* event generate $textWidget <<Selection>>
*/
- XEvent event;
+ union {XEvent general; XVirtualEvent virtual;} event;
memset(&event, 0, sizeof(event));
- event.xany.type = VirtualEvent;
- event.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.xany.send_event = False;
- event.xany.window = Tk_WindowId(textPtr->tkwin);
- event.xany.display = Tk_Display(textPtr->tkwin);
- ((XVirtualEvent *) &event)->name = Tk_GetUid("Selection");
- Tk_HandleEvent(&event);
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(textPtr->tkwin);
+ event.general.xany.display = Tk_Display(textPtr->tkwin);
+ event.virtual.name = Tk_GetUid("Selection");
+ Tk_HandleEvent(&event.general);
}
/*
@@ -5166,18 +5168,18 @@ static void
GenerateModifiedEvent(
TkText *textPtr) /* Information about text widget. */
{
- XEvent event;
+ union {XEvent general; XVirtualEvent virtual;} event;
Tk_MakeWindowExist(textPtr->tkwin);
memset(&event, 0, sizeof(event));
- event.xany.type = VirtualEvent;
- event.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.xany.send_event = False;
- event.xany.window = Tk_WindowId(textPtr->tkwin);
- event.xany.display = Tk_Display(textPtr->tkwin);
- ((XVirtualEvent *) &event)->name = Tk_GetUid("Modified");
- Tk_HandleEvent(&event);
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(textPtr->tkwin);
+ event.general.xany.display = Tk_Display(textPtr->tkwin);
+ event.virtual.name = Tk_GetUid("Modified");
+ Tk_HandleEvent(&event.general);
}
/*