Annotation of 43BSDTahoe/ucb/window/wwdump.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1983 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution and use in source and binary forms are permitted
        !             6:  * provided that the above copyright notice and this paragraph are
        !             7:  * duplicated in all such forms and that any documentation,
        !             8:  * advertising materials, and other materials related to such
        !             9:  * distribution and use acknowledge that the software was developed
        !            10:  * by the University of California, Berkeley.  The name of the
        !            11:  * University may not be used to endorse or promote products derived
        !            12:  * from this software without specific prior written permission.
        !            13:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            14:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            15:  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            16:  */
        !            17: 
        !            18: #ifndef lint
        !            19: static char sccsid[] = "@(#)wwdump.c   3.13 (Berkeley) 6/29/88";
        !            20: #endif /* not lint */
        !            21: 
        !            22: #include "ww.h"
        !            23: #include "tt.h"
        !            24: 
        !            25: static char cmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        !            26: 
        !            27: wwdumpwin(w)
        !            28: register struct ww *w;
        !            29: {
        !            30:        register i, j;
        !            31: 
        !            32:        tt.tt_nmodes = 0;
        !            33:        (*tt.tt_clear)();
        !            34:        for (i = w->ww_i.t; i < w->ww_i.b; i++) {
        !            35:                (*tt.tt_move)(i, w->ww_i.l);
        !            36:                for (j = w->ww_i.l; j < w->ww_i.r; j++)
        !            37:                        (*tt.tt_putc)(w->ww_win[i][j] & WWM_GLS ? 'G' : ' ');
        !            38:        }
        !            39: }
        !            40: 
        !            41: wwdumpnvis(w)
        !            42: register struct ww *w;
        !            43: {
        !            44:        register i;
        !            45:        char buf[20];
        !            46: 
        !            47:        tt.tt_nmodes = 0;
        !            48:        (*tt.tt_clear)();
        !            49:        for (i = w->ww_i.t; i < w->ww_i.b; i++) {
        !            50:                (*tt.tt_move)(i, w->ww_i.l);
        !            51:                (void) sprintf(buf, "%d", w->ww_nvis[i]);
        !            52:                (*tt.tt_write)(buf, strlen(buf));
        !            53:        }
        !            54: }
        !            55: 
        !            56: wwdumpsmap()
        !            57: {
        !            58:        register i, j;
        !            59: 
        !            60:        tt.tt_nmodes = 0;
        !            61:        (*tt.tt_clear)();
        !            62:        for (i = 0; i < wwnrow; i++) {
        !            63:                (*tt.tt_move)(i, 0);
        !            64:                for (j = 0; j < wwncol; j++)
        !            65:                        (*tt.tt_putc)(cmap[wwsmap[i][j]]);
        !            66:        }
        !            67: }
        !            68: 
        !            69: wwdumpns()
        !            70: {
        !            71:        register i, j;
        !            72: 
        !            73:        (*tt.tt_clear)();
        !            74:        for (i = 0; i < wwnrow; i++) {
        !            75:                (*tt.tt_move)(i, 0);
        !            76:                for (j = 0; j < wwncol; j++) {
        !            77:                        tt.tt_nmodes = wwns[i][j].c_m & tt.tt_availmodes;
        !            78:                        (*tt.tt_putc)(wwns[i][j].c_c);
        !            79:                }
        !            80:        }
        !            81: }
        !            82: 
        !            83: wwdumpos()
        !            84: {
        !            85:        register i, j;
        !            86: 
        !            87:        (*tt.tt_clear)();
        !            88:        for (i = 0; i < wwnrow; i++) {
        !            89:                (*tt.tt_move)(i, 0);
        !            90:                for (j = 0; j < wwncol; j++) {
        !            91:                        tt.tt_nmodes = wwos[i][j].c_m & tt.tt_availmodes;
        !            92:                        (*tt.tt_putc)(wwns[i][j].c_c);
        !            93:                }
        !            94:        }
        !            95: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.