OLD | NEW |
1 /* | 1 /* |
2 * Test file with lots of different types, for testing the | 2 * Test file with lots of different types, for testing the |
3 * "ptype" command. | 3 * "ptype" command. |
4 */ | 4 */ |
5 | 5 |
6 /* | 6 /* |
7 * First the basic C types. | 7 * First the basic C types. |
8 */ | 8 */ |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 int main () | 284 int main () |
285 { | 285 { |
286 /* Ensure that malloc is a pointer type; avoid use of "void" and any include f
iles. */ | 286 /* Ensure that malloc is a pointer type; avoid use of "void" and any include f
iles. */ |
287 /* extern char *malloc();*/ | 287 /* extern char *malloc();*/ |
288 | 288 |
289 /* Some of the tests in ptype.exp require invoking malloc, so make | 289 /* Some of the tests in ptype.exp require invoking malloc, so make |
290 sure it is linked in to this program. */ | 290 sure it is linked in to this program. */ |
291 v_char_pointer = (char *) malloc (1); | 291 v_char_pointer = (char *) malloc (1); |
292 | 292 |
293 #ifdef usestubs | |
294 set_debug_traps(); | |
295 breakpoint(); | |
296 #endif | |
297 /* Some linkers (e.g. on AIX) remove unreferenced variables, | 293 /* Some linkers (e.g. on AIX) remove unreferenced variables, |
298 so make sure to reference them. */ | 294 so make sure to reference them. */ |
299 primary = blue; | 295 primary = blue; |
300 primary1 = blue1; | 296 primary1 = blue1; |
301 nonprimary = pink; | 297 nonprimary = pink; |
302 sportscar = porsche; | 298 sportscar = porsche; |
303 clunker = ford; | 299 clunker = ford; |
304 v_struct1.v_int_member = 5; | 300 v_struct1.v_int_member = 5; |
305 v_struct2.v_int_member = 6; | 301 v_struct2.v_int_member = 6; |
306 v_struct3.v_int_member = 7; | 302 v_struct3.v_int_member = 7; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 360 |
365 nested_su.outer_int = 0; | 361 nested_su.outer_int = 0; |
366 v_t_struct_p = 0; | 362 v_t_struct_p = 0; |
367 | 363 |
368 the_highest.a = 0; | 364 the_highest.a = 0; |
369 | 365 |
370 v_boolean = FALSE; | 366 v_boolean = FALSE; |
371 v_boolean2 = my_false; | 367 v_boolean2 = my_false; |
372 return 0; | 368 return 0; |
373 } | 369 } |
OLD | NEW |