1/* this is the driver for c_ptr_test.f03 */ 2 3typedef struct services 4{ 5 int compId; 6 void *globalServices; 7}services_t; 8 9typedef struct comp 10{ 11 void *myServices; 12 void (*setServices)(struct comp *self, services_t *myServices); 13 void *myPort; 14}comp_t; 15 16/* prototypes for f90 functions */ 17void sub0(comp_t *self, services_t *myServices); 18 19int main(int argc, char **argv) 20{ 21 services_t servicesObj; 22 comp_t myComp; 23 24 servicesObj.compId = 17; 25 servicesObj.globalServices = 0; /* NULL; */ 26 myComp.myServices = &servicesObj; 27 myComp.setServices = 0; /* NULL; */ 28 myComp.myPort = 0; /* NULL; */ 29 30 sub0(&myComp, &servicesObj); 31 32 return 0; 33}/* end main() */ 34 35