Wait, angband no longer has a giant case statement for spellcasting. It does call by name (m9re ore less) using generated code from a .h file. You must be running off an older codebase.

Cthangband was originally based on the Zangband 2.1.0 codebase. Both it and Angband have drifted quite far apart over the last two decades (although the big switch statement is something that is left over from the Zangband code, not something new).