have Error::set_show_error() return the previous setting

This commit is contained in:
Axel Kohlmeyer
2025-03-24 04:13:24 -04:00
parent 3a18ca5197
commit 15cdba0bf0
6 changed files with 22 additions and 6 deletions

View File

@ -315,9 +315,12 @@ void Error::set_last_error(const char *msg, ErrorType type)
/* ----------------------------------------------------------------------
enable or disable printing error messages. for use with library interface.
if flag = 0 only last error message and type are updated.
returns the previous setting.
------------------------------------------------------------------------- */
void Error::set_show_error(const int flag)
int Error::set_show_error(const int flag)
{
int oldflag = show_error
showerror = flag;
return oldflag;
}