[XForms] Libraries: small C++ bug

jason jac4 at andrew.cmu.edu
Wed Sep 3 23:39:03 EDT 2003

> | I did a little more checking, and it looks like our code was defining
> | "on" itself, and since this was in an include that came before forms.h
> | this created problems. (We probably should not be using "on" - maybe
> | you might want to think about "forms_on" to be more robust. The
> | earlier forms header files did not have the "on" defined.)
> What stops you from polluting the global namespace with a macro/define
> called forms_on? (and using forms_on in xforms give away the wrong
> meaning of the parameter... and removing it from the function
> declaration makes it impossible to see what this int is)
> It is your code that is in error, not xforms.

Yeah I'm going to have to agree with him on that one. There is no "on" in
any of the standard C++ headers, afaik. Additionally, having a macro
defined as "on" is not specific to C++... things could be messed up the
same way if everything was in C.

More information about the Xforms mailing list