diff options
Diffstat (limited to 'doc/manual/example5/function.c')
-rw-r--r-- | doc/manual/example5/function.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/manual/example5/function.c b/doc/manual/example5/function.c new file mode 100644 index 0000000..457b4a4 --- /dev/null +++ b/doc/manual/example5/function.c @@ -0,0 +1,16 @@ +static ScreenInfo default; +static int initialized = 0; + +ScreenInfo* default_screen_depth() { + if (!initialized) { + default.redBits = 8; + default.greenBits = 8; + default.blueBits = 8; + initialized = 1; + } + return &default; +} + +void set_screen_depth(ScreenInfo* info) { + /* Do something ... */ +} |