Changeset e6d7e4e for functions.c
- Timestamp:
- Jun 25, 2011, 3:26:15 AM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- ecffae6
- Parents:
- eb897c6
- git-author:
- David Benjamin <davidben@mit.edu> (03/11/11 11:39:41)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r6829afc re6d7e4e 2215 2215 { 2216 2216 const owl_filter *f; 2217 const owl_list*fl;2217 const GPtrArray *fl; 2218 2218 char *tmp; 2219 2219 owl_fmtext fm; 2220 int i , j;2220 int i; 2221 2221 2222 2222 owl_fmtext_init_null(&fm); 2223 2223 2224 2224 fl=owl_global_get_puntlist(&g); 2225 j=owl_list_get_size(fl);2226 2225 owl_fmtext_append_bold(&fm, "Active zpunt filters:\n"); 2227 2226 2228 for (i =0; i<j; i++) {2229 f =owl_list_get_element(fl, i);2227 for (i = 0; i < fl->len; i++) { 2228 f = fl->pdata[i]; 2230 2229 owl_fmtext_appendf_normal(&fm, "[% 2d] ", i+1); 2231 2230 tmp = owl_filter_print(f); … … 2787 2786 { 2788 2787 owl_filter *f; 2789 owl_list*fl;2790 int i , j;2788 GPtrArray *fl; 2789 int i; 2791 2790 fl=owl_global_get_puntlist(&g); 2792 2791 … … 2799 2798 2800 2799 /* Check for an identical filter */ 2801 j=owl_list_get_size(fl); 2802 for (i=0; i<j; i++) { 2803 if (owl_filter_equiv(f, owl_list_get_element(fl, i))) { 2800 for (i = 0; i < fl->len; i++) { 2801 if (owl_filter_equiv(f, fl->pdata[i])) { 2804 2802 owl_function_debugmsg("found an equivalent punt filter"); 2805 2803 /* if we're punting, then just silently bow out on this duplicate */ … … 2811 2809 /* if we're unpunting, then remove this filter from the puntlist */ 2812 2810 if (direction==1) { 2813 owl_filter_delete(owl_list_get_element(fl, i)); 2814 owl_list_remove_element(fl, i); 2811 owl_filter_delete(g_ptr_array_remove_index(fl, i)); 2815 2812 owl_filter_delete(f); 2816 2813 return; … … 2822 2819 owl_function_debugmsg("punting"); 2823 2820 /* If we're punting, add the filter to the global punt list */ 2824 owl_list_append_element(fl, f);2821 g_ptr_array_add(fl, f); 2825 2822 } else if (direction == 1) { 2826 2823 owl_function_makemsg("No matching punt filter");
Note: See TracChangeset
for help on using the changeset viewer.