1: #ifndef lint
   2: static char sccsid[] = "@(#)wwlabel.c	3.13 4/24/85";
   3: #endif
   4: 
   5: /*
   6:  * Copyright (c) 1983 Regents of the University of California,
   7:  * All rights reserved.  Redistribution permitted subject to
   8:  * the terms of the Berkeley Software License Agreement.
   9:  */
  10: 
  11: #include "ww.h"
  12: #include "char.h"
  13: 
  14: /*
  15:  * Label window w on f,
  16:  * at 1 line above w and 'where' columns from it's left edge.
  17:  * Gross, but it works.
  18:  */
  19: wwlabel(w, f, where, l, mode)
  20: struct ww *w;
  21: struct ww *f;
  22: char *l;
  23: {
  24:     int row;
  25:     register j;
  26:     int jj;
  27:     register char *win;
  28:     register union ww_char *buf;
  29:     register union ww_char *ns;
  30:     register char *fmap;
  31:     register char *smap;
  32:     char touched;
  33:     char *p;
  34: 
  35:     if (f->ww_fmap == 0)
  36:         return;
  37: 
  38:     row = w->ww_w.t - 1;
  39:     if (row < f->ww_i.t || row >= f->ww_i.b)
  40:         return;
  41:     win = f->ww_win[row];
  42:     buf = f->ww_buf[row];
  43:     fmap = f->ww_fmap[row];
  44:     ns = wwns[row];
  45:     smap = wwsmap[row];
  46:     touched = wwtouched[row];
  47:     mode <<= WWC_MSHIFT;
  48: 
  49:     jj = MIN(w->ww_i.r, f->ww_i.r);
  50:     j = w->ww_i.l + where;
  51:     while (j < jj && *l)
  52:         for (p = unctrl(*l++); j < jj && *p; j++, p++) {
  53:             /* can't label if not already framed */
  54:             if (win[j] & WWM_GLS)
  55:                 continue;
  56:             if (smap[j] != f->ww_index)
  57:                 buf[j].c_w = mode | *p;
  58:             else {
  59:                 ns[j].c_w = (buf[j].c_w = mode | *p)
  60:                         ^ win[j] << WWC_MSHIFT;
  61:                 touched |= WWU_TOUCHED;
  62:             }
  63:             fmap[j] |= WWF_LABEL;
  64:         }
  65:     wwtouched[row] = touched;
  66: }

Defined functions

wwlabel defined in line 19; used 2 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 809
Valid CSS Valid XHTML 1.0 Strict