Changeset ca749a9 for commands.c


Ignore:
Timestamp:
Jul 3, 2011, 8:43:06 PM (13 years ago)
Author:
Jason Gross <jgross@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
b4a678a
Parents:
ca54fd6
git-author:
Jason Gross <jgross@mit.edu> (06/27/11 04:14:36)
git-committer:
Jason Gross <jgross@mit.edu> (07/03/11 20:43:06)
Message:
Make variable getters return NULL instead of "<null>"

This fixes trac-#184:
Since commit 010a9511420887329269aa51e7598533e826c57f, the default zsigs
show up as empty; BarnOwl::default_zephyr_signature() checks
BarnOwl::getvar('zsigproc') as a boolean (which may be incorrect if you
happen to have a zsigproc called 0). As of that commit, BarnOwl::getvar
returns "<null>" instead of undef.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    rca54fd6 rca749a9  
    16551655  if (v) {
    16561656    value = owl_variable_get_tostring(v);
    1657     owl_function_makemsg("%s = '%s'", var, value);
     1657    if (value == NULL)
     1658      owl_function_makemsg("%s = <null>", var);
     1659    else
     1660      owl_function_makemsg("%s = '%s'", var, value);
    16581661    g_free(value);
    16591662  } else {
Note: See TracChangeset for help on using the changeset viewer.