]> skyeroc.xyz Git - dgamelaunch/commitdiff
stuff
authorJoshua Kwan <joshk@triplehelix.org>
Wed, 31 Dec 2003 07:18:06 +0000 (07:18 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Wed, 31 Dec 2003 07:18:06 +0000 (07:18 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@20 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

Makefile
dgamelaunch.c

index bef98b5bb39f99bd75879fa469a95883fc5db0a9..f34fdef59ecae65fdfe7c14f0672853fe38cfc5f 100644 (file)
--- 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"
+       
index 59b07d888eed47b0af2a33213bb35b328adf9fe3..0902018aa4bfab45e23a957c1b5d84f05c1e93e4 100644 (file)
@@ -60,6 +60,7 @@
 #include <crypt.h>
 #include <sys/types.h>
 #include <sys/file.h>                                          /* for flock() */
+#include <sys/resource.h>
 #include <sys/ioctl.h>                                 /* ttyrec */
 #include <errno.h>
 #include <time.h>
@@ -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);