Print timestamps correctly with /SB REDRAW

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@926 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-12-02 22:08:07 +00:00 committed by cras
commit fab312dde3
4 changed files with 14 additions and 20 deletions

View file

@ -390,17 +390,14 @@ char *format_get_level_tag(THEME_REC *theme, TEXT_DEST_REC *dest)
((level & (MSGLEVEL_NEVER|MSGLEVEL_LASTLOG)) == 0 && \
(timestamps || (msgs_timestamps && ((level) & MSGLEVEL_MSGS))))
static char *get_timestamp(THEME_REC *theme, TEXT_DEST_REC *dest)
static char *get_timestamp(THEME_REC *theme, TEXT_DEST_REC *dest, time_t t)
{
struct tm *tm;
time_t t;
int diff;
if (!show_timestamp(dest->level))
return NULL;
t = time(NULL);
if (timestamp_timeout > 0) {
diff = t - dest->window->last_timestamp;
dest->window->last_timestamp = t;
@ -442,12 +439,12 @@ static char *get_server_tag(THEME_REC *theme, TEXT_DEST_REC *dest)
IRCTXT_SERVERTAG, server->tag);
}
char *format_get_line_start(THEME_REC *theme, TEXT_DEST_REC *dest)
char *format_get_line_start(THEME_REC *theme, TEXT_DEST_REC *dest, time_t t)
{
char *timestamp, *servertag;
char *linestart;
timestamp = get_timestamp(theme, dest);
timestamp = get_timestamp(theme, dest, t);
servertag = get_server_tag(theme, dest);
if (timestamp == NULL && servertag == NULL)