LCOV - code coverage report
Current view: top level - omega-rpg-0.90-pa9 - clrgen.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 28 33 84.8 %
Date: 2017-09-18 20:02:26 Functions: 1 1 100.0 %
Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Do not edit this file.  It was automatically generated by running:
       3                 :            :  *   ./genclr clrgen.c clrgen.h
       4                 :            :  */
       5                 :            : 
       6                 :            : #include <curses.h>
       7                 :            : #include <stdio.h>
       8                 :            : #include <stdlib.h>
       9                 :            : #include "clrgen.h"
      10                 :          1 : void clrgen_init (void)
      11                 :            : {
      12         [ -  + ]:          1 :     if (!has_colors()) {
      13                 :          0 :       fprintf(stderr,"Omega currently requires ncurses or op-curses color support.\n");
      14                 :          0 :       return;
      15                 :            :     } else
      16         [ -  + ]:          1 :     if (25 > COLOR_PAIRS - 1) {
      17                 :          0 :         endwin();
      18                 :          0 :         fprintf (stderr,"Too few available color pairs (found %d, need 25)!\n", COLOR_PAIRS);
      19                 :          0 :         exit (1);
      20                 :            :     }
      21                 :          1 :     init_pair (1, COLOR_BLACK, COLOR_BLACK);
      22                 :          1 :     init_pair (2, COLOR_BLACK, COLOR_GREEN);
      23                 :          1 :     init_pair (3, COLOR_BLACK, COLOR_RED);
      24                 :          1 :     init_pair (4, COLOR_BLACK, COLOR_WHITE);
      25                 :          1 :     init_pair (5, COLOR_BLACK, COLOR_YELLOW);
      26                 :          1 :     init_pair (6, COLOR_BLUE, COLOR_BLACK);
      27                 :          1 :     init_pair (7, COLOR_BLUE, COLOR_WHITE);
      28                 :          1 :     init_pair (8, COLOR_CYAN, COLOR_BLACK);
      29                 :          1 :     init_pair (9, COLOR_GREEN, COLOR_BLACK);
      30                 :          1 :     init_pair (10, COLOR_GREEN, COLOR_BLUE);
      31                 :          1 :     init_pair (11, COLOR_GREEN, COLOR_RED);
      32                 :          1 :     init_pair (12, COLOR_GREEN, COLOR_YELLOW);
      33                 :          1 :     init_pair (13, COLOR_MAGENTA, COLOR_BLACK);
      34                 :          1 :     init_pair (14, COLOR_MAGENTA, COLOR_WHITE);
      35                 :          1 :     init_pair (15, COLOR_RED, COLOR_BLACK);
      36                 :          1 :     init_pair (16, COLOR_RED, COLOR_WHITE);
      37                 :          1 :     init_pair (17, COLOR_WHITE, COLOR_BLACK);
      38                 :          1 :     init_pair (18, COLOR_WHITE, COLOR_BLUE);
      39                 :          1 :     init_pair (19, COLOR_WHITE, COLOR_RED);
      40                 :          1 :     init_pair (20, COLOR_WHITE, COLOR_YELLOW);
      41                 :          1 :     init_pair (21, COLOR_YELLOW, COLOR_BLACK);
      42                 :          1 :     init_pair (22, COLOR_YELLOW, COLOR_BLUE);
      43                 :          1 :     init_pair (23, COLOR_YELLOW, COLOR_RED);
      44                 :          1 :     init_pair (24, COLOR_YELLOW, COLOR_WHITE);
      45                 :          1 :     init_pair (25, COLOR_YELLOW, COLOR_YELLOW);
      46                 :            : }

Generated by: LCOV version 1.11