1 /* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Edward Wang at The University of California, Berkeley. 7 * 8 * %sccs.include.redist.c% 9 */ 10 11 #ifndef lint 12 static char sccsid[] = "@(#)wwdump.c 8.1 (Berkeley) 06/06/93"; 13 #endif /* not lint */ 14 15 #include "ww.h" 16 #include "tt.h" 17 18 static char cmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 19 20 wwdumpwin(w) 21 register struct ww *w; 22 { 23 register i, j; 24 25 tt.tt_nmodes = 0; 26 (*tt.tt_clear)(); 27 for (i = w->ww_i.t; i < w->ww_i.b; i++) { 28 (*tt.tt_move)(i, w->ww_i.l); 29 for (j = w->ww_i.l; j < w->ww_i.r; j++) 30 (*tt.tt_putc)(w->ww_win[i][j] & WWM_GLS ? 'G' : ' '); 31 } 32 } 33 34 wwdumpnvis(w) 35 register struct ww *w; 36 { 37 register i; 38 char buf[20]; 39 40 tt.tt_nmodes = 0; 41 (*tt.tt_clear)(); 42 for (i = w->ww_i.t; i < w->ww_i.b; i++) { 43 (*tt.tt_move)(i, w->ww_i.l); 44 (void) sprintf(buf, "%d", w->ww_nvis[i]); 45 (*tt.tt_write)(buf, strlen(buf)); 46 } 47 } 48 49 wwdumpsmap() 50 { 51 register i, j; 52 53 tt.tt_nmodes = 0; 54 (*tt.tt_clear)(); 55 for (i = 0; i < wwnrow; i++) { 56 (*tt.tt_move)(i, 0); 57 for (j = 0; j < wwncol; j++) 58 (*tt.tt_putc)(cmap[wwsmap[i][j]]); 59 } 60 } 61 62 wwdumpns() 63 { 64 register i, j; 65 66 (*tt.tt_clear)(); 67 for (i = 0; i < wwnrow; i++) { 68 (*tt.tt_move)(i, 0); 69 for (j = 0; j < wwncol; j++) { 70 tt.tt_nmodes = wwns[i][j].c_m & tt.tt_availmodes; 71 (*tt.tt_putc)(wwns[i][j].c_c); 72 } 73 } 74 } 75 76 wwdumpos() 77 { 78 register i, j; 79 80 (*tt.tt_clear)(); 81 for (i = 0; i < wwnrow; i++) { 82 (*tt.tt_move)(i, 0); 83 for (j = 0; j < wwncol; j++) { 84 tt.tt_nmodes = wwos[i][j].c_m & tt.tt_availmodes; 85 (*tt.tt_putc)(wwns[i][j].c_c); 86 } 87 } 88 } 89