pike.git / lib / modules / Protocols.pmod / IMAP.pmod / parse_line.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/IMAP.pmod/parse_line.pike:273:    }    return get_atom_options(max_depth);   }      array do_parse_simple_list(int max_depth, int terminator)   {    array a = ({ });       werror(sprintf("do_parse_simple_list(%d, '%c')\n", max_depth, terminator));    +  buffer = buffer[1..]; +     while(1)    { -  buffer = buffer[1..]; +     skip_whitespace();       if (!strlen(buffer))    return 0;       if (buffer[0] == terminator)    {    buffer = buffer[1..];    return a;    } -  +  +  a += ({ get_atom(max_depth-1) }); +     mapping m = get_simple_list(max_depth);    if (!m) { -  werror("get_simple_list(%d) failed\n"); -  return 0; +  werror(sprintf("get_simple_list(%d) failed\n", max_depth)); +  } else { +  a->list = m;    } -  /* FIXME: m is thrown away?! */ +     }   }      /* Reads an atom, optionally followd by a list enclosed in square    * brackets. Naturally, the atom itself cannot contain any brackets.    *    * Returns a mapping    * type : "atom",    * atom : name,    * raw : name[options]