Detecting the intersection of two convex polygons

Here is the algorithm and some C source code to determine if two convex polygons intersect.  Also includes a function to determine if two line segments are intersecting. (Free for any use)