Moved code to support the to header into a define, saved for later implementation
[infodrom/newmail] / mbox.c
diff --git a/mbox.c b/mbox.c
index bb77824..3fe4eb2 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -23,6 +23,8 @@
 #include <string.h>
 #include <strings.h>
 
+/* #define FROM_DETECTION */
+
 struct mail {
   char from[128];
   char subject[128];
@@ -43,7 +45,9 @@ int inspect_mbox(char *path, char *prefix, off_t size)
 
   char from_[HDR_LEN] = "";
   char from[HDR_LEN] = "";
+#ifdef FROM_DETECTION
   char to[HDR_LEN] = "";
+#endif
   char subject[HDR_LEN] = "";
   int priority = 0;
 
@@ -72,7 +76,11 @@ int inspect_mbox(char *path, char *prefix, off_t size)
 
        /* TODO: display header */
 
+#ifdef FROM_DETECTION
        from_[0] = from[0] = to[0] = subject[0] = '\0';
+#else
+       from_[0] = from[0] = subject[0] = '\0';
+#endif
        priority = 0;
       } else {
        if (strncasecmp(buf, "From ", 5) == 0) {