MacArthur, Ian (SELEX GALILEO, UK) wrote:

> 
>> FL_PATH_MAX, in filename.H, is defined to be 256. Any
>> particular reason for
>> 256? Was it an arbitrary choice or is there some background
>> information
>> that dictated 256?
> 
> I don't know. I suspect it's just "long enough", but still small enough
> to be shorter than the real PATH_MAX on most (all?) systems...?
> 
> I wonder if there's a reason not to have autoconf fill in a value, or
> find something sensible from the system headers...?

Thanks.

I'm doing some file path manipulation and want to do some of the work with a
buffer on the stack. I figured that since I already use the fl_filename_()
routines, I would use FL_PATH_MAX as the size of my buffer. The only case I
can see my code exceeding the buffer (255+1) is in the very unlikely case
where it is acting on a heavily, heavily nested file. Not really an issue
for me, I was just curious. :)

As for setting based on the OS, that would seem like a better cross-platform
solution to me. 

-- 
Alvin
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to