/* main.c */ #include #include "pcode.h" data_t data_min, data_max; int main(int argc, char** argv) { interp_t interp; int retval = EXIT_SUCCESS; /* Initialize the interpreter. */ mpz_init_set_str(data_min.val, "-9999999999", 10); mpz_init_set_str(data_max.val, "9999999999", 10); /* Scan command line arguments. */ switch (scan_args(argc, argv, &interp)) { case -1: return EXIT_FAILURE; case 1: return EXIT_SUCCESS; } if (interp.debug) debug_init(&interp); /* Read all input data. */ if (load_prog(&interp) < 0) {retval = EXIT_FAILURE; goto end;} /* Run the program. */ if (exec_prog(&interp) < 0) {retval = EXIT_FAILURE; goto end;} end:/* Done. */ VEC_FREE(data_t, &interp.vm.cards); if (interp.debug) debug_clear(&interp); return retval; } /* vim: set ts=4 sts=4 sw=4 tw=80 et: */