source: errqueue.c @ 6f87658

release-1.10release-1.8release-1.9
Last change on this file since 6f87658 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
RevLine 
[ec6ff52]1#include "owl.h"
2
3void owl_errqueue_init(owl_errqueue *eq)
4{
[eb897c6]5  eq->errlist = g_ptr_array_new();
[ec6ff52]6}
7
[e19eb97]8void owl_errqueue_append_err(owl_errqueue *eq, const char *msg)
[ec6ff52]9{
[eb897c6]10  g_ptr_array_add(eq->errlist, g_strdup(msg));
[ec6ff52]11}
12
13/* fmtext should already be initialized */
[5b256de]14void owl_errqueue_to_fmtext(const owl_errqueue *eq, owl_fmtext *fm)
[ec6ff52]15{
[eb897c6]16  int i;
17  for (i = 0; i < eq->errlist->len; i++) {
18    owl_fmtext_append_normal(fm, eq->errlist->pdata[i]);
[ec6ff52]19    owl_fmtext_append_normal(fm, "\n");
20  }
21}
Note: See TracBrowser for help on using the repository browser.