Switched order of "main" parameters to match C specification.