Bug in wm under csh...
Latitudinarian Lobster
myers at uwmacc.UUCP
Mon Aug 26 08:46:27 AEST 1985
When there's a ! in your terminal's termcap entry, and you do an ESCt
while in wm under the csh, the ! is not properly escaped, and the
setenv command fails. Here's a diff --
*** misc.c.orig Sun Aug 25 17:12:49 1985
--- misc.c Sun Aug 25 17:21:45 1985
***************
*** 256,262
/*
* Send a setenv command for wmvirt terminal to shell in window w.
! * Note: this is a sad kludge. If fails if 'vi' or anything
* other than the wm-activated shell is active in the window.
* It is rumored that 4.3 BSD supports an ioctl to change
* the window size (and corresponding signals that are understood
--- 256,262 -----
/*
* Send a setenv command for wmvirt terminal to shell in window w.
! * Note: this is a sad kludge. It fails if 'vi' or anything
* other than the wm-activated shell is active in the window.
* It is rumored that 4.3 BSD supports an ioctl to change
* the window size (and corresponding signals that are understood
***************
*** 277,282
{
register int i, fd;
register char *s, *lasts;
#ifdef SNEAKYTERMCAP
if (mode < 3) {
--- 277,283 -----
{
register int i, fd;
register char *s, *lasts;
+ int iscsh;
#ifdef SNEAKYTERMCAP
if (mode < 3) {
***************
*** 322,329
* shellnames *ending* with csh as a clue that a csh is runnning.
* (This check is also made by the SUSPEND command.)
*/
! if ((i = strlen(shellname)) >= 3
! && strcmp(shellname+i-3,"csh") == 0)
s = "\nsetenv TERM wmvirt; setenv TERMCAP '";
else
s = "\nexport TERM TERMCAP; TERM=wmvirt; TERMCAP='";
--- 323,330 -----
* shellnames *ending* with csh as a clue that a csh is runnning.
* (This check is also made by the SUSPEND command.)
*/
! if ((i = strlen(shellname)) >= 3 && strcmp(shellname+i-3,"csh") == 0) {
! iscsh = 1;
s = "\nsetenv TERM wmvirt; setenv TERMCAP '";
}
else
***************
*** 325,330
if ((i = strlen(shellname)) >= 3
&& strcmp(shellname+i-3,"csh") == 0)
s = "\nsetenv TERM wmvirt; setenv TERMCAP '";
else
s = "\nexport TERM TERMCAP; TERM=wmvirt; TERMCAP='";
--- 326,332 -----
if ((i = strlen(shellname)) >= 3 && strcmp(shellname+i-3,"csh") == 0) {
iscsh = 1;
s = "\nsetenv TERM wmvirt; setenv TERMCAP '";
+ }
else
s = "\nexport TERM TERMCAP; TERM=wmvirt; TERMCAP='";
***************
*** 338,344
* A TTYHOG of 255 is much too small, but lots of systems have that. */
lasts = s;
for (i = 0; s[i]; i++) {
! if (s[i] == killchar() || s[i] == erasechar()) {
if (i)
(void) write(fd, s, i);
(void) write(fd, "\\", 1);
--- 340,346 -----
* A TTYHOG of 255 is much too small, but lots of systems have that. */
lasts = s;
for (i = 0; s[i]; i++) {
! if ((iscsh && s[i]=='!') || s[i]==killchar() || s[i]==erasechar()) {
if (i)
(void) write(fd, s, i);
(void) write(fd, "\\", 1);
More information about the Comp.sources.bugs
mailing list