Refactor keymap.c
authorLaslo Hunhold <dev@frign.de>
Wed, 23 May 2018 13:29:37 +0000 (15:29 +0200)
committerAaron Marcher <me@drkhsh.at>
Wed, 23 May 2018 17:56:16 +0000 (19:56 +0200)
commitf17f39d0a2e2898177dbcf5daf67284956005b9b
tree5d848ef76c4ef0dd652d4dc0b63ceaa8c19bfd1d
parent13d77cd268bade5e9ee9c07d9b94ca7c733cbe3d
Refactor keymap.c

 - Get rid of camel-casing
 - Don't use all-caps for variable names
 - use LEN()-macro
 - use strncmp() rather than strstr() for prefix-checking
 - clean up the tokenizer-loop and don't use copies
 - make the loop more readable by separating different breaking
   conditions
 - stricter error-checking and cleanup
 - store the layout directly with bprintf rather than having
   a separate buffer
components/keymap.c