On Sun, Oct 04, 2015 at 07:38:14PM -0700, Ian Zimmerman wrote:
> Hi.  For variables of type string, is there any difference between empty
> and unset?  

Yes, though what the difference actually is probably depends a lot on
what the variable is and how it's used.  For example, if you set
hostname="" (and don't have any other configuration that affects what
your sending address is) Mutt will use "$user@" where $user = your
username on the machine where you're running mutt.  Whereas, if you
leave it unset, Mutt will use the actual hostname instead of the empty
string.

> I am trying to add a feature dependent on a new string option (call
> it opt_foo), and I contrived to do different things when the C
> variable corresponding to the option is NULL, vs. when it points to
> the empty string.  But when I run my patched binary and I do

Ah.  This question really belongs on the dev list, not this one.  That
said, it's been an extremely long time since I've looked at the code
that handles options in Mutt, but I think there's a way to do what you
want.  You could probably look at the code that handles the hostname
variable, since it does that.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

Attachment: pgpKG23fYVF28.pgp
Description: PGP signature

Reply via email to