void IMCC_warning(ARGMOD(imc_info_t * imcc), ARGIN(const char *fmt), ...) { ASSERT_ARGS(IMCC_warning) va_list ap; va_start(ap, fmt); imcc->error_message = Parrot_str_concat(imcc->interp, imcc->error_message, Parrot_vsprintf_c(imcc->interp, fmt, ap)); va_end(ap); }
PARROT_EXPORT PARROT_DOES_NOT_RETURN void IMCC_fataly(PARROT_INTERP, SHIM(int code), ARGIN(const char *fmt), ...) { ASSERT_ARGS(IMCC_fataly) va_list ap; va_start(ap, fmt); IMCC_INFO(interp)->error_message = Parrot_vsprintf_c(interp, fmt, ap); va_end(ap); IMCC_THROW(IMCC_INFO(interp)->jump_buf, IMCC_FATALY_EXCEPTION); }
PARROT_DOES_NOT_RETURN void IMCC_fatal_standalone(ARGMOD(imc_info_t * imcc), int code, ARGIN(const char *fmt), ...) { ASSERT_ARGS(IMCC_fatal_standalone) va_list ap; STRING * s = STRINGNULL; va_start(ap, fmt); s = Parrot_vsprintf_c(imcc->interp, fmt, ap); va_end(ap); Parrot_ex_throw_from_c_args(imcc->interp, NULL, code, "%Ss", s); }
PARROT_EXPORT int Parrot_vfprintf(PARROT_INTERP, ARGIN(Parrot_PMC pio), ARGIN(const char *s), va_list args) { ASSERT_ARGS(Parrot_vfprintf) STRING * str; INTVAL retval; PARROT_CALLIN_START(interp); str = Parrot_vsprintf_c(interp, s, args); retval = Parrot_io_putps(interp, pio, str); PARROT_CALLIN_END(interp); return retval; }
PARROT_DOES_NOT_RETURN void IMCC_fataly(ARGMOD(imc_info_t * imcc), SHIM(int code), ARGIN(const char *fmt), ...) { ASSERT_ARGS(IMCC_fataly) STRING * location; va_list ap; va_start(ap, fmt); location = IMCC_get_err_location(imcc); imcc->error_message = Parrot_str_concat(imcc->interp, imcc->error_message, Parrot_sprintf_c(imcc->interp, "error:imcc:%Ss\n\t%Ss", Parrot_vsprintf_c(imcc->interp, fmt, ap), location)); va_end(ap); Parrot_ex_throw_from_c_args(imcc->interp, NULL, IMCC_FATALY_EXCEPTION, "%Ss", imcc->error_message); }