+namespace {
+ Session::Property_handler const _default_session_props[] =
+ { { "l", true, &Session::set_label_prop },
+ { "label", true, &Session::set_label_prop },
+ { "col", true, &Session::set_color_prop },
+ { 0, 0, 0 }
+ };
+
+ static bool handle_option(Session *s, Session::Property_handler const *p, cxx::String const &a)
+ {
+ for (; p && p->tag; ++p)
+ {
+ cxx::String::Index v = a.starts_with(p->tag);
+ if (v && (!p->value_property || a[v] == '='))
+ {
+ p->handler(s, p, a.substr(v + 1));
+ return true;
+ }
+ }
+ return false;
+ }
+}