BSD 3 development
[unix-history] / usr / src / cmd / tabs.c
index 19ed331..030ca85 100644 (file)
@@ -59,6 +59,7 @@ int argc; char **argv;
 {
        struct sgttyb tb;
        int type;
 {
        struct sgttyb tb;
        int type;
+       char *getenv();
 
        type=0;
        if (argc>=2 && strcmp(argv[1],"-n")==0) {
 
        type=0;
        if (argc>=2 && strcmp(argv[1],"-n")==0) {
@@ -66,6 +67,8 @@ int argc; char **argv;
        }
        if (argc>=2) {
                type=syslook(argv[1]);
        }
        if (argc>=2) {
                type=syslook(argv[1]);
+       } else {
+               type=syslook(getenv("TERM"));
        }
 
        switch(type) {
        }
 
        switch(type) {