From 659cd0252a5ca0371f1efb5f55d8bea38fa01156 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Sat, 14 Oct 2023 23:35:03 -0700 Subject: [PATCH] exit when the wrong args are passed --- Makefile | 5 ----- rcpp.cc | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4c665bb..9baad41 100644 --- a/Makefile +++ b/Makefile @@ -34,11 +34,6 @@ tags: $(SOURCES) $(TARGET): $(OBJS) $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(OBJS) - -.PHONY: cclean -cclean: - rm -r build cmake-build-* - print-%: ; @echo '$(subst ','\'',$*=$($*))' %.o:%.cc diff --git a/rcpp.cc b/rcpp.cc index 2c7e204..ff2b805 100644 --- a/rcpp.cc +++ b/rcpp.cc @@ -149,6 +149,7 @@ main(int argc, char *argv[]) auto regexOptions = std::regex_constants::optimize; if (argc < 4) { std::cerr << "Usage: rcpp pattern files... destination\n"; + exit(0); } auto pattern = std::string(argv[1]);