--- /dev/null
+#!/bin/bash
+set -eu
+cd "$(dirname "$0")"
+cd ..
+
+function check() {
+ declare -l base="${1}"
+ find "$base" -type f -print0 | sort -z | xargs -0 sed -i \
+ `# strip trailing spaces` \
+ -e 's/[[:space:]]*$//' \
+ `# line feed at EOF for #include to work properly` \
+ -e '$a\'
+}
+
+check lib
+check common
+check client
+check server
+check menu