forked from enlightenment/terminology
fix indenting
This commit is contained in:
parent
9ca44463f6
commit
4df9246db0
|
@ -388,7 +388,7 @@ colors_term_init(Evas_Object *textgrid, Evas_Object *bg, Config *config)
|
||||||
char buf[32];
|
char buf[32];
|
||||||
Color *color;
|
Color *color;
|
||||||
|
|
||||||
for (c = 0; c < 4 * 12; c++)
|
for (c = 0; c < (4 * 12); c++)
|
||||||
{
|
{
|
||||||
n = c + (24 * (c / 24));
|
n = c + (24 * (c / 24));
|
||||||
color = &colors[c / 24][(c % 24) / 12][c % 12];
|
color = &colors[c / 24][(c % 24) / 12][c % 12];
|
||||||
|
@ -466,26 +466,27 @@ colors_standard_get(int set, int col, unsigned char *r, unsigned char *g, unsign
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if pos >= 256, it's in the 256 colors set */
|
/* if pos >= 256, it's in the 256 colors set */
|
||||||
unsigned int color_get(unsigned int pos)
|
unsigned int
|
||||||
|
color_get(unsigned int pos)
|
||||||
{
|
{
|
||||||
Color *c;
|
Color *c;
|
||||||
|
|
||||||
if (pos >= 256)
|
if (pos >= 256)
|
||||||
{
|
{
|
||||||
pos -= 256;
|
pos -= 256;
|
||||||
if (pos >= sizeof(colors256)/sizeof(Color))
|
if (pos >= (sizeof(colors256) / sizeof(Color)))
|
||||||
{
|
{
|
||||||
ERR("AAAAAA");
|
ERR("AAAAAA");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
c = &colors256[pos];
|
c = &colors256[pos];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (pos >= sizeof(colors)/sizeof(Color))
|
if (pos >= (sizeof(colors) / sizeof(Color)))
|
||||||
{
|
{
|
||||||
ERR("AAAAAA");
|
ERR("AAAAAA");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
c = ((Color *)colors) + pos;
|
c = ((Color *)colors) + pos;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,24 +92,24 @@ _draw_cell(const Termpty *ty, unsigned int *pixel, const Termcell *cell)
|
||||||
}
|
}
|
||||||
if ((cell->att.fgintense) && (!fgext)) fg += 48;
|
if ((cell->att.fgintense) && (!fgext)) fg += 48;
|
||||||
if ((cell->att.bgintense) && (!bgext)) bg += 48;
|
if ((cell->att.bgintense) && (!bgext)) bg += 48;
|
||||||
if (cell->att.inverse ^ inv)
|
// if (cell->att.inverse ^ inv)
|
||||||
{
|
// {
|
||||||
int t;
|
// int t;
|
||||||
t = fgext; fgext = bgext; bgext = t;
|
// t = fgext; fgext = bgext; bgext = t;
|
||||||
t = fg; fg = bg; bg = t;
|
// t = fg; fg = bg; bg = t;
|
||||||
}
|
// }
|
||||||
if ((cell->att.bold) && (!fgext)) fg += 12;
|
if ((cell->att.bold) && (!fgext)) fg += 12;
|
||||||
if ((cell->att.faint) && (!fgext)) fg += 24;
|
if ((cell->att.faint) && (!fgext)) fg += 24;
|
||||||
|
|
||||||
if (bgext) *pixel = color_get(bg + 256);
|
if (bgext) {*pixel = color_get(bg + 256);printf("a-%c:%08x\n", cell->codepoint, *pixel);}
|
||||||
else if (bg && ((bg % 12) != COL_INVIS)) *pixel = color_get(bg);
|
else if (bg && ((bg % 12) != COL_INVIS)) {*pixel = color_get(bg);printf("b-%c:%08x\n", cell->codepoint, *pixel);}
|
||||||
else if (!isspace(cell->codepoint))
|
else if (!isspace(cell->codepoint))
|
||||||
{
|
{
|
||||||
if (fgext) *pixel = color_get(fg + 256);
|
if (fgext) {*pixel = color_get(fg + 256);printf("c-%c:%08x\n", cell->codepoint, *pixel);}
|
||||||
else *pixel = color_get(fg);
|
else {*pixel = color_get(fg);printf("d-%c:%08x\n", cell->codepoint, *pixel);}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*pixel = 0;
|
{*pixel = 0;printf("z\n");}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue