Sync some error messages from xz to xzdec.
Make xz error message translation usable outside xz (at least in upcoming lzmainfo).
This commit is contained in:
parent
df636eb4e0
commit
a4165d0584
|
@ -54,8 +54,8 @@ my_exit(enum exit_status_type status)
|
||||||
// If it was fclose() that failed, we have the reason
|
// If it was fclose() that failed, we have the reason
|
||||||
// in errno. If only ferror() indicated an error,
|
// in errno. If only ferror() indicated an error,
|
||||||
// we have no idea what the reason was.
|
// we have no idea what the reason was.
|
||||||
message(V_ERROR, _("Writing to standard output "
|
message(V_ERROR, "%s: %s", _("Writing to standard "
|
||||||
"failed: %s"),
|
"output failed"),
|
||||||
fclose_err ? strerror(errno)
|
fclose_err ? strerror(errno)
|
||||||
: _("Unknown error"));
|
: _("Unknown error"));
|
||||||
status = E_ERROR;
|
status = E_ERROR;
|
||||||
|
|
|
@ -76,7 +76,7 @@ my_exit(void)
|
||||||
// If it was fclose() that failed, we have the reason
|
// If it was fclose() that failed, we have the reason
|
||||||
// in errno. If only ferror() indicated an error,
|
// in errno. If only ferror() indicated an error,
|
||||||
// we have no idea what the reason was.
|
// we have no idea what the reason was.
|
||||||
my_errorf("Cannot write to standard output: %s", fclose_err
|
my_errorf("Writing to standard output failed: %s", fclose_err
|
||||||
? strerror(errno) : "Unknown error");
|
? strerror(errno) : "Unknown error");
|
||||||
status = EXIT_FAILURE;
|
status = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ uncompress(lzma_stream *strm, FILE *file, const char *filename)
|
||||||
// FIXME: Maybe also LZMA_MEMLIMIT_ERROR in future?
|
// FIXME: Maybe also LZMA_MEMLIMIT_ERROR in future?
|
||||||
if (ret != LZMA_OK) {
|
if (ret != LZMA_OK) {
|
||||||
my_errorf("%s", ret == LZMA_MEM_ERROR ? strerror(ENOMEM)
|
my_errorf("%s", ret == LZMA_MEM_ERROR ? strerror(ENOMEM)
|
||||||
: "Internal program error (bug)");
|
: "Internal error (bug)");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ uncompress(lzma_stream *strm, FILE *file, const char *filename)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
msg = "Internal program error (bug)";
|
msg = "Internal error (bug)";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue