Command used for the job:
egrep -rl ' $' --include *.c --include *.h --include *.s --include *.inc --include *.txt * | xargs sed -i 's/\s\+$//g'
Credits to Grant Murphy from Stack Overflow.
Inserting an entry without updating the indecies will now cause a
compiler error. This will make it easier for modders to remember to
update the constants.