[fpc-devel]cursory acquaintance with MacOS RTL

Tomas Hajny XHajT03 at mbox.vol.cz
Fri Jul 2 12:50:18 CEST 2004


Olle Raab said:
> 04-06-29 09.38, skrev Pavel V. Ozerski följande:
>
>> Hello all,
>> 10 years ago I programmed a little on ThinkPascal therefore could
>> point to some inconveniences that seem to be reproduced in FPC.
>>
>> As is known, common file names are not enough in MacOS to comfortable
>> file access via shell, they need also two hiden extensions, type and
>> creator. Think pascal didn't allow (at least, I got the flavour
>> working without manuals) set these extensions by using standard file
>> types, reset/rewrite etc and gave e.g. 'TEXT' or 'DATA' for ftype
>> automatically. I see, in current MacOS RTL. But I think, no reason is
>> here to use only direct API calls. If two writeable typized constants,
>> Creator:OSType=$522A6368;fileType:= $54455854, will be added into
>> INTERFACE section, the programmer will be easy change them later.
>
> If it is possible, I will try to add this.

If you decide to do it, let's try to find some solution that could be
compatible to other platforms as well (and possibly just ignored on others
where it doesn't make any sense). This kind of information can be provided
for OS/2 as well (although not strictly necessary), but the values are
just text, not hardcoded numbers. Do you have any idea how to create
something which could be supported under both (and possibly other) targets
at the same time, without a need for using different values for different
systems? Is there any way to convert the above listed hexadecimal numbers
to their text descriptions (and back) on MacOS?

In addition, there should be probably a procedure created for changing the
values instead of giving direct access to those variables (the current
values should be internally stored in threadvars probably).

Tomas







More information about the fpc-devel mailing list