Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/rogue Remove rogue's old and bit-rotten cut-down versi...



details:   https://anonhg.NetBSD.org/src/rev/49f92f5548ae
branches:  trunk
changeset: 476317:49f92f5548ae
user:      jsm <jsm%NetBSD.org@localhost>
date:      Mon Sep 13 17:14:07 1999 +0000

description:
Remove rogue's old and bit-rotten cut-down version of curses.

diffstat:

 games/rogue/Makefile  |    4 +-
 games/rogue/curses.c  |  701 --------------------------------------------------
 games/rogue/machdep.c |  119 +--------
 games/rogue/rogue.h   |   19 +-
 4 files changed, 8 insertions(+), 835 deletions(-)

diffs (truncated from 923 to 300 lines):

diff -r f05e4647a06b -r 49f92f5548ae games/rogue/Makefile
--- a/games/rogue/Makefile      Mon Sep 13 16:59:54 1999 +0000
+++ b/games/rogue/Makefile      Mon Sep 13 17:14:07 1999 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile,v 1.13 1999/04/05 08:04:48 abs Exp $
+#      $NetBSD: Makefile,v 1.14 1999/09/13 17:14:07 jsm Exp $
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 
 PROG=  rogue
 CPPFLAGS+=-DUNIX -fwritable-strings
-SRCS=  curses.c hit.c init.c inventory.c level.c machdep.c main.c \
+SRCS=  hit.c init.c inventory.c level.c machdep.c main.c \
        message.c monster.c move.c object.c pack.c play.c random.c ring.c \
        room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c
 DPADD= ${LIBCURSES}
diff -r f05e4647a06b -r 49f92f5548ae games/rogue/curses.c
--- a/games/rogue/curses.c      Mon Sep 13 16:59:54 1999 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,701 +0,0 @@
-/*     $NetBSD: curses.c,v 1.4 1997/10/12 11:45:01 lukem Exp $ */
-
-/*
- * Copyright (c) 1988, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Timothy C. Stoehr.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)curses.c   8.1 (Berkeley) 5/31/93";
-#else
-__RCSID("$NetBSD: curses.c,v 1.4 1997/10/12 11:45:01 lukem Exp $");
-#endif
-#endif /* not lint */
-
-/*
- * curses.c
- *
- * This source herein may be modified and/or distributed by anybody who
- * so desires, with the following restrictions:
- *    1.)  No portion of this notice shall be removed.
- *    2.)  Credit shall not be taken for the creation of this source.
- *    3.)  This code is not to be traded, sold, or used for personal
- *         gain or profit.
- *
- */
-
-#ifdef CURSES
-
-/* The following is a curses emulation package suitable for the rogue program
- * in which it is included.  No other suitability is claimed or suspected.
- * Only those routines currently needed by this rogue program are included.
- * This is being provided for those systems that don't have a suitable
- * curses package and want to run this rogue program.
- *
- * Compile the entire program with -DCURSES to incorporate this package.
- *
- * The following is NOT supported:
- *   "%D", "%B", "%n", or "%>" inside a cursor motion (cm) termcap string.
- *   Terminals in which the cursor motion addresses the row differently from
- *       the column, as in ":cm=\E%2,%3" or ":cm=\EY%+x;%+y"
- *   Termcap database stored in the TERMCAP environ variable as returned
- *       from md_getenv().  Only the termcap file name can be stored there.
- *       See the comments for md_getenv() in machdep.c.
- *   Terminals without non-destructive backspace.  Backspace (^H) is used
- *       for cursor motion regardless of any termcap entries.
- *   The ":tc=" termcap entry is ignored.
- *
- * Suggestions:
- *   Use line-feed as your termcap "do" entry: ":do=^J", ":do=\012" or
- *      ":do=\n"  This will help cursor motion optimization.  If line-feed
- *      won't work, then a short escape sequence will do.
- */
-
-#include <stdio.h>
-#include "rogue.h"
-
-boolean tc_tname();
-
-#define BS 010
-#define LF 012
-#define CR 015
-#define ESC '\033'
-#define TAB '\011'
-
-#define ST_MASK 0x80
-#define BUFLEN 256
-
-char terminal[DROWS][DCOLS];
-char buffer[DROWS][DCOLS];
-char *tc_file;
-
-char cm_esc[16];
-char cm_sep[16];
-char cm_end[16];
-boolean cm_reverse = 0;
-boolean cm_two = 0;
-boolean cm_three = 0;
-boolean cm_char = 0;
-short cm_inc = 0;
-
-boolean screen_dirty;
-boolean lines_dirty[DROWS];
-boolean buf_stand_out = 0;
-boolean term_stand_out = 0;
-
-int LINES = DROWS;
-int COLS = DCOLS;
-WINDOW scr_buf;
-WINDOW *curscr = &scr_buf;
-
-char *CL = (char *) 0;
-char *CM = (char *) 0;
-char *UC = (char *) 0; /* UP */
-char *DO = (char *) 0;
-char *VS = "";
-char *VE = "";
-char *TI = "";
-char *TE = "";
-char *SO = "";
-char *SE = "";
-
-short cur_row;
-short cur_col;
-
-initscr()
-{
-       clear();
-       get_term_info();
-       printf("%s%s", TI, VS);
-}
-
-endwin()
-{
-       printf("%s%s", TE, VE);
-       md_cbreak_no_echo_nonl(0);
-}
-
-move(row, col)
-short row, col;
-{
-       curscr->_cury = row;
-       curscr->_curx = col;
-       screen_dirty = 1;
-}
-
-mvaddstr(row, col, str)
-short row, col;
-char *str;
-{
-       move(row, col);
-       addstr(str);
-}
-
-addstr(str)
-char *str;
-{
-       while (*str) {
-               addch((int) *str++);
-       }
-}
-
-addch(ch)
-       int ch;
-{
-       short row, col;
-
-       row = curscr->_cury;
-       col = curscr->_curx++;
-
-       if (buf_stand_out) {
-               ch |= ST_MASK;
-       }
-       buffer[row][col] = (char) ch;
-       lines_dirty[row] = 1;
-       screen_dirty = 1;
-}
-
-mvaddch(row, col, ch)
-short row, col;
-int ch;
-{
-       move(row, col);
-       addch(ch);
-}
-
-refresh()
-{
-       int i, j, line;
-       short old_row, old_col, first_row;
-
-       if (screen_dirty) {
-
-               old_row = curscr->_cury;
-               old_col = curscr->_curx;
-               first_row = cur_row;
-
-               for (i = 0; i < DROWS; i++) {
-                       line = (first_row + i) % DROWS;
-                       if (lines_dirty[line]) {
-                               for (j = 0; j < DCOLS; j++) {
-                                       if (buffer[line][j] != terminal[line][j]) {
-                                               put_char_at(line, j, buffer[line][j]);
-                                       }
-                               }
-                               lines_dirty[line] = 0;
-                       }
-               }
-               put_cursor(old_row, old_col);
-               screen_dirty = 0;
-               fflush(stdout);
-       }
-}
-
-wrefresh(scr)
-WINDOW *scr;
-{
-       short i, col;
-
-       printf("%s", CL);
-       cur_row = cur_col = 0;
-
-       for (i = 0; i < DROWS; i++) {
-               col = 0;
-               while (col < DCOLS) {
-                       while ((col < DCOLS) && (buffer[i][col] == ' ')) {
-                               col++;
-                       }
-                       if (col < DCOLS) {
-                               put_cursor(i, col);
-                       }
-                       while ((col < DCOLS) && (buffer[i][col] != ' ')) {
-                               put_st_char((int) buffer[i][col]);
-                               cur_col++;
-                               col++;
-                       }
-               }
-       }
-       put_cursor(curscr->_cury, curscr->_curx);
-       fflush(stdout);
-       scr = scr;              /* make lint happy */
-}
-
-mvinch(row, col)
-short row, col;
-{
-       move(row, col);
-       return((int) buffer[row][col]);
-}
-
-clear()
-{
-       printf("%s", CL);
-       fflush(stdout);
-       cur_row = cur_col = 0;
-       move(0, 0);
-       clear_buffers();
-}
-
-clrtoeol()
-{
-       short row, col;
-
-       row = curscr->_cury;
-
-       for (col = curscr->_curx; col < DCOLS; col++) {
-               buffer[row][col] = ' ';
-       }
-       lines_dirty[row] = 1;



Home | Main Index | Thread Index | Old Index