+ else {
+ if (showterm)
+ (void)fprintf(stderr, "Terminal type is %s.\n", ttype);
+ /*
+ * If erase, kill and interrupt characters could have been
+ * modified and not -Q, display the changes.
+ */
+ if (!quiet) {
+ report("Erase", VERASE, CERASE);
+ report("Kill", VKILL, CKILL);
+ report("Interrupt", VINTR, CINTR);
+ }
+ }
+
+ if (Sflag) {
+ (void)printf("%s ", ttype);
+ wrtermcap(tcapbuf);
+ }
+
+ if (sflag) {
+ /*
+ * Figure out what shell we're using. A hack, we look for an
+ * environmental variable SHELL ending in "csh".
+ */
+ if ((p = getenv("SHELL")) &&
+ !strcmp(p + strlen(p) - 3, "csh")) {
+ p = "set noglob;\nsetenv TERM %s;\nsetenv TERMCAP '";
+ t = "';\nunset noglob;\n";
+ } else {
+ p = "TERM=%s;\nTERMCAP='";
+ t = "';\nexport TERMCAP TERM;\n";
+ }
+ (void)printf(p, ttype);
+ wrtermcap(tcapbuf);
+ (void)printf(t);