Compare commits

..

No commits in common. "c554b96722634d09cf8441fdac065efa4e1971c6" and "5545846c92f310bbb74e70c184f2b467e9fea701" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@
char *program_name = "npc";
static int
ioerr(char *argv0) {
ioerr(char *argv0, int err) {
perror(argv0);
return EX_IOERR;
@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
break;
case '\n':
if (showend && fputc('$', stdout) == EOF) {
return ioerr(argv[0]);
return ioerr(argv[0]); }
}
default:
if (c >= ' ' || c == '\n' || (!showtab && c == '\t')) {

View File

@ -75,20 +75,20 @@ fn main() -> ExitCode {
if let Err(e) = output.write(&right)
.and_then(|_| output.write(&left)) {
err(&argv[0], e);
break ExitCode::from(EX_IOERR as u8) // write error
break EX_IOERR // write error
}
},
Ok(v) => { // partial read; partially write
if let Err(e) = output.write(&buf[..v]) {
err(&argv[0], e);
break ExitCode::from(EX_IOERR as u8) // write error
break EX_IOERR // write error
}
},
Err(e) if e.kind() == ErrorKind::Interrupted && force => continue,
Err(e) => {
err(&argv[0], e);
break ExitCode::from(EX_IOERR as u8) // read error (or signal)
break EX_IOERR // read error (or signal)
}
}
}