Dhog's 9term.
Updated for current libraries by Caerwyn Jones. Button-3 plumbing (like in acme) by rsc.
This commit is contained in:
parent
b8c14089d8
commit
cfabc3ed16
5 changed files with 1537 additions and 0 deletions
22
src/cmd/9term/Linux.c
Normal file
22
src/cmd/9term/Linux.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include "9term.h"
|
||||
|
||||
void
|
||||
pdx(int pid, char *wdir, int bufn)
|
||||
{
|
||||
char path[256];
|
||||
int n;
|
||||
|
||||
snprint(path, sizeof path, "/proc/%d/cwd", pid);
|
||||
n = readlink(path, wdir, bufn);
|
||||
if(n < 0)
|
||||
n = 0;
|
||||
wdir[n] = '\0';
|
||||
}
|
||||
|
||||
int
|
||||
getpts(int fd[], char *slave)
|
||||
{
|
||||
|
||||
openpty(&fd[1], &fd[0], slave, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue