Index: commands.c
===================================================================
--- commands.c	(revision 67b959cc0ae9cbf49b8d9bcdf3fdbcb1f50b2509)
+++ commands.c	(revision a16d7e5b1281bf21e0fe52b6d9946fd58893da28)
@@ -50,14 +50,14 @@
 	      "zlog in will send a login notification, zlog out will send a\n"
 	      "logout notification.  By default a login notification is sent\n"
-	      "when owl is started and a logout notification is sent when owl\n"
+	      "when BarnOwl is started and a logout notification is sent when owl\n"
 	      "is exited.  This behavior can be changed with the 'startuplogin'\n"
 	      "and 'shutdownlogout' variables.  If a tty is specified for zlog in\n"
-	      "then the owl variable 'tty' will be set to that string, causing\n"
+	      "then the BarnOwl variable 'tty' will be set to that string, causing\n"
 	      "it to be used as the zephyr location tty.\n"),
 
   OWLCMD_VOID("quit", owl_command_quit, OWL_CTX_ANY,
-	      "exit owl",
+	      "exit BarnOwl",
 	      "",
-	      "Exit owl and run any shutdown activities."),
+	      "Exit BarnOwl and run any shutdown activities."),
   OWLCMD_ALIAS("exit", "quit"),
   OWLCMD_ALIAS("q",    "quit"),
@@ -180,18 +180,18 @@
 
   OWLCMD_ARGS("startup", owl_command_startup, OWL_CTX_ANY,
-	      "run a command and set it to be run at every Owl startup",
+	      "run a command and set it to be run at every BarnOwl startup",
 	      "startup <commands> ...",
 	      "Everything on the command line after the startup command\n"
-	      "is executed as a normal owl command and is also placed in\n"
-	      "a file so that the command is executed every time owl\n"
+	      "is executed as a normal BarnOwl command and is also placed in\n"
+	      "a file so that the command is executed every time BarnOwl\n"
 	      "is started"),
 
   OWLCMD_ARGS("unstartup", owl_command_unstartup, OWL_CTX_ANY,
-	      "remove a command from the list of those to be run at Owl startup",
+	      "remove a command from the list of those to be run at BarnOwl startup",
 	      "unstartup <commands> ...",
 	      ""),
 
   OWLCMD_VOID("version", owl_command_version, OWL_CTX_ANY,
-	      "print the version of the running owl", "", ""),
+	      "print the version of the running BarnOwl", "", ""),
 
   OWLCMD_ARGS("subscribe", owl_command_subscribe, OWL_CTX_ANY,
@@ -204,5 +204,5 @@
 	      "only be temporary, i.e., it will not be written to\n"
 	      "the subscription file and will therefore not be\n"
-	      "present the next time owl is started.\n"),
+	      "present the next time BarnOwl is started.\n"),
   OWLCMD_ALIAS("sub", "subscribe"),
 
@@ -216,5 +216,5 @@
 	      "only be temporary, i.e., it will not be updated in\n"
 	      "the subscription file and will therefore not be\n"
-	      "in effect the next time owl is started.\n"),
+	      "in effect the next time BarnOwl is started.\n"),
   OWLCMD_ALIAS("unsub", "unsubscribe"),
 
@@ -234,7 +234,7 @@
 
   OWLCMD_ARGS("source", owl_command_source, OWL_CTX_ANY,
-	      "execute owl commands from a file",
+	      "execute BarnOwl commands from a file",
 	      "source <filename>",
-	      "Execute the owl commands in <filename>.\n"),
+	      "Execute the BarnOwl commands in <filename>.\n"),
 
   OWLCMD_ARGS("aim", owl_command_aim, OWL_CTX_INTERACTIVE,
@@ -305,5 +305,5 @@
   
   OWLCMD_ARGS("help", owl_command_help, OWL_CTX_INTERACTIVE,
-	      "display help on using owl",
+	      "display help on using BarnOwl",
 	      "help [command]", ""),
 
@@ -418,5 +418,5 @@
 
   OWLCMD_VOID("suspend", owl_command_suspend, OWL_CTX_ANY,
-	      "suspend owl", "", ""),
+	      "suspend BarnOwl", "", ""),
 
   OWLCMD_ARGS("echo", owl_command_echo, OWL_CTX_ANY,
@@ -509,8 +509,8 @@
 
   OWLCMD_VOID("about", owl_command_about, OWL_CTX_INTERACTIVE,
-	      "print information about owl", "", ""),
+	      "print information about BarnOwl", "", ""),
 
   OWLCMD_VOID("status", owl_command_status, OWL_CTX_ANY,
-	      "print status information about the running owl", "", ""),
+	      "print status information about the running BarnOwl", "", ""),
   
   OWLCMD_ARGS("zlocate", owl_command_zlocate, OWL_CTX_INTERACTIVE,
@@ -590,5 +590,5 @@
 	      "The other usages listed above are abbreviated forms that simply set\n"
 	      "the filter of the current view. The -d option allows you to write a\n"
-              "filter expression that will be dynamically created by owl and then\n"
+              "filter expression that will be dynamically created by BarnOwl and then\n"
               "applied as the view's filter\n"
 	      "SEE ALSO: filter, viewclass, viewuser\n"),
@@ -676,5 +676,5 @@
 	      "for formatting messages.\n\n"
 	      "Show variables will list the names of all variables.\n\n"
-	      "Show errors will show a list of errors encountered by Owl.\n\n"
+	      "Show errors will show a list of errors encountered by BarnOwl.\n\n"
 	      "SEE ALSO: filter, view, alias, bindkey, help\n"),
   
@@ -1581,4 +1581,5 @@
   int  silent=0;
   int requirebool=0;
+  owl_variable *v;
 
   if (argc == 1) {
@@ -1603,5 +1604,13 @@
     return NULL;
   }
-  owl_variable_set_fromstring(owl_global_get_vardict(&g), var, val, !silent, requirebool);
+
+  v = owl_variable_get_var(owl_global_get_vardict(&g), var);
+  if (v == NULL) {
+    if (!silent) owl_function_error("Unknown variable '%s'", var);
+  } else if (requirebool && owl_variable_get_type(v) != OWL_VARIABLE_BOOL) {
+    if (!silent) owl_function_error("Variable '%s' is not a boolean", var);
+  } else {
+    owl_variable_set_fromstring(v, val, !silent);
+  }
   return NULL;
 }
@@ -1609,4 +1618,5 @@
 char *owl_command_unset(int argc, const char *const *argv, const char *buff)
 {
+  owl_variable *v;
   const char *var, *val;
   int  silent=0;
@@ -1623,5 +1633,13 @@
     return NULL;
   }
-  owl_variable_set_fromstring(owl_global_get_vardict(&g), var, val, !silent, 1);
+
+  v = owl_variable_get_var(owl_global_get_vardict(&g), var);
+  if (v == NULL) {
+    if (!silent) owl_function_error("Unknown variable '%s'", var);
+  } else if (owl_variable_get_type(v) != OWL_VARIABLE_BOOL) {
+    if (!silent) owl_function_error("Variable '%s' is not a boolean", var);
+  } else {
+    owl_variable_set_fromstring(v, val, !silent);
+  }
   return NULL;
 }
@@ -1631,4 +1649,5 @@
   const char *var;
   char *value;
+  const owl_variable *v;
 
   if (argc==1) {
@@ -1642,7 +1661,11 @@
   var=argv[1];
     
-  value = owl_variable_get_tostring(owl_global_get_vardict(&g), var);
-  if (value) {
-    owl_function_makemsg("%s = '%s'", var, value);
+  v = owl_variable_get_var(owl_global_get_vardict(&g), var);
+  if (v) {
+    value = owl_variable_get_tostring(v);
+    if (value == NULL)
+      owl_function_makemsg("%s = <null>", var);
+    else
+      owl_function_makemsg("%s = '%s'", var, value);
     g_free(value);
   } else {
@@ -2511,5 +2534,5 @@
   } else if(argc == 2) {
     /* Handle :unpunt <number> */
-    if(unpunt && (i=atoi(argv[1])) !=0) {
+    if (unpunt && (i = atoi(argv[1])) > 0) {
       i--;      /* Accept 1-based indexing */
       if (i < fl->len) {
@@ -2541,11 +2564,14 @@
 }
 
-char *owl_command_getvar(int argc, const char *const *argv, const char *buff)
-{
+CALLER_OWN char *owl_command_getvar(int argc, const char *const *argv, const char *buff)
+{
+  const owl_variable *v;
   if (argc != 2) {
     owl_function_makemsg("Wrong number of arguments for %s", argv[0]);
     return NULL;
   }
-  return owl_variable_get_tostring(owl_global_get_vardict(&g), argv[1]);
+  v = owl_variable_get_var(owl_global_get_vardict(&g), argv[1]);
+  if (v == NULL) return NULL;
+  return owl_variable_get_tostring(v);
 }
 
Index: doc/barnowl.1
===================================================================
--- doc/barnowl.1	(revision fa1b15b6aa7075915078e2657f066dd24929b772)
+++ doc/barnowl.1	(revision bad44968701bd819226d18137988f6234af2bcb4)
@@ -1,92 +1,67 @@
-.TH barnowl 1 "23 Jun 2008"
+.TH BARNOWL 1 "24 Jun 2011"
 .SH NAME
-barnowl \- tty based zephyr client
+BarnOwl \- tty\(hybased zephyr client
 .SH SYNOPSIS
 .B barnowl
-[ \-n
-]
-[ \-d
-]
-[ \-D
-]
-[ \-v
-]
-[ \-h
-]
-[ \-c
-.I configfile
-]
-[ \-t
-.I tty
-]
-[ \-s
-.I configdir
-]
+[\-n]
+[\-d]
+[\-D]
+[\-v]
+[\-h]
+[\-c \fICONFIGFILE\fP]
+[\-t \fITTY\fP]
+[\-s \fICONFIGDIR\fP]
 .br
 .SH DESCRIPTION
 .B BarnOwl
-is a fully integrated tty based instant messaging client.  Currently
-it supports AOL Instant Messenger, MIT Zephyr, and Jabber.  It is
-curses-based, allows for emacs-style editing of outgoing messages and
-uses perl as an extension and configuration language.  BarnOwl will
+is a fully integrated tty\(hybased instant messaging client.  Currently
+it supports AOL Instant Messenger, MIT Zephyr, Jabber, IRC, and Twitter.  It is
+curses\(hybased, allows for emacs\(hystyle editing of outgoing messages, and
+uses Perl as an extension and configuration language.  \fBBarnOwl\fP will
 also run happily without a configuration file.
 
-Once BarnOwl is started, typing 'h' will display a help screen.
-Typing \':\' enters command mode, allowing the user to type a barnowl
+Once \fBBarnOwl\fP is started, typing \(oqh\(cq will display a help screen.
+Typing \(oq:\(cq enters command mode, allowing the user to type a \fBBarnOwl\fP
 command line.
 
-.PP
-.SH USE
-The following command line options are avilable when running barnowl:
+.SH OPTIONS
+The following command\-line options are avilable when running \fBBarnOwl\fP:
+.TP
+\fB\-n\fP, \fB\-\-no\-subs\fP
+Do not subscribe to zephyr messages on startup.  By default, \fBBarnOwl\fP
+subscribes to the default subscriptions and to anything found in
+\fI~/.zephyr.subs\fP.  When this option is used, no subscriptions are loaded.
 
-.B \-n
-.IP
-Do not subscribe to zephyr messages on startup.  By default BarnOwl
-subscribes to the default subscriptions and to anything found in
-~/.zephyr.subs.  When this option is used no subscriptions are loaded.
-.LP
+.TP
+\fB\-c\fP, \fB\-\-config\-file\fP=\fIFILE\fP
+Specify an alternate config file for \fBBarnOwl\fP to use.  By default,
+\fBBarnOwl\fP uses \fI~/.barnowlconf\fP if it exists, and \fI~/.owlconf\fP otherwise.
 
-.B \-c \fIconfigfile\fP
-.IP
-Specifiy an alternate config file for BarnOwl to use.  By default,
-barnowl uses ~/.barnowlconf if it exists, and ~/.owlconf otherwise.
-.LP
+.TP
+\fB\-s\fP, \fB\-\-config\-dir\fP=\fIDIR\fP
+Specify an alternate configuration directory.  By default, \fBBarnOwl\fP uses
+\fI~/.owl/\fP.
 
-.B \-s \fIconfigdir\fP
-.IP
-Specify an alternate configuration directory. By default, BarnOwl uses
-~/.owl/.
-.LP
+.TP
+\fB\-t\fP, \fB\-\-tty\fP=\fITTY\fP
+Specify the tty name to use for the zephyr location.
 
-.B \-t \fItty\fP
-.IP
-Specifiy the tty name to use for the zephyr location.
-.LP
+.TP
+\fB\-v\fP, \fB\-\-version\fP
+Print the version number of \fBBarnOwl\fP and exit.
 
-.B \-v
-.IP
-Print the version number of barnowl and exit.
-.LP
+.TP
+\fB\-d\fP, \fB\-\-debug\fP
+Enable debugging.  By default, debugging information is placed in
+\fI/var/tmp/barnowl\-debug.PID\fP.
 
-.B \-d
-.IP
-Enable debugging.  By default debugging information is placed in
-/var/tmp/owldebug.
-.LP
+.TP
+\fB\-h\fP, \fB\-\-help\fP
+Print command\(hyline option help.
 
-.B \-D
-.IP
-Enable debugging, but first delete any existing debugging file.
-.LP
-
-.B \-h
-.IP
-Print command line option help.
-.LP
-
-.SH AUTHOR
+.SH AUTHORS
 Written by Nelson Elhage and Alejandro Sedeno at the Massachusetts
-Institute of Technology. Based on Owl by James Kretchmar.
+Institute of Technology.  Based on Owl by James Kretchmar.
 
 Comments, questions, and bug reports may be mailed to
-\fBbug-barnowl@mit.edu\fP.
+\fBbug\-barnowl@mit.edu\fP.
Index: filterelement.c
===================================================================
--- filterelement.c	(revision d4927a70549407fe7f56b4ae1d3949663a370205)
+++ filterelement.c	(revision 7756dde54c2baa17ccd758175c7bceb60f57b045)
@@ -104,5 +104,5 @@
 }
 
-/* XXX: Our boolea operators short-circuit here. The original owl did
+/* XXX: Our boolean operators short-circuit here. The original owl did
    not. Do we care?
 */
Index: functions.c
===================================================================
--- functions.c	(revision 67b959cc0ae9cbf49b8d9bcdf3fdbcb1f50b2509)
+++ functions.c	(revision a16d7e5b1281bf21e0fe52b6d9946fd58893da28)
@@ -127,5 +127,5 @@
 
   text=""
-    "barnowl version " OWL_VERSION_STRING "\n"
+    "BarnOwl version " OWL_VERSION_STRING "\n"
     "Copyright (c) 2006-2011 The BarnOwl Developers. All rights reserved.\n"
     "Copyright (c) 2004 James Kretchmar. All rights reserved.\n"
@@ -144,6 +144,6 @@
     "\n"
     "   * Redistributions in any form must be accompanied by information on\n"
-    "     how to obtain complete source code for the Owl software and any\n"
-    "     accompanying software that uses the Owl software. The source code\n"
+    "     how to obtain complete source code for the BarnOwl software and any\n"
+    "     accompanying software that uses the BarnOwl software. The source code\n"
     "     must either be included in the distribution or be available for no\n"
     "     more than the cost of distribution plus a nominal fee, and must be\n"
@@ -1024,5 +1024,5 @@
   }
 
-  owl_function_debugmsg("Quitting Owl");
+  owl_function_debugmsg("Quitting BarnOwl");
   owl_select_quit_loop();
 }
@@ -1357,6 +1357,6 @@
 {
   owl_function_popless_text(
-    "This is barnowl version " OWL_VERSION_STRING ".\n\n"
-    "barnowl is a fork of the Owl zephyr client, written and\n"
+    "This is BarnOwl version " OWL_VERSION_STRING ".\n\n"
+    "BarnOwl is a fork of the Owl zephyr client, written and\n"
     "maintained by Alejandro Sedeno and Nelson Elhage at the\n"
     "Massachusetts Institute of Technology. \n"
@@ -1367,5 +1367,5 @@
     "The name 'owl' was chosen in reference to the owls in the\n"
     "Harry Potter novels, who are tasked with carrying messages\n"
-    "between Witches and Wizards. The name 'barnowl' was chosen\n"
+    "between Witches and Wizards. The name 'BarnOwl' was chosen\n"
     "because we feel our owls should live closer to our ponies.\n"
     "\n"
@@ -1491,5 +1491,5 @@
   }
 
-  owl_fmtext_append_bold(&fm, "\nOwl Message Attributes:\n");
+  owl_fmtext_append_bold(&fm, "\nBarnOwl Message Attributes:\n");
   owl_message_attributes_tofmtext(m, &attrfm);
   owl_fmtext_append_fmtext(&fm, &attrfm);
@@ -1624,4 +1624,5 @@
 void owl_function_printallvars(void)
 {
+  const owl_variable *v;
   const char *name;
   char *var;
@@ -1637,8 +1638,11 @@
     if (name && name[0]!='_') {
       g_string_append_printf(str, "\n%-20s = ", name);
-      var = owl_variable_get_tostring(owl_global_get_vardict(&g), name);
+      v = owl_variable_get_var(owl_global_get_vardict(&g), name);
+      var = owl_variable_get_tostring(v);
       if (var) {
-	g_string_append(str, var);
-	g_free(var);
+        g_string_append(str, var);
+        g_free(var);
+      } else {
+        g_string_append(str, "<null>");
       }
     }
@@ -1653,4 +1657,5 @@
 void owl_function_show_variables(void)
 {
+  const owl_variable *v;
   GPtrArray *varnames;
   owl_fmtext fm;  
@@ -1665,5 +1670,6 @@
     varname = varnames->pdata[i];
     if (varname && varname[0]!='_') {
-      owl_variable_describe(owl_global_get_vardict(&g), varname, &fm);
+      v = owl_variable_get_var(owl_global_get_vardict(&g), varname);
+      owl_variable_describe(v, &fm);
     }
   }
@@ -1675,8 +1681,13 @@
 void owl_function_show_variable(const char *name)
 {
+  const owl_variable *v;
   owl_fmtext fm;  
 
   owl_fmtext_init_null(&fm);
-  owl_variable_get_help(owl_global_get_vardict(&g), name, &fm);
+  v = owl_variable_get_var(owl_global_get_vardict(&g), name);
+  if (v)
+    owl_variable_get_help(v, &fm);
+  else
+    owl_fmtext_append_normal(&fm, "No such variable...\n");
   owl_function_popless_fmtext(&fm);
   owl_fmtext_cleanup(&fm);
Index: help.c
===================================================================
--- help.c	(revision ce68f235ae86ae86fa4398ae206bda1194d1fcda)
+++ help.c	(revision a16d7e5b1281bf21e0fe52b6d9946fd58893da28)
@@ -4,4 +4,5 @@
 void owl_help(void)
 {
+  const owl_variable *v;
   owl_fmtext fm;
   const char *varname;
@@ -69,5 +70,5 @@
      "    w             Open a URL in the current message\n"
      "    C-l           Refresh the screen\n"
-     "    C-z           Suspend Owl\n"
+     "    C-z           Suspend BarnOwl\n"
      "    h             Print this help message\n"
      "    : , M-x       Enter command mode\n"
@@ -83,7 +84,7 @@
   owl_fmtext_append_normal
     (&fm, 
-     "    quit, exit    Exit owl\n"
+     "    quit, exit    Exit BarnOwl\n"
      "    help          Get help about commands\n"
-     "    show          Show information about owl (see detailed help)\n"
+     "    show          Show information about BarnOwl (see detailed help)\n"
      "\n"
      "    zwrite        Send a zephyr\n"
@@ -101,6 +102,6 @@
      "    set           Set a variable (see list below)\n"
      "    print         Print a variable's value (variables listed below)\n"
-     "    startup       Set a command to be run at every Owl startup\n"
-     "    unstartup     Remove a command to be run at every Owl startup\n"
+     "    startup       Set a command to be run at every BarnOwl startup\n"
+     "    unstartup     Remove a command to be run at every BarnOwl startup\n"
      "\n"
      "    getsubs       Print a list of current subscriptions\n"
@@ -121,7 +122,7 @@
      "    dump          Dump messagelist as text to a file\n"
      "\n"
-     "    about         Print information about owl\n"
-     "    status        Print status information about the running owl\n"
-     "    version       Print the version number of owl\n"
+     "    about         Print information about BarnOwl\n"
+     "    status        Print status information about the running BarnOwl\n"
+     "    version       Print the version number of BarnOwl\n"
      "\n");
   
@@ -133,5 +134,6 @@
     varname = varnames->pdata[i];
     if (varname && varname[0]!='_') {
-      owl_variable_describe(owl_global_get_vardict(&g), varname, &fm);
+      v = owl_variable_get_var(owl_global_get_vardict(&g), varname);
+      owl_variable_describe(v, &fm);
     }
   }
Index: m4/ax_check_flag.m4
===================================================================
--- m4/ax_check_flag.m4	(revision f2a96c0fd0bab7380da67a9616eb04308488ff8f)
+++ m4/ax_check_flag.m4	(revision 82e93c95ea82cdc4725e91b4d3ac6ac4f0b75f24)
@@ -72,5 +72,5 @@
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 2
+#serial 3
 
 AC_DEFUN([AX_CHECK_PREPROC_FLAG],
@@ -81,8 +81,8 @@
   CPPFLAGS="$CPPFLAGS $4 $1"
   AC_PREPROC_IFELSE([AC_LANG_PROGRAM()],
-    [AS_VAR_SET([CACHEVAR],[yes])],
-    [AS_VAR_SET([CACHEVAR],[no])])
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
   CPPFLAGS=$ax_check_save_flags])
-AS_VAR_IF([CACHEVAR], "yes",
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
   [m4_default([$2], :)],
   [m4_default([$3], :)])
@@ -97,8 +97,8 @@
   _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
-    [AS_VAR_SET([CACHEVAR],[yes])],
-    [AS_VAR_SET([CACHEVAR],[no])])
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
   _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
-AS_VAR_IF([CACHEVAR], "yes",
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
   [m4_default([$2], :)],
   [m4_default([$3], :)])
@@ -112,8 +112,8 @@
   LDFLAGS="$LDFLAGS $4 $1"
   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
-    [AS_VAR_SET([CACHEVAR],[yes])],
-    [AS_VAR_SET([CACHEVAR],[no])])
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
   LDFLAGS=$ax_check_save_flags])
-AS_VAR_IF([CACHEVAR], "yes",
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
   [m4_default([$2], :)],
   [m4_default([$3], :)])
@@ -124,12 +124,16 @@
 AC_DEFUN([AX_APPEND_FLAG],
 [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
-AC_REQUIRE([AC_PROG_GREP])
-AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[]FLAGS)])dnl
-AS_VAR_SET_IF([FLAGS],
-  [AS_IF([AS_ECHO(" $[]FLAGS ") | $GREP " $1 " 2>&1 >/dev/null],
-    [AC_RUN_LOG([: FLAGS already contains $1])],
-    [AC_RUN_LOG([: FLAGS="$FLAGS $1"])
-    AS_VAR_APPEND([FLAGS], [" $1"])])],
-  [AS_VAR_SET([FLAGS],[$1])])
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
+AS_VAR_SET_IF(FLAGS,
+  [case " AS_VAR_GET(FLAGS) " in
+    *" $1 "*)
+      AC_RUN_LOG([: FLAGS already contains $1])
+      ;;
+    *)
+      AC_RUN_LOG([: FLAGS="$FLAGS $1"])
+      AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
+      ;;
+   esac],
+  [AS_VAR_SET(FLAGS,["$1"])])
 AS_VAR_POPDEF([FLAGS])dnl
 ])dnl AX_APPEND_FLAG
Index: messagelist.c
===================================================================
--- messagelist.c	(revision 67b959cc0ae9cbf49b8d9bcdf3fdbcb1f50b2509)
+++ messagelist.c	(revision 901cee9b7ebc203aee860a9c5fc3849ed3527532)
@@ -22,4 +22,9 @@
 void *owl_messagelist_get_element(const owl_messagelist *ml, int n)
 {
+  /* we assume things like owl_view_get_element(v, owl_global_get_curmsg(&g))
+   * work even when there are no messages in the message list.  So don't
+   * segfault if someone asks for the zeroth element of an empty list.
+   */
+  if (n >= ml->list->len) return NULL;
   return ml->list->pdata[n];
 }
Index: owl.c
===================================================================
--- owl.c	(revision 2244836f51939a939edaac90302eca3379f5c362)
+++ owl.c	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -89,5 +89,5 @@
       break;
     case 'v':
-      printf("This is barnowl version %s\n", OWL_VERSION_STRING);
+      printf("This is BarnOwl version %s\n", OWL_VERSION_STRING);
       exit(0);
     case 'h':
@@ -584,5 +584,5 @@
   owl_function_adminmsg("",
     "-----------------------------------------------------------------------\n"
-    "Welcome to barnowl version " OWL_VERSION_STRING ".\n"
+    "Welcome to BarnOwl version " OWL_VERSION_STRING ".\n"
     "To see a quick introduction, type ':show quickstart'.                  \n"
     "Press 'h' for on-line help.                                            \n"
Index: owl_perl.h
===================================================================
--- owl_perl.h	(revision 06adc2597733314a26b26261ddbb33995304e8c3)
+++ owl_perl.h	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -13,5 +13,5 @@
  * * args   - a code block responsible for pushing args (other than the object)
  * * err    - a string with a %s format specifier to log in case of error
- * * fatalp - if true, perl errors terminate barnowl
+ * * fatalp - if true, perl errors terminate BarnOwl
  * * ret    - a code block executed if the call succeeded
  *
Index: perl/lib/BarnOwl.pm
===================================================================
--- perl/lib/BarnOwl.pm	(revision caac19d40ffaea75410ce13da172590b04dae2b1)
+++ perl/lib/BarnOwl.pm	(revision 785ee770a72bcdda39fd541a90d8c640fa5c76ca)
@@ -52,5 +52,5 @@
 The BarnOwl module contains the core of BarnOwl's perl
 bindings. Source in this module is also run at startup to bootstrap
-barnowl by defining things like the default style.
+BarnOwl by defining things like the default style.
 
 =for NOTE
@@ -80,9 +80,9 @@
 =head2 zephyr_getrealm
 
-Returns the zephyr realm barnowl is running in
+Returns the zephyr realm BarnOwl is running in
 
 =head2 zephyr_getsender
 
-Returns the fully-qualified name of the zephyr sender barnowl is
+Returns the fully-qualified name of the zephyr sender BarnOwl is
 running as, e.g. C<nelhage@ATHENA.MIT.EDU>
 
@@ -240,5 +240,5 @@
 =head2 create_style NAME OBJECT
 
-Creates a new barnowl style with the given NAME defined by the given
+Creates a new BarnOwl style with the given NAME defined by the given
 object. The object must have a C<description> method which returns a
 string description of the style, and a and C<format_message> method
@@ -571,6 +571,7 @@
 {
   my $zsig = getvar('zsig');
-  if (!$zsig) {
-      if (my $zsigproc = getvar('zsigproc')) {
+  if (!defined($zsig) || $zsig eq '') {
+      my $zsigproc = getvar('zsigproc');
+      if (defined($zsigproc) && $zsigproc ne '') {
 	  $zsig = `$zsigproc`;
       } elsif (!defined($zsig = get_zephyr_variable('zwrite-signature'))) {
Index: perl/lib/BarnOwl/Hooks.pm
===================================================================
--- perl/lib/BarnOwl/Hooks.pm	(revision 3aa05226f2c729940957d231891ed429669e255f)
+++ perl/lib/BarnOwl/Hooks.pm	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -146,5 +146,5 @@
 }
 
-# These are the internal hooks called by the barnowl C code, which
+# These are the internal hooks called by the BarnOwl C code, which
 # take care of dispatching to the appropriate perl hooks, and deal
 # with compatibility by calling the old, fixed-name hooks.
Index: perl/lib/Module/Install/BarnOwl.pm
===================================================================
--- perl/lib/Module/Install/BarnOwl.pm	(revision 3519d06307005a370cca38ff5f66565f63165b08)
+++ perl/lib/Module/Install/BarnOwl.pm	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -8,5 +8,5 @@
 =head1 DESCRIPTION
 
-Module::Install::BarnOwl is a M::I module to help building barnowl
+Module::Install::BarnOwl is a M::I module to help building BarnOwl
 modules,
 
@@ -28,5 +28,5 @@
 
 As well as make rules to generate Jabber.par, and to put some
-additional barnowl-specific information into META.yml
+additional BarnOwl-specific information into META.yml
 
 =cut
Index: perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
===================================================================
--- perl/modules/IRC/lib/BarnOwl/Module/IRC.pm	(revision 5c6d661cb25bf113e3f1b18aaed92753a61a9f96)
+++ perl/modules/IRC/lib/BarnOwl/Module/IRC.pm	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -10,5 +10,5 @@
 =head1 DESCRIPTION
 
-This module implements IRC support for barnowl.
+This module implements IRC support for BarnOwl.
 
 =cut
Index: perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
===================================================================
--- perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm	(revision c8d9f84473286a0cc8096539ea7153ff6793b35d)
+++ perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -10,5 +10,5 @@
 =head1 DESCRIPTION
 
-This module implements Jabber support for barnowl.
+This module implements Jabber support for BarnOwl.
 
 =cut
@@ -36,5 +36,5 @@
         if($IO::Socket::SSL::VERSION eq "0.97") {
             BarnOwl::error("You are using IO::Socket:SSL 0.97, which \n" .
-                           "contains bugs causing it not to work with barnowl's\n" .
+                           "contains bugs causing it not to work with BarnOwl's\n" .
                            "Jabber support. We recommend updating to the latest\n" .
                            "IO::Socket::SSL from CPAN. \n");
Index: perl/modules/Jabber/lib/BarnOwl/Module/Jabber/ConnectionManager.pm
===================================================================
--- perl/modules/Jabber/lib/BarnOwl/Module/Jabber/ConnectionManager.pm	(revision 2cca044a9e31bff45ff7a56f81630d67fd95f737)
+++ perl/modules/Jabber/lib/BarnOwl/Module/Jabber/ConnectionManager.pm	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -8,6 +8,6 @@
 =head1 DESCRIPTION
 
-A class to keep track of all the active connection in the barnowl
-jabber module
+A class to keep track of all the active connection in the BarnOwl
+Jabber module
 
 =cut
Index: perl/modules/Twitter/README
===================================================================
--- perl/modules/Twitter/README	(revision 8c6e2c101b1206daaefe922d0acf000a766d22fd)
+++ perl/modules/Twitter/README	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -118,5 +118,5 @@
     the sender. Has no effect if poll_for_tweets is false.
 
-* oauth_key, oauth_secret (strings, default barnowl's consumer credentials)
+* oauth_key, oauth_secret (strings, default BarnOwl's consumer credentials)
     These are the OAuth consumer key and secret to use to negotiate an
     OAuth connection to Twitter. These credentials must be enabled for
Index: perl/modules/Twitter/lib/BarnOwl/Module/Twitter.pm
===================================================================
--- perl/modules/Twitter/lib/BarnOwl/Module/Twitter.pm	(revision f6e12629c3a5e306d146c633ddf9609593c7f785)
+++ perl/modules/Twitter/lib/BarnOwl/Module/Twitter.pm	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -193,5 +193,5 @@
 
 sub poll_messages {
-    # If we are reloaded into a barnowl with the old
+    # If we are reloaded into a BarnOwl with the old
     # BarnOwl::Module::Twitter loaded, it still has a main loop hook
     # that will call this function every second. If we just delete it,
Index: runtests.sh
===================================================================
--- runtests.sh	(revision 5aa33fd73dce2c8d6c88559e62cd1ae78ef4a36d)
+++ runtests.sh	(revision 786a4108f9184d7c73170d373bc2cf80347b6456)
@@ -5,3 +5,3 @@
 export BARNOWL_BIN_DIR="$SRCDIR/"
 
-HARNESS_PERL=./tester exec prove t/
+HARNESS_PERL=./tester exec prove --failures t/
Index: scripts/do-release
===================================================================
--- scripts/do-release	(revision 74312ad94f05bf19a1e198a7302d480c68828431)
+++ scripts/do-release	(revision b8a3e0025038d7a71f4d13206b772d904f95b8a0)
@@ -9,5 +9,5 @@
     cat >&2 <<EOF
 Usage: $0 [options]
-Generate a barnowl release tarball.
+Generate a BarnOwl release tarball.
 
 OPTIONS:
@@ -37,5 +37,5 @@
 else
     VERS=$(perl -ne 'print $1 if m{^AC_INIT\(\[[^\]]+\],\s*\[([^\]]+)\]}' configure.ac) \
-        || die "Unable to parse barnowl version"
+        || die "Unable to parse BarnOwl version"
 fi
 TAG=barnowl-$VERS
Index: scripts/locker-build
===================================================================
--- scripts/locker-build	(revision 4f5e38f21e47c38220a1df0800c3cbbf76df8510)
+++ scripts/locker-build	(revision 401752a309e8f11f694cfb3aa0e83b2af771e958)
@@ -119,4 +119,6 @@
     $MAKE -j$CPUS all || die "make failed"
 
+    $MAKE check || die "Unit tests failed"
+
     if [ -n "$DRYRUN" ]; then
         echo "Build completed; Dropping to a shell..."
Index: stubgen.pl
===================================================================
--- stubgen.pl	(revision fd03b12fbdcea4f6b3ebc621c0a85c73d129b088)
+++ stubgen.pl	(revision ca54fd61683ca4456f68b3b3758e941cc6d93e24)
@@ -14,19 +14,19 @@
     if ($vartype =~ /^BOOL/) {
 	print "void owl_global_set_${altvarname}_on(owl_global *g) {\n";
-	print "  owl_variable_set_bool_on(&g->vars, \"$varname\");\n}\n";
+	print "  owl_variable_set_bool_on(owl_variable_get_var(&g->vars, \"$varname\"));\n}\n";
 	print "void owl_global_set_${altvarname}_off(owl_global *g) {\n";
-	print "  owl_variable_set_bool_off(&g->vars, \"$varname\");\n}\n";
+	print "  owl_variable_set_bool_off(owl_variable_get_var(&g->vars, \"$varname\"));\n}\n";
 	print "int owl_global_is_$altvarname(const owl_global *g) {\n";
-	print "  return owl_variable_get_bool(&g->vars, \"$varname\");\n}\n";
+	print "  return owl_variable_get_bool(owl_variable_get_var(&g->vars, \"$varname\"));\n}\n";
     } elsif ($vartype =~ /^PATH/ or $vartype =~ /^STRING/) {
 	print "void owl_global_set_$altvarname(owl_global *g, const char *text) {\n";
-	print "  owl_variable_set_string(&g->vars, \"$varname\", text);\n}\n";
+	print "  owl_variable_set_string(owl_variable_get_var(&g->vars, \"$varname\"), text);\n}\n";
 	print "const char *owl_global_get_$altvarname(const owl_global *g) {\n";
-	print "  return owl_variable_get_string(&g->vars, \"$varname\");\n}\n";
+	print "  return owl_variable_get_string(owl_variable_get_var(&g->vars, \"$varname\"));\n}\n";
     } elsif ($vartype =~ /^INT/ or $vartype =~ /^ENUM/) {
 	print "void owl_global_set_$altvarname(owl_global *g, int n) {\n";
-	print "  owl_variable_set_int(&g->vars, \"$varname\", n);\n}\n";
+	print "  owl_variable_set_int(owl_variable_get_var(&g->vars, \"$varname\"), n);\n}\n";
 	print "int owl_global_get_$altvarname(const owl_global *g) {\n";
-	print "  return owl_variable_get_int(&g->vars, \"$varname\");\n}\n";
+	print "  return owl_variable_get_int(owl_variable_get_var(&g->vars, \"$varname\"));\n}\n";
     } 
     }
Index: tester.c
===================================================================
--- tester.c	(revision 25891a81c52b4a7460682ef7a3773e6774e73e27)
+++ tester.c	(revision 14c9e05ce7a2e185e0303e975b73852951ee4b2a)
@@ -4,6 +4,11 @@
 #undef WINDOW
 
+#include <errno.h>
 #include <unistd.h>
+#include <pwd.h>
+#include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
 
 #undef instr
@@ -124,5 +129,5 @@
 #define FAIL_UNLESS(desc,pred) do { int __pred = (pred);                \
     numtests++;                                                         \
-    printf("%s %s", (__pred)?"ok":(numfailed++,"not ok"), desc);        \
+    printf("%s %d %s", (__pred) ? "ok" : (numfailed++, "not ok"), numtests, desc); \
     if(!(__pred)) printf("\t(%s:%d)", __FILE__, __LINE__); printf("%c", '\n'); } while(0)
 
@@ -131,4 +136,7 @@
 {
   int numfailed=0;
+  const char *home;
+  char *s, *path;
+  struct passwd *pw;
 
   printf("# BEGIN testing owl_util\n");
@@ -225,4 +233,84 @@
   g_string_free(g, true);
 
+
+  s = owl_util_baseclass("barnowl");
+  FAIL_UNLESS("baseclass barnowl", !strcmp("barnowl", s));
+  g_free(s);
+  s = owl_util_baseclass("unbarnowl");
+  FAIL_UNLESS("baseclass unbarnowl", !strcmp("barnowl", s));
+  g_free(s);
+  s = owl_util_baseclass("unununbarnowl.d.d");
+  FAIL_UNLESS("baseclass unununbarnowl.d.d", !strcmp("barnowl", s));
+  g_free(s);
+  s = owl_util_baseclass("ununun.d.d");
+  FAIL_UNLESS("baseclass ununun.d.d", !strcmp("", s));
+  g_free(s);
+  s = owl_util_baseclass("d.d.d.d");
+  FAIL_UNLESS("baseclass d.d.d.d", !strcmp("d", s));
+  g_free(s);
+  s = owl_util_baseclass("n.d.d.d");
+  FAIL_UNLESS("baseclass n.d.d.d", !strcmp("n", s));
+  g_free(s);
+  s = owl_util_baseclass("ununun.");
+  FAIL_UNLESS("baseclass ununun.", !strcmp(".", s));
+  g_free(s);
+  s = owl_util_baseclass("unununu");
+  FAIL_UNLESS("baseclass unununu", !strcmp("u", s));
+  g_free(s);
+
+
+  s = owl_util_makepath("foo/bar");
+  FAIL_UNLESS("makepath foo/bar", !strcmp("foo/bar", s));
+  g_free(s);
+  s = owl_util_makepath("//foo///bar");
+  FAIL_UNLESS("makepath //foo///bar", !strcmp("/foo/bar", s));
+  g_free(s);
+  s = owl_util_makepath("foo/~//bar/");
+  FAIL_UNLESS("makepath foo/~//bar/", !strcmp("foo/~/bar/", s));
+  g_free(s);
+  s = owl_util_makepath("~thisuserhadreallybetternotexist/foobar/");
+  FAIL_UNLESS("makepath ~thisuserhadreallybetternotexist/foobar/",
+              !strcmp("~thisuserhadreallybetternotexist/foobar/", s));
+  g_free(s);
+
+  errno = 0;
+  pw = getpwuid(getuid());
+  if (pw) {
+    home = pw->pw_dir;
+  } else {
+    /* Just make some noise so we notice. */
+    home = "<WHAT>";
+    fprintf(stderr, "getpwuid: %s", errno ? strerror(errno) : "No such user");
+  }
+  s = owl_util_makepath("~");
+  FAIL_UNLESS("makepath ~", !strcmp(home, s));
+  g_free(s);
+
+  path = g_strconcat(home, "/foo/bar/baz", NULL);
+  s = owl_util_makepath("~///foo/bar//baz");
+  FAIL_UNLESS("makepath ~///foo/bar//baz", !strcmp(path, s));
+  g_free(s);
+  g_free(path);
+
+  errno = 0;
+  pw = getpwnam("root");
+  if (pw) {
+    home = pw->pw_dir;
+  } else {
+    /* Just make some noise so we notice. */
+    home = "<WHAT>";
+    fprintf(stderr, "getpwnam: %s", errno ? strerror(errno) : "No such user");
+  }
+
+  s = owl_util_makepath("~root");
+  FAIL_UNLESS("makepath ~root", !strcmp(home, s));
+  g_free(s);
+
+  path = g_strconcat(home, "/foo/bar/baz", NULL);
+  s = owl_util_makepath("~root///foo/bar//baz");
+  FAIL_UNLESS("makepath ~root///foo/bar//baz", !strcmp(path, s));
+  g_free(s);
+  g_free(path);
+
   /* if (numfailed) printf("*** WARNING: failures encountered with owl_util\n"); */
   printf("# END testing owl_util (%d failures)\n", numfailed);
@@ -276,4 +364,5 @@
 int owl_variable_regtest(void) {
   owl_vardict vd;
+  owl_variable *var;
   int numfailed=0;
   char *value;
@@ -283,53 +372,67 @@
   FAIL_UNLESS("setup", 0==owl_variable_dict_setup(&vd));
 
-  FAIL_UNLESS("get bool", 0==owl_variable_get_bool(&vd,"rxping"));
-  FAIL_UNLESS("get bool (no such)", -1==owl_variable_get_bool(&vd,"mumble"));
+  FAIL_UNLESS("get bool var", NULL != (var = owl_variable_get_var(&vd, "rxping")));
+  FAIL_UNLESS("get bool", 0 == owl_variable_get_bool(var));
+  FAIL_UNLESS("get bool (no such)", NULL == owl_variable_get_var(&vd, "mumble"));
   FAIL_UNLESS("get bool as string",
-	      !strcmp((value = owl_variable_get_tostring(&vd,"rxping")), "off"));
+	      !strcmp((value = owl_variable_get_tostring(var)), "off"));
   g_free(value);
-  FAIL_UNLESS("set bool 1", 0==owl_variable_set_bool_on(&vd,"rxping"));
-  FAIL_UNLESS("get bool 2", 1==owl_variable_get_bool(&vd,"rxping"));
-  FAIL_UNLESS("set bool 3", 0==owl_variable_set_fromstring(&vd,"rxping","off",0,0));
-  FAIL_UNLESS("get bool 4", 0==owl_variable_get_bool(&vd,"rxping"));
-  FAIL_UNLESS("set bool 5", -1==owl_variable_set_fromstring(&vd,"rxping","xxx",0,0));
-  FAIL_UNLESS("get bool 6", 0==owl_variable_get_bool(&vd,"rxping"));
-
-
-  FAIL_UNLESS("get string", 0==strcmp("~/zlog/people", owl_variable_get_string(&vd,"logpath")));
-  FAIL_UNLESS("set string 7", 0==owl_variable_set_string(&vd,"logpath","whee"));
-  FAIL_UNLESS("get string", 0==strcmp("whee", owl_variable_get_string(&vd,"logpath")));
-
-  FAIL_UNLESS("get int", 8==owl_variable_get_int(&vd,"typewinsize"));
-  FAIL_UNLESS("get int (no such)", -1==owl_variable_get_int(&vd,"mmble"));
+  FAIL_UNLESS("set bool 1", 0 == owl_variable_set_bool_on(var));
+  FAIL_UNLESS("get bool 2", 1 == owl_variable_get_bool(var));
+  FAIL_UNLESS("set bool 3", 0 == owl_variable_set_fromstring(var, "off", 0));
+  FAIL_UNLESS("get bool 4", 0 == owl_variable_get_bool(var));
+  FAIL_UNLESS("set bool 5", -1 == owl_variable_set_fromstring(var, "xxx", 0));
+  FAIL_UNLESS("get bool 6", 0 == owl_variable_get_bool(var));
+
+
+  FAIL_UNLESS("get string var", NULL != (var = owl_variable_get_var(&vd, "logpath")));
+  FAIL_UNLESS("get string", 0 == strcmp("~/zlog/people", owl_variable_get_string(var)));
+  FAIL_UNLESS("set string 7", 0 == owl_variable_set_string(var, "whee"));
+  FAIL_UNLESS("get string", !strcmp("whee", owl_variable_get_string(var)));
+
+  FAIL_UNLESS("get int var", NULL != (var = owl_variable_get_var(&vd, "typewinsize")));
+  FAIL_UNLESS("get int", 8 == owl_variable_get_int(var));
+  FAIL_UNLESS("get int (no such)", NULL == owl_variable_get_var(&vd, "mumble"));
   FAIL_UNLESS("get int as string",
-	      !strcmp((value = owl_variable_get_tostring(&vd,"typewinsize")), "8"));
+	      !strcmp((value = owl_variable_get_tostring(var)), "8"));
   g_free(value);
-  FAIL_UNLESS("set int 1", 0==owl_variable_set_int(&vd,"typewinsize",12));
-  FAIL_UNLESS("get int 2", 12==owl_variable_get_int(&vd,"typewinsize"));
-  FAIL_UNLESS("set int 1b", -1==owl_variable_set_int(&vd,"typewinsize",-3));
-  FAIL_UNLESS("get int 2b", 12==owl_variable_get_int(&vd,"typewinsize"));
-  FAIL_UNLESS("set int 3", 0==owl_variable_set_fromstring(&vd,"typewinsize","9",0,0));
-  FAIL_UNLESS("get int 4", 9==owl_variable_get_int(&vd,"typewinsize"));
-  FAIL_UNLESS("set int 5", -1==owl_variable_set_fromstring(&vd,"typewinsize","xxx",0,0));
-  FAIL_UNLESS("set int 6", -1==owl_variable_set_fromstring(&vd,"typewinsize","",0,0));
-  FAIL_UNLESS("get int 7", 9==owl_variable_get_int(&vd,"typewinsize"));
+  FAIL_UNLESS("set int 1", 0 == owl_variable_set_int(var, 12));
+  FAIL_UNLESS("get int 2", 12 == owl_variable_get_int(var));
+  FAIL_UNLESS("set int 1b", -1 == owl_variable_set_int(var, -3));
+  FAIL_UNLESS("get int 2b", 12 == owl_variable_get_int(var));
+  FAIL_UNLESS("set int 3", 0 == owl_variable_set_fromstring(var, "9", 0));
+  FAIL_UNLESS("get int 4", 9 == owl_variable_get_int(var));
+  FAIL_UNLESS("set int 5", -1 == owl_variable_set_fromstring(var, "xxx", 0));
+  FAIL_UNLESS("set int 6", -1 == owl_variable_set_fromstring(var, "", 0));
+  FAIL_UNLESS("get int 7", 9 == owl_variable_get_int(var));
 
   owl_variable_dict_newvar_string(&vd, "stringvar", "", "", "testval");
-  FAIL_UNLESS("get new string var", NULL != (v = owl_variable_get(&vd, "stringvar", OWL_VARIABLE_STRING)));
-  FAIL_UNLESS("get new string val", !strcmp("testval", owl_variable_get_string(&vd, "stringvar")));
-  owl_variable_set_string(&vd, "stringvar", "new val");
-  FAIL_UNLESS("update string val", !strcmp("new val", owl_variable_get_string(&vd, "stringvar")));
+  FAIL_UNLESS("get new string var", NULL != (var = owl_variable_get_var(&vd, "stringvar")));
+  FAIL_UNLESS("get new string var", NULL != (v = owl_variable_get(var)));
+  FAIL_UNLESS("get new string val", !strcmp("testval", owl_variable_get_string(var)));
+  owl_variable_set_string(var, "new val");
+  FAIL_UNLESS("update string val", !strcmp("new val", owl_variable_get_string(var)));
 
   owl_variable_dict_newvar_int(&vd, "intvar", "", "", 47);
-  FAIL_UNLESS("get new int var", NULL != (v = owl_variable_get(&vd, "intvar", OWL_VARIABLE_INT)));
-  FAIL_UNLESS("get new int val", 47 == owl_variable_get_int(&vd, "intvar"));
-  owl_variable_set_int(&vd, "intvar", 17);
-  FAIL_UNLESS("update bool val", 17 == owl_variable_get_int(&vd, "intvar"));
+  FAIL_UNLESS("get new int var", NULL != (var = owl_variable_get_var(&vd, "intvar")));
+  FAIL_UNLESS("get new int var", NULL != (v = owl_variable_get(var)));
+  FAIL_UNLESS("get new int val", 47 == owl_variable_get_int(var));
+  owl_variable_set_int(var, 17);
+  FAIL_UNLESS("update int val", 17 == owl_variable_get_int(var));
 
   owl_variable_dict_newvar_bool(&vd, "boolvar", "", "", 1);
-  FAIL_UNLESS("get new bool var", NULL != (v = owl_variable_get(&vd, "boolvar", OWL_VARIABLE_BOOL)));
-  FAIL_UNLESS("get new bool val", owl_variable_get_bool(&vd, "boolvar"));
-  owl_variable_set_bool_off(&vd, "boolvar");
-  FAIL_UNLESS("update string val", !owl_variable_get_bool(&vd, "boolvar"));
+  FAIL_UNLESS("get new bool var", NULL != (var = owl_variable_get_var(&vd, "boolvar")));
+  FAIL_UNLESS("get new bool var", NULL != (v = owl_variable_get(var)));
+  FAIL_UNLESS("get new bool val", owl_variable_get_bool(var));
+  owl_variable_set_bool_off(var);
+  FAIL_UNLESS("update bool val", !owl_variable_get_bool(var));
+
+  owl_variable_dict_newvar_string(&vd, "nullstringvar", "", "", NULL);
+  FAIL_UNLESS("get new string (NULL) var", NULL != (var = owl_variable_get_var(&vd, "nullstringvar")));
+  FAIL_UNLESS("get string (NULL)", NULL == (value = owl_variable_get_tostring(var)));
+  g_free(value);
+  var = owl_variable_get_var(&vd, "zsigproc");
+  FAIL_UNLESS("get string (NULL) 2", NULL == (value = owl_variable_get_tostring(var)));
+  g_free(value);
 
   owl_variable_dict_cleanup(&vd);
Index: util.c
===================================================================
--- util.c	(revision 3cdd6d22718b22f0f669d34777233912c1688ed6)
+++ util.c	(revision c0c48d14cd5317aaaaffb853fb6e22ab5ca7327f)
@@ -37,63 +37,42 @@
 CALLER_OWN char *owl_util_makepath(const char *in)
 {
-  int i, j, x;
-  char *out, user[MAXPATHLEN];
-  struct passwd *pw;
-
-  out=g_new(char, MAXPATHLEN+1);
-  out[0]='\0';
-  j=strlen(in);
-  x=0;
-  for (i=0; i<j; i++) {
-    if (in[i]=='~') {
-      if ( (i==(j-1)) ||          /* last character */
-	   (in[i+1]=='/') ) {     /* ~/ */
-	/* use my homedir */
-	pw=getpwuid(getuid());
-	if (!pw) {
-	  out[x]=in[i];
-	} else {
-	  out[x]='\0';
-	  strcat(out, pw->pw_dir);
-	  x+=strlen(pw->pw_dir);
-	}
-      } else {
-	/* another user homedir */
-	int a, b;
-	b=0;
-	for (a=i+1; i<j; a++) {
-	  if (in[a]==' ' || in[a]=='/') {
-	    break;
-	  } else {
-	    user[b]=in[a];
-	    i++;
-	    b++;
-	  }
-	}
-	user[b]='\0';
-	pw=getpwnam(user);
-	if (!pw) {
-	  out[x]=in[i];
-	} else {
-	  out[x]='\0';
-	  strcat(out, pw->pw_dir);
-	  x+=strlen(pw->pw_dir);
-	}
-      }
-    } else if (in[i]=='/') {
-      /* check for a double / */
-      if (i<(j-1) && (in[i+1]=='/')) {
-	/* do nothing */
-      } else {
-	out[x]=in[i];
-	x++;
-      }
+  char *out;
+  int i, j;
+  if (in[0] == '~') {
+    /* Attempt tilde-expansion of the first component. Get the
+       tilde-prefix, which goes up to the next slash. */
+    struct passwd *pw;
+    const char *end = strchr(in + 1, '/');
+    if (end == NULL)
+      end = in + strlen(in);
+
+    if (end == in + 1) {
+      /* My home directory. */
+      pw = getpwuid(getuid());
     } else {
-      out[x]=in[i];
-      x++;
-    }
-  }
-  out[x]='\0';
-  return(out);
+      /* Someone else's home directory. */
+      char *user = g_strndup(in + 1, end - (in + 1));
+      pw = getpwnam(user);
+      g_free(user);
+    }
+
+    /* Patch together a new path. Replace the ~ and tilde-prefix with
+       the homedir. */
+    if (pw) {
+      out = g_strconcat(pw->pw_dir, end, NULL);
+    } else {
+      out = g_strdup(in);
+    }
+  } else {
+      out = g_strdup(in);
+  }
+
+  /* And a quick pass to remove duplicate slashes. */
+  for (i = j = 0; out[i] != '\0'; i++) {
+    if (out[i] != '/' || i == 0 || out[i-1] != '/')
+      out[j++] = out[i];
+  }
+  out[j] = '\0';
+  return out;
 }
 
@@ -221,5 +200,5 @@
 /*
  * Appends 'tmpl' to 'buf', replacing any instances of '%q' with arguments from
- * the varargs provided, quoting them to be safe for placing in a barnowl
+ * the varargs provided, quoting them to be safe for placing in a BarnOwl
  * command line.
  */
Index: variable.c
===================================================================
--- variable.c	(revision ce68f235ae86ae86fa4398ae206bda1194d1fcda)
+++ variable.c	(revision a16d7e5b1281bf21e0fe52b6d9946fd58893da28)
@@ -70,8 +70,8 @@
 
   OWLVAR_BOOL( "startuplogin" /* %OwlVarStub */, 1,
-	       "send a login message when owl starts", "" ),
+	       "send a login message when BarnOwl starts", "" ),
 
   OWLVAR_BOOL( "shutdownlogout" /* %OwlVarStub */, 1,
-	       "send a logout message when owl exits", "" ),
+	       "send a logout message when BarnOwl exits", "" ),
 
   OWLVAR_BOOL( "rxping" /* %OwlVarStub */, 0,
@@ -137,5 +137,5 @@
   OWLVAR_BOOL_FULL( "pseudologins" /* %OwlVarStub */, 0,
 		    "Enable zephyr pseudo logins",
-		    "When this is enabled, Owl will periodically check the zephyr\n"
+		    "When this is enabled, BarnOwl will periodically check the zephyr\n"
 		    "location of users in your .anyone file.  If a user is present\n"
 		    "but sent no login message, or a user is not present that sent no\n"
@@ -145,6 +145,6 @@
   OWLVAR_BOOL( "ignorelogins" /* %OwlVarStub */, 0,
 	       "Enable printing of login notifications",
-	       "When this is enabled, Owl will print login and logout notifications\n"
-	       "for AIM, zephyr, or other protocols.  If disabled Owl will not print\n"
+	       "When this is enabled, BarnOwl will print login and logout notifications\n"
+	       "for AIM, zephyr, or other protocols.  If disabled BarnOwl will not print\n"
 	       "login or logout notifications.\n"),
 
@@ -160,5 +160,5 @@
   OWLVAR_BOOL( "loglogins" /* %OwlVarStub */, 0,
 	       "Enable logging of login notifications",
-	       "When this is enabled, Owl will login login and logout notifications\n"
+	       "When this is enabled, BarnOwl will log login and logout notifications\n"
 	       "for AIM, zephyr, or other protocols.  If disabled Owl will not print\n"
 	       "login or logout notifications.\n"),
@@ -201,5 +201,5 @@
   OWLVAR_PATH( "newmsgproc" /* %OwlVarStub:newmsgproc */, NULL,
 	       "name of a program to run when new messages are present",
-	       "The named program will be run when owl receives new\n"
+	       "The named program will be run when BarnOwl receives new\n"
 	       "messages.  It will not be run again until the first\n"
 	       "instance exits"),
@@ -229,5 +229,5 @@
 	         "string to append to the end of the sepbar",
 		 "The sepbar is the bar separating the top and bottom\n"
-		 "of the owl screen.  Any string specified here will\n"
+		 "of the BarnOwl screen.  Any string specified here will\n"
 		 "be displayed on the right of the sepbar\n"),
 
@@ -265,5 +265,5 @@
 
   OWLVAR_STRING( "alert_action" /* %OwlVarStub */, "nop",
-		 "owl command to execute for alert actions",
+		 "BarnOwl command to execute for alert actions",
 		 "" ),
 
@@ -276,5 +276,5 @@
 		 "Styles may be created with the 'style' command.\n"
 		 "Some built-in styles include:\n"
-		 "   default  - the default owl formatting\n"
+		 "   default  - the default BarnOwl formatting\n"
 		 "   oneline  - one line per-message\n"
 		 "   perl     - legacy perl interface\n"
@@ -333,5 +333,5 @@
 	       "cursor moves between messages being displayed.\n"
 	       "The following modes are supported:\n\n"
-	       "   normal      - This is the owl default.  Scrolling happens\n"
+	       "   normal      - This is the BarnOwl default.  Scrolling happens\n"
 	       "                 when it needs to, and an attempt is made to\n"
 	       "                 keep the current message roughly near\n"
@@ -662,7 +662,8 @@
 }
 
-void owl_variable_dict_newvar_string(owl_vardict * vd, const char *name, const char *summ, const char * desc, const char * initval) {
-  owl_variable *old = owl_variable_get_var(vd, name, OWL_VARIABLE_STRING);
-  if(old) {
+void owl_variable_dict_newvar_string(owl_vardict *vd, const char *name, const char *summ, const char *desc, const char *initval)
+{
+  owl_variable *old = owl_variable_get_var(vd, name);
+  if (old && owl_variable_get_type(old) == OWL_VARIABLE_STRING) {
     owl_variable_update(old, summ, desc);
     g_free(old->pval_default);
@@ -671,4 +672,5 @@
     owl_variable * var = owl_variable_newvar(name, summ, desc);
     var->type = OWL_VARIABLE_STRING;
+    var->validsettings = "<string>";
     var->pval_default = g_strdup(initval);
     var->set_fn = owl_variable_string_set_default;
@@ -682,7 +684,8 @@
 }
 
-void owl_variable_dict_newvar_int(owl_vardict * vd, const char *name, const char *summ, const char * desc, int initval) {
-  owl_variable *old = owl_variable_get_var(vd, name, OWL_VARIABLE_INT);
-  if(old) {
+void owl_variable_dict_newvar_int(owl_vardict *vd, const char *name, const char *summ, const char *desc, int initval)
+{
+  owl_variable *old = owl_variable_get_var(vd, name);
+  if (old && owl_variable_get_type(old) == OWL_VARIABLE_INT) {
     owl_variable_update(old, summ, desc);
     old->ival_default = initval;
@@ -690,4 +693,5 @@
     owl_variable * var = owl_variable_newvar(name, summ, desc);
     var->type = OWL_VARIABLE_INT;
+    var->validsettings = "<int>";
     var->ival_default = initval;
     var->validate_fn = owl_variable_int_validate_default;
@@ -703,7 +707,8 @@
 }
 
-void owl_variable_dict_newvar_bool(owl_vardict * vd, const char *name, const char *summ, const char * desc, int initval) {
-  owl_variable *old = owl_variable_get_var(vd, name, OWL_VARIABLE_BOOL);
-  if(old) {
+void owl_variable_dict_newvar_bool(owl_vardict *vd, const char *name, const char *summ, const char *desc, bool initval)
+{
+  owl_variable *old = owl_variable_get_var(vd, name);
+  if (old && owl_variable_get_type(old) == OWL_VARIABLE_BOOL) {
     owl_variable_update(old, summ, desc);
     old->ival_default = initval;
@@ -711,4 +716,5 @@
     owl_variable * var = owl_variable_newvar(name, summ, desc);
     var->type = OWL_VARIABLE_BOOL;
+    var->validsettings = "on,off";
     var->ival_default = initval;
     var->validate_fn = owl_variable_bool_validate_default;
@@ -750,4 +756,9 @@
 
 
+const char *owl_variable_get_name(const owl_variable *v)
+{
+  return v->name;
+}
+
 const char *owl_variable_get_description(const owl_variable *v) {
   return v->description;
@@ -759,9 +770,10 @@
 
 const char *owl_variable_get_validsettings(const owl_variable *v) {
-  if (v->validsettings) {
-    return v->validsettings;
-  } else {
-    return "";
-  }
+  return v->validsettings;
+}
+
+int owl_variable_get_type(const owl_variable *v)
+{
+  return v->type;
 }
 
@@ -769,29 +781,21 @@
 
 /* returns 0 on success, prints a status msg if msg is true */
-int owl_variable_set_fromstring(owl_vardict *d, const char *name, const char *value, int msg, int requirebool) {
-  owl_variable *v;
+int owl_variable_set_fromstring(owl_variable *v, const char *value, int msg) {
   char *tostring;
-  if (!name) return(-1);
-  v = owl_dict_find_element(d, name);
-  if (v == NULL) {
-    if (msg) owl_function_error("Unknown variable %s", name);
+  if (!v->set_fromstring_fn) {
+    if (msg) owl_function_error("Variable %s is read-only", owl_variable_get_name(v));
+    return -1;   
+  }
+  if (0 != v->set_fromstring_fn(v, value)) {
+    if (msg) owl_function_error("Unable to set %s (must be %s)", owl_variable_get_name(v),
+                                owl_variable_get_validsettings(v));
     return -1;
   }
-  if (!v->set_fromstring_fn) {
-    if (msg) owl_function_error("Variable %s is read-only", name);
-    return -1;   
-  }
-  if (requirebool && v->type!=OWL_VARIABLE_BOOL) {
-    if (msg) owl_function_error("Variable %s is not a boolean", name);
-    return -1;   
-  }
-  if (0 != v->set_fromstring_fn(v, value)) {
-    if (msg) owl_function_error("Unable to set %s (must be %s)", name, 
-				  owl_variable_get_validsettings(v));
-    return -1;
-  }
-  if (msg && v->get_tostring_fn) {
+  if (msg) {
     tostring = v->get_tostring_fn(v, v->get_fn(v));
-    owl_function_makemsg("%s = '%s'", name, tostring);
+    if (tostring)
+      owl_function_makemsg("%s = '%s'", owl_variable_get_name(v), tostring);
+    else
+      owl_function_makemsg("%s = <null>", owl_variable_get_name(v));
     g_free(tostring);
   }    
@@ -799,45 +803,35 @@
 }
  
-int owl_variable_set_string(owl_vardict *d, const char *name, const char *newval) {
-  owl_variable *v;
-  if (!name) return(-1);
-  v = owl_dict_find_element(d, name);
-  if (v == NULL || !v->set_fn) return(-1);
-  if (v->type!=OWL_VARIABLE_STRING) return(-1);
+int owl_variable_set_string(owl_variable *v, const char *newval)
+{
+  if (v->type != OWL_VARIABLE_STRING) return -1;
   return v->set_fn(v, newval);
 }
  
-int owl_variable_set_int(owl_vardict *d, const char *name, int newval) {
-  owl_variable *v;
-  if (!name) return(-1);
-  v = owl_dict_find_element(d, name);
-  if (v == NULL || !v->set_fn) return(-1);
-  if (v->type!=OWL_VARIABLE_INT && v->type!=OWL_VARIABLE_BOOL) return(-1);
+int owl_variable_set_int(owl_variable *v, int newval)
+{
+  if (v->type != OWL_VARIABLE_INT && v->type != OWL_VARIABLE_BOOL) return -1;
   return v->set_fn(v, &newval);
 }
  
-int owl_variable_set_bool_on(owl_vardict *d, const char *name) {
-  return owl_variable_set_int(d,name,1);
-}
-
-int owl_variable_set_bool_off(owl_vardict *d, const char *name) {
-  return owl_variable_set_int(d,name,0);
-}
-
-CALLER_OWN char *owl_variable_get_tostring(const owl_vardict *d, const char *name)
-{
-  owl_variable *v;
-  if (!name) return NULL;
-  v = owl_dict_find_element(d, name);
-  if (v == NULL || !v->get_tostring_fn) return NULL;
+int owl_variable_set_bool_on(owl_variable *v)
+{
+  if (v->type != OWL_VARIABLE_BOOL) return -1;
+  return owl_variable_set_int(v, true);
+}
+
+int owl_variable_set_bool_off(owl_variable *v)
+{
+  if (v->type != OWL_VARIABLE_BOOL) return -1;
+  return owl_variable_set_int(v, false);
+}
+
+CALLER_OWN char *owl_variable_get_tostring(const owl_variable *v)
+{
   return v->get_tostring_fn(v, v->get_fn(v));
 }
 
-CALLER_OWN char *owl_variable_get_default_tostring(const owl_vardict *d, const char *name)
-{
-  owl_variable *v;
-  if (!name) return NULL;
-  v = owl_dict_find_element(d, name);
-  if (v == NULL || !v->get_tostring_fn) return NULL;
+CALLER_OWN char *owl_variable_get_default_tostring(const owl_variable *v)
+{
   if (v->type == OWL_VARIABLE_INT || v->type == OWL_VARIABLE_BOOL) {
     return v->get_tostring_fn(v, &(v->ival_default));
@@ -847,96 +841,92 @@
 }
 
-owl_variable *owl_variable_get_var(const owl_vardict *d, const char *name, int require_type) {
-  owl_variable *v;
-  if (!name) return(NULL);
-  v = owl_dict_find_element(d, name);
-  if (v == NULL || !v->get_fn || v->type != require_type) return(NULL);
-  return v;
+owl_variable *owl_variable_get_var(const owl_vardict *d, const char *name)
+{
+  return owl_dict_find_element(d, name);
 }
 
 /* returns a reference */
-const void *owl_variable_get(const owl_vardict *d, const char *name, int require_type) {
-  owl_variable *v = owl_variable_get_var(d, name, require_type);
-  if(v == NULL) return NULL;
+const void *owl_variable_get(const owl_variable *v)
+{
   return v->get_fn(v);
 }
 
+const char *owl_variable_get_string(const owl_variable *v)
+{
+  if (owl_variable_get_type(v) != OWL_VARIABLE_STRING) {
+    owl_function_error("Variable '%s' is not a string.", owl_variable_get_name(v));
+    return NULL;
+  }
+  return owl_variable_get(v);
+}
+
 /* returns a reference */
-const char *owl_variable_get_string(const owl_vardict *d, const char *name) {
-  return owl_variable_get(d,name, OWL_VARIABLE_STRING);
-}
-
-/* returns a reference */
-const void *owl_variable_get_other(const owl_vardict *d, const char *name) {
-  return owl_variable_get(d,name, OWL_VARIABLE_OTHER);
-}
-
-int owl_variable_get_int(const owl_vardict *d, const char *name) {
-  const int *pi;
-  pi = owl_variable_get(d,name,OWL_VARIABLE_INT);
-  if (!pi) return(-1);
-  return(*pi);
-}
-
-int owl_variable_get_bool(const owl_vardict *d, const char *name) {
-  const int *pi;
-  pi = owl_variable_get(d,name,OWL_VARIABLE_BOOL);
-  if (!pi) return(-1);
-  return(*pi);
-}
-
-void owl_variable_describe(const owl_vardict *d, const char *name, owl_fmtext *fm) {
+const void *owl_variable_get_other(const owl_variable *v)
+{
+  if (owl_variable_get_type(v) != OWL_VARIABLE_OTHER) {
+    owl_function_error("Variable '%s' is not type other.", owl_variable_get_name(v));
+    return NULL;
+  }
+  return owl_variable_get(v);
+}
+
+int owl_variable_get_int(const owl_variable *v)
+{
+  if (owl_variable_get_type(v) != OWL_VARIABLE_INT) {
+    owl_function_error("Variable '%s' is an int.", owl_variable_get_name(v));
+    return -1;
+  }
+  const int *pi = owl_variable_get(v);
+  if (!pi) return -1;
+  return *pi;
+}
+
+int owl_variable_get_bool(const owl_variable *v)
+{
+  if (owl_variable_get_type(v) != OWL_VARIABLE_BOOL) {
+    owl_function_error("Variable '%s' is a boolean.", owl_variable_get_name(v));
+    return -1;
+  }
+  const int *pi = owl_variable_get(v);
+  if (!pi) return -1;
+  return *pi;
+}
+
+void owl_variable_describe(const owl_variable *v, owl_fmtext *fm)
+{
+  char *tostring = owl_variable_get_default_tostring(v);
   char *default_buf;
-  owl_variable *v;
-
-  if (!name
-      || (v = owl_dict_find_element(d, name)) == NULL 
-      || !v->get_fn) {
-    owl_fmtext_appendf_normal(fm, "     No such variable '%s'\n", name);
-    return;
-  }
-  if (v->type == OWL_VARIABLE_INT || v->type == OWL_VARIABLE_BOOL) {
-    default_buf = v->get_tostring_fn(v, &(v->ival_default));
-  } else {
-    default_buf = v->get_tostring_fn(v, v->pval_default);
-  }
-  owl_fmtext_appendf_normal(fm, OWL_TABSTR "%-20s - %s (default: '%s')\n",
-			    v->name,
-			    owl_variable_get_summary(v), default_buf);
+
+  if (tostring)
+    default_buf = g_strdup_printf("'%s'", tostring);
+  else
+    default_buf = g_strdup("<null>");
+  owl_fmtext_appendf_normal(fm, OWL_TABSTR "%-20s - %s (default: %s)\n",
+                            owl_variable_get_name(v),
+                            owl_variable_get_summary(v), default_buf);
   g_free(default_buf);
-}
-
-void owl_variable_get_help(const owl_vardict *d, const char *name, owl_fmtext *fm) {
+  g_free(tostring);
+}
+
+void owl_variable_get_help(const owl_variable *v, owl_fmtext *fm) {
   char *tostring;
-  owl_variable *v;
-
-  if (!name
-      || (v = owl_dict_find_element(d, name)) == NULL 
-      || !v->get_fn) {
-    owl_fmtext_append_normal(fm, "No such variable...\n");
-    return;
-  }
 
   owl_fmtext_append_bold(fm, "OWL VARIABLE\n\n");
   owl_fmtext_append_normal(fm, OWL_TABSTR);
-  owl_fmtext_append_normal(fm, name);
+  owl_fmtext_append_normal(fm, owl_variable_get_name(v));
   owl_fmtext_append_normal(fm, " - ");
-  owl_fmtext_append_normal(fm, v->summary);
+  owl_fmtext_append_normal(fm, owl_variable_get_summary(v));
   owl_fmtext_append_normal(fm, "\n\n");
 
   owl_fmtext_append_normal(fm, "Current:        ");
-  tostring = owl_variable_get_tostring(d, name);
-  owl_fmtext_append_normal(fm, tostring);
+  tostring = owl_variable_get_tostring(v);
+  owl_fmtext_append_normal(fm, (tostring ? tostring : "<null>"));
   g_free(tostring);
   owl_fmtext_append_normal(fm, "\n\n");
 
 
-  if (v->type == OWL_VARIABLE_INT || v->type == OWL_VARIABLE_BOOL) {
-    tostring = v->get_tostring_fn(v, &(v->ival_default));
-  } else {
-    tostring = v->get_tostring_fn(v, v->pval_default);
-  }
+  tostring = owl_variable_get_default_tostring(v);
   owl_fmtext_append_normal(fm, "Default:        ");
-  owl_fmtext_append_normal(fm, tostring);
+  owl_fmtext_append_normal(fm, (tostring ? tostring : "<null>"));
   owl_fmtext_append_normal(fm, "\n\n");
 
@@ -998,5 +988,5 @@
 {
   if (val == NULL) {
-    return g_strdup("<null>");
+    return NULL;
   } else if (*(const int*)val == 0) {
     return g_strdup("off");
@@ -1034,5 +1024,5 @@
 {
   if (val == NULL) {
-    return g_strdup("<null>");
+    return NULL;
   } else {
     return g_strdup_printf("%d", *(const int*)val);
@@ -1078,5 +1068,5 @@
 
   if (val == NULL) {
-    return g_strdup("<null>");
+    return NULL;
   }
   enums = g_strsplit_set(v->validsettings, ",", 0);
@@ -1114,9 +1104,5 @@
 CALLER_OWN char *owl_variable_string_get_tostring_default(const owl_variable *v, const void *val)
 {
-  if (val == NULL) {
-    return g_strdup("<null>");
-  } else {
-    return g_strdup((const char*)val);
-  }
-}
-
+  return g_strdup((const char*)val);
+}
+
