Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr51801.c
blobd5617d530294c8417e29285704008156cd83ea61
1 /* { dg-do compile } */
3 typedef struct { char Vshow; } TScreen;
4 typedef struct _Misc { char Tshow; } Misc;
5 typedef struct _XtermWidgetRec { TScreen screen; Misc misc; } XtermWidgetRec, *XtermWidget;
6 extern XtermWidget term;
7 void Bell (XtermWidget, int, int);
8 void set_tek_visibility (int);
10 void
11 handle_tekshow (void *gw, int allowswitch)
13 XtermWidget xw = term;
14 if (!((xw)->misc.Tshow))
15 set_tek_visibility (1);
18 void
19 do_tekonoff (void *gw, void *closure, void *data)
21 handle_tekshow (gw, 0);
24 void
25 do_vtonoff (void *gw, void *closure, void *data)
29 void
30 handle_toggle (void (*proc) (void *gw, void *closure, void *data),
31 int var, char **params, unsigned int nparams, void *w,
32 void *closure, void *data)
34 XtermWidget xw = term;
35 int dir = -2;
36 switch (nparams)
38 case 0:
39 dir = -1;
41 switch (dir)
43 case 1:
44 (*proc) (w, closure, data);
45 Bell (xw, 2, 0);
49 void
50 HandleVisibility (void *w, char **params, unsigned int *param_count)
52 XtermWidget xw = term;
53 if (*param_count == 2)
54 switch (params[0][0])
56 case 'v':
57 handle_toggle (do_vtonoff, (int) ((int) (&(xw)->screen)->Vshow),
58 params + 1, (*param_count) - 1, w, (void *) 0,
59 (void *) 0);
60 handle_toggle (do_tekonoff, (int) ((int) ((xw)->misc.Tshow)),
61 params + 1, (*param_count) - 1, w, (void *) 0,
62 (void *) 0);