codeblocks: fix eval on non-linux, minor refactoring