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_fixcpp/sys/src/cmd/pbd.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 <libc.h>
3
 
4
void
5
main(void)
6
{
7
	char buf[512], *p;
8
 
9
	p = "???";
10
	if(getwd(buf, sizeof buf)){
11
		p = strrchr(buf, '/');
12
		if(p == nil)
13
			p = buf;
14
		else if(p>buf || p[1]!='\0')
15
			p++;
16
	}
17
	write(1, p, strlen(p));
18
	exits(0);
19
}