[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path length in GEM file selector



>Quite nice but how does the file selector know the length of the
>space the program saved for the path??

>Uli's idea with the cookie is really good. What about a cookie

>_PTL <max length of path without the \0 at the end like strlen()>

>Eric what do you think about this? Any comments or suggestions?

I don't think a cookie is the right way to pass information from
a program to the operating system, since the cookie jar is global
(and hence shared by ALL programs!). We already have a system call
(Dpathconf()) which a program can use to ask the OS how much
space may be needed for paths on a particular drive. For passing
information the other way, there are 3 reasonable options:

(1) A new interface for the file selector, which includes a max.
path length.

(2) A system call to inform the OS that we can handle paths up
to length N; the file selector could then use this information.

(3) The file selector could assume that MiNT domain programs
(or perhaps "super-MiNT" domain programs) automatically will
reserve sufficient space, by using Dpathconf() as appropriate.

Option (3) is the most transparent, obviously.

Regards,
Eric