diff options
Diffstat (limited to 'rpt.c')
-rw-r--r-- | rpt.c | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -2,7 +2,6 @@ #include <errno.h> #include <fcntl.h> -#include <getopt.h> #include <poll.h> #include <stdio.h> #include <stdlib.h> @@ -80,7 +79,7 @@ exec_child(char **argv) if (stdin_clone) { - status = lseek(clone_fd, 0, L_SET); + status = lseek(clone_fd, 0, SEEK_SET); if (status < 0) { @@ -177,23 +176,13 @@ copy_stdin() int main(int argc, char* argv[]) { - struct option const opts[] = { - {"count", required_argument, NULL, 'n'}, - {"force", no_argument, NULL, 'f'}, - {"version", no_argument, NULL, 'V'}, - {"help", no_argument, NULL, 'h'}, - {NULL, 0, NULL, 0} - }; - - opterr = 0; /* dismiss getopt error message */ int opt; - char *strcount = NULL; long count = 1; void (*handle_error_f)(int status) = exit_on_error; - while ((opt = getopt_long(argc, argv, "+:n:fVh", opts, NULL)) >= 0) + while ((opt = getopt(argc, argv, ":n:fVh")) != -1) { switch(opt) { |