terom@4: #ifndef SHARED_UTIL_H terom@4: #define SHARED_UTIL_H terom@4: terom@4: #include terom@4: terom@4: /** terom@4: * Replace the file extension in the given path buffer with the given extension, which should be of the form ".foo" terom@4: */ terom@4: int chfext (char *path, size_t len, const char *newext); terom@4: terom@4: /** terom@4: * Copy filesystem path with new file extension terom@4: */ terom@4: int path_with_fext (const char *path, char *buf, size_t len, const char *newext); terom@4: terom@4: terom@4: #endif