Changeset e4524da


Ignore:
Timestamp:
Jun 25, 2011, 3:26:15 AM (6 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
3cdd6d2
Parents:
ecffae6
git-author:
David Benjamin <davidben@mit.edu> (03/11/11 16:24:44)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Make aimsearch code use GPtrArray instead of owl_list
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    r6829afc re4524da  
    14391439  const char *address, *SNs;
    14401440  int num, i;
    1441   owl_list list;
     1441  GPtrArray *list;
    14421442 
    14431443  va_start(ap, fr);
     
    14471447  va_end(ap);
    14481448
    1449   owl_list_create(&list);
     1449  list = g_ptr_array_new();
    14501450 
    14511451  owl_function_debugmsg("faimtest_parse_searchreply: E-Mail Search Results for %s: ", address);
    14521452  for (i=0; i<num; i++) {
    14531453    owl_function_debugmsg("  %s", &SNs[i*(MAXSNLEN+1)]);
    1454     owl_list_append_element(&list, (void *)&SNs[i*(MAXSNLEN+1)]);
    1455   }
    1456   owl_function_aimsearch_results(address, &list);
    1457   owl_list_cleanup(&list, NULL);
    1458   return(1);
     1454    g_ptr_array_add(list, (void *)&SNs[i*(MAXSNLEN+1)]);
     1455  }
     1456  owl_function_aimsearch_results(address, list);
     1457  g_ptr_array_free(list, true);
     1458  return 1;
    14591459}
    14601460
  • functions.c

    recffae6 re4524da  
    34233423}
    34243424
    3425 void owl_function_aimsearch_results(const char *email, owl_list *namelist)
     3425void owl_function_aimsearch_results(const char *email, GPtrArray *namelist)
    34263426{
    34273427  owl_fmtext fm;
    3428   int i, j;
     3428  int i;
    34293429
    34303430  owl_fmtext_init_null(&fm);
     
    34333433  owl_fmtext_append_normal(&fm, ":\n");
    34343434
    3435   j=owl_list_get_size(namelist);
    3436   for (i=0; i<j; i++) {
     3435  for (i = 0; i < namelist->len; i++) {
    34373436    owl_fmtext_append_normal(&fm, "  ");
    3438     owl_fmtext_append_normal(&fm, owl_list_get_element(namelist, i));
     3437    owl_fmtext_append_normal(&fm, namelist->pdata[i]);
    34393438    owl_fmtext_append_normal(&fm, "\n");
    34403439  }
Note: See TracChangeset for help on using the changeset viewer.