31 lines
529 B
C
31 lines
529 B
C
#include <stdio.h>
|
|
#include "gui.h"
|
|
#include "simdata.h"
|
|
|
|
int main(){
|
|
struct simdata_t *simdata = init_simdata();
|
|
if(!simdata){
|
|
printf("failed to initialise simdata");
|
|
return 1;
|
|
}
|
|
if(start_gui()){
|
|
printf("Failed on start_gui()\n");
|
|
free_simdata(simdata);
|
|
return 1;
|
|
}
|
|
if(gui_continue_request()){
|
|
printf("Failed on gui_continue_request()\n");
|
|
free_simdata(simdata);
|
|
return 1;
|
|
}
|
|
|
|
if(end_gui()){
|
|
printf("Failed on end_gui()\n");
|
|
free_simdata(simdata);
|
|
return 1;
|
|
}
|
|
|
|
free_simdata(simdata);
|
|
return 0;
|
|
}
|