1
0

2024-01-01 work

This commit is contained in:
dtb 2024-01-01 21:59:37 -07:00
parent eec81218d9
commit c2496ab0e8

View File

@ -2,9 +2,10 @@
#include <fcntl.h> /* open(2) */ #include <fcntl.h> /* open(2) */
#include <stdio.h> /* fprintf(3), stderr */ #include <stdio.h> /* fprintf(3), stderr */
#include <stdlib.h> /* free(3), malloc(3), strtol(3), size_t */ #include <stdlib.h> /* free(3), malloc(3), strtol(3), size_t */
#include <string.h> /* memset(3) */
#include <sysexits.h> /* EX_OK, EX_USAGE */ #include <sysexits.h> /* EX_OK, EX_USAGE */
#include <unistd.h> /* close(2), getopt(3), optarg, optind, STDIN_FILENO, #include <unistd.h> /* close(2), getopt(3), read(2), write(2), optarg, optind,
STDOUT_FILENO */ STDIN_FILENO, STDOUT_FILENO */
#define ARGV0 (argv[0] == NULL ? "<no argv[0]>" : argv[0]) #define ARGV0 (argv[0] == NULL ? "<no argv[0]>" : argv[0])
@ -61,10 +62,10 @@ terminate(struct Io io[2]){
static int static int
usage(char *argv0){ usage(char *argv0){
fprintf(stderr, "Usage: %s (-f) (-c [count]\n" fprintf(stderr, "Usage: %s (-af) (-c [count]\n"
"\t(-i [input file]) (-a) (-b [input block size])" "\t(-i [input file]) (-b [input block size])"
" (-s [input offset])\n" " (-s [input offset])\n"
"\t(-o [output file]) (-A) (-B [output block size])" "\t(-o [output file]) (-B [output block size])"
" (-S [output offset])\n", ARGV0); " (-S [output offset])\n", ARGV0);
return EX_USAGE; return EX_USAGE;
} }