Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocessor use of USE_COLOR (config.h, debug.h) is inconsistent #203

Open
GoogleCodeExporter opened this issue Jan 29, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

config.h has:

     #define USE_COLOR  1       /* Use terminal colors  */

which (in my eyes) implies that changing 1 to 0 would negate this option.

However, debug.h checks it by means of

     #ifdef USE_COLORS

thus, the value of USE_COLOR is irrelevant. This is inconsistent, and may lead 
to confusion, and thus to debug sessions.

Suggestion: Define USE_COLOR without specifying a value.  That makes
the actual configuration option clearer to anyone who wants to get rid of 
colours. 

I'm not sure it's the best way to do configurations in general, though, but it 
seems the smallest change to make things reasonably consistent, as I find no 
#if's in the code, only #ifdef's and #ifndef's.


Original issue reported on code.google.com by [email protected] on 4 Jan 2014 at 12:48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant