Changeset eb897c6
- Timestamp:
- Jun 25, 2011, 3:26:15 AM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- e6d7e4e
- Parents:
- 7ed9bc6
- git-author:
- David Benjamin <davidben@mit.edu> (03/11/11 11:16:32)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
errqueue.c
rd4927a7 reb897c6 3 3 void owl_errqueue_init(owl_errqueue *eq) 4 4 { 5 owl_list_create(&(eq->errlist));5 eq->errlist = g_ptr_array_new(); 6 6 } 7 7 8 8 void owl_errqueue_append_err(owl_errqueue *eq, const char *msg) 9 9 { 10 owl_list_append_element(&(eq->errlist), g_strdup(msg));10 g_ptr_array_add(eq->errlist, g_strdup(msg)); 11 11 } 12 12 … … 14 14 void owl_errqueue_to_fmtext(const owl_errqueue *eq, owl_fmtext *fm) 15 15 { 16 int i, j; 17 18 j=owl_list_get_size(&(eq->errlist)); 19 for (i=0; i<j; i++) { 20 owl_fmtext_append_normal(fm, owl_list_get_element(&(eq->errlist), i)); 16 int i; 17 for (i = 0; i < eq->errlist->len; i++) { 18 owl_fmtext_append_normal(fm, eq->errlist->pdata[i]); 21 19 owl_fmtext_append_normal(fm, "\n"); 22 20 } -
owl.h
r7ed9bc6 reb897c6 516 516 517 517 typedef struct _owl_errqueue { 518 owl_listerrlist;518 GPtrArray *errlist; 519 519 } owl_errqueue; 520 520
Note: See TracChangeset
for help on using the changeset viewer.