]> git.sur5r.net Git - i3/i3/commit
validate JSON before loading
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 13 Sep 2017 15:14:51 +0000 (17:14 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 13 Sep 2017 16:46:17 +0000 (18:46 +0200)
commit51da57d5e6965194b454b63d8f08d9c7e3b747d6
treead47f8a4606d886b8e9ec1de817e769ce72035ac
parentf120a9d929fd9ad64dd26813967e7b0a03b1390b
validate JSON before loading

This commit also introduces slurp() which reads a file in its entirety. Using
this function instead of doing IO in the functions in load_layout.c again and
again makes the code cleaner (fixing at least two memory leaks) and avoids
re-reading the same file 3 times.

related to #2755
include/load_layout.h
include/util.h
src/commands.c
src/load_layout.c
src/tree.c
src/util.c