dj(1): revert some formatting changes
This commit is contained in:
parent
c2e6744e2b
commit
a3ceb845e3
12
src/dj.c
12
src/dj.c
@ -142,7 +142,7 @@ parse(char *s) {
|
||||
|
||||
errno = 0;
|
||||
r = strtol(s, &s, 0);
|
||||
return (*s == '\0' && errno == 0) ? r : -1; /* no chars left unparsed */
|
||||
return (*s == '\0' /* no chars left unparsed */ && errno == 0) ? r : -1;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -182,8 +182,7 @@ int main(int argc, char *argv[]) {
|
||||
io[i].seek = 0;
|
||||
}
|
||||
|
||||
if (!(argc < 0)) { usage(program_name); }
|
||||
|
||||
if (argc > 0) {
|
||||
int c;
|
||||
|
||||
program_name = argv[0];
|
||||
@ -225,7 +224,7 @@ int main(int argc, char *argv[]) {
|
||||
if (c == 'c' && (count = parse(optarg)) >= 0) { break; }
|
||||
|
||||
i = (c >= 'A' && c <= 'Z');
|
||||
c |= 0x20 /* ASCII make lowercase 0b 0010 0000 */
|
||||
c |= 0x20; /* 0b 0010 0000 (ASCII make lowercase) */
|
||||
|
||||
if (
|
||||
(c == 'b' && (io[i].bs = parse(optarg)) > 0)
|
||||
@ -237,6 +236,7 @@ int main(int argc, char *argv[]) {
|
||||
return usage(program_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert(io->fd != STDIN_FILENO || io->fl == read_flags);
|
||||
assert(io->fd != STDOUT_FILENO || io->fl == write_flags);
|
||||
@ -272,7 +272,9 @@ int main(int argc, char *argv[]) {
|
||||
if (Io_write(&io[1])->bufuse == t && !noerror && io[1].error == 0) {
|
||||
Io_write(&io[1]); /* second chance */
|
||||
}
|
||||
if (io[1].error != 0) { return oserr(io[1].fn, io[1].error); }
|
||||
if (io[1].error != 0) {
|
||||
return oserr(io[1].fn, io[1].error);
|
||||
}
|
||||
} while ((io[1].seek -= (t - io[1].bufuse)) > 0 && io[1].bufuse != t);
|
||||
|
||||
io[1].bufuse = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user