- for (i = 0; i < slk->labcnt; i++) {
- if (slk->dirty || slk->ent[i].dirty) {
- if (slk->ent[i].visible) {
- if (num_labels > 0 && SLK_STDFMT(fmt))
- {
- if (i < num_labels) {
- TPUTS_TRACE("plab_norm");
- putp(tparm(plab_norm, i+1, slk->ent[i].form_text));
- }
- }
- else
- {
- wmove(slk->win,SLK_LINES(fmt)-1,slk->ent[i].x);
- if (SP && SP->_slk)
- wattrset(slk->win,SP->_slk->attr);
- waddnstr(slk->win,slk->ent[i].form_text,
- MAX_SKEY_LEN(fmt));
- /* if we simulate SLK's, it's looking much more
- natural to use the current ATTRIBUTE also
- for the label window */
- wattrset(slk->win,stdscr->_attrs);
- }
- }
- slk->ent[i].dirty = FALSE;
+ for (i = 0; i < slk->labcnt; i++) {
+ if (slk->dirty || slk->ent[i].dirty) {
+ if (slk->ent[i].visible) {
+ if (num_labels > 0 && SLK_STDFMT(fmt)) {
+ if (i < num_labels) {
+ TPUTS_TRACE("plab_norm");
+ putp(TPARM_2(plab_norm, i + 1, slk->ent[i].form_text));
+ }
+ } else {
+ wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x);
+ if (SP && SP->_slk) {
+ wattrset(slk->win, AttrOf(SP->_slk->attr));
+ }
+ waddstr(slk->win, slk->ent[i].form_text);
+ /* if we simulate SLK's, it's looking much more
+ natural to use the current ATTRIBUTE also
+ for the label window */
+ wattrset(slk->win, WINDOW_ATTRS(stdscr));