]> skyeroc.xyz Git - dgamelaunch/commitdiff
land final virus+ee support
authorJoshua Kwan <joshk@triplehelix.org>
Sun, 25 Jan 2004 22:44:34 +0000 (22:44 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Sun, 25 Jan 2004 22:44:34 +0000 (22:44 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@163 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

Makefile
README
dgamelaunch.c
ee.c
virus.c

index 2f7c9742b373970d5c29fd6d6a293bed57abf931..3fc7362dedb381aed3344d935b87cb28ec598723 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,12 +16,18 @@ else
   endif
 endif
 
+ifdef VIRUS
+  EDITOR = virus.c
+else
+  EDITOR = ee.c
+endif
+
 CC = gcc
 LDFLAGS = 
 CFLAGS = -g3 $(optimize) -Wall -Wno-unused $(DEFS)
 INSTALL = install -c
 DEFS = -DVERSION=\"$(VERSION)\"
-SRCS = ee.c ttyrec.c dgamelaunch.c io.c ttyplay.c mygetnstr.c stripgfx.c strlcpy.c strlcat.c y.tab.c lex.yy.c
+SRCS = $(EDITOR) ttyrec.c dgamelaunch.c io.c ttyplay.c mygetnstr.c stripgfx.c strlcpy.c strlcat.c y.tab.c lex.yy.c
 OBJS = $(SRCS:.c=.o)
 LIBS = -lcurses -lcrypt $(LUTIL) -ll
 
@@ -63,3 +69,4 @@ io.o: io.c ttyrec.h
 stripgfx.o: stripgfx.c stripgfx.h
 ttyplay.o: ttyplay.c ttyrec.h io.h stripgfx.h
 ttyrec.o: ttyrec.c dgamelaunch.h ttyrec.h io.h
+virus.o: virus.c last_char_is.c
diff --git a/README b/README
index 136cc5fae5f7cc141b1872e1e5419d823a5fdaac..265f54a42b3c00183d985bdde4bde9022490a6d0 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-udgamelaunch
+dgamelaunch
 ===========
 
 dgamelaunch is a network-based game shell where anyone can sign up for an
@@ -13,6 +13,13 @@ On all platforms you should make sure that the curses library is accessible
 at runtime using the -R flag to gcc, or using LD_RUN_PATH or LD_LIBRARY_PATH
 as environment variables during build and run time, respectively.
 
+NOTE: As of version 1.4 of dgamelaunch, 'ee' is now the default rc-file editor.
+Using the 'virus' editor is still supported - all you have to do is
+
+  make clean; make VIRUS=1
+
+(The make clean will guarantee that the dgamelaunch binary gets rebuilt.)
+
 dgamelaunch was originally developed by M. Drew Streib <dtype@dtype.org> but
 is now a collaborative project. Copyright and contact information is in the 
 COPYING file, included with this package.
index 7872861edf0d18c1d248693887db58aa9397f4ca..3fe31b45ec15437b2a767cd8b32c153358b0ad46 100644 (file)
@@ -84,7 +84,7 @@ extern int yyparse ();
 
 extern pid_t child; /* nethack process */
 
-extern int ee_main (int argc, char **argv);
+extern int editor_main (int argc, char **argv);
 extern int ttyplay_main (char *ttyfile, int mode, int rstripgfx);
 extern int ttyrec_main (char *username, char* ttyrec_filename);
 extern int master, slave;
@@ -711,7 +711,7 @@ drawmenu ()
     {
       mvprintw (banner.len + 2, 1, "Logged in as: %s", me->username);
       mvaddstr (banner.len + 4, 1, "c) Change password");
-      mvaddstr (banner.len + 5, 1, "o) Edit option file (uses ee)");
+      mvaddstr (banner.len + 5, 1, "o) Edit option file");
       mvaddstr (banner.len + 6, 1, "w) Watch games in progress");
       mvaddstr (banner.len + 7, 1, "p) Play nethack!");
       mvaddstr (banner.len + 8, 1, "q) Quit");
@@ -1193,7 +1193,7 @@ editoptions ()
   }
   else if (editor == 0)
   {
-    ee_main (2, myargv);
+    editor_main (2, myargv);
     exit(0);
   }
   else
diff --git a/ee.c b/ee.c
index 8ca718adb05ab5f383ede5d6a46e3e7b2b26ec2d..57149980490dda8d36eff2d193c9dceca14ed24a 100644 (file)
--- a/ee.c
+++ b/ee.c
@@ -49,7 +49,7 @@
  |     proprietary information which is protected by
  |     copyright.  All rights are reserved.
  |
- |     $Header: /var/cvs/dgamelaunch/ee.c,v 1.6 2004/01/24 21:49:13 joshk Exp $
+ |     $Header: /var/cvs/dgamelaunch/ee.c,v 1.7 2004/01/25 22:44:34 joshk Exp $
  |
  */
 
@@ -62,7 +62,7 @@ char *ee_long_notice[] = {
        "copyright.  All rights are reserved."
        };
 
-char *version = "@(#) ee, version 1.4.1  $Revision: 1.6 $";
+char *version = "@(#) ee, version 1.4.1  $Revision: 1.7 $";
 
 #define catgetlocal(a, b) (b)
 
@@ -451,7 +451,7 @@ FILE *fopen();                      /* declaration for open function        */
 #endif /* __STDC__ */
 
 int
-ee_main(argc, argv)            /* beginning of main program            */
+editor_main(argc, argv)                /* beginning of main program            */
 int argc;
 char *argv[];
 {
diff --git a/virus.c b/virus.c
index 57d531ba047f88231ccf200ccb383307ffb80db6..f6fd55f673589b55fd1186d71e2d3003e22562b3 100644 (file)
--- a/virus.c
+++ b/virus.c
@@ -46,7 +46,6 @@ char *vi_Version = "0.0.2+dgamelaunch " VERSION;
  */
 
 //----  Feature --------------  Bytes to immplement
-#define vi_main                        vi_main
 #define BB_FEATURE_VI_COLON     // 4288
 #define BB_FEATURE_VI_YANKMARK  // 1408
 #define BB_FEATURE_VI_SEARCH    // 1088
@@ -303,7 +302,7 @@ static int crashme = 0;
 
 
 extern int
-vi_main (int argc, char **argv)
+editor_main (int argc, char **argv)
 {
 #ifdef BB_FEATURE_VI_YANKMARK
   int i;