[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new grotty format
From: |
Werner LEMBERG |
Subject: |
Re: new grotty format |
Date: |
Mon, 11 Feb 2002 03:47:58 +0100 (CET) |
> Werner, could you please tell what escape sequences will grotty
> emit, or point me to the file in the Groff distro where I can find
> this info?
>From src/devices/grotty/tty.cc:
#ifndef IS_EBCDIC_HOST
#define CSI "\033["
#else
#define CSI "\047["
#endif
// SGR handling (ISO 6429)
#define SGR_BOLD CSI "1m"
#define SGR_NO_BOLD CSI "22m"
#define SGR_ITALIC CSI "3m"
#define SGR_NO_ITALIC CSI "23m"
#define SGR_UNDERLINE CSI "4m"
#define SGR_NO_UNDERLINE CSI "24m"
#define SGR_DEFAULT_COLOR CSI "39m"
#define SGR_BACK_DEFAULT_COLOR CSI "49m"
and this:
void tty_printer::put_color(unsigned char color_index, int back)
{
if (color_index == DEFAULT_COLOR_IDX)
color_index = 9;
putstring(CSI);
if (back)
putchar('4');
else
putchar('3');
putchar(color_index + '0');
putchar('m');
}
color_index is in the range 0..7.
Werner
Re: new grotty format, Karl Berry, 2002/02/10
- Re: new grotty format, Eli Zaretskii, 2002/02/10
- Re: new grotty format, Eli Zaretskii, 2002/02/10
- Re: new grotty format,
Werner LEMBERG <=
- Re: new grotty format, Eli Zaretskii, 2002/02/11
- Re: new grotty format, Werner LEMBERG, 2002/02/12
- Re: new grotty format, Eli Zaretskii, 2002/02/12
- Re: new grotty format, Werner LEMBERG, 2002/02/13
- Re: new grotty format, Eli Zaretskii, 2002/02/13
- Re: new grotty format, Werner LEMBERG, 2002/02/13
Re: new grotty format, Eli Zaretskii, 2002/02/24