Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r2560529 r43744ce  
    4747  owl_dict_create(&(g->filters));
    4848  g->filterlist = NULL;
    49   g->puntlist = g_ptr_array_new();
     49  owl_list_create(&(g->puntlist));
    5050  g->messagequeue = g_queue_new();
    5151  owl_dict_create(&(g->styledict));
     
    172172/* Pops the current context from the context stack and returns it. Caller is
    173173 * responsible for freeing. */
    174 CALLER_OWN owl_context *owl_global_pop_context_no_delete(owl_global *g)
     174G_GNUC_WARN_UNUSED_RESULT owl_context *owl_global_pop_context_no_delete(owl_global *g)
    175175{
    176176  owl_context *c;
     
    579579/* puntlist */
    580580
    581 GPtrArray *owl_global_get_puntlist(owl_global *g) {
    582   return g->puntlist;
     581owl_list *owl_global_get_puntlist(owl_global *g) {
     582  return(&(g->puntlist));
    583583}
    584584
    585585int owl_global_message_is_puntable(owl_global *g, const owl_message *m) {
    586   const GPtrArray *pl;
    587   int i;
    588 
    589   pl = owl_global_get_puntlist(g);
    590   for (i = 0; i < pl->len; i++) {
    591     if (owl_filter_message_match(pl->pdata[i], m)) return 1;
    592   }
    593   return 0;
     586  const owl_list *pl;
     587  int i, j;
     588
     589  pl=owl_global_get_puntlist(g);
     590  j=owl_list_get_size(pl);
     591  for (i=0; i<j; i++) {
     592    if (owl_filter_message_match(owl_list_get_element(pl, i), m)) return(1);
     593  }
     594  return(0);
    594595}
    595596
     
    724725 * necessary.
    725726 */
    726 CALLER_OWN owl_message *owl_global_messagequeue_popmsg(owl_global *g)
     727owl_message G_GNUC_WARN_UNUSED_RESULT *owl_global_messagequeue_popmsg(owl_global *g)
    727728{
    728729  owl_message *out;
     
    753754}
    754755
    755 CALLER_OWN GPtrArray *owl_global_get_style_names(const owl_global *g)
    756 {
    757   return owl_dict_get_keys(&g->styledict);
     756void owl_global_get_style_names(const owl_global *g, owl_list *l) {
     757  owl_dict_get_keys(&(g->styledict), l);
    758758}
    759759
Note: See TracChangeset for help on using the changeset viewer.