commit - 2bc9a13faf0abcfa43cddc8c226b2f742b764c4a
commit + bf63f986ff1a433ab6cce5287d51c191036f0a65
blob - c0be6f7f58c4b9ce99fa20a486442709d53a4f00
blob + 5cf46decbbe9a4df3492a512e6b8614c944aa506
--- src/cmd/9term/9term.c
+++ src/cmd/9term/9term.c
#include "fns.h"
#include "term.h"
+const char *termprog = "9term";
int use9wm;
int mainpid;
int mousepid;
blob - 6b91c8698380a0c1aacb8ec7c13bcf7115c62fc3
blob + 9bfefdaa08291b41cf939bebb2d620a234f2944f
--- src/cmd/9term/rcstart.c
+++ src/cmd/9term/rcstart.c
*/
notifyoff("sys: window size change");
- putenv("TERM", "9term");
+ // This used to be TERM=9term but we don't know of anything that cares.
+ // Worse, various cc have started assuming that TERM != dumb implies
+ // the ability to understand ANSI escape codes. 9term will squelch them
+ // but acme win does not.
+ putenv("TERM", "dumb");
+
+ // Set $termprog to 9term or win for those who care about what kind of
+ // dumb terminal this is.
+ putenv("termprog", (char*)termprog);
+
pid = fork();
switch(pid){
case 0:
blob - e7a1f6b24de43d657aeb4aaa69e59be6b95f50e5
blob + 6041275a5bf0441639c1220702b6a2ffa2dfb9cf
--- src/cmd/9term/term.h
+++ src/cmd/9term/term.h
extern void echoed(char*, int);
extern int echocancel(char*, int);
extern int dropcrnl(char*, int);
+extern const char *termprog;
blob - e08e032c3999b90059ed5c79d00e70daf9008af6
blob + decfece7a81f5eb6d9e69dcae1f35ebe98928ee2
--- src/cmd/9term/win.c
+++ src/cmd/9term/win.c
#include <9pclient.h>
#include "term.h"
+const char *termprog = "win";
#define EVENTSIZE 256
#define STACK 32768