Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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 a...@algonet.se on 4 Jan 2014 at 12:48

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions