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

Re: mutt/2265: mutt -D shows multiple instances of some variables



The following reply was made to PR mutt/2265; it has been noted by GNATS.

From: Paul Walker <paul@xxxxxxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: zgxdw7u02@xxxxxxxxxxxxxx, mutt-dev@xxxxxxxx
Subject: Re: mutt/2265: mutt -D shows multiple instances of some variables
Date: Wed, 7 Jun 2006 00:50:04 +0100

 --WhfpMioaduB5tiZL
 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy"
 Content-Disposition: inline
 
 
 --gBBFr7Ir9EOA20Yy
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Jun 07, 2006 at 12:17:53AM +0100, Paul Walker wrote:
 
 > There isn't an easy way to distinguish aliases from "real" variables. The
 
 Actually, there is. The problem is that I'm an idiot...
 
 Brendan/Thomas, please apply the attached patch.
 
 --=20
 Paul
 
 --gBBFr7Ir9EOA20Yy
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="mutt-dumpvar_patch1.prw"
 Content-Transfer-Encoding: quoted-printable
 
 diff -r 626cd5190109 init.c
 --- a/init.c   Wed May 01 23:24:11 2002 +0000
 +++ b/init.c   Wed Jun 07 00:49:07 2006 +0100
 @@ -2664,14 +2664,17 @@ int mutt_dump_variables (void)
   =20
    for (i =3D 0; MuttVars[i].option; i++)
    {
 -    snprintf (command, sizeof (command), "set ?%s\n", MuttVars[i].option);
 -    if (mutt_parse_rc_line (command, &token, &err) =3D=3D -1)
 -    {
 -      fprintf (stderr, "%s\n", err.data);
 -      FREE (&token.data);
 -      return 1;
 -    }
 -    printf("%s\n", err.data);
 +    if (MuttVars[i].type !=3D DT_SYN)
 +    {
 +        snprintf (command, sizeof (command), "set ?%s\n", MuttVars[i].opti=
 on);
 +      if (mutt_parse_rc_line (command, &token, &err) =3D=3D -1)
 +      {
 +              fprintf (stderr, "%s\n", err.data);
 +              FREE (&token.data);
 +              return 1;
 +      }
 +      printf("%s\n", err.data);
 +    }
    }
   =20
    FREE (&token.data);
 
 --gBBFr7Ir9EOA20Yy--
 
 --WhfpMioaduB5tiZL
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: Digital signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.1 (GNU/Linux)
 
 iD8DBQFEhhSsP9fOqdxRstoRAq3iAJ9xOQuJEHBOdlXmLOOvAmqeB6+p5wCdEWg+
 qlIro/++1EyOw49hKCU5Zaw=
 =uhCi
 -----END PGP SIGNATURE-----
 
 --WhfpMioaduB5tiZL--