"MacArthur, Ian (Selex ES, UK)" wrote:
> 
> The patch looks OK for the most part, though I have a few small
> comments; note also I have neither a AIX nor BSD system to actually
> test on, so this is just inspections really!

Hi Ian,

thanks for looking at it.

I have tested the new code block for AIX on version 5.1 (which lacks
the prototype for 'mntctl()' in the header file).
I have tested the code block for NetBSD on versions 2.0 and 5.1 to
check that the version detection works as intended (and old versions
that don't support 'getvfsstat()' behave as before).

> - The code doesn't seem to quite match the supposed fltk coding style, see:
> http://www.fltk.org/cmp.php#CS_GENERAL_CODING_STYLE
> for more guidelines.
> (I confess this is often an issue for me, the fltk style is not my default 
> style...)

Yes, the braces are not correctly placed. But this is wrong in many
other places of the current code inside 'Fl_File_Browser.cxx'. To make
it look consistent, should I repair this in the rest of the file too?

> - Is there a possibility that the AIX branch can call "free((void *) list);"
> even if list has not been malloc'd? Would it be bad if it did?

I have verified this before and initialized 'list' to NULL. 'free(NULL)'
executes as NOP. This behaviour is required by POSIX and is documented
in the IBM manual page too:
http://pubs.opengroup.org/onlinepubs/7908799/xsh/free.html
http://www.ualberta.ca/dept/chemeng/AIX-43/share/man/info/C/a_doc_lib/libs/basetrf1/malloc.htm
My intention was to make it obvious that the memory is released in any
case.

> - This is a nit-pick of mine, but I prefer:
> 
>     if (strcmp("/", filename) != 0)

No problem, I will change this.


Regards,

Micha
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to