- Timestamp:
- Jun 25, 2011, 3:26:16 AM (13 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fmtext.c
r6829afc rce68f23 755 755 * If format_fn is specified, passes it the list element value 756 756 * 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;757 void owl_fmtext_append_list(owl_fmtext *f, const GPtrArray *l, const char *join_with, char *(format_fn)(const char *)) 758 { 759 int i; 760 760 const char *elem; 761 761 char *text; 762 762 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]; 766 765 if (elem && format_fn) { 767 766 text = format_fn(elem); … … 773 772 owl_fmtext_append_normal(f, elem); 774 773 } 775 if ((i < size-1) && join_with) {774 if ((i < l->len - 1) && join_with) { 776 775 owl_fmtext_append_normal(f, join_with); 777 776 }
Note: See TracChangeset
for help on using the changeset viewer.