| 1 |
void abort (void); |
| 2 |
void exit (int); |
| 3 |
|
| 4 |
struct a_struct |
| 5 |
{ |
| 6 |
unsigned char a_character; |
| 7 |
}; |
| 8 |
|
| 9 |
struct a_struct an_array[5]; |
| 10 |
struct a_struct *a_ptr; |
| 11 |
int yabba = 1; |
| 12 |
|
| 13 |
int |
| 14 |
f (a, b) |
| 15 |
unsigned char a; |
| 16 |
unsigned long b; |
| 17 |
{ |
| 18 |
long i, j, p, q, r, s; |
| 19 |
|
| 20 |
if (b != (unsigned long) 0) |
| 21 |
{ |
| 22 |
if (yabba) |
| 23 |
return -1; |
| 24 |
s = 4000000 / b; |
| 25 |
for (i = 0; i < 11; i++) |
| 26 |
{ |
| 27 |
for (j = 0; j < 256; j++) |
| 28 |
{ |
| 29 |
if (((p - s < 0) ? -s : 0) < (( q - s < 0) ? -s : q)) |
| 30 |
r = i; |
| 31 |
} |
| 32 |
} |
| 33 |
} |
| 34 |
|
| 35 |
if (yabba) |
| 36 |
return 0; |
| 37 |
a_ptr = &an_array[a]; |
| 38 |
a_ptr->a_character = (unsigned char) r; |
| 39 |
} |
| 40 |
|
| 41 |
int |
| 42 |
main (void) |
| 43 |
{ |
| 44 |
if (f (1, 0UL) != 0) |
| 45 |
abort (); |
| 46 |
exit (0); |
| 47 |
} |