Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/cmd/unix/drawterm/kern/waserror.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "u.h"
2
#include "lib.h"
3
#include "dat.h"
4
#include "fns.h"
5
#include "error.h"
6
 
7
Label*
8
pwaserror(void)
9
{
10
	if(up->nerrlab == NERR)
11
		panic("error stack overflow");
12
	return &up->errlab[up->nerrlab++];
13
}
14
 
15
void
16
nexterror(void)
17
{
18
	longjmp(up->errlab[--up->nerrlab].buf, 1);
19
}
20
 
21
void
22
error(char *e)
23
{
24
	kstrcpy(up->errstr, e, ERRMAX);
25
	setjmp(up->errlab[NERR-1].buf);
26
	nexterror();
27
}