Compare commits
32 Commits
v2025.0.0
...
feature/un
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b76945f1ff | ||
|
|
f6339b495e | ||
|
|
3e0c1ccc18 | ||
|
|
b9d84fc325 | ||
|
|
bdaca46e79 | ||
|
|
f1794521cf | ||
|
|
89eb009c4f | ||
|
|
9a0a096f85 | ||
|
|
ba7dc7bf6f | ||
|
|
558e71eed8 | ||
|
|
a4af23538f | ||
|
|
b471ff195e | ||
|
|
392f3d90b8 | ||
|
|
be8de64cf8 | ||
|
|
c8fc70bf43 | ||
|
|
9399b68f26 | ||
|
|
594cedbff6 | ||
|
|
9b242a1085 | ||
|
|
81e0eb009a | ||
|
|
59e2e4f180 | ||
|
|
f36c951ddc | ||
|
|
1330cb7b18 | ||
|
|
a3185bf925 | ||
|
|
b61dd29e00 | ||
|
|
8f958359e9 | ||
|
|
11d4693776 | ||
|
|
95cca56880 | ||
|
|
b5f460f74e | ||
|
|
7d3acb0e3d | ||
|
|
217eac8cb3 | ||
|
|
eb8e200a31 | ||
|
|
455e3a06ea |
8
.clang-tidy
Normal file
8
.clang-tidy
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Checks: >
|
||||||
|
-*,
|
||||||
|
clang-analyzer-*,
|
||||||
|
bugprone-*,
|
||||||
|
performance-*,
|
||||||
|
portability-*
|
||||||
|
#WarningsAsErrors: '*'
|
||||||
|
HeaderFilterRegex: 'src/.*'
|
||||||
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -13,7 +13,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- 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
|
- name: configure
|
||||||
run: ./configure
|
run: ./configure
|
||||||
|
- name: build tests
|
||||||
|
run: cd src && touch .accepted && make test
|
||||||
- name: build
|
- name: build
|
||||||
run: cd src && touch .accepted && make
|
run: cd src && touch .accepted && make clean && make all
|
||||||
|
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -71,6 +71,8 @@ lib/plrobjs/index
|
|||||||
/lib/etc/last
|
/lib/etc/last
|
||||||
# or mail
|
# or mail
|
||||||
lib/etc/plrmail
|
lib/etc/plrmail
|
||||||
|
# or time
|
||||||
|
lib/etc/time
|
||||||
|
|
||||||
# test object files, etc
|
# test object files, etc
|
||||||
src/test/depend
|
src/test/depend
|
||||||
@@ -82,9 +84,10 @@ src/test/testfile
|
|||||||
.vscode
|
.vscode
|
||||||
.project
|
.project
|
||||||
.settings
|
.settings
|
||||||
|
.idea
|
||||||
.cproject
|
.cproject
|
||||||
|
|
||||||
|
|
||||||
# macOS generated files
|
# macOS generated files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.DS_Store?
|
.DS_Store?
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "src/munit"]
|
||||||
|
path = src/munit
|
||||||
|
url = https://github.com/nemequ/munit.git
|
||||||
407
CMakeLists.txt
Normal file
407
CMakeLists.txt
Normal file
@@ -0,0 +1,407 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
project(TbaMUD C)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
# Include checker modules
|
||||||
|
include(CheckFunctionExists)
|
||||||
|
include(CheckIncludeFile)
|
||||||
|
include(CheckTypeSize)
|
||||||
|
include(CheckStructHasMember)
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
|
# Output paths
|
||||||
|
set(BIN_OUTPUT_DIR ${CMAKE_SOURCE_DIR}/bin)
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIR})
|
||||||
|
|
||||||
|
# Include source and build paths
|
||||||
|
include_directories(src ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
|
# ========== Compiler flags ==========
|
||||||
|
if (CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
check_c_compiler_flag(-Wall SUPPORTS_WALL)
|
||||||
|
check_c_compiler_flag(-Wno-char-subscripts SUPPORTS_WNO_CHAR_SUBSCRIPTS)
|
||||||
|
|
||||||
|
if (SUPPORTS_WALL)
|
||||||
|
set(MYFLAGS "-Wall")
|
||||||
|
if (SUPPORTS_WNO_CHAR_SUBSCRIPTS)
|
||||||
|
set(MYFLAGS "${MYFLAGS} -Wno-char-subscripts")
|
||||||
|
endif()
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MYFLAGS}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# clang-tidy if available
|
||||||
|
find_program(CLANG_TIDY_EXE NAMES clang-tidy)
|
||||||
|
|
||||||
|
if(CLANG_TIDY_EXE AND STATIC_ANALYSIS)
|
||||||
|
message(STATUS "clang-tidy enabled: ${CLANG_TIDY_EXE}")
|
||||||
|
set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_EXE}")
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
else()
|
||||||
|
message(WARNING "clang-tidy not found. Static analysis disabled.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========== Header checks ==========
|
||||||
|
check_include_file("fcntl.h" HAVE_FCNTL_H)
|
||||||
|
check_include_file("errno.h" HAVE_ERRNO_H)
|
||||||
|
check_include_file("string.h" HAVE_STRING_H)
|
||||||
|
check_include_file("strings.h" HAVE_STRINGS_H)
|
||||||
|
check_include_file("limits.h" HAVE_LIMITS_H)
|
||||||
|
check_include_file("sys/select.h" HAVE_SYS_SELECT_H)
|
||||||
|
check_include_file("sys/wait.h" HAVE_SYS_WAIT_H)
|
||||||
|
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
|
||||||
|
check_include_file("unistd.h" HAVE_UNISTD_H)
|
||||||
|
check_include_file("memory.h" HAVE_MEMORY_H)
|
||||||
|
check_include_file("assert.h" HAVE_ASSERT_H)
|
||||||
|
check_include_file("arpa/telnet.h" HAVE_ARPA_TELNET_H)
|
||||||
|
check_include_file("arpa/inet.h" HAVE_ARPA_INET_H)
|
||||||
|
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
|
||||||
|
check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H)
|
||||||
|
check_include_file("sys/resource.h" HAVE_SYS_RESOURCE_H)
|
||||||
|
check_include_file("netinet/in.h" HAVE_NETINET_IN_H)
|
||||||
|
check_include_file("netdb.h" HAVE_NETDB_H)
|
||||||
|
check_include_file("signal.h" HAVE_SIGNAL_H)
|
||||||
|
check_include_file("sys/uio.h" HAVE_SYS_UIO_H)
|
||||||
|
check_include_file("mcheck.h" HAVE_MCHECK_H)
|
||||||
|
check_include_file("stdlib.h" HAVE_STDLIB_H)
|
||||||
|
check_include_file("stdarg.h" HAVE_STDARG_H)
|
||||||
|
check_include_file("float.h" HAVE_FLOAT_H)
|
||||||
|
|
||||||
|
if (HAVE_STDLIB_H AND HAVE_STDARG_H AND HAVE_STRING_H AND HAVE_FLOAT_H)
|
||||||
|
set(STDC_HEADERS 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# macros
|
||||||
|
macro(check_run_return_value CODE EXPECTED_RESULT VAR_NAME)
|
||||||
|
set(_file "${CMAKE_BINARY_DIR}/check_run_${VAR_NAME}.c")
|
||||||
|
file(WRITE "${_file}" "${CODE}")
|
||||||
|
try_run(_run_result _compile_result
|
||||||
|
${CMAKE_BINARY_DIR} ${_file}
|
||||||
|
)
|
||||||
|
if (_compile_result EQUAL 0 AND _run_result EQUAL ${EXPECTED_RESULT})
|
||||||
|
set(${VAR_NAME} TRUE)
|
||||||
|
else()
|
||||||
|
set(${VAR_NAME} FALSE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# ========== Function checks ==========
|
||||||
|
foreach(FUNC gettimeofday select snprintf strcasecmp strdup strerror
|
||||||
|
stricmp strlcpy strncasecmp strnicmp strstr vsnprintf vprintf
|
||||||
|
inet_addr inet_aton)
|
||||||
|
string(TOUPPER "${FUNC}" _upper_name)
|
||||||
|
check_function_exists(${FUNC} HAVE_${_upper_name})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if (NOT HAVE_VPRINTF)
|
||||||
|
check_function_exists(_doprnt HAVE_DOPRNT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# ========== Type checks ==========
|
||||||
|
check_type_size("pid_t" HAVE_PID_T)
|
||||||
|
check_type_size("size_t" HAVE_SIZE_T)
|
||||||
|
check_type_size("ssize_t" HAVE_SSIZE_T)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
|
||||||
|
check_type_size("socklen_t" HAVE_SOCKLEN_T)
|
||||||
|
unset(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
if (NOT HAVE_PID_T)
|
||||||
|
set(pid_t int)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT HAVE_SIZE_T)
|
||||||
|
set(size_t "unsigned")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT HAVE_SSIZE_T)
|
||||||
|
set(ssize_t int)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT HAVE_SOCKLEN_T)
|
||||||
|
set(socklen_t int)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========== const ==========
|
||||||
|
check_c_source_compiles("
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
/* Ultrix mips cc rejects this. */
|
||||||
|
typedef int charset[2]; const charset x;
|
||||||
|
/* SunOS 4.1.1 cc rejects this. */
|
||||||
|
char const *const *ccp;
|
||||||
|
char **p;
|
||||||
|
/* NEC SVR4.0.2 mips cc rejects this. */
|
||||||
|
struct point {int x, y;};
|
||||||
|
static struct point const zero = {0,0};
|
||||||
|
/* AIX XL C 1.02.0.0 rejects this.
|
||||||
|
It does not let you subtract one const X* pointer from another in an arm
|
||||||
|
of an if-expression whose if-part is not a constant expression */
|
||||||
|
const char *g = \"string\";
|
||||||
|
ccp = &g + (g ? g-g : 0);
|
||||||
|
/* HPUX 7.0 cc rejects these. */
|
||||||
|
++ccp;
|
||||||
|
p = (char**) ccp;
|
||||||
|
ccp = (char const *const *) p;
|
||||||
|
{ /* SCO 3.2v4 cc rejects this. */
|
||||||
|
char *t;
|
||||||
|
char const *s = 0 ? (char *) 0 : (char const *) 0;
|
||||||
|
|
||||||
|
*t++ = 0;
|
||||||
|
}
|
||||||
|
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
|
||||||
|
int x[] = {25, 17};
|
||||||
|
const int *foo = &x[0];
|
||||||
|
++foo;
|
||||||
|
}
|
||||||
|
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
|
||||||
|
typedef const int *iptr;
|
||||||
|
iptr p = 0;
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
{ /* AIX XL C 1.02.0.0 rejects this saying
|
||||||
|
\"k.c\", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
|
||||||
|
struct s { int j; const int *ap[3]; };
|
||||||
|
struct s *b; b->j = 5;
|
||||||
|
}
|
||||||
|
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
|
||||||
|
const int foo = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
; return 0; }
|
||||||
|
" HAVE_CONST)
|
||||||
|
|
||||||
|
if (HAVE_CONST)
|
||||||
|
set(CONST_KEYWORD const)
|
||||||
|
else()
|
||||||
|
set(CONST_KEYWORD "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========== Struct checks ==========
|
||||||
|
if (HAVE_NETINET_IN_H)
|
||||||
|
check_struct_has_member("struct in_addr" s_addr netinet/in.h HAVE_STRUCT_IN_ADDR)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========== crypt()/libcrypt ==========
|
||||||
|
|
||||||
|
find_library(CRYPT_LIBRARY crypt)
|
||||||
|
if (CRYPT_LIBRARY)
|
||||||
|
message(STATUS "Found libcrypt: ${CRYPT_LIBRARY}")
|
||||||
|
list(APPEND EXTRA_LIBS ${CRYPT_LIBRARY})
|
||||||
|
set(_saved_lib_list ${CMAKE_REQUIRED_LIBRARIES})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${CRYPT_LIBRARY})
|
||||||
|
check_include_file("crypt.h" HAVE_CRYPT_H)
|
||||||
|
check_function_exists(crypt CIRCLE_CRYPT)
|
||||||
|
|
||||||
|
check_run_return_value("
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
${HAVE_CRYPT_H} ? \"#include <crypt.h>\" : \"\"
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
char pwd[11], pwd2[11];
|
||||||
|
|
||||||
|
strncpy(pwd, (char *)crypt(\"FooBar\", \"BazQux\"), 10);
|
||||||
|
pwd[10] = '\\\\0';
|
||||||
|
strncpy(pwd2, (char *)crypt(\"xyzzy\", \"BazQux\"), 10);
|
||||||
|
pwd2[10] = '\\\\0';
|
||||||
|
if (strcmp(pwd, pwd2) == 0)
|
||||||
|
exit(0);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
" 0 HAVE_UNSAFE_CRYPT)
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${_saved_lib_list})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# ========== network libs ==========
|
||||||
|
check_function_exists(gethostbyaddr HAVE_GETHOSTBYADDR)
|
||||||
|
if (NOT HAVE_GETHOSTBYADDR)
|
||||||
|
message(STATUS "gethostbyaddr() not available, trying nsllib")
|
||||||
|
find_library(NSL_LIBRARY nsl)
|
||||||
|
if (NSL_LIBRARY)
|
||||||
|
message(STATUS "...nsllib found.")
|
||||||
|
list(APPEND EXTRA_LIBS ${NSL_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
check_function_exists(socket HAVE_SOCKET)
|
||||||
|
if (NOT HAVE_SOCKET)
|
||||||
|
message(STATUS "socket() not available, trying socketlib")
|
||||||
|
find_library(SOCKET_LIBRARY socket)
|
||||||
|
if (SOCKET_LIBRARY)
|
||||||
|
message(STATUS "...socketlib found")
|
||||||
|
list(APPEND EXTRA_LIBS ${SOCKET_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========== time.h needs special treatment ==========
|
||||||
|
check_include_file("sys/time.h" HAVE_SYS_TIME_H)
|
||||||
|
check_include_file("sys/time.h" HAVE_TIME_H)
|
||||||
|
|
||||||
|
if (HAVE_SYS_TIME_H AND HAVE_TIME_H)
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
int main() {
|
||||||
|
struct tm *tp;
|
||||||
|
; return 0; }
|
||||||
|
" TIME_WITH_SYS_TIME)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========== Determine return value of signal() ==========
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <signal.h>
|
||||||
|
int handler(int sig) { return 0; }
|
||||||
|
int main() {
|
||||||
|
signal(SIGINT, handler);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
" SIGNAL_RETURNS_INT FAIL_REGEX ".*incompatible pointer type.*")
|
||||||
|
|
||||||
|
check_c_source_compiles("
|
||||||
|
#include <signal.h>
|
||||||
|
void handler(int sig) { }
|
||||||
|
int main() {
|
||||||
|
signal(SIGINT, handler);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
" SIGNAL_RETURNS_VOID FAIL_REGEX ".*incompatible pointer type.*")
|
||||||
|
|
||||||
|
if (SIGNAL_RETURNS_INT)
|
||||||
|
message(STATUS "signal() returns int.")
|
||||||
|
set(RETSIGTYPE int)
|
||||||
|
elseif (SIGNAL_RETURNS_VOID)
|
||||||
|
message(STATUS "signal() returns void.")
|
||||||
|
set(RETSIGTYPE void)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Could not determine return value from signal handler.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========== Define general UNIX-system ==========
|
||||||
|
if (UNIX)
|
||||||
|
set(CIRCLE_UNIX 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(PROTO_FUNCTIONS
|
||||||
|
accept
|
||||||
|
bind
|
||||||
|
gettimeofday
|
||||||
|
atoi
|
||||||
|
atol
|
||||||
|
bzero
|
||||||
|
chdir
|
||||||
|
close
|
||||||
|
fclose
|
||||||
|
fcntl
|
||||||
|
fflush
|
||||||
|
fprintf
|
||||||
|
fputc
|
||||||
|
fread
|
||||||
|
fscanf
|
||||||
|
fseek
|
||||||
|
fwrite
|
||||||
|
getpeername
|
||||||
|
getpid
|
||||||
|
getrlimit
|
||||||
|
getsockname
|
||||||
|
htonl
|
||||||
|
htons
|
||||||
|
inet_addr
|
||||||
|
inet_aton
|
||||||
|
inet_ntoa
|
||||||
|
listen
|
||||||
|
ntohl
|
||||||
|
perror
|
||||||
|
printf
|
||||||
|
qsort
|
||||||
|
read
|
||||||
|
remove
|
||||||
|
rewind
|
||||||
|
select
|
||||||
|
setitimer
|
||||||
|
setrlimit
|
||||||
|
setsockopt
|
||||||
|
snprintf
|
||||||
|
sprintf
|
||||||
|
sscanf
|
||||||
|
strcasecmp
|
||||||
|
strdup
|
||||||
|
strerror
|
||||||
|
stricmp
|
||||||
|
strlcpy
|
||||||
|
strncasecmp
|
||||||
|
strnicmp
|
||||||
|
system
|
||||||
|
time
|
||||||
|
unlink
|
||||||
|
vsnprintf
|
||||||
|
write
|
||||||
|
socket
|
||||||
|
)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/src/conf.h.cmake.in
|
||||||
|
${CMAKE_BINARY_DIR}/tmp_conf.h
|
||||||
|
)
|
||||||
|
|
||||||
|
macro(check_function_prototype FUNCTION)
|
||||||
|
set(_code "
|
||||||
|
#define NO_LIBRARY_PROTOTYPES
|
||||||
|
#define __COMM_C__
|
||||||
|
#define __ACT_OTHER_C__
|
||||||
|
#include \"${CMAKE_BINARY_DIR}/tmp_conf.h\"
|
||||||
|
#include \"${CMAKE_SOURCE_DIR}/src/sysdep.h\"
|
||||||
|
#ifdef ${FUNCTION}
|
||||||
|
error - already defined!
|
||||||
|
#endif
|
||||||
|
void ${FUNCTION}(int a, char b, int c, char d, int e, char f, int g, char h);
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
; return 0; }
|
||||||
|
")
|
||||||
|
string(TOUPPER "${FUNCTION}" _upper_name)
|
||||||
|
check_c_source_compiles("${_code}" NEED_${_upper_name}_PROTO FAIL_REGEX ".*incompatible pointer type.*")
|
||||||
|
if (NEED_${_upper_name}_PROTO)
|
||||||
|
message(STATUS "${FUNCTION}() has no prototype, NEED_${_upper_name}_PROTO set!")
|
||||||
|
else()
|
||||||
|
message(STATUS "${FUNCTION}() has a prototype, not setting NEED_${_upper_name}_PROTO")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
foreach (FUNC ${PROTO_FUNCTIONS})
|
||||||
|
check_function_prototype(${FUNC})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
|
||||||
|
# ========== Generate conf.h ==========
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/src/conf.h.cmake.in
|
||||||
|
${CMAKE_BINARY_DIR}/conf.h
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ========== Source-filer ==========
|
||||||
|
file(GLOB SRC_FILES src/*.c)
|
||||||
|
|
||||||
|
# ========== Bygg kjørbar ==========
|
||||||
|
add_executable(circle ${SRC_FILES})
|
||||||
|
target_link_libraries(circle ${EXTRA_LIBS})
|
||||||
|
|
||||||
|
add_subdirectory(src/util)
|
||||||
|
|
||||||
|
if (MEMORY_DEBUG)
|
||||||
|
message(STATUS "MEMORY_DEBUG is activated, setting up zmalloc")
|
||||||
|
target_compile_definitions(circle PRIVATE MEMORY_DEBUG)
|
||||||
|
endif()
|
||||||
18
README.md
18
README.md
@@ -1,3 +1,21 @@
|
|||||||
Files for tbaMUD.
|
Files for tbaMUD.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## To build
|
||||||
|
|
||||||
|
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 && git submodule update`
|
||||||
|
|
||||||
|
2. install the cmocka-library: `sudo apt install libcmocka-dev`
|
||||||
|
3. `./config.status && cd src && make test`
|
||||||
@@ -1 +0,0 @@
|
|||||||
cmake -B . -S ..\src -G "Visual Studio 17 2022"
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
Updated: Apr 2007
|
Updated: Apr 2007
|
||||||
tbaMUD README
|
tbaMUD README
|
||||||
-------------
|
-------------
|
||||||
All requests for help or bugs should be reported to: builderacademy.net 9091.
|
All requests for help or bugs should be reported to: tbamud.com 9091.
|
||||||
|
|
||||||
Information about CircleMUD can be found at the CircleMUD Home Page and FTP:
|
Information about CircleMUD can be found at the CircleMUD Home Page and FTP:
|
||||||
http://www.circlemud.org
|
http://www.circlemud.org
|
||||||
|
|||||||
@@ -1,81 +0,0 @@
|
|||||||
Compiling CircleMUD on the Amiga
|
|
||||||
Written by Damian Jurzysta <boing@amigascne.org>
|
|
||||||
|
|
||||||
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.
|
|
||||||
@@ -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 <Obey$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
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
Compiling CircleMUD
|
|
||||||
under Microsoft Windows 95 or Windows NT
|
|
||||||
using Borland C++
|
|
||||||
|
|
||||||
Written by Mundi King <kingmundi@yahoo.com>
|
|
||||||
|
|
||||||
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
|
|
||||||
93
doc/README.CMAKE.md
Normal file
93
doc/README.CMAKE.md
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
Updated 2025-04
|
||||||
|
|
||||||
|
## Building TbaMUD with the cmake tool
|
||||||
|
|
||||||
|
# Building with CMake
|
||||||
|
|
||||||
|
This document describes how to configure, build and install tbamud
|
||||||
|
from source code using the CMake build tool. To build with CMake, you of
|
||||||
|
course first have to install CMake. The minimum required version of CMake is
|
||||||
|
specified in the file `CMakeLists.txt` found in the top of the tbamud source
|
||||||
|
tree. Once the correct version of CMake is installed you can follow the
|
||||||
|
instructions below for the platform you are building on.
|
||||||
|
|
||||||
|
CMake builds can be configured either from the command line, or from one of
|
||||||
|
CMake's GUIs.
|
||||||
|
|
||||||
|
NOTE: The current CMakeLists.txt only supports linux.
|
||||||
|
|
||||||
|
# Configuring
|
||||||
|
|
||||||
|
A CMake configuration of tbamud is similar to the autotools build of curl.
|
||||||
|
It consists of the following steps after you have unpacked the source.
|
||||||
|
|
||||||
|
We recommend building with CMake on Windows.
|
||||||
|
|
||||||
|
## Using `cmake`
|
||||||
|
|
||||||
|
You can configure for in source tree builds or for a build tree
|
||||||
|
that is apart from the source tree.
|
||||||
|
|
||||||
|
- Build in a separate directory (parallel to the source tree in this
|
||||||
|
example). The build directory is created for you. This is recommended over
|
||||||
|
building in the source tree to separate source and build artifacts.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cmake -B build -S .
|
||||||
|
```
|
||||||
|
|
||||||
|
- Build in the source tree. Not recommended.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cmake -B .
|
||||||
|
```
|
||||||
|
|
||||||
|
The examples below will assume you have created a build folder.
|
||||||
|
|
||||||
|
The above commands will generate the build files. If you need to regenerate
|
||||||
|
the files, you can delete the cmake cache file, and rerun the above command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ rm build/CMakeCache.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
Once the build files are generated, the build is run with cmake
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cmake --build build
|
||||||
|
```
|
||||||
|
|
||||||
|
This will generate the object files in a subdirectory under the specified
|
||||||
|
build folder and link the executable. The resulting binaries will be in the
|
||||||
|
bin/ folder.
|
||||||
|
|
||||||
|
### Utilities
|
||||||
|
|
||||||
|
It is possible to build only single tools, none or all of them,
|
||||||
|
by specifying the target in the build command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# only build the mud
|
||||||
|
$ cmake --build build --target circle
|
||||||
|
|
||||||
|
# only build tools
|
||||||
|
$ cmake --build build --target utils
|
||||||
|
|
||||||
|
# only build one tool
|
||||||
|
$ cmake --build build --target wld2html
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debugging memory
|
||||||
|
|
||||||
|
In case you want to run the mud with memory debugging turned on, you
|
||||||
|
can set the MEMORY_DEBUG flag during configuration by specifying the
|
||||||
|
flag:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cmake -B build -S . -DMEMORY_DEBUG:int=1
|
||||||
|
$ cmake --build build
|
||||||
|
```
|
||||||
|
|
||||||
|
When the mud is shut down, the zmalloc code will identify any leaks in your code.
|
||||||
|
Note that memory debugging may consume quite a lot of memory and take some time
|
||||||
|
to be handled on shutdown.
|
||||||
@@ -1,15 +1,21 @@
|
|||||||
### Overview
|
Updated: Apr 2025
|
||||||
This guide describes how to build TbaMUD in the Visual Studio through the new experimental CMake environment.
|
Compiling CircleMUD under Microsoft Windows XP
|
||||||
|
using Microsoft Visual C++ 2022 (8.0)
|
||||||
### Prerequisites
|
|
||||||
* [Visual Studio 2022+](https://visualstudio.microsoft.com/ru/vs/)
|
### Overview
|
||||||
* [CMake 3.27+](https://cmake.org/)
|
This guide describes how to build TbaMUD in the Visual Studio through the new experimental CMake environment.
|
||||||
|
|
||||||
### Build Steps
|
### Prerequisites
|
||||||
1. Goto the folder `src` and copy `conf.h.win` to `conf.h`.
|
* [Visual Studio 2022+](https://visualstudio.microsoft.com/ru/vs/)
|
||||||
|
* [CMake 3.27+](https://cmake.org/)
|
||||||
2. Goto the folder `build` and execute `create_solution.bat`.
|
|
||||||
|
### Build Steps
|
||||||
3. Open `build/circle.sln` in Visual Studio.
|
1. Goto the folder `src` and copy `conf.h.win` to `conf.h`.
|
||||||
|
|
||||||
|
2. Run this command in the root folder:
|
||||||
|
|
||||||
|
cmake -B build -S . -G "Visual Studio 17 2022"
|
||||||
|
|
||||||
|
3. Open `build/circle.sln` in Visual Studio.
|
||||||
|
|
||||||
4. Compile and run.
|
4. Compile and run.
|
||||||
@@ -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
|
|
||||||
@@ -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.
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
Compiling CircleMUD
|
|
||||||
under Microsoft Windows 95 or Windows NT
|
|
||||||
using Watcom v.11
|
|
||||||
|
|
||||||
|
|
||||||
The following information is from Joe Osburn <joeos19@idt.net>.
|
|
||||||
|
|
||||||
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.
|
|
||||||
30
doc/act.txt
30
doc/act.txt
@@ -24,7 +24,7 @@ Contents
|
|||||||
1.1 Overview
|
1.1 Overview
|
||||||
The act() function is used to process and send strings of text to characters
|
The act() function is used to process and send strings of text to characters
|
||||||
in a room. It can be used to send the same basic string to a number of
|
in a room. It can be used to send the same basic string to a number of
|
||||||
characters filling in certain segments – designated by control characters –
|
characters filling in certain segments – designated by control characters –
|
||||||
in different ways, dependant on what each character can see and who each
|
in different ways, dependant on what each character can see and who each
|
||||||
character is. Once the text string passed to the function has been parsed, it
|
character is. Once the text string passed to the function has been parsed, it
|
||||||
is capitalized and a newline is added to its tail.
|
is capitalized and a newline is added to its tail.
|
||||||
@@ -38,17 +38,17 @@ struct obj_data *obj, const void *vict_obj, int type)
|
|||||||
These pieces are used as follows:
|
These pieces are used as follows:
|
||||||
|
|
||||||
str: This is the basic string, a null terminated character array, including
|
str: This is the basic string, a null terminated character array, including
|
||||||
control characters (see section 1.4 on ‘Control Characters’), to be sent to
|
control characters (see section 1.4 on ‘Control Characters’), to be sent to
|
||||||
characters designated by the targets.
|
characters designated by the targets.
|
||||||
|
|
||||||
hide_invisible: A TRUE or FALSE value indicating whether or not to hide the
|
hide_invisible: A TRUE or FALSE value indicating whether or not to hide the
|
||||||
entire output from any characters that cannot see the “performing character”.
|
entire output from any characters that cannot see the “performing character”.
|
||||||
|
|
||||||
ch: The “performing character”. This is the character that the output string
|
ch: The “performing character”. This is the character that the output string
|
||||||
is associated with. The character is used to determine the room for the output
|
is associated with. The character is used to determine the room for the output
|
||||||
of the action in question.
|
of the action in question.
|
||||||
|
|
||||||
obj: An object (an actual item – obj_data) used in the course of the action.
|
obj: An object (an actual item – obj_data) used in the course of the action.
|
||||||
|
|
||||||
vict_obj: This can be either a character involved in the action, another
|
vict_obj: This can be either a character involved in the action, another
|
||||||
object, or even a predefined string of text.
|
object, or even a predefined string of text.
|
||||||
@@ -73,7 +73,7 @@ The next parameter vict_objcan be a number of things ranging from a game object
|
|||||||
null terminated character array (char *).
|
null terminated character array (char *).
|
||||||
|
|
||||||
Do note, however, that obj and vict_obj are both ignored if there is no control
|
Do note, however, that obj and vict_obj are both ignored if there is no control
|
||||||
character reference (see section 1.4 ‘Control Characters’) to them and the type
|
character reference (see section 1.4 ‘Control Characters’) to them and the type
|
||||||
is set to TO_ROOM or TO_CHAR. In these cases, NULL should be supplied as the
|
is set to TO_ROOM or TO_CHAR. In these cases, NULL should be supplied as the
|
||||||
input to the function.
|
input to the function.
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ TO_CHAR: Finally, this option sends the output to the ch.
|
|||||||
|
|
||||||
TO_SLEEP: This is a special option that must be combined with one of the above
|
TO_SLEEP: This is a special option that must be combined with one of the above
|
||||||
options. It tells act() that the output is to be sent even to characters that
|
options. It tells act() that the output is to be sent even to characters that
|
||||||
are sleeping. It is combined with a bitwise ‘or’. i.e. TO_VICT | TO_SLEEP.
|
are sleeping. It is combined with a bitwise ‘or’. i.e. TO_VICT | TO_SLEEP.
|
||||||
|
|
||||||
When the string has been parsed, it is capitalized and a newline is added.
|
When the string has been parsed, it is capitalized and a newline is added.
|
||||||
|
|
||||||
@@ -105,20 +105,20 @@ In a manner similar to the printf() family of functions, act() uses control
|
|||||||
characters. However, instead of using the % symbol, act() uses the $ character
|
characters. However, instead of using the % symbol, act() uses the $ character
|
||||||
to indicate control characters.
|
to indicate control characters.
|
||||||
|
|
||||||
$n Write name, short description, or “someone”, for ch, depending on whether
|
$n Write name, short description, or “someone”, for ch, depending on whether
|
||||||
ch is a PC, a NPC, or an invisible PC/NPC.
|
ch is a PC, a NPC, or an invisible PC/NPC.
|
||||||
$N Like $n, except insert the text for vict_obj.*
|
$N Like $n, except insert the text for vict_obj.*
|
||||||
$m “him,” “her,” or “it,” depending on the gender of ch.
|
$m “him,” “her,” or “it,” depending on the gender of ch.
|
||||||
$M Like $m, for vict_obj.*
|
$M Like $m, for vict_obj.*
|
||||||
$s “his,” “her,”or “it,” depending on the gender of ch.
|
$s “his,” “her,”or “it,” depending on the gender of ch.
|
||||||
$S Like $s, for vict_obj.*
|
$S Like $s, for vict_obj.*
|
||||||
$e “he,” “she,” “it,” depending on the gender of ch.
|
$e “he,” “she,” “it,” depending on the gender of ch.
|
||||||
$E Like $e, for vict_obj.*
|
$E Like $e, for vict_obj.*
|
||||||
$o Name or “something” for obj, depending on visibility.
|
$o Name or “something” for obj, depending on visibility.
|
||||||
$O Like $o, for vict_obj.*
|
$O Like $o, for vict_obj.*
|
||||||
$p Short description or “something” for obj.
|
$p Short description or “something” for obj.
|
||||||
$P Like $p for vict_obj.*
|
$P Like $p for vict_obj.*
|
||||||
$a “an” or“a”, depending on the first character of obj’s name.
|
$a “an” or“a”, depending on the first character of obj’s name.
|
||||||
$A Like $a, for vict_obj.*
|
$A Like $a, for vict_obj.*
|
||||||
$T Prints the string pointed to by vict_obj.*
|
$T Prints the string pointed to by vict_obj.*
|
||||||
$F Processes the string pointed to by vict_obj with the fname() function prior
|
$F Processes the string pointed to by vict_obj with the fname() function prior
|
||||||
@@ -129,7 +129,7 @@ no action is taken.
|
|||||||
$U Processes the buffer and uppercases the first letter of the following word
|
$U Processes the buffer and uppercases the first letter of the following word
|
||||||
(the word immediately after to the control code). If there is no following
|
(the word immediately after to the control code). If there is no following
|
||||||
word, no action is taken.
|
word, no action is taken.
|
||||||
$$ Print the character ‘$’.
|
$$ Print the character ‘$’.
|
||||||
|
|
||||||
NOTE*: vict_obj must be a pointer of type struct char_data *.
|
NOTE*: vict_obj must be a pointer of type struct char_data *.
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ to players in color in the tbaMUD game engine. Its intended audience is for
|
|||||||
Coders of tbaMUD.
|
Coders of tbaMUD.
|
||||||
|
|
||||||
tbaMUD allows you to create colorful messages by using ANSI control sequences.
|
tbaMUD allows you to create colorful messages by using ANSI control sequences.
|
||||||
Each player may select what “level” of color he/she desires from the four
|
Each player may select what “level” of color he/she desires from the four
|
||||||
levels “off,” “brief,” “normal,” and “complete.” Each player can select his/her
|
levels “off,” “brief,” “normal,” and “complete.” Each player can select his/her
|
||||||
color level by using the TOGGLE COLOR command from within the MUD; you as the
|
color level by using the TOGGLE COLOR command from within the MUD; you as the
|
||||||
programmer must decide which messages will be colored for each of the color
|
programmer must decide which messages will be colored for each of the color
|
||||||
levels.
|
levels.
|
||||||
@@ -21,17 +21,17 @@ All files in which you wish to use color must have the line:
|
|||||||
|
|
||||||
This should be put in after all other includes in the beginning of the file.
|
This should be put in after all other includes in the beginning of the file.
|
||||||
|
|
||||||
There are 8 colors available – “normal,” red, green, yellow, blue, magenta,
|
There are 8 colors available – “normal,” red, green, yellow, blue, magenta,
|
||||||
cyan and white. They are accessible by sending control sequences as part of
|
cyan and white. They are accessible by sending control sequences as part of
|
||||||
another string, for example:
|
another string, for example:
|
||||||
|
|
||||||
sprintf(buf, "If you’re %shappy%s and you know it clap "
|
sprintf(buf, "If you’re %shappy%s and you know it clap "
|
||||||
"%d of your hands.\n\r", x, y, num_of_hands);
|
"%d of your hands.\n\r", x, y, num_of_hands);
|
||||||
send_to_char(ch, buf);
|
send_to_char(ch, buf);
|
||||||
|
|
||||||
In this example, x and y are the “on” and “off” sequences for the color you
|
In this example, x and y are the “on” and “off” sequences for the color you
|
||||||
want. There are 2 main series of color macros available for you to use (don’t
|
want. There are 2 main series of color macros available for you to use (don’t
|
||||||
actually use “x” and “y,” of course!): the K series and the CC series. The CC
|
actually use “x” and “y,” of course!): the K series and the CC series. The CC
|
||||||
(Conditional Color) series is recommended for most general use.
|
(Conditional Color) series is recommended for most general use.
|
||||||
|
|
||||||
The name of the actual sequence starts with the name of its series, plus a
|
The name of the actual sequence starts with the name of its series, plus a
|
||||||
@@ -51,21 +51,21 @@ CCBLU() (arguments defined below).
|
|||||||
|
|
||||||
The K series requires no arguments, and is simply a macro to the ANSI color
|
The K series requires no arguments, and is simply a macro to the ANSI color
|
||||||
code. Therefore, if you use a K-series color code, the color will ALWAYS be
|
code. Therefore, if you use a K-series color code, the color will ALWAYS be
|
||||||
sent, even if the person you’re sending it to has color off. This can very bad.
|
sent, even if the person you’re sending it to has color off. This can very bad.
|
||||||
Some people who do not have ANSI-compatible terminals will see garbage
|
Some people who do not have ANSI-compatible terminals will see garbage
|
||||||
characters instead of colors. If the terminal correctly ignores ANSI color
|
characters instead of colors. If the terminal correctly ignores ANSI color
|
||||||
codes, then nothing will show up on their screen at all. The K series is mainly
|
codes, then nothing will show up on their screen at all. The K series is mainly
|
||||||
used to print colors to a string if the player’s color level will later be
|
used to print colors to a string if the player’s color level will later be
|
||||||
tested manually (for an example, see do_gen_com in act.comm.c).
|
tested manually (for an example, see do_gen_com in act.comm.c).
|
||||||
|
|
||||||
The recommended series is the CC series (i.e. CCNRM(), CCRED(), etc.) The CC
|
The recommended series is the CC series (i.e. CCNRM(), CCRED(), etc.) The CC
|
||||||
series macros require two arguments – a pointer to the character to whom the
|
series macros require two arguments – a pointer to the character to whom the
|
||||||
string is being sent, and the minimum color level the player must be set to in
|
string is being sent, and the minimum color level the player must be set to in
|
||||||
order to see the color. Color sent as 'brief' (formerly known as sparse it was
|
order to see the color. Color sent as 'brief' (formerly known as sparse it was
|
||||||
changed for consistency with the syslog command) (C_SPR) will be seen by people
|
changed for consistency with the syslog command) (C_SPR) will be seen by people
|
||||||
with color set to sparse, normal, or complete; color sent as ‘normal’ (C_NRM)
|
with color set to sparse, normal, or complete; color sent as ‘normal’ (C_NRM)
|
||||||
will be seen only by people with color set to normal or complete; color sent as
|
will be seen only by people with color set to normal or complete; color sent as
|
||||||
‘complete’ (C_CMP) will be seen only by people with color set to complete.
|
‘complete’ (C_CMP) will be seen only by people with color set to complete.
|
||||||
|
|
||||||
To illustrate the above, an example is in order:
|
To illustrate the above, an example is in order:
|
||||||
|
|
||||||
@@ -76,29 +76,29 @@ ACMD(do_showcolor)
|
|||||||
{
|
{
|
||||||
char buf[300];
|
char buf[300];
|
||||||
|
|
||||||
sprintf(buf, "Don’t you just love %scolor%s, %scolor%s, " "%sCOLOR%s!\n\r",
|
sprintf(buf, "Don’t you just love %scolor%s, %scolor%s, " "%sCOLOR%s!\n\r",
|
||||||
CCBLU(ch, C_CMP), CCNRM(ch, C_CMP), CCYEL(ch, C_NRM), CCNRM(ch, C_NRM),
|
CCBLU(ch, C_CMP), CCNRM(ch, C_CMP), CCYEL(ch, C_NRM), CCNRM(ch, C_NRM),
|
||||||
CCRED(ch, C_SPR), CCNRM(ch, C_SPR));
|
CCRED(ch, C_SPR), CCNRM(ch, C_SPR));
|
||||||
send_to_char(ch, buf);
|
send_to_char(ch, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
What does this do? For people with color set to Complete, it prints:
|
What does this do? For people with color set to Complete, it prints:
|
||||||
Don’t you just love color, color, COLOR! (blue) (yellow) (red)
|
Don’t you just love color, color, COLOR! (blue) (yellow) (red)
|
||||||
|
|
||||||
People who have color set to Normal will see:
|
People who have color set to Normal will see:
|
||||||
Don’t you just love color, color, COLOR! (yellow) (red)
|
Don’t you just love color, color, COLOR! (yellow) (red)
|
||||||
|
|
||||||
People who have color set to Sparse will see:
|
People who have color set to Sparse will see:
|
||||||
Don’t you just love color, color, COLOR! (red)
|
Don’t you just love color, color, COLOR! (red)
|
||||||
|
|
||||||
People who have color set to Off will see:
|
People who have color set to Off will see:
|
||||||
Don’t you just love color, color, COLOR! (no color, as you’d expect)
|
Don’t you just love color, color, COLOR! (no color, as you’d expect)
|
||||||
|
|
||||||
There are several common pitfalls with using the CC series of color macros:
|
There are several common pitfalls with using the CC series of color macros:
|
||||||
|
|
||||||
Do not confuse CCNRM with C_NRM. CCNRM() is a macro to turn the color back to
|
Do not confuse CCNRM with C_NRM. CCNRM() is a macro to turn the color back to
|
||||||
normal; C_NRMis a color level of “normal.” Always make sure that every pair of
|
normal; C_NRMis a color level of “normal.” Always make sure that every pair of
|
||||||
“on” and “off” codes are at the same color level. For example:
|
“on” and “off” codes are at the same color level. For example:
|
||||||
|
|
||||||
WRONG: sprintf(buf, "%sCOLOR%s\n\r", CCBLU(ch, C_NRM), CCNRM(ch, C_CMP));
|
WRONG: sprintf(buf, "%sCOLOR%s\n\r", CCBLU(ch, C_NRM), CCNRM(ch, C_CMP));
|
||||||
|
|
||||||
@@ -110,14 +110,14 @@ WRONG: sprintf(buf, "%sCOLOR%s\n\r", CCBLU(ch, C_CMP), CCNRM(ch, C_NRM));
|
|||||||
|
|
||||||
The above statement is also wrong, although not as bad. In this case, someone
|
The above statement is also wrong, although not as bad. In this case, someone
|
||||||
with color set to Normal will (correctly) not get the CCBLU code, but will then
|
with color set to Normal will (correctly) not get the CCBLU code, but will then
|
||||||
unnecessarily get the CCNRM code. Never send a color code if you don’t have to.
|
unnecessarily get the CCNRM code. Never send a color code if you don’t have to.
|
||||||
The codes are several bytes long, and cause a noticeable pause at 2400 baud.
|
The codes are several bytes long, and cause a noticeable pause at 2400 baud.
|
||||||
|
|
||||||
This should go without saying, but don’t ever send color at the C_OFF level.
|
This should go without saying, but don’t ever send color at the C_OFF level.
|
||||||
|
|
||||||
Special precautions must be taken when sending a colored string to a large
|
Special precautions must be taken when sending a colored string to a large
|
||||||
group of people. You can’t use the color level of “ch” (the person sending the
|
group of people. You can’t use the color level of “ch” (the person sending the
|
||||||
string) – each person receiving the string must get a string appropriately
|
string) – each person receiving the string must get a string appropriately
|
||||||
colored for his/her level. In such cases, it is usually best to set up two
|
colored for his/her level. In such cases, it is usually best to set up two
|
||||||
strings (one colored and one not), and test each player’s color level
|
strings (one colored and one not), and test each player’s color level
|
||||||
individually (see do_gen_comin act.comm.c for an example).
|
individually (see do_gen_comin act.comm.c for an example).
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ Builder Academy at telnet://tbamud.com:9091 or email rumble@tbamud.com -- Rumble
|
|||||||
The Art of Debugging
|
The Art of Debugging
|
||||||
Originally by Michael Chastain and Sammy
|
Originally by Michael Chastain and Sammy
|
||||||
|
|
||||||
The following documentation is excerpted from Merc 2.0’s hacker.txt file. It
|
The following documentation is excerpted from Merc 2.0’s hacker.txt file. It
|
||||||
was written by Furey of MERC Industries and is included here with his
|
was written by Furey of MERC Industries and is included here with his
|
||||||
permission. We have packaged it with tbaMUD (changed in a couple of places,
|
permission. We have packaged it with tbaMUD (changed in a couple of places,
|
||||||
such as specific filenames) because it offers good advice and insight into the
|
such as specific filenames) because it offers good advice and insight into the
|
||||||
art and science of software engineering. More information about tbaMUD,
|
art and science of software engineering. More information about tbaMUD,
|
||||||
can be found at the tbaMUD home page http://tbamud.com.
|
can be found at the tbaMUD home page http://tbamud.com.
|
||||||
|
|
||||||
1 “I’m running a Mud so I can learn C programming!”
|
1 “I’m running a Mud so I can learn C programming!”
|
||||||
|
|
||||||
Yeah, right. The purpose of this document is to record some of our knowledge,
|
Yeah, right. The purpose of this document is to record some of our knowledge,
|
||||||
experience and philosophy. No matter what your level, we hope that this
|
experience and philosophy. No matter what your level, we hope that this
|
||||||
@@ -31,11 +31,11 @@ Play with it some more.
|
|||||||
Read documentation again.
|
Read documentation again.
|
||||||
Get the idea?
|
Get the idea?
|
||||||
|
|
||||||
The idea is that your mind can accept only so much “new data” in a single
|
The idea is that your mind can accept only so much “new data” in a single
|
||||||
session. Playing with something doesn’t introduce very much new data, but it
|
session. Playing with something doesn’t introduce very much new data, but it
|
||||||
does transform data in your head from the “new” category to the “familiar”
|
does transform data in your head from the “new” category to the “familiar”
|
||||||
category. Reading documentation doesn’t make anything “familiar,” but it
|
category. Reading documentation doesn’t make anything “familiar,” but it
|
||||||
refills your “new” hopper.
|
refills your “new” hopper.
|
||||||
|
|
||||||
Most people, if they even read documentation in the first place, never return
|
Most people, if they even read documentation in the first place, never return
|
||||||
to it. They come to a certain minimum level of proficiency and then never
|
to it. They come to a certain minimum level of proficiency and then never
|
||||||
@@ -47,17 +47,17 @@ through the two-step learning cycle many times to master it.
|
|||||||
|
|
||||||
man gives you online manual pages.
|
man gives you online manual pages.
|
||||||
|
|
||||||
grep stands for “global regular expression print;” searches for strings in text
|
grep stands for “global regular expression print;” searches for strings in text
|
||||||
files.
|
files.
|
||||||
|
|
||||||
vi, emacs, jove use whatever editor floats your boat, but learn the hell out
|
vi, emacs, jove use whatever editor floats your boat, but learn the hell out
|
||||||
of it; you should know every command in your editor.
|
of it; you should know every command in your editor.
|
||||||
|
|
||||||
ctags mags “tags” for your editor which allows you to go to functions by name
|
ctags mags “tags” for your editor which allows you to go to functions by name
|
||||||
in any source file.
|
in any source file.
|
||||||
|
|
||||||
>, >>, <, | input and output redirection at the command line; get someone to
|
>, >>, <, | input and output redirection at the command line; get someone to
|
||||||
show you, or dig it out of “man csh”
|
show you, or dig it out of “man csh”
|
||||||
|
|
||||||
These are the basic day-in day-out development tools. Developing without
|
These are the basic day-in day-out development tools. Developing without
|
||||||
knowing how to use all of these well is like driving a car without knowing
|
knowing how to use all of these well is like driving a car without knowing
|
||||||
@@ -70,21 +70,21 @@ the hypothesis, run the program and provide it experimental input, observe its
|
|||||||
behavior, and confirm or refute the hypothesis.
|
behavior, and confirm or refute the hypothesis.
|
||||||
|
|
||||||
A good hypothesis is one which makes surprising predictions which then come
|
A good hypothesis is one which makes surprising predictions which then come
|
||||||
true; predictions that other hypotheses don’t make.
|
true; predictions that other hypotheses don’t make.
|
||||||
|
|
||||||
The first step in debugging is not to write bugs in the first place. This
|
The first step in debugging is not to write bugs in the first place. This
|
||||||
sounds obvious, but sadly, is all too often ignored.
|
sounds obvious, but sadly, is all too often ignored.
|
||||||
|
|
||||||
If you build a program, and you get any errors or any warnings, you should fix
|
If you build a program, and you get any errors or any warnings, you should fix
|
||||||
them before continuing. C was designed so that many buggy ways of writing code
|
them before continuing. C was designed so that many buggy ways of writing code
|
||||||
are legal, but will draw warnings from a suitably smart compiler (such as “gcc”
|
are legal, but will draw warnings from a suitably smart compiler (such as “gcc”
|
||||||
with the -Wall flag enabled). It takes only minutes to check your warnings and
|
with the -Wall flag enabled). It takes only minutes to check your warnings and
|
||||||
to fix the code that generates them, but it takes hours to find bugs otherwise.
|
to fix the code that generates them, but it takes hours to find bugs otherwise.
|
||||||
|
|
||||||
“Desk checking” (proof reading) is almost a lost art these days. Too bad. You
|
“Desk checking” (proof reading) is almost a lost art these days. Too bad. You
|
||||||
should desk check your code before even compiling it, and desk-check it again
|
should desk check your code before even compiling it, and desk-check it again
|
||||||
periodically to keep it fresh in mind and find new errors. If you have someone
|
periodically to keep it fresh in mind and find new errors. If you have someone
|
||||||
in your group whose only job it is to desk-check other people’s code, that
|
in your group whose only job it is to desk-check other people’s code, that
|
||||||
person will find and fix more bugs than everyone else combined.
|
person will find and fix more bugs than everyone else combined.
|
||||||
|
|
||||||
One can desk-check several hundred lines of code per hour. A top-flight
|
One can desk-check several hundred lines of code per hour. A top-flight
|
||||||
@@ -95,20 +95,20 @@ fixing technique. Compare that to all the hours you spend screwing around with
|
|||||||
broken programs trying to find one bug at a time.
|
broken programs trying to find one bug at a time.
|
||||||
|
|
||||||
The next technique beyond desk-checking is the time-honored technique of
|
The next technique beyond desk-checking is the time-honored technique of
|
||||||
inserting “print” statements into the code, and then watching the logged
|
inserting “print” statements into the code, and then watching the logged
|
||||||
values. Within tbaMUD code, you can call printf(), fprintf(), or log()to dump
|
values. Within tbaMUD code, you can call printf(), fprintf(), or log()to dump
|
||||||
interesting values at interesting times. Where and when to dump these values
|
interesting values at interesting times. Where and when to dump these values
|
||||||
is an art, which you will learn only with practice.
|
is an art, which you will learn only with practice.
|
||||||
|
|
||||||
If you don’t already know how to redirect output in your operating system, now
|
If you don’t already know how to redirect output in your operating system, now
|
||||||
is the time to learn. On Unix, type the command “man csh”, and read the part
|
is the time to learn. On Unix, type the command “man csh”, and read the part
|
||||||
about the “>” operator. You should also learn the difference between “standard
|
about the “>” operator. You should also learn the difference between “standard
|
||||||
output” (for example, output from “printf”) and “standard error” (for example,
|
output” (for example, output from “printf”) and “standard error” (for example,
|
||||||
output from “fprintf(stderr, ...)”).
|
output from “fprintf(stderr, ...)”).
|
||||||
|
|
||||||
Ultimately, you cannot fix a program unless you understand how it is operating
|
Ultimately, you cannot fix a program unless you understand how it is operating
|
||||||
in the first place. Powerful debugging tools will help you collect data, but
|
in the first place. Powerful debugging tools will help you collect data, but
|
||||||
they can’t interpret it, and they can’t fix the underlying problems. Only you
|
they can’t interpret it, and they can’t fix the underlying problems. Only you
|
||||||
can do that.
|
can do that.
|
||||||
|
|
||||||
When you find a bug... your first impulse will be to change the code, kill the
|
When you find a bug... your first impulse will be to change the code, kill the
|
||||||
@@ -117,9 +117,9 @@ observe is often just the symptom of a deeper bug. You should keep pursuing the
|
|||||||
bug, all the way down. You should grok the bug and cherish it in fullness
|
bug, all the way down. You should grok the bug and cherish it in fullness
|
||||||
before causing its discorporation.
|
before causing its discorporation.
|
||||||
|
|
||||||
Also, when finding a bug, ask yourself two questions: “What design and
|
Also, when finding a bug, ask yourself two questions: “What design and
|
||||||
programming habits led to the introduction of the bug in the first place?” And:
|
programming habits led to the introduction of the bug in the first place?” And:
|
||||||
“What habits would systematically prevent the introduction of bugs like this?”
|
“What habits would systematically prevent the introduction of bugs like this?”
|
||||||
|
|
||||||
5 Debugging: Tools
|
5 Debugging: Tools
|
||||||
|
|
||||||
@@ -127,20 +127,20 @@ When a Unix process accesses an invalid memory location, or (more rarely)
|
|||||||
executes an illegal instruction, or (even more rarely) something else goes
|
executes an illegal instruction, or (even more rarely) something else goes
|
||||||
wrong, the Unix operating system takes control. The process is incapable of
|
wrong, the Unix operating system takes control. The process is incapable of
|
||||||
further execution and must be killed. Before killing the process, however, the
|
further execution and must be killed. Before killing the process, however, the
|
||||||
operating system does something for you: it opens a file named “core” and
|
operating system does something for you: it opens a file named “core” and
|
||||||
writes the entire data space of the process into it.
|
writes the entire data space of the process into it.
|
||||||
|
|
||||||
Thus, “dumping core” is not a cause of problems, or even an effect of problems.
|
Thus, “dumping core” is not a cause of problems, or even an effect of problems.
|
||||||
It’s something the operating system does to help you find fatal problems which
|
It’s something the operating system does to help you find fatal problems which
|
||||||
have rendered your process unable to continue.
|
have rendered your process unable to continue.
|
||||||
|
|
||||||
One reads a “core” file with a debugger. The two most popular debuggers on Unix
|
One reads a “core” file with a debugger. The two most popular debuggers on Unix
|
||||||
are adb and gdb, although occasionally one finds dbx. Typically one starts a
|
are adb and gdb, although occasionally one finds dbx. Typically one starts a
|
||||||
debugger like this: “gdb bin/circle” or “gdb bin/circle lib/core”.
|
debugger like this: “gdb bin/circle” or “gdb bin/circle lib/core”.
|
||||||
|
|
||||||
The first thing, and often the only thing, you need to do inside the debugger
|
The first thing, and often the only thing, you need to do inside the debugger
|
||||||
is take a stack trace. In adb, the command for this is “$c”. In gdb, the
|
is take a stack trace. In adb, the command for this is “$c”. In gdb, the
|
||||||
command is “backtrace”. In dbx, the command is “where”. The stack trace will
|
command is “backtrace”. In dbx, the command is “where”. The stack trace will
|
||||||
tell you what function your program was in when it crashed, and what functions
|
tell you what function your program was in when it crashed, and what functions
|
||||||
were calling it. The debugger will also list the arguments to these functions.
|
were calling it. The debugger will also list the arguments to these functions.
|
||||||
Interpreting these arguments, and using more advanced debugger features,
|
Interpreting these arguments, and using more advanced debugger features,
|
||||||
@@ -343,12 +343,12 @@ new tools.
|
|||||||
|
|
||||||
7 Profiling
|
7 Profiling
|
||||||
|
|
||||||
Another useful technique is “profiling,” to find out where your program is
|
Another useful technique is “profiling,” to find out where your program is
|
||||||
spending most of its time. This can help you to make a program more efficient.
|
spending most of its time. This can help you to make a program more efficient.
|
||||||
|
|
||||||
Here is how to profile a program:
|
Here is how to profile a program:
|
||||||
|
|
||||||
1. Remove all the .o files and the “circle” executable:
|
1. Remove all the .o files and the “circle” executable:
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
2. Edit your Makefile, and change the PROFILE=line:
|
2. Edit your Makefile, and change the PROFILE=line:
|
||||||
@@ -359,25 +359,25 @@ make
|
|||||||
|
|
||||||
4. Run circle as usual. Shutdown the game with the shutdown command when you
|
4. Run circle as usual. Shutdown the game with the shutdown command when you
|
||||||
have run long enough to get a good profiling base under normal usage
|
have run long enough to get a good profiling base under normal usage
|
||||||
conditions. If you crash the game, or kill the process externally, you won’t
|
conditions. If you crash the game, or kill the process externally, you won’t
|
||||||
get profiling information.
|
get profiling information.
|
||||||
|
|
||||||
5. Run the profcommand:
|
5. Run the profcommand:
|
||||||
prof bin/circle > prof.out
|
prof bin/circle > prof.out
|
||||||
|
|
||||||
6. Read prof.out. Run “man prof” to understand the format of the output. For
|
6. Read prof.out. Run “man prof” to understand the format of the output. For
|
||||||
advanced profiling, you can use “PROFILE = -pg” in step 2, and use the “gprof”
|
advanced profiling, you can use “PROFILE = -pg” in step 2, and use the “gprof”
|
||||||
command in step 5. The “gprof” form of profiling gives you a report which lists
|
command in step 5. The “gprof” form of profiling gives you a report which lists
|
||||||
exactly how many times any function calls any other function. This information
|
exactly how many times any function calls any other function. This information
|
||||||
is valuable for debugging as well as performance analysis.
|
is valuable for debugging as well as performance analysis.
|
||||||
|
|
||||||
Availability of “prof” and “gprof” varies from system to system. Almost every
|
Availability of “prof” and “gprof” varies from system to system. Almost every
|
||||||
Unix system has “prof”. Only some systems have “gprof”.
|
Unix system has “prof”. Only some systems have “gprof”.
|
||||||
|
|
||||||
7 Books for Serious Programmers
|
7 Books for Serious Programmers
|
||||||
|
|
||||||
Out of all the thousands of books out there, three stand out:
|
Out of all the thousands of books out there, three stand out:
|
||||||
|
|
||||||
Kernighan and Plaugher, “The Elements of Programming Style”
|
Kernighan and Plaugher, “The Elements of Programming Style”
|
||||||
Kernighan and Ritchie, “The C Programming Language”
|
Kernighan and Ritchie, “The C Programming Language”
|
||||||
Brooks, “The Mythical Man Month”
|
Brooks, “The Mythical Man Month”
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Builder Academy at telnet://tbamud.com:9091 or email rumble@tbamud.com -- Rumble
|
|||||||
|
|
||||||
tbaMUD File Manifest
|
tbaMUD File Manifest
|
||||||
|
|
||||||
The main ‘tbaMUD/’ directory has the following subdirectories and files:
|
The main ‘tbaMUD/’ directory has the following subdirectories and files:
|
||||||
|
|
||||||
autorun - Shell script to run the MUD (./autorun &).
|
autorun - Shell script to run the MUD (./autorun &).
|
||||||
FAQ - Frequently Aske Questions with answers.
|
FAQ - Frequently Aske Questions with answers.
|
||||||
@@ -16,7 +16,7 @@ lib/ - MUD data.
|
|||||||
log/ - System logs.
|
log/ - System logs.
|
||||||
src/ - Source code.
|
src/ - Source code.
|
||||||
|
|
||||||
The bin/directory contains only binaries: ‘circle’ (the main MUD) and its
|
The bin/directory contains only binaries: ‘circle’ (the main MUD) and its
|
||||||
utilities, which are described in utils.txt.
|
utilities, which are described in utils.txt.
|
||||||
|
|
||||||
The doc/ directory has its own README file, describing the contents of each
|
The doc/ directory has its own README file, describing the contents of each
|
||||||
@@ -51,12 +51,12 @@ time - Where the MUD time is saved.
|
|||||||
|
|
||||||
The lib/misc/ directory contains the following files:
|
The lib/misc/ directory contains the following files:
|
||||||
|
|
||||||
bugs - Bugs reported by players with the ’bug’ command.
|
bugs - Bugs reported by players with the ’bug’ command.
|
||||||
ideas - Ideas from players from ’idea’ command.
|
ideas - Ideas from players from ’idea’ command.
|
||||||
messages - Spell and skill damage messages.
|
messages - Spell and skill damage messages.
|
||||||
socials - Text file with text of the socials.
|
socials - Text file with text of the socials.
|
||||||
socials.new - New format of socials you can edit via AEDIT.
|
socials.new - New format of socials you can edit via AEDIT.
|
||||||
typos - Typos reported by players with the ’typo’ command.
|
typos - Typos reported by players with the ’typo’ command.
|
||||||
xnames - Text file of invalid names.
|
xnames - Text file of invalid names.
|
||||||
|
|
||||||
The lib/plrobjs/ contains the following files and directories:
|
The lib/plrobjs/ contains the following files and directories:
|
||||||
@@ -80,18 +80,18 @@ zzz/
|
|||||||
The lib/text/ directory contains the following files:
|
The lib/text/ directory contains the following files:
|
||||||
|
|
||||||
background - Background story (for option 3 from main menu).
|
background - Background story (for option 3 from main menu).
|
||||||
credits - Text for ’credits’ command.
|
credits - Text for ’credits’ command.
|
||||||
greetings - Greeting message.
|
greetings - Greeting message.
|
||||||
handbook - Text for Immortal Handbook (’handbook’ command).
|
handbook - Text for Immortal Handbook (’handbook’ command).
|
||||||
immlist - Text for ’immlist’ command.
|
immlist - Text for ’immlist’ command.
|
||||||
imotd - Immortal MOTD --seen by immortals on login.
|
imotd - Immortal MOTD --seen by immortals on login.
|
||||||
info - Text for ’info’ command.
|
info - Text for ’info’ command.
|
||||||
motd - MOTD --seen by mortals on login.
|
motd - MOTD --seen by mortals on login.
|
||||||
news - Text for ’news’ command.
|
news - Text for ’news’ command.
|
||||||
policies - Text for ’policy’ command.
|
policies - Text for ’policy’ command.
|
||||||
wizlist - Text for ’wizlist’ command.
|
wizlist - Text for ’wizlist’ command.
|
||||||
/help/screen - Text for ’help’ command as a mortal with no arguments.
|
/help/screen - Text for ’help’ command as a mortal with no arguments.
|
||||||
/help/iscreen - Text for ’help’ command an an immortal with no arguments.
|
/help/iscreen - Text for ’help’ command an an immortal with no arguments.
|
||||||
|
|
||||||
The lib/world/directory contains the following subdirectories:
|
The lib/world/directory contains the following subdirectories:
|
||||||
|
|
||||||
@@ -103,8 +103,8 @@ wld - Contains *.wld files (world files)
|
|||||||
zon - Contains *.zon files (zone files)
|
zon - Contains *.zon files (zone files)
|
||||||
|
|
||||||
Each of the 6 subdirectories in the lib/world/ directory also contains two
|
Each of the 6 subdirectories in the lib/world/ directory also contains two
|
||||||
additional files – one called ‘index’, which specifies which files in that
|
additional files – one called ‘index’, which specifies which files in that
|
||||||
directory should be loaded when the MUD boots, and ‘index.mini’, which
|
directory should be loaded when the MUD boots, and ‘index.mini’, which
|
||||||
specifies which files should be loaded if the MUD is booted with the -m
|
specifies which files should be loaded if the MUD is booted with the -m
|
||||||
(mini-mud) option.
|
(mini-mud) option.
|
||||||
|
|
||||||
@@ -128,6 +128,6 @@ trigger - Trigedit log messages.
|
|||||||
usage - Mud system usage (player load & memory usage info).
|
usage - Mud system usage (player load & memory usage info).
|
||||||
|
|
||||||
The src/ directory contains all of the C and header files for the MUD, along
|
The src/ directory contains all of the C and header files for the MUD, along
|
||||||
with a Makefile. The src/util/ directory contains source for tbaMUD’s utility
|
with a Makefile. The src/util/ directory contains source for tbaMUD’s utility
|
||||||
programs. See admin.txt for more information on how to compile the MUD. See
|
programs. See admin.txt for more information on how to compile the MUD. See
|
||||||
utils.txt for more information on how to use tbaMUD’s utilities.
|
utils.txt for more information on how to use tbaMUD’s utilities.
|
||||||
|
|||||||
@@ -9,16 +9,16 @@ every platform that exists. This document is for experienced programmers
|
|||||||
trying to make tbaMUD work on their platform.
|
trying to make tbaMUD work on their platform.
|
||||||
|
|
||||||
tbaMUD should work on most UNIX platforms without any modifications; simply run
|
tbaMUD should work on most UNIX platforms without any modifications; simply run
|
||||||
the “configure” script and it should automatically detect what type of system
|
the “configure” script and it should automatically detect what type of system
|
||||||
you have and anything that may be strange about it. These findings are all
|
you have and anything that may be strange about it. These findings are all
|
||||||
stored in a header file called conf.h which is created in the src directory
|
stored in a header file called conf.h which is created in the src directory
|
||||||
from a template called conf.h.in. A Makefile is also created from the template
|
from a template called conf.h.in. A Makefile is also created from the template
|
||||||
Makefile.in.
|
Makefile.in.
|
||||||
|
|
||||||
Non-UNIX platforms are a problem. Some can’t run tbaMUD at all. However, any
|
Non-UNIX platforms are a problem. Some can’t run tbaMUD at all. However, any
|
||||||
multitasking OS that has an ANSI C compiler, and supports non-blocking I/O and
|
multitasking OS that has an ANSI C compiler, and supports non-blocking I/O and
|
||||||
socket-based TCP/IP networking, should theoretically be able to run tbaMUD; for
|
socket-based TCP/IP networking, should theoretically be able to run tbaMUD; for
|
||||||
example, OS/2, AmigaOS, Mac OS (Classic versions; Mac OS X supports tbaMUD’s
|
example, OS/2, AmigaOS, Mac OS (Classic versions; Mac OS X supports tbaMUD’s
|
||||||
configure script from the command line), and all versions of Windows.
|
configure script from the command line), and all versions of Windows.
|
||||||
|
|
||||||
The port can be very easy or very difficult, depending mainly on whether or nor
|
The port can be very easy or very difficult, depending mainly on whether or nor
|
||||||
@@ -26,7 +26,7 @@ your OS supports the Berkeley socket API.
|
|||||||
|
|
||||||
The general steps for porting tbaMUD to a non-UNIX platform are listed below. A
|
The general steps for porting tbaMUD to a non-UNIX platform are listed below. A
|
||||||
number of tips for porting can be found after the porting steps. Note that we
|
number of tips for porting can be found after the porting steps. Note that we
|
||||||
have already ported tba to Windows, so if you’re confused as to how to perform
|
have already ported tba to Windows, so if you’re confused as to how to perform
|
||||||
some of these steps, you can look at what we have done as an example (see the
|
some of these steps, you can look at what we have done as an example (see the
|
||||||
files README.CYGWIN).
|
files README.CYGWIN).
|
||||||
|
|
||||||
@@ -36,11 +36,11 @@ trying to port the code.
|
|||||||
|
|
||||||
Porting the Code
|
Porting the Code
|
||||||
|
|
||||||
Step 1. Create a “conf.h” file for your system. Copy the template “conf.h.in”
|
Step 1. Create a “conf.h” file for your system. Copy the template “conf.h.in”
|
||||||
to “conf.h”, and then define or undefine each item as directed by the comments
|
to “conf.h”, and then define or undefine each item as directed by the comments
|
||||||
and based on the characteristics of your system. To write the conf.h file,
|
and based on the characteristics of your system. To write the conf.h file,
|
||||||
you’ll need to know which header files are included with your system, the
|
you’ll need to know which header files are included with your system, the
|
||||||
return type of signals, whether or not your compiler supports the ‘const’
|
return type of signals, whether or not your compiler supports the ‘const’
|
||||||
keyword, and whether or not you have various functions such as crypt()and
|
keyword, and whether or not you have various functions such as crypt()and
|
||||||
random(). Also, you can ignore the HAVE_LIBxxx and HAVE_xxx_PROTO constants at
|
random(). Also, you can ignore the HAVE_LIBxxx and HAVE_xxx_PROTO constants at
|
||||||
the end of conf.h.in; they are not used in the code (they are part of UNIX
|
the end of conf.h.in; they are not used in the code (they are part of UNIX
|
||||||
@@ -58,12 +58,12 @@ be in the source file comm.c.
|
|||||||
|
|
||||||
Step 4. Test your changes! Make sure that multiple people can log in
|
Step 4. Test your changes! Make sure that multiple people can log in
|
||||||
simultaneously and that they can all type commands at the same time. No player
|
simultaneously and that they can all type commands at the same time. No player
|
||||||
should ever have a “frozen” screen just because another is waiting at a prompt.
|
should ever have a “frozen” screen just because another is waiting at a prompt.
|
||||||
Leave the MUD up for at least 24 hours, preferably with people playing it, to
|
Leave the MUD up for at least 24 hours, preferably with people playing it, to
|
||||||
make sure that your changes are stable. Make sure that automatic events such as
|
make sure that your changes are stable. Make sure that automatic events such as
|
||||||
zone resets, point regeneration, and corpse decomposition are being timed
|
zone resets, point regeneration, and corpse decomposition are being timed
|
||||||
correctly (a tick should be about 75 seconds). Try resetting all the zones
|
correctly (a tick should be about 75 seconds). Try resetting all the zones
|
||||||
repeatedly by typing “zr *” many times. Play the MUD and make sure that the
|
repeatedly by typing “zr *” many times. Play the MUD and make sure that the
|
||||||
basic commands (killing mobs as a mortal, casting spells, etc.) work correctly.
|
basic commands (killing mobs as a mortal, casting spells, etc.) work correctly.
|
||||||
|
|
||||||
Step 5. If you are satisfied that your changes work correctly, you are
|
Step 5. If you are satisfied that your changes work correctly, you are
|
||||||
@@ -71,20 +71,20 @@ encouraged to submit them to be included as part of the tbaMUD distribution so
|
|||||||
that future releases of tbaMUD will support your platform. This prevents you
|
that future releases of tbaMUD will support your platform. This prevents you
|
||||||
from re-porting the code every time a new version is released and allows other
|
from re-porting the code every time a new version is released and allows other
|
||||||
people who use your platform to enjoy tbaMUD as well. To submit your changes
|
people who use your platform to enjoy tbaMUD as well. To submit your changes
|
||||||
you must make a patch file using the GNU ‘diff’ program. diff will create a
|
you must make a patch file using the GNU ‘diff’ program. diff will create a
|
||||||
patch file which can be later used with the ‘patch’ utility to incorporate
|
patch file which can be later used with the ‘patch’ utility to incorporate
|
||||||
your changes into the stock tbaMUD distribution. For example, if you have a
|
your changes into the stock tbaMUD distribution. For example, if you have a
|
||||||
copy of tbaMUD in the “stock-tba” directory, and your changes are in “my-tba”,
|
copy of tbaMUD in the “stock-tba” directory, and your changes are in “my-tba”,
|
||||||
you can create a patch file like this:
|
you can create a patch file like this:
|
||||||
|
|
||||||
diff -u --new-file --recursive stock-tba/src my-tba/src > patch
|
diff -u --new-file --recursive stock-tba/src my-tba/src > patch
|
||||||
|
|
||||||
This will create a file called ‘patch’ with your patches. You should then try
|
This will create a file called ‘patch’ with your patches. You should then try
|
||||||
to use the ‘patch’ program (the inverse of ‘diff’) on a copy of tbaMUD to make
|
to use the ‘patch’ program (the inverse of ‘diff’) on a copy of tbaMUD to make
|
||||||
sure that tbaMUD is correctly changed to incorporate your patches. This step is
|
sure that tbaMUD is correctly changed to incorporate your patches. This step is
|
||||||
very important: if you don’t create these patches correctly, your work will be
|
very important: if you don’t create these patches correctly, your work will be
|
||||||
useless because no one will be able to figure out what you did! Make sure to
|
useless because no one will be able to figure out what you did! Make sure to
|
||||||
read the documentation to ‘diff’ and ‘patch’ if you don’t understand how to use
|
read the documentation to ‘diff’ and ‘patch’ if you don’t understand how to use
|
||||||
them. If your patches work, CELEBRATE!!
|
them. If your patches work, CELEBRATE!!
|
||||||
|
|
||||||
Step 6. Write a README file for your operating system that describes everything
|
Step 6. Write a README file for your operating system that describes everything
|
||||||
@@ -107,7 +107,7 @@ Each system to which tba is already ported has a CIRCLE_xx constant associated
|
|||||||
with it: CIRCLE_UNIX for plain vanilla UNIX tbaMUD, CIRCLE_WINDOWS for MS
|
with it: CIRCLE_UNIX for plain vanilla UNIX tbaMUD, CIRCLE_WINDOWS for MS
|
||||||
Windows, CIRCLE_OS2 for IBM OS/2, and CIRCLE_AMIGA for the Amiga. You must use
|
Windows, CIRCLE_OS2 for IBM OS/2, and CIRCLE_AMIGA for the Amiga. You must use
|
||||||
a similar constant for your system. At the top of your conf.h, make sure to
|
a similar constant for your system. At the top of your conf.h, make sure to
|
||||||
comment out “#define CIRCLE_UNIX” and add “#define CIRCLE_YOUR_SYSTEM”.
|
comment out “#define CIRCLE_UNIX” and add “#define CIRCLE_YOUR_SYSTEM”.
|
||||||
|
|
||||||
3.2 ANSI C and GCC
|
3.2 ANSI C and GCC
|
||||||
As long as your system has an ANSI C compiler, all of the code (except for
|
As long as your system has an ANSI C compiler, all of the code (except for
|
||||||
@@ -122,22 +122,22 @@ you use gcc.
|
|||||||
Make absolutely sure to use non-blocking I/O; i.e. make sure to enable the
|
Make absolutely sure to use non-blocking I/O; i.e. make sure to enable the
|
||||||
option so that the read() system call will immediately return with an error if
|
option so that the read() system call will immediately return with an error if
|
||||||
there is no data available. If you do not use non-blocking I/O, read() will
|
there is no data available. If you do not use non-blocking I/O, read() will
|
||||||
“block,” meaning it will wait infinitely for one particular player to type
|
“block,” meaning it will wait infinitely for one particular player to type
|
||||||
something even if other players are trying to enter commands. If your system
|
something even if other players are trying to enter commands. If your system
|
||||||
does not implement non-blocking I/O correctly, try using the
|
does not implement non-blocking I/O correctly, try using the
|
||||||
POSIX_NONBLOCK_BROKEN constant in sysdep.h.
|
POSIX_NONBLOCK_BROKEN constant in sysdep.h.
|
||||||
|
|
||||||
3.4 Timing
|
3.4 Timing
|
||||||
tbaMUD needs a fairly precise (on the order of 5 or 10 ms) timer in order to
|
tbaMUD needs a fairly precise (on the order of 5 or 10 ms) timer in order to
|
||||||
correctly schedule events such as zone resets, point regeneration (“ticks”),
|
correctly schedule events such as zone resets, point regeneration (“ticks”),
|
||||||
corpse decomposition, and other automatic tasks. If your system supports the
|
corpse decomposition, and other automatic tasks. If your system supports the
|
||||||
select() system call with sufficient precision, the default timing code should
|
select() system call with sufficient precision, the default timing code should
|
||||||
work correctly. If not, you’ll have to find out which system calls your system
|
work correctly. If not, you’ll have to find out which system calls your system
|
||||||
supports for determining how much time has passed and replace the select()
|
supports for determining how much time has passed and replace the select()
|
||||||
timing method.
|
timing method.
|
||||||
|
|
||||||
3.5 Signals and Signal Handlers
|
3.5 Signals and Signal Handlers
|
||||||
A note about signals: Most systems don’t support the concept of signals in the
|
A note about signals: Most systems don’t support the concept of signals in the
|
||||||
same way that UNIX does. Since signals are not a critical part of how tbaMUD
|
same way that UNIX does. Since signals are not a critical part of how tbaMUD
|
||||||
works anyway (they are only used for updating the wizlist and some other
|
works anyway (they are only used for updating the wizlist and some other
|
||||||
trivial things), all signal handling is turned off by default when compiling
|
trivial things), all signal handling is turned off by default when compiling
|
||||||
@@ -147,7 +147,7 @@ conf.h file and all signal code will be ignored automatically.
|
|||||||
|
|
||||||
4 Final Note
|
4 Final Note
|
||||||
IMPORTANT: Remember to keep any changes you make surrounded by #ifdef
|
IMPORTANT: Remember to keep any changes you make surrounded by #ifdef
|
||||||
statements (i.e. “#ifdef CIRCLE_WINDOWS ... #endif”). If you make absolutely
|
statements (i.e. “#ifdef CIRCLE_WINDOWS ... #endif”). If you make absolutely
|
||||||
sure to mark all of your changes with #ifdef statements, then your patches
|
sure to mark all of your changes with #ifdef statements, then your patches
|
||||||
(once you get them to work) will be suitable for incorporation into the
|
(once you get them to work) will be suitable for incorporation into the
|
||||||
tbaMUD distribution, meaning that tbaMUD will officially support your platform.
|
tbaMUD distribution, meaning that tbaMUD will officially support your platform.
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ communication channels
|
|||||||
totally ignores all commands from that player until they are thawed.
|
totally ignores all commands from that player until they are thawed.
|
||||||
--Even handier DELETE flag allows you to delete players on the fly.
|
--Even handier DELETE flag allows you to delete players on the fly.
|
||||||
--"set" command (mentioned above) allows you to freeze/unfreeze/
|
--"set" command (mentioned above) allows you to freeze/unfreeze/
|
||||||
delete/siteok/un-siteok players --even if they aren’t logged in!
|
delete/siteok/un-siteok players --even if they aren’t logged in!
|
||||||
--Bad password attempts are written to the system log and saved;
|
--Bad password attempts are written to the system log and saved;
|
||||||
if someone tries to hack your account, you see "4 LOGIN FAILURES
|
if someone tries to hack your account, you see "4 LOGIN FAILURES
|
||||||
SINCE LAST SUCCESSFUL LOGIN" next time you log on.
|
SINCE LAST SUCCESSFUL LOGIN" next time you log on.
|
||||||
|
|||||||
@@ -110,12 +110,12 @@ is being specified. The command sort name is the shortest part of the command a
|
|||||||
player must type for it to match. The hide-flag can be either 0 or 1; if 1, the
|
player must type for it to match. The hide-flag can be either 0 or 1; if 1, the
|
||||||
social is hidden from OTHERS if they cannot see the character performing the
|
social is hidden from OTHERS if they cannot see the character performing the
|
||||||
social. The action is not hidden from the VICTIM, even if s/he cannot see the
|
social. The action is not hidden from the VICTIM, even if s/he cannot see the
|
||||||
character performing the social, although in such cases the character’s name
|
character performing the social, although in such cases the character’s name
|
||||||
will, of course, be replaced with “someone”. The min positions should be set to
|
will, of course, be replaced with “someone”. The min positions should be set to
|
||||||
dictate the minimum position a player must be in to target the victim and
|
dictate the minimum position a player must be in to target the victim and
|
||||||
perform the social. Min level allows you to further customize who can use what
|
perform the social. Min level allows you to further customize who can use what
|
||||||
socials.Where it makes sense to do so, text fields may be left empty. If
|
socials.Where it makes sense to do so, text fields may be left empty. If
|
||||||
editing manually you should by put a ‘#’ in the first column on the line. Aedit
|
editing manually you should by put a ‘#’ in the first column on the line. Aedit
|
||||||
does this automatically.
|
does this automatically.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ older CircleMUD data files to the versions used in CircleMUD v3, while others
|
|||||||
are used to convert currently existing files into different formats.
|
are used to convert currently existing files into different formats.
|
||||||
|
|
||||||
Overall, these utilities have been created in an attempt to make the tbaMUD
|
Overall, these utilities have been created in an attempt to make the tbaMUD
|
||||||
administrator’s life a bit easier, and to give the administrator some ideas of
|
administrator’s life a bit easier, and to give the administrator some ideas of
|
||||||
further and more grandiose utilities to create. Some are no longer applicable
|
further and more grandiose utilities to create. Some are no longer applicable
|
||||||
but are retained as examples.
|
but are retained as examples.
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ the second, and so forth.
|
|||||||
The split utility is designed to split large world files into smaller, zone
|
The split utility is designed to split large world files into smaller, zone
|
||||||
sized files that are easier to manage and maintain. The utility reads its input
|
sized files that are easier to manage and maintain. The utility reads its input
|
||||||
from the standard input and writes the output to files with names specified
|
from the standard input and writes the output to files with names specified
|
||||||
within the larger world file. This is done by inserting ‘=filename’ into the
|
within the larger world file. This is done by inserting ‘=filename’ into the
|
||||||
world file at the appropriate points, where filename is the name of the file
|
world file at the appropriate points, where filename is the name of the file
|
||||||
for the following section.
|
for the following section.
|
||||||
|
|
||||||
@@ -141,8 +141,8 @@ The command line syntax for autowiz is as follows:
|
|||||||
autowiz <wizlev> <wizlistfile> <immlev> <immlistfile> [pid to signal]
|
autowiz <wizlev> <wizlistfile> <immlev> <immlistfile> [pid to signal]
|
||||||
|
|
||||||
where <wizlev> is equal to whatever LVL_GOD is set to in your tbaMUD server,
|
where <wizlev> is equal to whatever LVL_GOD is set to in your tbaMUD server,
|
||||||
<wizlistfile> is the filename for the file containing the game’s Wizlist.
|
<wizlistfile> is the filename for the file containing the game’s Wizlist.
|
||||||
<immlev> should be set to your game’s LVL_IMMORT, while <immlistfile>
|
<immlev> should be set to your game’s LVL_IMMORT, while <immlistfile>
|
||||||
is the name of the Immlist file.
|
is the name of the Immlist file.
|
||||||
|
|
||||||
This utility must be recompiled if you make any changes to the player file structure.
|
This utility must be recompiled if you make any changes to the player file structure.
|
||||||
|
|||||||
@@ -865,7 +865,7 @@ AUTOQUESTS QUESTS QUESTMASTERS QUEST-MOBS QUESTMOBS
|
|||||||
|
|
||||||
An autoquest is a quest that can be automatically started and completed
|
An autoquest is a quest that can be automatically started and completed
|
||||||
without the intervention of an immortal. Simply visit a questmaster and join
|
without the intervention of an immortal. Simply visit a questmaster and join
|
||||||
an available quest, and get rewarded on it’s completion. Keep an eye out for
|
an available quest, and get rewarded on it's completion. Keep an eye out for
|
||||||
autoquests scattered throughout the World.
|
autoquests scattered throughout the World.
|
||||||
|
|
||||||
See Also: QUEST-FLAG, QUESTPOINTS
|
See Also: QUEST-FLAG, QUESTPOINTS
|
||||||
@@ -1584,7 +1584,6 @@ qedit (quest editor)
|
|||||||
questpoints
|
questpoints
|
||||||
buildwalk
|
buildwalk
|
||||||
dig
|
dig
|
||||||
tell m-w (an in game dictionary lookup)
|
|
||||||
gemote
|
gemote
|
||||||
history
|
history
|
||||||
file
|
file
|
||||||
@@ -2444,25 +2443,6 @@ Example:
|
|||||||
> diagnose doctor
|
> diagnose doctor
|
||||||
|
|
||||||
See also: CONSIDER, HIT, KILL
|
See also: CONSIDER, HIT, KILL
|
||||||
#0
|
|
||||||
DICTIONARY DICTIONARIES THESAURUS M-W.COM DEFINITION MERRIAM-WEBSTER M-W-DEFINITION WEBSTER MW TELL-M-W BREATHER SPELLING WORDS
|
|
||||||
|
|
||||||
Usage: tell m-w <word>
|
|
||||||
|
|
||||||
We have a direct link to Merriam Webster. To use the dictionary just
|
|
||||||
tell m-w <word>
|
|
||||||
|
|
||||||
>tell m-w breather
|
|
||||||
You get this feedback from Merriam-Webster:
|
|
||||||
That means:
|
|
||||||
1 : one that breathes
|
|
||||||
2 : a break in activity for rest or relief
|
|
||||||
3 : a small vent in an otherwise airtight enclosure
|
|
||||||
|
|
||||||
A few obscure definitions are not available through m-w since they are in the
|
|
||||||
unabridged version that requires membership. They also offer a thesaurus at:
|
|
||||||
@Chttp://m-w.com/@n
|
|
||||||
|
|
||||||
#31
|
#31
|
||||||
DIG UNDIG RDIG RELINK RLINKS
|
DIG UNDIG RDIG RELINK RLINKS
|
||||||
|
|
||||||
@@ -3173,7 +3153,7 @@ game.
|
|||||||
Invest in a thesaurus. Makes a world of difference, and if that doesn't
|
Invest in a thesaurus. Makes a world of difference, and if that doesn't
|
||||||
help, just make up your own words for things you create (just be sure to
|
help, just make up your own words for things you create (just be sure to
|
||||||
describe them very well. Use @Chttp://m-w.com/@n for an online thesaurus
|
describe them very well. Use @Chttp://m-w.com/@n for an online thesaurus
|
||||||
and dictionary. You can @Rtell m-w <word>@n to lookup a definition.
|
and dictionary.
|
||||||
|
|
||||||
4. Where can I learn Trigedit?
|
4. Where can I learn Trigedit?
|
||||||
Here! Welcor is now the developer of trigedit. We have extensive help files,
|
Here! Welcor is now the developer of trigedit. We have extensive help files,
|
||||||
@@ -3564,8 +3544,8 @@ GRAMMAR GRAMMER TIPS
|
|||||||
words can be particularly tricky and elude electronic spell checkers. A good
|
words can be particularly tricky and elude electronic spell checkers. A good
|
||||||
dictionary, however, will help you spell archaic words. Whenever I am building
|
dictionary, however, will help you spell archaic words. Whenever I am building
|
||||||
I use our Merriam Webster dictionary link on TBA to check any tough words for
|
I use our Merriam Webster dictionary link on TBA to check any tough words for
|
||||||
proper spelling. Test it out @RTELL M-W DEFINITION@n. We hope to add a thesaurus
|
proper spelling. We hope to add a thesaurus soon! Goto @Chttp://m-w.com/@n
|
||||||
soon! Goto @Chttp://m-w.com/@n until then.
|
until then.
|
||||||
I have found that a good principle to make is to avoid the use of all
|
I have found that a good principle to make is to avoid the use of all
|
||||||
contractions. For example, if you mean to say "it is", do not use "it's", spell
|
contractions. For example, if you mean to say "it is", do not use "it's", spell
|
||||||
it out. This will help differentiate between "its" (which means 'belonging to
|
it out. This will help differentiate between "its" (which means 'belonging to
|
||||||
@@ -7192,7 +7172,7 @@ prefer to add the quest in the zone where quest completion takes place.
|
|||||||
Quests use vnums in exactly the same way as mobiles, object and rooms. Each
|
Quests use vnums in exactly the same way as mobiles, object and rooms. Each
|
||||||
zone will normally have 100 vnums available (#00 to #99, where # is the zone
|
zone will normally have 100 vnums available (#00 to #99, where # is the zone
|
||||||
number). Usually, when creating the first quest in a zone, #00 is used,
|
number). Usually, when creating the first quest in a zone, #00 is used,
|
||||||
then #01, etc…
|
then #01, etc.
|
||||||
|
|
||||||
When you qedit <vnum> to create a new quest (or edit an existing one), you will
|
When you qedit <vnum> to create a new quest (or edit an existing one), you will
|
||||||
see the menu in @RHELP QEDIT-MENU@n
|
see the menu in @RHELP QEDIT-MENU@n
|
||||||
@@ -7203,12 +7183,12 @@ QEDIT-ACCEPT
|
|||||||
|
|
||||||
This is the text that is sent to the player when they start the quest. It
|
This is the text that is sent to the player when they start the quest. It
|
||||||
should describe in detail exactly what is required to complete the quest. The
|
should describe in detail exactly what is required to complete the quest. The
|
||||||
text is simply output on the player’s screen, so be creative here. An example
|
text is simply output on the player's screen, so be creative here. An example
|
||||||
of an accept message text could be something like:
|
of an accept message text could be something like:
|
||||||
|
|
||||||
The questmaster rummages in a large pile of papers.
|
The questmaster rummages in a large pile of papers.
|
||||||
The questmaster says ‘Ah, here it is’
|
The questmaster says "Ah, here it is"
|
||||||
The questmaster says ‘Bob, the local butcher has offered this quest’
|
The questmaster says "Bob, the local butcher has offered this quest"
|
||||||
The questmaster shows you a hastily scrawled note, that reads:
|
The questmaster shows you a hastily scrawled note, that reads:
|
||||||
|
|
||||||
I am willing to offer any plucky adventurer 10 quest points if they bring me a
|
I am willing to offer any plucky adventurer 10 quest points if they bring me a
|
||||||
@@ -7218,7 +7198,7 @@ order to fill. I need these within 24 hours
|
|||||||
|
|
||||||
Thanks, Bob the Butcher, Midgaard
|
Thanks, Bob the Butcher, Midgaard
|
||||||
The questmaster sighs.
|
The questmaster sighs.
|
||||||
The questmaster says ‘A tricky quest, but it’ll cost you 5qp to back out now’
|
The questmaster says "A tricky quest, but it'll cost you 5qp to back out now"
|
||||||
#31
|
#31
|
||||||
QEDIT-COMPLETED QEDIT-ABANDONED
|
QEDIT-COMPLETED QEDIT-ABANDONED
|
||||||
|
|
||||||
@@ -7232,7 +7212,7 @@ all timed quests.
|
|||||||
QEDIT-COMPLETION
|
QEDIT-COMPLETION
|
||||||
|
|
||||||
Just like the accept message, this is simply text that is output on the
|
Just like the accept message, this is simply text that is output on the
|
||||||
player’s screen when they successfully complete the quest. Prizes (quest
|
player's screen when they successfully complete the quest. Prizes (quest
|
||||||
points, gold coins, experience points or an object) are automatically
|
points, gold coins, experience points or an object) are automatically
|
||||||
announced after this text is shown, so this text does not need to have that
|
announced after this text is shown, so this text does not need to have that
|
||||||
information in it.
|
information in it.
|
||||||
@@ -7258,7 +7238,7 @@ Quest flags: @cNOBITS@n
|
|||||||
Enter quest flags, 0 to quit :
|
Enter quest flags, 0 to quit :
|
||||||
|
|
||||||
Currently, only one flag is available, the REPEATABLE flag. When you have
|
Currently, only one flag is available, the REPEATABLE flag. When you have
|
||||||
finished turning this on or off, select ‘0’ (zero) to return to the main menu.
|
finished turning this on or off, select "0" (zero) to return to the main menu.
|
||||||
#31
|
#31
|
||||||
QEDIT-LEVELS
|
QEDIT-LEVELS
|
||||||
|
|
||||||
@@ -7312,12 +7292,12 @@ QEDIT-NEXT
|
|||||||
|
|
||||||
This is the quest vnum of next quest in a chain. When a player completes
|
This is the quest vnum of next quest in a chain. When a player completes
|
||||||
the current quest, the next quest will automatically be joined. This allows
|
the current quest, the next quest will automatically be joined. This allows
|
||||||
for long quests with a number of ‘steps’.
|
for long quests with a number of "steps".
|
||||||
#31
|
#31
|
||||||
QEDIT-PREREQUISITE
|
QEDIT-PREREQUISITE
|
||||||
|
|
||||||
This is the object vnum for a prerequisite object. The prerequisite object
|
This is the object vnum for a prerequisite object. The prerequisite object
|
||||||
should be in the player’s inventory in order for them to be able to join the
|
should be in the player's inventory in order for them to be able to join the
|
||||||
quest. It is not taken from the player when the quest starts.
|
quest. It is not taken from the player when the quest starts.
|
||||||
#31
|
#31
|
||||||
QEDIT-PREVIOUS
|
QEDIT-PREVIOUS
|
||||||
@@ -7328,15 +7308,15 @@ completed by the player in order to join this quest.
|
|||||||
QEDIT-QUANTITY
|
QEDIT-QUANTITY
|
||||||
|
|
||||||
This is the number of times the player needs to repeat the quest. For
|
This is the number of times the player needs to repeat the quest. For
|
||||||
example, it could be the number of items the player needs to find in a ‘object’
|
example, it could be the number of items the player needs to find in a "object"
|
||||||
quest of the number of mobs the player should kill in a ‘kill mob’ quest. This
|
quest of the number of mobs the player should kill in a "kill mob" quest. This
|
||||||
should be used with caution, however. In an object quest ‘picking up’ the same
|
should be used with caution, however. In an object quest picking up the same
|
||||||
object 20 times will also complete the quest.
|
object 20 times will also complete the quest.
|
||||||
#31
|
#31
|
||||||
QEDIT-QUIT QEDIT-MESSAGE
|
QEDIT-QUIT QEDIT-MESSAGE
|
||||||
|
|
||||||
The quit message is sent to the player when they type quest leave. Players
|
The quit message is sent to the player when they type quest leave. Players
|
||||||
can lose quest points for abandoning a quest (see “Abandoned” on the next
|
can lose quest points for abandoning a quest (see "Abandoned" on the next
|
||||||
page), so if they lose quest points, this text really should inform them of
|
page), so if they lose quest points, this text really should inform them of
|
||||||
that.
|
that.
|
||||||
#31
|
#31
|
||||||
@@ -7365,14 +7345,14 @@ Room, Clear Room - Room VNUM
|
|||||||
#31
|
#31
|
||||||
QEDIT-TIME
|
QEDIT-TIME
|
||||||
|
|
||||||
This is the number of ‘ticks’ or game hours that the player has to complete
|
This is the number of 'ticks' or game hours that the player has to complete
|
||||||
the quest. If this is set, then the builder should really try to do the quest
|
the quest. If this is set, then the builder should really try to do the quest
|
||||||
themselves, and time how long it takes (typing ‘time’ before and after the
|
themselves, and time how long it takes (typing 'time' before and after the
|
||||||
attempt), and then giving at least one extra ‘tick’ for players to complete it.
|
attempt), and then giving at least one extra 'tick' for players to complete it.
|
||||||
#31
|
#31
|
||||||
QEDIT-TYPE
|
QEDIT-TYPE
|
||||||
|
|
||||||
There are a few different quest types. When you select option ‘7’ from the
|
There are a few different quest types. When you select option '7' from the
|
||||||
main menu, you will be shown a list to choose from:
|
main menu, you will be shown a list to choose from:
|
||||||
|
|
||||||
0) Object - Player needs to find a particular object.
|
0) Object - Player needs to find a particular object.
|
||||||
@@ -7447,7 +7427,7 @@ Usage: quest [list | join <#> | progress | leave | history]
|
|||||||
|
|
||||||
quest - Show usage information for the quest command.
|
quest - Show usage information for the quest command.
|
||||||
quest list - Used at the questmaster to see which quests are available.
|
quest list - Used at the questmaster to see which quests are available.
|
||||||
quest join # - Used to the questmaster to join the quest listed as number ‘nn’ on quest list.
|
quest join # - Used to the questmaster to join the quest listed as number 'nn' on quest list.
|
||||||
quest progress - Shows the player which quest they are doing, and their quest progress.
|
quest progress - Shows the player which quest they are doing, and their quest progress.
|
||||||
quest leave - Allows the player to abandon the current quest, taking the quest point penalty.
|
quest leave - Allows the player to abandon the current quest, taking the quest point penalty.
|
||||||
quest history - Shows all previously completed non-repeatable quests.
|
quest history - Shows all previously completed non-repeatable quests.
|
||||||
@@ -9352,7 +9332,7 @@ and simply bearing artistic merit. Second, by ensuring that they are absolutely
|
|||||||
necessary to achieve the goals of the game! If your game is made for experience
|
necessary to achieve the goals of the game! If your game is made for experience
|
||||||
and equipment gathering, and failure to read descriptions directly impedes this
|
and equipment gathering, and failure to read descriptions directly impedes this
|
||||||
goal, then players will learn to read everything. If your game is made for
|
goal, then players will learn to read everything. If your game is made for
|
||||||
exploring or role-play, most of your players probably already read them Â-
|
exploring or role-play, most of your players probably already read them -
|
||||||
because knowing their environment is a basic requirement of play. In any case,
|
because knowing their environment is a basic requirement of play. In any case,
|
||||||
builders exist to ensure that the goals of play are supported by game
|
builders exist to ensure that the goals of play are supported by game
|
||||||
descriptions.
|
descriptions.
|
||||||
@@ -9364,7 +9344,7 @@ meaning behind descriptions, areas to find, special items, unique nooks and
|
|||||||
crannies to spend time socializing, and hints that point to these things
|
crannies to spend time socializing, and hints that point to these things
|
||||||
elsewhere outside of your own zone is an excellent idea. In fact, if you
|
elsewhere outside of your own zone is an excellent idea. In fact, if you
|
||||||
don't wish to be building descriptions no one will read, you should employ
|
don't wish to be building descriptions no one will read, you should employ
|
||||||
special secrets Â- most especially on games where knowing one's environment
|
special secrets - most especially on games where knowing one's environment
|
||||||
does deeply affect a character's development. No matter what kind of zone you
|
does deeply affect a character's development. No matter what kind of zone you
|
||||||
are building, keep it interesting throughout!
|
are building, keep it interesting throughout!
|
||||||
|
|
||||||
@@ -9387,7 +9367,7 @@ road.
|
|||||||
shouldn't be the sole builder of your zone. Instead, seek the assistance of
|
shouldn't be the sole builder of your zone. Instead, seek the assistance of
|
||||||
someone who adds creative merit to your descriptions. You can do practically
|
someone who adds creative merit to your descriptions. You can do practically
|
||||||
everything from plot to secrets to minutiae, even write the zone in full and
|
everything from plot to secrets to minutiae, even write the zone in full and
|
||||||
just ask someone you know who writes well to Â'say it better' and rewrite
|
just ask someone you know who writes well to 'say it better' and rewrite
|
||||||
what you intended to have there all along. Novels have editors, and so
|
what you intended to have there all along. Novels have editors, and so
|
||||||
should any zone.
|
should any zone.
|
||||||
|
|
||||||
@@ -9659,19 +9639,19 @@ have a point and here it is: *drum roll please*
|
|||||||
Building is hard work! It is a form of expression and creativity. What kind
|
Building is hard work! It is a form of expression and creativity. What kind
|
||||||
of areas you build generally reflects on what kind of person you are. You
|
of areas you build generally reflects on what kind of person you are. You
|
||||||
do not have to be a good speller but you do need a good dictionary/thesaurus.
|
do not have to be a good speller but you do need a good dictionary/thesaurus.
|
||||||
@RHELP M-W@n. Sometimes building can seem like a thankless job and sometimes
|
Sometimes building can seem like a thankless job and sometimes building can be
|
||||||
building can be a reward in itself. Building a few areas, even a few good
|
a reward in itself. Building a few areas, even a few good ones, does not make
|
||||||
ones, does not make you an Immortal or an Imp. It takes more than building to
|
you an Immortal or an Imp. It takes more than building to be one of those and
|
||||||
be one of those and it entails even more work. Respect others and they will
|
it entails even more work. Respect others and they will respect you. The more
|
||||||
respect you. The more detailed an area the better it is. Always choose Quality
|
detailed an area the better it is. Always choose Quality over Quantity. Put
|
||||||
over Quantity. Put some pride in your areas, develop a style of your own. Try
|
some pride in your areas, develop a style of your own. Try new things keep it
|
||||||
new things keep it interesting, if you become bored with building an area take
|
interesting, if you become bored with building an area take a break and play a
|
||||||
a break and play a mortal or do something else, don't take advantage of builder
|
mortal or do something else, don't take advantage of builder privileges.
|
||||||
privileges. Treat others as you wish to be treated. One more warning I would
|
Treat others as you wish to be treated. One more warning I would give to
|
||||||
give to builders before they take things personally or get insulted. Everyone
|
builders before they take things personally or get insulted. Everyone has their
|
||||||
has their own ideas on how to run a MUD, what it comes down to is whoever owns
|
own ideas on how to run a MUD, what it comes down to is whoever owns the MUD
|
||||||
the MUD makes the final decision, so it does not matter how good you think your
|
makes the final decision, so it does not matter how good you think your idea
|
||||||
idea is, it may never be used if the owner does not like it. Plain and simple.
|
is, it may never be used if the owner does not like it. Plain and simple.
|
||||||
You see this on every MUD. So please keep the ideas coming, but do not try to
|
You see this on every MUD. So please keep the ideas coming, but do not try to
|
||||||
force them onto anyone. Be constructive, not critical about peoples ideas.
|
force them onto anyone. Be constructive, not critical about peoples ideas.
|
||||||
Everyone is allowed their opinions.
|
Everyone is allowed their opinions.
|
||||||
|
|||||||
81
power_curve.ipynb
Normal file
81
power_curve.ipynb
Normal file
File diff suppressed because one or more lines are too long
@@ -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 <jpatton@intserv.com>
|
|
||||||
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
|
|
||||||
167
src/Makefile.arc
167
src/Makefile.arc
@@ -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
|
|
||||||
343
src/Makefile.bcc
343
src/Makefile.bcc
@@ -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
|
|
||||||
| $@
|
|
||||||
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
| $@
|
|
||||||
|
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ CFLAGS = @CFLAGS@ $(MYFLAGS) $(PROFILE)
|
|||||||
LIBS = @LIBS@ @CRYPTLIB@ @NETLIB@
|
LIBS = @LIBS@ @CRYPTLIB@ @NETLIB@
|
||||||
|
|
||||||
SRCFILES := $(shell ls *.c | sort)
|
SRCFILES := $(shell ls *.c | sort)
|
||||||
OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
|
OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
|
|||||||
601
src/Makefile.lcc
601
src/Makefile.lcc
@@ -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
|
|
||||||
|
|
||||||
@@ -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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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 \
|
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
|
# Dependencies for the object files (automagically generated with
|
||||||
# gcc -MM)
|
# gcc -MM)
|
||||||
|
|
||||||
act.comm.obj: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
|
act.comm.obj: act.comm.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||||
handler.h db.h screen.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
|
$(CC) -c $(CFLAGS) act.comm.c
|
||||||
act.informative.obj: act.informative.c conf.h sysdep.h structs.h utils.h comm.h \
|
act.informative.obj: act.informative.c conf.h sysdep.h structs.h protocol.h \
|
||||||
interpreter.h handler.h db.h spells.h screen.h constants.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
|
$(CC) -c $(CFLAGS) act.informative.c
|
||||||
act.item.obj: act.item.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
|
act.item.obj: act.item.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||||
handler.h db.h spells.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
|
$(CC) -c $(CFLAGS) act.item.c
|
||||||
act.movement.obj: act.movement.c conf.h sysdep.h structs.h utils.h comm.h \
|
act.movement.obj: act.movement.c conf.h sysdep.h structs.h protocol.h \
|
||||||
interpreter.h handler.h db.h spells.h house.h constants.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
|
$(CC) -c $(CFLAGS) act.movement.c
|
||||||
act.offensive.obj: act.offensive.c conf.h sysdep.h structs.h utils.h comm.h \
|
act.offensive.obj: act.offensive.c conf.h sysdep.h structs.h protocol.h \
|
||||||
interpreter.h handler.h db.h spells.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
|
$(CC) -c $(CFLAGS) act.offensive.c
|
||||||
act.other.obj: act.other.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
|
act.other.obj: act.other.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||||
handler.h db.h spells.h screen.h house.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
|
$(CC) -c $(CFLAGS) act.other.c
|
||||||
act.social.obj: act.social.c conf.h sysdep.h structs.h utils.h comm.h \
|
act.social.obj: act.social.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||||
interpreter.h handler.h db.h spells.h
|
utils.h comm.h interpreter.h handler.h db.h screen.h spells.h act.h
|
||||||
$(CC) -c $(CFLAGS) act.social.c
|
$(CC) -c $(CFLAGS) act.social.c
|
||||||
act.wizard.obj: act.wizard.c conf.h sysdep.h structs.h utils.h comm.h \
|
act.wizard.obj: act.wizard.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||||
interpreter.h handler.h db.h spells.h house.h screen.h constants.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
|
$(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
|
$(CC) -c $(CFLAGS) ban.c
|
||||||
boards.obj: boards.c conf.h sysdep.h structs.h utils.h comm.h db.h boards.h \
|
boards.obj: boards.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||||
interpreter.h handler.h
|
comm.h db.h boards.h interpreter.h handler.h improved-edit.h modify.h
|
||||||
$(CC) -c $(CFLAGS) boards.c
|
$(CC) -c $(CFLAGS) boards.c
|
||||||
castle.obj: castle.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
|
bsd-snprintf.obj: bsd-snprintf.c conf.h sysdep.h
|
||||||
handler.h db.h spells.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
|
$(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
|
$(CC) -c $(CFLAGS) class.c
|
||||||
comm.obj: comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \
|
comm.obj: comm.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||||
db.h house.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
|
$(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
|
$(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
|
$(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 \
|
db.obj: db.c conf.h sysdep.h structs.h protocol.h lists.h utils.h db.h \
|
||||||
interpreter.h house.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
|
$(CC) -c $(CFLAGS) db.c
|
||||||
fight.obj: fight.c conf.h sysdep.h structs.h utils.h comm.h handler.h interpreter.h \
|
dg_comm.obj: dg_comm.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||||
db.h spells.h screen.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
|
$(CC) -c $(CFLAGS) fight.c
|
||||||
graph.obj: graph.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \
|
genmob.obj: genmob.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||||
db.h spells.h
|
db.h shop.h handler.h genolc.h genmob.h genzon.h dg_olc.h dg_scripts.h \
|
||||||
$(CC) -c $(CFLAGS) graph.c
|
spells.h
|
||||||
handler.obj: handler.c conf.h sysdep.h structs.h utils.h comm.h db.h handler.h \
|
$(CC) -c $(CFLAGS) genmob.c
|
||||||
interpreter.h spells.h
|
genobj.obj: genobj.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||||
$(CC) -c $(CFLAGS) handler.c
|
db.h shop.h constants.h genolc.h genobj.h genzon.h dg_olc.h dg_scripts.h \
|
||||||
house.obj: house.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \
|
handler.h interpreter.h boards.h
|
||||||
utils.h house.h constants.h
|
$(CC) -c $(CFLAGS) genobj.c
|
||||||
$(CC) -c $(CFLAGS) house.c
|
genolc.obj: genolc.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||||
interpreter.obj: interpreter.c conf.h sysdep.h structs.h comm.h interpreter.h db.h \
|
db.h handler.h comm.h shop.h oasis.h genolc.h genwld.h genmob.h genshp.h \
|
||||||
utils.h spells.h handler.h mail.h screen.h
|
genzon.h genobj.h dg_olc.h dg_scripts.h constants.h interpreter.h act.h \
|
||||||
$(CC) -c $(CFLAGS) interpreter.c
|
modify.h quest.h
|
||||||
limits.obj: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \
|
$(CC) -c $(CFLAGS) genolc.c
|
||||||
handler.h
|
genqst.obj: genqst.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||||
$(CC) -c $(CFLAGS) limits.c
|
db.h quest.h genolc.h genzon.h
|
||||||
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
|
|
||||||
$(CC) -c $(CFLAGS) genqst.c
|
$(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
|
||||||
205
src/Makefile.os2
205
src/Makefile.os2
@@ -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
|
|
||||||
@@ -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"
|
|
||||||
192
src/Smakefile
192
src/Smakefile
@@ -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
|
|
||||||
|
|
||||||
@@ -150,39 +150,7 @@ ACMD(do_tell)
|
|||||||
|
|
||||||
if (!*buf || !*buf2)
|
if (!*buf || !*buf2)
|
||||||
send_to_char(ch, "Who do you wish to tell what??\r\n");
|
send_to_char(ch, "Who do you wish to tell what??\r\n");
|
||||||
else if (!strcmp(buf, "m-w")) {
|
else if (GET_LEVEL(ch) < LVL_IMMORT && !(vict = get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
|
||||||
#ifdef CIRCLE_WINDOWS
|
|
||||||
/* getpid() is not portable */
|
|
||||||
send_to_char(ch, "Sorry, that is not available in the windows port.\r\n");
|
|
||||||
#else /* all other configurations */
|
|
||||||
char word[MAX_INPUT_LENGTH], *p, *q;
|
|
||||||
|
|
||||||
if (last_webster_teller != -1L) {
|
|
||||||
if (GET_IDNUM(ch) == last_webster_teller) {
|
|
||||||
send_to_char(ch, "You are still waiting for a response.\r\n");
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
send_to_char(ch, "Hold on, m-w is busy. Try again in a couple of seconds.\r\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Only a-z and +/- allowed. */
|
|
||||||
for (p = buf2, q = word; *p ; p++)
|
|
||||||
if ((LOWER(*p) <= 'z' && LOWER(*p) >= 'a') || (*p == '+') || (*p == '-'))
|
|
||||||
*q++ = *p;
|
|
||||||
|
|
||||||
*q = '\0';
|
|
||||||
|
|
||||||
if (!*word) {
|
|
||||||
send_to_char(ch, "Sorry, only letters and +/- are allowed characters.\r\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
snprintf(buf, sizeof(buf), "../bin/webster %s %d &", word, (int) getpid());
|
|
||||||
last_webster_teller = GET_IDNUM(ch);
|
|
||||||
send_to_char(ch, "You look up '%s' in Merriam-Webster.\r\n", word);
|
|
||||||
#endif /* platform specific part */
|
|
||||||
} else if (GET_LEVEL(ch) < LVL_IMMORT && !(vict = get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
|
|
||||||
send_to_char(ch, "%s", CONFIG_NOPERSON);
|
send_to_char(ch, "%s", CONFIG_NOPERSON);
|
||||||
else if (GET_LEVEL(ch) >= LVL_IMMORT && !(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
|
else if (GET_LEVEL(ch) >= LVL_IMMORT && !(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
|
||||||
send_to_char(ch, "%s", CONFIG_NOPERSON);
|
send_to_char(ch, "%s", CONFIG_NOPERSON);
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ static void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mo
|
|||||||
static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode);
|
static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode);
|
||||||
static void show_obj_modifiers(struct obj_data *obj, struct char_data *ch);
|
static void show_obj_modifiers(struct obj_data *obj, struct char_data *ch);
|
||||||
/* do_where utility functions */
|
/* do_where utility functions */
|
||||||
static void perform_immort_where(struct char_data *ch, char *arg);
|
static void perform_immort_where(char_data *ch, const char *arg);
|
||||||
static void perform_mortal_where(struct char_data *ch, char *arg);
|
static void perform_mortal_where(struct char_data *ch, char *arg);
|
||||||
static void print_object_location(int num, struct obj_data *obj, struct char_data *ch, int recur);
|
static size_t print_object_location(int num, const obj_data *obj, const char_data *ch,
|
||||||
|
char *buf, size_t len, size_t buf_size, int recur);
|
||||||
/* Subcommands */
|
/* Subcommands */
|
||||||
/* For show_obj_to_char 'mode'. /-- arbitrary */
|
/* For show_obj_to_char 'mode'. /-- arbitrary */
|
||||||
#define SHOW_OBJ_LONG 0
|
#define SHOW_OBJ_LONG 0
|
||||||
@@ -1603,41 +1603,71 @@ static void perform_mortal_where(struct char_data *ch, char *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_object_location(int num, struct obj_data *obj, struct char_data *ch,
|
static size_t print_object_location(const int num, const obj_data *obj, const char_data *ch, // NOLINT(*-no-recursion)
|
||||||
int recur)
|
char *buf, size_t len, const size_t buf_size, const int recur)
|
||||||
{
|
{
|
||||||
|
size_t nlen = 0;
|
||||||
|
|
||||||
if (num > 0)
|
if (num > 0)
|
||||||
send_to_char(ch, "O%3d. %-25s%s - ", num, obj->short_description, QNRM);
|
nlen = snprintf(buf + len, buf_size - len, "O%4d. %-25s%s - ", num, obj->short_description, QNRM);
|
||||||
else
|
else
|
||||||
send_to_char(ch, "%33s", " - ");
|
nlen = snprintf(buf + len, buf_size - len, "%37s", " - ");
|
||||||
|
|
||||||
|
len += nlen;
|
||||||
|
nlen = 0;
|
||||||
|
if (len > buf_size)
|
||||||
|
return len; // let the caller know we overflowed
|
||||||
|
|
||||||
if (SCRIPT(obj)) {
|
if (SCRIPT(obj)) {
|
||||||
if (!TRIGGERS(SCRIPT(obj))->next)
|
if (!TRIGGERS(SCRIPT(obj))->next)
|
||||||
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
nlen = snprintf(buf + len, buf_size - len, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(obj))));
|
||||||
else
|
else
|
||||||
send_to_char(ch, "[TRIGS] ");
|
nlen = snprintf(buf + len, buf_size - len, "[TRIGS] ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
len += nlen;
|
||||||
|
if (len > buf_size)
|
||||||
|
return len; // let the caller know we overflowed
|
||||||
|
|
||||||
if (IN_ROOM(obj) != NOWHERE)
|
if (IN_ROOM(obj) != NOWHERE)
|
||||||
send_to_char(ch, "[%5d] %s%s\r\n", GET_ROOM_VNUM(IN_ROOM(obj)), world[IN_ROOM(obj)].name, QNRM);
|
nlen = snprintf(buf + len, buf_size - len, "[%5d] %s%s\r\n", GET_ROOM_VNUM(IN_ROOM(obj)), world[IN_ROOM(obj)].name, QNRM);
|
||||||
else if (obj->carried_by)
|
else if (obj->carried_by) {
|
||||||
send_to_char(ch, "carried by %s%s\r\n", PERS(obj->carried_by, ch), QNRM);
|
if (PRF_FLAGGED(ch, PRF_SHOWVNUMS))
|
||||||
else if (obj->worn_by)
|
nlen = snprintf(buf + len, buf_size - len, "carried by [%5d] %s%s\r\n", GET_MOB_VNUM(obj->carried_by), PERS(obj->carried_by, ch), QNRM);
|
||||||
send_to_char(ch, "worn by %s%s\r\n", PERS(obj->worn_by, ch), QNRM);
|
else
|
||||||
else if (obj->in_obj) {
|
nlen = snprintf(buf + len, buf_size - len, "carried by %s%s\r\n", PERS(obj->carried_by, ch), QNRM);
|
||||||
send_to_char(ch, "inside %s%s%s\r\n", obj->in_obj->short_description, QNRM, (recur ? ", which is" : " "));
|
if (PRF_FLAGGED(ch, PRF_VERBOSE) && IN_ROOM(obj->carried_by) != NOWHERE && len + nlen < buf_size)
|
||||||
if (recur)
|
nlen += snprintf(buf + len + nlen, buf_size - len - nlen, "%37sin [%5d] %s%s\r\n", " - ", GET_ROOM_VNUM(IN_ROOM(obj->carried_by)), world[IN_ROOM(obj->carried_by)].name, QNRM);
|
||||||
print_object_location(0, obj->in_obj, ch, recur);
|
} else if (obj->worn_by) {
|
||||||
|
if (PRF_FLAGGED(ch, PRF_SHOWVNUMS))
|
||||||
|
nlen = snprintf(buf + len, buf_size - len, "worn by [%5d] %s%s\r\n", GET_MOB_VNUM(obj->worn_by), PERS(obj->worn_by, ch), QNRM);
|
||||||
|
else
|
||||||
|
nlen = snprintf(buf + len, buf_size - len, "worn by %s%s\r\n", PERS(obj->worn_by, ch), QNRM);
|
||||||
|
if (PRF_FLAGGED(ch, PRF_VERBOSE) && IN_ROOM(obj->worn_by) != NOWHERE && len + nlen < buf_size)
|
||||||
|
nlen += snprintf(buf + len + nlen, buf_size - len - nlen, "%37sin [%5d] %s%s\r\n", " - ", GET_ROOM_VNUM(IN_ROOM(obj->worn_by)), world[IN_ROOM(obj->worn_by)].name, QNRM);
|
||||||
|
} else if (obj->in_obj) {
|
||||||
|
nlen = snprintf(buf + len, buf_size - len, "inside %s%s%s\r\n", obj->in_obj->short_description, QNRM, (recur ? ", which is" : " "));
|
||||||
|
if (recur && nlen + len < buf_size) {
|
||||||
|
len += nlen;
|
||||||
|
nlen = 0;
|
||||||
|
len = print_object_location(0, obj->in_obj, ch, buf, len, buf_size, recur);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
send_to_char(ch, "in an unknown location\r\n");
|
nlen = snprintf(buf + len, buf_size - len, "in an unknown location\r\n");
|
||||||
|
len += nlen;
|
||||||
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void perform_immort_where(struct char_data *ch, char *arg)
|
static void perform_immort_where(char_data *ch, const char *arg)
|
||||||
{
|
{
|
||||||
struct char_data *i;
|
char_data *i;
|
||||||
struct obj_data *k;
|
obj_data *k;
|
||||||
struct descriptor_data *d;
|
struct descriptor_data *d;
|
||||||
int num = 0, found = 0;
|
int num = 0, found = FALSE; // "num" here needs to match the lookup in do_stat, so "stat 4.sword" finds the right one
|
||||||
|
const char *error_message = "\r\n***OVERFLOW***\r\n";
|
||||||
|
char buf[MAX_STRING_LENGTH];
|
||||||
|
size_t len = 0, nlen = 0;
|
||||||
|
const size_t buf_size = sizeof(buf) - strlen(error_message) - 1;
|
||||||
|
|
||||||
if (!*arg) {
|
if (!*arg) {
|
||||||
send_to_char(ch, "Players Room Location Zone\r\n");
|
send_to_char(ch, "Players Room Location Zone\r\n");
|
||||||
@@ -1658,26 +1688,64 @@ static void perform_immort_where(struct char_data *ch, char *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (PRF_FLAGGED(ch, PRF_VERBOSE))
|
||||||
|
len = snprintf(buf, buf_size, " ### Mob name - Room # Room name\r\n");
|
||||||
|
|
||||||
for (i = character_list; i; i = i->next)
|
for (i = character_list; i; i = i->next)
|
||||||
if (CAN_SEE(ch, i) && IN_ROOM(i) != NOWHERE && isname(arg, i->player.name)) {
|
if (CAN_SEE(ch, i) && IN_ROOM(i) != NOWHERE && isname(arg, i->player.name)) {
|
||||||
found = 1;
|
found = 1;
|
||||||
send_to_char(ch, "M%3d. %-25s%s - [%5d] %-25s%s", ++num, GET_NAME(i), QNRM,
|
nlen = snprintf(buf + len, buf_size - len, "M%4d. %-25s%s - [%5d] %-25s%s", ++num, GET_NAME(i), QNRM,
|
||||||
GET_ROOM_VNUM(IN_ROOM(i)), world[IN_ROOM(i)].name, QNRM);
|
GET_ROOM_VNUM(IN_ROOM(i)), world[IN_ROOM(i)].name, QNRM);
|
||||||
|
if (len + nlen >= buf_size) {
|
||||||
|
len += snprintf(buf + len, buf_size - len, "%s", error_message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
len += nlen;
|
||||||
if (SCRIPT(i) && TRIGGERS(SCRIPT(i))) {
|
if (SCRIPT(i) && TRIGGERS(SCRIPT(i))) {
|
||||||
if (!TRIGGERS(SCRIPT(i))->next)
|
if (!TRIGGERS(SCRIPT(i))->next)
|
||||||
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(i))));
|
nlen = snprintf(buf + len, buf_size - len, "[T%d]", GET_TRIG_VNUM(TRIGGERS(SCRIPT(i))));
|
||||||
else
|
else
|
||||||
send_to_char(ch, "[TRIGS] ");
|
nlen = snprintf(buf + len, buf_size - len, "[TRIGS]");
|
||||||
|
|
||||||
|
if (len + nlen >= buf_size) {
|
||||||
|
snprintf(buf + len, buf_size - len, "%s", error_message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
len += nlen;
|
||||||
}
|
}
|
||||||
send_to_char(ch, "%s\r\n", QNRM);
|
nlen = snprintf(buf + len, buf_size - len, "%s\r\n", QNRM);
|
||||||
|
if (len + nlen >= buf_size) {
|
||||||
|
snprintf(buf + len, buf_size - len, "%s", error_message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
len += nlen;
|
||||||
}
|
}
|
||||||
for (num = 0, k = object_list; k; k = k->next)
|
|
||||||
if (CAN_SEE_OBJ(ch, k) && isname(arg, k->name)) {
|
if (PRF_FLAGGED(ch, PRF_VERBOSE) && len < buf_size) {
|
||||||
found = 1;
|
nlen = snprintf(buf + len, buf_size - len, " ### Object name Location\r\n");
|
||||||
print_object_location(++num, k, ch, TRUE);
|
if (len + nlen >= buf_size) {
|
||||||
|
snprintf(buf + len, buf_size - len, "%s", error_message);
|
||||||
}
|
}
|
||||||
|
len += nlen;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len < buf_size) {
|
||||||
|
for (k = object_list; k; k = k->next) {
|
||||||
|
if (CAN_SEE_OBJ(ch, k) && isname(arg, k->name)) {
|
||||||
|
found = 1;
|
||||||
|
len = print_object_location(++num, k, ch, buf, len, buf_size, TRUE);
|
||||||
|
if (len >= buf_size) {
|
||||||
|
snprintf(buf + buf_size, sizeof(buf) - buf_size, "%s", error_message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
send_to_char(ch, "Couldn't find any such thing.\r\n");
|
send_to_char(ch, "Couldn't find any such thing.\r\n");
|
||||||
|
else
|
||||||
|
page_string(ch->desc, buf, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1937,6 +2005,9 @@ ACMD(do_toggle)
|
|||||||
{"pagelength", 0, 0, "\n", "\n"},
|
{"pagelength", 0, 0, "\n", "\n"},
|
||||||
{"screenwidth", 0, 0, "\n", "\n"},
|
{"screenwidth", 0, 0, "\n", "\n"},
|
||||||
{"color", 0, 0, "\n", "\n"},
|
{"color", 0, 0, "\n", "\n"},
|
||||||
|
{"verbose", PRF_VERBOSE, LVL_IMMORT,
|
||||||
|
"You will no longer see verbose output in listings.\n",
|
||||||
|
"You will now see verbose listings.\n"},
|
||||||
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1950,7 +2021,8 @@ ACMD(do_toggle)
|
|||||||
if (!GET_WIMP_LEV(ch))
|
if (!GET_WIMP_LEV(ch))
|
||||||
strcpy(buf2, "OFF"); /* strcpy: OK */
|
strcpy(buf2, "OFF"); /* strcpy: OK */
|
||||||
else
|
else
|
||||||
sprintf(buf2, "%-3.3d", GET_WIMP_LEV(ch)); /* sprintf: OK */
|
snprintf(buf2, sizeof(buf2), "%-3.3d", GET_WIMP_LEV(ch)); /* thanks to Ironfist for the fix for the buffer overrun here */
|
||||||
|
|
||||||
|
|
||||||
if (GET_LEVEL(ch) == LVL_IMPL) {
|
if (GET_LEVEL(ch) == LVL_IMPL) {
|
||||||
send_to_char(ch,
|
send_to_char(ch,
|
||||||
@@ -1970,7 +2042,8 @@ ACMD(do_toggle)
|
|||||||
" NoHassle: %-3s "
|
" NoHassle: %-3s "
|
||||||
" Holylight: %-3s "
|
" Holylight: %-3s "
|
||||||
" ShowVnums: %-3s\r\n"
|
" ShowVnums: %-3s\r\n"
|
||||||
" Syslog: %-3s%s ",
|
" Syslog: %-3s "
|
||||||
|
" Verbose: %-3s%s ",
|
||||||
|
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_BUILDWALK)),
|
ONOFF(PRF_FLAGGED(ch, PRF_BUILDWALK)),
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_NOWIZ)),
|
ONOFF(PRF_FLAGGED(ch, PRF_NOWIZ)),
|
||||||
@@ -1979,6 +2052,7 @@ ACMD(do_toggle)
|
|||||||
ONOFF(PRF_FLAGGED(ch, PRF_HOLYLIGHT)),
|
ONOFF(PRF_FLAGGED(ch, PRF_HOLYLIGHT)),
|
||||||
ONOFF(PRF_FLAGGED(ch, PRF_SHOWVNUMS)),
|
ONOFF(PRF_FLAGGED(ch, PRF_SHOWVNUMS)),
|
||||||
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)],
|
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)],
|
||||||
|
ONOFF(PRF_FLAGGED(ch, PRF_VERBOSE)),
|
||||||
GET_LEVEL(ch) == LVL_IMPL ? "" : "\r\n");
|
GET_LEVEL(ch) == LVL_IMPL ? "" : "\r\n");
|
||||||
}
|
}
|
||||||
if (GET_LEVEL(ch) >= LVL_IMPL) {
|
if (GET_LEVEL(ch) >= LVL_IMPL) {
|
||||||
|
|||||||
@@ -785,6 +785,9 @@ void name_from_drinkcon(struct obj_data *obj)
|
|||||||
if (!obj || (GET_OBJ_TYPE(obj) != ITEM_DRINKCON && GET_OBJ_TYPE(obj) != ITEM_FOUNTAIN))
|
if (!obj || (GET_OBJ_TYPE(obj) != ITEM_DRINKCON && GET_OBJ_TYPE(obj) != ITEM_FOUNTAIN))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (obj->name == obj_proto[GET_OBJ_RNUM(obj)].name)
|
||||||
|
obj->name = strdup(obj_proto[GET_OBJ_RNUM(obj)].name);
|
||||||
|
|
||||||
liqname = drinknames[GET_OBJ_VAL(obj, 2)];
|
liqname = drinknames[GET_OBJ_VAL(obj, 2)];
|
||||||
|
|
||||||
remove_from_string(obj->name, liqname);
|
remove_from_string(obj->name, liqname);
|
||||||
|
|||||||
@@ -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
|
|
||||||
73
src/comm.c
73
src/comm.c
@@ -104,8 +104,7 @@ unsigned long pulse = 0; /* number of pulses since game start */
|
|||||||
ush_int port;
|
ush_int port;
|
||||||
socket_t mother_desc;
|
socket_t mother_desc;
|
||||||
int next_tick = SECS_PER_MUD_HOUR; /* Tick countdown */
|
int next_tick = SECS_PER_MUD_HOUR; /* Tick countdown */
|
||||||
/* used with do_tell and handle_webster_file utility */
|
|
||||||
long last_webster_teller = -1L;
|
|
||||||
|
|
||||||
/* static local global variable declarations (current file scope only) */
|
/* static local global variable declarations (current file scope only) */
|
||||||
static struct txt_block *bufpool = 0; /* pool of large output buffers */
|
static struct txt_block *bufpool = 0; /* pool of large output buffers */
|
||||||
@@ -113,14 +112,11 @@ static int max_players = 0; /* max descriptors available */
|
|||||||
static int tics_passed = 0; /* for extern checkpointing */
|
static int tics_passed = 0; /* for extern checkpointing */
|
||||||
static struct timeval null_time; /* zero-valued time structure */
|
static struct timeval null_time; /* zero-valued time structure */
|
||||||
static byte reread_wizlist; /* signal: SIGUSR1 */
|
static byte reread_wizlist; /* signal: SIGUSR1 */
|
||||||
/* normally signal SIGUSR2, currently orphaned in favor of Webster dictionary
|
static byte emergency_unban; /* signal: SIGUSR2 */
|
||||||
* lookup
|
|
||||||
static byte emergency_unban;
|
|
||||||
*/
|
|
||||||
static int dg_act_check; /* toggle for act_trigger */
|
static int dg_act_check; /* toggle for act_trigger */
|
||||||
static bool fCopyOver; /* Are we booting in copyover mode? */
|
static bool fCopyOver; /* Are we booting in copyover mode? */
|
||||||
static char *last_act_message = NULL;
|
static char *last_act_message = NULL;
|
||||||
static byte webster_file_ready = FALSE;/* signal: SIGUSR2 */
|
|
||||||
|
|
||||||
/* static local function prototypes (current file scope only) */
|
/* static local function prototypes (current file scope only) */
|
||||||
static RETSIGTYPE reread_wizlists(int sig);
|
static RETSIGTYPE reread_wizlists(int sig);
|
||||||
@@ -160,9 +156,6 @@ static int open_logfile(const char *filename, FILE *stderr_fp);
|
|||||||
#if defined(POSIX)
|
#if defined(POSIX)
|
||||||
static sigfunc *my_signal(int signo, sigfunc *func);
|
static sigfunc *my_signal(int signo, sigfunc *func);
|
||||||
#endif
|
#endif
|
||||||
/* Webster Dictionary Lookup functions */
|
|
||||||
static RETSIGTYPE websterlink(int sig);
|
|
||||||
static void handle_webster_file(void);
|
|
||||||
|
|
||||||
static void msdp_update(void); /* KaVir plugin*/
|
static void msdp_update(void); /* KaVir plugin*/
|
||||||
|
|
||||||
@@ -198,7 +191,7 @@ void gettimeofday(struct timeval *t, struct timezone *dummy)
|
|||||||
|
|
||||||
#endif /* CIRCLE_WINDOWS || CIRCLE_MACINTOSH */
|
#endif /* CIRCLE_WINDOWS || CIRCLE_MACINTOSH */
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int _main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int pos = 1;
|
int pos = 1;
|
||||||
const char *dir;
|
const char *dir;
|
||||||
@@ -390,6 +383,7 @@ int main(int argc, char **argv)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Reload players after a copyover */
|
/* Reload players after a copyover */
|
||||||
void copyover_recover()
|
void copyover_recover()
|
||||||
{
|
{
|
||||||
@@ -958,7 +952,7 @@ void game_loop(socket_t local_mother_desc)
|
|||||||
mudlog(CMP, LVL_IMMORT, TRUE, "Signal received - rereading wizlists.");
|
mudlog(CMP, LVL_IMMORT, TRUE, "Signal received - rereading wizlists.");
|
||||||
reboot_wizlists();
|
reboot_wizlists();
|
||||||
}
|
}
|
||||||
/* Orphaned right now as signal trapping is used for Webster lookup
|
|
||||||
if (emergency_unban) {
|
if (emergency_unban) {
|
||||||
emergency_unban = FALSE;
|
emergency_unban = FALSE;
|
||||||
mudlog(BRF, LVL_IMMORT, TRUE, "Received SIGUSR2 - completely unrestricting game (emergent)");
|
mudlog(BRF, LVL_IMMORT, TRUE, "Received SIGUSR2 - completely unrestricting game (emergent)");
|
||||||
@@ -966,11 +960,7 @@ void game_loop(socket_t local_mother_desc)
|
|||||||
circle_restrict = 0;
|
circle_restrict = 0;
|
||||||
num_invalid = 0;
|
num_invalid = 0;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if (webster_file_ready) {
|
|
||||||
webster_file_ready = FALSE;
|
|
||||||
handle_webster_file();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CIRCLE_UNIX
|
#ifdef CIRCLE_UNIX
|
||||||
/* Update tics_passed for deadlock protection (UNIX only) */
|
/* Update tics_passed for deadlock protection (UNIX only) */
|
||||||
@@ -2232,18 +2222,10 @@ static RETSIGTYPE reread_wizlists(int sig)
|
|||||||
reread_wizlist = TRUE;
|
reread_wizlist = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Orphaned right now in place of Webster ...
|
|
||||||
static RETSIGTYPE unrestrict_game(int sig)
|
static RETSIGTYPE unrestrict_game(int sig)
|
||||||
{
|
{
|
||||||
emergency_unban = TRUE;
|
emergency_unban = TRUE;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
static RETSIGTYPE websterlink(int sig)
|
|
||||||
{
|
|
||||||
webster_file_ready = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CIRCLE_UNIX
|
#ifdef CIRCLE_UNIX
|
||||||
|
|
||||||
@@ -2318,7 +2300,7 @@ static void signal_setup(void)
|
|||||||
|
|
||||||
/* user signal 2: unrestrict game. Used for emergencies if you lock
|
/* user signal 2: unrestrict game. Used for emergencies if you lock
|
||||||
* yourself out of the MUD somehow. */
|
* yourself out of the MUD somehow. */
|
||||||
my_signal(SIGUSR2, websterlink);
|
my_signal(SIGUSR2, unrestrict_game);
|
||||||
|
|
||||||
/* set up the deadlock-protection so that the MUD aborts itself if it gets
|
/* set up the deadlock-protection so that the MUD aborts itself if it gets
|
||||||
* caught in an infinite loop for more than 3 minutes. */
|
* caught in an infinite loop for more than 3 minutes. */
|
||||||
@@ -2780,45 +2762,6 @@ static void circle_sleep(struct timeval *timeout)
|
|||||||
|
|
||||||
#endif /* CIRCLE_WINDOWS */
|
#endif /* CIRCLE_WINDOWS */
|
||||||
|
|
||||||
static void handle_webster_file(void) {
|
|
||||||
FILE *fl;
|
|
||||||
struct char_data *ch = find_char(last_webster_teller);
|
|
||||||
char retval[MAX_STRING_LENGTH], line[READ_SIZE];
|
|
||||||
size_t len = 0, nlen = 0;
|
|
||||||
|
|
||||||
last_webster_teller = -1L;
|
|
||||||
|
|
||||||
if (!ch) /* they quit ? */
|
|
||||||
return;
|
|
||||||
|
|
||||||
fl = fopen("websterinfo", "r");
|
|
||||||
if (!fl) {
|
|
||||||
send_to_char(ch, "It seems the dictionary is offline..\r\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
unlink("websterinfo");
|
|
||||||
|
|
||||||
get_line(fl, line);
|
|
||||||
while (!feof(fl)) {
|
|
||||||
nlen = snprintf(retval + len, sizeof(retval) - len, "%s\r\n", line);
|
|
||||||
if (len + nlen >= sizeof(retval))
|
|
||||||
break;
|
|
||||||
len += nlen;
|
|
||||||
get_line(fl, line);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (len >= sizeof(retval)) {
|
|
||||||
const char *overflow = "\r\n**OVERFLOW**\r\n";
|
|
||||||
strcpy(retval + sizeof(retval) - strlen(overflow) - 1, overflow); /* strcpy: OK */
|
|
||||||
}
|
|
||||||
fclose(fl);
|
|
||||||
|
|
||||||
send_to_char(ch, "You get this feedback from Merriam-Webster:\r\n");
|
|
||||||
page_string(ch->desc, retval, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* KaVir's plugin*/
|
/* KaVir's plugin*/
|
||||||
static void msdp_update( void )
|
static void msdp_update( void )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#define COPYOVER_FILE "copyover.dat"
|
#define COPYOVER_FILE "copyover.dat"
|
||||||
|
|
||||||
/* comm.c */
|
/* comm.c */
|
||||||
|
int _main(int argc, char **argv);
|
||||||
void close_socket(struct descriptor_data *d);
|
void close_socket(struct descriptor_data *d);
|
||||||
void game_info(const char *messg, ...) __attribute__ ((format (printf, 1, 2)));
|
void game_info(const char *messg, ...) __attribute__ ((format (printf, 1, 2)));
|
||||||
size_t send_to_char(struct char_data *ch, const char *messg, ...) __attribute__
|
size_t send_to_char(struct char_data *ch, const char *messg, ...) __attribute__
|
||||||
@@ -60,9 +61,6 @@ void game_loop(socket_t mother_desc);
|
|||||||
void heartbeat(int heart_pulse);
|
void heartbeat(int heart_pulse);
|
||||||
void copyover_recover(void);
|
void copyover_recover(void);
|
||||||
|
|
||||||
/** webster dictionary lookup */
|
|
||||||
extern long last_webster_teller;
|
|
||||||
|
|
||||||
extern struct descriptor_data *descriptor_list;
|
extern struct descriptor_data *descriptor_list;
|
||||||
extern int buf_largecount;
|
extern int buf_largecount;
|
||||||
extern int buf_overflows;
|
extern int buf_overflows;
|
||||||
|
|||||||
108
src/conf.h.amiga
108
src/conf.h.amiga
@@ -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 <sys/wait.h> that is POSIX.1 compatible. */
|
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> 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 <sys/types.h> 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 <sys/socket.h> 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 <sys/time.h> and <time.h>. */
|
|
||||||
#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 <arpa/telnet.h> header file. */
|
|
||||||
#define HAVE_ARPA_TELNET_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <assert.h> header file. */
|
|
||||||
#define HAVE_ASSERT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <crypt.h> header file. */
|
|
||||||
#undef HAVE_CRYPT_H
|
|
||||||
|
|
||||||
/* Define if you have the <errno.h> header file. */
|
|
||||||
#define HAVE_ERRNO_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#define HAVE_FCNTL_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#define HAVE_LIMITS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <net/errno.h> header file. */
|
|
||||||
/* #undef HAVE_NET_ERRNO_H */
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/fcntl.h> header file. */
|
|
||||||
#define HAVE_SYS_FCNTL_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/select.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_SELECT_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/time.h> header file. */
|
|
||||||
#define HAVE_SYS_TIME_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/types.h> header file. */
|
|
||||||
#define HAVE_SYS_TYPES_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> 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_ */
|
|
||||||
@@ -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 <sys/types.h> 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 <sys/types.h> 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 <sys/socket.h> doesn't define. */
|
|
||||||
#define socklen_t int
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define if you have the <strings.h> 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 <sys/types.h> header file. */
|
|
||||||
#define HAVE_SYS_TYPES_H
|
|
||||||
#define HAVE_UNISTD_H
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#define HAVE_LIMITS_H
|
|
||||||
|
|
||||||
/* Define if you have the <errno.h> header file. */
|
|
||||||
#define HAVE_ERRNO_H
|
|
||||||
#define HAVE_SYS_ERRNO_H
|
|
||||||
|
|
||||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
|
||||||
#define TIME_WITH_SYS_TIME
|
|
||||||
#define HAVE_SYS_TIME_H
|
|
||||||
|
|
||||||
/* Define if you have the <assert.h> header file. */
|
|
||||||
#define HAVE_ASSERT_H
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#define HAVE_FCNTL_H
|
|
||||||
/*#define HAVE_SYS_FCNTL_H*/
|
|
||||||
|
|
||||||
/* Define if you have the <sys/socket.h> header file. */
|
|
||||||
#define HAVE_SYS_SOCKET_H
|
|
||||||
#define HAVE_SYS_RESOURCE_H
|
|
||||||
|
|
||||||
/* Define if you have <sys/wait.h> 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_ */
|
|
||||||
337
src/conf.h.cmake.in
Normal file
337
src/conf.h.cmake.in
Normal file
@@ -0,0 +1,337 @@
|
|||||||
|
/* src/conf.h.cmake.in. Used as basis for conf.h when building with cmake */
|
||||||
|
|
||||||
|
#ifndef _CONF_H_
|
||||||
|
#define _CONF_H_
|
||||||
|
|
||||||
|
/* Define to empty if the keyword does not work. */
|
||||||
|
#define const @CONST_KEYWORD@
|
||||||
|
|
||||||
|
/* Define if you don't have vprintf but do have _doprnt. */
|
||||||
|
#cmakedefine HAVE_DOPRNT
|
||||||
|
|
||||||
|
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
|
#cmakedefine HAVE_SYS_WAIT_H
|
||||||
|
|
||||||
|
/* Define if you have the vprintf function. */
|
||||||
|
#cmakedefine HAVE_VPRINTF
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
|
#cmakedefine pid_t @pid_t@
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (int or void). */
|
||||||
|
#define RETSIGTYPE @RETSIGTYPE@
|
||||||
|
|
||||||
|
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||||
|
#cmakedefine size_t @size_t@
|
||||||
|
|
||||||
|
/* Define if you have the ANSI C header files. */
|
||||||
|
#cmakedefine STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#cmakedefine TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Define if we're compiling CircleMUD under any type of UNIX system. */
|
||||||
|
#cmakedefine CIRCLE_UNIX
|
||||||
|
|
||||||
|
/* Define if the system is capable of using crypt() to encrypt. */
|
||||||
|
#cmakedefine CIRCLE_CRYPT
|
||||||
|
|
||||||
|
/* Define if we don't have proper support for the system's crypt(). */
|
||||||
|
#cmakedefine HAVE_UNSAFE_CRYPT
|
||||||
|
|
||||||
|
/* Define is the system has struct in_addr. */
|
||||||
|
#cmakedefine HAVE_STRUCT_IN_ADDR
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/socket.h> doesn't define. */
|
||||||
|
#cmakedefine socklen_t @socklen_t@
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
|
#cmakedefine ssize_t @ssize_t@
|
||||||
|
|
||||||
|
/* Define if you have the gettimeofday function. */
|
||||||
|
#cmakedefine HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
/* Define if you have the inet_addr function. */
|
||||||
|
#cmakedefine HAVE_INET_ADDR
|
||||||
|
|
||||||
|
/* Define if you have the inet_aton function. */
|
||||||
|
#cmakedefine HAVE_INET_ATON
|
||||||
|
|
||||||
|
/* Define if you have the select function. */
|
||||||
|
#cmakedefine HAVE_SELECT
|
||||||
|
|
||||||
|
/* Define if you have the snprintf function. */
|
||||||
|
#cmakedefine HAVE_SNPRINTF
|
||||||
|
|
||||||
|
/* Define if you have the strcasecmp function. */
|
||||||
|
#cmakedefine HAVE_STRCASECMP
|
||||||
|
|
||||||
|
/* Define if you have the strdup function. */
|
||||||
|
#cmakedefine HAVE_STRDUP
|
||||||
|
|
||||||
|
/* Define if you have the strerror function. */
|
||||||
|
#cmakedefine HAVE_STRERROR
|
||||||
|
|
||||||
|
/* Define if you have the stricmp function. */
|
||||||
|
#cmakedefine HAVE_STRICMP
|
||||||
|
|
||||||
|
/* Define if you have the strlcpy function. */
|
||||||
|
#cmakedefine HAVE_STRLCPY
|
||||||
|
|
||||||
|
/* Define if you have the strncasecmp function. */
|
||||||
|
#cmakedefine HAVE_STRNCASECMP
|
||||||
|
|
||||||
|
/* Define if you have the strnicmp function. */
|
||||||
|
#cmakedefine HAVE_STRNICMP
|
||||||
|
|
||||||
|
/* Define if you have the strstr function. */
|
||||||
|
#cmakedefine HAVE_STRSTR
|
||||||
|
|
||||||
|
/* Define if you have the vsnprintf function. */
|
||||||
|
#cmakedefine HAVE_VSNPRINTF
|
||||||
|
|
||||||
|
/* Define if you have the <arpa/inet.h> header file. */
|
||||||
|
#cmakedefine HAVE_ARPA_INET_H
|
||||||
|
|
||||||
|
/* Define if you have the <arpa/telnet.h> header file. */
|
||||||
|
#cmakedefine HAVE_ARPA_TELNET_H
|
||||||
|
|
||||||
|
/* Define if you have the <assert.h> header file. */
|
||||||
|
#cmakedefine HAVE_ASSERT_H
|
||||||
|
|
||||||
|
/* Define if you have the <crypt.h> header file. */
|
||||||
|
#cmakedefine HAVE_CRYPT_H
|
||||||
|
|
||||||
|
/* Define if you have the <errno.h> header file. */
|
||||||
|
#cmakedefine HAVE_ERRNO_H
|
||||||
|
|
||||||
|
/* Define if you have the <fcntl.h> header file. */
|
||||||
|
#cmakedefine HAVE_FCNTL_H
|
||||||
|
|
||||||
|
/* Define if you have the <limits.h> header file. */
|
||||||
|
#cmakedefine HAVE_LIMITS_H
|
||||||
|
|
||||||
|
/* Define if you have the <mcheck.h> header file. */
|
||||||
|
#cmakedefine HAVE_MCHECK_H
|
||||||
|
|
||||||
|
/* Define if you have the <memory.h> header file. */
|
||||||
|
#cmakedefine HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define if you have the <net/errno.h> header file. */
|
||||||
|
#cmakedefine HAVE_NET_ERRNO_H
|
||||||
|
|
||||||
|
/* Define if you have the <netdb.h> header file. */
|
||||||
|
#cmakedefine HAVE_NETDB_H
|
||||||
|
|
||||||
|
/* Define if you have the <netinet/in.h> header file. */
|
||||||
|
#cmakedefine HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define if you have the <signal.h> header file. */
|
||||||
|
#cmakedefine HAVE_SIGNAL_H
|
||||||
|
|
||||||
|
/* Define if you have the <string.h> header file. */
|
||||||
|
#cmakedefine HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define if you have the <strings.h> header file. */
|
||||||
|
#cmakedefine HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/fcntl.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_FCNTL_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/resource.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_RESOURCE_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/select.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_SELECT_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/socket.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_SOCKET_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/stat.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/time.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/types.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define if you have the <sys/uio.h> header file. */
|
||||||
|
#cmakedefine HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define if you have the <unistd.h> header file. */
|
||||||
|
#cmakedefine HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define if you have the malloc library (-lmalloc). */
|
||||||
|
#cmakedefine HAVE_LIBMALLOC
|
||||||
|
|
||||||
|
/* Check for a prototype to accept. */
|
||||||
|
#cmakedefine NEED_ACCEPT_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to atoi. */
|
||||||
|
#cmakedefine NEED_ATOI_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to atol. */
|
||||||
|
#cmakedefine NEED_ATOL_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to bind. */
|
||||||
|
#cmakedefine NEED_BIND_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to bzero. */
|
||||||
|
#cmakedefine NEED_BZERO_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to chdir. */
|
||||||
|
#cmakedefine NEED_CHDIR_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to close. */
|
||||||
|
#cmakedefine NEED_CLOSE_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to crypt. */
|
||||||
|
#cmakedefine NEED_CRYPT_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fclose. */
|
||||||
|
#cmakedefine NEED_FCLOSE_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fcntl. */
|
||||||
|
#cmakedefine NEED_FCNTL_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fflush. */
|
||||||
|
#cmakedefine NEED_FFLUSH_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fprintf. */
|
||||||
|
#cmakedefine NEED_FPRINTF_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fputc. */
|
||||||
|
#cmakedefine NEED_FPUTC_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fputs. */
|
||||||
|
#cmakedefine NEED_FPUTS_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fread. */
|
||||||
|
#cmakedefine NEED_FREAD_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fscanf. */
|
||||||
|
#cmakedefine NEED_FSCANF_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fseek. */
|
||||||
|
#cmakedefine NEED_FSEEK_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to fwrite. */
|
||||||
|
#cmakedefine NEED_FWRITE_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to getpeername. */
|
||||||
|
#cmakedefine NEED_GETPEERNAME_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to getpid. */
|
||||||
|
#cmakedefine NEED_GETPID_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to getrlimit. */
|
||||||
|
#cmakedefine NEED_GETRLIMIT_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to getsockname. */
|
||||||
|
#cmakedefine NEED_GETSOCKNAME_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to gettimeofday. */
|
||||||
|
#cmakedefine NEED_GETTIMEOFDAY_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to htonl. */
|
||||||
|
#cmakedefine NEED_HTONL_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to htons. */
|
||||||
|
#cmakedefine NEED_HTONS_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to inet_addr. */
|
||||||
|
#cmakedefine NEED_INET_ADDR_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to inet_aton. */
|
||||||
|
#cmakedefine NEED_INET_ATON_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to inet_ntoa. */
|
||||||
|
#cmakedefine NEED_INET_NTOA_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to listen. */
|
||||||
|
#cmakedefine NEED_LISTEN_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to ntohl. */
|
||||||
|
#cmakedefine NEED_NTOHL_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to perror. */
|
||||||
|
#cmakedefine NEED_PERROR_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to printf. */
|
||||||
|
#cmakedefine NEED_PRINTF_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to qsort. */
|
||||||
|
#cmakedefine NEED_QSORT_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to read. */
|
||||||
|
#cmakedefine NEED_READ_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to remove. */
|
||||||
|
#cmakedefine NEED_REMOVE_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to rewind. */
|
||||||
|
#cmakedefine NEED_REWIND_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to select. */
|
||||||
|
#cmakedefine NEED_SELECT_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to setitimer. */
|
||||||
|
#cmakedefine NEED_SETITIMER_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to setrlimit. */
|
||||||
|
#cmakedefine NEED_SETRLIMIT_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to setsockopt. */
|
||||||
|
#cmakedefine NEED_SETSOCKOPT_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to snprintf. */
|
||||||
|
#cmakedefine NEED_SNPRINTF_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to socket. */
|
||||||
|
#cmakedefine NEED_SOCKET_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to sprintf. */
|
||||||
|
#cmakedefine NEED_SPRINTF_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to sscanf. */
|
||||||
|
#cmakedefine NEED_SSCANF_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to strcasecmp. */
|
||||||
|
#cmakedefine NEED_STRCASECMP_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to strdup. */
|
||||||
|
#cmakedefine NEED_STRDUP_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to strerror. */
|
||||||
|
#cmakedefine NEED_STRERROR_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to stricmp. */
|
||||||
|
#cmakedefine NEED_STRICMP_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to strlcpy. */
|
||||||
|
#cmakedefine NEED_STRLCPY_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to strncasecmp. */
|
||||||
|
#cmakedefine NEED_STRNCASECMP_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to strnicmp. */
|
||||||
|
#cmakedefine NEED_STRNICMP_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to system. */
|
||||||
|
#cmakedefine NEED_SYSTEM_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to time. */
|
||||||
|
#cmakedefine NEED_TIME_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to unlink. */
|
||||||
|
#cmakedefine NEED_UNLINK_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to vsnprintf. */
|
||||||
|
#cmakedefine NEED_VSNPRINTF_PROTO
|
||||||
|
|
||||||
|
/* Check for a prototype to write. */
|
||||||
|
#cmakedefine NEED_WRITE_PROTO
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _CONF_H_ */
|
||||||
108
src/conf.h.os2
108
src/conf.h.os2
@@ -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 <sys/wait.h> that is POSIX.1 compatible. */
|
|
||||||
#define HAVE_SYS_WAIT_H
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#undef pid_t
|
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
|
||||||
#define RETSIGTYPE
|
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
|
||||||
#undef size_t
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/socket.h> 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 <sys/time.h> and <time.h>. */
|
|
||||||
#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 <arpa/telnet.h> header file. */
|
|
||||||
#define HAVE_ARPA_TELNET_H
|
|
||||||
|
|
||||||
/* Define if you have the <assert.h> header file. */
|
|
||||||
#define HAVE_ASSERT_H
|
|
||||||
|
|
||||||
/* Define if you have the <crypt.h> header file. */
|
|
||||||
#undef HAVE_CRYPT_H
|
|
||||||
|
|
||||||
/* Define if you have the <errno.h> header file. */
|
|
||||||
#define HAVE_ERRNO_H
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#define HAVE_FCNTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#define HAVE_LIMITS_H
|
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define if you have the <net/errno.h> header file. */
|
|
||||||
#undef HAVE_NET_ERRNO_H
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/fcntl.h> header file. */
|
|
||||||
#define HAVE_SYS_FCNTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/select.h> header file. */
|
|
||||||
#define HAVE_SYS_SELECT_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/time.h> header file. */
|
|
||||||
#define HAVE_SYS_TIME_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/types.h> header file. */
|
|
||||||
#define HAVE_SYS_TYPES_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> 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_ */
|
|
||||||
300
src/conf.h.vms
300
src/conf.h.vms
@@ -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 <sys/wait.h> that is POSIX.1 compatible. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_SYS_WAIT_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
/* #undef pid_t */
|
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
|
||||||
#define RETSIGTYPE void
|
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
|
||||||
/* #undef size_t */
|
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
|
||||||
#define STDC_HEADERS 1
|
|
||||||
|
|
||||||
/* Define to `unsigned int' if <sys/socket.h> doesn't define. */
|
|
||||||
#define socklen_t unsigned int
|
|
||||||
|
|
||||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
|
||||||
#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 <sys/types.h> 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 <arpa/inet.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_ARPA_INET_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <arpa/telnet.h> header file. */
|
|
||||||
/* #undef HAVE_ARPA_TELNET_H */
|
|
||||||
|
|
||||||
/* Define if you have the <assert.h> header file. */
|
|
||||||
#define HAVE_ASSERT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <crypt.h> header file. */
|
|
||||||
/* #undef HAVE_CRYPT_H */
|
|
||||||
|
|
||||||
/* Define if you have the <errno.h> header file. */
|
|
||||||
#define HAVE_ERRNO_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_FCNTL_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#define HAVE_LIMITS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <net/errno.h> header file. */
|
|
||||||
/* #undef HAVE_NET_ERRNO_H */
|
|
||||||
|
|
||||||
/* Define if you have the <netdb.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_NETDB_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <netinet/in.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_NETINET_IN_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <signal.h> header file. */
|
|
||||||
#define HAVE_SIGNAL_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <strings.h> header file. */
|
|
||||||
#define HAVE_STRINGS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/fcntl.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_FCNTL_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/resource.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_SYS_RESOURCE_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <sys/select.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_SELECT_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/socket.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_SYS_SOCKET_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <sys/stat.h> header file. */
|
|
||||||
#define HAVE_SYS_STAT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/time.h> header file. */
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define HAVE_SYS_TIME_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <sys/types.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_SYS_TYPES_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <sys/uio.h> header file. */
|
|
||||||
#ifdef DECC
|
|
||||||
# define HAVE_SYS_UIO_H 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> 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_ */
|
|
||||||
@@ -877,6 +877,7 @@ const char *trig_types[] = {
|
|||||||
"Door",
|
"Door",
|
||||||
"UNUSED",
|
"UNUSED",
|
||||||
"Time",
|
"Time",
|
||||||
|
"Damage",
|
||||||
"\n"
|
"\n"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
223
src/db.c
223
src/db.c
@@ -44,26 +44,26 @@
|
|||||||
struct config_data config_info; /* Game configuration list. */
|
struct config_data config_info; /* Game configuration list. */
|
||||||
|
|
||||||
struct room_data *world = NULL; /* array of rooms */
|
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 char_data *character_list = NULL; /* global linked list of chars */
|
||||||
struct index_data *mob_index; /* index table for mobile file */
|
struct index_data *mob_index; /* index table for mobile file */
|
||||||
struct char_data *mob_proto; /* prototypes for mobs */
|
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 obj_data *object_list = NULL; /* global linked list of objs */
|
||||||
struct index_data *obj_index; /* index table for object file */
|
struct index_data *obj_index; /* index table for object file */
|
||||||
struct obj_data *obj_proto; /* prototypes for objs */
|
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 */
|
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 */
|
/* begin previously located in players.c */
|
||||||
struct player_index_element *player_table = NULL; /* index to plr file */
|
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_table = NOBODY; /* ref to top of table */
|
||||||
int top_of_p_file = 0; /* ref of size of p file */
|
int top_of_p_file = NOBODY; /* ref of size of p file */
|
||||||
long top_idnum = 0; /* highest idnum in use */
|
long top_idnum = NOBODY; /* highest idnum in use */
|
||||||
/* end previously located in players.c */
|
/* end previously located in players.c */
|
||||||
|
|
||||||
struct message_list fight_messages[MAX_MESSAGES]; /* fighting messages */
|
struct message_list fight_messages[MAX_MESSAGES]; /* fighting messages */
|
||||||
@@ -528,84 +528,91 @@ void destroy_db(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Rooms */
|
/* Rooms */
|
||||||
for (cnt = 0; cnt <= top_of_world; cnt++) {
|
if (top_of_world != NOWHERE) {
|
||||||
if (world[cnt].name)
|
for (cnt = 0; cnt <= top_of_world; cnt++) {
|
||||||
free(world[cnt].name);
|
if (world[cnt].name)
|
||||||
if (world[cnt].description)
|
free(world[cnt].name);
|
||||||
free(world[cnt].description);
|
if (world[cnt].description)
|
||||||
free_extra_descriptions(world[cnt].ex_description);
|
free(world[cnt].description);
|
||||||
|
free_extra_descriptions(world[cnt].ex_description);
|
||||||
|
|
||||||
if (world[cnt].events != NULL) {
|
if (world[cnt].events != NULL) {
|
||||||
if (world[cnt].events->iSize > 0) {
|
if (world[cnt].events->iSize > 0) {
|
||||||
struct event * pEvent;
|
struct event * pEvent;
|
||||||
|
|
||||||
while ((pEvent = simple_list(world[cnt].events)) != NULL)
|
while ((pEvent = simple_list(world[cnt].events)) != NULL)
|
||||||
event_cancel(pEvent);
|
event_cancel(pEvent);
|
||||||
}
|
}
|
||||||
free_list(world[cnt].events);
|
free_list(world[cnt].events);
|
||||||
world[cnt].events = NULL;
|
world[cnt].events = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free any assigned scripts */
|
/* free any assigned scripts */
|
||||||
if (SCRIPT(&world[cnt]))
|
if (SCRIPT(&world[cnt]))
|
||||||
extract_script(&world[cnt], WLD_TRIGGER);
|
extract_script(&world[cnt], WLD_TRIGGER);
|
||||||
/* free script proto list */
|
/* free script proto list */
|
||||||
free_proto_script(&world[cnt], WLD_TRIGGER);
|
free_proto_script(&world[cnt], WLD_TRIGGER);
|
||||||
|
|
||||||
for (itr = 0; itr < NUM_OF_DIRS; itr++) { /* NUM_OF_DIRS here, not DIR_COUNT */
|
for (itr = 0; itr < NUM_OF_DIRS; itr++) { /* NUM_OF_DIRS here, not DIR_COUNT */
|
||||||
if (!world[cnt].dir_option[itr])
|
if (world[cnt].dir_option[itr] == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (world[cnt].dir_option[itr]->general_description)
|
if (world[cnt].dir_option[itr]->general_description)
|
||||||
free(world[cnt].dir_option[itr]->general_description);
|
free(world[cnt].dir_option[itr]->general_description);
|
||||||
if (world[cnt].dir_option[itr]->keyword)
|
if (world[cnt].dir_option[itr]->keyword)
|
||||||
free(world[cnt].dir_option[itr]->keyword);
|
free(world[cnt].dir_option[itr]->keyword);
|
||||||
free(world[cnt].dir_option[itr]);
|
free(world[cnt].dir_option[itr]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
free(world);
|
||||||
|
top_of_world = NOWHERE;
|
||||||
}
|
}
|
||||||
free(world);
|
|
||||||
top_of_world = 0;
|
|
||||||
|
|
||||||
/* Objects */
|
/* Objects */
|
||||||
for (cnt = 0; cnt <= top_of_objt; cnt++) {
|
if (top_of_objt != NOTHING) {
|
||||||
if (obj_proto[cnt].name)
|
for (cnt = 0; cnt <= top_of_objt; cnt++) {
|
||||||
free(obj_proto[cnt].name);
|
if (obj_proto[cnt].name)
|
||||||
if (obj_proto[cnt].description)
|
free(obj_proto[cnt].name);
|
||||||
free(obj_proto[cnt].description);
|
if (obj_proto[cnt].description)
|
||||||
if (obj_proto[cnt].short_description)
|
free(obj_proto[cnt].description);
|
||||||
free(obj_proto[cnt].short_description);
|
if (obj_proto[cnt].short_description)
|
||||||
if (obj_proto[cnt].action_description)
|
free(obj_proto[cnt].short_description);
|
||||||
free(obj_proto[cnt].action_description);
|
if (obj_proto[cnt].action_description)
|
||||||
free_extra_descriptions(obj_proto[cnt].ex_description);
|
free(obj_proto[cnt].action_description);
|
||||||
|
free_extra_descriptions(obj_proto[cnt].ex_description);
|
||||||
|
|
||||||
/* free script proto list */
|
/* free script proto list */
|
||||||
free_proto_script(&obj_proto[cnt], OBJ_TRIGGER);
|
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 */
|
/* Mobiles */
|
||||||
for (cnt = 0; cnt <= top_of_mobt; cnt++) {
|
if (top_of_mobt != NOBODY) {
|
||||||
if (mob_proto[cnt].player.name)
|
for (cnt = 0; cnt <= top_of_mobt; cnt++) {
|
||||||
free(mob_proto[cnt].player.name);
|
if (mob_proto[cnt].player.name)
|
||||||
if (mob_proto[cnt].player.title)
|
free(mob_proto[cnt].player.name);
|
||||||
free(mob_proto[cnt].player.title);
|
if (mob_proto[cnt].player.title)
|
||||||
if (mob_proto[cnt].player.short_descr)
|
free(mob_proto[cnt].player.title);
|
||||||
free(mob_proto[cnt].player.short_descr);
|
if (mob_proto[cnt].player.short_descr)
|
||||||
if (mob_proto[cnt].player.long_descr)
|
free(mob_proto[cnt].player.short_descr);
|
||||||
free(mob_proto[cnt].player.long_descr);
|
if (mob_proto[cnt].player.long_descr)
|
||||||
if (mob_proto[cnt].player.description)
|
free(mob_proto[cnt].player.long_descr);
|
||||||
free(mob_proto[cnt].player.description);
|
if (mob_proto[cnt].player.description)
|
||||||
|
free(mob_proto[cnt].player.description);
|
||||||
|
|
||||||
/* free script proto list */
|
/* free script proto list */
|
||||||
free_proto_script(&mob_proto[cnt], MOB_TRIGGER);
|
free_proto_script(&mob_proto[cnt], MOB_TRIGGER);
|
||||||
|
|
||||||
while (mob_proto[cnt].affected)
|
while (mob_proto[cnt].affected)
|
||||||
affect_remove(&mob_proto[cnt], 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 */
|
/* Shops */
|
||||||
destroy_shops();
|
destroy_shops();
|
||||||
|
|
||||||
@@ -615,26 +622,29 @@ void destroy_db(void)
|
|||||||
/* Zones */
|
/* Zones */
|
||||||
#define THIS_CMD zone_table[cnt].cmd[itr]
|
#define THIS_CMD zone_table[cnt].cmd[itr]
|
||||||
|
|
||||||
for (cnt = 0; cnt <= top_of_zone_table; cnt++) {
|
if (top_of_zone_table != NOWHERE)
|
||||||
if (zone_table[cnt].name)
|
{
|
||||||
free(zone_table[cnt].name);
|
for (cnt = 0; cnt <= top_of_zone_table; cnt++) {
|
||||||
if (zone_table[cnt].builders)
|
if (zone_table[cnt].name)
|
||||||
free(zone_table[cnt].builders);
|
free(zone_table[cnt].name);
|
||||||
if (zone_table[cnt].cmd) {
|
if (zone_table[cnt].builders)
|
||||||
/* first see if any vars were defined in this zone */
|
free(zone_table[cnt].builders);
|
||||||
for (itr = 0;THIS_CMD.command != 'S';itr++)
|
if (zone_table[cnt].cmd) {
|
||||||
if (THIS_CMD.command == 'V') {
|
/* first see if any vars were defined in this zone */
|
||||||
if (THIS_CMD.sarg1)
|
for (itr = 0;THIS_CMD.command != 'S';itr++)
|
||||||
free(THIS_CMD.sarg1);
|
if (THIS_CMD.command == 'V') {
|
||||||
if (THIS_CMD.sarg2)
|
if (THIS_CMD.sarg1)
|
||||||
free(THIS_CMD.sarg2);
|
free(THIS_CMD.sarg1);
|
||||||
}
|
if (THIS_CMD.sarg2)
|
||||||
/* then free the command list */
|
free(THIS_CMD.sarg2);
|
||||||
free(zone_table[cnt].cmd);
|
}
|
||||||
|
/* then free the command list */
|
||||||
|
free(zone_table[cnt].cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
free(zone_table);
|
||||||
|
top_of_zone_table = NOWHERE;
|
||||||
}
|
}
|
||||||
free(zone_table);
|
|
||||||
|
|
||||||
#undef THIS_CMD
|
#undef THIS_CMD
|
||||||
|
|
||||||
/* zone table reset queue */
|
/* zone table reset queue */
|
||||||
@@ -648,27 +658,30 @@ void destroy_db(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Triggers */
|
/* Triggers */
|
||||||
for (cnt=0; cnt < top_of_trigt; cnt++) {
|
if (top_of_trigt != NOTHING)
|
||||||
if (trig_index[cnt]->proto) {
|
{
|
||||||
/* make sure to nuke the command list (memory leak) */
|
for (cnt=0; cnt < top_of_trigt; cnt++) {
|
||||||
/* free_trigger() doesn't free the command list */
|
if (trig_index[cnt]->proto) {
|
||||||
if (trig_index[cnt]->proto->cmdlist) {
|
/* make sure to nuke the command list (memory leak) */
|
||||||
struct cmdlist_element *i, *j;
|
/* free_trigger() doesn't free the command list */
|
||||||
i = trig_index[cnt]->proto->cmdlist;
|
if (trig_index[cnt]->proto->cmdlist) {
|
||||||
while (i) {
|
struct cmdlist_element *i, *j;
|
||||||
j = i->next;
|
i = trig_index[cnt]->proto->cmdlist;
|
||||||
if (i->cmd)
|
while (i) {
|
||||||
free(i->cmd);
|
j = i->next;
|
||||||
free(i);
|
if (i->cmd)
|
||||||
i = j;
|
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 */
|
/* Events */
|
||||||
event_free_all();
|
event_free_all();
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "dg_scripts.h"
|
#include "dg_scripts.h"
|
||||||
|
|
||||||
#define NUM_TRIG_TYPE_FLAGS 20
|
#define NUM_TRIG_TYPE_FLAGS 21
|
||||||
|
|
||||||
/* Submodes of TRIGEDIT connectedness. */
|
/* Submodes of TRIGEDIT connectedness. */
|
||||||
#define TRIGEDIT_MAIN_MENU 0
|
#define TRIGEDIT_MAIN_MENU 0
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
#define MTRIG_DOOR (1 << 17) /* door manipulated in room */
|
#define MTRIG_DOOR (1 << 17) /* door manipulated in room */
|
||||||
|
|
||||||
#define MTRIG_TIME (1 << 19) /* trigger based on game hour */
|
#define MTRIG_TIME (1 << 19) /* trigger based on game hour */
|
||||||
|
#define MTRIG_DAMAGE (1 << 20) /* trigger whenever mob is damaged */
|
||||||
|
|
||||||
/* obj trigger types */
|
/* obj trigger types */
|
||||||
#define OTRIG_GLOBAL (1 << 0) /* unused */
|
#define OTRIG_GLOBAL (1 << 0) /* unused */
|
||||||
@@ -264,6 +265,7 @@ void time_wtrigger(room_data *room);
|
|||||||
|
|
||||||
int login_wtrigger(struct room_data *room, char_data *actor);
|
int login_wtrigger(struct room_data *room, char_data *actor);
|
||||||
|
|
||||||
|
int damage_mtrigger(char_data *ch, char_data *victim, int dam, int attacktype);
|
||||||
/* function prototypes from dg_scripts.c */
|
/* function prototypes from dg_scripts.c */
|
||||||
ACMD(do_attach) ;
|
ACMD(do_attach) ;
|
||||||
ACMD(do_detach);
|
ACMD(do_detach);
|
||||||
|
|||||||
@@ -554,6 +554,33 @@ int cast_mtrigger(char_data *actor, char_data *ch, int spellnum)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int damage_mtrigger(char_data *actor, char_data *victim, int dam, int attacktype)
|
||||||
|
{
|
||||||
|
trig_data *t;
|
||||||
|
char buf[MAX_INPUT_LENGTH];
|
||||||
|
|
||||||
|
if (victim == NULL)
|
||||||
|
return dam;
|
||||||
|
|
||||||
|
if (!SCRIPT_CHECK(victim, MTRIG_DAMAGE) || AFF_FLAGGED(victim, AFF_CHARM))
|
||||||
|
return dam;
|
||||||
|
|
||||||
|
for (t = TRIGGERS(SCRIPT(victim)); t; t = t->next) {
|
||||||
|
if (TRIGGER_CHECK(t, MTRIG_DAMAGE) &&
|
||||||
|
(rand_number(1, 100) <= GET_TRIG_NARG(t))) {
|
||||||
|
ADD_UID_VAR(buf, t, char_script_id(actor), "actor", 0);
|
||||||
|
ADD_UID_VAR(buf, t, char_script_id(victim), "victim", 0);
|
||||||
|
sprintf(buf, "%d", dam);
|
||||||
|
add_var(&GET_TRIG_VARS(t), "damage", buf, 0);
|
||||||
|
add_var(&GET_TRIG_VARS(t), "attacktype", skill_name(attacktype), 0);
|
||||||
|
return script_driver(&victim, t, MOB_TRIGGER, TRIG_NEW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return dam;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int leave_mtrigger(char_data *actor, int dir)
|
int leave_mtrigger(char_data *actor, int dir)
|
||||||
{
|
{
|
||||||
trig_data *t;
|
trig_data *t;
|
||||||
|
|||||||
@@ -620,6 +620,11 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
|||||||
if (!IS_NPC(victim) && ((GET_LEVEL(victim) >= LVL_IMMORT) && PRF_FLAGGED(victim, PRF_NOHASSLE)))
|
if (!IS_NPC(victim) && ((GET_LEVEL(victim) >= LVL_IMMORT) && PRF_FLAGGED(victim, PRF_NOHASSLE)))
|
||||||
dam = 0;
|
dam = 0;
|
||||||
|
|
||||||
|
dam = damage_mtrigger(ch, victim, dam, attacktype);
|
||||||
|
if (dam == -1) {
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
if (victim != ch) {
|
if (victim != ch) {
|
||||||
/* Start the attacker fighting the victim */
|
/* Start the attacker fighting the victim */
|
||||||
if (GET_POS(ch) > POS_STUNNED && (FIGHTING(ch) == NULL))
|
if (GET_POS(ch) > POS_STUNNED && (FIGHTING(ch) == NULL))
|
||||||
|
|||||||
@@ -592,14 +592,16 @@ int get_number(char **name)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *ppos;
|
char *ppos;
|
||||||
char number[MAX_INPUT_LENGTH];
|
char number[MAX_INPUT_LENGTH], tmp[MAX_INPUT_LENGTH];
|
||||||
|
|
||||||
*number = '\0';
|
*number = '\0';
|
||||||
|
|
||||||
if ((ppos = strchr(*name, '.')) != NULL) {
|
if ((ppos = strchr(*name, '.')) != NULL) {
|
||||||
*ppos++ = '\0';
|
*ppos++ = '\0';
|
||||||
strlcpy(number, *name, sizeof(number));
|
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++)
|
for (i = 0; *(number + i); i++)
|
||||||
if (!isdigit(*(number + i)))
|
if (!isdigit(*(number + i)))
|
||||||
|
|||||||
90
src/main.c
Normal file
90
src/main.c
Normal file
@@ -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 <mcheck.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CIRCLE_MACINTOSH /* Includes for the Macintosh */
|
||||||
|
# define SIGPIPE 13
|
||||||
|
# define SIGALRM 14
|
||||||
|
/* GUSI headers */
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
/* Codewarrior dependant */
|
||||||
|
# include <SIOUX.h>
|
||||||
|
# include <console.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CIRCLE_WINDOWS /* Includes for Win32 */
|
||||||
|
# ifdef __BORLANDC__
|
||||||
|
# include <dir.h>
|
||||||
|
# else /* MSVC */
|
||||||
|
# include <direct.h>
|
||||||
|
# include <winsock.h>
|
||||||
|
# endif
|
||||||
|
# include <mmsystem.h>
|
||||||
|
#endif /* CIRCLE_WINDOWS */
|
||||||
|
|
||||||
|
#ifdef CIRCLE_AMIGA /* Includes for the Amiga */
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
# include <clib/socket_protos.h>
|
||||||
|
#endif /* CIRCLE_AMIGA */
|
||||||
|
|
||||||
|
#ifdef CIRCLE_ACORN /* Includes for the Acorn (RiscOS) */
|
||||||
|
# include <socklib.h>
|
||||||
|
# include <inetlib.h>
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ARPA_TELNET_H
|
||||||
|
#include <arpa/telnet.h>
|
||||||
|
#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);
|
||||||
|
}
|
||||||
1
src/munit
Submodule
1
src/munit
Submodule
Submodule src/munit added at fbbdf1467e
@@ -146,7 +146,8 @@ static void prefedit_disp_main_menu(struct descriptor_data *d)
|
|||||||
"%sImmortal Preferences\r\n"
|
"%sImmortal Preferences\r\n"
|
||||||
"%s1%s) Syslog Level %s[%s%8s%s] %s4%s) ClsOLC %s[%s%3s%s]\r\n"
|
"%s1%s) Syslog Level %s[%s%8s%s] %s4%s) ClsOLC %s[%s%3s%s]\r\n"
|
||||||
"%s2%s) Show Flags %s[%s%3s%s] %s5%s) No WizNet %s[%s%3s%s]\r\n"
|
"%s2%s) Show Flags %s[%s%3s%s] %s5%s) No WizNet %s[%s%3s%s]\r\n"
|
||||||
"%s3%s) No Hassle %s[%s%3s%s] %s6%s) Holylight %s[%s%3s%s]\r\n",
|
"%s3%s) No Hassle %s[%s%3s%s] %s6%s) Holylight %s[%s%3s%s]\r\n"
|
||||||
|
"%s7%s) Verbose %s[%s%3s%s] ",
|
||||||
CBWHT(d->character, C_NRM),
|
CBWHT(d->character, C_NRM),
|
||||||
/* Line 1 - syslog and clsolc */
|
/* Line 1 - syslog and clsolc */
|
||||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||||
@@ -159,12 +160,17 @@ static void prefedit_disp_main_menu(struct descriptor_data *d)
|
|||||||
/* Line 3 - nohassle and holylight */
|
/* Line 3 - nohassle and holylight */
|
||||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||||
ONOFF(PREFEDIT_FLAGGED(PRF_NOHASSLE)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM),
|
ONOFF(PREFEDIT_FLAGGED(PRF_NOHASSLE)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM),
|
||||||
CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_HOLYLIGHT)), CCCYN(d->character, C_NRM)
|
CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_HOLYLIGHT)), CCCYN(d->character, C_NRM),
|
||||||
|
/* Line 4 - Verbose */
|
||||||
|
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||||
|
ONOFF(PREFEDIT_FLAGGED(PRF_VERBOSE)), CCCYN(d->character, C_NRM)
|
||||||
);
|
);
|
||||||
if (GET_LEVEL(PREFEDIT_GET_CHAR) == LVL_IMPL)
|
if (GET_LEVEL(PREFEDIT_GET_CHAR) == LVL_IMPL)
|
||||||
send_to_char(d->character, "%s7%s) Zone Resets %s[%s%3s%s]\r\n",
|
send_to_char(d->character, "%s8%s) Zone Resets %s[%s%3s%s]\r\n",
|
||||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||||
ONOFF(PREFEDIT_FLAGGED(PRF_ZONERESETS)), CCCYN(d->character, C_NRM));
|
ONOFF(PREFEDIT_FLAGGED(PRF_ZONERESETS)), CCCYN(d->character, C_NRM));
|
||||||
|
else
|
||||||
|
send_to_char(d->character, "\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finishing Off */
|
/* Finishing Off */
|
||||||
@@ -505,7 +511,19 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '7':
|
case '7':
|
||||||
|
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT)
|
||||||
|
{
|
||||||
|
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
||||||
|
prefedit_disp_main_menu(d);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_VERBOSE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '8':
|
||||||
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMPL)
|
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMPL)
|
||||||
{
|
{
|
||||||
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
||||||
@@ -901,6 +919,10 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
|
|||||||
if (PREFEDIT_FLAGGED(PRF_AUTODOOR))
|
if (PREFEDIT_FLAGGED(PRF_AUTODOOR))
|
||||||
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTODOOR);
|
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTODOOR);
|
||||||
|
|
||||||
|
/* PRF_VERBOSE - On */
|
||||||
|
if (PREFEDIT_FLAGGED(PRF_VERBOSE))
|
||||||
|
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_VERBOSE);
|
||||||
|
|
||||||
/* Other (non-toggle) options */
|
/* Other (non-toggle) options */
|
||||||
PREFEDIT_GET_WIMP_LEV = 0; /* Wimpy off by default */
|
PREFEDIT_GET_WIMP_LEV = 0; /* Wimpy off by default */
|
||||||
PREFEDIT_GET_PAGELENGTH = 22; /* Default telnet screen is 22 lines */
|
PREFEDIT_GET_PAGELENGTH = 22; /* Default telnet screen is 22 lines */
|
||||||
|
|||||||
@@ -1768,7 +1768,26 @@ static void PerformSubnegotiation( descriptor_t *apDescriptor, char aCmd, char *
|
|||||||
Write(apDescriptor, RequestTTYPE);
|
Write(apDescriptor, RequestTTYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( PrefixString("Mudlet", pClientName) )
|
if ( PrefixString("MTTS ", pClientName) )
|
||||||
|
{
|
||||||
|
pProtocol->pVariables[eMSDP_CLIENT_VERSION]->ValueInt = atoi(pClientName+5);
|
||||||
|
|
||||||
|
if (pProtocol->pVariables[eMSDP_CLIENT_VERSION]->ValueInt & 1)
|
||||||
|
{
|
||||||
|
pProtocol->pVariables[eMSDP_ANSI_COLORS]->ValueInt = 1;
|
||||||
|
}
|
||||||
|
if (pProtocol->pVariables[eMSDP_CLIENT_VERSION]->ValueInt & 4)
|
||||||
|
{
|
||||||
|
pProtocol->pVariables[eMSDP_UTF_8]->ValueInt = 1;
|
||||||
|
}
|
||||||
|
if (pProtocol->pVariables[eMSDP_CLIENT_VERSION]->ValueInt & 8)
|
||||||
|
{
|
||||||
|
pProtocol->pVariables[eMSDP_XTERM_256_COLORS]->ValueInt = 1;
|
||||||
|
pProtocol->b256Support = eYES;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if ( PrefixString("Mudlet", pClientName) )
|
||||||
{
|
{
|
||||||
/* Mudlet beta 15 and later supports 256 colours, but we can't
|
/* Mudlet beta 15 and later supports 256 colours, but we can't
|
||||||
* identify it from the mud - everything prior to 1.1 claims
|
* identify it from the mud - everything prior to 1.1 claims
|
||||||
|
|||||||
@@ -262,9 +262,10 @@
|
|||||||
#define PRF_AUTOMAP 31 /**< Show map at the side of room descs */
|
#define PRF_AUTOMAP 31 /**< Show map at the side of room descs */
|
||||||
#define PRF_AUTOKEY 32 /**< Automatically unlock locked doors when opening */
|
#define PRF_AUTOKEY 32 /**< Automatically unlock locked doors when opening */
|
||||||
#define PRF_AUTODOOR 33 /**< Use the next available door */
|
#define PRF_AUTODOOR 33 /**< Use the next available door */
|
||||||
#define PRF_ZONERESETS 34
|
#define PRF_ZONERESETS 34 /**< Show when zones reset */
|
||||||
|
#define PRF_VERBOSE 35 /**< Listings like where are more verbose */
|
||||||
/** Total number of available PRF flags */
|
/** Total number of available PRF flags */
|
||||||
#define NUM_PRF_FLAGS 35
|
#define NUM_PRF_FLAGS 36
|
||||||
|
|
||||||
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
||||||
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
||||||
|
|||||||
80
src/test/Makefile
Normal file
80
src/test/Makefile
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
# 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 -g
|
||||||
|
CFLAGS+=-Wl,--wrap=send_to_char,--wrap=vwrite_to_output
|
||||||
|
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_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_FROM_MUNIT) $(OBJ_FILES_FROM_TESTS) $(LIBS)
|
||||||
|
|
||||||
|
testrunner: $(OBJ_FILES)
|
||||||
|
$(CC) $(CFLAGS) -o testrunner $(OBJ_FILES)
|
||||||
|
|
||||||
|
test: testrunner
|
||||||
|
$(TEST_ENV) ./testrunner
|
||||||
|
|
||||||
|
debug: testrunner
|
||||||
|
$(TEST_ENV) gdb -q --args ./testrunner --no-fork
|
||||||
|
|
||||||
|
|
||||||
|
$%.o: %.c
|
||||||
|
$(CC) $< $(CFLAGS) -c -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o testrunner depend
|
||||||
|
all: test
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
depend:
|
||||||
|
$(CC) -MM *.c > depend
|
||||||
|
|
||||||
|
-include depend
|
||||||
47
src/test/README.md
Normal file
47
src/test/README.md
Normal file
@@ -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`
|
||||||
|
|
||||||
53
src/test/test.act.item.c
Normal file
53
src/test/test.act.item.c
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#include "test.act.item.h"
|
||||||
|
|
||||||
|
|
||||||
|
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 = strdup("ring");
|
||||||
|
ring1->short_description = strdup("ring1");
|
||||||
|
|
||||||
|
obj_data *ring2 = create_obj();
|
||||||
|
ring2->name = strdup("ring");
|
||||||
|
ring2->short_description = strdup("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);
|
||||||
|
munit_assert_ptr_equal(ch->carrying->next, ring1);
|
||||||
|
|
||||||
|
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[] = {
|
||||||
|
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 }
|
||||||
|
};
|
||||||
|
|
||||||
10
src/test/test.act.item.h
Normal file
10
src/test/test.act.item.h
Normal file
@@ -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
|
||||||
14
src/test/test.example.c
Normal file
14
src/test/test.example.c
Normal file
@@ -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 }
|
||||||
|
};
|
||||||
10
src/test/test.example.h
Normal file
10
src/test/test.example.h
Normal file
@@ -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
|
||||||
46
src/test/test.fixtures.c
Normal file
46
src/test/test.fixtures.c
Normal file
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
34
src/test/test.fixtures.h
Normal file
34
src/test/test.fixtures.h
Normal file
@@ -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 <stdarg.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <setjmp.h>
|
||||||
|
#include <cmocka.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* test fixtures
|
||||||
|
*/
|
||||||
|
char_data *get_test_char();
|
||||||
|
|
||||||
|
void simple_world();
|
||||||
|
void add_test_char(room_rnum target_room);
|
||||||
|
|
||||||
|
#endif //TEST_FIXTURES_H
|
||||||
34
src/test/test.handler.c
Normal file
34
src/test/test.handler.c
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#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("2.feat", "feat", 2);
|
||||||
|
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[] = {
|
||||||
|
STD_TEST("/get_number", test_get_number),
|
||||||
|
{ NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL }
|
||||||
|
};
|
||||||
10
src/test/test.handler.h
Normal file
10
src/test/test.handler.h
Normal file
@@ -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
|
||||||
57
src/test/testrunner.c
Normal file
57
src/test/testrunner.c
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
#include "testrunner.h"
|
||||||
|
#include "test.handler.h"
|
||||||
|
#include "test.act.item.h"
|
||||||
|
#include "test.example.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 },
|
||||||
|
{ "/test.example.c", test_example_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)]) {
|
||||||
|
logfile = stderr;
|
||||||
|
return munit_suite_main(&test_suite, (void*) "µnit", argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
29
src/test/testrunner.h
Normal file
29
src/test/testrunner.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#ifndef TESTRUNNER_H
|
||||||
|
#define TESTRUNNER_H
|
||||||
|
|
||||||
|
#include "test.fixtures.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 }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 *get_last_messages();
|
||||||
|
|
||||||
|
#endif
|
||||||
46
src/util/CMakeLists.txt
Normal file
46
src/util/CMakeLists.txt
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
set(TOOLS
|
||||||
|
asciipasswd
|
||||||
|
autowiz
|
||||||
|
plrtoascii
|
||||||
|
rebuildIndex
|
||||||
|
rebuildMailIndex
|
||||||
|
shopconv
|
||||||
|
sign
|
||||||
|
split
|
||||||
|
wld2html
|
||||||
|
webster
|
||||||
|
)
|
||||||
|
|
||||||
|
# common includes and flags
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||||
|
add_definitions(-DCIRCLE_UTIL)
|
||||||
|
|
||||||
|
find_library(CRYPT_LIBRARY crypt)
|
||||||
|
find_library(NETLIB_LIBRARY nsl socket) # for sign.c, hvis nødvendig
|
||||||
|
|
||||||
|
foreach(tool ${TOOLS})
|
||||||
|
if(${tool} STREQUAL "rebuildIndex")
|
||||||
|
add_executable(rebuildIndex rebuildAsciiIndex.c)
|
||||||
|
else()
|
||||||
|
add_executable(${tool} ${tool}.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Set output location
|
||||||
|
set_target_properties(${tool} PROPERTIES
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin
|
||||||
|
)
|
||||||
|
|
||||||
|
# Link to libcrypt for asciipasswd
|
||||||
|
if(${tool} STREQUAL "asciipasswd" AND CRYPT_LIBRARY)
|
||||||
|
target_link_libraries(${tool} ${CRYPT_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Link to netlib for sign
|
||||||
|
if(${tool} STREQUAL "sign" AND NETLIB_LIBRARY)
|
||||||
|
target_link_libraries(${tool} ${NETLIB_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_custom_target(utils DEPENDS ${TOOLS})
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ CFLAGS = @CFLAGS@ $(MYFLAGS) $(PROFILE) -I$(INCDIR)
|
|||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
all: $(BINDIR)/asciipasswd $(BINDIR)/autowiz $(BINDIR)/plrtoascii $(BINDIR)/rebuildIndex $(BINDIR)/rebuildMailIndex $(BINDIR)/shopconv $(BINDIR)/sign $(BINDIR)/split $(BINDIR)/wld2html $(BINDIR)/webster
|
all: $(BINDIR)/asciipasswd $(BINDIR)/autowiz $(BINDIR)/plrtoascii $(BINDIR)/rebuildIndex $(BINDIR)/rebuildMailIndex $(BINDIR)/shopconv $(BINDIR)/sign $(BINDIR)/split $(BINDIR)/wld2html
|
||||||
|
|
||||||
asciipasswd: $(BINDIR)/asciipasswd
|
asciipasswd: $(BINDIR)/asciipasswd
|
||||||
|
|
||||||
@@ -43,8 +43,6 @@ split: $(BINDIR)/split
|
|||||||
|
|
||||||
wld2html: $(BINDIR)/wld2html
|
wld2html: $(BINDIR)/wld2html
|
||||||
|
|
||||||
webster: $(BINDIR)/webster
|
|
||||||
|
|
||||||
$(BINDIR)/asciipasswd: asciipasswd.c
|
$(BINDIR)/asciipasswd: asciipasswd.c
|
||||||
$(CC) $(CFLAGS) -o $(BINDIR)/asciipasswd asciipasswd.c @CRYPTLIB@
|
$(CC) $(CFLAGS) -o $(BINDIR)/asciipasswd asciipasswd.c @CRYPTLIB@
|
||||||
|
|
||||||
@@ -72,9 +70,6 @@ $(BINDIR)/split: split.c
|
|||||||
$(BINDIR)/wld2html: wld2html.c
|
$(BINDIR)/wld2html: wld2html.c
|
||||||
$(CC) $(CFLAGS) -o $(BINDIR)/wld2html wld2html.c
|
$(CC) $(CFLAGS) -o $(BINDIR)/wld2html wld2html.c
|
||||||
|
|
||||||
$(BINDIR)/webster: webster.c
|
|
||||||
$(CC) $(CFLAGS) -o $(BINDIR)/webster webster.c
|
|
||||||
|
|
||||||
# Dependencies for the object files (automagically generated with
|
# Dependencies for the object files (automagically generated with
|
||||||
# gcc -MM)
|
# gcc -MM)
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ void read_file(void)
|
|||||||
while (get_line(fl, line))
|
while (get_line(fl, line))
|
||||||
if (*line != '~')
|
if (*line != '~')
|
||||||
recs++;
|
recs++;
|
||||||
rewind(fl);
|
rewind(fl);
|
||||||
|
|
||||||
for (i = 0; i < recs; i++) {
|
for (i = 0; i < recs; i++) {
|
||||||
get_line(fl, line);
|
get_line(fl, line);
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ static int boot_the_shops_conv(FILE * shop_f, FILE * newshop_f, char *filename)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
FILE *sfp, *nsfp;
|
FILE *sfp, *nsfp;
|
||||||
char fn[256], part[256];
|
char fn[120], part[256];
|
||||||
int result, index, i;
|
int result, index, i;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
@@ -173,20 +173,20 @@ int main(int argc, char *argv[])
|
|||||||
perror(fn);
|
perror(fn);
|
||||||
} else {
|
} else {
|
||||||
if ((nsfp = fopen(fn, "w")) == NULL) {
|
if ((nsfp = fopen(fn, "w")) == NULL) {
|
||||||
printf("Error writing to %s.\n", fn);
|
printf("Error writing to %s.\n", fn);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf("%s:\n", fn);
|
printf("%s:\n", fn);
|
||||||
result = boot_the_shops_conv(sfp, nsfp, fn);
|
result = boot_the_shops_conv(sfp, nsfp, fn);
|
||||||
fclose(nsfp);
|
fclose(nsfp);
|
||||||
fclose(sfp);
|
fclose(sfp);
|
||||||
if (result) {
|
if (result) {
|
||||||
sprintf(part, "mv %s.tmp %s", fn, fn);
|
sprintf(part, "mv %s.tmp %s", fn, fn);
|
||||||
i = system(part);
|
i = system(part);
|
||||||
} else {
|
} else {
|
||||||
sprintf(part, "mv %s.tmp %s.bak", fn, fn);
|
sprintf(part, "mv %s.tmp %s.bak", fn, fn);
|
||||||
i = system(part);
|
i = system(part);
|
||||||
printf("Done!\n");
|
printf("Done!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,175 +0,0 @@
|
|||||||
/* ************************************************************************
|
|
||||||
* File: webster.c Part of tbaMUD *
|
|
||||||
* Usage: Use an online dictionary via tell m-w <word>. *
|
|
||||||
* *
|
|
||||||
* Based on the Circle 3.0 syntax checker and wld2html programs. *
|
|
||||||
************************************************************************ */
|
|
||||||
|
|
||||||
#define log(msg) fprintf(stderr, "%s\n", msg)
|
|
||||||
|
|
||||||
#include "conf.h"
|
|
||||||
#include "sysdep.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define MEM_USE 10000
|
|
||||||
char buf[MEM_USE];
|
|
||||||
|
|
||||||
int get_line(FILE * fl, char *buf);
|
|
||||||
void skip_spaces(char **string);
|
|
||||||
void parse_webster_html(char *arg);
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int pid = 0;
|
|
||||||
if (argc != 3) {
|
|
||||||
return 0; /* no word/pid given */
|
|
||||||
}
|
|
||||||
pid = atoi(argv[2]);
|
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf),
|
|
||||||
"lynx -accept_all_cookies -source http://www.thefreedictionary.com/%s"
|
|
||||||
" >webster.html", argv[1]);
|
|
||||||
system(buf);
|
|
||||||
|
|
||||||
parse_webster_html(argv[1]);
|
|
||||||
|
|
||||||
if (pid)
|
|
||||||
kill(pid, SIGUSR2);
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void parse_webster_html(char *arg) {
|
|
||||||
FILE *infile, *outfile;
|
|
||||||
char scanbuf[MEM_USE], outline[MEM_USE], *p, *q;
|
|
||||||
|
|
||||||
outfile = fopen("websterinfo", "w");
|
|
||||||
if (!outfile)
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
infile = fopen("webster.html", "r");
|
|
||||||
if (!infile) {
|
|
||||||
fprintf(outfile, "A bug has occured in webster. (no webster.html) Please notify Welcor.");
|
|
||||||
fclose(outfile);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
unlink("webster.html"); /* We can still read */
|
|
||||||
|
|
||||||
for ( ; get_line(infile, buf)!=0; ) {
|
|
||||||
|
|
||||||
if (strncmp(buf, "<script>write_ads(AdsNum, 0, 1)</script>", 40) != 0)
|
|
||||||
continue; // read until we hit the line with results in it.
|
|
||||||
|
|
||||||
p = buf+40;
|
|
||||||
|
|
||||||
if (strncmp(p, "<br>", 4) == 0)
|
|
||||||
{
|
|
||||||
fprintf(outfile, "That word could not be found.\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
else if (strncmp(p, "<div ", 5) == 0) // definition is here, all in one line.
|
|
||||||
{
|
|
||||||
while (strncmp(p, "ds-list", 7)) //seek to the definition
|
|
||||||
p++;
|
|
||||||
|
|
||||||
strncpy(scanbuf, p, sizeof(scanbuf)); // strtok on a copy.
|
|
||||||
|
|
||||||
p = strtok(scanbuf, ">"); // chop the line at the end of tags: <br><b>word</b> becomes "<br" "<b" "word</b"
|
|
||||||
p = strtok(NULL, ">"); // skip the rest of this tag.
|
|
||||||
|
|
||||||
fprintf(outfile, "Info on: %s\n\n", arg);
|
|
||||||
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
q = outline;
|
|
||||||
|
|
||||||
while (*p != '<')
|
|
||||||
{
|
|
||||||
assert(p < scanbuf+sizeof(scanbuf));
|
|
||||||
*q++ = *p++;
|
|
||||||
}
|
|
||||||
if (!strncmp(p, "<br", 3) || !strncmp(p, "<p", 2) || !strncmp(p, "<div class=\"ds-list\"", 23) || !strncmp(p, "<div class=\"sds-list\"", 24))
|
|
||||||
*q++ = '\n';
|
|
||||||
// if it's not a <br> tag or a <div class="sds-list"> or <div class="ds-list"> tag, ignore it.
|
|
||||||
|
|
||||||
*q++='\0';
|
|
||||||
fprintf(outfile, "%s", outline);
|
|
||||||
|
|
||||||
if (!strncmp(p, "</table", 7))
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
p = strtok(NULL, ">");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (strncmp(p, "<div>", 5) == 0) // not found, but suggestions are ample:
|
|
||||||
{
|
|
||||||
strncpy(scanbuf, p, sizeof(scanbuf)); // strtok on a copy.
|
|
||||||
|
|
||||||
p = strtok(scanbuf, ">"); // chop the line at the end of tags: <br><b>word</b> becomes "<br>" "<b>" "word</b>"
|
|
||||||
p = strtok(NULL, ">"); // skip the rest of this tag.
|
|
||||||
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
q = outline;
|
|
||||||
|
|
||||||
while (*p != '<')
|
|
||||||
*q++ = *p++;
|
|
||||||
|
|
||||||
if (!strncmp(p, "<td ", 4))
|
|
||||||
*q++ = '\n';
|
|
||||||
// if it's not a <td> tag, ignore it.
|
|
||||||
|
|
||||||
*q++='\0';
|
|
||||||
fprintf(outfile, "%s", outline);
|
|
||||||
|
|
||||||
if (!strncmp(p, "</table", 7))
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
p = strtok(NULL, ">");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// weird.. one of the above should be correct.
|
|
||||||
fprintf(outfile, "It would appear that the free online dictionary has changed their format.\n"
|
|
||||||
"Sorry, but you might need a webrowser instead.\n\n"
|
|
||||||
"See http://www.thefreedictionary.com/%s", arg);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
end:
|
|
||||||
fclose(infile);
|
|
||||||
|
|
||||||
fprintf(outfile, "~");
|
|
||||||
fclose(outfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get_line reads the next non-blank line off of the input stream.
|
|
||||||
* The newline character is removed from the input.
|
|
||||||
*/
|
|
||||||
int get_line(FILE * fl, char *buf)
|
|
||||||
{
|
|
||||||
char temp[MEM_USE];
|
|
||||||
|
|
||||||
do {
|
|
||||||
fgets(temp, MEM_USE, fl);
|
|
||||||
if (*temp)
|
|
||||||
temp[strlen(temp) - 1] = '\0';
|
|
||||||
} while (!feof(fl) && !*temp);
|
|
||||||
|
|
||||||
if (feof(fl))
|
|
||||||
return (0);
|
|
||||||
else {
|
|
||||||
strcpy(buf, temp);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Function to skip over the leading spaces of a string.
|
|
||||||
*/
|
|
||||||
void skip_spaces(char **string)
|
|
||||||
{
|
|
||||||
for (; **string && isspace(**string); (*string)++);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user