summaryrefslogtreecommitdiff
path: root/nasmlib/path.c
Commit message (Collapse)AuthorAgeFilesLines
* path: nasm_catfile -- Fix incorrect return of filename onlynight199uk2018-10-191-6/+6
| | | | | | | | | nasm_catfile returns an incorrect (already incremented) pointer. https://bugzilla.nasm.us/show_bug.cgi?id=3392205 Signed-off-by: night199uk <night199uk@hermitcrabslab.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasmlib/path.c: a few more detection macrosH. Peter Anvin2017-04-251-10/+25
| | | | | | Add a few more operating system detection macros, including BeOS. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmlib: include macro for Mach system and fix on filename extractionChang S. Bae2017-04-251-2/+2
| | | | | | | | | | Add __MACH__ as a Unix-like system (e.g. MacOS X defines __MACH__ but no variant of __unix__.) Fix a reversed test in first_filename_char(). Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmlib: fix MacOS classic catsep definitionH. Peter Anvin2017-04-231-2/+6
| | | | | | | | Correct the definition for MacOS classic "catsep" in nasm_catfile(). Also put in a stern comment that this function doesn't handle filenames with path components. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmlib: add function to splice pathnamesH. Peter Anvin2017-04-231-0/+36
| | | | | | | | | | | | | | | | 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>
* nasmlib: add path-splitting functionsH. Peter Anvin2017-04-231-0/+131
Some debugging formats may need to be able to split paths into directory name and filename, at least. This is kind of iffy, at least across platforms, but that isn't really expected to be an issue in practice... we hope. Signed-off-by: H. Peter Anvin <hpa@zytor.com>