Adjusted post-output:
authorJoey Schulze <joey@infodrom.org>
Mon, 22 Nov 2004 15:53:02 +0000 (15:53 +0000)
committerJoey Schulze <joey@infodrom.org>
Mon, 22 Nov 2004 15:53:02 +0000 (15:53 +0000)
 - No bell when running in window
 - Additional newline after set of mail, but only if not running in window
 - always flush stdout

folder.c
mbox.c

index 2e0f4c8..11b41dd 100644 (file)
--- a/folder.c
+++ b/folder.c
@@ -163,8 +163,12 @@ void watch_folders(int opt_flags)
   for (i=0; i < numfolders; i++)
     newmail |= watch_mbox(folders[i]->path, folders[i]->prefix, &folders[i]->size, opt_flags);
 
-  if (newmail && (opt_flags & OPT_BELL)) {
-    putchar('\007');
+  if (newmail) {
+    if (!(opt_flags & OPT_WINDOW)) {
+      if (opt_flags & OPT_BELL)
+       putchar('\007');
+      putchar('\n');
+    }
     fflush(stdout);
   }
 }
diff --git a/mbox.c b/mbox.c
index bb9848b..71944ad 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -103,7 +103,9 @@ int inspect_mbox(char *path, char *prefix, off_t size, int opt_flags)
 #endif
        else if (strncasecmp(buf, "Subject: ", 9) == 0)
          stringcopy(subject, buf+9, sizeof(subject));
-       else if (strncasecmp(buf, "Priority: ", 10) == 0)
+       else if (strncasecmp(buf, "Priority: urgent", 16) == 0 && buf[16] == '\0')
+         priority = 1;
+       else if (strncasecmp(buf, "X-Priority: 1", 13) == 0 && buf[13] == '\0')
          priority = 1;
       }
     } else if (strncasecmp(buf, "From ", 5) == 0) {