What is the purpose of #undef statements in speller.c?

Can someone please explain why do the following lines exist in speller.c I do know what #undef does but why is it used here? I think this is an incorrect use of #undef because calculate and getr...