summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/980816-1.c
blob: a79100fab57a103ecd6fbe6f90351b85e15bc17e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
typedef __SIZE_TYPE__ size_t;
typedef void *XtPointer;

typedef struct _WidgetRec *Widget;
typedef struct _WidgetClassRec *WidgetClass;

extern WidgetClass commandWidgetClass;

typedef void (*XtCallbackProc)(
    Widget 		 ,
    XtPointer 		 ,	 
    XtPointer 		 	 
);

extern const  char XtStrings[];


typedef struct						 
{
	char			*Name,			 
				*Label;			 
	XtCallbackProc		Callback;		 
	XtPointer		ClientData;		 
	Widget			W;				 
} DialogButtonType, *DialogButtonTypePtr;

 
Widget AddButtons(Widget Parent, Widget Top,
	DialogButtonTypePtr Buttons, size_t Count)
{
	int		i;

	for (i = 0; i < Count; i++)
	{
		if (!Buttons[i].Label)
			continue;
		Buttons[i].W  = XtVaCreateManagedWidget(Buttons[i].Name,
			commandWidgetClass,
			Parent,
			((char*)&XtStrings[429]) , Buttons[i].Label,
			"fromHoriz" , i ? Buttons[i-1].W : ((void *)0) ,
			"fromVert" , Top,
			"resizable" , 1 ,
			((void *)0) );

		XtAddCallback(((char*)&XtStrings[136]),
				 Buttons[i].Callback, Buttons[i].ClientData);
	}
	return(Buttons[Count-1].W);
}