diff options
author | james <> | 2008-02-13 16:57:29 +0000 |
---|---|---|
committer | james <> | 2008-02-13 16:57:29 +0000 |
commit | e32ce0cfdccf5240ae29ef06a13078ae37ee521a (patch) | |
tree | f036688b6831dd6fd288df03023950597987c031 /src/history.c | |
parent | 23dc931ca671e938da071d24d8e9b6052e49923a (diff) | |
download | sympathy-e32ce0cfdccf5240ae29ef06a13078ae37ee521a.tar.gz sympathy-e32ce0cfdccf5240ae29ef06a13078ae37ee521a.tar.bz2 sympathy-e32ce0cfdccf5240ae29ef06a13078ae37ee521a.zip |
*** empty log message ***
Diffstat (limited to 'src/history.c')
-rw-r--r-- | src/history.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/history.c b/src/history.c index b8637aa..24d3692 100644 --- a/src/history.c +++ b/src/history.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.3 2008/02/13 16:57:29 james + * *** empty log message *** + * * Revision 1.2 2008/02/12 22:36:46 james * *** empty log message *** * @@ -49,13 +52,28 @@ history_free (History * h) void history_add (History * h, CRT_CA * c) { + History_ent *e; if (!h) return; - memcpy (h->lines[h->wptr].line, c, sizeof (CRT_CA) * CRT_COLS); - h->wptr++; + e = &h->lines[h->wptr]; + HISTORY_INC (h, h->wptr); + + memcpy (e->line, c, sizeof (CRT_CA) * CRT_COLS); + time (&e->t); + e->valid = 1; + +#if 0 + { + int i = CRT_COLS; + while (i--) + { + fputc (c->chr, stderr); + c++; + } + fputc ('\n', stderr); + } +#endif - if (h->wptr == h->nlines) - h->wptr = 0; } |