-int check_argc_exact(int nargs, int expected)
-{
- if (nargs < expected)
- fprintf(stderr, "%s: too few arguments\n", argv0_buf);
- if (nargs > expected)
- fprintf(stderr, "%s: too many arguments\n", argv0_buf);
-
- return nargs != expected;
-}
-
-int check_argc_min(int nargs, int expected)
-{
- if (nargs < expected) {
- fprintf(stderr, "%s: too few arguments\n", argv0_buf);
- return 1;
- }
-
- return 0;
-}
-
-int check_argc_max(int nargs, int expected)
-{
- if (nargs > expected) {
- fprintf(stderr, "%s: too many arguments\n", argv0_buf);
- return 1;
- }
-
- return 0;
-}
-