Error codes & spelling

Non pointer function return int valur which represent error or nonerror result.
Spelling correction.