Changeset b470451 for history.c


Ignore:
Timestamp:
Jun 25, 2011, 3:24:36 AM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
8e515f9
Parents:
ad37b39
git-author:
Anders Kaseorg <andersk@mit.edu> (06/22/11 03:04:01)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/25/11 03:24:36)
Message:
history: Tell owl_history_store whether the new entry will be partial

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • history.c

    rad37b39 rb470451  
    55  owl_list_create(&(h->hist));
    66  h->cur=0;                     /* current position in history */
    7   h->partial=0;                 /* is the 0th element is partially composed? */
     7  h->partial = false;           /* is the 0th element is partially composed? */
    88}
    99
     
    3636}
    3737
    38 void owl_history_store(owl_history *h, const char *line)
     38void owl_history_store(owl_history *h, const char *line, bool partial)
    3939{
    4040  int size;
     
    5858  /* add the new line */
    5959  owl_list_prepend_element(&(h->hist), g_strdup(line));
    60 }
    61 
    62 void owl_history_set_partial(owl_history *h)
    63 {
    64   if (!h) return;
    65   h->partial=1;
     60  h->partial = partial;
    6661}
    6762
     
    7469    g_free(owl_list_get_element(&(h->hist), 0));
    7570    owl_list_remove_element(&(h->hist), 0);
    76     h->partial = 0;
     71    h->partial = false;
    7772  }
    7873
Note: See TracChangeset for help on using the changeset viewer.