From 8f8b2eadbfde31f63ed426e707e8fb7c59922bb7 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Wed, 31 Dec 2003 07:18:06 +0000 Subject: [PATCH] stuff git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@20 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- Makefile | 18 ++++++++++++++---- dgamelaunch.c | 8 +++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bef98b5..f34fdef 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ VERSION = 1.3.10.1 +NAME = dgamelaunch +exclusions = CVS .cvsignore + CC = gcc LDFLAGS = CFLAGS = -g3 -O0 -Wall -W -Wno-unused-parameter $(DEFS) @@ -7,17 +10,24 @@ SRCS = virus.c ttyrec.c dgamelaunch.c io.c ttyplay.c stripgfx.c OBJS = $(SRCS:.c=.o) LIBS = -lncurses -lcrypt -all: dgamelaunch +all: $(NAME) -dgamelaunch: $(OBJS) +$(NAME): $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) clean: rm -f dgamelaunch - rm -f *.o + rm -f *.o .#* install: cp dgamelaunch /usr/sbin indent: indent -ts2 *.c *.h rm *~ -release: clean indent + +dist: clean indent + rm -rf $(NAME)-$(VERSION) + (cd .. && ln -sf $(CURDIR) $(NAME)-$(VERSION)) + (cd .. && tar $(addprefix --exclude ,$(exclusions)) -chzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)) + rm -f ../$(NAME)-$(VERSION) + @echo "Created source release $(NAME)-$(VERSION).tar.gz" + diff --git a/dgamelaunch.c b/dgamelaunch.c index 59b07d8..0902018 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -60,6 +60,7 @@ #include #include #include /* for flock() */ +#include #include /* ttyrec */ #include #include @@ -187,7 +188,8 @@ inprogressmenu () clear (); mvaddstr (1, 1, VER1); mvprintw (3, 1, - "During playback, hit 'q' to return here%s.", loggedin ? ", 'm' to contact the player" : ""); + "During playback, hit 'q' to return here%s.", + loggedin ? ", 'm' to contact the player" : ""); mvaddstr (4, 1, "(Use capital letter of selection to strip DEC graphics, VERY experimental!)"); mvaddstr (5, 1, "The following games are in progress:"); @@ -935,9 +937,13 @@ main (void) gid_t newgid = SHED_GID; char atrcfilename[81], *spool; unsigned int len; + struct rlimit rl = { RLIM_INFINITY, RLIM_INFINITY }; int userchoice = 0; + /* coredumper */ + setrlimit(RLIMIT_CORE, &rl); + /* signal handlers */ signal (SIGHUP, catch_sighup);