bool fr_assert_cond(char const *file, int line, char const *expr, bool cond)
{
if (!cond) {
- fr_perror("SOFT ASSERT FAILED %s[%u]: %s\n", file, line, expr);
+ fr_perror("SOFT ASSERT FAILED %s[%u]: %s", file, line, expr);
return false;
}
void NEVER_RETURNS _fr_exit(char const *file, int line, int status)
{
- fr_perror("EXIT CALLED %s[%u]: %i\n", file, line, status);
+#ifndef NDEBUG
+ fr_perror("EXIT CALLED %s[%u]: %i", file, line, status);
+#endif
fflush(stderr);
fr_debug_break(); /* If running under GDB we'll break here */
void NEVER_RETURNS _fr_exit_now(char const *file, int line, int status)
{
- fr_perror("_EXIT CALLED %s[%u]: %i\n", file, line, status);
+#ifndef NDEBUG
+ fr_perror("_EXIT CALLED %s[%u]: %i", file, line, status);
+#endif
fflush(stderr);
fr_debug_break(); /* If running under GDB we'll break here */