Branch: Tag:

1999-02-23

1999-02-23 17:51:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Modified imap_format_array() somewhat.

Rev: lib/modules/Protocols.pmod/IMAP.pmod/types.pmod:1.5

13:      string imap_format_array(array a)   { -  return Array.map(a, imap_format) * " "; +  if (!sizeof(a)) { +  return("");    } -  +  a = Array.map(a, imap_format); +  string res = a[0]; +  for(int i=1; i < sizeof(a); i++) { +  if (sizeof(res) && (res[-1] == '\n')) { +  // Special case - No space needed. +  res += a[i]; +  } else { +  res += " " + a[i]; +  } +  } +  return res; + }      /* Output types */   class imap_atom