- this_one = safe_strdup (buf);
- else {
- safe_realloc (&this_one,
- safe_strlen (this_one) + safe_strlen (buf) +
- sizeof (char));
- strcat (this_one, buf); /* __STRCAT_CHECKED__ */
+ this_one = m_strdup(buf);
+ /* we do want to see all lines if this header doesn't feature
+ * abbreviations (curline is 0), $max_display_recips is 0 and
+ * while the number hasn't reached $max_display_recips yet */
+ else if (curline == 0 || MaxDispRecips == 0 || ++curline <= MaxDispRecips) {
+ this_one_len = m_strlen(this_one) + m_strlen(buf) + 1;
+ p_realloc(&this_one, this_one_len);
+ m_strcat(this_one, this_one_len, buf);
+ /* only for the first line which doesn't exeeds
+ * $max_display_recips: abbreviate it */
+ } else if (curline == MaxDispRecips+1) {
+ this_one_len = m_strlen(this_one) + 5;
+ p_realloc(&this_one, this_one_len);
+ m_strcat(this_one, this_one_len, " ...");