xref: /freebsd/contrib/netbsd-tests/usr.bin/xlint/lint1/d_nested_structs.c (revision 9268022b74279434ed6300244e3f977e56a8ceb5)
1*57718be8SEnji Cooper /* Nested struct */
2*57718be8SEnji Cooper typedef void *EditLine;
3*57718be8SEnji Cooper typedef void *History;
4*57718be8SEnji Cooper 
5*57718be8SEnji Cooper typedef struct {
6*57718be8SEnji Cooper 	EditLine	*el;
7*57718be8SEnji Cooper 	History		*hist;
8*57718be8SEnji Cooper } el_mode_t;
9*57718be8SEnji Cooper 
10*57718be8SEnji Cooper struct el_modes_s {
11*57718be8SEnji Cooper 	el_mode_t command;
12*57718be8SEnji Cooper 	el_mode_t string;
13*57718be8SEnji Cooper 	el_mode_t filec;
14*57718be8SEnji Cooper 	el_mode_t mime_enc;
15*57718be8SEnji Cooper };
16*57718be8SEnji Cooper 
17*57718be8SEnji Cooper struct el_modes_s elm = {
18*57718be8SEnji Cooper 	.command  = { .el = 0, .hist = 0, },
19*57718be8SEnji Cooper 	.string   = { .el = 0, .hist = 0, },
20*57718be8SEnji Cooper 	.filec    = { .el = 0, .hist = 0, },
21*57718be8SEnji Cooper };
22