Changeset ce68f23 for fmtext.c


Ignore:
Timestamp:
Jun 25, 2011, 3:26:16 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
c266281
Parents:
3cdd6d2
git-author:
David Benjamin <davidben@mit.edu> (06/11/11 20:06:46)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:16)
Message:
Make owl_dict_get_keys return a GPtrArray

Almost all the remaining uses of owl_list are tightly coupled into this
one giant blob.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fmtext.c

    r6829afc rce68f23  
    755755 * If format_fn is specified, passes it the list element value
    756756 * and it will return a string which this needs to free. */
    757 void owl_fmtext_append_list(owl_fmtext *f, const owl_list *l, const char *join_with, char *(format_fn)(const char *))
    758 {
    759   int i, size;
     757void owl_fmtext_append_list(owl_fmtext *f, const GPtrArray *l, const char *join_with, char *(format_fn)(const char *))
     758{
     759  int i;
    760760  const char *elem;
    761761  char *text;
    762762
    763   size = owl_list_get_size(l);
    764   for (i=0; i<size; i++) {
    765     elem = owl_list_get_element(l,i);
     763  for (i = 0; i < l->len; i++) {
     764    elem = l->pdata[i];
    766765    if (elem && format_fn) {
    767766      text = format_fn(elem);
     
    773772      owl_fmtext_append_normal(f, elem);
    774773    }
    775     if ((i < size-1) && join_with) {
     774    if ((i < l->len - 1) && join_with) {
    776775      owl_fmtext_append_normal(f, join_with);
    777776    }
Note: See TracChangeset for help on using the changeset viewer.