[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 107487] Please add the xterm-256 colour support.
From:       Lars Doelle <lars.doelle () on-line ! de>
Date:       2006-06-07 0:03:32
Message-ID: 20060607000332.20503.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=107487         




------- Additional Comments From lars.doelle on-line de  2006-06-07 02:03 -------
Hmm, a quick follow up...

On Tuesday 06 June 2006 23:20, lars.doelle on-line de wrote:

> The code really spells
> > 48 - set default background color
> > 5 - set blink
> > <PS> - for <Color> in most cases an unknown name.


Here i am wrong - 48 is not defined, at least not for VT100 and its successors.
Neverthenless it does not invalidate my argumentation. See e.g.

http://vt100.net/docs/vt100-ug/chapter3.html#S3.3.2

which is very clear about the association. Thus 48 would be ignored, 5 would set
blink and any defined value for PS would legal be interpreted as such by virtually
any terminal which emulates a VT100 based set of ESC codes. The extension is
incompatible.

But - ECMA-48:

http://www.ecma-international.org/publications/files/ecma-st/ECMA-048.pdf

See §8.3.117 (SGR), page 62
---
38 (reserved for future standardization; intended for setting character foreground \
colour as specified in  ISO 8613-6 [CCITT Recommendation T.416])
48 (reserved for future standardization; intended for setting character background \
colour as specified in  ISO 8613-6 [CCITT Recommendation T.416])
---

Hmm, ISO/IEC 8613-6:1994 - this means $$$

http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=22943
Add to shopping basket  Size     Price
  ISO/IEC 8613-6:1994 PDF version (en)  15052 KB     CHF 164,00

The codes may or may not be defined as used in xterm, moving the whole thing in safer \
waters, especially with respect to codes 38,48.

Anyway still issues. How is this supposed to work? Keep in mind that the code is \
associative. Citing ECMA-48:

---
5.4.3 Types of parameters
      In a control sequence with parameters, each parameter sub-string corresponds to \
                one parameter and
      represents the value of that parameter. The number of parameters is either \
                fixed or variable, depending
      on the control function. If the number of parameters is variable, neither the \
                maximum number of values
      nor the order in which the corresponding actions are performed are defined by \
                this Standard.
      A parameter may be purely numeric or it may be selective, i.e. denoting one of \
a numbered list of actions  the control function can perform.
      ...
---

Each parameter substring represents one parameter.

---
5.4.2 Parameter string format
      A parameter string which does not start with a bit combination in the range \
03/12 to 03/15 shall have the  following format:
      a) A parameter string consists of one or more parameter sub-strings, each of \
which represents a number  in decimal notation.
      b) Each parameter sub-string consists of one or more bit combinations from \
                03/00 to 03/10; the bit
          combinations from 03/00 to 03/09 represent the digits ZERO to NINE; bit \
                combination 03/10 may be
          used as a separator in a parameter sub-string, for example, to separate the \
fractional part of a decimal  number from the integer part of that number.
      c) Parameter sub-strings are separated by one bit combination 03/11.
      ...
----

So a parameter substring is 0-9 and the colon. The semicolon separates \
sub-parameters. Thus 48:5:<Color> would be one sub-parameter, and 48;5;<Color> many \
independent, each having an independent meaning in case of a selective parameter.

---
8.3.117 SGR - SELECT GRAPHIC RENDITION
        Notation: (Ps...)
        Representation: CSI Ps... 06/13
        Parameter default value: Ps = 0
---

Above, Ps... means variable number of selective parameters.

If they really do 48;5;<Color>, this is inconsistent, as it breaks the parameter \
concept cited above, at least in my reading. So how to interpret e.g.?

ESC[48;5m ESC[39m
ESC[48m ESC[5m ESC[39m
ESC[39;48;49m


-lars


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic