aboutsummaryrefslogtreecommitdiff
path: root/rpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpt.c')
-rw-r--r--rpt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/rpt.c b/rpt.c
index 409a8cc..b35f492 100644
--- a/rpt.c
+++ b/rpt.c
@@ -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;