[console] Add centralised concept of colours and colour pairs

Add a centralised concept of colours and colour pairs (using the
default colour pairs as configured via config/colour.h).  A colour
pair consists of a pair of colour indices.

Add the ability to redefine both a colour pair and an individual
colour index, with minimal overhead if this feature is not required
(e.g. because the relevant shell commands are not present in the
build).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-12-07 20:53:20 +00:00
parent 4c51f9602d
commit 7025f5c648
5 changed files with 361 additions and 0 deletions

View File

@@ -27,6 +27,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define COLOR_URL_FG COLOR_CYAN
#define COLOR_URL_BG COLOR_BLUE
#define COLOR_PXE_FG COLOR_BLACK
#define COLOR_PXE_BG COLOR_WHITE
#include <config/local/colour.h>
#endif /* CONFIG_COLOUR_H */