diff options
-rw-r--r-- | rpt.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -193,6 +193,17 @@ copy_stdin() } } +void +check_u_f_conflict(void (*handle_error_f)(int status), long count) +{ + if ((handle_error_f == continue_on_error) && (count == LONG_MAX)) + { + fprintf(stderr, "rpt: -u and -f options both given, conflict, \ +see man rpt(1)\n"); + exit(EXIT_INVALID_ARG); + } +} + int main(int argc, char* argv[]) { @@ -231,6 +242,8 @@ main(int argc, char* argv[]) } } + check_u_f_conflict(handle_error_f, count); + if (strcount) { char *err = NULL; |