function mask = lnkshow(p,a)
%

[numsegs,dummy] = size(p);
[m,n] = size(a);
mask = zeros(m,n);

for s1 = 1:numsegs
  s1row = p(s1,10); s1col = p(s1,9);
  for i1 = 16:21
    s2 = p(s1,i1);
    if s1 ~= s2
      s2row = p(s2,10); s2col = p(s2,9);
      v = lvals(s1row,s1col,s2row,s2col);
      [lenv,dummy] = size(v);
      for v1 = 1:lenv
        if v(v1,1)<1 | v(v1,1)>m | v(v1,2)<1 | v(v1,2)>n
           v1 = v1;
        end;
        mask(min(m,v(v1,1)),min(n,v(v1,2))) = 255;
      end;
    end;
  end;
end;
