Tweaks to make it work on Unix.
diff --git a/src/cmd/samterm/mesg.c b/src/cmd/samterm/mesg.c
index 0971ee2..c332d7a 100644
--- a/src/cmd/samterm/mesg.c
+++ b/src/cmd/samterm/mesg.c
@@ -16,6 +16,7 @@
uchar outdata[DATASIZE];
short outcount;
int hversion;
+int hostfd[2];
void inmesg(Hmesg, int);
int inshort(int);
@@ -510,7 +511,7 @@
panic("outcount>sizeof outdata");
outdata[1]=outcount;
outdata[2]=outcount>>8;
- if(write(1, (char *)outdata, outcount+HSIZE)!=outcount+HSIZE)
+ if(write(hostfd[1], (char *)outdata, outcount+HSIZE)!=outcount+HSIZE)
panic("write error");
}
@@ -651,7 +652,7 @@
s1[n] = 0;
snarflen = n;
outTs(Tsetsnarf, n);
- if(n>0 && write(1, s1, n)!=n)
+ if(n>0 && write(hostfd[1], s1, n)!=n)
panic("snarf write error");
free(s1);
}else