dj(1), dj.1: Remove -A (use -a "\0") (see #101)
This commit is contained in:
parent
e65f6b650d
commit
fb74e7bef0
10
docs/dj.1
10
docs/dj.1
@ -11,7 +11,7 @@ dj \(en disk jockey
|
|||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
||||||
dj
|
dj
|
||||||
.RB ( -AHn )
|
.RB ( -Hn )
|
||||||
.RB ( -a
|
.RB ( -a
|
||||||
.RB [ byte ])
|
.RB [ byte ])
|
||||||
.RB ( -c
|
.RB ( -c
|
||||||
@ -67,12 +67,8 @@ Seeks a number of bytes through the output before starting to write from
|
|||||||
the input. If the output is a stream, null characters are printed.
|
the input. If the output is a stream, null characters are printed.
|
||||||
.IP \fB-a\fP
|
.IP \fB-a\fP
|
||||||
Accepts a single literal byte with which the input buffer is padded in the event
|
Accepts a single literal byte with which the input buffer is padded in the event
|
||||||
of an incomplete read from the input file.
|
of an incomplete read from the input file. If the option argument is empty, the
|
||||||
.IP \fB-A\fP
|
null byte is used.
|
||||||
Specifying this option pads the input buffer with null bytes in the event of an
|
|
||||||
incomplete read. This is equivalent to specifying
|
|
||||||
.B -a
|
|
||||||
with a null byte instead of a character.
|
|
||||||
.IP \fB-c\fP
|
.IP \fB-c\fP
|
||||||
Specifies a number of reads to make. The default is 0, in which case the
|
Specifies a number of reads to make. The default is 0, in which case the
|
||||||
input is read until a partial or empty read is made.
|
input is read until a partial or empty read is made.
|
||||||
|
7
src/dj.c
7
src/dj.c
@ -265,7 +265,7 @@ parse(char *s){
|
|||||||
static int
|
static int
|
||||||
usage(void){
|
usage(void){
|
||||||
|
|
||||||
fprintf(stderr, "Usage: %s (-AHn) (-a [byte]) (-c [count])\n"
|
fprintf(stderr, "Usage: %s (-Hn) (-a [byte]) (-c [count])\n"
|
||||||
"\t(-i [input file]) (-b [input block size]) (-s [input offset])\n"
|
"\t(-i [input file]) (-b [input block size]) (-s [input offset])\n"
|
||||||
"\t(-o [output file]) (-B [output block size]) (-S [output offset])\n",
|
"\t(-o [output file]) (-B [output block size]) (-S [output offset])\n",
|
||||||
program_name);
|
program_name);
|
||||||
@ -294,7 +294,7 @@ int main(int argc, char *argv[]){
|
|||||||
|
|
||||||
if(argc > 0){
|
if(argc > 0){
|
||||||
program_name = argv[0];
|
program_name = argv[0];
|
||||||
while((c = getopt(argc, argv, "a:Ab:B:c:i:hHns:S:o:")) != -1)
|
while((c = getopt(argc, argv, "a:b:B:c:i:hHns:S:o:")) != -1)
|
||||||
switch(c){
|
switch(c){
|
||||||
case 'i': case 'o':
|
case 'i': case 'o':
|
||||||
i = (c == 'o');
|
i = (c == 'o');
|
||||||
@ -306,11 +306,10 @@ int main(int argc, char *argv[]){
|
|||||||
break;
|
break;
|
||||||
terminate(io);
|
terminate(io);
|
||||||
return oserr(optarg);
|
return oserr(optarg);
|
||||||
case 'A': align = '\0'; break;
|
|
||||||
case 'n': noerror = 1; break;
|
case 'n': noerror = 1; break;
|
||||||
case 'H': fmt_output = fmt_human; break;
|
case 'H': fmt_output = fmt_human; break;
|
||||||
case 'a':
|
case 'a':
|
||||||
if(optarg[0] != '\0' && optarg[1] == '\0'){
|
if(optarg[0] == '\0' || optarg[1] == '\0'){
|
||||||
align = optarg[0];
|
align = optarg[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user