ww_availmodes and stuff
[unix-history] / usr / src / usr.bin / window / wwdump.c
CommitLineData
3f60a359 1#ifndef lint
e908bfac 2static char *sccsid = "@(#)wwdump.c 3.3 83/08/15";
3f60a359
EW
3#endif
4
5#include "ww.h"
e908bfac 6#include "tt.h"
3f60a359
EW
7
8static char cmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
9
10wwdumpcov(w)
11register struct ww *w;
12{
13 register i, j;
14
15 (*tt.tt_setinsert)(0);
16 (*tt.tt_setmodes)(0);
17 (*tt.tt_clear)();
18 for (i = 0; i < w->ww_w.nr; i++) {
19 (*tt.tt_move)(w->ww_w.t + i, w->ww_w.l);
20 for (j = 0; j < w->ww_w.nc; j++)
21 (*tt.tt_putc)(cmap[w->ww_cov[i][j]]);
22 }
23}
24
25wwdumpwin(w)
26register struct ww *w;
27{
28 register i, j;
29
30 (*tt.tt_setinsert)(0);
31 (*tt.tt_setmodes)(0);
32 (*tt.tt_clear)();
33 for (i = 0; i < w->ww_w.nr; i++) {
34 (*tt.tt_move)(w->ww_w.t + i, w->ww_w.l);
35 for (j = 0; j < w->ww_w.nc; j++)
36 (*tt.tt_putc)(w->ww_win[i][j] & WWM_COV ? 'C' : ' ');
37 }
38}
39
40wwdumpnvis(w)
41register struct ww *w;
42{
43 register i;
44
45 (*tt.tt_setinsert)(0);
46 (*tt.tt_setmodes)(0);
47 (*tt.tt_clear)();
48 for (i = 0; i < w->ww_w.nr; i++) {
49 (*tt.tt_move)(w->ww_w.t + i, w->ww_w.l);
50 (*tt.tt_putc)(w->ww_nvis[i] / 100 % 10 + '0');
51 (*tt.tt_putc)(w->ww_nvis[i] / 10 % 10 + '0');
52 (*tt.tt_putc)(w->ww_nvis[i] % 10 + '0');
53 }
54}
55
56wwdumpsmap()
57{
58 register i, j;
59
60 (*tt.tt_setinsert)(0);
61 (*tt.tt_setmodes)(0);
62 (*tt.tt_clear)();
63 for (i = 0; i < wwnrow; i++) {
64 (*tt.tt_move)(i, 0);
65 for (j = 0; j < wwncol; j++)
66 (*tt.tt_putc)(cmap[wwsmap[i][j]]);
67 }
68}
69
70/*
71wwdumpns()
72{
73 register i, j;
74
75 (*tt.tt_setinsert)(0);
76 (*tt.tt_clear)();
77 for (i = 0; i < wwnrow; i++) {
78 (*tt.tt_move)(i, 0);
79 for (j = 0; j < wwncol; j++) {
80 (*tt.tt_setmodes)(wwns[i][j].c_m);
81 (*tt.tt_putc)(wwns[i][j].c_c);
82 }
83 }
84}
85
86wwdumpos()
87{
88 register i, j;
89
90 (*tt.tt_setinsert)(0);
91 (*tt.tt_clreos)();
92 for (i = 0; i < wwnrow; i++) {
93 (*tt.tt_move)(i, 0);
94 for (j = 0; j < wwncol; j++) {
95 (*tt.tt_setmodes)(wwns[i][j].c_m);
96 (*tt.tt_putc)(wwns[i][j].c_c);
97 }
98 }
99}
100*/