4 * Copyright (c) 2008 James McKenzie <sympathy@madingley.org>,
9 static char rcsid[] = "$Id: history.c,v 1.7 2008/03/07 13:16:02 james Exp $";
13 * Revision 1.7 2008/03/07 13:16:02 james
14 * *** empty log message ***
16 * Revision 1.6 2008/03/07 12:37:04 james
17 * *** empty log message ***
19 * Revision 1.5 2008/03/03 06:04:42 james
20 * *** empty log message ***
22 * Revision 1.4 2008/03/02 10:37:56 james
23 * *** empty log message ***
25 * Revision 1.3 2008/02/13 16:57:29 james
26 * *** empty log message ***
28 * Revision 1.2 2008/02/12 22:36:46 james
29 * *** empty log message ***
31 * Revision 1.1 2008/02/08 15:06:42 james
32 * *** empty log message ***
43 ret = (History *) xmalloc (sizeof (History));
44 ret->lines = xmalloc (n * sizeof (History_ent));
45 memset (ret->lines, 0, n * sizeof (History_ent));
54 history_free (History * h)
65 history_add (History * h, CRT_CA * c)
71 e = &h->lines[h->wptr];
72 HISTORY_INC (h, h->wptr);
74 memcpy (e->line, c, sizeof (CRT_CA) * CRT_COLS);
82 fputc (c->chr, stderr);