1266989Smarkj/*
2266989Smarkj * This file and its contents are supplied under the terms of the
3266989Smarkj * Common Development and Distribution License ("CDDL"), version 1.0.
4266989Smarkj * You may only use this file in accordance with the terms of version
5266989Smarkj * 1.0 of the CDDL.
6266989Smarkj *
7266989Smarkj * A full copy of the text of the CDDL should have accompanied this
8266989Smarkj * source.  A copy of the CDDL is also available via the Internet at
9266989Smarkj * http://www.illumos.org/license/CDDL.
10266989Smarkj */
11266989Smarkj
12266989Smarkj/*
13266989Smarkj * Copyright 2013 (c) Joyent, Inc. All rights reserved.
14266989Smarkj */
15266989Smarkj
16266989Smarkj/*
17266989Smarkj * The point of this is to use print() on various functions to make sure that we
18266989Smarkj * can print basic structures. Note that we purposefully are making sure that
19266989Smarkj * there are no pointers here.
20266989Smarkj */
21266989Smarkj#include <unistd.h>
22266989Smarkj
23266989Smarkjtypedef struct final_fantasy_info {
24266989Smarkj	int ff_gameid;
25266989Smarkj	int ff_partysize;
26266989Smarkj	int ff_hassummons;
27266989Smarkj} final_fantasy_info_t;
28266989Smarkj
29266989Smarkjstatic int
30266989Smarkjff_getgameid(final_fantasy_info_t *f)
31266989Smarkj{
32266989Smarkj	return (0);
33266989Smarkj}
34266989Smarkj
35266989Smarkjstatic int
36266989Smarkjff_getpartysize(final_fantasy_info_t *f)
37266989Smarkj{
38266989Smarkj	return (0);
39266989Smarkj}
40266989Smarkj
41266989Smarkjstatic int
42266989Smarkjff_getsummons(final_fantasy_info_t *f)
43266989Smarkj{
44266989Smarkj	return (0);
45266989Smarkj}
46266989Smarkj
47266989Smarkjint
48266989Smarkjmain(void)
49266989Smarkj{
50266989Smarkj	final_fantasy_info_t ffiii, ffx, ffi;
51266989Smarkj
52266989Smarkj	ffi.ff_gameid = 1;
53266989Smarkj	ffi.ff_partysize = 4;
54266989Smarkj	ffi.ff_hassummons = 0;
55266989Smarkj
56266989Smarkj	ffiii.ff_gameid = 6;
57266989Smarkj	ffiii.ff_partysize = 4;
58266989Smarkj	ffiii.ff_hassummons = 1;
59266989Smarkj
60266989Smarkj	ffx.ff_gameid = 10;
61266989Smarkj	ffx.ff_partysize = 3;
62266989Smarkj	ffx.ff_hassummons = 1;
63266989Smarkj
64266989Smarkj	for (;;) {
65266989Smarkj		ff_getgameid(&ffi);
66266989Smarkj		ff_getpartysize(&ffx);
67266989Smarkj		ff_getsummons(&ffiii);
68266989Smarkj		sleep(1);
69266989Smarkj	}
70266989Smarkj	/*NOTREACHED*/
71266989Smarkj	return (0);
72266989Smarkj}
73