Public domain GIS algorithms

I am wondering if any public domain GIS algorithms exist (area of a
polygon, polygon representing intersection of two or more polygons, is
point in polygon, etc.) C language would be preferrable.

Many thanx in advance.

-Tim