check raw mode to see if cr-nl is needed (from serge@arpa)
authorJim Bloom <bloom@ucbvax.Berkeley.EDU>
Thu, 5 Sep 1985 02:41:45 +0000 (18:41 -0800)
committerJim Bloom <bloom@ucbvax.Berkeley.EDU>
Thu, 5 Sep 1985 02:41:45 +0000 (18:41 -0800)
SCCS-vsn: libexec/comsat/comsat.c 5.3

usr/src/libexec/comsat/comsat.c

index 92cbf18..dcecce4 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)comsat.c   5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)comsat.c   5.3 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/types.h>
 #endif not lint
 
 #include <sys/types.h>
@@ -184,7 +184,7 @@ notify(utp, offset)
                exit(-1);
        }
        ioctl(fileno(tp), TIOCGETP, &gttybuf);
                exit(-1);
        }
        ioctl(fileno(tp), TIOCGETP, &gttybuf);
-       cr = (gttybuf.sg_flags & CRMOD) ? "" : "\r";
+       cr = (gttybuf.sg_flags&CRMOD) && !(gttybuf.sg_flags&RAW) ? "" : "\r";
        strncpy(name, utp->ut_name, sizeof (utp->ut_name));
        name[sizeof (name) - 1] = '\0';
        fprintf(tp,"%s\n\007New mail for %s@%s\007 has arrived:%s\n",
        strncpy(name, utp->ut_name, sizeof (utp->ut_name));
        name[sizeof (name) - 1] = '\0';
        fprintf(tp,"%s\n\007New mail for %s@%s\007 has arrived:%s\n",