release-1.10release-1.8release-1.9
Last change
on this file since ff637a7 was
eb897c6,
checked in by David Benjamin <davidben@mit.edu>, 13 years ago
|
Replace owl_errqueue's owl_list with a GPtrArray
|
-
Property mode set to
100644
|
File size:
483 bytes
|
Line | |
---|
1 | #include "owl.h" |
---|
2 | |
---|
3 | void owl_errqueue_init(owl_errqueue *eq) |
---|
4 | { |
---|
5 | eq->errlist = g_ptr_array_new(); |
---|
6 | } |
---|
7 | |
---|
8 | void owl_errqueue_append_err(owl_errqueue *eq, const char *msg) |
---|
9 | { |
---|
10 | g_ptr_array_add(eq->errlist, g_strdup(msg)); |
---|
11 | } |
---|
12 | |
---|
13 | /* fmtext should already be initialized */ |
---|
14 | void owl_errqueue_to_fmtext(const owl_errqueue *eq, owl_fmtext *fm) |
---|
15 | { |
---|
16 | int i; |
---|
17 | for (i = 0; i < eq->errlist->len; i++) { |
---|
18 | owl_fmtext_append_normal(fm, eq->errlist->pdata[i]); |
---|
19 | owl_fmtext_append_normal(fm, "\n"); |
---|
20 | } |
---|
21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.