int main(int argc, char **argv) { int r; setlocale(LC_ALL, ""); parse_opts(argc, argv); aug = aug_init(root, loadpath, flags|AUG_NO_ERR_CLOSE); if (aug == NULL || aug_error(aug) != AUG_NOERROR) { fprintf(stderr, "Failed to initialize Augeas\n"); if (aug != NULL) print_aug_error(); exit(EXIT_FAILURE); } add_transforms(transforms, transformslen); if (print_version) { print_version_info(); return EXIT_SUCCESS; } readline_init(); if (optind < argc) { // Accept one command from the command line r = run_args(argc - optind, argv+optind); } else { r = main_loop(); } if (history_file != NULL) write_history(history_file); return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }
/* like add_transform but with non-pointer signature */ Transform add_transforms_(const Transform t1, const Transform t2) { return add_transforms(&t1, &t2); }