From 455e3a06eaeb6aeac554077edaa395f2ffcbc748 Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Sat, 18 May 2024 16:43:17 +0200 Subject: [PATCH 01/17] Removed a stack of not interesting files from being comitted to git. You may want to adjust this if you are using git for backup. --- .gitignore | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e8e8f46..b8aeaa9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,62 @@ src/depend src/util/depend build/* !build/create_solution.bat -!build/README.md \ No newline at end of file +!build/README.md + +# Do not commit files from players +lib/plrfiles/A-E/* +lib/plrfiles/F-J/* +lib/plrfiles/K-O/* +lib/plrfiles/P-T/* +lib/plrfiles/U-Z/* +lib/plrfiles/ZZZ/* +lib/plrfiles/index + +# but do commit the placeholders +!lib/plrfiles/A-E/00 +!lib/plrfiles/F-J/00 +!lib/plrfiles/K-O/00 +!lib/plrfiles/P-T/00 +!lib/plrfiles/U-Z/00 +!lib/plrfiles/ZZZ/00 + +# or vars +lib/plrvars/A-E/* +lib/plrvars/F-J/* +lib/plrvars/K-O/* +lib/plrvars/P-T/* +lib/plrvars/U-Z/* +lib/plrvars/ZZZ/* +lib/plrvars/index + +# except the placeholders +!lib/plrvars/A-E/00 +!lib/plrvars/F-J/00 +!lib/plrvars/K-O/00 +!lib/plrvars/P-T/00 +!lib/plrvars/U-Z/00 +!lib/plrvars/ZZZ/00 + +# or objects +lib/plrobjs/A-E/* +lib/plrobjs/F-J/* +lib/plrobjs/K-O/* +lib/plrobjs/P-T/* +lib/plrobjs/U-Z/* +lib/plrobjs/ZZZ/* +lib/plrobjs/index + +# except the placeholders +!lib/plrobjs/A-E/00 +!lib/plrobjs/F-J/00 +!lib/plrobjs/K-O/00 +!lib/plrobjs/P-T/00 +!lib/plrobjs/U-Z/00 +!lib/plrobjs/ZZZ/00 + +# also not autogenerated config file +/lib/etc/config +# or the list of last logins +/lib/etc/last +# or mail +lib/etc/plrmail From eb8e200a319452deb49b7901a095043b02556525 Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Sat, 18 May 2024 21:21:17 +0200 Subject: [PATCH 02/17] Add munit for unit testing. Main method extracted to separate file to make it easier to test the _rest_ of the code. munit is added as a submodule by running `cd src; git submodule add https://github.com/nemequ/munit.git` . Unit testing has so far only been tested on ubuntu. --- .gitignore | 9 +++++ .gitmodules | 3 ++ src/comm.c | 3 +- src/comm.h | 1 + src/main.c | 90 +++++++++++++++++++++++++++++++++++++++++ src/munit | 1 + src/test/Makefile | 75 ++++++++++++++++++++++++++++++++++ src/test/test_handler.c | 40 ++++++++++++++++++ src/test/test_handler.h | 10 +++++ src/test/testrunner.c | 23 +++++++++++ src/test/testrunner.h | 26 ++++++++++++ 11 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 100644 src/main.c create mode 160000 src/munit create mode 100644 src/test/Makefile create mode 100644 src/test/test_handler.c create mode 100644 src/test/test_handler.h create mode 100644 src/test/testrunner.c create mode 100644 src/test/testrunner.h diff --git a/.gitignore b/.gitignore index b8aeaa9..1b47281 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,12 @@ lib/plrobjs/index /lib/etc/last # or mail lib/etc/plrmail + +# test object files, etc +src/test/depend +src/test/*.o +src/test/testfile + + +# ide etc. +.vscode diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4ce94b9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/munit"] + path = src/munit + url = https://github.com/nemequ/munit.git diff --git a/src/comm.c b/src/comm.c index 0c1ec9e..607ec2d 100644 --- a/src/comm.c +++ b/src/comm.c @@ -198,7 +198,7 @@ void gettimeofday(struct timeval *t, struct timezone *dummy) #endif /* CIRCLE_WINDOWS || CIRCLE_MACINTOSH */ -int main(int argc, char **argv) +int _main(int argc, char **argv) { int pos = 1; const char *dir; @@ -390,6 +390,7 @@ int main(int argc, char **argv) return (0); } + /* Reload players after a copyover */ void copyover_recover() { diff --git a/src/comm.h b/src/comm.h index 9837c86..ea5bb86 100644 --- a/src/comm.h +++ b/src/comm.h @@ -17,6 +17,7 @@ #define COPYOVER_FILE "copyover.dat" /* comm.c */ +int _main(int argc, char **argv); void close_socket(struct descriptor_data *d); void game_info(const char *messg, ...) __attribute__ ((format (printf, 1, 2))); size_t send_to_char(struct char_data *ch, const char *messg, ...) __attribute__ diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..3948efd --- /dev/null +++ b/src/main.c @@ -0,0 +1,90 @@ +/************************************************************************** +* File: comm.c Part of tbaMUD * +* Usage: Communication, socket handling, main(), central game loop. * +* * +* All rights reserved. See license for complete information. * +* * +* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University * +* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * +**************************************************************************/ + +#include "conf.h" +#include "sysdep.h" + +/* Begin conf.h dependent includes */ + +#if CIRCLE_GNU_LIBC_MEMORY_TRACK +# include +#endif + +#ifdef CIRCLE_MACINTOSH /* Includes for the Macintosh */ +# define SIGPIPE 13 +# define SIGALRM 14 + /* GUSI headers */ +# include + /* Codewarrior dependant */ +# include +# include +#endif + +#ifdef CIRCLE_WINDOWS /* Includes for Win32 */ +# ifdef __BORLANDC__ +# include +# else /* MSVC */ +# include +# include +# endif +# include +#endif /* CIRCLE_WINDOWS */ + +#ifdef CIRCLE_AMIGA /* Includes for the Amiga */ +# include +# include +#endif /* CIRCLE_AMIGA */ + +#ifdef CIRCLE_ACORN /* Includes for the Acorn (RiscOS) */ +# include +# include +# include +#endif + +#ifdef HAVE_ARPA_TELNET_H +#include +#else +#include "telnet.h" +#endif + +/* end conf.h dependent includes */ + +/* Note, most includes for all platforms are in sysdep.h. The list of + * files that is included is controlled by conf.h for that platform. */ + +#include "structs.h" +#include "utils.h" +#include "comm.h" +#include "interpreter.h" +#include "handler.h" +#include "db.h" +#include "house.h" +#include "oasis.h" +#include "genolc.h" +#include "dg_scripts.h" +#include "dg_event.h" +#include "screen.h" /* to support the gemote act type command */ +#include "constants.h" /* For mud versions */ +#include "boards.h" +#include "act.h" +#include "ban.h" +#include "msgedit.h" +#include "fight.h" +#include "spells.h" /* for affect_update */ +#include "modify.h" +#include "quest.h" +#include "ibt.h" /* for free_ibt_lists */ +#include "mud_event.h" + + +int main(int argc, char **argv) +{ + return _main(argc, argv); +} \ No newline at end of file diff --git a/src/munit b/src/munit new file mode 160000 index 0000000..fbbdf14 --- /dev/null +++ b/src/munit @@ -0,0 +1 @@ +Subproject commit fbbdf1467eb0d04a6ee465def2e529e4c87f2118 diff --git a/src/test/Makefile b/src/test/Makefile new file mode 100644 index 0000000..bc01c7e --- /dev/null +++ b/src/test/Makefile @@ -0,0 +1,75 @@ +# Using µnit is very simple; just include the header and add the C +# file to your sources. That said, here is a simple Makefile to build +# the example. + +CSTD:=99 +OPENMP:=n +ASAN:=n +UBSAN:=n +EXTENSION:= +TEST_ENV:= +CFLAGS:=-Wall -Wno-char-subscripts -Wno-unused-but-set-variable +AGGRESSIVE_WARNINGS=n +LIBS:=-lcrypt + +#ifeq ($(CC),pgcc) +# CFLAGS+=-c$(CSTD) +#else +# CFLAGS+=-std=c$(CSTD) +#endif + +ifeq ($(OPENMP),y) + ifeq ($(CC),pgcc) + CFLAGS+=-mp + else + CFLAGS+=-fopenmp + endif +endif + +ifneq ($(SANITIZER),) + CFLAGS+=-fsanitize=$(SANITIZER) +endif + +ifneq ($(CC),pgcc) + ifeq ($(EXTRA_WARNINGS),y) + CFLAGS+=-Wall -Wextra -Werror + endif + + ifeq ($(ASAN),y) + CFLAGS+=-fsanitize=address + endif + + ifeq ($(UBSAN),y) + CFLAGS+=-fsanitize=undefined + endif +endif + +MUNIT_FILES := ../munit/munit.h ../munit/munit.c +TEST_FILES := $(ls *.c) + +# exclude main.c to avoid having multiple entrypoints. +OBJ_FILES_FROM_MUD_CODE != ls ../*.c | grep -v main.c | sed 's/\.c$$/.o/g' | xargs +OBJ_FILES_FORM_MUNIT:= ../munit/munit.o +OBJ_FILES_FROM_TESTS!= ls *.c | sed 's/\$$.c/.o/g' | xargs + +OBJ_FILES := $(OBJ_FILES_FROM_MUD_CODE) $(OBJ_FILES_FORM_MUNIT) $(OBJ_FILES_FROM_TESTS) $(LIBS) + +testfile: $(OBJ_FILES) + $(CC) $(CFLAGS) -o testfile $(OBJ_FILES) + +test: testfile + $(TEST_ENV) ./testfile + +$%.o: %.c + $(CC) $< $(CFLAGS) -c -o $@ + +clean: + rm -f *.o testfile depend +all: test + +default: all + +depend: + $(CC) -MM *.c > depend + +-include depend \ No newline at end of file diff --git a/src/test/test_handler.c b/src/test/test_handler.c new file mode 100644 index 0000000..85f4815 --- /dev/null +++ b/src/test/test_handler.c @@ -0,0 +1,40 @@ +#include "test_handler.h" + +static void run_single_get_number_test(const char* input_param, const char *name_result, int number_result); + +UNIT_TEST(test_get_number) +{ + run_single_get_number_test("1.feather", "feather", 1); + run_single_get_number_test("2.feather", "feather", 2); + run_single_get_number_test("1.feat", "feat", 1); + run_single_get_number_test("feather", "feather", 1); + run_single_get_number_test("10.feather", "feather", 10); + + return MUNIT_OK; +} + +static void run_single_get_number_test(const char* input_param, const char *name_result, int number_result) +{ + char *to_free; + char *input = to_free = strdup(input_param); + + int number = get_number(&input); + munit_assert_int32(number, ==, number_result); + munit_assert_string_equal(input, name_result); + + free(to_free); +} + +/* Creating a test suite is pretty simple. First, you'll need an + * array of tests: */ +MunitTest handler_c_tests[] = { + { + (char*) "/get_number", + test_get_number, + NULL, // setup callback + NULL, // cleanup callback + MUNIT_TEST_OPTION_NONE, + NULL + }, + { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } +}; diff --git a/src/test/test_handler.h b/src/test/test_handler.h new file mode 100644 index 0000000..7ffbb11 --- /dev/null +++ b/src/test/test_handler.h @@ -0,0 +1,10 @@ +#include "testrunner.h" + +#ifndef TEST_HANDLER_H +#define TEST_HANDLER_H + +extern MunitTest handler_c_tests[]; + +UNIT_TEST(test_get_number); + +#endif \ No newline at end of file diff --git a/src/test/testrunner.c b/src/test/testrunner.c new file mode 100644 index 0000000..ce07680 --- /dev/null +++ b/src/test/testrunner.c @@ -0,0 +1,23 @@ +#include "testrunner.h" +#include "test_handler.h" + +static MunitSuite suites[] = { + { "/handler.c", handler_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, + { NULL, NULL, NULL, 0, MUNIT_SUITE_OPTION_NONE } +}; + +static const MunitSuite test_suite = { + (char*) "", + /* The first parameter is the array of test suites. */ + NULL, + /* The second an array of suites to trigger from this one */ + suites, + MUNIT_SUITE_OPTION_NONE +}; + +int main(int argc, char* argv[MUNIT_ARRAY_PARAM(argc + 1)]) { + /* Finally, we'll actually run our test suite! That second argument + * is the user_data parameter which will be passed either to the + * test or (if provided) the fixture setup function. */ + return munit_suite_main(&test_suite, (void*) "µnit", argc, argv); +} diff --git a/src/test/testrunner.h b/src/test/testrunner.h new file mode 100644 index 0000000..603a405 --- /dev/null +++ b/src/test/testrunner.h @@ -0,0 +1,26 @@ +#ifndef TESTRUNNER_H +#define TESTRUNNER_H + +#include "../conf.h" +#include "../sysdep.h" +#include "../structs.h" +#include "../utils.h" +#include "../comm.h" +#include "../db.h" +#include "../handler.h" +#include "../screen.h" +#include "../interpreter.h" +#include "../spells.h" +#include "../dg_scripts.h" +#include "../act.h" +#include "../class.h" +#include "../fight.h" +#include "../quest.h" +#include "../mud_event.h" +#include "../munit/munit.h" + + +#define UNIT_TEST(test_name) MunitResult (test_name)(const MunitParameter params[], void* data) + + +#endif \ No newline at end of file From 217eac8cb389e3d279e74e9119d7c1ae03144e6f Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Sat, 18 May 2024 23:32:46 +0200 Subject: [PATCH 03/17] Renamed test files to match pattern from src Also, started setup for testing do_remove and introduced a bit of shorthand macros. --- src/test/test.act.item.c | 15 +++++++++++++++ src/test/test.act.item.h | 10 ++++++++++ src/test/{test_handler.c => test.handler.c} | 11 ++--------- src/test/{test_handler.h => test.handler.h} | 0 src/test/testrunner.c | 4 +++- src/test/testrunner.h | 9 ++++++++- 6 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 src/test/test.act.item.c create mode 100644 src/test/test.act.item.h rename src/test/{test_handler.c => test.handler.c} (84%) rename src/test/{test_handler.h => test.handler.h} (100%) diff --git a/src/test/test.act.item.c b/src/test/test.act.item.c new file mode 100644 index 0000000..92ac591 --- /dev/null +++ b/src/test/test.act.item.c @@ -0,0 +1,15 @@ +#include "test.act.item.h" + +UNIT_TEST(test_do_remove) { + + + + return MUNIT_OK; +} + +MunitTest act_item_c_tests[] = { + STD_TEST("/do_remove", test_do_remove), + + // end of array marker + { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } +}; \ No newline at end of file diff --git a/src/test/test.act.item.h b/src/test/test.act.item.h new file mode 100644 index 0000000..92eed39 --- /dev/null +++ b/src/test/test.act.item.h @@ -0,0 +1,10 @@ +#include "testrunner.h" + +#ifndef TEST_ACT_ITEM_H +#define TEST_ACT_ITEM_H + +extern MunitTest act_item_c_tests[]; + +UNIT_TEST(test_do_remove); + +#endif \ No newline at end of file diff --git a/src/test/test_handler.c b/src/test/test.handler.c similarity index 84% rename from src/test/test_handler.c rename to src/test/test.handler.c index 85f4815..f13cb34 100644 --- a/src/test/test_handler.c +++ b/src/test/test.handler.c @@ -1,4 +1,4 @@ -#include "test_handler.h" +#include "test.handler.h" static void run_single_get_number_test(const char* input_param, const char *name_result, int number_result); @@ -28,13 +28,6 @@ static void run_single_get_number_test(const char* input_param, const char *name /* Creating a test suite is pretty simple. First, you'll need an * array of tests: */ MunitTest handler_c_tests[] = { - { - (char*) "/get_number", - test_get_number, - NULL, // setup callback - NULL, // cleanup callback - MUNIT_TEST_OPTION_NONE, - NULL - }, + STD_TEST("/get_number", test_get_number), { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } }; diff --git a/src/test/test_handler.h b/src/test/test.handler.h similarity index 100% rename from src/test/test_handler.h rename to src/test/test.handler.h diff --git a/src/test/testrunner.c b/src/test/testrunner.c index ce07680..6049cc3 100644 --- a/src/test/testrunner.c +++ b/src/test/testrunner.c @@ -1,8 +1,10 @@ #include "testrunner.h" -#include "test_handler.h" +#include "test.handler.h" +#include "test.act.item.h" static MunitSuite suites[] = { { "/handler.c", handler_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, + { "/act.item.c", act_item_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, { NULL, NULL, NULL, 0, MUNIT_SUITE_OPTION_NONE } }; diff --git a/src/test/testrunner.h b/src/test/testrunner.h index 603a405..2969ad7 100644 --- a/src/test/testrunner.h +++ b/src/test/testrunner.h @@ -19,8 +19,15 @@ #include "../mud_event.h" #include "../munit/munit.h" - +/** + * Utility macro for defining tests. +*/ #define UNIT_TEST(test_name) MunitResult (test_name)(const MunitParameter params[], void* data) +/* + * A "standard test" needs no setup or teardown and doesn't take any parameters. + * This is a utility macro for the test suite listing. +*/ +#define STD_TEST(test_name, test_fun) { (char *)(test_name), (test_fun), NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } #endif \ No newline at end of file From 7d3acb0e3db59e8afd5335a69c249974a222aefd Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Sun, 19 May 2024 01:45:42 +0200 Subject: [PATCH 04/17] Testing do_remove Mocking the send_to_char function to check messages to the user. Still doesn't work for act() though. Requires libmocka-dev and libunwind-setjmp0-dev --- src/test/Makefile | 3 ++- src/test/test.act.item.c | 27 +++++++++++++++++++++- src/test/testrunner.c | 48 +++++++++++++++++++++++++++++++++++++--- src/test/testrunner.h | 10 +++++++++ 4 files changed, 83 insertions(+), 5 deletions(-) diff --git a/src/test/Makefile b/src/test/Makefile index bc01c7e..c3d1c72 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -8,7 +8,8 @@ ASAN:=n UBSAN:=n EXTENSION:= TEST_ENV:= -CFLAGS:=-Wall -Wno-char-subscripts -Wno-unused-but-set-variable +CFLAGS:=-Wall -Wno-char-subscripts -Wno-unused-but-set-variable +CFLAGS+=-Wl,--wrap=send_to_char,--wrap=vwrite_to_output AGGRESSIVE_WARNINGS=n LIBS:=-lcrypt diff --git a/src/test/test.act.item.c b/src/test/test.act.item.c index 92ac591..25b2f0b 100644 --- a/src/test/test.act.item.c +++ b/src/test/test.act.item.c @@ -2,7 +2,31 @@ UNIT_TEST(test_do_remove) { + + char_data *ch = create_char(); + CREATE(ch->player_specials, struct player_special_data, 1); + new_mobile_data(ch); + ch->char_specials.position = POS_STANDING; + CREATE(ch->desc, struct descriptor_data, 1); + char_to_room(ch, 0); + + do_remove(ch, "2.ring", 0, 0); + munit_assert_string_equal(get_last_messages(), "You don't seem to be using a ring.\r\n"); + + obj_data *ring1 = create_obj(); + ring1->name = "ring"; + ring1->short_description = "ring1"; + + obj_data *ring2 = create_obj(); + ring2->name = "ring"; + ring2->short_description = "ring2"; + + equip_char(ch, ring1, WEAR_FINGER_R); + equip_char(ch, ring2, WEAR_FINGER_L); + + do_remove(ch, "2.ring", 0, 0); + munit_assert_ptr_equal(ch->carrying, ring2); return MUNIT_OK; } @@ -12,4 +36,5 @@ MunitTest act_item_c_tests[] = { // end of array marker { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } -}; \ No newline at end of file +}; + diff --git a/src/test/testrunner.c b/src/test/testrunner.c index 6049cc3..be7cb92 100644 --- a/src/test/testrunner.c +++ b/src/test/testrunner.c @@ -2,6 +2,8 @@ #include "test.handler.h" #include "test.act.item.h" +void simple_world(); + static MunitSuite suites[] = { { "/handler.c", handler_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, { "/act.item.c", act_item_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, @@ -18,8 +20,48 @@ static const MunitSuite test_suite = { }; int main(int argc, char* argv[MUNIT_ARRAY_PARAM(argc + 1)]) { - /* Finally, we'll actually run our test suite! That second argument - * is the user_data parameter which will be passed either to the - * test or (if provided) the fixture setup function. */ + logfile = stderr; + simple_world(); return munit_suite_main(&test_suite, (void*) "µnit", argc, argv); } + + +/* + * test-fixtures common for many tests +*/ + +void simple_world() +{ + CREATE(world, struct room_data, 1); + top_of_world = 1; +} + +static char testbuf[MAX_OUTPUT_BUFFER]; +static int testbuf_size = 0; + +size_t __wrap_send_to_char(struct char_data *ch, const char *messg, ...) +{ + int size = testbuf_size; + va_list args; + + va_start(args, messg); + testbuf_size += vsnprintf(testbuf + size, MAX_OUTPUT_BUFFER - size, messg, args); + va_end(args); + + return testbuf_size; +} + +size_t __wrap_vwrite_to_output(struct descriptor_data *t, const char *format, va_list args) +{ + int size = testbuf_size; + testbuf_size += vsnprintf(testbuf + size, MAX_OUTPUT_BUFFER - size, format, args); + return testbuf_size; +} + +char *get_last_messages() +{ + char *stored_response = strdup(testbuf); + testbuf_size = 0; + *testbuf = '\0'; + return stored_response; +} \ No newline at end of file diff --git a/src/test/testrunner.h b/src/test/testrunner.h index 2969ad7..fd67934 100644 --- a/src/test/testrunner.h +++ b/src/test/testrunner.h @@ -18,6 +18,10 @@ #include "../quest.h" #include "../mud_event.h" #include "../munit/munit.h" +#include +#include +#include +#include /** * Utility macro for defining tests. @@ -30,4 +34,10 @@ */ #define STD_TEST(test_name, test_fun) { (char *)(test_name), (test_fun), NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } +/* + * test fixtures + */ +char_data* create_test_char_data(); +char *get_last_messages(); + #endif \ No newline at end of file From b5f460f74ebb07a50d276726f37b7be339587a29 Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Mon, 20 May 2024 00:53:40 +0200 Subject: [PATCH 05/17] refactoring for readability --- src/test/test.act.item.c | 23 +++++++++++++---------- src/test/testrunner.c | 25 +++++++++++++++++++++++-- src/test/testrunner.h | 2 +- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/test/test.act.item.c b/src/test/test.act.item.c index 25b2f0b..193dcb3 100644 --- a/src/test/test.act.item.c +++ b/src/test/test.act.item.c @@ -1,18 +1,18 @@ #include "test.act.item.h" -UNIT_TEST(test_do_remove) { - - char_data *ch = create_char(); - CREATE(ch->player_specials, struct player_special_data, 1); - new_mobile_data(ch); - ch->char_specials.position = POS_STANDING; - CREATE(ch->desc, struct descriptor_data, 1); - - char_to_room(ch, 0); +UNIT_TEST(test_do_remove_should_give_message_on_removing_of_unknown_item) { + char_data *ch = get_test_char(); do_remove(ch, "2.ring", 0, 0); munit_assert_string_equal(get_last_messages(), "You don't seem to be using a ring.\r\n"); + + return MUNIT_OK; +} + + +UNIT_TEST(test_do_remove_should_remove_second_item_by_number) { + char_data *ch = get_test_char(); obj_data *ring1 = create_obj(); ring1->name = "ring"; @@ -26,13 +26,16 @@ UNIT_TEST(test_do_remove) { equip_char(ch, ring2, WEAR_FINGER_L); do_remove(ch, "2.ring", 0, 0); + munit_assert_ptr_equal(ch->carrying, ring2); + munit_assert_ptr_equal(ch->carrying->next, ring1); return MUNIT_OK; } MunitTest act_item_c_tests[] = { - STD_TEST("/do_remove", test_do_remove), + STD_TEST("/do_remove/item_not_found", test_do_remove_should_give_message_on_removing_of_unknown_item), + STD_TEST("/do_remove/remove_second_item", test_do_remove_should_remove_second_item_by_number), // end of array marker { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } diff --git a/src/test/testrunner.c b/src/test/testrunner.c index be7cb92..18bafe3 100644 --- a/src/test/testrunner.c +++ b/src/test/testrunner.c @@ -2,7 +2,10 @@ #include "test.handler.h" #include "test.act.item.h" -void simple_world(); +static void simple_world(); +static void add_char(); + +static char_data* test_char; static MunitSuite suites[] = { { "/handler.c", handler_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, @@ -22,6 +25,7 @@ static const MunitSuite test_suite = { int main(int argc, char* argv[MUNIT_ARRAY_PARAM(argc + 1)]) { logfile = stderr; simple_world(); + add_char(); return munit_suite_main(&test_suite, (void*) "µnit", argc, argv); } @@ -30,12 +34,29 @@ int main(int argc, char* argv[MUNIT_ARRAY_PARAM(argc + 1)]) { * test-fixtures common for many tests */ -void simple_world() +static void simple_world() { CREATE(world, struct room_data, 1); top_of_world = 1; } +char_data *get_test_char() { + return test_char; +} + +static void add_char() +{ + char_data *ch = create_char(); + CREATE(ch->player_specials, struct player_special_data, 1); + new_mobile_data(ch); + ch->char_specials.position = POS_STANDING; + CREATE(ch->desc, struct descriptor_data, 1); + + char_to_room(ch, 0); + test_char = ch; +} + + static char testbuf[MAX_OUTPUT_BUFFER]; static int testbuf_size = 0; diff --git a/src/test/testrunner.h b/src/test/testrunner.h index fd67934..68eafe0 100644 --- a/src/test/testrunner.h +++ b/src/test/testrunner.h @@ -37,7 +37,7 @@ /* * test fixtures */ -char_data* create_test_char_data(); +char_data *get_test_char(); char *get_last_messages(); #endif \ No newline at end of file From 95cca56880e8f12e76cd5a9fce5ad9a34e21998a Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Wed, 19 Jun 2024 23:43:22 +0200 Subject: [PATCH 06/17] ignore project files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 1b47281..8b3ad3e 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,6 @@ src/test/testfile # ide etc. .vscode +.project +.settings + From 8f958359e9da9026cfd6d445cdc398f1b8e30cac Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 00:08:40 +0200 Subject: [PATCH 07/17] Removing Makefiles for old architectures or build mechanisms. We're in 2024. The VMS, Amiga, OS/2 and Arc have fallen by the wayside, along with the Borland C compiler and Watcom... --- doc/README.AMIGA | 81 ------ doc/README.ARC | 87 ------ doc/README.BORLAND | 66 ----- doc/README.OS2 | 70 ----- doc/README.VMS | 81 ------ doc/README.WATCOM | 23 -- src/Makefile.amiga | 203 -------------- src/Makefile.arc | 167 ----------- src/Makefile.bcc | 343 ----------------------- src/Makefile.bcc55 | 343 ----------------------- src/Makefile.in | 9 +- src/Makefile.lcc | 601 ---------------------------------------- src/Makefile.msvc | 385 ++++++++++++++++++------- src/Makefile.os2 | 205 -------------- src/SCOPTIONS | 12 - src/Smakefile | 192 ------------- src/build_circlemud.com | 517 ---------------------------------- src/conf.h.amiga | 108 -------- src/conf.h.arc | 82 ------ src/conf.h.os2 | 108 -------- src/conf.h.vms | 300 -------------------- 21 files changed, 299 insertions(+), 3684 deletions(-) delete mode 100644 doc/README.AMIGA delete mode 100644 doc/README.ARC delete mode 100644 doc/README.BORLAND delete mode 100644 doc/README.OS2 delete mode 100644 doc/README.VMS delete mode 100644 doc/README.WATCOM delete mode 100644 src/Makefile.amiga delete mode 100644 src/Makefile.arc delete mode 100644 src/Makefile.bcc delete mode 100644 src/Makefile.bcc55 delete mode 100644 src/Makefile.lcc delete mode 100644 src/Makefile.os2 delete mode 100644 src/SCOPTIONS delete mode 100644 src/Smakefile delete mode 100755 src/build_circlemud.com delete mode 100644 src/conf.h.amiga delete mode 100644 src/conf.h.arc delete mode 100644 src/conf.h.os2 delete mode 100644 src/conf.h.vms diff --git a/doc/README.AMIGA b/doc/README.AMIGA deleted file mode 100644 index 573ae93..0000000 --- a/doc/README.AMIGA +++ /dev/null @@ -1,81 +0,0 @@ - Compiling CircleMUD on the Amiga - Written by Damian Jurzysta - -Compiling CircleMUD on the Amiga is basically the same as compiling it using -UNIX. What you need is: - -* AmiTCP, INet225R2 or any other TCP/IP stack working with ixnet.library. - - You can get the limited unregistered version of Miami from - http://www.nordicglobal.com. An old demoversion of AmiTCP 4.0 can be found on - AmiNet (ftp://ftp.aminet.org/pub/aminet/comm/tcp/AmiTCP-demo-40.lha). - -* An installed and fully functional Geek Gadgets programming environment with - Autoconf installed. I've managed to compile and run CircleMUD using the - 971125, 980523 and 990529 snapshots using GCC 2.7.2 and EGCS 1.1b-1.2. - The latest EGCS is always the optimal choice. - - This can be found at ftp://ftp.ninemoons.com/pub/geekgadgets. - Installing this is a bit tricky at first, I recommend reading the manual - first. It is located at http://www.ninemoons.com/GG/docs/GG_7.html. That - way you'll know what archives to download and install. - -* 6 MB's of RAM, it might work with less but has not been tested. - - You can find it at the local computer store. :) - -* A 68020 CPU or better is required, I've not been able to compile it without - specifying the -m68020 flag, therefore it won't run on a 68000 or 68010 CPU. - - A1500, A2500, A3000, A4000 and A1200 all come with factory-installed 68020-040 - CPU's. If you own an unexpanded Amiga not listed above you'll need to expand - it. - -Here is how you compile this baby: - -1) Open up a shell. -2) CD to the circle30bplXX directory. (where 'XX' is the current patchlevel) -3) Type "sh configure". -4) CD to the src directory. -5) Edit the Makefile file and add -m68020 to MYFLAGS. -6) Edit the config.c file and replace "const char *LOGNAME = NULL;" with - "const char *LOGNAME = "log/syslog";". If you don't do this, logging - won't be working properly. -7) CD to the util directory and repeat step 5. -8) Due to a buggy/non-functional/missing implementation of HAS_RLIMIT in - ixemul.library/Geek Gadgets you need to edit sysdep.h and remove or comment - the definition of HAS_RLIMIT on line 324 saying "#define HAS_RLIMIT". -9) CD back to the src directory. -10) Type "make all". - -If you want to optimize the binary executable, change MYFLAGS to correspond -with your current processor (-m68020, -m68030, -m68040 or -m68060) and FPU -(-m68881). The -m68060 option is not included in GCC 2.7.2, only in EGCS 1.1+. -Also add -O3 to MYFLAGS to activate maximum optimization and inlining. I'm not -sure -O3 is working with GCC 2.7.2, if you get compiler errors replace it with --O2. Finally, remove -g and -O2 from CFLAGS to remove debugging information and -to avoid the above -O3 (or -O2 if you're using GCC 2.7.2) to collide with this -flag. - -To run the server all you need to do is follow these five simple steps: - -1) Make sure you have a TCP/IP stack running. You don't need to be connected to - the net, just leave it running. -2) Open up a shell. -3) Since the UNIX autorun kept crashing on my machine, I wrote my own autorun - script. If "sh autorun" isn't working for you, type "autorun.amiga". -4) If it says "file is not executable" when you try to run autorun.amiga, type - "protect autorun.amiga +es" and run it again. -5) To connect to it, use a telnet or MUD client and connect to localhost, port - 4000. If you don't have one, use the one supplied with Geek Gadgets: - 'telnet localhost 4000'. The first person to log in will be made an - implementor (level 34) with all powers. - -You may want to read the README.UNIX file since most what is written in it also -complies to the Amiga Geek Gadgets environment. - -If someone manages to compile it on a PowerPC processor, please contact me. -I don't own a PowerUP/G3/G4-board myself so I've not been able to test this. - -If you have any questions or can't get it working, feel free to email me at -boing@amigascne.org. diff --git a/doc/README.ARC b/doc/README.ARC deleted file mode 100644 index 5a48788..0000000 --- a/doc/README.ARC +++ /dev/null @@ -1,87 +0,0 @@ - Compiling CircleMUD under RiscOS - by Gareth Duncan (garethduncan@argonet.co.uk) - -You will need: -The CircleMUD source code. -!GCC, !UnixLib, drlink and make available from Hensa. -Acorns sockets library available form the Acorn ftp site. -A copy of !FreeNet and !FreeTerm. - -1) Firstly obtain a copy of !GCC, !UnixLib, drlink, make and Acorns - sockets library. - -2) Place the directory Sockets from the sockets library inside - !UnixLib37.src.clib - -3) Unpack the CircleMUD binary and start setting up the directory - structures in the src directory. - -4) src - | - ---------------------------------- - | | | | | | - util act c h o conf - | - --------------- - | | | - c h o - -5) Place all the files in the correct directories according to their - name remembering to remove the directory information from the - filename. - e.g. ban/c goes in the directory c and is renamed to ban. - act/item/c goes in the directory act then c and is renamed to - item. - -6) Set the type of any data files in the src directories to text. - -7) Copy the acorn configure file (should be conf/h/arc) into the h - directory and rename it conf. - -8) Create an obey file called !Compile in the src containing the - following lines - - -- begin (don't include this line) - WimpSlot -min 10000K -max 10000K - dir - - make -r - -- end (don't include this line) - - and set the wimpslot to as much memory as you can afford. - -9) Place the make program in the src directory and rename the file - Makefile/arc to Makefile removing the old file already called - Makefile. - -10) Unpack GCC and Unixlib placing them where you want and then - double click on them. Then run the !Compile file. Everything - should run okay. Make sure that drlink is placed inside GCC in the - bin directory. If you get any error messages check that the code - changes at the bottom of this file are present. If not alter the - code as instructed. - -11) Place the module CallASWI from !UnixLib37.src.CallASWI in the bin - directory. - -12) Now get a copy of the FreeNet internet stack or a recent version - of Acorns stack and FreeTerm. Make sure the FreeUser start up - script has the line - - ifconfig lo0 inet 127.0.0.1 up - - Then run the startup script, run FreeTerm and then open a task - window. Run the !Run file (which should be placed in the directory - above src) from the task window by typing in its file name and - then press return, the Mud should load (you should be able to just - shift drag the !Run file onto the window if you are using !Zap). - -13) To log onto the mud type localhost and set the port to 4000 in - FreeTerm and then press connect - -Please excuse the poor spelling and grammar in this and if you have -any trouble contact garethduncan@argonet.co.uk. - -Bye. - --Gareth diff --git a/doc/README.BORLAND b/doc/README.BORLAND deleted file mode 100644 index 93cd4c5..0000000 --- a/doc/README.BORLAND +++ /dev/null @@ -1,66 +0,0 @@ - Compiling CircleMUD - under Microsoft Windows 95 or Windows NT - using Borland C++ - - Written by Mundi King - -Here are some instructions on compiling circlemud using Borland C++ 5.01. -These instructions will not work using Turbo C++, or the 4.0 versions of -Borland C++ as those two products were geared twoards DOS and Windows 3.xx. - -It will most likely work with versions 5.00, 5.02, and 5.5 of the Borland -C++ compilers. - -Boot up your Windows 95 machine. - -Unzip your CircleMUD package. - -Goto a DOS prompt, and change to the circle \src directory. - -(Type) rename conf.h.win conf.h (Enter) - -** BORLAND 5.5 ** -If you are using Borland C++ 5.5, a couple of extra changes need to be -made at this time. First you have to make sure the bin directory of the -tools is in your path. You can add the following line to your autoexec.bat -to have it automatically added to your path or you can type it at a DOS -prompt: - path = %path%;c:\borland\bcc55\bin - -(Type) make -fmakefile.bcc55 (Enter) - -** BORLAND 5.1 ** -(Type) make -fmakefile.bcc (Enter) - -** End Version Specifics ** - - Something to note here is that these makefile - assume that you have installed Borland C++ 5.x - to the C: drive. If you have installed it to - another drive you will have to open up the correct - Makefile in a text editor and find and replace - all C:\ references to the drive letter it has - been installed to. - -(Type) move circle.exe ..\ (Enter) - -(Type) cd .. (Enter) - -(Type) circle (Enter) - -The game should start loading the zones and database. You will no longer be -able to type in this DOS box. - -Click on START and then on RUN. - -(Type) telnet localhost 4000 (Enter) - - The first one to logon becomes the Implementor. - Also remember that you are using Windows95's - built-in telnet program which is very basic. - -Pat yourself on the back. - ---- -Mundi King 1998-07-03 -Updated for 5.5: 2000-06-28 diff --git a/doc/README.OS2 b/doc/README.OS2 deleted file mode 100644 index d04093d..0000000 --- a/doc/README.OS2 +++ /dev/null @@ -1,70 +0,0 @@ - Compiling CircleMUD - under OS/2 Warp Connect v3.0 or 2.1 - by David Carver - - -To compile CircleMUD under OS/2, you must have the following: -All needed files can be found at the hobbes.nmsu.edu FTP site. - - -* OS/2 Warp Connect Version 3.0, or OS/2 Version 2.1 with TCP/IP installed. - You should have at least 8 megs of memory. (Circle runs quite well on an - 8 meg machine). - -* An HPFS formatted drive. CircleMUD needs to be uncompressed on an HPFS - drive because it uses long filenames. - -* The EMX09b runtime and compilation systems. These are free and - can be downloaded by anonymous FTP at hobbes.nmsu.edu in os2/unix/emx09b - -* The OS/2 port of GNU's GCC compiler. This can also be found at - hobbes.nmsu.edu in os2/unix/emx09b. Please make sure you have the most - recent version of the GCC compiler for OS/2, as files needed by CircleMUD - were not included in earlier versions of GCC for OS/2. The current version - is 2.7.0 - -* GNU's TAR and GZIP programs to decompress the necessary files. Again - these can be found at hobbes.nmsu.edu in os2/unix. - **** You only need this if you plan on getting some of the various - **** addons for Circle that others have coded. - -* A MAKE program. Either the GNU Make, or IBM's NMAKE should work. You - can obtain the NMAKE from either IBM's Developers kit or from - hobbes.nmsu.edu in os2/16dev. - - -Installation: - -*** IMPORTANT -*** -*** You must have EMX and GCC installed and the directories in your -*** PATH and LIBPATH statements in your CONFIG.SYS. Please read the -*** EMX installation instructions included with that package for more -*** information on how to install both EMX and GCC. - -Download the ZIP archive of Circle and use your favorite UNZip utility -to extract it. - -After you have uncompressed the files, switch to the directory that has -the CircleMUD files in it, and then to the SRC subdirectory. Rename -the following files: - -Rename 'conf.h.os2' to 'conf.h'. -Delete the old 'makefile', and rename 'makefile.os2' to 'makefile'. - -To compile the MUD type the following at an OS/2 command line: - -NMAKE /i - -CircleMUD will be compiled and the executable will be put in your current -directory. Copy the CIRCLE.EXE file to the circle30\bin directory. Then -follow the CircleMUD instructions in README on how to start up the MUD. - -NOTE: General questions about CircleMUD can be addressed to the author, -Jeremy Elson, at jelson@circlemud.org. However, all questions which -specifically deal with the OS/2 port of Circle should go to my address, -listed below. - -David Carver -dcarver@cougar.colstate.cc.oh.us -dcarver@iwaynet.net diff --git a/doc/README.VMS b/doc/README.VMS deleted file mode 100644 index 1be790d..0000000 --- a/doc/README.VMS +++ /dev/null @@ -1,81 +0,0 @@ -This is directions for compiling & linking CircleMUD for OpenVMS. -Additional documentation can be found at. - - http://www.ourservers.net/openvms_ports/ - -I have personally tested this port on both VAX and Alpha with OpenVMS v7.0 -and DEC C v7.0 and Multinet TCP/IP using UCX emulation. - -To build this, you need the following: - - .1) DEC C compiler. I have tested with DEC C v7.0 and can help out - with problems with earlier versions of DEC C. If you don't have - the DEC C compiler I suggest you get a copy through the OpenVMS - Hobbyist program at http://www.montagar.com/hobbyist. - - .2) A TCP/IP stack for OpenVMS that supports UCX emulation. I have - personally only tested out Multinet v4.1B and Multinet v4.2. - If you are using a TCP/IP stack that doesn't support UCX - emulation I would suggest getting a copy of Multinet though the - OpenVMS hobbyist program at http://www.montagar.com/hobbyist. - - .3) A copy of the CircleMUD distribution file. - - This can be found at ftp://ftp.circlemud.org/3.x/ - -Now, you have everything, do the following... - - .1) Unpack the CircleMUD file you got from "www.circlemud.org" - - .2) Go to the SRC directory and locate the BUILD_CIRCLEMUD.COM file. - - The BUILD_CIRCLEMUD.COM file accepts the following parameters. - - P1 ALL Just Build "Everything". - CIRCLE Just Build [.BIN]CIRCLE.EXE. - UTILS Just Build The CircleMUD Utilities. - - P2 DEBUG Build CircleMUD With Debugging Information. - NODEBUG Build CircleMUD Without Debugging Information. - - The default is "ALL" and "NODEBUG". - - The "BUILD_CIRCLEMUD.COM" script checks some filenames to make - sure that they are correct as some of them are unpacked different - between the TAR file distribution and the ZIP file distribution. - It also checks for "CONF.H" and if not found copies "CONF.H_VMS" - to "CONF.H" for you. - - So if you just want to build "everything" without debugging - information you could use... - - $ @BUILD_CIRCLEMUD ALL NODEBUG - - OR - - $ @BUILD_CIRCLEMUD - - The EXE's will be placed in the CircleMUD BIN directory. - -Now, define the logical CIRCLEMUD_BIN to point to the "BIN" directory of -the CircleMUD directory like this... - - $ DEFINE/SYSTEM/EXEC CIRCLEMUD_BIN DISK$WORK:[CIRCLE30BPL16.BIN] - -To run CircleMUD, just execute the "VMS_AUTORUN.COM" file in the CircleMUD -root directory. - -To customize how CircleMUD runs, edit the "VMS_CIRCLEMUD.COM" file in the -BIN directory. - -To customize CircleMUD features (like player killing etc) edit the "CONFIG.C" -file in the SRC directory. - -To edit the CircleMUD login message, edit the GREETINGS.; file found in the -TEXT directory under the LIB directory. - -For the CircleMUD utilities, execute the file VMS_MUD_UTILS.COM in the -BIN directory and it will create the VMS symbols for the utilities. - -If you have any problems, questions, comments, feel free to e-mail me at -byer@mail.ourservers.net and I'll try my best to answer them all. diff --git a/doc/README.WATCOM b/doc/README.WATCOM deleted file mode 100644 index 0a2b352..0000000 --- a/doc/README.WATCOM +++ /dev/null @@ -1,23 +0,0 @@ - Compiling CircleMUD - under Microsoft Windows 95 or Windows NT - using Watcom v.11 - - -The following information is from Joe Osburn . - -Circle apparently compiles under 95/NT using Watcom's compiler with -the following changes: - -1- Copy conf.h.win to conf.h - -2- Rename all the act.* files to other names; the IDE in Watcom apparently - doesn't like files that start with act.* - -3- In Watcom make a new project that is a Windows 95 character mode - executable; add all of Circle's .c files to it. - -4- Remove the line that says "#define chdir _chdir" from sysdep.h - - -If you have any further information, patches, or more detailed instructions, -please mail them to us at bugs@circlemud.org. diff --git a/src/Makefile.amiga b/src/Makefile.amiga deleted file mode 100644 index d4fe8f5..0000000 --- a/src/Makefile.amiga +++ /dev/null @@ -1,203 +0,0 @@ -# CircleMUD Makefile.in - Makefile template used by 'configure' -# - -# C compiler to use -CC = gcc - -# Any special flags you want to pass to the compiler -MYFLAGS = -#Amiga Stuff -MYFLAGS = -g -Wall -DAMIGA -DNOCRYPT -LIBS = -lc -lamiga -lauto - -#flags for profiling (see hacker.doc for more information) -PROFILE = - -############################################################################## -# Do Not Modify Anything Below This Line (unless you know what you're doing) # -############################################################################## - -CFLAGS = $(MYFLAGS) $(PROFILE) - -OBJFILES = comm.o act.comm.o act.informative.o act.movement.o act.item.o \ - act.offensive.o act.other.o act.social.o act.wizard.o ban.o boards.o \ - castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \ - house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \ - objsave.o shop.o spec_assign.o spec_procs.o spell_parser.o \ - spells.o utils.o weather.o players.o quest.o qedit.o genqst.o - -default: .accepted - $(MAKE) ../bin/circle - -.accepted: - ./licheck - -utils: .accepted - $(MAKE) ../bin/asciipasswd - $(MAKE) ../bin/autowiz - $(MAKE) ../bin/listrent - $(MAKE) ../bin/plrtoascii - $(MAKE) ../bin/shopconv - $(MAKE) ../bin/sign - $(MAKE) ../bin/split - $(MAKE) ../bin/wld2html - -all: .accepted - $(MAKE) ../bin/circle - $(MAKE) utils - -circle: - $(MAKE) ../bin/circle -asciipasswd: - $(MAKE) ../bin/asciipasswd -autowiz: - $(MAKE) ../bin/autowiz -listrent: - $(MAKE) ../bin/listrent -plrtoascii: - $(MAKE) ../bin/plrtoascii -shopconv: - $(MAKE) ../bin/shopconv -sign: - $(MAKE) ../bin/sign -split: - $(MAKE) ../bin/split -wld2html: - $(MAKE) ../bin/wld2html - - -../bin/asciipasswd: util/asciipasswd.c conf.h sysdep.h structs.h utils.h - $(CC) $(CFLAGS) -o ../bin/asciipasswd util/asciipasswd.c $(LIBS) -../bin/autowiz: util/autowiz.c conf.h sysdep.h structs.h utils.h db.h - $(CC) $(CFLAGS) -o ../bin/autowiz util/autowiz.c -../bin/listrent: util/listrent.c conf.h sysdep.h structs.h - $(CC) $(CFLAGS) -o ../bin/listrent util/listrent.c -../bin/plrtoascii: util/plrtoascii.c conf.h sysdep.h db.h pfdefaults.h - $(CC) $(CFLAGS) -o ../bin/plrtoascii util/plrtoascii.c -../bin/shopconv: util/shopconv.c conf.h sysdep.h structs.h db.h utils.h shop.h - $(CC) $(CFLAGS) -o ../bin/shopconv util/shopconv.c -../bin/sign: util/sign.c conf.h sysdep.h - $(CC) $(CFLAGS) -o ../bin/sign util/sign.c $(LIBS) -../bin/split: util/split.c - $(CC) $(CFLAGS) -o ../bin/split util/split.c -../bin/wld2html: util/wld2html.c - $(CC) $(CFLAGS) -o ../bin/wld2html util/wld2html.c - -../bin/circle : $(OBJFILES) - $(CC) -o ../bin/circle $(PROFILE) $(OBJFILES) $(LIBS) -clean: - rm -f *.o - -# Dependencies for the object files (automagically generated with -# gcc -MM) - -act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h screen.h - $(CC) -c $(CFLAGS) act.comm.c -act.informative.o: act.informative.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h screen.h constants.h - $(CC) -c $(CFLAGS) act.informative.c -act.item.o: act.item.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h - $(CC) -c $(CFLAGS) act.item.c -act.movement.o: act.movement.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h constants.h - $(CC) -c $(CFLAGS) act.movement.c -act.offensive.o: act.offensive.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) -c $(CFLAGS) act.offensive.c -act.other.o: act.other.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h screen.h house.h - $(CC) -c $(CFLAGS) act.other.c -act.social.o: act.social.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) -c $(CFLAGS) act.social.c -act.wizard.o: act.wizard.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h screen.h constants.h - $(CC) -c $(CFLAGS) act.wizard.c -ban.o: ban.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h - $(CC) -c $(CFLAGS) ban.c -boards.o: boards.c conf.h sysdep.h structs.h utils.h comm.h db.h boards.h \ - interpreter.h handler.h - $(CC) -c $(CFLAGS) boards.c -castle.o: castle.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h - $(CC) -c $(CFLAGS) castle.c -class.o: class.c conf.h sysdep.h structs.h db.h utils.h spells.h interpreter.h - $(CC) -c $(CFLAGS) class.c -comm.o: comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h house.h - $(CC) -c $(CFLAGS) comm.c -config.o: config.c conf.h sysdep.h structs.h - $(CC) -c $(CFLAGS) config.c -constants.o: constants.c conf.h sysdep.h structs.h - $(CC) -c $(CFLAGS) constants.c -db.o: db.c conf.h sysdep.h structs.h utils.h db.h comm.h handler.h spells.h mail.h \ - interpreter.h house.h - $(CC) -c $(CFLAGS) db.c -fight.o: fight.c conf.h sysdep.h structs.h utils.h comm.h handler.h interpreter.h \ - db.h spells.h screen.h - $(CC) -c $(CFLAGS) fight.c -graph.o: graph.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h spells.h - $(CC) -c $(CFLAGS) graph.c -handler.o: handler.c conf.h sysdep.h structs.h utils.h comm.h db.h handler.h \ - interpreter.h spells.h - $(CC) -c $(CFLAGS) handler.c -house.o: house.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h house.h constants.h - $(CC) -c $(CFLAGS) house.c -interpreter.o: interpreter.c conf.h sysdep.h structs.h comm.h interpreter.h db.h \ - utils.h spells.h handler.h mail.h screen.h - $(CC) -c $(CFLAGS) interpreter.c -limits.o: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \ - handler.h - $(CC) -c $(CFLAGS) limits.c -magic.o: magic.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h db.h - $(CC) -c $(CFLAGS) magic.c -mail.o: mail.c conf.h sysdep.h structs.h utils.h comm.h db.h interpreter.h \ - handler.h mail.h - $(CC) -c $(CFLAGS) mail.c -mobact.o: mobact.c conf.h sysdep.h structs.h utils.h db.h comm.h interpreter.h \ - handler.h spells.h - $(CC) -c $(CFLAGS) mobact.c -modify.o: modify.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h db.h \ - comm.h spells.h mail.h boards.h - $(CC) -c $(CFLAGS) modify.c -objsave.o: objsave.c conf.h sysdep.h structs.h comm.h handler.h db.h \ - interpreter.h utils.h spells.h - $(CC) -c $(CFLAGS) objsave.c -players.o: players.c conf.h sysdep.h structs.h utils.h db.h handler.h pfdefaults.h - $(CC) -c $(CFLAGS) players.c -random.o: random.c - $(CC) -c $(CFLAGS) random.c -shop.o: shop.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h shop.h - $(CC) -c $(CFLAGS) shop.c -spec_assign.o: spec_assign.c conf.h sysdep.h structs.h db.h interpreter.h \ - utils.h - $(CC) -c $(CFLAGS) spec_assign.c -spec_procs.o: spec_procs.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) -c $(CFLAGS) spec_procs.c -spell_parser.o: spell_parser.c conf.h sysdep.h structs.h utils.h interpreter.h \ - spells.h handler.h comm.h db.h - $(CC) -c $(CFLAGS) spell_parser.c -spells.o: spells.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h \ - db.h constants.h - $(CC) -c $(CFLAGS) spells.c -utils.o: utils.c conf.h sysdep.h structs.h utils.h comm.h screen.h spells.h \ - handler.h - $(CC) -c $(CFLAGS) utils.c -weather.o: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \ - interpreter.h db.h - $(CC) -c $(CFLAGS) weather.c -quest.o: quest.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h \ - comm.h db.h screen.h quest.h - $(CC) -c $(CFLAGS) quest.c -qedit.o: qedit.c conf.h sysdep.h structs.h utils.h comm.h db.h oasis.h \ - improved-edit.h screen.h genolc.h genzon.h interpreter.h quest.h - $(CC) -c $(CFLAGS) qedit.c -genqst.o: genqst.c conf.h sysdep.h structs.h utils.h db.h quest.h \ - genolc.h genzon.h - $(CC) -c $(CFLAGS) genqst.c diff --git a/src/Makefile.arc b/src/Makefile.arc deleted file mode 100644 index 29c1c61..0000000 --- a/src/Makefile.arc +++ /dev/null @@ -1,167 +0,0 @@ -# CircleMUD Makefile/arc - manually created (G. Duncan 13 June 98) -# - -# C compiler to use -CC = gcc -LINK = drlink - -# Any special flags you want to pass to the compiler -MYFLAGS = -O2 -Iunix:Sockets.Include -Irun: -LIBS = unix:Sockets.Libs.o.socklib unix:Sockets.Libs.o.inetlib \ - gcc:o.libgcc unix:o.UnixLib -rescan - -#flags for profiling (see hacker.doc for more information) -PROFILE = - -############################################################################## -# Do Not Modify Anything Below This Line (unless you know what you're doing) # -############################################################################## - -BINDIR = ^.bin - -CFLAGS = $(MYFLAGS) $(PROFILE) - -OBJFILES = o.comm act.o.comm act.o.informative act.o.movement act.o.item \ - act.o.offensive act.o.other act.o.social act.o.wizard o.ban o.boards \ - o.castle o.class o.config o.constants o.db o.fight o.graph o.handler \ - o.house o.interpreter o.limits o.magic o.mail o.mobact o.modify \ - o.objsave o.random o.shop o.spec_assign o.spec_procs \ - o.spell_parser o.spells o.utils o.weather o.players o.quest o.qedit o.genqst - -default: all - -all: $(BINDIR).circle - -$(BINDIR).circle: $(OBJFILES) - $(LINK) -o $(BINDIR).circle $(PROFILE) $(OBJFILES) $(LIBS) - -clean: - wipe o.* ~V~CF - -# Dependencies for the object files (automagically generated with -# gcc -MM) - -act.o.comm: act.c.comm h.conf h.sysdep h.structs \ - h.utils h.comm h.interpreter h.handler \ - h.db h.screen - $(CC) -c $(CFLAGS) act.c.comm -o act.o.comm -act.o.informative: act.c.informative h.conf h.sysdep \ - h.structs h.utils h.comm h.interpreter \ - h.handler h.db h.spells h.screen h.constants - $(CC) -c $(CFLAGS) act.c.informative -o act.o.informative -act.o.item: act.c.item h.conf h.sysdep h.structs \ - h.utils h.comm h.interpreter h.handler \ - h.db h.spells - $(CC) -c $(CFLAGS) act.c.item -o act.o.item -act.o.movement: act.c.movement h.conf h.sysdep \ - h.structs h.utils h.comm h.interpreter \ - h.handler h.db h.spells h.house h.constants - $(CC) -c $(CFLAGS) act.c.movement -o act.o.movement -act.o.offensive: act.c.offensive h.conf h.sysdep \ - h.structs h.utils h.comm h.interpreter \ - h.handler h.db h.spells - $(CC) -c $(CFLAGS) act.c.offensive -o act.o.offensive -act.o.other: act.c.other h.conf h.sysdep h.structs \ - h.utils h.comm h.interpreter h.handler \ - h.db h.spells h.screen h.house - $(CC) -c $(CFLAGS) act.c.other -o act.o.other -act.o.social: act.c.social h.conf h.sysdep h.structs \ - h.utils h.comm h.interpreter h.handler \ - h.db h.spells - $(CC) -c $(CFLAGS) act.c.social -o act.o.social -act.o.wizard: act.c.wizard h.conf h.sysdep h.structs \ - h.utils h.comm h.interpreter h.handler \ - h.db h.spells h.house h.screen h.constants - $(CC) -c $(CFLAGS) act.c.wizard -o act.o.wizard -o.ban: c.ban h.conf h.sysdep h.structs h.utils h.comm h.interpreter h.handler h.db - $(CC) -c $(CFLAGS) c.ban -o.boards: c.boards h.conf h.sysdep h.structs h.utils h.comm h.db h.boards \ - h.interpreter h.handler - $(CC) -c $(CFLAGS) c.boards -o.castle: c.castle h.conf h.sysdep h.structs h.utils h.comm h.interpreter \ - h.handler h.db h.spells - $(CC) -c $(CFLAGS) c.castle -o.class: c.class h.conf h.sysdep h.structs h.db h.utils h.spells h.interpreter - $(CC) -c $(CFLAGS) c.class -o.comm: c.comm h.conf h.sysdep h.structs h.utils h.comm h.interpreter h.handler \ - h.db h.house - $(CC) -c $(CFLAGS) c.comm -o.config: c.config h.conf h.sysdep h.structs - $(CC) -c $(CFLAGS) c.config -o.constants: c.constants h.conf h.sysdep h.structs - $(CC) -c $(CFLAGS) c.constants -o.db: c.db h.conf h.sysdep h.structs h.utils h.db h.comm h.handler h.spells h.mail \ - h.interpreter h.house - $(CC) -c $(CFLAGS) c.db -o.fight: c.fight h.conf h.sysdep h.structs h.utils h.comm h.handler h.interpreter \ - h.db h.spells h.screen - $(CC) -c $(CFLAGS) c.fight -o.graph: c.graph h.conf h.sysdep h.structs h.utils h.comm h.interpreter h.handler \ - h.db h.spells - $(CC) -c $(CFLAGS) c.graph -o.handler: c.handler h.conf h.sysdep h.structs h.utils h.comm h.db h.handler \ - h.interpreter h.spells - $(CC) -c $(CFLAGS) c.handler -o.house: c.house h.conf h.sysdep h.structs h.comm h.handler h.db h.interpreter \ - h.utils h.house h.constants - $(CC) -c $(CFLAGS) c.house -o.interpreter: c.interpreter h.conf h.sysdep h.structs h.comm h.interpreter h.db \ - h.utils h.spells h.handler h.mail h.screen - $(CC) -c $(CFLAGS) c.interpreter -o.limits: c.limits h.conf h.sysdep h.structs h.utils h.spells h.comm h.db \ - h.handler - $(CC) -c $(CFLAGS) c.limits -o.magic: c.magic h.conf h.sysdep h.structs h.utils h.comm h.spells h.handler h.db - $(CC) -c $(CFLAGS) c.magic -o.mail: c.mail h.conf h.sysdep h.structs h.utils h.comm h.db h.interpreter \ - h.handler h.mail - $(CC) -c $(CFLAGS) c.mail -o.mobact: c.mobact h.conf h.sysdep h.structs h.utils h.db h.comm h.interpreter \ - h.handler h.spells - $(CC) -c $(CFLAGS) c.mobact -o.modify: c.modify h.conf h.sysdep h.structs h.utils h.interpreter h.handler h.db \ - h.comm h.spells h.mail h.boards - $(CC) -c $(CFLAGS) c.modify -o.objsave: c.objsave h.conf h.sysdep h.structs h.comm h.handler h.db \ - h.interpreter h.utils h.spells - $(CC) -c $(CFLAGS) c.objsave -o.olc: c.olc h.conf h.sysdep h.structs h.utils h.comm h.interpreter h.handler h.db \ - h.olc - $(CC) -c $(CFLAGS) c.olc -o.players: c.players.c h.conf h.sysdep h.structs h.utils h.db h.handler h.pfdefaults - $(CC) -c $(CFLAGS) c.players -o.random: c.random h.utils - $(CC) -c $(CFLAGS) c.random -o.shop: c.shop h.conf h.sysdep h.structs h.comm h.handler h.db h.interpreter \ - h.utils h.shop - $(CC) -c $(CFLAGS) c.shop -o.spec_assign: c.spec_assign h.conf h.sysdep h.structs h.db h.interpreter \ - h.utils - $(CC) -c $(CFLAGS) c.spec_assign -o.spec_procs: c.spec_procs h.conf h.sysdep h.structs h.utils h.comm \ - h.interpreter h.handler h.db h.spells - $(CC) -c $(CFLAGS) c.spec_procs -o.spell_parser: c.spell_parser h.conf h.sysdep h.structs h.utils h.interpreter \ - h.spells h.handler h.comm h.db - $(CC) -c $(CFLAGS) c.spell_parser -o.spells: c.spells h.conf h.sysdep h.structs h.utils h.comm h.spells h.handler \ - h.db h.constants - $(CC) -c $(CFLAGS) c.spells -o.utils: c.utils h.conf h.sysdep h.structs h.utils h.comm h.screen h.spells \ - h.handler h.db - $(CC) -c $(CFLAGS) c.utils -o.weather: c.weather h.conf h.sysdep h.structs h.utils h.comm h.handler \ - h.interpreter h.db - $(CC) -c $(CFLAGS) c.weather -o.players: c.players h.conf h.sysdep h.structs h.utils h.db h.handler \ - h.pfdefaults h.dg_scripts h.comm h.interpreter h.genolc h.config h.spells - $(CC) -c $(CFLAGS) c.players -o.quest: c.quest h.conf h.sysdep h.structs h.utils h.interpreter h.handler \ - h.comm h.db h.screen h.quest - $(CC) -c $(CFLAGS) quest.c -o.qedit: c.qedit h.conf h.sysdep h.structs h.utils h.comm h.db h.oasis \ - h.improved-edit h.screen h.genolc h.genzon h.interpreter h.quest - $(CC) -c $(CFLAGS) qedit.c -o.genqst: c.genqst h.conf h.sysdep h.structs h.utils h.db h.quest \ - h.genolc h.genzon - $(CC) -c $(CFLAGS) genqst.c diff --git a/src/Makefile.bcc b/src/Makefile.bcc deleted file mode 100644 index d5b6493..0000000 --- a/src/Makefile.bcc +++ /dev/null @@ -1,343 +0,0 @@ -# -# Borland C++ IDE generated makefile -# Generated 12/26/97 at 5:04:53 AM -# -.AUTODEPEND - - -# -# Borland C++ tools -# -IMPLIB = Implib -BCC32 = Bcc32 +BccW32.cfg -BCC32I = Bcc32i +BccW32.cfg -TLINK32 = TLink32 -TLIB = TLib -BRC32 = Brc32 -TASM32 = Tasm32 -# -# IDE macros -# - - -# -# Options -# -IDE_LinkFLAGS32 = -LC:\BC5\LIB -LinkerLocalOptsAtC32_circledexe = -Tpe -ap -c -ResLocalOptsAtC32_circledexe = -BLocalOptsAtC32_circledexe = -CompInheritOptsAt_circledexe = -IC:\BC5\INCLUDE -D_RTLDLL;_BIDSDLL; -LinkerInheritOptsAt_circledexe = -x -LinkerOptsAt_circledexe = $(LinkerLocalOptsAtC32_circledexe) -ResOptsAt_circledexe = $(ResLocalOptsAtC32_circledexe) -BOptsAt_circledexe = $(BLocalOptsAtC32_circledexe) - -# -# Dependency List -# -Dep_circle = \ - circle.exe - -circle : BccW32.cfg $(Dep_circle) - echo MakeNode - -Dep_circledexe = \ - act.comm.obj\ - act.movement.obj\ - act.item.obj\ - act.informative.obj\ - act.offensive.obj\ - act.other.obj\ - boards.obj\ - ban.obj\ - act.wizard.obj\ - act.social.obj\ - castle.obj\ - class.obj\ - db.obj\ - constants.obj\ - config.obj\ - comm.obj\ - fight.obj\ - graph.obj\ - limits.obj\ - interpreter.obj\ - house.obj\ - handler.obj\ - magic.obj\ - mail.obj\ - objsave.obj\ - players.obj\ - modify.obj\ - mobact.obj\ - random.obj\ - shop.obj\ - spells.obj\ - spell_parser.obj\ - spec_procs.obj\ - spec_assign.obj\ - utils.obj\ - weather.obj\ - quest.obj\ - qedit.obj\ - genqst.obj - -circle.exe : $(Dep_circledexe) - $(TLINK32) @&&| - /v $(IDE_LinkFLAGS32) $(LinkerOptsAt_circledexe) $(LinkerInheritOptsAt_circledexe) + -C:\BC5\LIB\c0x32.obj+ -act.comm.obj+ -act.movement.obj+ -act.item.obj+ -act.informative.obj+ -act.offensive.obj+ -act.other.obj+ -boards.obj+ -ban.obj+ -act.wizard.obj+ -act.social.obj+ -castle.obj+ -class.obj+ -db.obj+ -constants.obj+ -config.obj+ -comm.obj+ -fight.obj+ -graph.obj+ -limits.obj+ -interpreter.obj+ -house.obj+ -handler.obj+ -magic.obj+ -mail.obj+ -objsave.obj+ -players.obj+ -modify.obj+ -mobact.obj+ -random.obj+ -shop.obj+ -spells.obj+ -spell_parser.obj+ -spec_procs.obj+ -spec_assign.obj+ -utils.obj+ -weather.obj+ -quest.obj+ -qedit.obj+ -genqst.obj -$<,$* -C:\BC5\LIB\bidsfi.lib+ -C:\BC5\LIB\import32.lib+ -C:\BC5\LIB\cw32i.lib - - -| -act.comm.obj : act.comm.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.comm.c -| - -act.movement.obj : act.movement.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.movement.c -| - -act.item.obj : act.item.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.item.c -| - -act.informative.obj : act.informative.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.informative.c -| - -act.offensive.obj : act.offensive.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.offensive.c -| - -act.other.obj : act.other.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.other.c -| - -boards.obj : boards.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ boards.c -| - -ban.obj : ban.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ ban.c -| - -act.wizard.obj : act.wizard.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.wizard.c -| - -act.social.obj : act.social.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.social.c -| - -castle.obj : castle.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ castle.c -| - -class.obj : class.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ class.c -| - -db.obj : db.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ db.c -| - -constants.obj : constants.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ constants.c -| - -config.obj : config.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ config.c -| - -comm.obj : comm.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ comm.c -| - -fight.obj : fight.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ fight.c -| - -graph.obj : graph.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ graph.c -| - -limits.obj : limits.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ limits.c -| - -interpreter.obj : interpreter.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ interpreter.c -| - -house.obj : house.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ house.c -| - -handler.obj : handler.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ handler.c -| - -magic.obj : magic.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ magic.c -| - -mail.obj : mail.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ mail.c -| - -objsave.obj : objsave.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ objsave.c -| - -players.obj : players.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ players.c - -modify.obj : modify.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ modify.c -| - -mobact.obj : mobact.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ mobact.c -| - -random.obj : random.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ random.c -| - -shop.obj : shop.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ shop.c -| - -spells.obj : spells.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spells.c -| - -spell_parser.obj : spell_parser.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spell_parser.c -| - -spec_procs.obj : spec_procs.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spec_procs.c -| - -spec_assign.obj : spec_assign.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spec_assign.c -| - -utils.obj : utils.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ utils.c -| - -weather.obj : weather.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ weather.c -| - -quest.obj : quest.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ quest.c -| - -qedit.obj : qedit.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ qedit.c -| - -genqst.obj : genqst.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ genqst.c -| - -# Compiler configuration file -BccW32.cfg : - Copy &&| --w --R --v --vi --H --H=circle.csm --WC --g0 -| $@ - - diff --git a/src/Makefile.bcc55 b/src/Makefile.bcc55 deleted file mode 100644 index 9d16c19..0000000 --- a/src/Makefile.bcc55 +++ /dev/null @@ -1,343 +0,0 @@ -# For Borland C++ 5.5 -# -# Borland C++ IDE generated makefile -# Generated 12/26/97 at 5:04:53 AM -# -.AUTODEPEND - - -# -# Borland C++ tools -# -IMPLIB = Implib -BCC32 = Bcc32 -BCC32I = Bcc32i -TLINK32 = ILink32 -TLIB = TLib -BRC32 = Brc32 -TASM32 = Tasm32 -# -# IDE macros -# - - -# -# Options -# -IDE_LinkFLAGS32 = -LC:\BORLAND\BCC55\LIB -LinkerLocalOptsAtC32_circledexe = -Tpe -ap -c -ResLocalOptsAtC32_circledexe = -BLocalOptsAtC32_circledexe = -CompInheritOptsAt_circledexe = -IC:\BORLAND\BCC55\INCLUDE; -LinkerInheritOptsAt_circledexe = -x -LinkerOptsAt_circledexe = $(LinkerLocalOptsAtC32_circledexe) -ResOptsAt_circledexe = $(ResLocalOptsAtC32_circledexe) -BOptsAt_circledexe = $(BLocalOptsAtC32_circledexe) - -# -# Dependency List -# -Dep_circle = \ - circle.exe - -circle : BccW32.cfg $(Dep_circle) - echo MakeNode - -Dep_circledexe = \ - act.comm.obj\ - act.movement.obj\ - act.item.obj\ - act.informative.obj\ - act.offensive.obj\ - act.other.obj\ - boards.obj\ - ban.obj\ - act.wizard.obj\ - act.social.obj\ - castle.obj\ - class.obj\ - db.obj\ - constants.obj\ - config.obj\ - comm.obj\ - fight.obj\ - graph.obj\ - limits.obj\ - interpreter.obj\ - house.obj\ - handler.obj\ - magic.obj\ - mail.obj\ - objsave.obj\ - players.obj\ - modify.obj\ - mobact.obj\ - random.obj\ - shop.obj\ - spells.obj\ - spell_parser.obj\ - spec_procs.obj\ - spec_assign.obj\ - utils.obj\ - weather.obj\ - quest.obj\ - qedit.obj\ - genqst.obj - -circle.exe : $(Dep_circledexe) - $(TLINK32) @&&| - /v $(IDE_LinkFLAGS32) $(LinkerOptsAt_circledexe) $(LinkerInheritOptsAt_circledexe) + -C:\BORLAND\BCC55\LIB\c0x32.obj+ -act.comm.obj+ -act.movement.obj+ -act.item.obj+ -act.informative.obj+ -act.offensive.obj+ -act.other.obj+ -boards.obj+ -ban.obj+ -act.wizard.obj+ -act.social.obj+ -castle.obj+ -class.obj+ -db.obj+ -constants.obj+ -config.obj+ -comm.obj+ -fight.obj+ -graph.obj+ -limits.obj+ -interpreter.obj+ -house.obj+ -handler.obj+ -magic.obj+ -mail.obj+ -objsave.obj+ -players.obj+ -modify.obj+ -mobact.obj+ -random.obj+ -shop.obj+ -spells.obj+ -spell_parser.obj+ -spec_procs.obj+ -spec_assign.obj+ -utils.obj+ -weather.obj+ -quest.obj+ -qedit.obj+ -genqst.obj -$<,$* -C:\BORLAND\BCC55\LIB\import32.lib+ -C:\BORLAND\BCC55\LIB\cw32i.lib - -| -act.comm.obj : act.comm.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.comm.c -| - -act.movement.obj : act.movement.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.movement.c -| - -act.item.obj : act.item.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.item.c -| - -act.informative.obj : act.informative.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.informative.c -| - -act.offensive.obj : act.offensive.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.offensive.c -| - -act.other.obj : act.other.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.other.c -| - -boards.obj : boards.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ boards.c -| - -ban.obj : ban.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ ban.c -| - -act.wizard.obj : act.wizard.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.wizard.c -| - -act.social.obj : act.social.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.social.c -| - -castle.obj : castle.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ castle.c -| - -class.obj : class.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ class.c -| - -db.obj : db.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ db.c -| - -constants.obj : constants.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ constants.c -| - -config.obj : config.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ config.c -| - -comm.obj : comm.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ comm.c -| - -fight.obj : fight.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ fight.c -| - -graph.obj : graph.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ graph.c -| - -limits.obj : limits.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ limits.c -| - -interpreter.obj : interpreter.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ interpreter.c -| - -house.obj : house.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ house.c -| - -handler.obj : handler.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ handler.c -| - -magic.obj : magic.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ magic.c -| - -mail.obj : mail.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ mail.c -| - -objsave.obj : objsave.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ objsave.c -| - -players.obj : players.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ players.c -| - -modify.obj : modify.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ modify.c -| - -mobact.obj : mobact.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ mobact.c -| - -random.obj : random.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ random.c -| - -shop.obj : shop.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ shop.c -| - -spells.obj : spells.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spells.c -| - -spell_parser.obj : spell_parser.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spell_parser.c -| - -spec_procs.obj : spec_procs.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spec_procs.c -| - -spec_assign.obj : spec_assign.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spec_assign.c -| - -utils.obj : utils.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ utils.c -| - -weather.obj : weather.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ weather.c -| - -quest.obj : quest.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ quest.c -| - -qedit.obj : qedit.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ qedit.c -| - -genqst.obj : genqst.c - $(BCC32) -P- -c @&&| - $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ genqst.c -| - -# Compiler configuration file -BccW32.cfg : - Copy &&| --w --R --v --vi --H --H=circle.csm --WC --g0 -| $@ - - diff --git a/src/Makefile.in b/src/Makefile.in index 5308258..15c88c3 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -20,8 +20,8 @@ CFLAGS = @CFLAGS@ $(MYFLAGS) $(PROFILE) LIBS = @LIBS@ @CRYPTLIB@ @NETLIB@ -SRCFILES := act.comm.c act.informative.c act.item.c act.movement.c act.offensive.c act.other.c act.social.c act.wizard.c aedit.c asciimap.c ban.c boards.c bsd-snprintf.c castle.c cedit.c class.c comm.c config.c constants.c db.c dg_comm.c dg_db_scripts.c dg_event.c dg_handler.c dg_misc.c dg_mobcmd.c dg_objcmd.c dg_olc.c dg_scripts.c dg_triggers.c dg_variables.c dg_wldcmd.c fight.c genmob.c genobj.c genolc.c genqst.c genshp.c genwld.c genzon.c graph.c handler.c hedit.c house.c ibt.c improved-edit.c interpreter.c limits.c lists.c magic.c mail.c medit.c mobact.c modify.c msgedit.c mud_event.c oasis.c oasis_copy.c oasis_delete.c oasis_list.c objsave.c oedit.c players.c prefedit.c protocol.c qedit.c quest.c random.c redit.c sedit.c shop.c spec_assign.c spec_procs.c spell_parser.c spells.c tedit.c utils.c weather.c zedit.c zmalloc.c -OBJFILES := act.comm.o act.informative.o act.item.o act.movement.o act.offensive.o act.other.o act.social.o act.wizard.o aedit.o asciimap.o ban.o boards.o bsd-snprintf.o castle.o cedit.o class.o comm.o config.o constants.o db.o dg_comm.o dg_db_scripts.o dg_event.o dg_handler.o dg_misc.o dg_mobcmd.o dg_objcmd.o dg_olc.o dg_scripts.o dg_triggers.o dg_variables.o dg_wldcmd.o fight.o genmob.o genobj.o genolc.o genqst.o genshp.o genwld.o genzon.o graph.o handler.o hedit.o house.o ibt.o improved-edit.o interpreter.o limits.o lists.o magic.o mail.o medit.o mobact.o modify.o msgedit.o mud_event.o oasis.o oasis_copy.o oasis_delete.o oasis_list.o objsave.o oedit.o players.o prefedit.o protocol.o qedit.o quest.o random.o redit.o sedit.o shop.o spec_assign.o spec_procs.o spell_parser.o spells.o tedit.o utils.o weather.o zedit.o zmalloc.o +SRCFILES := act.comm.c act.informative.c act.item.c act.movement.c act.offensive.c act.other.c act.social.c act.wizard.c aedit.c asciimap.c ban.c boards.c bsd-snprintf.c castle.c cedit.c class.c comm.c config.c constants.c db.c dg_comm.c dg_db_scripts.c dg_event.c dg_handler.c dg_misc.c dg_mobcmd.c dg_objcmd.c dg_olc.c dg_scripts.c dg_triggers.c dg_variables.c dg_wldcmd.c fight.c genmob.c genobj.c genolc.c genqst.c genshp.c genwld.c genzon.c graph.c handler.c hedit.c house.c ibt.c improved-edit.c interpreter.c limits.c lists.c magic.c mail.c main.c medit.c mobact.c modify.c msgedit.c mud_event.c oasis.c oasis_copy.c oasis_delete.c oasis_list.c objsave.c oedit.c players.c prefedit.c protocol.c qedit.c quest.c random.c redit.c sedit.c shop.c spec_assign.c spec_procs.c spell_parser.c spells.c tedit.c utils.c weather.c zedit.c zmalloc.c +OBJFILES := act.comm.o act.informative.o act.item.o act.movement.o act.offensive.o act.other.o act.social.o act.wizard.o aedit.o asciimap.o ban.o boards.o bsd-snprintf.o castle.o cedit.o class.o comm.o config.o constants.o db.o dg_comm.o dg_db_scripts.o dg_event.o dg_handler.o dg_misc.o dg_mobcmd.o dg_objcmd.o dg_olc.o dg_scripts.o dg_triggers.o dg_variables.o dg_wldcmd.o fight.o genmob.o genobj.o genolc.o genqst.o genshp.o genwld.o genzon.o graph.o handler.o hedit.o house.o ibt.o improved-edit.o interpreter.o limits.o lists.o magic.o mail.o main.o medit.o mobact.o modify.o msgedit.o mud_event.o oasis.o oasis_copy.o oasis_delete.o oasis_list.o objsave.o oedit.o players.o prefedit.o protocol.o qedit.o quest.o random.o redit.o sedit.o shop.o spec_assign.o spec_procs.o spell_parser.o spells.o tedit.o utils.o weather.o zedit.o zmalloc.o default: all @@ -32,6 +32,10 @@ all: .accepted .accepted: @./licheck @MORE@ +.PHONY: test +test: + (cd test; $(MAKE) all) + utils: .accepted (cd util; $(MAKE) all) @@ -46,6 +50,7 @@ $%.o: %.c clean: rm -f *.o depend + (cd test; $(MAKE) clean) # Dependencies for the object files (automagically generated with # gcc -MM) diff --git a/src/Makefile.lcc b/src/Makefile.lcc deleted file mode 100644 index f2d4df8..0000000 --- a/src/Makefile.lcc +++ /dev/null @@ -1,601 +0,0 @@ -# Makefile for LCC-Win32 compile of CircleMUD -# Created by Eric Jones (mailto:fpicard@mindless.com) - -# 08/31/98 -# Added LCCDIR variable because new release of LCC-Win32 extracts -# to \LCC instead of \LCCPUB as in older versions -# Added DISTDIR variable to allow for an easy way to change -# where Circle is located, plus will allow for changes in the -# path between versions (e.g. bplZZ is circle30bplZZ) -# With addition of new variables as replacements for old -# hard-coded paths, display lines will be less than 80 columns -# thus less clutter on the screen during the make - -LCCDIR=c:\lccpub -DISTDIR=c:\circle -CFLAGS=-c -I$(LCCDIR)\include -DLCC_WIN32 -CC=lcc -OBJS=\ - genqst.obj \ - qedit.obj \ - quest.obj \ - weather.obj \ - utils.obj \ - spells.obj \ - spell_parser.obj \ - spec_procs.obj \ - spec_assign.obj \ - shop.obj \ - random.obj \ - players.obj \ - objsave.obj \ - modify.obj \ - mobact.obj \ - mail.obj \ - magic.obj \ - limits.obj \ - interpreter.obj \ - house.obj \ - handler.obj \ - graph.obj \ - fight.obj \ - db.obj \ - constants.obj \ - config.obj \ - comm.obj \ - class.obj \ - castle.obj \ - boards.obj \ - ban.obj \ - act.wizard.obj \ - act.social.obj \ - act.other.obj \ - act.offensive.obj \ - act.movement.obj \ - act.item.obj \ - act.informative.obj \ - act.comm.obj \ - -LIBS=$(LCCDIR)\lib\wsock32.lib - -circle.exe: $(OBJS) - lcclnk -subsystem console -o $(DISTDIR)\bin\circle.exe $(OBJS) $(LIBS) - -# Build GENQST.C -GENQST_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\genolc.h\ - $(DISTDIR)\src\genzon.h\ - $(DISTDIR)\src\quest.h\ - $(DISTDIR)\src\db.h\ - -genqst.obj: $(GENQST_C) $(DISTDIR)\src\genqst.c - $(CC) $(CFLAGS) $(DISTDIR)\src\genqst.c - -# Build QEDIT.C -QEDIT_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\oasis.h\ - $(DISTDIR)\src\improved-edit.h\ - $(DISTDIR)\src\screen.h\ - $(DISTDIR)\src\genolc.h\ - $(DISTDIR)\src\genzon.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\quest.h\ - -qedit.obj: $(QEDIT_C) $(DISTDIR)\src\qedit.c - $(CC) $(CFLAGS) $(DISTDIR)\src\qedit.c - -# Build QUEST.C -QUEST_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\screen.h\ - $(DISTDIR)\src\quest.h\ - -quest.obj: $(QUEST_C) $(DISTDIR)\src\quest.c - $(CC) $(CFLAGS) $(DISTDIR)\src\quest.c - -# Build WEATHER.C -WEATHER_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\db.h\ - -weather.obj: $(WEATHER_C) $(DISTDIR)\src\weather.c - $(CC) $(CFLAGS) $(DISTDIR)\src\weather.c - -# Build UTILS.C -UTILS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\screen.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\handler.h\ - -utils.obj: $(UTILS_C) $(DISTDIR)\src\utils.c - $(CC) $(CFLAGS) $(DISTDIR)\src\utils.c - -# Build SPELLS.C -SPELLS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\constants.h\ - -spells.obj: $(SPELLS_C) $(DISTDIR)\src\spells.c - $(CC) $(CFLAGS) $(DISTDIR)\src\spells.c - -# Build SPELL_PARSER.C -SPELL_PARSER_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\db.h\ - -spell_parser.obj: $(SPELL_PARSER_C) $(DISTDIR)\src\spell_parser.c - $(CC) $(CFLAGS) $(DISTDIR)\src\spell_parser.c - -# Build SPEC_PROCS.C -SPEC_PROCS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - -spec_procs.obj: $(SPEC_PROCS_C) $(DISTDIR)\src\spec_procs.c - $(CC) $(CFLAGS) $(DISTDIR)\src\spec_procs.c - -# Build SPEC_ASSIGN.C -SPEC_ASSIGN_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\utils.h\ - -spec_assign.obj: $(SPEC_ASSIGN_C) $(DISTDIR)\src\spec_assign.c - $(CC) $(CFLAGS) $(DISTDIR)\src\spec_assign.c - -# Build SHOP.C -SHOP_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\shop.h\ - -shop.obj: $(SHOP_C) $(DISTDIR)\src\shop.c - $(CC) $(CFLAGS) $(DISTDIR)\src\shop.c - -# Build RANDOM.C -RANDOM_C=\ - -random.obj: $(RANDOM_C) $(DISTDIR)\src\random.c - $(CC) $(CFLAGS) $(DISTDIR)\src\random.c - -# Build PLAYERS.C -PLAYERS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\pfdefaults.h\ - -players.o: $(PLAYERS_C) $(DISTDIR)\src\players.c - $(CC) $(CFLAGS) $(DISTDIR)\src\players.c - -# Build OBJSAVE.C -OBJSAVE_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\spells.h\ - -objsave.obj: $(OBJSAVE_C) $(DISTDIR)\src\objsave.c - $(CC) $(CFLAGS) $(DISTDIR)\src\objsave.c - -# Build MODIFY.C -MODIFY_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\mail.h\ - $(DISTDIR)\src\boards.h\ - -modify.obj: $(MODIFY_C) $(DISTDIR)\src\modify.c - $(CC) $(CFLAGS) $(DISTDIR)\src\modify.c - -# Build MOBACT.C -MOBACT_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\spells.h\ - -mobact.obj: $(MOBACT_C) $(DISTDIR)\src\mobact.c - $(CC) $(CFLAGS) $(DISTDIR)\src\mobact.c - -# Build MAIL.C -MAIL_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\mail.h\ - -mail.obj: $(MAIL_C) $(DISTDIR)\src\mail.c - $(CC) $(CFLAGS) $(DISTDIR)\src\mail.c - -# Build MAGIC.C -MAGIC_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - -magic.obj: $(MAGIC_C) $(DISTDIR)\src\magic.c - $(CC) $(CFLAGS) $(DISTDIR)\src\magic.c - -# Build LIMITS.C -LIMITS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\handler.h\ - -limits.obj: $(LIMITS_C) $(DISTDIR)\src\limits.c - $(CC) $(CFLAGS) $(DISTDIR)\src\limits.c - -# Build INTERPRETER.C -INTERPRETER_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\mail.h\ - $(DISTDIR)\src\screen.h\ - -interpreter.obj: $(INTERPRETER_C) $(DISTDIR)\src\interpreter.c - $(CC) $(CFLAGS) $(DISTDIR)\src\interpreter.c - -# Build HOUSE.C -HOUSE_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\house.h\ - $(DISTDIR)\src\constants.h\ - -house.obj: $(HOUSE_C) $(DISTDIR)\src\house.c - $(CC) $(CFLAGS) $(DISTDIR)\src\house.c - -# Build HANDLER.C -HANDLER_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\spells.h\ - -handler.obj: $(HANDLER_C) $(DISTDIR)\src\handler.c - $(CC) $(CFLAGS) $(DISTDIR)\src\handler.c - -# Build GRAPH.C -GRAPH_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - -graph.obj: $(GRAPH_C) $(DISTDIR)\src\graph.c - $(CC) $(CFLAGS) $(DISTDIR)\src\graph.c - -# Build FIGHT.C -FIGHT_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\screen.h\ - -fight.obj: $(FIGHT_C) $(DISTDIR)\src\fight.c - $(CC) $(CFLAGS) $(DISTDIR)\src\fight.c - -# Build DB.C -DB_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\mail.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\house.h\ - -db.obj: $(DB_C) $(DISTDIR)\src\db.c - $(CC) $(CFLAGS) $(DISTDIR)\src\db.c - -# Build CONSTANTS.C -CONSTANTS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - -constants.obj: $(CONSTANTS_C) $(DISTDIR)\src\constants.c - $(CC) $(CFLAGS) $(DISTDIR)\src\constants.c - -# Build CONFIG.C -CONFIG_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - -config.obj: $(CONFIG_C) $(DISTDIR)\src\config.c - $(CC) $(CFLAGS) $(DISTDIR)\src\config.c - -# Build COMM.C -COMM_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\house.h\ - $(DISTDIR)\src\telnet.h\ - -comm.obj: $(COMM_C) $(DISTDIR)\src\comm.c - $(CC) $(CFLAGS) $(DISTDIR)\src\comm.c - -# Build CLASS.C -CLASS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\interpreter.h\ - -class.obj: $(CLASS_C) $(DISTDIR)\src\class.c - $(CC) $(CFLAGS) $(DISTDIR)\src\class.c - -# Build CASTLE.C -CASTLE_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - -castle.obj: $(CASTLE_C) $(DISTDIR)\src\castle.c - $(CC) $(CFLAGS) $(DISTDIR)\src\castle.c - -# Build BOARDS.C -BOARDS_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\boards.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - -boards.obj: $(BOARDS_C) $(DISTDIR)\src\boards.c - $(CC) $(CFLAGS) $(DISTDIR)\src\boards.c - -# Build BAN.C -BAN_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - -ban.obj: $(BAN_C) $(DISTDIR)\src\ban.c - $(CC) $(CFLAGS) $(DISTDIR)\src\ban.c - -# Build ACT.WIZARD.C -ACT_WIZARD_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\house.h\ - $(DISTDIR)\src\screen.h\ - $(DISTDIR)\src\constants.h\ - -act.wizard.obj: $(ACT_WIZARD_C) $(DISTDIR)\src\act.wizard.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.wizard.c - -# Build ACT.SOCIAL.C -ACT_SOCIAL_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - -act.social.obj: $(ACT_SOCIAL_C) $(DISTDIR)\src\act.social.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.social.c - -# Build ACT.OTHER.C -ACT_OTHER_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\screen.h\ - $(DISTDIR)\src\house.h\ - -act.other.obj: $(ACT_OTHER_C) $(DISTDIR)\src\act.other.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.other.c - -# Build ACT.OFFENSIVE.C -ACT_OFFENSIVE_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - -act.offensive.obj: $(ACT_OFFENSIVE_C) $(DISTDIR)\src\act.offensive.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.offensive.c - -# Build ACT.MOVEMENT.C -ACT_MOVEMENT_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\house.h\ - $(DISTDIR)\src\constants.h\ - -act.movement.obj: $(ACT_MOVEMENT_C) $(DISTDIR)\src\act.movement.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.movement.c - -# Build ACT.ITEM.C -ACT_ITEM_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - -act.item.obj: $(ACT_ITEM_C) $(DISTDIR)\src\act.item.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.item.c - -# Build ACT.INFORMATIVE.C -ACT_INFORMATIVE_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\spells.h\ - $(DISTDIR)\src\screen.h\ - $(DISTDIR)\src\constants.h\ - -act.informative.obj: $(ACT_INFORMATIVE_C) -$(DISTDIR)\src\act.informative.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.informative.c - -# Build ACT.COMM.C -ACT_COMM_C=\ - $(DISTDIR)\src\sysdep.h\ - $(DISTDIR)\src\structs.h\ - $(DISTDIR)\src\utils.h\ - $(DISTDIR)\src\comm.h\ - $(DISTDIR)\src\interpreter.h\ - $(DISTDIR)\src\handler.h\ - $(DISTDIR)\src\db.h\ - $(DISTDIR)\src\screen.h\ - -act.comm.obj: $(ACT_COMM_C) $(DISTDIR)\src\act.comm.c - $(CC) $(CFLAGS) $(DISTDIR)\src\act.comm.c - diff --git a/src/Makefile.msvc b/src/Makefile.msvc index cc06f68..6db0f77 100644 --- a/src/Makefile.msvc +++ b/src/Makefile.msvc @@ -39,7 +39,7 @@ OBJFILES = comm.obj act.comm.obj act.informative.obj act.movement.obj act.item.o asciimap.obj act.offensive.obj act.other.obj act.social.obj act.wizard.obj \ ban.obj boards.obj castle.obj class.obj config.obj constants.obj db.obj \ dg_event.obj dg_scripts.obj dg_triggers.obj fight.obj genolc.obj graph.obj \ -handler.obj house.obj ibt.obj interpreter.obj limits.obj lists.obj magic.obj \ +handler.obj house.obj ibt.obj interpreter.obj limits.obj lists.obj magic.obj main.obj \ mail.obj msgedit.obj mobact.obj modify.obj mud_event.obj oasis.obj oasis_copy.obj \ oasis_delete.obj oasis_list.obj objsave.obj protocol.obj shop.obj spec_assign.obj \ spec_procs.obj spell_parser.obj improved-edit.obj spells.obj utils.obj weather.obj \ @@ -59,113 +59,312 @@ circle.exe : $(OBJFILES) # Dependencies for the object files (automagically generated with # gcc -MM) -act.comm.obj: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h screen.h +act.comm.obj: act.comm.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h screen.h improved-edit.h \ + dg_scripts.h act.h modify.h $(CC) -c $(CFLAGS) act.comm.c -act.informative.obj: act.informative.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h screen.h constants.h +act.informative.obj: act.informative.c conf.h sysdep.h structs.h protocol.h \ + lists.h utils.h comm.h interpreter.h handler.h db.h spells.h screen.h \ + constants.h dg_scripts.h mud_event.h dg_event.h mail.h act.h class.h \ + fight.h modify.h asciimap.h quest.h $(CC) -c $(CFLAGS) act.informative.c -act.item.obj: act.item.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h +act.item.obj: act.item.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h spells.h constants.h \ + dg_scripts.h oasis.h act.h quest.h $(CC) -c $(CFLAGS) act.item.c -act.movement.obj: act.movement.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h constants.h +act.movement.obj: act.movement.c conf.h sysdep.h structs.h protocol.h \ + lists.h utils.h comm.h interpreter.h handler.h db.h spells.h house.h \ + constants.h dg_scripts.h act.h fight.h oasis.h $(CC) -c $(CFLAGS) act.movement.c -act.offensive.obj: act.offensive.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h +act.offensive.obj: act.offensive.c conf.h sysdep.h structs.h protocol.h \ + lists.h utils.h comm.h interpreter.h handler.h db.h spells.h act.h \ + fight.h mud_event.h dg_event.h $(CC) -c $(CFLAGS) act.offensive.c -act.other.obj: act.other.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h screen.h house.h +act.other.obj: act.other.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h spells.h screen.h house.h \ + constants.h dg_scripts.h act.h spec_procs.h class.h fight.h mail.h \ + shop.h quest.h modify.h $(CC) -c $(CFLAGS) act.other.c -act.social.obj: act.social.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h +act.social.obj: act.social.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h screen.h spells.h act.h $(CC) -c $(CFLAGS) act.social.c -act.wizard.obj: act.wizard.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h screen.h constants.h +act.wizard.obj: act.wizard.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h spells.h house.h screen.h \ + constants.h oasis.h dg_scripts.h shop.h act.h genzon.h class.h genolc.h \ + genobj.h fight.h modify.h quest.h ban.h $(CC) -c $(CFLAGS) act.wizard.c -ban.obj: ban.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h +aedit.obj: aedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + interpreter.h handler.h comm.h db.h oasis.h screen.h constants.h \ + genolc.h act.h + $(CC) -c $(CFLAGS) aedit.c +asciimap.obj: asciimap.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h spells.h house.h constants.h \ + dg_scripts.h asciimap.h + $(CC) -c $(CFLAGS) asciimap.c +ban.obj: ban.c conf.h sysdep.h structs.h protocol.h lists.h utils.h comm.h \ + interpreter.h handler.h db.h ban.h $(CC) -c $(CFLAGS) ban.c -boards.obj: boards.c conf.h sysdep.h structs.h utils.h comm.h db.h boards.h \ - interpreter.h handler.h +boards.obj: boards.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h db.h boards.h interpreter.h handler.h improved-edit.h modify.h $(CC) -c $(CFLAGS) boards.c -castle.obj: castle.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h +bsd-snprintf.obj: bsd-snprintf.c conf.h sysdep.h +castle.obj: castle.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h handler.h db.h spells.h act.h spec_procs.h fight.h $(CC) -c $(CFLAGS) castle.c -class.obj: class.c conf.h sysdep.h structs.h db.h utils.h spells.h interpreter.h +cedit.obj: cedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h db.h constants.h genolc.h oasis.h improved-edit.h \ + modify.h + $(CC) -c $(CFLAGS) cedit.c +class.obj: class.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h spells.h interpreter.h constants.h act.h class.h $(CC) -c $(CFLAGS) class.c -comm.obj: comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h house.h +comm.obj: comm.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h handler.h db.h house.h oasis.h genolc.h \ + dg_scripts.h dg_event.h screen.h constants.h boards.h act.h ban.h \ + msgedit.h fight.h spells.h modify.h quest.h ibt.h mud_event.h $(CC) -c $(CFLAGS) comm.c -config.obj: config.c conf.h sysdep.h structs.h +config.obj: config.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + interpreter.h config.h asciimap.h $(CC) -c $(CFLAGS) config.c -constants.obj: constants.c conf.h sysdep.h structs.h +constants.obj: constants.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h interpreter.h constants.h $(CC) -c $(CFLAGS) constants.c -db.obj: db.c conf.h sysdep.h structs.h utils.h db.h comm.h handler.h spells.h mail.h \ - interpreter.h house.h +db.obj: db.c conf.h sysdep.h structs.h protocol.h lists.h utils.h db.h \ + comm.h handler.h spells.h mail.h interpreter.h house.h constants.h \ + oasis.h dg_scripts.h dg_event.h act.h ban.h spec_procs.h genzon.h \ + genolc.h genobj.h config.h fight.h modify.h shop.h quest.h ibt.h \ + mud_event.h msgedit.h screen.h $(CC) -c $(CFLAGS) db.c -fight.obj: fight.c conf.h sysdep.h structs.h utils.h comm.h handler.h interpreter.h \ - db.h spells.h screen.h +dg_comm.obj: dg_comm.c conf.h sysdep.h structs.h protocol.h lists.h \ + dg_scripts.h utils.h comm.h handler.h db.h constants.h + $(CC) -c $(CFLAGS) dg_comm.c +dg_db_scripts.obj: dg_db_scripts.c conf.h sysdep.h structs.h protocol.h \ + lists.h dg_scripts.h utils.h db.h handler.h dg_event.h comm.h \ + constants.h interpreter.h + $(CC) -c $(CFLAGS) dg_db_scripts.c +dg_event.obj: dg_event.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h db.h dg_event.h constants.h comm.h mud_event.h + $(CC) -c $(CFLAGS) dg_event.c +dg_handler.obj: dg_handler.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h dg_scripts.h comm.h db.h handler.h spells.h dg_event.h \ + constants.h + $(CC) -c $(CFLAGS) dg_handler.c +dg_misc.obj: dg_misc.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + dg_scripts.h comm.h interpreter.h handler.h dg_event.h db.h screen.h \ + spells.h constants.h fight.h + $(CC) -c $(CFLAGS) dg_misc.c +dg_mobcmd.obj: dg_mobcmd.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h screen.h dg_scripts.h db.h handler.h interpreter.h comm.h \ + spells.h constants.h genzon.h act.h fight.h + $(CC) -c $(CFLAGS) dg_mobcmd.c +dg_objcmd.obj: dg_objcmd.c conf.h sysdep.h structs.h protocol.h lists.h \ + screen.h dg_scripts.h utils.h comm.h interpreter.h handler.h db.h \ + constants.h genzon.h fight.h + $(CC) -c $(CFLAGS) dg_objcmd.c +dg_olc.obj: dg_olc.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h db.h genolc.h interpreter.h oasis.h dg_olc.h dg_scripts.h \ + dg_event.h genzon.h constants.h modify.h + $(CC) -c $(CFLAGS) dg_olc.c +dg_scripts.obj: dg_scripts.c conf.h sysdep.h structs.h protocol.h lists.h \ + dg_scripts.h utils.h comm.h interpreter.h handler.h dg_event.h db.h \ + screen.h constants.h spells.h oasis.h genzon.h act.h modify.h + $(CC) -c $(CFLAGS) dg_scripts.c +dg_triggers.obj: dg_triggers.c conf.h sysdep.h structs.h protocol.h lists.h \ + dg_scripts.h utils.h comm.h interpreter.h handler.h db.h oasis.h \ + constants.h spells.h act.h + $(CC) -c $(CFLAGS) dg_triggers.c +dg_variables.obj: dg_variables.c conf.h sysdep.h structs.h protocol.h \ + lists.h dg_scripts.h utils.h comm.h interpreter.h handler.h dg_event.h \ + db.h fight.h screen.h constants.h spells.h oasis.h class.h quest.h act.h \ + genobj.h + $(CC) -c $(CFLAGS) dg_variables.c +dg_wldcmd.obj: dg_wldcmd.c conf.h sysdep.h structs.h protocol.h lists.h \ + screen.h dg_scripts.h utils.h comm.h interpreter.h handler.h db.h \ + constants.h genzon.h fight.h + $(CC) -c $(CFLAGS) dg_wldcmd.c +fight.obj: fight.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h handler.h interpreter.h db.h spells.h screen.h constants.h \ + dg_scripts.h act.h class.h fight.h shop.h quest.h $(CC) -c $(CFLAGS) fight.c -graph.obj: graph.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h spells.h - $(CC) -c $(CFLAGS) graph.c -handler.obj: handler.c conf.h sysdep.h structs.h utils.h comm.h db.h handler.h \ - interpreter.h spells.h - $(CC) -c $(CFLAGS) handler.c -house.obj: house.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h house.h constants.h - $(CC) -c $(CFLAGS) house.c -interpreter.obj: interpreter.c conf.h sysdep.h structs.h comm.h interpreter.h db.h \ - utils.h spells.h handler.h mail.h screen.h - $(CC) -c $(CFLAGS) interpreter.c -limits.obj: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \ - handler.h - $(CC) -c $(CFLAGS) limits.c -magic.obj: magic.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h db.h - $(CC) -c $(CFLAGS) magic.c -mail.obj: mail.c conf.h sysdep.h structs.h utils.h comm.h db.h interpreter.h \ - handler.h mail.h - $(CC) -c $(CFLAGS) mail.c -mobact.obj: mobact.c conf.h sysdep.h structs.h utils.h db.h comm.h interpreter.h \ - handler.h spells.h - $(CC) -c $(CFLAGS) mobact.c -modify.obj: modify.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h db.h \ - comm.h spells.h mail.h boards.h - $(CC) -c $(CFLAGS) modify.c -objsave.obj: objsave.c conf.h sysdep.h structs.h comm.h handler.h db.h \ - interpreter.h utils.h spells.h - $(CC) -c $(CFLAGS) objsave.c -players.o: players.c conf.h sysdep.h structs.h utils.h db.h handler.h pfdefaults.h - $(CC) -c $(CFLAGS) players.c -random.obj: random.c - $(CC) -c $(CFLAGS) random.c -shop.obj: shop.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h shop.h - $(CC) -c $(CFLAGS) shop.c -spec_assign.obj: spec_assign.c conf.h sysdep.h structs.h db.h interpreter.h \ - utils.h - $(CC) -c $(CFLAGS) spec_assign.c -spec_procs.obj: spec_procs.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) -c $(CFLAGS) spec_procs.c -spell_parser.obj: spell_parser.c conf.h sysdep.h structs.h utils.h interpreter.h \ - spells.h handler.h comm.h db.h - $(CC) -c $(CFLAGS) spell_parser.c -spells.obj: spells.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h \ - db.h constants.h - $(CC) -c $(CFLAGS) spells.c -utils.obj: utils.c conf.h sysdep.h structs.h utils.h comm.h screen.h spells.h \ - handler.h - $(CC) -c $(CFLAGS) utils.c -weather.obj: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \ - interpreter.h db.h - $(CC) -c $(CFLAGS) weather.c -quest.obj: quest.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h \ - comm.h db.h screen.h quest.h - $(CC) -c $(CFLAGS) quest.c -qedit.obj: qedit.c conf.h sysdep.h structs.h utils.h comm.h db.h oasis.h \ - improved-edit.h screen.h genolc.h genzon.h interpreter.h quest.h - $(CC) -c $(CFLAGS) qedit.c -genqst.obj: genqst.c conf.h sysdep.h structs.h utils.h db.h quest.h \ - genolc.h genzon.h +genmob.obj: genmob.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h shop.h handler.h genolc.h genmob.h genzon.h dg_olc.h dg_scripts.h \ + spells.h + $(CC) -c $(CFLAGS) genmob.c +genobj.obj: genobj.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h shop.h constants.h genolc.h genobj.h genzon.h dg_olc.h dg_scripts.h \ + handler.h interpreter.h boards.h + $(CC) -c $(CFLAGS) genobj.c +genolc.obj: genolc.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h handler.h comm.h shop.h oasis.h genolc.h genwld.h genmob.h genshp.h \ + genzon.h genobj.h dg_olc.h dg_scripts.h constants.h interpreter.h act.h \ + modify.h quest.h + $(CC) -c $(CFLAGS) genolc.c +genqst.obj: genqst.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h quest.h genolc.h genzon.h $(CC) -c $(CFLAGS) genqst.c +genshp.obj: genshp.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h shop.h genolc.h genshp.h genzon.h + $(CC) -c $(CFLAGS) genshp.c +genwld.obj: genwld.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h handler.h comm.h genolc.h genwld.h genzon.h shop.h dg_olc.h \ + dg_scripts.h mud_event.h dg_event.h + $(CC) -c $(CFLAGS) genwld.c +genzon.obj: genzon.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h genolc.h genzon.h dg_scripts.h + $(CC) -c $(CFLAGS) genzon.c +graph.obj: graph.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h handler.h db.h spells.h act.h constants.h graph.h \ + fight.h + $(CC) -c $(CFLAGS) graph.c +handler.obj: handler.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h db.h handler.h screen.h interpreter.h spells.h dg_scripts.h act.h \ + class.h fight.h quest.h mud_event.h dg_event.h + $(CC) -c $(CFLAGS) handler.c +hedit.obj: hedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h db.h boards.h oasis.h genolc.h genzon.h handler.h \ + improved-edit.h act.h hedit.h modify.h + $(CC) -c $(CFLAGS) hedit.c +house.obj: house.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h handler.h db.h interpreter.h house.h constants.h modify.h + $(CC) -c $(CFLAGS) house.c +ibt.obj: ibt.c conf.h sysdep.h structs.h protocol.h lists.h utils.h comm.h \ + db.h handler.h interpreter.h constants.h screen.h act.h ibt.h oasis.h \ + improved-edit.h modify.h + $(CC) -c $(CFLAGS) ibt.c +improved-edit.obj: improved-edit.c conf.h sysdep.h structs.h protocol.h \ + lists.h utils.h db.h comm.h interpreter.h improved-edit.h dg_scripts.h \ + modify.h +interpreter.obj: interpreter.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h db.h spells.h handler.h mail.h screen.h \ + genolc.h oasis.h improved-edit.h dg_scripts.h constants.h act.h ban.h \ + class.h graph.h hedit.h house.h config.h modify.h quest.h asciimap.h \ + prefedit.h ibt.h mud_event.h dg_event.h + $(CC) -c $(CFLAGS) interpreter.c +limits.obj: limits.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + spells.h comm.h db.h handler.h interpreter.h dg_scripts.h class.h \ + fight.h screen.h mud_event.h dg_event.h + $(CC) -c $(CFLAGS) limits.c +lists.obj: lists.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h dg_event.h + $(CC) -c $(CFLAGS) lists.c +magic.obj: magic.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h spells.h handler.h db.h interpreter.h constants.h dg_scripts.h \ + class.h fight.h mud_event.h dg_event.h + $(CC) -c $(CFLAGS) magic.c +mail.obj: mail.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h db.h interpreter.h handler.h mail.h modify.h + $(CC) -c $(CFLAGS) mail.c +main.obj: main.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h handler.h db.h house.h oasis.h genolc.h \ + dg_scripts.h dg_event.h screen.h constants.h boards.h act.h ban.h \ + msgedit.h fight.h spells.h modify.h quest.h ibt.h mud_event.h + $(CC) -c $(CFLAGS) main.c +medit.obj: medit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + interpreter.h comm.h spells.h db.h shop.h genolc.h genmob.h genzon.h \ + genshp.h oasis.h handler.h constants.h improved-edit.h dg_olc.h \ + dg_scripts.h screen.h fight.h modify.h + $(CC) -c $(CFLAGS) medit.c +mobact.obj: mobact.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h comm.h interpreter.h handler.h spells.h constants.h act.h graph.h \ + fight.h + $(CC) -c $(CFLAGS) mobact.c +modify.obj: modify.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + interpreter.h handler.h db.h comm.h spells.h mail.h boards.h \ + improved-edit.h oasis.h class.h dg_scripts.h modify.h quest.h ibt.h + $(CC) -c $(CFLAGS) modify.c +msgedit.obj: msgedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h screen.h spells.h db.h msgedit.h oasis.h genolc.h interpreter.h \ + modify.h + $(CC) -c $(CFLAGS) msgedit.c +mud_event.obj: mud_event.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h db.h dg_event.h constants.h comm.h mud_event.h + $(CC) -c $(CFLAGS) mud_event.c +oasis.obj: oasis.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + interpreter.h comm.h db.h shop.h genolc.h genmob.h genshp.h genzon.h \ + genwld.h genobj.h oasis.h screen.h dg_olc.h dg_scripts.h act.h handler.h \ + quest.h ibt.h msgedit.h + $(CC) -c $(CFLAGS) oasis.c +oasis_copy.obj: oasis_copy.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h shop.h genshp.h genolc.h \ + genzon.h genwld.h oasis.h improved-edit.h constants.h dg_scripts.h + $(CC) -c $(CFLAGS) oasis_copy.c +oasis_delete.obj: oasis_delete.c conf.h sysdep.h structs.h protocol.h \ + lists.h utils.h comm.h interpreter.h handler.h db.h genolc.h oasis.h \ + improved-edit.h + $(CC) -c $(CFLAGS) oasis_delete.c +oasis_list.obj: oasis_list.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h genolc.h oasis.h \ + improved-edit.h shop.h screen.h constants.h dg_scripts.h quest.h \ + modify.h spells.h + $(CC) -c $(CFLAGS) oasis_list.c +objsave.obj: objsave.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h handler.h db.h interpreter.h spells.h act.h class.h config.h \ + modify.h genolc.h + $(CC) -c $(CFLAGS) objsave.c +oedit.obj: oedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h spells.h db.h boards.h constants.h shop.h genolc.h \ + genobj.h genzon.h oasis.h improved-edit.h dg_olc.h dg_scripts.h fight.h \ + modify.h + $(CC) -c $(CFLAGS) oedit.c +players.obj: players.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h handler.h pfdefaults.h dg_scripts.h comm.h interpreter.h genolc.h \ + config.h quest.h + $(CC) -c $(CFLAGS) players.c +prefedit.obj: prefedit.c conf.h sysdep.h structs.h protocol.h lists.h \ + comm.h utils.h handler.h interpreter.h db.h oasis.h prefedit.h screen.h + $(CC) -c $(CFLAGS) prefedit.c +protocol.obj: protocol.c conf.h protocol.h sysdep.h structs.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h screen.h improved-edit.h \ + dg_scripts.h act.h modify.h + $(CC) -c $(CFLAGS) protocol.c +qedit.obj: qedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h db.h oasis.h improved-edit.h screen.h genolc.h genzon.h \ + interpreter.h modify.h quest.h + $(CC) -c $(CFLAGS) qedit.c +quest.obj: quest.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + interpreter.h handler.h db.h comm.h screen.h quest.h act.h + $(CC) -c $(CFLAGS) quest.c +random.obj: random.c conf.h sysdep.h structs.h protocol.h lists.h utils.h + $(CC) -c $(CFLAGS) random.c +redit.obj: redit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h db.h boards.h genolc.h genwld.h genzon.h oasis.h \ + improved-edit.h dg_olc.h dg_scripts.h constants.h modify.h + $(CC) -c $(CFLAGS) redit.c +sedit.obj: sedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h db.h shop.h genolc.h genshp.h genzon.h oasis.h \ + constants.h + $(CC) -c $(CFLAGS) sedit.c +shop.obj: shop.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h handler.h db.h interpreter.h shop.h genshp.h constants.h act.h \ + modify.h spells.h screen.h + $(CC) -c $(CFLAGS) shop.c +spec_assign.obj: spec_assign.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h db.h interpreter.h spec_procs.h ban.h boards.h mail.h + $(CC) -c $(CFLAGS) spec_assign.c +spec_procs.obj: spec_procs.c conf.h sysdep.h structs.h protocol.h lists.h \ + utils.h comm.h interpreter.h handler.h db.h spells.h constants.h act.h \ + spec_procs.h class.h fight.h modify.h + $(CC) -c $(CFLAGS) spec_procs.c +spell_parser.obj: spell_parser.c conf.h sysdep.h structs.h protocol.h \ + lists.h utils.h interpreter.h spells.h handler.h comm.h db.h \ + dg_scripts.h fight.h + $(CC) -c $(CFLAGS) spell_parser.c +spells.obj: spells.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h spells.h handler.h db.h constants.h interpreter.h dg_scripts.h \ + act.h fight.h + $(CC) -c $(CFLAGS) spells.c +tedit.obj: tedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + interpreter.h comm.h db.h genolc.h oasis.h improved-edit.h modify.h + $(CC) -c $(CFLAGS) tedit.c +utils.obj: utils.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + db.h comm.h modify.h screen.h spells.h handler.h interpreter.h class.h + $(CC) -c $(CFLAGS) utils.c +weather.obj: weather.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h db.h + $(CC) -c $(CFLAGS) weather.c +zedit.obj: zedit.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \ + comm.h interpreter.h db.h constants.h genolc.h genzon.h oasis.h \ + dg_scripts.h + $(CC) -c $(CFLAGS) zedit.c +zmalloc.obj: zmalloc.c conf.h + $(CC) -c $(CFLAGS) zmalloc.c \ No newline at end of file diff --git a/src/Makefile.os2 b/src/Makefile.os2 deleted file mode 100644 index 765d057..0000000 --- a/src/Makefile.os2 +++ /dev/null @@ -1,205 +0,0 @@ -# CircleMUD Makefile for OS/2 (manually created by David Carver) - -# C compiler to use -CC = gcc - -# Any special flags you want to pass to the compiler -MYFLAGS = -O2 -Wall - -#flags for profiling (see hacker.doc for more information) -PROFILE = - -# Libraires that need to be included for use with GCC for OS/2 -LIB = -lsocket - -############################################################################## -# Do Not Modify Anything Below This Line (unless you know what you're doing) # -############################################################################## - -# For compiling circle with GDB debugger Information -#CFLAGS = -g -O $(MYFLAGS) $(PROFILE) -# Uncomment the line below if you don't want to compile with GDB info -CFLAGS = $(MYFLAGS) $(PROFILE) - -OBJFILES = comm.o act.comm.o act.informative.o act.movement.o act.item.o \ - act.offensive.o act.other.o act.social.o act.wizard.o ban.o boards.o \ - castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \ - house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \ - objsave.o shop.o spec_assign.o spec_procs.o spell_parser.o \ - spells.o utils.o weather.o random.o players.o quest.o qedit.o genqst.o - -default: .accepted - $(MAKE) ../bin/circle - -.accepted: - @./licheck more - -utils: .accepted - $(MAKE) ../bin/asciipasswd - $(MAKE) ../bin/autowiz - $(MAKE) ../bin/listrent - $(MAKE) ../bin/plrtoascii - $(MAKE) ../bin/shopconv - $(MAKE) ../bin/sign - $(MAKE) ../bin/split - $(MAKE) ../bin/wld2html - -all: .accepted - $(MAKE) ../bin/circle - $(MAKE) utils - -circle: - $(MAKE) ../bin/circle -asciipasswd: - $(MAKE) ../bin/asciipasswd -autowiz: - $(MAKE) ../bin/autowiz -listrent: - $(MAKE) ../bin/listrent -plrtoascii: - $(MAKE) ../bin/plrtoascii -shopconv: - $(MAKE) ../bin/shopconv -sign: - $(MAKE) ../bin/sign -split: - $(MAKE) ../bin/split -wld2html: - $(MAKE) ../bin/wld2html - - -../bin/asciipasswd: util/asciipasswd.c conf.h sysdep.h structs.h utils.h - $(CC) $(CFLAGS) -o ../bin/asciipasswd util/asciipasswd.c -../bin/autowiz: util/autowiz.c conf.h sysdep.h structs.h utils.h db.h - $(CC) $(CFLAGS) -o ../bin/autowiz util/autowiz.c -../bin/listrent: util/listrent.c conf.h sysdep.h structs.h - $(CC) $(CFLAGS) -o ../bin/listrent util/listrent.c -../bin/plrtoascii: util/plrtoascii.c conf.h sysdep.h db.h pfdefaults.h - $(CC) $(CFLAGS) -o ../bin/plrtoascii util/plrtoascii.c -../bin/shopconv: util/shopconv.c conf.h sysdep.h structs.h db.h utils.h shop.h - $(CC) $(CFLAGS) -o ../bin/shopconv util/shopconv.c -../bin/sign: util/sign.c conf.h sysdep.h - $(CC) $(CFLAGS) -o ../bin/sign util/sign.c -../bin/split: util/split.c - $(CC) $(CFLAGS) -o ../bin/split util/split.c -../bin/wld2html: util/wld2html.c - $(CC) $(CFLAGS) -o ../bin/wld2html util/wld2html.c - -../bin/circle : $(OBJFILES) - $(CC) -o circle.exe $(PROFILE) $(OBJFILES) $(LIB) -clean: - rm -f *.o - -# Dependencies for the object files (automagically generated with -# gcc -MM) - -act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h screen.h - $(CC) -c $(CFLAGS) act.comm.c -act.informative.o: act.informative.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h screen.h constants.h - $(CC) -c $(CFLAGS) act.informative.c -act.item.o: act.item.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h - $(CC) -c $(CFLAGS) act.item.c -act.movement.o: act.movement.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h constants.h - $(CC) -c $(CFLAGS) act.movement.c -act.offensive.o: act.offensive.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) -c $(CFLAGS) act.offensive.c -act.other.o: act.other.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h screen.h house.h - $(CC) -c $(CFLAGS) act.other.c -act.social.o: act.social.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) -c $(CFLAGS) act.social.c -act.wizard.o: act.wizard.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h screen.h constants.h - $(CC) -c $(CFLAGS) act.wizard.c -ban.o: ban.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h - $(CC) -c $(CFLAGS) ban.c -boards.o: boards.c conf.h sysdep.h structs.h utils.h comm.h db.h boards.h \ - interpreter.h handler.h - $(CC) -c $(CFLAGS) boards.c -castle.o: castle.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h - $(CC) -c $(CFLAGS) castle.c -class.o: class.c conf.h sysdep.h structs.h db.h utils.h spells.h interpreter.h - $(CC) -c $(CFLAGS) class.c -comm.o: comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h house.h - $(CC) -c $(CFLAGS) comm.c -config.o: config.c conf.h sysdep.h structs.h - $(CC) -c $(CFLAGS) config.c -constants.o: constants.c conf.h sysdep.h structs.h - $(CC) -c $(CFLAGS) constants.c -db.o: db.c conf.h sysdep.h structs.h utils.h db.h comm.h handler.h spells.h mail.h \ - interpreter.h house.h - $(CC) -c $(CFLAGS) db.c -fight.o: fight.c conf.h sysdep.h structs.h utils.h comm.h handler.h interpreter.h \ - db.h spells.h screen.h - $(CC) -c $(CFLAGS) fight.c -graph.o: graph.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h spells.h - $(CC) -c $(CFLAGS) graph.c -handler.o: handler.c conf.h sysdep.h structs.h utils.h comm.h db.h handler.h \ - interpreter.h spells.h - $(CC) -c $(CFLAGS) handler.c -house.o: house.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h house.h constants.h - $(CC) -c $(CFLAGS) house.c -interpreter.o: interpreter.c conf.h sysdep.h structs.h comm.h interpreter.h db.h \ - utils.h spells.h handler.h mail.h screen.h - $(CC) -c $(CFLAGS) interpreter.c -limits.o: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \ - handler.h - $(CC) -c $(CFLAGS) limits.c -magic.o: magic.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h db.h - $(CC) -c $(CFLAGS) magic.c -mail.o: mail.c conf.h sysdep.h structs.h utils.h comm.h db.h interpreter.h \ - handler.h mail.h - $(CC) -c $(CFLAGS) mail.c -mobact.o: mobact.c conf.h sysdep.h structs.h utils.h db.h comm.h interpreter.h \ - handler.h spells.h - $(CC) -c $(CFLAGS) mobact.c -modify.o: modify.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h db.h \ - comm.h spells.h mail.h boards.h - $(CC) -c $(CFLAGS) modify.c -objsave.o: objsave.c conf.h sysdep.h structs.h comm.h handler.h db.h \ - interpreter.h utils.h spells.h - $(CC) -c $(CFLAGS) objsave.c -players.o: players.c conf.h sysdep.h structs.h utils.h db.h handler.h pfdefaults.h - $(CC) -c $(CFLAGS) players.c -random.o: random.c - $(CC) -c $(CFLAGS) random.c -shop.o: shop.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h shop.h - $(CC) -c $(CFLAGS) shop.c -spec_assign.o: spec_assign.c conf.h sysdep.h structs.h db.h interpreter.h \ - utils.h - $(CC) -c $(CFLAGS) spec_assign.c -spec_procs.o: spec_procs.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) -c $(CFLAGS) spec_procs.c -spell_parser.o: spell_parser.c conf.h sysdep.h structs.h utils.h interpreter.h \ - spells.h handler.h comm.h db.h - $(CC) -c $(CFLAGS) spell_parser.c -spells.o: spells.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h \ - db.h constants.h - $(CC) -c $(CFLAGS) spells.c -utils.o: utils.c conf.h sysdep.h structs.h utils.h comm.h screen.h spells.h \ - handler.h - $(CC) -c $(CFLAGS) utils.c -weather.o: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \ - interpreter.h db.h - $(CC) -c $(CFLAGS) weather.c -quest.obj: quest.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h \ - comm.h db.h screen.h quest.h - $(CC) -c $(CFLAGS) quest.c -qedit.obj: qedit.c conf.h sysdep.h structs.h utils.h comm.h db.h oasis.h \ - improved-edit.h screen.h genolc.h genzon.h interpreter.h quest.h - $(CC) -c $(CFLAGS) qedit.c -genqst.obj: genqst.c conf.h sysdep.h structs.h utils.h db.h quest.h \ - genolc.h genzon.h - $(CC) -c $(CFLAGS) genqst.c diff --git a/src/SCOPTIONS b/src/SCOPTIONS deleted file mode 100644 index 5a52cc4..0000000 --- a/src/SCOPTIONS +++ /dev/null @@ -1,12 +0,0 @@ -DATA=FAR -CODE=FAR -MATH=STANDARD -ANSI -NOSTACKCHECK -MODIFIED -STACKEXTEND -NOICONS -ONERROR=CONTINUE -INCLUDEDIR=include:netinclude -LIBRARY=LIB:net.lib -LINKEROPTIONS="bufsize 4096" diff --git a/src/Smakefile b/src/Smakefile deleted file mode 100644 index 1f62ca5..0000000 --- a/src/Smakefile +++ /dev/null @@ -1,192 +0,0 @@ -# CircleMUD makefile for the Amiga - -# C compiler to use -CC = sc - -# Any special flags you want to pass to the compiler -MYFLAGS = - -#flags for profiling (see hacker.doc for more information) -PROFILE = - -############################################################################## -# Do Not Modify Anything Below This Line (unless you know what you're doing) # -############################################################################## - -CFLAGS = NOLINK $(MYFLAGS) $(PROFILE) - -MAKE = SMAKE - -OBJFILES = comm.o act.comm.o act.informative.o act.movement.o act.item.o \ - act.offensive.o act.other.o act.social.o act.wizard.o ban.o boards.o \ - castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \ - house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \ - objsave.o olc.o shop.o spec_assign.o spec_procs.o spell_parser.o \ - spells.o utils.o weather.o random.o players.o - -default: - $(MAKE) /bin/circle - - -utils: - $(MAKE) /bin/asciipasswd - $(MAKE) /bin/autowiz - $(MAKE) /bin/listrent - $(MAKE) /bin/plrtoascii - $(MAKE) /bin/shopconv - $(MAKE) /bin/sign - $(MAKE) /bin/split - $(MAKE) /bin/wld2html - -all: .accepted - $(MAKE) /bin/circle - $(MAKE) utils - -circle: - $(MAKE) /bin/circle -asciipasswd: - $(MAKE) /bin/asciipasswd -autowiz: - $(MAKE) /bin/autowiz -listrent: - $(MAKE) /bin/listrent -plrtoascii: - $(MAKE) /bin/plrtoascii -shopconv: - $(MAKE) /bin/shopconv -sign: - $(MAKE) /bin/sign -split: - $(MAKE) /bin/split -wld2html: - $(MAKE) /bin/wld2html - - -/bin/asciipasswd: util/asciipasswd.c conf.h sysdep.h structs.h utils.h - $(CC) $(CFLAGS) /bin/asciipasswd util/asciipasswd.c LINK -/bin/autowiz: util/autowiz.c conf.h sysdep.h structs.h utils.h db.h - $(CC) $(CFLAGS) /bin/autowiz util/autowiz.c LINK -/bin/listrent: util/listrent.c conf.h sysdep.h structs.h - $(CC) $(CFLAGS) /bin/listrent util/listrent.c LINK -/bin/plrtoascii: util/plrtoascii.c conf.h sysdep.h db.h pfdefaults.h - $(CC) $(CFLAGS) /bin/plrtoascii util/plrtoascii.c LINK -/bin/shopconv: util/shopconv.c conf.h sysdep.h structs.h db.h utils.h shop.h - $(CC) $(CFLAGS) /bin/shopconv util/shopconv.c LINK -/bin/sign: util/sign.c conf.h sysdep.h - $(CC) $(CFLAGS) /bin/sign util/sign.c LINK -/bin/split: util/split.c - $(CC) $(CFLAGS) /bin/split util/split.c LINK -/bin/wld2html: util/wld2html.c - $(CC) $(CFLAGS) /bin/wld2html util/wld2html.c LINK - -/bin/circle : $(OBJFILES) - $(CC) $(PROFILE) $(OBJFILES) TO /bin/circle LINK - -# Dependencies for the object files (automagically generated with -# gcc -MM) - -act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h screen.h - $(CC) $(CFLAGS) act.comm.c -act.informative.o: act.informative.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h screen.h - $(CC) $(CFLAGS) act.informative.c -act.item.o: act.item.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h - $(CC) $(CFLAGS) act.item.c -act.movement.o: act.movement.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h - $(CC) $(CFLAGS) act.movement.c -act.offensive.o: act.offensive.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) $(CFLAGS) act.offensive.c -act.other.o: act.other.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h screen.h house.h - $(CC) $(CFLAGS) act.other.c -act.social.o: act.social.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) $(CFLAGS) act.social.c -act.wizard.o: act.wizard.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h house.h screen.h - $(CC) $(CFLAGS) act.wizard.c -ban.o: ban.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h - $(CC) $(CFLAGS) ban.c -boards.o: boards.c conf.h sysdep.h structs.h utils.h comm.h db.h boards.h \ - interpreter.h handler.h - $(CC) $(CFLAGS) boards.c -castle.o: castle.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ - handler.h db.h spells.h - $(CC) $(CFLAGS) castle.c -class.o: class.c conf.h sysdep.h structs.h db.h utils.h spells.h interpreter.h - $(CC) $(CFLAGS) class.c -comm.o: comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h house.h - $(CC) $(CFLAGS) comm.c -config.o: config.c conf.h sysdep.h structs.h - $(CC) $(CFLAGS) config.c -constants.o: constants.c conf.h sysdep.h structs.h - $(CC) $(CFLAGS) constants.c -db.o: db.c conf.h sysdep.h structs.h utils.h db.h comm.h handler.h spells.h mail.h \ - interpreter.h house.h - $(CC) $(CFLAGS) db.c -fight.o: fight.c conf.h sysdep.h structs.h utils.h comm.h handler.h interpreter.h \ - db.h spells.h screen.h - $(CC) $(CFLAGS) fight.c -graph.o: graph.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ - db.h spells.h - $(CC) $(CFLAGS) graph.c -handler.o: handler.c conf.h sysdep.h structs.h utils.h comm.h db.h handler.h \ - interpreter.h spells.h - $(CC) $(CFLAGS) handler.c -house.o: house.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h house.h - $(CC) $(CFLAGS) house.c -interpreter.o: interpreter.c conf.h sysdep.h structs.h comm.h interpreter.h db.h \ - utils.h spells.h handler.h mail.h screen.h - $(CC) $(CFLAGS) interpreter.c -limits.o: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \ - handler.h - $(CC) $(CFLAGS) limits.c -magic.o: magic.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h db.h - $(CC) $(CFLAGS) magic.c -mail.o: mail.c conf.h sysdep.h structs.h utils.h comm.h db.h interpreter.h \ - handler.h mail.h - $(CC) $(CFLAGS) mail.c -mobact.o: mobact.c conf.h sysdep.h structs.h utils.h db.h comm.h interpreter.h \ - handler.h spells.h - $(CC) $(CFLAGS) mobact.c -modify.o: modify.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h db.h \ - comm.h spells.h mail.h boards.h - $(CC) $(CFLAGS) modify.c -objsave.o: objsave.c conf.h sysdep.h structs.h comm.h handler.h db.h \ - interpreter.h utils.h spells.h - $(CC) $(CFLAGS) objsave.c -olc.o: olc.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h \ - olc.h - $(CC) $(CFLAGS) olc.c -players.o: players.c conf.h sysdep.h structs.h utils.h db.h handler.h pfdefaults.h - $(CC) -c $(CFLAGS) players.c -random.o: random.c - $(CC) $(CFLAGS) random.c -shop.o: shop.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ - utils.h shop.h - $(CC) $(CFLAGS) shop.c -spec_assign.o: spec_assign.c conf.h sysdep.h structs.h db.h interpreter.h \ - utils.h - $(CC) $(CFLAGS) spec_assign.c -spec_procs.o: spec_procs.c conf.h sysdep.h structs.h utils.h comm.h \ - interpreter.h handler.h db.h spells.h - $(CC) $(CFLAGS) spec_procs.c -spell_parser.o: spell_parser.c conf.h sysdep.h structs.h utils.h interpreter.h \ - spells.h handler.h comm.h db.h - $(CC) $(CFLAGS) spell_parser.c -spells.o: spells.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h \ - db.h - $(CC) $(CFLAGS) spells.c -utils.o: utils.c conf.h sysdep.h structs.h utils.h comm.h screen.h spells.h \ - handler.h - $(CC) $(CFLAGS) utils.c -weather.o: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \ - interpreter.h db.h - $(CC) $(CFLAGS) weather.c - diff --git a/src/build_circlemud.com b/src/build_circlemud.com deleted file mode 100755 index 94ba37c..0000000 --- a/src/build_circlemud.com +++ /dev/null @@ -1,517 +0,0 @@ -$! -$! BUILD_CIRCLEMUD.COM -$! Written By: Robert Alan Byer -$! byer@mail.ourservers.net -$! -$! This script checks the file names and then compiles and links CircleMUD for -$! OpenVMS using DEC C and the DEC C TCP/IP socket routines. -$! -$! The script accepts the following parameters. -$! -$! P1 ALL Build Everything. -$! CIRCLE Just Build [-.BIN]CIRCLE.EXE. -$! UTILS Just Build The CircleMUD Utilities. -$! -$! P2 DEBUG Build With Debugger Information. -$! NODEBUG Build Withoug Debugger Information. -$! -$! The default is "ALL" and "NODEBUG". -$! -$! Check To Make Sure We Have Valid Command Line Parameters. -$! -$ GOSUB CHECK_OPTIONS -$! -$! Check To See If We Are On An AXP Machine. -$! -$ IF (F$GETSYI("CPU").LT.128) -$ THEN -$! -$! We Are On A VAX Machine So Tell The User. -$! -$ WRITE SYS$OUTPUT "Compiling On A VAX Machine." -$! -$! Else, We Are On An AXP Machine. -$! -$ ELSE -$! -$! We Are On A AXP Machine So Tell The User. -$! -$ WRITE SYS$OUTPUT "Compiling On A AXP Machine." -$! -$! End Of The Machine Check. -$! -$ ENDIF -$! -$! Check The CONF.H File. -$! -$ GOSUB CHECK_CONF_FILE -$! -$! Check Filenames. -$! -$ GOSUB CHECK_FILE_NAMES -$! -$! Check To See What We Are To Do. -$! -$ IF (BUILDALL.EQS."TRUE") -$ THEN -$! -$! Since Nothing Special Was Specified, Build Everything. -$! -$ GOSUB BUILD_CIRCLE -$ GOSUB BUILD_UTILS -$! -$! Else... -$! -$ ELSE -$! -$! Build Just What The User Wants Us To Build. -$! -$ GOSUB BUILD_'BUILDALL' -$! -$! Time To End The Build Check. -$! -$ ENDIF -$! -$! Time To EXIT. -$! -$ EXIT -$! -$! Build [-.BIN]CIRCLE.EXE -$! -$ BUILD_CIRCLE: -$! -$! Tell The User What We Are Doing. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "Compiling [-.BIN]CIRCLE.EXE" -$ WRITE SYS$OUTPUT "" -$! -$! Define The CIRCLE.EXE Files That Are Necessary. -$! -$ CIRCLE_FILES = "ACT_COMM,ACT_INFORMATIVE,ACT_ITEM,ACT_MOVEMENT," + - - "ACT_OFFENSIVE,ACT_OTHER,ACT_SOCIAL,ACT_WIZARD," + - - "ALIAS,BAN,BOARDS,CASTLE,CLASS,COMM,CONFIG," + - - "CONSTANTS,DB,FIGHT,GRAPH,HANDLER,HOUSE," + - - "INTERPRETER,LIMITS,MAGIC,MAIL,MOBACT,MODIFY," + - - "OBJSAVE,OLC,PLAYERS,RANDOM,SHOP,SPEC_ASSIGN," + - - "SPEC_PROCS,SPELLS,SPELL_PARSER,UTILS,WEATHER" -$! -$! Define A File Counter And Set It To "0". -$! -$ CIRCLE_FILE_COUNTER = 0 -$! -$! Top Of The File Loop. -$! -$ NEXT_CIRCLE_FILE: -$! -$! O.K, Extract The File Name From The File List. -$! -$ CIRCLE_FILE_NAME = F$ELEMENT(CIRCLE_FILE_COUNTER,",",CIRCLE_FILES) -$! -$! Check To See If We Are At The End Of The File List. -$! -$ IF (CIRCLE_FILE_NAME.EQS.",") THEN GOTO CIRCLE_FILE_DONE -$! -$! Increment The Counter. -$! -$ CIRCLE_FILE_COUNTER = CIRCLE_FILE_COUNTER + 1 -$! -$! Create The Source File Name. -$! -$ CIRCLE_SOURCE_FILE = "SYS$DISK:[]" + CIRCLE_FILE_NAME + ".C" -$! -$! Create The Object File Name. -$! -$ CIRCLE_OBJECT_FILE = "SYS$DISK:[]" + CIRCLE_FILE_NAME + ".OBJ" -$! -$! Check To See If The File We Want To Compile Actually Exists. -$! -$ IF (F$SEARCH(CIRCLE_SOURCE_FILE).EQS."") -$ THEN -$! -$! Tell The User That The File Dosen't Exist. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "The File ",CIRCLE_SOURCE_FILE," Dosen't Exist." -$ WRITE SYS$OUTPUT "" -$! -$! Exit The Build. -$! -$ EXIT -$! -$! End The File Check. -$! -$ ENDIF -$! -$! Tell The User What We Are Compiling. -$! -$ WRITE SYS$OUTPUT " ",CIRCLE_SOURCE_FILE -$! -$! Compile The File. -$! -$ CC/PREFIX=ALL/'OPTIMIZE'/'DEBUGGER'/DEFINE=("DECC=1") - - /OBJECT='CIRCLE_OBJECT_FILE' 'CIRCLE_SOURCE_FILE' -$! -$! Go Back And Do It Again. -$! -$ GOTO NEXT_CIRCLE_FILE -$! -$! All Done Compiling. -$! -$ CIRCLE_FILE_DONE: -$! -$! Tell The User We Are Linking [-.BIN]CIRCLE.EXE -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "Linking [-.BIN]CIRCLE.EXE" -$ WRITE SYS$OUTPUT "" -$! -$! Link [-.BIN]CIRCLE.EXE -$! -$ LINK/'DEBUGGER'/'TRACEBACK'/EXE=[-.BIN]CIRCLE.EXE - - COMM.OBJ,ACT_COMM.OBJ,ACT_INFORMATIVE.OBJ,ACT_ITEM.OBJ, - - ACT_MOVEMENT.OBJ,ACT_OFFENSIVE.OBJ,ACT_OTHER.OBJ, - - ACT_SOCIAL.OBJ,ACT_WIZARD.OBJ,ALIAS.OBJ,BAN.OBJ,BOARDS.OBJ, - - CASTLE.OBJ,CLASS.OBJ,CONFIG.OBJ,CONSTANTS.OBJ,DB.OBJ,FIGHT.OBJ, - - GRAPH.OBJ,HANDLER.OBJ,HOUSE.OBJ,INTERPRETER.OBJ,LIMITS.OBJ,MAGIC.OBJ, - - MAIL.OBJ,MOBACT.OBJ,MODIFY.OBJ,OBJSAVE.OBJ,PLAYERS.OBJ,OLC.OBJ, - - RANDOM.OBJ,SHOP.OBJ,SPEC_ASSIGN.OBJ,SPEC_PROCS.OBJ,SPELLS.OBJ, - - SPELL_PARSER.OBJ,UTILS.OBJ,WEATHER.OBJ$! -$! That's It, Time To Return From Where We Came From. -$! -$ RETURN -$! -$! Build The CircleMUD Utilities. -$! -$ BUILD_UTILS: -$! -$! Tell The User What We Are Doing. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "Building CircleMUD Utilities." -$ WRITE SYS$OUTPUT "" -$! -$! Define The Source Files That Are Necessary. -$! -$ UTIL_FILES = "ASCIIPASSWD,LISTRENT,PLRTOASCII,SHOPCONV,SPLIT," + - - "WLD2HTML" -$! -$! Define A File Counter And Set It To "0". -$! -$ UTIL_FILE_COUNTER = 0 -$! -$! Top Of The File Loop. -$! -$ NEXT_UTIL_FILE: -$! -$! O.K, Extract The File Name From The File List. -$! -$ UTIL_FILE_NAME = F$ELEMENT(UTIL_FILE_COUNTER,",",UTIL_FILES) -$! -$! Check To See If We Are At The End Of The File List. -$! -$ IF (UTIL_FILE_NAME.EQS.",") THEN GOTO UTIL_FILE_DONE -$! -$! Increment The Counter. -$! -$ UTIL_FILE_COUNTER = UTIL_FILE_COUNTER + 1 -$! -$! Create The Source File Name. -$! -$ UTIL_SOURCE_FILE = "SYS$DISK:[.UTIL]" + UTIL_FILE_NAME + ".C" -$! -$! Create The Object File Name. -$! -$ UTIL_OBJECT_FILE = "SYS$DISK:[.UTIL]" + UTIL_FILE_NAME + ".OBJ" -$! -$! Check To See If The File We Want To Compile Actually Exists. -$! -$ IF (F$SEARCH(UTIL_SOURCE_FILE).EQS."") -$ THEN -$! -$! Tell The User That The File Dosen't Exist. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "The File ",UTIL_SOURCE_FILE," Dosen't Exist." -$ WRITE SYS$OUTPUT "" -$! -$! Exit The Build. -$! -$ EXIT -$ ENDIF -$! -$! Tell The User What We Are Building. -$! -$ WRITE SYS$OUTPUT "Building SYS$DISK:[-.BIN]",UTIL_FILE_NAME,".EXE" -$! -$! Compile The File. -$! -$ CC/PREFIX=ALL/STANDARD=ANSI89/'OPTIMIZE'/'DEBUGGER'/DEFINE=("DECC=1") - - /INCLUDE=SYS$DISK:[]/OBJECT='UTIL_OBJECT_FILE' 'UTIL_SOURCE_FILE' -$! -$! Link The File. -$! -$ LINK/'DEBUGGER'/'TRACEBACK'/EXE=[-.BIN]'UTIL_FILE_NAME'.EXE - - 'UTIL_OBJECT_FILE' -$! -$! Go Back And Do It Again. -$! -$ GOTO NEXT_UTIL_FILE -$! -$! All Done Compiling. -$! -$ UTIL_FILE_DONE: -$! -$! That's It, Time To Return From Where We Came From. -$! -$ RETURN -$! -$! Check The User's Options. -$! -$ CHECK_OPTIONS: -$! -$! Check To See If We Are To "Just Build Everything". -$! -$ IF ((P1.EQS."").OR.(P1.EQS."ALL")) -$ THEN -$! -$! P1 Is "ALL", So Build Everything. -$! -$ BUILDALL = "TRUE" -$! -$! Else.... -$! -$ ELSE -$! -$! Check To See If P1 Has A Valid Arguement. -$! -$ IF (P1.EQS."CIRCLE").OR.(P1.EQS."UTILS") -$ THEN -$! -$! A Valid Arguement. -$! -$ BUILDALL = P1 -$! -$! Else... -$! -$ ELSE -$! -$! Tell The User We Don't Know What They Want. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT " ALL : Just Build Everything." -$ WRITE SYS$OUTPUT " CIRCLE : Just Build [-.BIN]CIRCLE.EXE." -$ WRITE SYS$OUTPUT " UTILS : Just Build The CircleMUD Utilities." -$ WRITE SYS$OUTPUT "" -$! -$! Time To EXIT. -$! -$ EXIT -$ ENDIF -$ ENDIF -$! -$! Check To See If We Are To Compile Without Debugger Information. -$! -$ IF ((P2.EQS."").OR.(P2.EQS."NODEBUG")) -$ THEN -$! -$! P2 Is Either Blank Or "NODEBUG" So Compile Without Debugger Information. -$! -$ DEBUGGER = "NODEBUG" -$ OPTIMIZE = "OPTIMIZE" -$ TRACEBACK = "NOTRACEBACK" -$! -$! Tell The User What They Selected. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." -$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." -$ ELSE -$! -$! Check To See If We Are To Compile With Debugger Information. -$! -$ IF (P2.EQS."DEBUG") -$ THEN -$! -$! Compile With Debugger Information. -$! -$ DEBUGGER = "DEBUG" -$ OPTIMIZE = "NOOPTIMIZE" -$ TRACEBACK = "TRACEBACK" -$! -$! Tell The User What They Selected. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." -$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." -$! -$! Else... -$! -$ ELSE -$! -$! Tell The User Entered An Invalid Option.. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." -$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." -$ WRITE SYS$OUTPUT "" -$! -$! Time To EXIT. -$! -$ EXIT -$ ENDIF -$ ENDIF -$! -$! Time To Return To Where We Were. -$! -$ RETURN -$! -$! Subroutine To Check CONF.H File. -$! -$ CHECK_CONF_FILE: -$! -$! Tell The User We Are Checking CONF.H File. -$! -$ WRITE SYS$OUTPUT "Checking The CONF.H File." -$! -$! Check To See If The CONF.H File Exists. -$! -$ IF (F$SEARCH("SYS$DISK:[]CONF.H").EQS."") -$ THEN -$! -$! The File Dosen't Exist So Check To See If The CONF.H_VMS File Exists. -$! -$ IF (F$SEARCH("SYS$DISK:[]CONF.H_VMS").NES."") -$ THEN -$! -$! Copy CONF.H_VMS To CONF.H. -$! -$ COPY SYS$DISK:[]CONF.H_VMS SYS$DISK:[]CONF.H -$! -$! Else.... -$! -$ ELSE -$! -$! Check To See If The CONF_H.VMS File Exists. -$! -$ IF (F$SEARCH("SYS$DISK:[]CONF_H.VMS").NES."") -$ THEN -$! -$! Copy CONF_H.VMS To CONF.H. -$! -$ COPY SYS$DISK:[]CONF_H.VMS SYS$DISK:[]CONF.H -$! -$! Else... -$! -$ ELSE -$! -$! The CONF.H_VMS And The CONF_H.VMS File Dosen't Exist, So Tell The User. -$! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "The file CONF.H_VMS or CONF_H.VMS dosen't exist. This file is" -$ WRITE SYS$OUTPUT "necessary to compile CircleMUD and is distributed" -$ WRITE SYS$OUTPUT "with the source code." -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "Since the CONF.H_VMS or CONF_H.VMS file is distributed with the" -$ WRITE SYS$OUTPUT "source files I recomend that you unpack the files" -$ WRITE SYS$OUTPUT "again or get a new source distribution." -$ WRITE SYS$OUTPUT "" -$! -$! Since We Can't Compile Without This File, Just EXIT. -$! -$ EXIT -$! -$! Time To End The CONF_H.VMS File Check. -$! -$ ENDIF -$! -$! Time To End The CONF.H_VMS File Check. -$! -$ ENDIF -$! -$! End The CONF.H Check. -$! -$ ENDIF -$! -$! Time To Return To Where We Were. -$! -$ RETURN -$! -$! Subroutine To Check File Names. -$! -$ CHECK_FILE_NAMES: -$! -$! Tell The User We Are Checking File Names. -$! -$ WRITE SYS$OUTPUT "Checking File Names." -$! -$! Define The File Names We Need To Check On. -$! -$ CHECK_FOR = "ACT.COMM_C,ACT.INFORMATIVE_C,ACT.ITEM_C,ACT.MOVEMENT_C," + - - "ACT.OFFENSIVE_C,ACT.OTHER_C,ACT.SOCIAL_C,ACT.WIZARD_C" -$! -$! Define What The File Names Need To Be. -$! -$ SHOULD_BE = "ACT_COMM.C,ACT_INFORMATIVE.C,ACT_ITEM.C,ACT_MOVEMENT.C," + - - "ACT_OFFENSIVE.C,ACT_OTHER.C,ACT_SOCIAL.C,ACT_WIZARD.C" -$! -$! Define A File Counter And Set It To "0". -$! -$ FILE_COUNTER = 0 -$! -$! Top Of The File Loop. -$! -$ CHECK_NEXT_FILE: -$! -$! O.K, Extract The File Name We Are Looking For From The List. -$! -$ LOOKING_FOR = F$ELEMENT(FILE_COUNTER,",",CHECK_FOR) -$! -$! Extract The File Name It SHOULD Be From The List. -$! -$ RENAME_TO = F$ELEMENT(FILE_COUNTER,",",SHOULD_BE) -$! -$! Check To See If We Are At The End Of The File List. -$! -$ IF (LOOKING_FOR.EQS.",") THEN GOTO CHECK_FILES_DONE -$! -$! Increment The Counter. -$! -$ FILE_COUNTER = FILE_COUNTER + 1 -$! -$! Check To See If The File We Are Checking For Exists. -$! -$ IF (F$SEARCH(LOOKING_FOR).EQS."") -$ THEN -$! -$! The File Dosen't Exist, Check For The Next File. -$! -$ GOTO CHECK_NEXT_FILE -$! -$! Else... -$! -$ ELSE -$! -$! The File Exists And Needs To Be Fixed. -$! -$ RENAME 'LOOKING_FOR' 'RENAME_TO' -$! -$! End The File Check. -$! -$ ENDIF -$! -$! Go Back And Do It Again. -$! -$ GOTO CHECK_NEXT_FILE -$! -$! All Done With Checking File Names. -$! -$ CHECK_FILES_DONE: -$! -$! Time To Return To Where We Were. -$! -$ RETURN diff --git a/src/conf.h.amiga b/src/conf.h.amiga deleted file mode 100644 index c96d525..0000000 --- a/src/conf.h.amiga +++ /dev/null @@ -1,108 +0,0 @@ -/* CircleMUD for Amiga conf.h file - manually created (N. Franceschi 26 Jul 1996) - -/* src/conf.h.in. Generated automatically from configure.in by autoheader. */ - -#ifndef _CONF_H_ -#define _CONF_H_ - -#undef CIRCLE_WINDOWS - -#define AMIGA 1 - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if you have that is POSIX.1 compatible. */ -/* #undef HAVE_SYS_WAIT_H */ - -/* Define to `int' if doesn't define. */ -/*#define pid_t int*/ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* Define if you have 'struct in_addr' */ -#define HAVE_STRUCT_IN_ADDR 1 - -/* Define if your crypt isn't safe with only 10 characters. */ -#undef HAVE_UNSAFE_CRYPT - -/* Define to `int' if doesn't define. */ -#define socklen_t int - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if you have the crypt function. */ -#undef CIRCLE_CRYPT - -/* Define if you have the random function. */ -#undef HAVE_RANDOM - -/* Define if you have the header file. */ -#define HAVE_ARPA_TELNET_H 1 - -/* Define if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define if you have the header file. */ -#undef HAVE_CRYPT_H - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_NET_ERRNO_H */ - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_FCNTL_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the crypt library (-lcrypt). */ -/* #undef HAVE_LIBCRYPT */ - -/* Define if you have the malloc library (-lmalloc). */ -/* #undef HAVE_LIBMALLOC */ - -/* Define if you have the nsl library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define if you have the socket library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define if your compiler does not prototype remove(). */ -/* #undef NEED_REMOVE_PROTO */ - -/* Define if your compiler does not prototype strerror(). */ -/* #undef NEED_STRERROR_PROTO */ - -#endif /* _CONF_H_ */ diff --git a/src/conf.h.arc b/src/conf.h.arc deleted file mode 100644 index 11df36a..0000000 --- a/src/conf.h.arc +++ /dev/null @@ -1,82 +0,0 @@ -/* CircleMUD for ACORN conf.h file - manually created (G. Duncan 13 June 98) - -#ifndef _CONF_H_ -#define _CONF_H_ - -#define CIRCLE_ACORN - -/* Define to empty if the keyword does not work. */ -/*#define const*/ - -/* Define to `int' if doesn't define. */ -/*#define pid_t int*/ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/*#define size_t*/ - -/* Define if you have 'struct in_addr' */ -#define HAVE_STRUCT_IN_ADDR 1 - -/* Define if your crypt isn't safe with only 10 characters. */ -#undef HAVE_UNSAFE_CRYPT - -/* Define to `int' if doesn't define. */ -#define socklen_t int - -/* Define if you have the header file. */ -#define HAVE_STRING_H - -/* Define if you have the header file. */ -#define HAVE_STRINGS_H - -#define HAVE_MEMORY_H - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H -#define HAVE_UNISTD_H - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H -#define HAVE_SYS_ERRNO_H - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME -#define HAVE_SYS_TIME_H - -/* Define if you have the header file. */ -#define HAVE_ASSERT_H - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H -/*#define HAVE_SYS_FCNTL_H*/ - -/* Define if you have the header file. */ -#define HAVE_SYS_SOCKET_H -#define HAVE_SYS_RESOURCE_H - -/* Define if you have that is POSIX. compatible. */ -#define HAVE_SYS_WAIT_H -#define HAVE_NETINET_IN_H -#define HAVE_NETDB_H -#define HAVE_SIGNAL_H -#define HAVE_SYS_UIO_H -#define HAVE_SYS_STAT_H - -#define NEED_GETTIMEOFDAY_PROTO - -/* Define if your compiler does not prototype remove(). */ -/* #undef NEED_REMOVE_PROTO */ - -/* Define if your compiler does not prototype strerror(). */ -/* #undef NEED_STRERROR_PROTO */ - -#endif /* _CONF_H_ */ diff --git a/src/conf.h.os2 b/src/conf.h.os2 deleted file mode 100644 index c4ed574..0000000 --- a/src/conf.h.os2 +++ /dev/null @@ -1,108 +0,0 @@ -/* src/conf.h.os2. Manually written by David Carver. */ - -#ifndef _CONF_H_ -#define _CONF_H_ - -/* Define if we are compiling under OS2 */ -#define CIRCLE_OS2 - -/* Define if we're compiling CircleMUD under any type of UNIX system */ -/* #undef CIRCLE_UNIX */ - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H - -/* Define to `int' if doesn't define. */ -#undef pid_t - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE - -/* Define to `unsigned' if doesn't define. */ -#undef size_t - -/* Define to `int' if doesn't define. */ -#define socklen_t int - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME - -/* Define if you have the crypt function. */ -#undef CIRCLE_CRYPT - -/* Define if you have the random function. (-lbsd) */ -#define HAVE_RANDOM 1 - -/* Define if you have the header file. */ -#define HAVE_ARPA_TELNET_H - -/* Define if you have the header file. */ -#define HAVE_ASSERT_H - -/* Define if you have the header file. */ -#undef HAVE_CRYPT_H - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H - -/* Define if you have the header file. */ -#undef HAVE_NET_ERRNO_H - -/* Define if you have the header file. */ -#define HAVE_STRING_H - -/* Define if you have the header file. */ -#define HAVE_SYS_FCNTL_H - -/* Define if you have the header file. */ -#define HAVE_SYS_SELECT_H - -/* Define if you have the header file. */ -#define HAVE_SYS_TIME_H - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H - -/* Define if you have the crypt library (-lcrypt). */ -#undef HAVE_LIBCRYPT - -/* Define if you have the malloc library (-lmalloc). */ -#undef HAVE_LIBMALLOC - -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the socket library (-lsocket). */ -#define HAVE_LIBSOCKET - -/* Define if your compiler does not prototype remove(). */ -/* #undef NEED_REMOVE_PROTO */ - -/* Define if your compiler does not prototype strerror(). */ -/* #undef NEED_STRERROR_PROTO */ - -/* Define if you have 'struct in_addr' */ -#define HAVE_STRUCT_IN_ADDR 1 - -/* Define if your crypt isn't safe with only 10 characters. */ -#undef HAVE_UNSAFE_CRYPT - -#endif /* _CONF_H_ */ diff --git a/src/conf.h.vms b/src/conf.h.vms deleted file mode 100644 index e2f576e..0000000 --- a/src/conf.h.vms +++ /dev/null @@ -1,300 +0,0 @@ -/* src/conf.h.in. Generated automatically from cnf/configure.in by autoheader. */ - -#ifndef _CONF_H_ -#define _CONF_H_ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if you have that is POSIX.1 compatible. */ -#ifdef DECC -# define HAVE_SYS_WAIT_H 1 -#endif - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to `unsigned int' if doesn't define. */ -#define socklen_t unsigned int - -/* Define if you can safely include both and . */ -#ifdef __GNUC__ -# define TIME_WITH_SYS_TIME 1 -#endif - -/* Define if you have 'struct in_addr' */ -#define HAVE_STRUCT_IN_ADDR 1 - -/* Define if we're compiling CircleMUD under any type of UNIX system */ -/* #undef CIRCLE_UNIX */ - -/* Define if we're compiling CircleMUD under OpenVMS. */ -#define CIRCLE_VMS 1 -#define VMS 1 -#define __VMS 1 - -/* Define if the system is capable of using crypt() to encrypt */ -/* #undef CIRCLE_CRYPT*/ - -/* Define if your crypt isn't safe with only 10 characters. */ -/* #undef HAVE_UNSAFE_CRYPT */ - -/* Define to `int' if doesn't define. */ -#ifdef __GNUC__ -# define ssize_t int -#endif - -/* Define if you have the inet_addr function. */ -/* #undef HAVE_INET_ADDR */ - -/* Define if you have the inet_aton function. */ -/* #undef HAVE_INET_ATON */ - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_ARPA_INET_H 1 -#endif - -/* Define if you have the header file. */ -/* #undef HAVE_ARPA_TELNET_H */ - -/* Define if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_CRYPT_H */ - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_FCNTL_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_NET_ERRNO_H */ - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_NETDB_H 1 -#endif - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_NETINET_IN_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_FCNTL_H */ - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_SYS_RESOURCE_H 1 -#endif - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_SYS_SOCKET_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the header file. */ -#ifdef __GNUC__ -# define HAVE_SYS_TIME_H 1 -#endif - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_SYS_TYPES_H 1 -#endif - -/* Define if you have the header file. */ -#ifdef DECC -# define HAVE_SYS_UIO_H 1 -#endif - -/* Define if you have the header file. */ -#ifdef __GNUC__ -# define HAVE_UNISTD_H 1 -#endif - -/* Define if you have the malloc library (-lmalloc). */ -/* #undef HAVE_LIBMALLOC */ - -/* Define if your compiler does not prototype accept(). */ -/* #undef NEED_ACCEPT_PROTO */ - -/* Define if your compiler does not prototype atoi(). */ -/* #undef NEED_ATOI_PROTO */ - -/* Define if your compiler does not prototype atol(). */ -/* #undef NEED_ATOL_PROTO */ - -/* Define if your compiler does not prototype bind(). */ -/* #undef NEED_BIND_PROTO */ - -/* Define if your compiler does not prototype bzero(). */ -/* #undef NEED_BZERO_PROTO */ - -/* Define if your compiler does not prototype chdir(). */ -/* #undef NEED_CHDIR_PROTO */ - -/* Define if your compiler does not prototype close(). */ -/* #undef NEED_CLOSE_PROTO */ - -/* Define if your compiler does not prototype crypt(). */ -/* #undef NEED_CRYPT_PROTO */ - -/* Define if your compiler does not prototype fclose(). */ -/* #undef NEED_FCLOSE_PROTO */ - -/* Define if your compiler does not prototype fcntl(). */ -/* #undef NEED_FCNTL_PROTO */ - -/* Define if your compiler does not prototype fflush(). */ -/* #undef NEED_FFLUSH_PROTO */ - -/* Define if your compiler does not prototype fprintf(). */ -/* #undef NEED_FPRINTF_PROTO */ - -/* Define if your compiler does not prototype fputc(). */ -/* #undef NEED_FPUTC_PROTO */ - -/* Define if your compiler does not prototype fputs(). */ -/* #undef NEED_FPUTS_PROTO */ - -/* Define if your compiler does not prototype fread(). */ -/* #undef NEED_FREAD_PROTO */ - -/* Define if your compiler does not prototype fscanf(). */ -/* #undef NEED_FSCANF_PROTO */ - -/* Define if your compiler does not prototype fseek(). */ -/* #undef NEED_FSEEK_PROTO */ - -/* Define if your compiler does not prototype fwrite(). */ -/* #undef NEED_FWRITE_PROTO */ - -/* Define if your compiler does not prototype getpeername(). */ -/* #undef NEED_GETPEERNAME_PROTO */ - -/* Define if your compiler does not prototype getpid(). */ -/* #undef NEED_GETPID_PROTO */ - -/* Define if your compiler does not prototype getrlimit(). */ -/* #undef NEED_GETRLIMIT_PROTO */ - -/* Define if your compiler does not prototype getsockname(). */ -/* #undef NEED_GETSOCKNAME_PROTO */ - -/* Define if your compiler does not prototype gettimeofday(). */ -#ifdef DECC -# define NEED_GETTIMEOFDAY_PROTO 1 -#endif - -/* Define if your compiler does not prototype htonl(). */ -/* #undef NEED_HTONL_PROTO */ - -/* Define if your compiler does not prototype htons(). */ -/* #undef NEED_HTONS_PROTO */ - -/* Define if your compiler does not prototype inet_addr(). */ -/* #undef NEED_INET_ADDR_PROTO */ - -/* Define if your compiler does not prototype inet_aton(). */ -/* #undef NEED_INET_ATON_PROTO */ - -/* Define if your compiler does not prototype inet_ntoa(). */ -/* #undef NEED_INET_NTOA_PROTO */ - -/* Define if your compiler does not prototype listen(). */ -/* #undef NEED_LISTEN_PROTO */ - -/* Define if your compiler does not prototype ntohl(). */ -/* #undef NEED_NTOHL_PROTO */ - -/* Define if your compiler does not prototype perror(). */ -/* #undef NEED_PERROR_PROTO */ - -/* Define if your compiler does not prototype printf(). */ -/* #undef NEED_PRINTF_PROTO */ - -/* Define if your compiler does not prototype qsort(). */ -/* #undef NEED_QSORT_PROTO */ - -/* Define if your compiler does not prototype read(). */ -/* #undef NEED_READ_PROTO */ - -/* Define if your compiler does not prototype remove(). */ -/* #undef NEED_REMOVE_PROTO */ - -/* Define if your compiler does not prototype rewind(). */ -/* #undef NEED_REWIND_PROTO */ - -/* Define if your compiler does not prototype select(). */ -/* #undef NEED_SELECT_PROTO */ - -/* Define if your compiler does not prototype setitimer(). */ -/* #undef NEED_SETITIMER_PROTO */ - -/* Define if your compiler does not prototype setrlimit(). */ -/* #undef NEED_SETRLIMIT_PROTO */ - -/* Define if your compiler does not prototype setsockopt(). */ -/* #undef NEED_SETSOCKOPT_PROTO */ - -/* Define if your compiler does not prototype socket(). */ -/* #undef NEED_SOCKET_PROTO */ - -/* Define if your compiler does not prototype sprintf(). */ -/* #undef NEED_SPRINTF_PROTO */ - -/* Define if your compiler does not prototype sscanf(). */ -/* #undef NEED_SSCANF_PROTO */ - -/* Define if your compiler does not prototype strerror(). */ -/* #undef NEED_STRERROR_PROTO */ - -/* Define if your compiler does not prototype system(). */ -/* #undef NEED_SYSTEM_PROTO */ - -/* Define if your compiler does not prototype time(). */ -/* #undef NEED_TIME_PROTO */ - -/* Define if your compiler does not prototype unlink(). */ -/* #undef NEED_UNLINK_PROTO */ - -/* Define if your compiler does not prototype write(). */ -/* #undef NEED_WRITE_PROTO */ - -#endif /* _CONF_H_ */ From b61dd29e0075698d84b03942d8390ceb8e587f8b Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 00:22:15 +0200 Subject: [PATCH 08/17] Added a couple of lines to the readme. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 5485bea..c770dec 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ Files for tbaMUD. +--- +## To build + +1. clone the munit library into src/munit. It is registered as a submodule in git `git submodule init` +2. run configure: `./configure` +3. build the code: `cd src && make` +4. run the mud: `cd ..; bin/circle 1234` +5. connect via telnet to port 1234. + +Read more in the doc/ folder From a3185bf925b5b14978b33603074c912225ca7a5e Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 00:30:33 +0200 Subject: [PATCH 09/17] Added tests to workflow --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 717fe7a..f82e91f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,12 @@ jobs: steps: - uses: actions/checkout@v3 + - name: download munit + run: git submodule init && git submodule update - name: configure run: ./configure + - name: build tests + run: cd src && touch .accepted && make test - name: build - run: cd src && touch .accepted && make + run: make clean && make + \ No newline at end of file From 1330cb7b18ba652ed57d2542b91ce9dc74b5a06c Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 00:35:32 +0200 Subject: [PATCH 10/17] add cmocka --- .github/workflows/build.yml | 2 ++ README.md | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f82e91f..0a06c3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,8 @@ jobs: - uses: actions/checkout@v3 - name: download munit run: git submodule init && git submodule update + - name: install cmocka + run: sudo apt install -y libcmocka-dev - name: configure run: ./configure - name: build tests diff --git a/README.md b/README.md index c770dec..dd40ea1 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,14 @@ Files for tbaMUD. ## To build -1. clone the munit library into src/munit. It is registered as a submodule in git `git submodule init` -2. run configure: `./configure` -3. build the code: `cd src && make` -4. run the mud: `cd ..; bin/circle 1234` -5. connect via telnet to port 1234. +1. run configure: `./configure` +2. build the code: `cd src && make` +3. run the mud: `cd ..; bin/circle 1234` +4. connect via telnet to port 1234. Read more in the doc/ folder + +## To run the tests + +1. clone the munit library into src/munit. It is registered as a submodule in git `git submodule init` +2. install the cmocka-library: `sudo apt install libcmocka-dev` From f36c951ddc0372580abf8922ecc5261d92e86050 Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:57:07 +0200 Subject: [PATCH 11/17] check conf.h on build server --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a06c3f..367c7d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,8 @@ jobs: run: sudo apt install -y libcmocka-dev - name: configure run: ./configure + - name: list conf.h for testing + run cat src/conf.h - name: build tests run: cd src && touch .accepted && make test - name: build From 59e2e4f180191eef61619c2e4ea27ddeac95840a Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:58:13 +0200 Subject: [PATCH 12/17] typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 367c7d2..fafcce2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - name: configure run: ./configure - name: list conf.h for testing - run cat src/conf.h + run: cat src/conf.h - name: build tests run: cd src && touch .accepted && make test - name: build From 81e0eb009a11639a95b2a62b0d6ff80ac703ef6c Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:07:20 +0200 Subject: [PATCH 13/17] remove undefined behaviour --- src/handler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/handler.c b/src/handler.c index 87269bb..9aeb664 100644 --- a/src/handler.c +++ b/src/handler.c @@ -592,14 +592,16 @@ int get_number(char **name) { int i; char *ppos; - char number[MAX_INPUT_LENGTH]; + char number[MAX_INPUT_LENGTH], tmp[MAX_INPUT_LENGTH]; *number = '\0'; if ((ppos = strchr(*name, '.')) != NULL) { *ppos++ = '\0'; strlcpy(number, *name, sizeof(number)); - strcpy(*name, ppos); /* strcpy: OK (always smaller) */ + // avoid overlapping strings in strcpy which is undefined behaviour + strcpy(tmp, ppos); /* strcpy: OK (always smaller) */ + strcpy(*name, tmp); /* strcpy: OK (always smaller) */ for (i = 0; *(number + i); i++) if (!isdigit(*(number + i))) From 9b242a108551f0e91e32f409ea1535a2aa7ac406 Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:10:16 +0200 Subject: [PATCH 14/17] build step tweaking --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fafcce2..471e4e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,5 +24,5 @@ jobs: - name: build tests run: cd src && touch .accepted && make test - name: build - run: make clean && make + run: pwd && make clean && make all \ No newline at end of file From 594cedbff65efaddf93a29cf38aa8cc1dc155fe8 Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:11:47 +0200 Subject: [PATCH 15/17] Build step tweaking --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 471e4e9..bab97aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,5 +24,5 @@ jobs: - name: build tests run: cd src && touch .accepted && make test - name: build - run: pwd && make clean && make all + run: cd src && touch .accepted && make clean && make all \ No newline at end of file From 9399b68f2601807faff22e57c2c8d9c524d24b53 Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:45:07 +0200 Subject: [PATCH 16/17] remove the conf.h listing when building, and add another test for get_number --- .github/workflows/build.yml | 2 -- src/test/test.handler.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bab97aa..306131c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,6 @@ jobs: run: sudo apt install -y libcmocka-dev - name: configure run: ./configure - - name: list conf.h for testing - run: cat src/conf.h - name: build tests run: cd src && touch .accepted && make test - name: build diff --git a/src/test/test.handler.c b/src/test/test.handler.c index f13cb34..8170281 100644 --- a/src/test/test.handler.c +++ b/src/test/test.handler.c @@ -7,6 +7,7 @@ UNIT_TEST(test_get_number) run_single_get_number_test("1.feather", "feather", 1); run_single_get_number_test("2.feather", "feather", 2); run_single_get_number_test("1.feat", "feat", 1); + run_single_get_number_test("2.feat", "feat", 2); run_single_get_number_test("feather", "feather", 1); run_single_get_number_test("10.feather", "feather", 10); From c8fc70bf43f931813be8f927a7366f39db09da7e Mon Sep 17 00:00:00 2001 From: welcor <357770+welcor@users.noreply.github.com> Date: Thu, 27 Jun 2024 00:31:54 +0200 Subject: [PATCH 17/17] Refactor: fixtures in its own files. Added readme for creating tests. Found and fixed interesting bugs in destroy_db when there is no world. renamed the testfile to testrunner to make it clear it is actually running the texts. Also, made testrunner more focused on the actual running of the tests. Added debug target to test makefile. --- README.md | 6 +- src/db.c | 223 +++++++++++++++++++++------------------ src/test/Makefile | 24 +++-- src/test/README.md | 47 +++++++++ src/test/test.act.item.c | 22 ++-- src/test/test.example.c | 14 +++ src/test/test.example.h | 10 ++ src/test/test.fixtures.c | 46 ++++++++ src/test/test.fixtures.h | 34 ++++++ src/test/testrunner.c | 41 +------ src/test/testrunner.h | 32 ++---- 11 files changed, 318 insertions(+), 181 deletions(-) create mode 100644 src/test/README.md create mode 100644 src/test/test.example.c create mode 100644 src/test/test.example.h create mode 100644 src/test/test.fixtures.c create mode 100644 src/test/test.fixtures.h diff --git a/README.md b/README.md index dd40ea1..a934ab0 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,9 @@ Read more in the doc/ folder ## To run the tests -1. clone the munit library into src/munit. It is registered as a submodule in git `git submodule init` +1. clone the munit library into src/munit. It is registered as a submodule in git + +`git submodule init && git submodule update` + 2. install the cmocka-library: `sudo apt install libcmocka-dev` +3. `./config.status && cd src && make test` \ No newline at end of file diff --git a/src/db.c b/src/db.c index fda7ac6..b06de45 100644 --- a/src/db.c +++ b/src/db.c @@ -44,26 +44,26 @@ struct config_data config_info; /* Game configuration list. */ struct room_data *world = NULL; /* array of rooms */ -room_rnum top_of_world = 0; /* ref to top element of world */ +room_rnum top_of_world = NOWHERE; /* ref to top element of world */ struct char_data *character_list = NULL; /* global linked list of chars */ struct index_data *mob_index; /* index table for mobile file */ struct char_data *mob_proto; /* prototypes for mobs */ -mob_rnum top_of_mobt = 0; /* top of mobile index table */ +mob_rnum top_of_mobt = NOBODY; /* top of mobile index table */ struct obj_data *object_list = NULL; /* global linked list of objs */ struct index_data *obj_index; /* index table for object file */ struct obj_data *obj_proto; /* prototypes for objs */ -obj_rnum top_of_objt = 0; /* top of object index table */ +obj_rnum top_of_objt = NOTHING; /* top of object index table */ struct zone_data *zone_table; /* zone table */ -zone_rnum top_of_zone_table = 0;/* top element of zone tab */ +zone_rnum top_of_zone_table = NOTHING;/* top element of zone tab */ /* begin previously located in players.c */ struct player_index_element *player_table = NULL; /* index to plr file */ -int top_of_p_table = 0; /* ref to top of table */ -int top_of_p_file = 0; /* ref of size of p file */ -long top_idnum = 0; /* highest idnum in use */ +int top_of_p_table = NOBODY; /* ref to top of table */ +int top_of_p_file = NOBODY; /* ref of size of p file */ +long top_idnum = NOBODY; /* highest idnum in use */ /* end previously located in players.c */ struct message_list fight_messages[MAX_MESSAGES]; /* fighting messages */ @@ -528,84 +528,91 @@ void destroy_db(void) } /* Rooms */ - for (cnt = 0; cnt <= top_of_world; cnt++) { - if (world[cnt].name) - free(world[cnt].name); - if (world[cnt].description) - free(world[cnt].description); - free_extra_descriptions(world[cnt].ex_description); + if (top_of_world != NOWHERE) { + for (cnt = 0; cnt <= top_of_world; cnt++) { + if (world[cnt].name) + free(world[cnt].name); + if (world[cnt].description) + free(world[cnt].description); + free_extra_descriptions(world[cnt].ex_description); - if (world[cnt].events != NULL) { - if (world[cnt].events->iSize > 0) { - struct event * pEvent; + if (world[cnt].events != NULL) { + if (world[cnt].events->iSize > 0) { + struct event * pEvent; - while ((pEvent = simple_list(world[cnt].events)) != NULL) - event_cancel(pEvent); - } - free_list(world[cnt].events); - world[cnt].events = NULL; - } + while ((pEvent = simple_list(world[cnt].events)) != NULL) + event_cancel(pEvent); + } + free_list(world[cnt].events); + world[cnt].events = NULL; + } - /* free any assigned scripts */ - if (SCRIPT(&world[cnt])) - extract_script(&world[cnt], WLD_TRIGGER); - /* free script proto list */ - free_proto_script(&world[cnt], WLD_TRIGGER); + /* free any assigned scripts */ + if (SCRIPT(&world[cnt])) + extract_script(&world[cnt], WLD_TRIGGER); + /* free script proto list */ + free_proto_script(&world[cnt], WLD_TRIGGER); - for (itr = 0; itr < NUM_OF_DIRS; itr++) { /* NUM_OF_DIRS here, not DIR_COUNT */ - if (!world[cnt].dir_option[itr]) - continue; + for (itr = 0; itr < NUM_OF_DIRS; itr++) { /* NUM_OF_DIRS here, not DIR_COUNT */ + if (world[cnt].dir_option[itr] == NULL) + continue; - if (world[cnt].dir_option[itr]->general_description) - free(world[cnt].dir_option[itr]->general_description); - if (world[cnt].dir_option[itr]->keyword) - free(world[cnt].dir_option[itr]->keyword); - free(world[cnt].dir_option[itr]); + if (world[cnt].dir_option[itr]->general_description) + free(world[cnt].dir_option[itr]->general_description); + if (world[cnt].dir_option[itr]->keyword) + free(world[cnt].dir_option[itr]->keyword); + free(world[cnt].dir_option[itr]); + } } + free(world); + top_of_world = NOWHERE; } - free(world); - top_of_world = 0; - /* Objects */ - for (cnt = 0; cnt <= top_of_objt; cnt++) { - if (obj_proto[cnt].name) - free(obj_proto[cnt].name); - if (obj_proto[cnt].description) - free(obj_proto[cnt].description); - if (obj_proto[cnt].short_description) - free(obj_proto[cnt].short_description); - if (obj_proto[cnt].action_description) - free(obj_proto[cnt].action_description); - free_extra_descriptions(obj_proto[cnt].ex_description); + /* Objects */ + if (top_of_objt != NOTHING) { + for (cnt = 0; cnt <= top_of_objt; cnt++) { + if (obj_proto[cnt].name) + free(obj_proto[cnt].name); + if (obj_proto[cnt].description) + free(obj_proto[cnt].description); + if (obj_proto[cnt].short_description) + free(obj_proto[cnt].short_description); + if (obj_proto[cnt].action_description) + free(obj_proto[cnt].action_description); + free_extra_descriptions(obj_proto[cnt].ex_description); - /* free script proto list */ - free_proto_script(&obj_proto[cnt], OBJ_TRIGGER); + /* free script proto list */ + free_proto_script(&obj_proto[cnt], OBJ_TRIGGER); + } + free(obj_proto); + free(obj_index); + top_of_objt = NOTHING; } - free(obj_proto); - free(obj_index); /* Mobiles */ - for (cnt = 0; cnt <= top_of_mobt; cnt++) { - if (mob_proto[cnt].player.name) - free(mob_proto[cnt].player.name); - if (mob_proto[cnt].player.title) - free(mob_proto[cnt].player.title); - if (mob_proto[cnt].player.short_descr) - free(mob_proto[cnt].player.short_descr); - if (mob_proto[cnt].player.long_descr) - free(mob_proto[cnt].player.long_descr); - if (mob_proto[cnt].player.description) - free(mob_proto[cnt].player.description); + if (top_of_mobt != NOBODY) { + for (cnt = 0; cnt <= top_of_mobt; cnt++) { + if (mob_proto[cnt].player.name) + free(mob_proto[cnt].player.name); + if (mob_proto[cnt].player.title) + free(mob_proto[cnt].player.title); + if (mob_proto[cnt].player.short_descr) + free(mob_proto[cnt].player.short_descr); + if (mob_proto[cnt].player.long_descr) + free(mob_proto[cnt].player.long_descr); + if (mob_proto[cnt].player.description) + free(mob_proto[cnt].player.description); - /* free script proto list */ - free_proto_script(&mob_proto[cnt], MOB_TRIGGER); + /* free script proto list */ + free_proto_script(&mob_proto[cnt], MOB_TRIGGER); - while (mob_proto[cnt].affected) - affect_remove(&mob_proto[cnt], mob_proto[cnt].affected); + while (mob_proto[cnt].affected) + affect_remove(&mob_proto[cnt], mob_proto[cnt].affected); + } + free(mob_proto); + free(mob_index); + top_of_mobt = NOBODY; } - free(mob_proto); - free(mob_index); - /* Shops */ destroy_shops(); @@ -615,26 +622,29 @@ void destroy_db(void) /* Zones */ #define THIS_CMD zone_table[cnt].cmd[itr] - for (cnt = 0; cnt <= top_of_zone_table; cnt++) { - if (zone_table[cnt].name) - free(zone_table[cnt].name); - if (zone_table[cnt].builders) - free(zone_table[cnt].builders); - if (zone_table[cnt].cmd) { - /* first see if any vars were defined in this zone */ - for (itr = 0;THIS_CMD.command != 'S';itr++) - if (THIS_CMD.command == 'V') { - if (THIS_CMD.sarg1) - free(THIS_CMD.sarg1); - if (THIS_CMD.sarg2) - free(THIS_CMD.sarg2); - } - /* then free the command list */ - free(zone_table[cnt].cmd); + if (top_of_zone_table != NOWHERE) + { + for (cnt = 0; cnt <= top_of_zone_table; cnt++) { + if (zone_table[cnt].name) + free(zone_table[cnt].name); + if (zone_table[cnt].builders) + free(zone_table[cnt].builders); + if (zone_table[cnt].cmd) { + /* first see if any vars were defined in this zone */ + for (itr = 0;THIS_CMD.command != 'S';itr++) + if (THIS_CMD.command == 'V') { + if (THIS_CMD.sarg1) + free(THIS_CMD.sarg1); + if (THIS_CMD.sarg2) + free(THIS_CMD.sarg2); + } + /* then free the command list */ + free(zone_table[cnt].cmd); + } } + free(zone_table); + top_of_zone_table = NOWHERE; } - free(zone_table); - #undef THIS_CMD /* zone table reset queue */ @@ -648,27 +658,30 @@ void destroy_db(void) } /* Triggers */ - for (cnt=0; cnt < top_of_trigt; cnt++) { - if (trig_index[cnt]->proto) { - /* make sure to nuke the command list (memory leak) */ - /* free_trigger() doesn't free the command list */ - if (trig_index[cnt]->proto->cmdlist) { - struct cmdlist_element *i, *j; - i = trig_index[cnt]->proto->cmdlist; - while (i) { - j = i->next; - if (i->cmd) - free(i->cmd); - free(i); - i = j; + if (top_of_trigt != NOTHING) + { + for (cnt=0; cnt < top_of_trigt; cnt++) { + if (trig_index[cnt]->proto) { + /* make sure to nuke the command list (memory leak) */ + /* free_trigger() doesn't free the command list */ + if (trig_index[cnt]->proto->cmdlist) { + struct cmdlist_element *i, *j; + i = trig_index[cnt]->proto->cmdlist; + while (i) { + j = i->next; + if (i->cmd) + free(i->cmd); + free(i); + i = j; + } } + free_trigger(trig_index[cnt]->proto); } - free_trigger(trig_index[cnt]->proto); + free(trig_index[cnt]); } - free(trig_index[cnt]); + free(trig_index); + top_of_trigt = NOTHING; } - free(trig_index); - /* Events */ event_free_all(); diff --git a/src/test/Makefile b/src/test/Makefile index c3d1c72..9036ef4 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -8,7 +8,7 @@ ASAN:=n UBSAN:=n EXTENSION:= TEST_ENV:= -CFLAGS:=-Wall -Wno-char-subscripts -Wno-unused-but-set-variable +CFLAGS:=-Wall -Wno-char-subscripts -Wno-unused-but-set-variable -g CFLAGS+=-Wl,--wrap=send_to_char,--wrap=vwrite_to_output AGGRESSIVE_WARNINGS=n LIBS:=-lcrypt @@ -45,27 +45,31 @@ ifneq ($(CC),pgcc) endif endif -MUNIT_FILES := ../munit/munit.h ../munit/munit.c +#MUNIT_FILES := ../munit/munit.h ../munit/munit.c TEST_FILES := $(ls *.c) # exclude main.c to avoid having multiple entrypoints. OBJ_FILES_FROM_MUD_CODE != ls ../*.c | grep -v main.c | sed 's/\.c$$/.o/g' | xargs -OBJ_FILES_FORM_MUNIT:= ../munit/munit.o -OBJ_FILES_FROM_TESTS!= ls *.c | sed 's/\$$.c/.o/g' | xargs +OBJ_FILES_FROM_MUNIT:= ../munit/munit.o +OBJ_FILES_FROM_TESTS!= ls *.c | sed 's/\.c/.o/g' | xargs -OBJ_FILES := $(OBJ_FILES_FROM_MUD_CODE) $(OBJ_FILES_FORM_MUNIT) $(OBJ_FILES_FROM_TESTS) $(LIBS) +OBJ_FILES := $(OBJ_FILES_FROM_MUD_CODE) $(OBJ_FILES_FROM_MUNIT) $(OBJ_FILES_FROM_TESTS) $(LIBS) -testfile: $(OBJ_FILES) - $(CC) $(CFLAGS) -o testfile $(OBJ_FILES) +testrunner: $(OBJ_FILES) + $(CC) $(CFLAGS) -o testrunner $(OBJ_FILES) + +test: testrunner + $(TEST_ENV) ./testrunner + +debug: testrunner + $(TEST_ENV) gdb -q --args ./testrunner --no-fork -test: testfile - $(TEST_ENV) ./testfile $%.o: %.c $(CC) $< $(CFLAGS) -c -o $@ clean: - rm -f *.o testfile depend + rm -f *.o testrunner depend all: test default: all diff --git a/src/test/README.md b/src/test/README.md new file mode 100644 index 0000000..d84ca22 --- /dev/null +++ b/src/test/README.md @@ -0,0 +1,47 @@ +# unit and integration tests for tbamud + +## how do I add a new test? +Open the .c file of your choosing and add a `UNIT_TEST` function. +The function will have access to all the global variables and all non-static +functions in the code, but there will be no data loaded. + +The name of the function will be listed when the tests are run. + + + + +The [munit website](https://nemequ.github.io/munit/#getting-started) may be useful for more details. + + +## how do I add new files with tests? +First, create your test file. As a general rule, keep unit tests in files named + after the files containing the functions you are testing. For instance, if you're + testing the `do_simple_move()` function, create a file called `test.act.movement.c`. + +You can use the example file `test.example.c` as a template. +The `.c`-file needs a couple of boilerplate parts: + +- An import statement to include the `.h`-file. +- UNIT_TEST-functions. See above. +- An array of `MunitTest`s for inclusion in the runner app. + The name in these are concatenated between the name in testrunner and the name of the tests in the output. + This is useful for grouping. + +Next, create a header file for your tests. It's a good idea to keep the same name, + with a .h postfix. So in the example, it'll be `test.act.movement.h`. + +You can use the `test.example.h` file as a template. It needs a little boilerplate, too. + +- It needs to include the testrunner.h for the prototype of UNIT_TEST and access to munit-structs. +- It needs a guard to only be loaded once (the `#ifndef/#define/#endif` incantation at the start and end) +- It needs a prototype of all tests in the .c-file. +- It needs a prototype of the array of tests. + +Finally, add the array to the suites array in `testrunner.c` to actually run the tests. + +- Add the .h file to the list of imported files. +- Add a row to the suites array. The name in this list is prepended to every test in the given + file when listing the results. + +Now, having all the bits and pieces ready, you can add you unit tests, and run them with `make test` + diff --git a/src/test/test.act.item.c b/src/test/test.act.item.c index 193dcb3..0e13120 100644 --- a/src/test/test.act.item.c +++ b/src/test/test.act.item.c @@ -15,12 +15,12 @@ UNIT_TEST(test_do_remove_should_remove_second_item_by_number) { char_data *ch = get_test_char(); obj_data *ring1 = create_obj(); - ring1->name = "ring"; - ring1->short_description = "ring1"; + ring1->name = strdup("ring"); + ring1->short_description = strdup("ring1"); obj_data *ring2 = create_obj(); - ring2->name = "ring"; - ring2->short_description = "ring2"; + ring2->name = strdup("ring"); + ring2->short_description = strdup("ring2"); equip_char(ch, ring1, WEAR_FINGER_R); equip_char(ch, ring2, WEAR_FINGER_L); @@ -33,9 +33,19 @@ UNIT_TEST(test_do_remove_should_remove_second_item_by_number) { return MUNIT_OK; } +static void* before_each(const MunitParameter params[], void* user_data) { + simple_world(); + add_test_char(0); + return NULL; +} + +static void after_each(void* fixture) { + destroy_db(); +} + MunitTest act_item_c_tests[] = { - STD_TEST("/do_remove/item_not_found", test_do_remove_should_give_message_on_removing_of_unknown_item), - STD_TEST("/do_remove/remove_second_item", test_do_remove_should_remove_second_item_by_number), + EXT_TEST("/do_remove/item_not_found", test_do_remove_should_give_message_on_removing_of_unknown_item, before_each, after_each), + EXT_TEST("/do_remove/remove_second_item", test_do_remove_should_remove_second_item_by_number, before_each, after_each), // end of array marker { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } diff --git a/src/test/test.example.c b/src/test/test.example.c new file mode 100644 index 0000000..13b9043 --- /dev/null +++ b/src/test/test.example.c @@ -0,0 +1,14 @@ +#include "test.example.h" + +UNIT_TEST(example_test) +{ + return MUNIT_OK; +} + + +MunitTest test_example_c_tests[] = { + STD_TEST("/example/example_test", example_test), + + // end of array marker + { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } +}; diff --git a/src/test/test.example.h b/src/test/test.example.h new file mode 100644 index 0000000..4e4a69a --- /dev/null +++ b/src/test/test.example.h @@ -0,0 +1,10 @@ +#include "testrunner.h" + +#ifndef TEST_EXAMPLE_H +#define TEST_EXAMPLE_H + +extern MunitTest test_example_c_tests[]; + +UNIT_TEST(example_test); + +#endif \ No newline at end of file diff --git a/src/test/test.fixtures.c b/src/test/test.fixtures.c new file mode 100644 index 0000000..ec03833 --- /dev/null +++ b/src/test/test.fixtures.c @@ -0,0 +1,46 @@ +#include "test.fixtures.h" + + +/* + * test-fixtures common for many tests +*/ + +static char_data* test_char; + +void simple_world() +{ + int i; + CREATE(world, struct room_data, 1); + top_of_world = 0; + world[0].func = NULL; + world[0].contents = NULL; + world[0].people = NULL; + world[0].light = 0; + SCRIPT(&world[0]) = NULL; + + for (i = 0; i < NUM_OF_DIRS; i++) + world[0].dir_option[i] = NULL; + + world[0].ex_description = NULL; +} + + +char_data *get_test_char() { + return test_char; +} + +void add_test_char(room_rnum target_room_rnum) +{ + if (top_of_world < 0) { + fprintf(stderr, "World not created, nowhere to put character in add_test_char"); + exit(-1); + } + char_data *ch = create_char(); + CREATE(ch->player_specials, struct player_special_data, 1); + ch->char_specials.position = POS_STANDING; + CREATE(ch->desc, struct descriptor_data, 1); + + char_to_room(ch, target_room_rnum); + test_char = ch; +} + diff --git a/src/test/test.fixtures.h b/src/test/test.fixtures.h new file mode 100644 index 0000000..5f40766 --- /dev/null +++ b/src/test/test.fixtures.h @@ -0,0 +1,34 @@ +#ifndef TEST_FIXTURES_H +#define TEST_FIXTURES_H + +#include "../conf.h" +#include "../sysdep.h" +#include "../structs.h" +#include "../utils.h" +#include "../comm.h" +#include "../db.h" +#include "../handler.h" +#include "../screen.h" +#include "../interpreter.h" +#include "../spells.h" +#include "../dg_scripts.h" +#include "../act.h" +#include "../class.h" +#include "../fight.h" +#include "../quest.h" +#include "../mud_event.h" +#include "../munit/munit.h" +#include +#include +#include +#include + +/* + * test fixtures + */ +char_data *get_test_char(); + +void simple_world(); +void add_test_char(room_rnum target_room); + +#endif //TEST_FIXTURES_H diff --git a/src/test/testrunner.c b/src/test/testrunner.c index 18bafe3..2b1a1f2 100644 --- a/src/test/testrunner.c +++ b/src/test/testrunner.c @@ -1,15 +1,13 @@ #include "testrunner.h" #include "test.handler.h" #include "test.act.item.h" +#include "test.example.h" -static void simple_world(); -static void add_char(); - -static char_data* test_char; - -static MunitSuite suites[] = { +static MunitSuite suites[] = { { "/handler.c", handler_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, - { "/act.item.c", act_item_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, + { "/act.item.c", act_item_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, + { "/test.example.c", test_example_c_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE }, + { NULL, NULL, NULL, 0, MUNIT_SUITE_OPTION_NONE } }; @@ -24,39 +22,10 @@ static const MunitSuite test_suite = { int main(int argc, char* argv[MUNIT_ARRAY_PARAM(argc + 1)]) { logfile = stderr; - simple_world(); - add_char(); return munit_suite_main(&test_suite, (void*) "µnit", argc, argv); } -/* - * test-fixtures common for many tests -*/ - -static void simple_world() -{ - CREATE(world, struct room_data, 1); - top_of_world = 1; -} - -char_data *get_test_char() { - return test_char; -} - -static void add_char() -{ - char_data *ch = create_char(); - CREATE(ch->player_specials, struct player_special_data, 1); - new_mobile_data(ch); - ch->char_specials.position = POS_STANDING; - CREATE(ch->desc, struct descriptor_data, 1); - - char_to_room(ch, 0); - test_char = ch; -} - - static char testbuf[MAX_OUTPUT_BUFFER]; static int testbuf_size = 0; diff --git a/src/test/testrunner.h b/src/test/testrunner.h index 68eafe0..9613d7b 100644 --- a/src/test/testrunner.h +++ b/src/test/testrunner.h @@ -1,27 +1,7 @@ #ifndef TESTRUNNER_H #define TESTRUNNER_H -#include "../conf.h" -#include "../sysdep.h" -#include "../structs.h" -#include "../utils.h" -#include "../comm.h" -#include "../db.h" -#include "../handler.h" -#include "../screen.h" -#include "../interpreter.h" -#include "../spells.h" -#include "../dg_scripts.h" -#include "../act.h" -#include "../class.h" -#include "../fight.h" -#include "../quest.h" -#include "../mud_event.h" -#include "../munit/munit.h" -#include -#include -#include -#include +#include "test.fixtures.h" /** * Utility macro for defining tests. @@ -35,9 +15,15 @@ #define STD_TEST(test_name, test_fun) { (char *)(test_name), (test_fun), NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL } /* - * test fixtures + * An "extended test" has setup or teardown but doesn't take any parameters. + * This is a utility macro for the test suite listing. +*/ +#define EXT_TEST(test_name, test_fun, setup_fun, teardown_fun) { (char *)(test_name), (test_fun), (setup_fun), (teardown_fun), MUNIT_TEST_OPTION_NONE, NULL } + + +/* + * Returns the latest messages sent through send_to_char() or act() */ -char_data *get_test_char(); char *get_last_messages(); #endif \ No newline at end of file