int main(int argc , char *argv[]) { int size; Appointment_t *appo; Working_hours_t hours; Files_t files; #ifdef DEBUG printf("STARTED argc = %d %s \n",argc,argv[1]); #endif get_main_arguments(argc,argv,&hours,&files); appo = getRequests(&files,&size); #ifdef DEBUG printf("allocated array's siz is %d \n",size); #endif write_appointments(appo,size,&files); print_parameters(&files,&hours); #ifdef DEBUG printf("%s %s %s %s %s %s",files.records_file_n ,files.patients_file_n ,files.accepted_appo_file_n ,files.delete_file_n ,files.parameters_file_n ,files.readable_records_file_n); #endif return 0; }
int main(int argc, char *argv[]) { Files_t files; Working_hours_t hours; Appointment_t *arr; node_t* node,*temp; int size,num,i; get_main_arguments(argc,argv,&hours,&files); arr=getRequests(&files,&size); print_parameters(&files,&hours); write_appointments(arr,size,&files); node=build_ll(arr,size,&hours); temp=node; #ifndef DEBUG_MODE while(node!=NULL){ printf("hour=%d\n",node->hour); node=node->next; } #endif node=temp; add_personal_data(node,&files); node=temp; delete_appointments(&node,&files); write_accepted_app(node,&files); free_list(node); return 0; }
int main(int argc, char* argv[]) { Appointment_t* appointments; /*Array of records*/ int size; /*Number of records*/ /*Takes main arguments and change hours and file names*/ get_main_arguments(argc, argv, &hours, &files); /*Reads records and writes into the array them*/ /*Size is a records number*/ appointments=getRequests(&files, &size); /*Takes array of records and writes records into the file as xml file*/ write_appointments(appointments, size, &files); /*Writes file names and hours into the file*/ print_parameters(&files, &hours); return 0; }