Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
 
4
void
5
ding(void*, char *s)
6
{
7
	if(strstr(s, "alarm"))
8
		noted(NCONT);
9
	else
10
		noted(NDFLT);
11
}
12
 
13
void
14
main(void)
15
{
16
	char buf[256];
17
 
18
	alarm(100);
19
	while(read(0, buf, sizeof(buf)) > 0)
20
		;
21
	alarm(0);
22
	exits(0);
23
}