A globally and quadratically convergent algorithm for general nonlinear programming problems