imported from http://cregistry.googlecode.com/svn/