83b8d0f split main function

Authored and Committed by hongqing 12 years ago
    split main function