| 3366 | } |
| 3367 | |
| 3368 | staticfn char * |
| 3369 | hlattr2attrname(int attrib, char *buf, size_t bufsz) |
| 3370 | { |
| 3371 | if (attrib && buf) { |
| 3372 | char attbuf[BUFSZ]; |
| 3373 | int first = 0; |
| 3374 | size_t k; |
| 3375 | |
| 3376 | attbuf[0] = '\0'; |
| 3377 | if (attrib == HL_NONE) { |
| 3378 | Strcpy(buf, "normal"); |
| 3379 | return buf; |
| 3380 | } |
| 3381 | |
| 3382 | if (attrib & HL_BOLD) |
| 3383 | Strcat(attbuf, first++ ? "+bold" : "bold"); |
| 3384 | if (attrib & HL_DIM) |
| 3385 | Strcat(attbuf, first++ ? "+dim" : "dim"); |
| 3386 | if (attrib & HL_ITALIC) |
| 3387 | Strcat(attbuf, first++ ? "+italic" : "italic"); |
| 3388 | if (attrib & HL_ULINE) |
| 3389 | Strcat(attbuf, first++ ? "+underline" : "underline"); |
| 3390 | if (attrib & HL_BLINK) |
| 3391 | Strcat(attbuf, first++ ? "+blink" : "blink"); |
| 3392 | if (attrib & HL_INVERSE) |
| 3393 | Strcat(attbuf, first++ ? "+inverse" : "inverse"); |
| 3394 | |
| 3395 | k = strlen(attbuf); |
| 3396 | if (k < (size_t)(bufsz - 1)) |
| 3397 | Strcpy(buf, attbuf); |
| 3398 | return buf; |
| 3399 | } |
| 3400 | return (char *) 0; |
| 3401 | } |
| 3402 | |
| 3403 | struct _status_hilite_line_str { |
| 3404 | int id; |
no outgoing calls
no test coverage detected