Lines Matching refs:new_attr
1140 attributes_t old_attr, attributes_t new_attr)
1146 if ((new_attr.color == COLOR_DEFAULT && old_attr.color != COLOR_DEFAULT)
1147 || (new_attr.bgcolor == COLOR_DEFAULT && old_attr.bgcolor != COLOR_DEFAULT))
1178 && new_attr.posture == POSTURE_NORMAL
1186 && new_attr.underline == UNDERLINE_OFF
1194 && new_attr.weight == WEIGHT_NORMAL)
1196 && new_attr.posture == POSTURE_NORMAL
1199 && new_attr.underline == UNDERLINE_OFF
1214 if (new_attr.color != old_attr.color
1215 || (cleared_attributes && new_attr.color != COLOR_DEFAULT))
1218 assert (new_attr.color != COLOR_DEFAULT);
1222 assert (new_attr.color >= 0 && new_attr.color < 8);
1225 color_bgr (new_attr.color)),
1228 tputs (tparm (stream->set_foreground, new_attr.color),
1234 assert (new_attr.color >= 0 && new_attr.color < 8);
1238 bytes[2] = '3'; bytes[3] = '0' + new_attr.color;
1245 assert (new_attr.color >= 0 && new_attr.color < 16);
1249 if (new_attr.color < 8)
1251 bytes[2] = '3'; bytes[3] = '0' + new_attr.color;
1255 bytes[2] = '9'; bytes[3] = '0' + (new_attr.color - 8);
1263 assert (new_attr.color >= 0 && new_attr.color < 88);
1271 if (new_attr.color >= 10)
1272 *p++ = '0' + (new_attr.color / 10);
1273 *p++ = '0' + (new_attr.color % 10);
1280 assert (new_attr.color >= 0 && new_attr.color < 256);
1288 if (new_attr.color >= 100)
1289 *p++ = '0' + (new_attr.color / 100);
1290 if (new_attr.color >= 10)
1291 *p++ = '0' + ((new_attr.color % 100) / 10);
1292 *p++ = '0' + (new_attr.color % 10);
1302 if (new_attr.bgcolor != old_attr.bgcolor
1303 || (cleared_attributes && new_attr.bgcolor != COLOR_DEFAULT))
1306 assert (new_attr.bgcolor != COLOR_DEFAULT);
1310 assert (new_attr.bgcolor >= 0 && new_attr.bgcolor < 8);
1313 color_bgr (new_attr.bgcolor)),
1316 tputs (tparm (stream->set_background, new_attr.bgcolor),
1322 assert (new_attr.bgcolor >= 0 && new_attr.bgcolor < 8);
1326 bytes[2] = '4'; bytes[3] = '0' + new_attr.bgcolor;
1333 assert (new_attr.bgcolor >= 0 && new_attr.bgcolor < 16);
1337 if (new_attr.bgcolor < 8)
1339 bytes[2] = '4'; bytes[3] = '0' + new_attr.bgcolor;
1347 bytes[4] = '0' + (new_attr.bgcolor - 8); bytes[5] = 'm';
1354 assert (new_attr.bgcolor >= 0 && new_attr.bgcolor < 88);
1362 if (new_attr.bgcolor >= 10)
1363 *p++ = '0' + (new_attr.bgcolor / 10);
1364 *p++ = '0' + (new_attr.bgcolor % 10);
1371 assert (new_attr.bgcolor >= 0 && new_attr.bgcolor < 256);
1379 if (new_attr.bgcolor >= 100)
1380 *p++ = '0' + (new_attr.bgcolor / 100);
1381 if (new_attr.bgcolor >= 10)
1382 *p++ = '0' + ((new_attr.bgcolor % 100) / 10);
1383 *p++ = '0' + (new_attr.bgcolor % 10);
1394 if (new_attr.weight != old_attr.weight
1395 || (cleared_attributes && new_attr.weight != WEIGHT_DEFAULT))
1398 assert (new_attr.weight != WEIGHT_DEFAULT);
1400 assert (new_attr.weight == WEIGHT_BOLD);
1403 if (new_attr.posture != old_attr.posture
1404 || (cleared_attributes && new_attr.posture != POSTURE_DEFAULT))
1407 assert (new_attr.posture != POSTURE_DEFAULT);
1409 assert (new_attr.posture == POSTURE_ITALIC);
1412 if (new_attr.underline != old_attr.underline
1413 || (cleared_attributes && new_attr.underline != UNDERLINE_DEFAULT))
1416 assert (new_attr.underline != UNDERLINE_DEFAULT);
1418 assert (new_attr.underline == UNDERLINE_ON);