<<< Date Index >>>     <<< Thread Index >>>

Re: New patch: index_format variable for showing attachment



On Tue, Jul 26, 2005 at 05:37:55PM +0200, Jonas Jacobsson wrote:

These comments are based just on looking at your patch, rather than where
they fit into mutt, so please correct me if I'm wrong on that basis.

> +WHERE char *MimeMultiString;

Why make the string configurable...? 's', 'S', etc. aren't configurable, as
far as I remember, and this is much closer to them than it is to to_chars
and co.

> + * %g = display # if message is mime multipart (has attachment)

Particularly when this bit says that it will be "#". ;-)

> +      if ((i = strlen (MimeMultiString)) == 0)

You don't use 'i' again below, as far as I can see from your patch, so no
need for it.

> +      if (is_multipart (hdr->content))
> +        snprintf (dest, destlen, MimeMultiString);
> +      else
> +      {
> +        for (i = 0 ; i < strlen (MimeMultiString) && i < destlen ; i++)
> +          strcat (dest, " ");
> +      }
> +      break;

This all gets a lot simpler if you don't make mimemultistring variable, but
just a single char.

-- 
Paul

Attachment: signature.asc
Description: Digital signature