OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [991201-1.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
struct vc_data {
2
        unsigned long   space;
3
        unsigned char   vc_palette[16*3];
4
};
5
 
6
struct vc {
7
        struct vc_data *d;
8
};
9
 
10
struct vc_data a_con;
11
struct vc vc_cons[63] = { &a_con };
12
int default_red[16];
13
int default_grn[16];
14
int default_blu[16];
15
 
16
extern void bar(int);
17
 
18
void reset_palette(int currcons)
19
{
20
        int j, k;
21
        for (j=k=0; j<16; j++) {
22
                (vc_cons[currcons].d->vc_palette) [k++] = default_red[j];
23
                (vc_cons[currcons].d->vc_palette) [k++] = default_grn[j];
24
                (vc_cons[currcons].d->vc_palette) [k++] = default_blu[j];
25
        }
26
        bar(k);
27
}
28
 
29
void bar(int k)
30
{
31
        if (k != 16*3)
32
                abort();
33
}
34
 
35
int main()
36
{
37
        reset_palette(0);
38
        exit(0);
39
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.