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

Re: Path length in GEM file selector



What you wrote:
> 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?
> We should also install a cookie for the file name size:
> 
> _FTL <max length of file name without \0>>

Are these system-wide cookies to be maintained by the fileselector, an XFS,
MiNT, Robin Hood & Friar Tuck?

It's a pity the fileselector didn't malloc() enough space for you, and you'd
just pass it a pointer instead of an array (or a pointer to an array or a
pointer to a malloc'd chunk).  Then, like other calls that do this sort of
thing, you'd have to copy the path out of the space the fileselector
malloc'd (unless you didn't mind losing it the next time someone did an
fsel_input()...).  That would seem to make much more sense than having to
look at cookies and whatnot (that's how the DTA works for Fsfirst() and
Fsnext() calls as well as several MiNTlib calls that I can't remember
right now becaus I'm at work and not at home with my manual...).

-- 
----------============_   /\ ========================================----------
Chris Herborth        \`o.0'                   herborth@53iss6.Waterloo.NCR.COM
Information Products  =(___)=
NCR ISD Waterloo         U