diff options
author | rsc <devnull@localhost> | 2003-11-25 01:40:27 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-11-25 01:40:27 +0000 |
commit | f7012583e9a7594cbb5ebe8e974bb69061189262 (patch) | |
tree | 8eb3244abdd1eed893cad51ce12fccb0a9f7a1f7 /src/cmd/sam | |
parent | dc13c29ed174fd15e0b025ca4fea8af71015067d (diff) | |
download | plan9port-f7012583e9a7594cbb5ebe8e974bb69061189262.tar.gz plan9port-f7012583e9a7594cbb5ebe8e974bb69061189262.tar.bz2 plan9port-f7012583e9a7594cbb5ebe8e974bb69061189262.zip |
Add the #goo to allow use in C++.
Silence a few more warnings.
Strip down the mkfiles more.
Fix bug in X11 mouse handling, note groups.
Diffstat (limited to 'src/cmd/sam')
-rw-r--r-- | src/cmd/sam/sam.c | 6 | ||||
-rw-r--r-- | src/cmd/sam/sam.h | 1 | ||||
-rw-r--r-- | src/cmd/sam/unix.c | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/cmd/sam/sam.c b/src/cmd/sam/sam.c index 4f774a9e..078d9439 100644 --- a/src/cmd/sam/sam.c +++ b/src/cmd/sam/sam.c @@ -141,6 +141,7 @@ rescue(void) File *f; char *c; char buf[256]; + char *root; if(rescuing++) return; @@ -162,7 +163,10 @@ rescue(void) free(c); }else sprint(buf, "nameless.%d", nblank++); - fprint(io, "#!%s '%s' $* <<'---%s'\n", SAMSAVECMD, buf, buf); + root = getenv("PLAN9"); + if(root == nil) + root = "/usr/local/plan9"; + fprint(io, "#!/bin/sh\n%s/bin/samsave '%s' $* <<'---%s'\n", root, buf, buf); addr.r.p1 = 0, addr.r.p2 = f->b.nc; writeio(f); fprint(io, "\n---%s\n", (char *)buf); diff --git a/src/cmd/sam/sam.h b/src/cmd/sam/sam.h index 7e824da1..1e92c73e 100644 --- a/src/cmd/sam/sam.h +++ b/src/cmd/sam/sam.h @@ -345,7 +345,6 @@ extern char SH[]; extern char SHPATH[]; extern char RX[]; extern char RXPATH[]; -extern char SAMSAVECMD[]; /* * acme globals diff --git a/src/cmd/sam/unix.c b/src/cmd/sam/unix.c index 024d3081..45cfc3bc 100644 --- a/src/cmd/sam/unix.c +++ b/src/cmd/sam/unix.c @@ -38,9 +38,6 @@ Rune *right[]= { r1, r2, r3, 0}; #ifndef RXPATHNAME #define RXPATHNAME "ssh" #endif -#ifndef SAMSAVECMDNAME -#define SAMSAVECMDNAME "/bin/sh\n/usr/local/plan9/bin/samsave" -#endif char RSAM[] = "sam"; char SAMTERM[] = SAMTERMNAME; @@ -50,7 +47,6 @@ char SH[] = SHNAME; char SHPATH[] = SHPATHNAME; char RX[] = RXNAME; char RXPATH[] = RXPATHNAME; -char SAMSAVECMD[] = SAMSAVECMDNAME; void |