Changeset 16ce7a4 for history.c


Ignore:
Timestamp:
Jun 25, 2011, 6:42:52 AM (12 years ago)
Author:
GitHub Merge Button <merge-button@github.com>
Parents:
650fb2c (diff), 25891a8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merge 25891a81c52b4a7460682ef7a3773e6774e73e27 into 650fb2c030491f5d6668ad439b83a6a6b7b9870e
File:
1 edited

Legend:

Unmodified
Added
Removed
  • history.c

    r95b52d1 r25891a8  
    66  h->cur = h->hist.tail;        /* current position in history */
    77  h->partial = false;           /* is the 0th element is partially composed? */
     8}
     9
     10void owl_history_cleanup(owl_history *h)
     11{
     12  g_queue_foreach(&h->hist, (GFunc)g_free, NULL);
     13  g_queue_clear(&h->hist);
    814}
    915
     
    4046
    4147  /* if we've reached the max history size, pop off the last element */
    42   if (g_queue_get_length(&h->hist) > OWL_HISTORYSIZE)
     48  if (g_queue_get_length(&h->hist) >= OWL_HISTORYSIZE)
    4349    g_free(g_queue_pop_head(&h->hist));
    4450
Note: See TracChangeset for help on using the changeset viewer.