Add tcs; it compiles in my world, but I haven't tried it in Russ's yet.
This commit is contained in:
parent
ba03b8910d
commit
a31db67d14
42 changed files with 10804 additions and 1 deletions
19
src/cmd/pbd.c
Normal file
19
src/cmd/pbd.c
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
void
|
||||
main(void)
|
||||
{
|
||||
char buf[512], *p;
|
||||
|
||||
p = "???";
|
||||
if(getwd(buf, sizeof buf)){
|
||||
p = strrchr(buf, '/');
|
||||
if(p == nil)
|
||||
p = buf;
|
||||
else if(p>buf || p[1]!='\0')
|
||||
p++;
|
||||
}
|
||||
write(1, p, strlen(p));
|
||||
exits(0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue