In buildtoc, inline path2modname() into its only caller.