From dba90f5c1598c37aef9077aabca7ea4b89c7992c Mon Sep 17 00:00:00 2001 From: Vlasta Vesely Date: Sat, 4 Jan 2020 08:59:43 +0100 Subject: [PATCH] make command line args mutually exclusive --- main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.c b/main.c index 9458fee..d5cb7fb 100644 --- a/main.c +++ b/main.c @@ -134,6 +134,11 @@ int main(int argc, const char **argv) } } + if (flags != FLAG_REVERSE && flags != FLAG_CZECH && flags != FLAG_ENCODE) { + error("options '-r', '-e' and '-c' are mutually exclusive."); + return -1; + } + if (flags & FLAG_STDIN) { input = stdin_read(); if (input == NULL) {