Use enums instead of raw octal values.

Patch by 罗勇刚(Yonggang Luo).