basename(3) and dirname(3) can split an absolute path into its respective components.
Short of using snprintf(3), is there a natural posix-compliant library call that does the inverse – takes a directory and a filename and concatenates them?
Manually concatenation works fine for me, but can get a little tedious at times.
as far I know there is no such function in POSIX. However in the GNU libc manual there is a nice helper function:
usage: