version 1.8, 2018/10/18 07:57:57 |
version 1.9, 2019/05/13 20:10:23 |
|
|
if (attr == 0) |
if (attr == 0) |
return ("none"); |
return ("none"); |
|
|
len = xsnprintf(buf, sizeof buf, "%s%s%s%s%s%s%s%s%s%s%s%s", |
len = xsnprintf(buf, sizeof buf, "%s%s%s%s%s%s%s%s%s%s%s%s%s", |
(attr & GRID_ATTR_BRIGHT) ? "bright," : "", |
(attr & GRID_ATTR_BRIGHT) ? "bright," : "", |
(attr & GRID_ATTR_DIM) ? "dim," : "", |
(attr & GRID_ATTR_DIM) ? "dim," : "", |
(attr & GRID_ATTR_UNDERSCORE) ? "underscore," : "", |
(attr & GRID_ATTR_UNDERSCORE) ? "underscore," : "", |
|
|
(attr & GRID_ATTR_UNDERSCORE_2) ? "double-underscore," : "", |
(attr & GRID_ATTR_UNDERSCORE_2) ? "double-underscore," : "", |
(attr & GRID_ATTR_UNDERSCORE_3) ? "curly-underscore," : "", |
(attr & GRID_ATTR_UNDERSCORE_3) ? "curly-underscore," : "", |
(attr & GRID_ATTR_UNDERSCORE_4) ? "dotted-underscore," : "", |
(attr & GRID_ATTR_UNDERSCORE_4) ? "dotted-underscore," : "", |
(attr & GRID_ATTR_UNDERSCORE_5) ? "dashed-underscore," : ""); |
(attr & GRID_ATTR_UNDERSCORE_5) ? "dashed-underscore," : "", |
|
(attr & GRID_ATTR_OVERLINE) ? "overline," : ""); |
if (len > 0) |
if (len > 0) |
buf[len - 1] = '\0'; |
buf[len - 1] = '\0'; |
|
|
|
|
{ "double-underscore", GRID_ATTR_UNDERSCORE_2 }, |
{ "double-underscore", GRID_ATTR_UNDERSCORE_2 }, |
{ "curly-underscore", GRID_ATTR_UNDERSCORE_3 }, |
{ "curly-underscore", GRID_ATTR_UNDERSCORE_3 }, |
{ "dotted-underscore", GRID_ATTR_UNDERSCORE_4 }, |
{ "dotted-underscore", GRID_ATTR_UNDERSCORE_4 }, |
{ "dashed-underscore", GRID_ATTR_UNDERSCORE_5 } |
{ "dashed-underscore", GRID_ATTR_UNDERSCORE_5 }, |
|
{ "overline", GRID_ATTR_OVERLINE } |
}; |
}; |
|
|
if (*str == '\0' || strcspn(str, delimiters) == 0) |
if (*str == '\0' || strcspn(str, delimiters) == 0) |