| 1 | #ifndef lint |
| 2 | static char *sccsid = "@(#)wwlabel.c 1.1 83/07/18"; |
| 3 | #endif |
| 4 | |
| 5 | #include "ww.h" |
| 6 | |
| 7 | wwlabel(w, l, mode) |
| 8 | register struct ww *w; |
| 9 | register char *l; |
| 10 | { |
| 11 | register i; |
| 12 | char ulc, top, urc, left, right, llc, bottom, lrc; |
| 13 | char framed; |
| 14 | |
| 15 | if (!(framed = w->ww_inrow < w->ww_nrow)) { |
| 16 | Wgetframe(&ulc, &top, &urc, &left, &right, &llc, &bottom, &lrc); |
| 17 | w->ww_inrow--; |
| 18 | w->ww_irow++; |
| 19 | } |
| 20 | Wauxcursor(w->ww_win, 0, 1); |
| 21 | for (i = w->ww_ncol - 2; i > 0 && *l; i--, l++) |
| 22 | Waputc(*l, mode, w->ww_win); |
| 23 | if (!framed) |
| 24 | for (; i > 0; i--) |
| 25 | Waputc(top, 0, w->ww_win); |
| 26 | } |