-/*
- * Copyright (c) 2012-2014, Bastien Dejean
+/* Copyright (c) 2012-2014, Bastien Dejean
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those
* of the authors and should not be interpreted as representing official policies,
* either expressed or implied, of the FreeBSD Project.
snprintf(csq->desktop_desc, sizeof(csq->desktop_desc), "%s", value);
} else if (streq("window", key)) {
snprintf(csq->node_desc, sizeof(csq->node_desc), "%s", value);
+ } else if (streq("split_dir", key)) {
+ snprintf(csq->split_dir, sizeof(csq->split_dir), "%s", value);
} else if (parse_bool(value, &v)) {
if (streq("floating", key))
csq->floating = v;
SETCSQ(sticky)
SETCSQ(private)
SETCSQ(center)
- SETCSQ(lower)
SETCSQ(follow)
SETCSQ(manage)
SETCSQ(focus)
}
}
-void list_rules(char *pattern, char *rsp)
+void list_rules(char *pattern, FILE *rsp)
{
- char line[MAXLEN];
for (rule_t *r = rule_head; r != NULL; r = r->next) {
if (pattern != NULL && !streq(pattern, r->cause))
continue;
- snprintf(line, sizeof(line), "%s => %s\n", r->cause, r->effect);
- strncat(rsp, line, REMLEN(rsp));
+ fprintf(rsp, "%s => %s\n", r->cause, r->effect);
}
}