]> git.sur5r.net Git - i3/i3/commit
validate JSON before loading 2942/head
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 15:41:05 +0000 (17:41 +0200)
commitc45c002bad141add5b72a7e37ae930cf14f30f18
treeeaa594263158adbd37831aeecf3671b2cd4521c5
parent72c972a36c187584106c8792b8930d2aba468448
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