Imported Upstream version 2.9.0
[debian/cc1111] / support / regression / tests / structidx.c
1 /* Code to generate code to see how structure indexs are evaluated.
2    Originally part of gbdk/examples/gb/paint.c
3
4  */
5 #include <testfwk.h>
6
7 typedef unsigned char UBYTE;
8
9 typedef struct cursor_info_
10 {
11   UBYTE data_idx;
12   UBYTE w, h;
13   UBYTE hot_x, hot_y;
14 } cursor_info;
15
16 const cursor_info cursors[] =
17 {
18   { 0, 1, 1, 0, 0 },
19   { 1, 2, 2, 0, 15 },
20   { 5, 2, 2, 0, 15 },
21   { 9, 2, 2, 2, 15 },
22   { 13, 2, 2, 0, 15 },
23   { 17, 2, 2, 5, 10 }
24 };
25
26 UBYTE current_cursor;
27
28 UBYTE
29 getWidth(void)
30 {
31   return cursors[current_cursor].w;
32 }
33
34 void testBug(void)
35 {
36 }