Detecting the intersection of a circle and a line segment

Here is the algorithm and C source code to determine if a circle and a line segment intersect. (Free for any use)