tos = tos - bytes;
if (tos < ffi_obstack.object_base)
{
- outf_error ("\ninternal error: C stack exhausted\n");
- outf_error ("\tCould not pop %d bytes.\n", bytes);
- outf_flush_error ();
+ outf_error_line ("\ninternal error: C stack exhausted."
+ "\tCould not pop %d bytes.", bytes);
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
return (tos);
{
if (tos < ffi_obstack.object_base)
{
- outf_error ("\ninternal error: C stack over-popped.\n");
- outf_flush_error ();
+ outf_error_line ("\ninternal error: C stack over-popped.");
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
(&ffi_obstack)->next_free = tos;
#ifdef FE_DFL_ENV
s = fesetenv (FE_DFL_ENV);
if (s != 0)
- {
- outf_error ("Error status from fesetenv: %d\n", s);
- outf_flush_error ();
- }
+ outf_error_line ("\nError status from fesetenv: %d", s);
#else
# ifdef HAVE_FECLEAREXCEPT
# ifdef HAVE_FEDISABLEEXCEPT
# ifdef HAVE_FESETROUND
s = feclearexcept (FE_ALL_EXCEPT);
if (s == -1)
- {
- outf_error ("Error status from feclearexcept: %d\n", s);
- outf_flush_error ();
- }
+ outf_error_line ("\nError status from feclearexcept: %d", s);
s = fedisableexcept (FE_ALL_EXCEPT);
if (s == -1)
- {
- outf_error ("Error status from fedisableexcept: %d\n", s);
- outf_flush_error ();
- }
+ outf_error_line ("\nError status from fedisableexcept: %d", s);
s = fesetround (FE_TONEAREST);
if (s != 0)
- {
- outf_error ("Error status from fesetround: %d\n", s);
- outf_flush_error ();
- }
+ outf_error_line ("\nError status from fesetround: %d", s);
# endif
# endif
# endif
false, false, LEXPR_PRIMITIVE_ARITY);
if (c_call_continue == SHARP_F)
{
- outf_error ("\nNo C-CALL-CONTINUE primitive!\n");
- outf_flush_error ();
+ outf_error_line ("\nNo C-CALL-CONTINUE primitive!");
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
}
CSTACK_LPOP (int, depth, tos);
if (found != expected || depth != cstack_depth)
{
- outf_error ("\ninternal error: slipped in 1st part of callout\n");
- outf_flush_error ();
+ outf_error_line ("\ninternal error: slipped in 1st part of callout");
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
cstack_pop (tos);
CSTACK_LPOP (int, depth, tos);
if (depth != cstack_depth)
{
- outf_error ("\ninternal error: slipped in 2nd part of callout\n");
- outf_flush_error ();
+ outf_error_line ("\ninternal error: slipped in 2nd part of callout");
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
val = tramp ();
CSTACK_LPOP (int, depth, tos);
if (depth != cstack_depth || found != expected)
{
- outf_error ("\ninternal error: slipped in 1st part of callout\n");
- outf_flush_error ();
+ outf_error_line ("\ninternal error: slipped in 1st part of callout");
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
return (tos);
return_to_c = find_primitive_cname ("RETURN-TO-C", false, false, 0);
if (run_callback == SHARP_F || return_to_c == SHARP_F)
{
- outf_error
- ("\nWarning: punted callback #%ld. Missing primitives!\n",
+ outf_error_line
+ ("\nWarning: punted callback #%ld. Missing primitives!",
callback_id);
- outf_flush_error ();
SET_VAL (FIXNUM_ZERO);
return;
}
/* Need to push 2 each of prim+header+continuation. */
if (! CAN_PUSH_P (2 * (1 + 1 + CONTINUATION_SIZE)))
{
- outf_error
- ("\nWarning: punted callback #%ld. No room on stack!\n", callback_id);
- outf_flush_error ();
+ outf_error_line
+ ("\nWarning: punted callback #%ld. No room on stack!", callback_id);
SET_VAL (FIXNUM_ZERO);
return;
}
CSTACK_LPOP (int, depth, tos);
if (depth != cstack_depth)
{
- outf_error ("\nWarning: C data stack slipped in run-callback!\n");
- outf_flush_error ();
+ outf_error_line ("\nWarning: C data stack slipped in run-callback!");
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
CSTACK_LPOP (int, depth, tos);
if (depth != cstack_depth || found != expected)
{
- outf_error ("\ninternal error: slipped in callback kernel\n");
- outf_flush_error ();
+ outf_error_line ("\ninternal error: slipped in callback kernel");
signal_error_from_primitive (ERR_EXTERNAL_RETURN);
}
return (tos);
handler = (VECTOR_REF (fixed_objects, CALLBACK_HANDLER));
if (! interpreter_applicable_p (handler))
{
- outf_error ("\nWarning: bogus callback handler: 0x%x.\n",
- ((unsigned int) handler));
- outf_flush_error ();
+ outf_error_line ("\nWarning: bogus callback handler: 0x%x.",
+ ((unsigned int) handler));
Do_Micro_Error (ERR_INAPPLICABLE_OBJECT, true);
abort_to_interpreter (PRIM_APPLY);
/* NOTREACHED */
if (! (INTEGER_P (value)))
{
/* error_wrong_type_arg (1); Not inside the interpreter here. */
- outf_error ("\nWarning: Callback did not return an integer!\n");
- outf_flush_error ();
+ outf_error_line ("\nWarning: Callback did not return an integer!");
return (0);
}
if (! (integer_to_long_p (value)))
{
/* error_bad_range_arg (1); */
- outf_error
- ("\nWarning: Callback returned an integer larger than a C long!\n");
- outf_flush_error ();
+ outf_error_line
+ ("\nWarning: Callback returned an integer larger than a C long!");
return (0);
}
return (integer_to_long (value));
if (! (INTEGER_P (value)))
{
/* error_wrong_type_arg (1); Not inside the interpreter here. */
- outf_error ("\nWarning: Callback did not return an integer!\n");
- outf_flush_error ();
+ outf_error_line ("\nWarning: Callback did not return an integer!");
return (0);
}
if (! (integer_to_ulong_p (value)))
{
/* error_bad_range_arg (1); */
- outf_error
+ outf_error_line
("\nWarning: "
- "Callback returned an integer larger than a C unsigned long!\n");
- outf_flush_error ();
+ "Callback returned an integer larger than a C unsigned long!");
return (0);
}
return (integer_to_ulong (value));
if (! REAL_P (value))
{
/* error_wrong_type_arg (1); Not inside the interpreter here. */
- outf_error ("\nWarning: Callback did not return a real.\n");
- outf_flush_error ();
+ outf_error_line ("\nWarning: Callback did not return a real.");
return (0.0);
}
if (! (real_number_to_double_p (value)))
{
/* error_bad_range_arg (1); */
- outf_error
- ("\nWarning: Callback returned a real larger than a C double!\n");
- outf_flush_error ();
+ outf_error_line
+ ("\nWarning: Callback returned a real larger than a C double!");
return (0.0);
}
return (real_number_to_double (value));
unsigned char * result = lookup_external_string (value, NULL);
if (result == 0)
{
- outf_error ("\nWarning: Callback returned a bogus xstring.\n");
- outf_flush_error ();
+ outf_error_line ("\nWarning: Callback returned a bogus xstring.");
return (NULL);
}
return ((void *) result);
if (is_alien (value))
return (alien_address (value));
- outf_error ("\nWarning: Callback did not return a pointer.\n");
- outf_flush_error ();
+ outf_error_line ("\nWarning: Callback did not return a pointer.");
return (NULL);
}
\f