1 diff -udpr -X diff-excludes mutt-0.95.4-orig/curs_main.c mutt-0.95.4/curs_main.c
2 --- mutt-0.95.4-orig/curs_main.c Thu Mar 4 08:16:48 1999
3 +++ mutt-0.95.4/curs_main.c Sun Mar 14 09:21:51 1999
4 @@ -483,7 +483,8 @@ int mutt_index_menu (void)
5 menu_redraw_current (menu);
8 - if (menu->redraw & REDRAW_STATUS)
9 + if ((menu->redraw & REDRAW_STATUS) ||
10 + update_status_time ())
12 menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
13 CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2);
14 diff -Nru mutt-1.1.11/doc/manual.sgml mutt-1.1.11.status_update/doc/manual.sgml
15 --- mutt-1.1.11/doc/manual.sgml Sun Apr 2 23:17:35 2000
16 +++ mutt-1.1.11.status_update/doc/manual.sgml Sun Apr 2 23:17:27 2000
18 %u number of unread messages *
19 %v Mutt version string
20 %V currently active limit pattern, if any *
21 +%[fmt] the current date and time. `fmt'' is expanded by the system
22 + call ``strftime''; a leading bang disables locales
23 %>X right justify the rest of the string and
25 %|X pad to the end of the line with "X"
26 @@ -5441,6 +5443,17 @@
27 Setting this variable causes the ``status bar'' to be displayed on
28 the first line of the screen rather than near the bottom.
30 +<sect2>status_update<label id="status_update">
32 +Type: number<newline>
35 +This variable controls, if positive, the maximum interval in seconds
36 +before the time in the status line is updated. It is checked at
37 +every key press, and after a keyboard <ref id="timeout"
38 +name="timeout">. If the value is zero, the status line will updated
39 +at every check. If it is negative, the status time will only be updated
40 +if it necessary to update to the status line for some other reason.
42 <sect2>strict_threads<label id="strict_threads">
44 diff -Nru mutt-1.1.11/init.h mutt-1.1.11.status_update/init.h
45 --- mutt-1.1.11/init.h Sun Apr 2 23:17:35 2000
46 +++ mutt-1.1.11.status_update/init.h Sun Apr 2 23:17:25 2000
48 ** Setting this variable causes the ``$status bar'' to be displayed on
49 ** the first line of the screen rather than near the bottom.
51 + { "status_update", DT_NUM, R_NONE, UL &StatusUpdate, -1 },
52 { "strict_threads", DT_BOOL, R_RESORT|R_INDEX, OPTSTRICTTHREADS, 0 },
55 diff -udpr -X diff-excludes mutt-0.95.4-orig/globals.h mutt-0.95.4/globals.h
56 --- mutt-0.95.4-orig/globals.h Thu Jan 7 10:14:40 1999
57 +++ mutt-0.95.4/globals.h Sun Mar 14 09:21:51 1999
58 @@ -107,6 +107,7 @@ WHERE short PagerIndexLines;
61 WHERE short SendmailWait;
62 +WHERE short StatusUpdate;
66 diff -udpr -X diff-excludes mutt-0.95.4-orig/menu.c mutt-0.95.4/menu.c
67 --- mutt-0.95.4-orig/menu.c Thu Jan 7 10:14:42 1999
68 +++ mutt-0.95.4/menu.c Sun Mar 14 09:21:51 1999
69 @@ -840,3 +840,23 @@ int mutt_menuLoop (MUTTMENU *menu)
74 +int update_status_time ()
79 + if (StatusUpdate < 0)
81 + else if (StatusUpdate == 0)
85 + if (now - Last >= StatusUpdate)
93 diff -udpr -X diff-excludes mutt-0.95.4-orig/mutt_menu.h mutt-0.95.4/mutt_menu.h
94 --- mutt-0.95.4-orig/mutt_menu.h Thu Jan 7 10:14:43 1999
95 +++ mutt-0.95.4/mutt_menu.h Sun Mar 14 09:21:51 1999
96 @@ -98,3 +98,5 @@ int mutt_menuLoop (MUTTMENU *);
97 /* used in both the index and pager index to make an entry. */
98 void index_make_entry (char *, size_t, struct menu_t *, int);
99 int index_color (int);
101 +int update_status_time (void);
102 diff -udpr -X diff-excludes mutt-0.95.4-orig/pager.c mutt-0.95.4/pager.c
103 --- mutt-0.95.4-orig/pager.c Thu Jan 7 10:14:44 1999
104 +++ mutt-0.95.4/pager.c Sun Mar 14 09:21:51 1999
105 @@ -1636,7 +1636,7 @@ mutt_pager (const char *banner, const ch
106 SETCOLOR (MT_COLOR_NORMAL);
109 - if ((redraw & REDRAW_INDEX) && index)
110 + if (index && ((redraw & REDRAW_INDEX) || update_status_time ()))
112 /* redraw the pager_index indicator, because the
113 * flags for this message might have changed. */
114 diff -udpr -X diff-excludes mutt-0.95.4-orig/status.c mutt-0.95.4/status.c
115 --- mutt-0.95.4-orig/status.c Thu Jan 7 10:14:47 1999
116 +++ mutt-0.95.4/status.c Sun Mar 14 09:21:59 1999
123 static char *get_sort_str (char *buf, size_t buflen, int method)
125 @@ -269,6 +270,61 @@ status_format_str (char *buf, size_t buf
133 + int len = sizeof (fmt) - 1;
144 + while (len > 0 && *src != ']')
156 + break; /* not enough space */
168 + if (do_locales && Locale)
169 + setlocale (LC_TIME, Locale);
172 + time_t now = time (NULL);
174 + strftime (tmp, sizeof (tmp), fmt, localtime (&now));
177 + if (do_locales && Locale)
178 + setlocale (LC_TIME, "C");
180 + snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
181 + snprintf (buf, buflen, fmt, tmp);
186 snprintf (buf, buflen, "%%%s%c", prefix, op);
187 --- mutt-0.94.7i/patchlist.c.orig Sat Sep 19 02:29:51 1998
188 +++ mutt-0.94.7i/patchlist.c Sat Sep 19 02:54:16 1998
193 + printf("Feature patch: status-time 0.95.4 by Byrial Jensen\n");
197 /* DO NOT MODIFY AFTER THIS LINE */