Changeset d199207 for functions.c


Ignore:
Timestamp:
Mar 11, 2012, 10:58:01 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.9
Children:
3e34a69, 5111af4, d6b8b50
Parents:
a03a409
git-author:
Anders Kaseorg <andersk@mit.edu> (01/19/12 21:32:33)
git-committer:
David Benjamin <davidben@mit.edu> (03/11/12 22:58:01)
Message:
zephyr: Use field iterator interface to avoid quadratic loops

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r97cdbaf5 rd199207  
    14311431      char *tmpbuff, *tmpbuff2;
    14321432      int i, fields;
     1433      const char *f;
    14331434
    14341435      if (!owl_message_is_pseudo(m)) {
     
    14721473        owl_fmtext_appendf_normal(&fm, "  Fields    : %i\n", fields);
    14731474
    1474         for (i = 0; i < fields; i++) {
    1475           tmpbuff = owl_zephyr_get_field_as_utf8(n, i + 1);
     1475        for (i = 0, f = owl_zephyr_first_raw_field(n); f != NULL;
     1476             i++, f = owl_zephyr_next_raw_field(n, f)) {
     1477          tmpbuff = owl_zephyr_field_as_utf8(n, f);
    14761478          tmpbuff2 = owl_text_indent(tmpbuff, 14, false);
    14771479          owl_fmtext_appendf_normal(&fm, "  Field %i   : %s\n", i + 1, tmpbuff2);
Note: See TracChangeset for help on using the changeset viewer.