On 03/20/13 14:26, Greg Ercolano wrote:
>Perhaps an easy hack is to modify this line in Fl_Decl_Type::open():
>     message = c_check(c&&c[0]=='#' ? c+1 : c);
>..to instead read something like:
>     if ( !strncmp(c,"namespace",9) &&
>          !strcmp(c,"};") ) message = c_check(c&&c[0]=='#' ? c+1 : c);
> 

        Hmm, this should actually work; replace the "message = .." line with:

    if (strncmp(c,"namespace",9)==0 || strncmp(c,"};",2)==0) { message = 0; }
    else { message = c_check(c&&c[0]=='#' ? c+1 : c); }

        I actually tested it this time; my original post wasn't checked,
        and wasn't right.

        This mod allows you to include a comment after the }; so you can
        do something like:

namespace foo {

        ..and:

};    // end namespace foo

        ..without getting errors.

        The above change is still a hack, it would take some work probably
        to 'do it right', though I'm not sure what 'right' should be.
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to