print ANSI escapes to stderr

unconditionally print ANSI some escapes (to colorize errors)
to the stderr stream.
This commit is contained in:
Michael Davidsaver
2023-10-27 11:25:44 -07:00
committed by Dirk Zimoch
parent 77a37781af
commit 0502fe25e4
10 changed files with 20 additions and 15 deletions

View File

@@ -643,7 +643,7 @@ struct ReadlineContext {
if(!hist_file.empty()) {
if(int err = read_history(hist_file.c_str())) {
if(err!=ENOENT)
fprintf(stderr, "Error %s (%d) loading '%s'\n",
fprintf(stderr, ERL_ERROR " %s (%d) loading '%s'\n",
strerror(err), err, hist_file.c_str());
}
stifle_history(1024); // some limit...
@@ -658,7 +658,7 @@ struct ReadlineContext {
#ifdef USE_READLINE
if(!hist_file.empty()) {
if(int err = write_history(hist_file.c_str())) {
fprintf(stderr, "Error %s (%d) writing '%s'\n",
fprintf(stderr, ERL_ERROR " %s (%d) writing '%s'\n",
strerror(err), err, hist_file.c_str());
}
}