source: errqueue.c @ a6a9ddb

release-1.10release-1.8release-1.9
Last change on this file since a6a9ddb was d4927a7, checked in by Anders Kaseorg <andersk@mit.edu>, 14 years ago
Replace owl_strdup with g_strdup. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Reviewed-by: Karl Ramm <kcr@mit.edu>
  • Property mode set to 100644
File size: 536 bytes
RevLine 
[ec6ff52]1#include "owl.h"
2
3void owl_errqueue_init(owl_errqueue *eq)
4{
5  owl_list_create(&(eq->errlist));
6}
7
[e19eb97]8void owl_errqueue_append_err(owl_errqueue *eq, const char *msg)
[ec6ff52]9{
[d4927a7]10  owl_list_append_element(&(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{
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));
21    owl_fmtext_append_normal(fm, "\n");
22  }
23}
Note: See TracBrowser for help on using the repository browser.