int main(int argc, char *argv[]) { int ch; setprogname(argv[0]); (void)setlocale(LC_ALL, ""); while ((ch = getopt(argc, argv, "")) != -1) { switch (ch) { default: errx(EXIT_FAILURE, "usage: dd [operand ...]"); /* NOTREACHED */ } } argc -= (optind - 1); argv += (optind - 1); jcl(argv); setup(); (void)signal(SIGINFO, summaryx); (void)signal(SIGINT, terminate); (void)sigemptyset(&infoset); (void)sigaddset(&infoset, SIGINFO); (void)atexit(summary); while (files_cnt--) dd_in(); dd_close(); exit(0); /* NOTREACHED */ }
int dd_main(int argc, char *argv[]) { int ch; while ((ch = getopt(argc, argv, "")) != -1) { switch (ch) { default: fprintf(stderr, "usage: dd [operand ...]\n"); exit(1); /* NOTREACHED */ } } argc -= (optind - 1); argv += (optind - 1); jcl(argv); setup(); // (void)signal(SIGINFO, summaryx); (void)signal(SIGINT, terminate); (void)sigemptyset(&infoset); // (void)sigaddset(&infoset, SIGINFO); (void)atexit(summary); while (files_cnt--) dd_in(); dd_close(); exit(0); /* NOTREACHED */ }
int main(int argc, char *argv[]) { (void)setlocale(LC_CTYPE, ""); jcl(argv); setup(); (void)signal(SIGINFO, summaryx); (void)signal(SIGINT, terminate); atexit(summary); while (files_cnt--) dd_in(); dd_close(); exit(0); }
int main(int argc, char *argv[]) { jcl(argv); setup(); (void)signal(SIGINFO, summaryx); (void)signal(SIGINT, terminate); atexit(summary); if (cpy_cnt != (size_t)-1) { while (files_cnt--) dd_in(); } dd_close(); exit(0); }