1 #include <stdio.h> 2 3 extern int foo1; 4 extern int foo2; 5 extern void bar (void); 6 7 void 8 xxx1 (void) 9 { 10 printf ("MAIN1\n"); 11 } 12 13 void 14 xxx2 (void) 15 { 16 printf ("MAIN2\n"); 17 } 18 19 int 20 main (void) 21 { 22 foo1 = 1; 23 foo2 = 1; 24 bar (); 25 if (foo1 == -1) 26 printf ("OK1\n"); 27 else if (foo1 == 1) 28 printf ("OK2\n"); 29 if (foo2 == -1) 30 printf ("OK3\n"); 31 else if (foo2 == 1) 32 printf ("OK4\n"); 33 return 0; 34 } 35