iPXE
|
ANSI colours. More...
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <ipxe/ansiesc.h>
#include <ipxe/ansicol.h>
#include <config/colour.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
__weak void | ansicol_set (unsigned int colour, unsigned int which) |
Set ANSI colour (when no colour definition support is present) More... | |
static void | ansicol_foreground (unsigned int colour) |
Set ANSI foreground colour. More... | |
static void | ansicol_background (unsigned int colour) |
Set ANSI background colour. More... | |
void | ansicol_set_pair (unsigned int cpair) |
Set ANSI foreground and background colour. More... | |
int | ansicol_define_pair (unsigned int cpair, unsigned int foreground, unsigned int background) |
Define ANSI colour pair. More... | |
Variables | |
static struct ansicol_pair | ansicol_pairs [] |
ANSI colour pair definitions. More... | |
ANSI colours.
Definition in file ansicol.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
__weak void ansicol_set | ( | unsigned int | colour, |
unsigned int | which | ||
) |
Set ANSI colour (when no colour definition support is present)
colour | Colour index |
which | Foreground/background selector |
Definition at line 57 of file ansicol.c.
Referenced by ansicol_background(), and ansicol_foreground().
|
static |
Set ANSI foreground colour.
colour | Colour index |
Definition at line 71 of file ansicol.c.
References ansicol_set(), and colour.
Referenced by ansicol_set_pair().
|
static |
Set ANSI background colour.
colour | Colour index |
Definition at line 80 of file ansicol.c.
References ansicol_set(), and colour.
Referenced by ansicol_set_pair().
void ansicol_set_pair | ( | unsigned int | cpair | ) |
Set ANSI foreground and background colour.
cpair | Colour pair index |
Definition at line 89 of file ansicol.c.
References ansicol_background(), ansicol_foreground(), ansicol_pairs, assert(), ansicol_pair::background, and ansicol_pair::foreground.
Referenced by ansiscr_attrs(), ansiscr_reset(), colour_exec(), console_exec(), and cpair_exec().
int ansicol_define_pair | ( | unsigned int | cpair, |
unsigned int | foreground, | ||
unsigned int | background | ||
) |
Define ANSI colour pair.
cpair | Colour pair index |
foreground | Foreground colour index |
background | Background colour index |
rc | Return status code |
Definition at line 110 of file ansicol.c.
References ansicol_pairs, ansicol_pair::background, DBGC, EINVAL, and ansicol_pair::foreground.
Referenced by cpair_exec().
|
static |
ANSI colour pair definitions.
Definition at line 40 of file ansicol.c.
Referenced by ansicol_define_pair(), and ansicol_set_pair().