mirror of
https://github.com/netwide-assembler/nasm.git
synced 2026-01-26 16:09:24 +00:00
Move filename_set_extension() into path.c, so it has access to the filesystem-specific character constants. This prevents something like: nasm-code.d/foobar ... from getting truncated to ... nasm-code.bin ... instead of producing ... nasm-code.d/foobar.bin Make the extension character (normally '.') configurable; this MIGHT be usable on RISCOS at some point, although it is not entirely clear that trying to make sense of RISCOS paths actually is meaningful, because RISCOS compiler chains seem to do all kinds of path translation magic trying to behave like other operating systems... it might simply be more trouble than it is worth, especially for a non-x86 platform. As a side bonus, this removes the only use of strrchrnul(), so that function can be dropped. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>