API Change: DOS Packets for ACTION_EXAMINE_OBJECT/FH and fib_FileName/fib_Comment
The DOS Packet ACTION_EXAMINE_OBJECT fills in a FileInfoBlock
structure, and two fields are.. well.. special.
Both fib_Comment and fib_FileName are documented as ASCIIZ in the
Commodore headers, BUT on m68k they are expected to be BCPL strings
*when the handler fills them in*, and yet by the time Dos/Examine()
returns, they have been transformed into ASCIIZ strings.
So, the question is, what should be do for AROS?
Previously, all handlers had to use the AROS_BSTR* macros
on those fields, and on AROS_FAST_BPTR architectures, no BSTR ->
ASCIIZ translation needsedto be done.
However, porting 3rd party handlers has made more difficult, since they
expect these fields be BCPL strings, and do things like:
fib->fib_Comment[0] = strlen(comment);
CopyMem(comment, &fib->fib_Comment[1], fib->fib_Comment[0])
After discussion on the AROS mailling list, it was decided that
to easy portability, the Dos/Examine???() routines now always
expect BCPL style strings in fib_Comment and fib_FileName in
the reply from the ACTION_EXAMINE_OBJECT/FH commands, and
reformat the fields as ASCIIZ before returning to caller of Dos/Examine??()
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@40072 fb15a70f-31f2-0310-bbcc-cdcc74a49acc
15 files changed: