init_color returns -1 and errno is 0

Help
2011-02-01
2013-04-25
  • John P. Hartmann

    But the colour is changed.  Is this a known bug or a feature?

    In the case in hand, the parameters are (COLOR_BLUE, n, n, 1000), n any multiple of 100. 

     
  • William McBrine

    William McBrine - 2011-02-01

    Which platform?

     
  • John P. Hartmann

    My apologies.

    2.6.34.7-61.fc13.i686 #1 SMP Tue Oct 19 04:42:47 UTC 2010 i686 i686 i386 GNU/Linux

     
  • William McBrine

    William McBrine - 2011-02-01

    OK, I don't see how the circumstances you describe can be true. The X11 version of PDC_init_color() (the platform-specific code that actually does the color change) returns OK unconditionally, and init_color() itself would only return an ERR before it even got around to calling that, so having the color changed AND getting an ERR back appears impossible.

    At least this is the case with PDCurses 3.4. I assume you're using that version?

     
  • John P. Hartmann

    Might the explanation be that I did the call before start_color()?  Yes, 3.4.  And I'm not that dumb every day.

     
  • John P. Hartmann

    Oh, and also before Xinitscr().  That's probably closer to the explanation.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks