nasmlib: add function to splice pathnames
commit11a07a7319676b55b9668fdfbf159580388d0318
authorH. Peter Anvin <hpa@zytor.com>
Mon, 24 Apr 2017 06:01:00 +0000 (23 23:01 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 24 Apr 2017 06:01:00 +0000 (23 23:01 -0700)
tree39ea5ada420ba741c1462ced4c53a7662546f27b
parent0979957e19930407a3b202600aa99ec1fe0bd740
nasmlib: add function to splice pathnames

Add a function to splice a pathname consisting of a directory and a
filename.  It is worth noting that this function is limited to that
particular use case: in particular, it does NOT currently support
concatenating a filename which itself contains directory components to
a non-null directory.

Combining directory names is extremely system-dependent and probably
needs more than just parameterized code in many cases, for example,
on VMS combining "foo:[bar]" with "[baz]quux" should produce
"foo:[bar.baz]quux" whereas combining "foo:[bar]" and baz:quux" is an
outright error.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
include/nasmlib.h
nasmlib/path.c