Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CBL_SPLIT_FILENAME Details (↑ File-name Routines)
◄Key► ◄Summary► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
Description:
This routine can be made to fold to upper case by setting the least
significant bit (bit 0) of split-join-flag1. If this bit is not set,
the case will be preserved.
This routine can accept either null-terminated or space-terminated
strings. Setting the second least significant bit (bit 1) of
split-join-flag1 results in the routine expecting null-terminated
strings. If this bit is not set, space-terminated strings are
expected.
If there are two or more dots in the file-name (not counting
dots in the device or path-name), the extension returned consists
of the characters between the last dot and the end of the file-name.
The basename contains everything up to, but not including, the
last dot.
To make a distinction between file-names with no extension and
file-names with spaces extension (that is, basenames whose last
character is a dot), if the extension is spaces extension-length
is 1 and extension-offset points to the last dot.
See also ◄Introduction to File-name Routines►
◄CBL_JOIN_FILENAME►
Parameters on Entry:
param-length Length of split-join-params in bytes,
including the two bytes for param-length. The
normal value for param-length is 24.
split-join-flag1 bit 1 - if set, specifies that the file-name
is null-terminated, otherwise it is
space-terminated.
bit 0 - if set, specifies that the new strings
will be folded to upper case, otherwise
the original case will be preserved.
split-buf-length Length of split-buffer.
split-buffer The string to split.
Parameters on Exit:
split-join-flag2 bit 1 - set if there is a wildcard in the
device
bit 0 - set if there is a wildcard in basename
or extension
device-offset Start of device-name in split-buffer, from
one.
device-length Length of device-name; zero if there is none.
This includes any following colon.
basename-offset Start of basename in split-buffer, from one.
basename-length Length of basename; zero if there is none.
This does not include the following dot.
extension-offset Start of extension in split-buffer, from one.
extension-length Length of extension; zero if there is none.
This does not include the preceding dot.
total-length Total number of characters in the string.
first-path-component Number of characters up to and including the
-length first \ or / or colon; if split-buffer
contains none of these, this field =
device-length.
split-buffer Unchanged unless bit 1 of split-join-flag1
is set, when it is folded to upper case.
status-code Return status:
0 = success
4 = illegal file-name
-♦-