use sigmask() macro instead of defining twice.
[unix-history] / usr / src / usr.bin / mail / head.c
index 78353f3..271f991 100644 (file)
@@ -1,4 +1,6 @@
-#
+#ifndef lint
+static char sccsid[] = "@(#)head.c     2.4 (Berkeley) %G%";
+#endif
 
 #include "rcv.h"
 
 
 #include "rcv.h"
 
@@ -8,8 +10,6 @@
  * Routines for processing and detecting headlines.
  */
 
  * Routines for processing and detecting headlines.
  */
 
-static char *SccsId = "@(#)head.c      2.2 %G%";
-
 /*
  * See if the passed line buffer is a mail header.
  * Return true if yes.  Note the extreme pains to
 /*
  * See if the passed line buffer is a mail header.
  * Return true if yes.  Note the extreme pains to
@@ -222,7 +222,14 @@ nextword(wp, wbuf)
        }
        cp2 = wbuf;
        while (!any(*cp, " \t") && *cp != '\0')
        }
        cp2 = wbuf;
        while (!any(*cp, " \t") && *cp != '\0')
-               *cp2++ = *cp++;
+               if (*cp == '"') {
+                       *cp2++ = *cp++;
+                       while (*cp != '\0' && *cp != '"')
+                               *cp2++ = *cp++;
+                       if (*cp == '"')
+                               *cp2++ = *cp++;
+               } else
+                       *cp2++ = *cp++;
        *cp2 = '\0';
        while (any(*cp, " \t"))
                cp++;
        *cp2 = '\0';
        while (any(*cp, " \t"))
                cp++;