Code to get the base filename of a path is duplicated at least four times in Shapelib: DBFOpen, DBFCreate, SHPOpen, and SHPCreate. Clean that up with a single function (which could be useful for Shapelib users as well, to be able to report a canonical "base name" for shapefiles they're working with).
Code to get the base filename of a path is duplicated at least four times in Shapelib: DBFOpen, DBFCreate, SHPOpen, and SHPCreate. Clean that up with a single function (which could be useful for Shapelib users as well, to be able to report a canonical "base name" for shapefiles they're working with).