Dokumentation zu: terminals(WL)

HR Image


	This is about fancy things you can do with escape sequences.
	There are certain escape sequences which can be used on
	different terminal types, like making text appear reverse,
	underlined, bold and blinking or in different colors, if you
	have an ANSI color terminal (Xterms do it, as do ANSI terminal
	programs for personal computers).

	A player can set his terminal to different modes, according
	to the terminal he has. The terminal setting can be requested
	by using the function query_tty() in the player object
	(this_player() normally).

	The current supported terminals are:
	dumb:   No capabilities whatsoever, dont use escapes
	vt100:  Understands a few codes like reverse, bold, blinking.
	ansi:   Besides vt100 also understands color sequence codes.

	The codes which are also defined in <ansi.h> are:

	/* ANSI control sequences, to be include */
	#define ANSI_BOLD "<ESC>[1m"
	#define ANSI_UNDERL "<ESC>[4m"
	#define ANSI_BLINK "<ESC>[5m"
	#define ANSI_INVERS "<ESC>[6m"
	#define ANSI_NORMAL "<ESC>[0m"

	#define ANSI_BLACK "<ESC>[30m"
	#define ANSI_RED "<ESC>[31m"
	#define ANSI_GREEN "<ESC>[32m"
	#define ANSI_YELLOW "<ESC>[33m"
	#define ANSI_BLUE "<ESC>[34m"
	#define ANSI_PURPLE "<ESC>[35m"
	#define ANSI_CYAN "<ESC>[36m"
	#define ANSI_WHITE "<ESC>[37m"

	<ESC> means Escape (01b hex) and is the 1st character for all
	escape sequences.


Start » Magierhandbuch » Docu » Konzepte » Terminals Letzte Generierung: 25.04.2021, 01:58
Email an:
Valid HTML 4.01!