Render quake bsp

Hi!

how to render the quake bsp files ?
Is it like this

int renderBSP()
{
if(bsp leaf)
return 0;

if(in front of plane)
renderBSP(back node)
renderFaces(this Node)
renderBSP(front node)
else
renderBSP(front node)
renderFaces(this Node)
renderBSP(back node)
}

and how do I use the vislist ?and how do I check if the camera is in front of the plane ?