Take a look at Quake1 engine source code for the TraceHull code.
It can be found at
http://www.idsoftware.com, at the Technolody Download page.
Look at the SV_Move() function and what it called.
PS, I think the HL routine is identical as the Quake1 routine.