Quoting Randy Kramer <[EMAIL PROTECTED]>:
> Just for the sake of learning, I found the following near the bottom of
> textDisp.c--at some point it must be converted to an 8-bit code--can you
> tell
> me where (or how) that happens. (I'm after the how, but I'm hoping if you
> tell me where I can read the code and figure out the how.)
>
> /* The format of the class string s is:
> low[-high]{,low[-high]}:color{;low-high{,low[-high]}:color}
> eg
> 32-255:#f0f0f0;1-31,127:red;128-159:orange;9-13:#e5e5e5
> where low and high represent a character range between ordinal
> ASCII values. Using strtol() allows automatic octal, dec and hex
> reading of low and high. The example format sets backgrounds as follows:
> char 1 - 8 colored red (control characters)
> char 9 - 13 colored #e5e5e5 (isspace() control characters)
> char 14 - 31 colored red (control characters)
> char 32 - 126 colored #f0f0f0
> char 127 colored red (delete character)
> char 128 - 159 colored orange ("shifted" control characters)
> char 160 - 255 colored #f0f0f0
> Notice that some of the later ranges overwrite the class values defined
> for earlier ones (eg the first clause, 32-255:#f0f0f0 sets the DEL
> character background color to #f0f0f0; it is then set to red by the
> clause 1-31,127:red). */
That's for determining the backloghting color. The values are the character
values themselves. If you have an "a" (ASICII 65), you look up the color in
the map for that number by finding it in the backlight color table: here the
fourth, #f0f0f0. Its backlight value is then 4 (since 0 is for "no
backlighting").
Tony
--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop