2013-10-20 04:26:18 -04:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "picrin.h"
|
|
|
|
|
2013-10-20 05:17:12 -04:00
|
|
|
void
|
|
|
|
pic_error(pic_state *pic, const char *msg)
|
|
|
|
{
|
|
|
|
pic->errmsg = msg;
|
|
|
|
if (! pic->jmp) {
|
|
|
|
puts(msg);
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
longjmp(*pic->jmp, 1);
|
|
|
|
}
|
|
|
|
|
2013-10-20 04:26:18 -04:00
|
|
|
void
|
2013-10-20 04:41:48 -04:00
|
|
|
pic_abort(pic_state *pic, const char *msg)
|
2013-10-20 04:26:18 -04:00
|
|
|
{
|
2013-10-20 04:41:48 -04:00
|
|
|
puts(msg);
|
2013-10-20 04:26:18 -04:00
|
|
|
abort();
|
|
|
|
}
|