Branch: Tag:

1998-09-07

1998-09-07 21:11:00 by Niels Möller <nisse@lysator.liu.se>

*** empty log message ***

Rev: lib/modules/Protocols.pmod/IMAP.pmod/dummy_server.pike:1.2
Rev: lib/modules/Protocols.pmod/IMAP.pmod/imap_server.pike:1.2
Rev: lib/modules/Protocols.pmod/IMAP.pmod/requests.pmod:1.2
Rev: lib/modules/Protocols.pmod/IMAP.pmod/server.pike:1.2
Rev: lib/modules/Protocols.pmod/IMAP.pmod/types.pmod:1.2

2:    *    */    + string imap_format(mixed x) + { +  if (!x) +  return "nil"; +  else if (stringp(x)) +  return x; +  else return x->format(); + } +  + string imap_format_array(array a) + { +  return Array.map(a, imap_format) * " "; + } +    /* Output types */   class imap_atom   {
20:       string format()    { -  if (sizeof(array_sscanf(data, "%*[^\0-\037\177-\377]%s")[0])) +  if (!sizeof(array_sscanf(data, "%*[^\0-\037\177-\377]%s")[0]))    return "\"" + replace(data, ({ "\"", "\\" }), ({ "\\\"", "\\\\" }) ) + "\"";    else    return sprintf("{%d}\r\n%s", strlen(data), data);
33:       void create(array a) { data = a; }    -  string format() { return "(" + data->format * " " + ")"; } +  string format() { return "(" + imap_format_array(data) + ")"; }   }      class imap_prefix
42:       void create(array a) { data = a; }    -  string format() { return "[" + data->format * " " + "]"; } +  string format() { return "[" + imap_format_array(data) + "]"; }   }      class imap_number