Thread: Please help me test curses colors.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179

    Please help me test curses colors.

    If you're not running windows will you please run this and then reply to this thread with:
    • A screen shot
    • What unix OS you're running


    Code:
    #include <curses.h>
    
    int main () {
      int x, y, c;
    
      initscr ();
      start_color ();
      c = 0;
      for (x = 0; x < 16; x++) for (y = 0; y < 16; y++) {
        init_pair (++c, x, y);
        attrset (COLOR_PAIR(c));
        mvaddch(y+2, x+5, (x > y) ? ACS_BOARD : ACS_BULLET);
      }
      refresh ();
      getch();
      endwin ();
    }
    I am running windows, so it looks like:
    Last edited by guesst; 04-14-2008 at 09:01 PM.
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Integer Emulation
    By Elysia in forum C++ Programming
    Replies: 31
    Last Post: 03-18-2008, 01:03 PM
  2. undefined reference
    By 3saul in forum Linux Programming
    Replies: 12
    Last Post: 08-23-2006, 05:28 PM
  3. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  4. MSVC Template Constructor/Assignment Errors
    By LuckY in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2005, 02:57 PM
  5. Fonts and colors in curses
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 02-26-2002, 06:22 AM