version 1.5, 1998/04/25 04:30:39 |
version 1.6, 1998/10/16 18:51:21 |
|
|
|
|
if (Sflag) { |
if (Sflag) { |
(void)printf("%s ", ttype); |
(void)printf("%s ", ttype); |
wrtermcap(tcapbuf); |
if (tcapbuf) |
|
wrtermcap(tcapbuf); |
} |
} |
|
|
if (sflag) { |
if (sflag) { |
|
|
*/ |
*/ |
if ((p = getenv("SHELL")) && |
if ((p = getenv("SHELL")) && |
!strcmp(p + strlen(p) - 3, "csh")) { |
!strcmp(p + strlen(p) - 3, "csh")) { |
p = "set noglob histchars="";\nsetenv TERM %s;\nsetenv TERMCAP '"; |
if (tcapbuf) |
t = "';\nunset noglob histchars;\n"; |
p = "set noglob histchars="";\nsetenv TERM %s;\nsetenv TERMCAP "; |
|
else |
|
p = "set noglob histchars="";\nsetenv TERM %s;\n"; |
|
t = "unset noglob histchars;\n"; |
} else { |
} else { |
p = "TERM=%s;\nTERMCAP='"; |
if (tcapbuf) { |
t = "';\nexport TERMCAP TERM;\n"; |
p = "TERM=%s;\nTERMCAP="; |
|
t = "export TERMCAP TERM;\n"; |
|
} else { |
|
p = "TERM=%s;\n"; |
|
t = "export TERMCAP;\n"; |
|
} |
} |
} |
(void)printf(p, ttype); |
(void)printf(p, ttype); |
wrtermcap(tcapbuf); |
if (tcapbuf) { |
|
putchar('\''); |
|
wrtermcap(tcapbuf); |
|
fputs("';\n", stdout); |
|
} |
(void)printf(t); |
(void)printf(t); |
} |
} |
|
|