mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-30 04:41:51 +02:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e0668d4f8 | |||
| 13c6f6291c | |||
| 73bda79fe6 | |||
| d810782392 | |||
| 063bd86a69 | |||
| 2ef139a7d4 | |||
| 04a99b3ebf | |||
| b77f4ad3ca | |||
| 9343e38860 | |||
| 48030f3c2f | |||
| 83d109e7ae | |||
| 6566ad5164 | |||
| fff58ccab3 | |||
| 552461df51 | |||
| 10251814f6 | |||
| d4089c58e8 | |||
| a465860553 | |||
| b9f49478a3 | |||
| 171381f0ea | |||
| dbd6bfc103 | |||
| 1dfbe0fa83 | |||
| 039e45c5ef | |||
| 862c887b54 | |||
| 8548bbea99 | |||
| 28622d9fe2 | |||
| ce423e919f | |||
| 6b2d800c53 | |||
| 0d5d2bc435 | |||
| 4e1680db1a |
@@ -6,6 +6,11 @@ on:
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -13,14 +18,18 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: download munit
|
||||
run: git submodule init && git submodule update
|
||||
- name: install cmocka
|
||||
run: sudo apt install -y libcmocka-dev
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: build tests
|
||||
run: cd src && touch .accepted && make test
|
||||
- name: build
|
||||
run: cd src && touch .accepted && make clean && make all
|
||||
|
||||
working-directory: src
|
||||
run: touch .accepted && make
|
||||
- name: test
|
||||
working-directory: tests
|
||||
run: make test
|
||||
- name: publish test results
|
||||
uses: dorny/test-reporter@v1
|
||||
if: always()
|
||||
with:
|
||||
name: Unity Tests
|
||||
path: tests/test-results/*.xml
|
||||
reporter: java-junit
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
- cron: '42 10 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
- language: c-cpp
|
||||
build-mode: manual
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- name: Run manual build steps
|
||||
if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
./configure
|
||||
cd src && touch .accepted && make
|
||||
exit
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
+8
-3
@@ -7,12 +7,11 @@ config.status
|
||||
src/Makefile
|
||||
src/conf.h
|
||||
src/util/Makefile
|
||||
tests/Makefile
|
||||
src/.accepted
|
||||
src/depend
|
||||
src/util/depend
|
||||
build/*
|
||||
!build/create_solution.bat
|
||||
!build/README.md
|
||||
|
||||
# Do not commit files from players
|
||||
lib/plrfiles/A-E/*
|
||||
@@ -87,7 +86,6 @@ src/test/testfile
|
||||
.idea
|
||||
.cproject
|
||||
|
||||
|
||||
# macOS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
@@ -96,3 +94,10 @@ src/test/testfile
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Unit test binaries (built artifacts)
|
||||
tests/test_utils
|
||||
tests/test_random
|
||||
tests/test_interpreter
|
||||
tests/test_class
|
||||
tests/test-results/
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "src/munit"]
|
||||
path = src/munit
|
||||
url = https://github.com/nemequ/munit.git
|
||||
@@ -0,0 +1,14 @@
|
||||
# To initialize the repository:
|
||||
|
||||
Run these commands from the project directory.
|
||||
|
||||
```shell
|
||||
./configure && touch src/.accepted # the src/.accepted file must exist to build.
|
||||
```
|
||||
|
||||
# To build the code:
|
||||
|
||||
```shell
|
||||
cd src # make must be run from the src dir
|
||||
make # builds all changed source files.
|
||||
```
|
||||
@@ -400,6 +400,7 @@ add_executable(circle ${SRC_FILES})
|
||||
target_link_libraries(circle ${EXTRA_LIBS})
|
||||
|
||||
add_subdirectory(src/util)
|
||||
add_subdirectory(tests)
|
||||
|
||||
if (MEMORY_DEBUG)
|
||||
message(STATUS "MEMORY_DEBUG is activated, setting up zmalloc")
|
||||
|
||||
@@ -1,21 +1,34 @@
|
||||
Files for tbaMUD.
|
||||
|
||||
---
|
||||
## Unit Tests
|
||||
|
||||
## To build
|
||||
tbaMUD ships with a C unit-test suite located in the `tests/` directory.
|
||||
The suite uses the [Unity](https://github.com/ThrowTheSwitch/Unity) test
|
||||
framework (vendored under `tests/vendor/unity/`).
|
||||
|
||||
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.
|
||||
### Quick start
|
||||
|
||||
Read more in the doc/ folder
|
||||
```
|
||||
./configure
|
||||
cd tests && make test
|
||||
```
|
||||
|
||||
## To run the tests
|
||||
`make test` builds each test binary, runs it, and writes JUnit XML results to
|
||||
`tests/test-results/`. A summary is printed to the terminal:
|
||||
|
||||
1. clone the munit library into src/munit. It is registered as a submodule in git
|
||||
```
|
||||
[PASS] test_utils
|
||||
[PASS] test_random
|
||||
[PASS] test_interpreter
|
||||
[PASS] test_class
|
||||
```
|
||||
|
||||
`git submodule init && git submodule update`
|
||||
### CI
|
||||
|
||||
The GitHub Actions workflow (`.github/workflows/build.yml`) runs `make test`
|
||||
on every push and pull request against `master` and publishes a formatted
|
||||
report via the `dorny/test-reporter` action.
|
||||
|
||||
See [doc/testing.md](doc/testing.md) for full details on adding new tests and
|
||||
understanding the test infrastructure.
|
||||
|
||||
2. install the cmocka-library: `sudo apt install libcmocka-dev`
|
||||
3. `./config.status && cd src && make test`
|
||||
+1
-1
@@ -210,6 +210,6 @@ AC_CHECK_PROTO(unlink)
|
||||
AC_CHECK_PROTO(vsnprintf)
|
||||
AC_CHECK_PROTO(write)
|
||||
|
||||
AC_OUTPUT(src/Makefile src/util/Makefile)
|
||||
AC_OUTPUT(src/Makefile src/util/Makefile tests/Makefile)
|
||||
#
|
||||
echo "Configuration completed. To compile, type: cd src; make"
|
||||
|
||||
@@ -5711,7 +5711,7 @@ EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"src/Makefile src/util/Makefile"}
|
||||
CONFIG_FILES=\${CONFIG_FILES-"src/Makefile src/util/Makefile tests/Makefile"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
|
||||
+2
-2
@@ -700,8 +700,8 @@ trigger variables.
|
||||
4.15. I want to expand the ability to pk in my MUD, allowing ASSASSINS
|
||||
that'll be able to PK without getting flagged. How can I do this?
|
||||
|
||||
With tbaMUD simply enter Cedit (configuration editor) and select Game Play
|
||||
Options. Then enable Player Killing.
|
||||
With tbaMUD simply enter Cedit (configuration editor), select Game Play
|
||||
(G). Select Player Killing Allowed (A) and choose (3) 'Free for all!'.
|
||||
|
||||
4.16. Why does it say ``Connection closed by foreign host.'' and not
|
||||
display the ``Byebye!'' message I'm trying to send before cutting
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
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.
|
||||
@@ -0,0 +1,87 @@
|
||||
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
|
||||
@@ -0,0 +1,66 @@
|
||||
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
|
||||
@@ -0,0 +1,70 @@
|
||||
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
|
||||
@@ -0,0 +1,81 @@
|
||||
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.
|
||||
@@ -0,0 +1,23 @@
|
||||
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.
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
# tbaMUD Unit Testing
|
||||
|
||||
_Updated 2026-04_
|
||||
|
||||
## Overview
|
||||
|
||||
tbaMUD has a C unit-test suite built on the
|
||||
[Unity](https://github.com/ThrowTheSwitch/Unity) framework. Tests live in the
|
||||
`tests/` directory alongside the vendored Unity source.
|
||||
|
||||
```
|
||||
tests/
|
||||
Makefile.in – Autoconf template; processed by configure
|
||||
test_stubs.c – Weak-symbol stubs that satisfy mud headers
|
||||
unity_to_junit.py – Converts Unity output to JUnit XML
|
||||
test_class.c – Tests for src/class.c
|
||||
test_interpreter.c – Tests for src/interpreter.c
|
||||
test_random.c – Tests for src/random.c
|
||||
test_utils.c – Tests for src/utils.c
|
||||
vendor/unity/ – Vendored Unity test framework
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
| Requirement | Notes |
|
||||
|---|---|
|
||||
| C compiler (gcc or clang) | Same compiler used to build the mud |
|
||||
| GNU make | Any POSIX-compatible make works |
|
||||
| Python 3 | Required only for JUnit XML conversion (`unity_to_junit.py`) |
|
||||
| autoconf / configure | Already needed to build the mud |
|
||||
|
||||
## Running the tests
|
||||
|
||||
Run `./configure` from the repository root first (only needed once):
|
||||
|
||||
```sh
|
||||
./configure
|
||||
```
|
||||
|
||||
Then build and run all tests from the `tests/` directory:
|
||||
|
||||
```sh
|
||||
cd tests
|
||||
make test
|
||||
```
|
||||
|
||||
`make test` performs the following steps for each test binary:
|
||||
|
||||
1. Compiles the test binary (if not already up to date).
|
||||
2. Runs the binary and captures stdout/stderr to `test-results/<name>.out`.
|
||||
3. Measures wall-clock elapsed time.
|
||||
4. Converts the Unity output to JUnit XML via `unity_to_junit.py`, writing
|
||||
`test-results/<name>.xml`.
|
||||
5. Prints `[PASS] <name>` or `[FAIL] <name>` and exits non-zero if any
|
||||
binary failed.
|
||||
|
||||
To build the test binaries without running them:
|
||||
|
||||
```sh
|
||||
cd tests
|
||||
make
|
||||
```
|
||||
|
||||
To remove all test binaries and result files:
|
||||
|
||||
```sh
|
||||
cd tests
|
||||
make clean
|
||||
```
|
||||
|
||||
## Test suites
|
||||
|
||||
| Binary | Source under test | Test file |
|
||||
|---|---|---|
|
||||
| `test_utils` | `src/utils.c`, `src/random.c` | `test_utils.c` |
|
||||
| `test_random` | `src/random.c`, `rand_number`/`dice` in `src/utils.c` | `test_random.c` |
|
||||
| `test_interpreter` | `src/interpreter.c` | `test_interpreter.c` |
|
||||
| `test_class` | `src/class.c` | `test_class.c` |
|
||||
|
||||
## Writing a new test
|
||||
|
||||
### Adding a test case to an existing suite
|
||||
|
||||
1. Open the relevant `test_<name>.c` file.
|
||||
2. Write a function with the signature `void test_my_feature(void)`.
|
||||
3. Use Unity assertion macros such as `TEST_ASSERT_EQUAL_INT`,
|
||||
`TEST_ASSERT_NULL`, `TEST_ASSERT_TRUE`, etc.
|
||||
4. Register the function in the `main()` block:
|
||||
```c
|
||||
RUN_TEST(test_my_feature);
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```c
|
||||
void test_str_cmp_equal_strings(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, str_cmp("hello", "hello"));
|
||||
}
|
||||
```
|
||||
|
||||
### Creating a new test suite
|
||||
|
||||
1. Create `tests/test_<module>.c`. Copy the boilerplate from an existing
|
||||
suite: include `unity.h`, define `setUp`/`tearDown` (may be empty), write
|
||||
test functions, and provide a `main()` that calls `UNITY_BEGIN()`,
|
||||
`RUN_TEST(...)` for each function, and `return UNITY_END();`.
|
||||
|
||||
2. Add the binary to `tests/Makefile.in`:
|
||||
- Add the name to the `TESTS` variable.
|
||||
- Add a build rule:
|
||||
```make
|
||||
test_<module>: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) \
|
||||
$(SRCDIR)/<module>.c test_<module>.c
|
||||
$(COMPILE) -o $@ $^ $(LIBS)
|
||||
```
|
||||
|
||||
3. Re-run `./configure` from the repository root to regenerate
|
||||
`tests/Makefile` from the updated `tests/Makefile.in`.
|
||||
|
||||
### Stubs
|
||||
|
||||
Many mud source files reference global variables and functions that are only
|
||||
meaningful at runtime (e.g. `descriptor_list`, `log()`). `test_stubs.c`
|
||||
provides zero-initialised definitions and `__attribute__((weak))` stub
|
||||
implementations for these symbols so that test binaries link without pulling
|
||||
in the full mud.
|
||||
|
||||
If a new test requires a function not yet stubbed, add a weak stub to
|
||||
`test_stubs.c`:
|
||||
|
||||
```c
|
||||
__attribute__((weak)) void my_function(void) { /* no-op */ }
|
||||
```
|
||||
|
||||
## JUnit XML output and CI
|
||||
|
||||
`unity_to_junit.py` reads Unity's line-oriented output on stdin and writes a
|
||||
JUnit-compatible XML file. It accepts an optional third argument with the
|
||||
elapsed wall-clock time in seconds (provided by the `make test` target):
|
||||
|
||||
```
|
||||
usage: unity_to_junit.py <suite_name> <output.xml> [elapsed_seconds]
|
||||
```
|
||||
|
||||
The GitHub Actions workflow (`.github/workflows/build.yml`) runs `make test`
|
||||
on every push and pull request against `master`. After the tests finish the
|
||||
`dorny/test-reporter` action reads `tests/test-results/*.xml` and publishes a
|
||||
formatted report as a GitHub Check with pass/fail counts and per-suite
|
||||
execution times.
|
||||
@@ -0,0 +1,203 @@
|
||||
# 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
|
||||
@@ -0,0 +1,167 @@
|
||||
# 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
|
||||
@@ -0,0 +1,343 @@
|
||||
#
|
||||
# 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
|
||||
| $@
|
||||
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
# 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
|
||||
| $@
|
||||
|
||||
|
||||
@@ -0,0 +1,601 @@
|
||||
# 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
|
||||
|
||||
+75
-274
@@ -39,7 +39,7 @@ OBJFILES = comm.obj act.comm.obj act.informative.obj act.movement.obj act.item.o
|
||||
asciimap.obj act.offensive.obj act.other.obj act.social.obj act.wizard.obj \
|
||||
ban.obj boards.obj castle.obj class.obj config.obj constants.obj db.obj \
|
||||
dg_event.obj dg_scripts.obj dg_triggers.obj fight.obj genolc.obj graph.obj \
|
||||
handler.obj house.obj ibt.obj interpreter.obj limits.obj lists.obj magic.obj main.obj \
|
||||
handler.obj house.obj ibt.obj interpreter.obj limits.obj lists.obj magic.obj \
|
||||
mail.obj msgedit.obj mobact.obj modify.obj mud_event.obj oasis.obj oasis_copy.obj \
|
||||
oasis_delete.obj oasis_list.obj objsave.obj protocol.obj shop.obj spec_assign.obj \
|
||||
spec_procs.obj spell_parser.obj improved-edit.obj spells.obj utils.obj weather.obj \
|
||||
@@ -59,312 +59,113 @@ circle.exe : $(OBJFILES)
|
||||
# Dependencies for the object files (automagically generated with
|
||||
# gcc -MM)
|
||||
|
||||
act.comm.obj: act.comm.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h comm.h interpreter.h handler.h db.h screen.h improved-edit.h \
|
||||
dg_scripts.h act.h modify.h
|
||||
act.comm.obj: 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.obj: act.informative.c conf.h sysdep.h structs.h protocol.h \
|
||||
lists.h utils.h comm.h interpreter.h handler.h db.h spells.h screen.h \
|
||||
constants.h dg_scripts.h mud_event.h dg_event.h mail.h act.h class.h \
|
||||
fight.h modify.h asciimap.h quest.h
|
||||
act.informative.obj: act.informative.c conf.h sysdep.h structs.h utils.h comm.h \
|
||||
interpreter.h handler.h db.h spells.h screen.h constants.h
|
||||
$(CC) -c $(CFLAGS) act.informative.c
|
||||
act.item.obj: act.item.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h comm.h interpreter.h handler.h db.h spells.h constants.h \
|
||||
dg_scripts.h oasis.h act.h quest.h
|
||||
act.item.obj: 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.obj: act.movement.c conf.h sysdep.h structs.h protocol.h \
|
||||
lists.h utils.h comm.h interpreter.h handler.h db.h spells.h house.h \
|
||||
constants.h dg_scripts.h act.h fight.h oasis.h
|
||||
act.movement.obj: act.movement.c conf.h sysdep.h structs.h utils.h comm.h \
|
||||
interpreter.h handler.h db.h spells.h house.h constants.h
|
||||
$(CC) -c $(CFLAGS) act.movement.c
|
||||
act.offensive.obj: act.offensive.c conf.h sysdep.h structs.h protocol.h \
|
||||
lists.h utils.h comm.h interpreter.h handler.h db.h spells.h act.h \
|
||||
fight.h mud_event.h dg_event.h
|
||||
act.offensive.obj: 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.obj: act.other.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h comm.h interpreter.h handler.h db.h spells.h screen.h house.h \
|
||||
constants.h dg_scripts.h act.h spec_procs.h class.h fight.h mail.h \
|
||||
shop.h quest.h modify.h
|
||||
act.other.obj: act.other.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
|
||||
handler.h db.h spells.h screen.h house.h
|
||||
$(CC) -c $(CFLAGS) act.other.c
|
||||
act.social.obj: act.social.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h comm.h interpreter.h handler.h db.h screen.h spells.h act.h
|
||||
act.social.obj: 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.obj: act.wizard.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h comm.h interpreter.h handler.h db.h spells.h house.h screen.h \
|
||||
constants.h oasis.h dg_scripts.h shop.h act.h genzon.h class.h genolc.h \
|
||||
genobj.h fight.h modify.h quest.h ban.h
|
||||
act.wizard.obj: act.wizard.c conf.h sysdep.h structs.h utils.h comm.h \
|
||||
interpreter.h handler.h db.h spells.h house.h screen.h constants.h
|
||||
$(CC) -c $(CFLAGS) act.wizard.c
|
||||
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
|
||||
ban.obj: ban.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h
|
||||
$(CC) -c $(CFLAGS) ban.c
|
||||
boards.obj: boards.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
comm.h db.h boards.h interpreter.h handler.h improved-edit.h modify.h
|
||||
boards.obj: 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
|
||||
bsd-snprintf.obj: bsd-snprintf.c conf.h sysdep.h
|
||||
castle.obj: castle.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
comm.h interpreter.h handler.h db.h spells.h act.h spec_procs.h fight.h
|
||||
castle.obj: 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
|
||||
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
|
||||
class.obj: class.c conf.h sysdep.h structs.h db.h utils.h spells.h interpreter.h
|
||||
$(CC) -c $(CFLAGS) class.c
|
||||
comm.obj: comm.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
comm.h interpreter.h handler.h db.h house.h oasis.h genolc.h \
|
||||
dg_scripts.h dg_event.h screen.h constants.h boards.h act.h ban.h \
|
||||
msgedit.h fight.h spells.h modify.h quest.h ibt.h mud_event.h
|
||||
comm.obj: 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.obj: config.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
interpreter.h config.h asciimap.h
|
||||
config.obj: config.c conf.h sysdep.h structs.h
|
||||
$(CC) -c $(CFLAGS) config.c
|
||||
constants.obj: constants.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h interpreter.h constants.h
|
||||
constants.obj: constants.c conf.h sysdep.h structs.h
|
||||
$(CC) -c $(CFLAGS) constants.c
|
||||
db.obj: db.c conf.h sysdep.h structs.h protocol.h lists.h utils.h db.h \
|
||||
comm.h handler.h spells.h mail.h interpreter.h house.h constants.h \
|
||||
oasis.h dg_scripts.h dg_event.h act.h ban.h spec_procs.h genzon.h \
|
||||
genolc.h genobj.h config.h fight.h modify.h shop.h quest.h ibt.h \
|
||||
mud_event.h msgedit.h screen.h
|
||||
db.obj: db.c conf.h sysdep.h structs.h utils.h db.h comm.h handler.h spells.h mail.h \
|
||||
interpreter.h house.h
|
||||
$(CC) -c $(CFLAGS) db.c
|
||||
dg_comm.obj: dg_comm.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
dg_scripts.h utils.h comm.h handler.h db.h constants.h
|
||||
$(CC) -c $(CFLAGS) dg_comm.c
|
||||
dg_db_scripts.obj: dg_db_scripts.c conf.h sysdep.h structs.h protocol.h \
|
||||
lists.h dg_scripts.h utils.h db.h handler.h dg_event.h comm.h \
|
||||
constants.h interpreter.h
|
||||
$(CC) -c $(CFLAGS) dg_db_scripts.c
|
||||
dg_event.obj: dg_event.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h db.h dg_event.h constants.h comm.h mud_event.h
|
||||
$(CC) -c $(CFLAGS) dg_event.c
|
||||
dg_handler.obj: dg_handler.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h dg_scripts.h comm.h db.h handler.h spells.h dg_event.h \
|
||||
constants.h
|
||||
$(CC) -c $(CFLAGS) dg_handler.c
|
||||
dg_misc.obj: dg_misc.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
dg_scripts.h comm.h interpreter.h handler.h dg_event.h db.h screen.h \
|
||||
spells.h constants.h fight.h
|
||||
$(CC) -c $(CFLAGS) dg_misc.c
|
||||
dg_mobcmd.obj: dg_mobcmd.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
utils.h screen.h dg_scripts.h db.h handler.h interpreter.h comm.h \
|
||||
spells.h constants.h genzon.h act.h fight.h
|
||||
$(CC) -c $(CFLAGS) dg_mobcmd.c
|
||||
dg_objcmd.obj: dg_objcmd.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
screen.h dg_scripts.h utils.h comm.h interpreter.h handler.h db.h \
|
||||
constants.h genzon.h fight.h
|
||||
$(CC) -c $(CFLAGS) dg_objcmd.c
|
||||
dg_olc.obj: dg_olc.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
comm.h db.h genolc.h interpreter.h oasis.h dg_olc.h dg_scripts.h \
|
||||
dg_event.h genzon.h constants.h modify.h
|
||||
$(CC) -c $(CFLAGS) dg_olc.c
|
||||
dg_scripts.obj: dg_scripts.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
dg_scripts.h utils.h comm.h interpreter.h handler.h dg_event.h db.h \
|
||||
screen.h constants.h spells.h oasis.h genzon.h act.h modify.h
|
||||
$(CC) -c $(CFLAGS) dg_scripts.c
|
||||
dg_triggers.obj: dg_triggers.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
dg_scripts.h utils.h comm.h interpreter.h handler.h db.h oasis.h \
|
||||
constants.h spells.h act.h
|
||||
$(CC) -c $(CFLAGS) dg_triggers.c
|
||||
dg_variables.obj: dg_variables.c conf.h sysdep.h structs.h protocol.h \
|
||||
lists.h dg_scripts.h utils.h comm.h interpreter.h handler.h dg_event.h \
|
||||
db.h fight.h screen.h constants.h spells.h oasis.h class.h quest.h act.h \
|
||||
genobj.h
|
||||
$(CC) -c $(CFLAGS) dg_variables.c
|
||||
dg_wldcmd.obj: dg_wldcmd.c conf.h sysdep.h structs.h protocol.h lists.h \
|
||||
screen.h dg_scripts.h utils.h comm.h interpreter.h handler.h db.h \
|
||||
constants.h genzon.h fight.h
|
||||
$(CC) -c $(CFLAGS) dg_wldcmd.c
|
||||
fight.obj: fight.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
comm.h handler.h interpreter.h db.h spells.h screen.h constants.h \
|
||||
dg_scripts.h act.h class.h fight.h shop.h quest.h
|
||||
fight.obj: 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
|
||||
genmob.obj: genmob.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
db.h shop.h handler.h genolc.h genmob.h genzon.h dg_olc.h dg_scripts.h \
|
||||
spells.h
|
||||
$(CC) -c $(CFLAGS) genmob.c
|
||||
genobj.obj: genobj.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
db.h shop.h constants.h genolc.h genobj.h genzon.h dg_olc.h dg_scripts.h \
|
||||
handler.h interpreter.h boards.h
|
||||
$(CC) -c $(CFLAGS) genobj.c
|
||||
genolc.obj: genolc.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
db.h handler.h comm.h shop.h oasis.h genolc.h genwld.h genmob.h genshp.h \
|
||||
genzon.h genobj.h dg_olc.h dg_scripts.h constants.h interpreter.h act.h \
|
||||
modify.h quest.h
|
||||
$(CC) -c $(CFLAGS) genolc.c
|
||||
genqst.obj: genqst.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
db.h quest.h genolc.h genzon.h
|
||||
$(CC) -c $(CFLAGS) genqst.c
|
||||
genshp.obj: genshp.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
db.h shop.h genolc.h genshp.h genzon.h
|
||||
$(CC) -c $(CFLAGS) genshp.c
|
||||
genwld.obj: genwld.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
db.h handler.h comm.h genolc.h genwld.h genzon.h shop.h dg_olc.h \
|
||||
dg_scripts.h mud_event.h dg_event.h
|
||||
$(CC) -c $(CFLAGS) genwld.c
|
||||
genzon.obj: genzon.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
db.h genolc.h genzon.h dg_scripts.h
|
||||
$(CC) -c $(CFLAGS) genzon.c
|
||||
graph.obj: graph.c conf.h sysdep.h structs.h protocol.h lists.h utils.h \
|
||||
comm.h interpreter.h handler.h db.h spells.h act.h constants.h graph.h \
|
||||
fight.h
|
||||
graph.obj: graph.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \
|
||||
db.h spells.h
|
||||
$(CC) -c $(CFLAGS) graph.c
|
||||
handler.obj: handler.c conf.h sysdep.h structs.h 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
|
||||
handler.obj: handler.c conf.h sysdep.h structs.h utils.h comm.h db.h handler.h \
|
||||
interpreter.h spells.h
|
||||
$(CC) -c $(CFLAGS) handler.c
|
||||
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
|
||||
house.obj: house.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \
|
||||
utils.h house.h constants.h
|
||||
$(CC) -c $(CFLAGS) house.c
|
||||
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
|
||||
interpreter.obj: interpreter.c conf.h sysdep.h structs.h comm.h interpreter.h db.h \
|
||||
utils.h spells.h handler.h mail.h screen.h
|
||||
$(CC) -c $(CFLAGS) interpreter.c
|
||||
limits.obj: limits.c conf.h sysdep.h structs.h 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
|
||||
limits.obj: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \
|
||||
handler.h
|
||||
$(CC) -c $(CFLAGS) limits.c
|
||||
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
|
||||
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 protocol.h lists.h utils.h \
|
||||
comm.h db.h interpreter.h handler.h mail.h modify.h
|
||||
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
|
||||
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
|
||||
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 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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
players.o: players.c conf.h sysdep.h structs.h utils.h db.h handler.h pfdefaults.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
|
||||
random.obj: random.c
|
||||
$(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
|
||||
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 protocol.h lists.h \
|
||||
utils.h db.h interpreter.h spec_procs.h ban.h boards.h mail.h
|
||||
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 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
|
||||
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 protocol.h \
|
||||
lists.h utils.h interpreter.h spells.h handler.h comm.h db.h \
|
||||
dg_scripts.h fight.h
|
||||
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 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
|
||||
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
|
||||
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
|
||||
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 protocol.h lists.h utils.h \
|
||||
comm.h db.h
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
# 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
|
||||
@@ -0,0 +1,12 @@
|
||||
DATA=FAR
|
||||
CODE=FAR
|
||||
MATH=STANDARD
|
||||
ANSI
|
||||
NOSTACKCHECK
|
||||
MODIFIED
|
||||
STACKEXTEND
|
||||
NOICONS
|
||||
ONERROR=CONTINUE
|
||||
INCLUDEDIR=include:netinclude
|
||||
LIBRARY=LIB:net.lib
|
||||
LINKEROPTIONS="bufsize 4096"
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
# 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
|
||||
|
||||
+75
-55
@@ -777,6 +777,15 @@ void weight_change_object(struct obj_data *obj, int weight)
|
||||
}
|
||||
}
|
||||
|
||||
#define DRINK_CON_MAX(cont) (GET_OBJ_VAL((cont), 0))
|
||||
#define DRINK_CON_NOW(cont) (GET_OBJ_VAL((cont), 1))
|
||||
#define DRINK_CON_TYPE(cont) (GET_OBJ_VAL((cont), 2))
|
||||
#define DRINK_CON_POISON(cont) (GET_OBJ_VAL((cont), 3))
|
||||
|
||||
#define LIMITED_DRINK_CONTAINER(cont) (DRINK_CON_MAX((cont)) >= 0 && DRINK_CON_NOW((cont)) >= 0)
|
||||
#define EMPTY_DRINK_CONTAINER(cont) (LIMITED_DRINK_CONTAINER((cont)) && DRINK_CON_NOW((cont)) < 1)
|
||||
|
||||
|
||||
void name_from_drinkcon(struct obj_data *obj)
|
||||
{
|
||||
const char *liqname;
|
||||
@@ -788,13 +797,12 @@ void name_from_drinkcon(struct obj_data *obj)
|
||||
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[DRINK_CON_TYPE(obj)];
|
||||
|
||||
remove_from_string(obj->name, liqname);
|
||||
new_name = right_trim_whitespace(obj->name);
|
||||
free(obj->name);
|
||||
obj->name = new_name;
|
||||
|
||||
}
|
||||
|
||||
void name_to_drinkcon(struct obj_data *obj, int type)
|
||||
@@ -813,6 +821,7 @@ void name_to_drinkcon(struct obj_data *obj, int type)
|
||||
obj->name = new_name;
|
||||
}
|
||||
|
||||
|
||||
ACMD(do_drink)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
@@ -873,7 +882,7 @@ ACMD(do_drink)
|
||||
send_to_char(ch, "Your stomach can't contain anymore!\r\n");
|
||||
return;
|
||||
}
|
||||
if (GET_OBJ_VAL(temp, 1) < 1) {
|
||||
if (EMPTY_DRINK_CONTAINER(temp)) {
|
||||
send_to_char(ch, "It is empty.\r\n");
|
||||
return;
|
||||
}
|
||||
@@ -884,33 +893,38 @@ ACMD(do_drink)
|
||||
if (subcmd == SCMD_DRINK) {
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
|
||||
snprintf(buf, sizeof(buf), "$n drinks %s from $p.", drinks[GET_OBJ_VAL(temp, 2)]);
|
||||
snprintf(buf, sizeof(buf), "$n drinks %s from $p.", drinks[DRINK_CON_TYPE(temp)]);
|
||||
act(buf, TRUE, ch, temp, 0, TO_ROOM);
|
||||
|
||||
send_to_char(ch, "You drink the %s.\r\n", drinks[GET_OBJ_VAL(temp, 2)]);
|
||||
send_to_char(ch, "You drink the %s.\r\n", drinks[DRINK_CON_TYPE(temp)]);
|
||||
|
||||
if (drink_aff[GET_OBJ_VAL(temp, 2)][DRUNK] > 0)
|
||||
amount = (25 - GET_COND(ch, THIRST)) / drink_aff[GET_OBJ_VAL(temp, 2)][DRUNK];
|
||||
if (drink_aff[DRINK_CON_TYPE(temp)][DRUNK] > 0)
|
||||
amount = (25 - GET_COND(ch, THIRST)) / drink_aff[DRINK_CON_TYPE(temp)][DRUNK];
|
||||
else
|
||||
amount = rand_number(3, 10);
|
||||
|
||||
} else {
|
||||
act("$n sips from $p.", TRUE, ch, temp, 0, TO_ROOM);
|
||||
send_to_char(ch, "It tastes like %s.\r\n", drinks[GET_OBJ_VAL(temp, 2)]);
|
||||
send_to_char(ch, "It tastes like %s.\r\n", drinks[DRINK_CON_TYPE(temp)]);
|
||||
amount = 1;
|
||||
}
|
||||
|
||||
amount = MIN(amount, GET_OBJ_VAL(temp, 1));
|
||||
/* For limited drink containers with remaining contents, don't drink more
|
||||
* than the amount currently in the container. Unlimited containers are
|
||||
* handled separately and are not clamped here.
|
||||
*/
|
||||
if (LIMITED_DRINK_CONTAINER(temp))
|
||||
amount = MIN(amount, DRINK_CON_NOW(temp));
|
||||
|
||||
/* You can't subtract more than the object weighs, unless its unlimited. */
|
||||
if (GET_OBJ_VAL(temp, 0) > 0) {
|
||||
if (LIMITED_DRINK_CONTAINER(temp)) {
|
||||
weight = MIN(amount, GET_OBJ_WEIGHT(temp));
|
||||
weight_change_object(temp, -weight); /* Subtract amount */
|
||||
}
|
||||
|
||||
gain_condition(ch, DRUNK, drink_aff[GET_OBJ_VAL(temp, 2)][DRUNK] * amount / 4);
|
||||
gain_condition(ch, HUNGER, drink_aff[GET_OBJ_VAL(temp, 2)][HUNGER] * amount / 4);
|
||||
gain_condition(ch, THIRST, drink_aff[GET_OBJ_VAL(temp, 2)][THIRST] * amount / 4);
|
||||
gain_condition(ch, DRUNK, drink_aff[DRINK_CON_TYPE(temp)][DRUNK] * amount / 4);
|
||||
gain_condition(ch, HUNGER, drink_aff[DRINK_CON_TYPE(temp)][HUNGER] * amount / 4);
|
||||
gain_condition(ch, THIRST, drink_aff[DRINK_CON_TYPE(temp)][THIRST] * amount / 4);
|
||||
|
||||
if (GET_COND(ch, DRUNK) > 10)
|
||||
send_to_char(ch, "You feel drunk.\r\n");
|
||||
@@ -921,7 +935,7 @@ ACMD(do_drink)
|
||||
if (GET_COND(ch, HUNGER) > 20)
|
||||
send_to_char(ch, "You are full.\r\n");
|
||||
|
||||
if (GET_OBJ_VAL(temp, 3) && GET_LEVEL(ch) < LVL_IMMORT) { /* The crap was poisoned ! */
|
||||
if (DRINK_CON_POISON(temp) && GET_LEVEL(ch) < LVL_IMMORT) { /* The crap was poisoned ! */
|
||||
send_to_char(ch, "Oops, it tasted rather strange!\r\n");
|
||||
act("$n chokes and utters some strange sounds.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
|
||||
@@ -932,12 +946,13 @@ ACMD(do_drink)
|
||||
affect_join(ch, &af, FALSE, FALSE, FALSE, FALSE);
|
||||
}
|
||||
/* Empty the container (unless unlimited), and no longer poison. */
|
||||
if (GET_OBJ_VAL(temp, 0) > 0) {
|
||||
GET_OBJ_VAL(temp, 1) -= amount;
|
||||
if (!GET_OBJ_VAL(temp, 1)) { /* The last bit */
|
||||
if (LIMITED_DRINK_CONTAINER(temp)) {
|
||||
amount = MIN(amount, DRINK_CON_NOW(temp)); // never subtract more than the current amount
|
||||
DRINK_CON_NOW(temp) -= amount;
|
||||
if (!DRINK_CON_NOW(temp)) { /* The last bit */
|
||||
name_from_drinkcon(temp);
|
||||
GET_OBJ_VAL(temp, 2) = 0;
|
||||
GET_OBJ_VAL(temp, 3) = 0;
|
||||
DRINK_CON_TYPE(temp) = 0;
|
||||
DRINK_CON_POISON(temp) = 0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -1064,7 +1079,7 @@ ACMD(do_pour)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (GET_OBJ_VAL(from_obj, 1) == 0) {
|
||||
if (EMPTY_DRINK_CONTAINER(from_obj)) {
|
||||
act("The $p is empty.", FALSE, ch, from_obj, 0, TO_CHAR);
|
||||
return;
|
||||
}
|
||||
@@ -1074,19 +1089,22 @@ ACMD(do_pour)
|
||||
return;
|
||||
}
|
||||
if (!str_cmp(arg2, "out")) {
|
||||
if (GET_OBJ_VAL(from_obj, 0) > 0) {
|
||||
if (!LIMITED_DRINK_CONTAINER(from_obj)) {
|
||||
send_to_char(ch, "You can't pour that out! There's simply too much in it.\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* pour out */
|
||||
act("$n empties $p.", TRUE, ch, from_obj, 0, TO_ROOM);
|
||||
act("You empty $p.", FALSE, ch, from_obj, 0, TO_CHAR);
|
||||
|
||||
weight_change_object(from_obj, -GET_OBJ_VAL(from_obj, 1)); /* Empty */
|
||||
weight_change_object(from_obj, -DRINK_CON_NOW(from_obj)); /* Empty */
|
||||
|
||||
name_from_drinkcon(from_obj);
|
||||
GET_OBJ_VAL(from_obj, 1) = 0;
|
||||
GET_OBJ_VAL(from_obj, 2) = 0;
|
||||
GET_OBJ_VAL(from_obj, 3) = 0;
|
||||
}
|
||||
else
|
||||
send_to_char(ch, "You can't possibly pour that container out!\r\n");
|
||||
|
||||
DRINK_CON_NOW(from_obj) = 0;
|
||||
DRINK_CON_TYPE(from_obj) = 0;
|
||||
DRINK_CON_POISON(from_obj) = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1094,8 +1112,7 @@ ACMD(do_pour)
|
||||
send_to_char(ch, "You can't find it!\r\n");
|
||||
return;
|
||||
}
|
||||
if ((GET_OBJ_TYPE(to_obj) != ITEM_DRINKCON) &&
|
||||
(GET_OBJ_TYPE(to_obj) != ITEM_FOUNTAIN)) {
|
||||
if ((GET_OBJ_TYPE(to_obj) != ITEM_DRINKCON) && (GET_OBJ_TYPE(to_obj) != ITEM_FOUNTAIN)) {
|
||||
send_to_char(ch, "You can't pour anything into that.\r\n");
|
||||
return;
|
||||
}
|
||||
@@ -1104,59 +1121,62 @@ ACMD(do_pour)
|
||||
send_to_char(ch, "A most unproductive effort.\r\n");
|
||||
return;
|
||||
}
|
||||
if ((GET_OBJ_VAL(to_obj, 0) < 0) ||
|
||||
(!(GET_OBJ_VAL(to_obj, 1) < GET_OBJ_VAL(to_obj, 0)))) {
|
||||
if (!EMPTY_DRINK_CONTAINER(to_obj) && DRINK_CON_TYPE(to_obj) != DRINK_CON_TYPE(from_obj)) {
|
||||
send_to_char(ch, "There is already another liquid in it!\r\n");
|
||||
return;
|
||||
}
|
||||
if (!(GET_OBJ_VAL(to_obj, 1) < GET_OBJ_VAL(to_obj, 0))) {
|
||||
// Not allowed to fill an unlimited container, or a container that is already full.
|
||||
if (!LIMITED_DRINK_CONTAINER(to_obj) || DRINK_CON_NOW(to_obj) >= DRINK_CON_MAX(to_obj)) {
|
||||
send_to_char(ch, "There is no room for more.\r\n");
|
||||
return;
|
||||
}
|
||||
if (subcmd == SCMD_POUR)
|
||||
send_to_char(ch, "You pour the %s into the %s.", drinks[GET_OBJ_VAL(from_obj, 2)], arg2);
|
||||
send_to_char(ch, "You pour the %s into the %s.\r\n", drinks[DRINK_CON_TYPE(from_obj)], arg2);
|
||||
|
||||
if (subcmd == SCMD_FILL) {
|
||||
act("You gently fill $p from $P.", FALSE, ch, to_obj, from_obj, TO_CHAR);
|
||||
act("$n gently fills $p from $P.", TRUE, ch, to_obj, from_obj, TO_ROOM);
|
||||
}
|
||||
/* New alias */
|
||||
if (GET_OBJ_VAL(to_obj, 1) == 0)
|
||||
name_to_drinkcon(to_obj, GET_OBJ_VAL(from_obj, 2));
|
||||
if (EMPTY_DRINK_CONTAINER(to_obj))
|
||||
name_to_drinkcon(to_obj, DRINK_CON_TYPE(from_obj));
|
||||
|
||||
/* First same type liq. */
|
||||
GET_OBJ_VAL(to_obj, 2) = GET_OBJ_VAL(from_obj, 2);
|
||||
DRINK_CON_TYPE(to_obj) = DRINK_CON_TYPE(from_obj);
|
||||
|
||||
/* Then how much to pour */
|
||||
if (GET_OBJ_VAL(from_obj, 0) > 0) {
|
||||
GET_OBJ_VAL(from_obj, 1) -= (amount =
|
||||
(GET_OBJ_VAL(to_obj, 0) - GET_OBJ_VAL(to_obj, 1)));
|
||||
if (LIMITED_DRINK_CONTAINER(from_obj)) {
|
||||
amount = MIN(DRINK_CON_NOW(from_obj), DRINK_CON_MAX(to_obj) - DRINK_CON_NOW(to_obj));
|
||||
DRINK_CON_NOW(from_obj) -= amount;
|
||||
DRINK_CON_NOW(to_obj) += amount;
|
||||
|
||||
GET_OBJ_VAL(to_obj, 1) = GET_OBJ_VAL(to_obj, 0);
|
||||
|
||||
if (GET_OBJ_VAL(from_obj, 1) < 0) { /* There was too little */
|
||||
GET_OBJ_VAL(to_obj, 1) += GET_OBJ_VAL(from_obj, 1);
|
||||
amount += GET_OBJ_VAL(from_obj, 1);
|
||||
if (DRINK_CON_NOW(from_obj) == 0) { /* It was emptied */
|
||||
name_from_drinkcon(from_obj);
|
||||
GET_OBJ_VAL(from_obj, 1) = 0;
|
||||
GET_OBJ_VAL(from_obj, 2) = 0;
|
||||
GET_OBJ_VAL(from_obj, 3) = 0;
|
||||
DRINK_CON_NOW(from_obj) = 0;
|
||||
DRINK_CON_TYPE(from_obj) = 0;
|
||||
DRINK_CON_POISON(from_obj) = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
GET_OBJ_VAL(to_obj, 1) = GET_OBJ_VAL(to_obj, 0);
|
||||
amount = GET_OBJ_VAL(to_obj, 0);
|
||||
} else {
|
||||
amount = DRINK_CON_MAX(to_obj) - DRINK_CON_NOW(to_obj);
|
||||
DRINK_CON_NOW(to_obj) = DRINK_CON_MAX(to_obj);
|
||||
}
|
||||
/* Poisoned? */
|
||||
GET_OBJ_VAL(to_obj, 3) = (GET_OBJ_VAL(to_obj, 3) || GET_OBJ_VAL(from_obj, 3))
|
||||
;
|
||||
DRINK_CON_POISON(to_obj) = (DRINK_CON_POISON(to_obj) || DRINK_CON_POISON(from_obj));
|
||||
/* Weight change, except for unlimited. */
|
||||
if (GET_OBJ_VAL(from_obj, 0) > 0) {
|
||||
if (LIMITED_DRINK_CONTAINER(from_obj)) {
|
||||
weight_change_object(from_obj, -amount);
|
||||
}
|
||||
weight_change_object(to_obj, amount); /* Add weight */
|
||||
}
|
||||
|
||||
#undef DRINK_CON_MAX
|
||||
#undef DRINK_CON_NOW
|
||||
#undef DRINK_CON_TYPE
|
||||
#undef DRINK_CON_POISON
|
||||
|
||||
#undef LIMITED_DRINK_CONTAINER
|
||||
#undef EMPTY_DRINK_CONTAINER
|
||||
|
||||
static void wear_message(struct char_data *ch, struct obj_data *obj, int where)
|
||||
{
|
||||
const char *wear_messages[][2] = {
|
||||
|
||||
+5
-3
@@ -54,7 +54,7 @@ ACMD(do_assist)
|
||||
else if (!CAN_SEE(ch, opponent))
|
||||
act("You can't see who is fighting $M!", FALSE, ch, 0, helpee, TO_CHAR);
|
||||
/* prevent accidental pkill */
|
||||
else if (!CONFIG_PK_ALLOWED && !IS_NPC(opponent))
|
||||
else if (!pk_allowed(ch, opponent))
|
||||
send_to_char(ch, "You cannot kill other players.\r\n");
|
||||
else {
|
||||
send_to_char(ch, "You join the fight!\r\n");
|
||||
@@ -82,8 +82,10 @@ ACMD(do_hit)
|
||||
} else if (AFF_FLAGGED(ch, AFF_CHARM) && (ch->master == vict))
|
||||
act("$N is just such a good friend, you simply can't hit $M.", FALSE, ch, 0, vict, TO_CHAR);
|
||||
else {
|
||||
if (!CONFIG_PK_ALLOWED && !IS_NPC(vict) && !IS_NPC(ch))
|
||||
check_killer(ch, vict);
|
||||
if (!pk_allowed(ch, vict)) {
|
||||
send_to_char(ch, "Player killing is not allowed.\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GET_POS(ch) == POS_STANDING) && (vict != FIGHTING(ch))) {
|
||||
if (GET_DEX(ch) > GET_DEX(vict) || (GET_DEX(ch) == GET_DEX(vict) && rand_number(1, 2) == 1)) /* if faster */
|
||||
|
||||
+21
-4
@@ -154,6 +154,7 @@ ACMD(do_steal)
|
||||
send_to_char(ch, "You have no idea how to do that.\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_PEACEFUL)) {
|
||||
send_to_char(ch, "This room just has such a peaceful, easy feeling...\r\n");
|
||||
return;
|
||||
@@ -169,20 +170,26 @@ ACMD(do_steal)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if player stealing is allowed */
|
||||
if (!IS_NPC(vict)) {
|
||||
if (CONFIG_PT_SETTING == CONFIG_PT_OFF) {
|
||||
send_to_char(ch, "Stealing from players is not allowed.\r\n");
|
||||
return;
|
||||
}
|
||||
pcsteal = (CONFIG_PT_SETTING == CONFIG_PT_LIMITED);
|
||||
}
|
||||
|
||||
/* 101% is a complete failure */
|
||||
percent = rand_number(1, 101) - dex_app_skill[GET_DEX(ch)].p_pocket;
|
||||
|
||||
if (GET_POS(vict) < POS_SLEEPING)
|
||||
percent = -1; /* ALWAYS SUCCESS, unless heavy object. */
|
||||
|
||||
if (!CONFIG_PT_ALLOWED && !IS_NPC(vict))
|
||||
pcsteal = 1;
|
||||
|
||||
if (!AWAKE(vict)) /* Easier to steal from sleeping people. */
|
||||
percent -= 50;
|
||||
|
||||
/* No stealing if not allowed. If it is no stealing from Imm's or Shopkeepers. */
|
||||
if (GET_LEVEL(vict) >= LVL_IMMORT || pcsteal || GET_MOB_SPEC(vict) == shop_keeper)
|
||||
if (GET_LEVEL(vict) >= LVL_IMMORT || GET_MOB_SPEC(vict) == shop_keeper)
|
||||
percent = 101; /* Failure */
|
||||
|
||||
if (str_cmp(obj_name, "coins") && str_cmp(obj_name, "gold")) {
|
||||
@@ -221,6 +228,12 @@ ACMD(do_steal)
|
||||
if (percent > GET_SKILL(ch, SKILL_STEAL)) {
|
||||
ohoh = TRUE;
|
||||
send_to_char(ch, "Oops..\r\n");
|
||||
|
||||
/* Player got caught and stealing is limited via cedit */
|
||||
if ( (pcsteal) && (!PLR_FLAGGED(ch, PLR_THIEF))) {
|
||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_THIEF);
|
||||
}
|
||||
|
||||
act("$n tried to steal something from you!", FALSE, ch, 0, vict, TO_VICT);
|
||||
act("$n tries to steal something from $N.", TRUE, ch, 0, vict, TO_NOTVICT);
|
||||
} else { /* Steal the item */
|
||||
@@ -242,6 +255,10 @@ ACMD(do_steal)
|
||||
} else { /* Steal some coins */
|
||||
if (AWAKE(vict) && (percent > GET_SKILL(ch, SKILL_STEAL))) {
|
||||
ohoh = TRUE;
|
||||
/* Player got caught and stealing is limited via cedit */
|
||||
if ( (pcsteal) && (!PLR_FLAGGED(ch, PLR_THIEF))) {
|
||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_THIEF);
|
||||
}
|
||||
send_to_char(ch, "Oops..\r\n");
|
||||
act("You discover that $n has $s hands in your wallet.", FALSE, ch, 0, vict, TO_VICT);
|
||||
act("$n tries to steal gold from $N.", TRUE, ch, 0, vict, TO_NOTVICT);
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ ACMD(do_action)
|
||||
if (!action->char_found)
|
||||
*arg = '\0';
|
||||
|
||||
if (action->char_found && argument)
|
||||
if (action->char_found)
|
||||
one_argument(argument, arg);
|
||||
else
|
||||
*arg = '\0';
|
||||
|
||||
+4
-1
@@ -2396,7 +2396,10 @@ ACMD(do_wizutil)
|
||||
act("A sudden fireball conjured from nowhere thaws $n!", FALSE, vict, 0, 0, TO_ROOM);
|
||||
break;
|
||||
case SCMD_UNAFFECT:
|
||||
if (vict->affected || AFF_FLAGS(vict)) {
|
||||
for (taeller = 0; taeller < AF_ARRAY_MAX; taeller++)
|
||||
if (AFF_FLAGS(vict)[taeller])
|
||||
break;
|
||||
if (vict->affected || taeller < AF_ARRAY_MAX) {
|
||||
while (vict->affected)
|
||||
affect_remove(vict, vict->affected);
|
||||
for(taeller=0; taeller < AF_ARRAY_MAX; taeller++)
|
||||
|
||||
Executable
+517
@@ -0,0 +1,517 @@
|
||||
$!
|
||||
$! 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
|
||||
+3
-3
@@ -374,9 +374,9 @@ SPECIAL(king_welmar)
|
||||
"$n proclaims 'principe dignos'."
|
||||
};
|
||||
|
||||
const char bedroom_path[] = "s33004o1c1S.";
|
||||
const char throne_path[] = "W3o3cG52211rg.";
|
||||
const char monolog_path[] = "ABCDPPPP.";
|
||||
static const char bedroom_path[] = "s33004o1c1S.";
|
||||
static const char throne_path[] = "W3o3cG52211rg.";
|
||||
static const char monolog_path[] = "ABCDPPPP.";
|
||||
|
||||
static const char *path;
|
||||
static int path_index;
|
||||
|
||||
+47
-13
@@ -79,8 +79,8 @@ static void cedit_setup(struct descriptor_data *d)
|
||||
|
||||
/* Copy the current configuration from the config_info to this one and copy
|
||||
* the game play options from the configuration info struct. */
|
||||
OLC_CONFIG(d)->play.pk_allowed = CONFIG_PK_ALLOWED;
|
||||
OLC_CONFIG(d)->play.pt_allowed = CONFIG_PT_ALLOWED;
|
||||
OLC_CONFIG(d)->play.pk_setting = CONFIG_PK_SETTING;
|
||||
OLC_CONFIG(d)->play.pt_setting = CONFIG_PT_SETTING;
|
||||
OLC_CONFIG(d)->play.level_can_shout = CONFIG_LEVEL_CAN_SHOUT;
|
||||
OLC_CONFIG(d)->play.holler_move_cost = CONFIG_HOLLER_MOVE_COST;
|
||||
OLC_CONFIG(d)->play.tunnel_size = CONFIG_TUNNEL_SIZE;
|
||||
@@ -183,8 +183,8 @@ static void cedit_save_internally(struct descriptor_data *d)
|
||||
/* see if we need to reassign spec procs on rooms */
|
||||
int reassign = (CONFIG_DTS_ARE_DUMPS != OLC_CONFIG(d)->play.dts_are_dumps);
|
||||
/* Copy the data back from the descriptor to the config_info structure. */
|
||||
CONFIG_PK_ALLOWED = OLC_CONFIG(d)->play.pk_allowed;
|
||||
CONFIG_PT_ALLOWED = OLC_CONFIG(d)->play.pt_allowed;
|
||||
CONFIG_PK_SETTING = OLC_CONFIG(d)->play.pk_setting;
|
||||
CONFIG_PT_SETTING = OLC_CONFIG(d)->play.pt_setting;
|
||||
CONFIG_LEVEL_CAN_SHOUT = OLC_CONFIG(d)->play.level_can_shout;
|
||||
CONFIG_HOLLER_MOVE_COST = OLC_CONFIG(d)->play.holler_move_cost;
|
||||
CONFIG_TUNNEL_SIZE = OLC_CONFIG(d)->play.tunnel_size;
|
||||
@@ -339,9 +339,9 @@ int save_config( IDXTYPE nowhere )
|
||||
);
|
||||
|
||||
fprintf(fl, "* Is player killing allowed on the mud?\n"
|
||||
"pk_allowed = %d\n\n", CONFIG_PK_ALLOWED);
|
||||
"pk_setting = %d\n\n", CONFIG_PK_SETTING);
|
||||
fprintf(fl, "* Is player thieving allowed on the mud?\n"
|
||||
"pt_allowed = %d\n\n", CONFIG_PT_ALLOWED);
|
||||
"pt_setting = %d\n\n", CONFIG_PT_SETTING);
|
||||
fprintf(fl, "* What is the minimum level a player can shout/gossip/etc?\n"
|
||||
"level_can_shout = %d\n\n", CONFIG_LEVEL_CAN_SHOUT);
|
||||
fprintf(fl, "* How many movement points does shouting cost the player?\n"
|
||||
@@ -608,8 +608,10 @@ static void cedit_disp_menu(struct descriptor_data *d)
|
||||
|
||||
static void cedit_disp_game_play_options(struct descriptor_data *d)
|
||||
{
|
||||
int m_opt;
|
||||
int m_opt, pk_setting, pt_setting;
|
||||
m_opt = OLC_CONFIG(d)->play.map_option;
|
||||
pk_setting = OLC_CONFIG(d)->play.pk_setting;
|
||||
pt_setting = OLC_CONFIG(d)->play.pt_setting;
|
||||
get_char_colors(d->character);
|
||||
clear_screen(d);
|
||||
|
||||
@@ -644,8 +646,8 @@ static void cedit_disp_game_play_options(struct descriptor_data *d)
|
||||
"%s8%s) Scripts on PC's : %s%s\r\n"
|
||||
"%sQ%s) Exit To The Main Menu\r\n"
|
||||
"Enter your choice : ",
|
||||
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.pk_allowed),
|
||||
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.pt_allowed),
|
||||
grn, nrm, cyn, pk_setting == 0 ? "Off" : (pk_setting == 1 ? "Limited" : (pk_setting == 2 ? "Free-for-all" : "Invalid!")),
|
||||
grn, nrm, cyn, pt_setting == 0 ? "Off" : (pt_setting == 1 ? "Limited" : (pt_setting == 2 ? "Free-for-all" : "Invalid!")),
|
||||
grn, nrm, cyn, OLC_CONFIG(d)->play.level_can_shout,
|
||||
grn, nrm, cyn, OLC_CONFIG(d)->play.holler_move_cost,
|
||||
grn, nrm, cyn, OLC_CONFIG(d)->play.tunnel_size,
|
||||
@@ -883,13 +885,21 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||
switch (*arg) {
|
||||
case 'a':
|
||||
case 'A':
|
||||
TOGGLE_VAR(OLC_CONFIG(d)->play.pk_allowed);
|
||||
break;
|
||||
write_to_output(d, "1) No Player Killing\r\n");
|
||||
write_to_output(d, "2) Limited Player Killing\r\n");
|
||||
write_to_output(d, "3) Free-for-all!\r\n");
|
||||
write_to_output(d, "Enter choice: ");
|
||||
OLC_MODE(d) = CEDIT_PK_SETTING;
|
||||
return;
|
||||
|
||||
case 'b':
|
||||
case 'B':
|
||||
TOGGLE_VAR(OLC_CONFIG(d)->play.pt_allowed);
|
||||
break;
|
||||
write_to_output(d, "1) No Player Thieving\r\n");
|
||||
write_to_output(d, "2) Limited Player Thieving\r\n");
|
||||
write_to_output(d, "3) Free-for-all!\r\n");
|
||||
write_to_output(d, "Enter choice: ");
|
||||
OLC_MODE(d) = CEDIT_PT_SETTING;
|
||||
return;
|
||||
|
||||
case 'c':
|
||||
case 'C':
|
||||
@@ -1708,6 +1718,30 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||
}
|
||||
break;
|
||||
|
||||
case CEDIT_PK_SETTING:
|
||||
if (!*arg || (atoi(arg) < 0) || (atoi(arg) > 3) ) {
|
||||
write_to_output(d,
|
||||
"That is an invalid choice!\r\n"
|
||||
"Select 1, 2 or 3 (0 to cancel) :");
|
||||
} else {
|
||||
if ((atoi(arg) >= 1) && (atoi(arg) <= 3))
|
||||
OLC_CONFIG(d)->play.pk_setting = (atoi(arg) - 1);
|
||||
cedit_disp_game_play_options(d);
|
||||
}
|
||||
break;
|
||||
|
||||
case CEDIT_PT_SETTING:
|
||||
if (!*arg || (atoi(arg) < 0) || (atoi(arg) > 3) ) {
|
||||
write_to_output(d,
|
||||
"That is an invalid choice!\r\n"
|
||||
"Select 1, 2 or 3 (0 to cancel) :");
|
||||
} else {
|
||||
if ((atoi(arg) >= 1) && (atoi(arg) <= 3))
|
||||
OLC_CONFIG(d)->play.pt_setting = (atoi(arg) - 1);
|
||||
cedit_disp_game_play_options(d);
|
||||
}
|
||||
break;
|
||||
|
||||
default: /* We should never get here, but just in case... */
|
||||
cleanup_olc(d, CLEANUP_CONFIG);
|
||||
mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: cedit_parse(): Reached default case!");
|
||||
|
||||
+1
-2
@@ -191,7 +191,7 @@ void gettimeofday(struct timeval *t, struct timezone *dummy)
|
||||
|
||||
#endif /* CIRCLE_WINDOWS || CIRCLE_MACINTOSH */
|
||||
|
||||
int _main(int argc, char **argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int pos = 1;
|
||||
const char *dir;
|
||||
@@ -383,7 +383,6 @@ int _main(int argc, char **argv)
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/* Reload players after a copyover */
|
||||
void copyover_recover()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#define COPYOVER_FILE "copyover.dat"
|
||||
|
||||
/* comm.c */
|
||||
int _main(int argc, char **argv);
|
||||
void close_socket(struct descriptor_data *d);
|
||||
void game_info(const char *messg, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
size_t send_to_char(struct char_data *ch, const char *messg, ...) __attribute__
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* 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_ */
|
||||
@@ -0,0 +1,82 @@
|
||||
/* 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_ */
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/* 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
@@ -0,0 +1,300 @@
|
||||
/* 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_ */
|
||||
+18
-8
@@ -39,15 +39,25 @@
|
||||
/* Can Scripts be attached to players? */
|
||||
int script_players = NO;
|
||||
|
||||
/* pk_allowed sets the tone of the entire game. If pk_allowed is set to NO,
|
||||
* then players will not be allowed to kill, summon, charm, or sleep other
|
||||
* players, as well as a variety of other "asshole player" protections. However,
|
||||
* if you decide you want to have an all-out knock-down drag-out PK Mud, just
|
||||
* set pk_allowed to YES - and anything goes. */
|
||||
int pk_allowed = NO;
|
||||
/* pk_setting sets the tone of the entire game.
|
||||
*
|
||||
* CONFIG_PK_OFF 0 Players are prevented from damaging or fighting other players in code
|
||||
* CONFIG_PK_LIMITED 1 Players may damage and fight but will be flagged PLR_KILLER
|
||||
* CONFIG_PK_FREEFORALL 2 No restrictions or flags for player damaging or killing
|
||||
*
|
||||
* If pk_setting is set to 0, then players will not be allowed to kill, summon, charm, or sleep other
|
||||
* players, as well as a variety of other "asshole player" protections.
|
||||
* However, if you decide you want to have an all-out knock-down drag-out PK Mud, just
|
||||
* set pk_setting to 2 - and anything goes. */
|
||||
int pk_setting = 0;
|
||||
|
||||
/* Is playerthieving allowed? */
|
||||
int pt_allowed = NO;
|
||||
/* Is playerthieving allowed?
|
||||
*
|
||||
* CONFIG_PT_OFF 0 Players are prevented from stealing from other players in code
|
||||
* CONFIG_PT_LIMITED 1 Players may steal from other players but will be flagged PLR_THIEF if caught
|
||||
* CONFIG_PT_FREEFORALL 2 No restrictions or flags for player stealing
|
||||
*/
|
||||
int pt_setting = 0;
|
||||
|
||||
/* Minimum level a player must be to shout/holler/gossip/auction. */
|
||||
int level_can_shout = 1;
|
||||
|
||||
+2
-2
@@ -14,9 +14,9 @@
|
||||
#define _CONFIG_H_
|
||||
|
||||
/* Global variable declarations, all settable by cedit */
|
||||
extern int pk_allowed;
|
||||
extern int pk_setting;
|
||||
extern int script_players;
|
||||
extern int pt_allowed;
|
||||
extern int pt_setting;
|
||||
extern int level_can_shout;
|
||||
extern int holler_move_cost;
|
||||
extern int tunnel_size;
|
||||
|
||||
@@ -44,26 +44,26 @@
|
||||
struct config_data config_info; /* Game configuration list. */
|
||||
|
||||
struct room_data *world = NULL; /* array of rooms */
|
||||
room_rnum top_of_world = NOWHERE; /* ref to top element of world */
|
||||
room_rnum top_of_world = 0; /* ref to top element of world */
|
||||
|
||||
struct char_data *character_list = NULL; /* global linked list of chars */
|
||||
struct index_data *mob_index; /* index table for mobile file */
|
||||
struct char_data *mob_proto; /* prototypes for mobs */
|
||||
mob_rnum top_of_mobt = NOBODY; /* top of mobile index table */
|
||||
mob_rnum top_of_mobt = 0; /* top of mobile index table */
|
||||
|
||||
struct obj_data *object_list = NULL; /* global linked list of objs */
|
||||
struct index_data *obj_index; /* index table for object file */
|
||||
struct obj_data *obj_proto; /* prototypes for objs */
|
||||
obj_rnum top_of_objt = NOTHING; /* top of object index table */
|
||||
obj_rnum top_of_objt = 0; /* top of object index table */
|
||||
|
||||
struct zone_data *zone_table; /* zone table */
|
||||
zone_rnum top_of_zone_table = NOTHING;/* top element of zone tab */
|
||||
zone_rnum top_of_zone_table = 0;/* top element of zone tab */
|
||||
|
||||
/* begin previously located in players.c */
|
||||
struct player_index_element *player_table = NULL; /* index to plr file */
|
||||
int top_of_p_table = NOBODY; /* ref to top of table */
|
||||
int top_of_p_file = NOBODY; /* ref of size of p file */
|
||||
long top_idnum = NOBODY; /* highest idnum in use */
|
||||
int top_of_p_table = 0; /* ref to top of table */
|
||||
int top_of_p_file = 0; /* ref of size of p file */
|
||||
long top_idnum = 0; /* highest idnum in use */
|
||||
/* end previously located in players.c */
|
||||
|
||||
struct message_list fight_messages[MAX_MESSAGES]; /* fighting messages */
|
||||
@@ -528,7 +528,6 @@ void destroy_db(void)
|
||||
}
|
||||
|
||||
/* Rooms */
|
||||
if (top_of_world != NOWHERE) {
|
||||
for (cnt = 0; cnt <= top_of_world; cnt++) {
|
||||
if (world[cnt].name)
|
||||
free(world[cnt].name);
|
||||
@@ -554,7 +553,7 @@ void destroy_db(void)
|
||||
free_proto_script(&world[cnt], WLD_TRIGGER);
|
||||
|
||||
for (itr = 0; itr < NUM_OF_DIRS; itr++) { /* NUM_OF_DIRS here, not DIR_COUNT */
|
||||
if (world[cnt].dir_option[itr] == NULL)
|
||||
if (!world[cnt].dir_option[itr])
|
||||
continue;
|
||||
|
||||
if (world[cnt].dir_option[itr]->general_description)
|
||||
@@ -565,11 +564,9 @@ void destroy_db(void)
|
||||
}
|
||||
}
|
||||
free(world);
|
||||
top_of_world = NOWHERE;
|
||||
}
|
||||
top_of_world = 0;
|
||||
|
||||
/* Objects */
|
||||
if (top_of_objt != NOTHING) {
|
||||
for (cnt = 0; cnt <= top_of_objt; cnt++) {
|
||||
if (obj_proto[cnt].name)
|
||||
free(obj_proto[cnt].name);
|
||||
@@ -586,11 +583,8 @@ void destroy_db(void)
|
||||
}
|
||||
free(obj_proto);
|
||||
free(obj_index);
|
||||
top_of_objt = NOTHING;
|
||||
}
|
||||
|
||||
/* Mobiles */
|
||||
if (top_of_mobt != NOBODY) {
|
||||
for (cnt = 0; cnt <= top_of_mobt; cnt++) {
|
||||
if (mob_proto[cnt].player.name)
|
||||
free(mob_proto[cnt].player.name);
|
||||
@@ -611,8 +605,7 @@ void destroy_db(void)
|
||||
}
|
||||
free(mob_proto);
|
||||
free(mob_index);
|
||||
top_of_mobt = NOBODY;
|
||||
}
|
||||
|
||||
/* Shops */
|
||||
destroy_shops();
|
||||
|
||||
@@ -622,8 +615,6 @@ void destroy_db(void)
|
||||
/* Zones */
|
||||
#define THIS_CMD zone_table[cnt].cmd[itr]
|
||||
|
||||
if (top_of_zone_table != NOWHERE)
|
||||
{
|
||||
for (cnt = 0; cnt <= top_of_zone_table; cnt++) {
|
||||
if (zone_table[cnt].name)
|
||||
free(zone_table[cnt].name);
|
||||
@@ -643,8 +634,7 @@ void destroy_db(void)
|
||||
}
|
||||
}
|
||||
free(zone_table);
|
||||
top_of_zone_table = NOWHERE;
|
||||
}
|
||||
|
||||
#undef THIS_CMD
|
||||
|
||||
/* zone table reset queue */
|
||||
@@ -658,8 +648,6 @@ void destroy_db(void)
|
||||
}
|
||||
|
||||
/* Triggers */
|
||||
if (top_of_trigt != NOTHING)
|
||||
{
|
||||
for (cnt=0; cnt < top_of_trigt; cnt++) {
|
||||
if (trig_index[cnt]->proto) {
|
||||
/* make sure to nuke the command list (memory leak) */
|
||||
@@ -680,8 +668,7 @@ void destroy_db(void)
|
||||
free(trig_index[cnt]);
|
||||
}
|
||||
free(trig_index);
|
||||
top_of_trigt = NOTHING;
|
||||
}
|
||||
|
||||
/* Events */
|
||||
event_free_all();
|
||||
|
||||
@@ -3851,8 +3838,8 @@ static void load_default_config( void )
|
||||
/* This function is called only once, at boot-time. We assume config_info is
|
||||
* empty. -Welcor */
|
||||
/* Game play options. */
|
||||
CONFIG_PK_ALLOWED = pk_allowed;
|
||||
CONFIG_PT_ALLOWED = pt_allowed;
|
||||
CONFIG_PK_SETTING = pk_setting;
|
||||
CONFIG_PT_SETTING = pt_setting;
|
||||
CONFIG_LEVEL_CAN_SHOUT = level_can_shout;
|
||||
CONFIG_HOLLER_MOVE_COST = holler_move_cost;
|
||||
CONFIG_TUNNEL_SIZE = tunnel_size;
|
||||
@@ -4126,12 +4113,12 @@ void load_config( void )
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
if (!str_cmp(tag, "pk_allowed"))
|
||||
CONFIG_PK_ALLOWED = num;
|
||||
if (!str_cmp(tag, "pk_setting"))
|
||||
CONFIG_PK_SETTING = num;
|
||||
else if (!str_cmp(tag, "protocol_negotiation"))
|
||||
CONFIG_PROTOCOL_NEGOTIATION = num;
|
||||
else if (!str_cmp(tag, "pt_allowed"))
|
||||
CONFIG_PT_ALLOWED = num;
|
||||
else if (!str_cmp(tag, "pt_setting"))
|
||||
CONFIG_PT_SETTING = num;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
|
||||
+6
-3
@@ -147,7 +147,7 @@ void greet_memory_mtrigger(char_data *actor)
|
||||
{
|
||||
trig_data *t;
|
||||
char_data *ch;
|
||||
struct script_memory *mem;
|
||||
struct script_memory *mem, *next_mem;
|
||||
char buf[MAX_INPUT_LENGTH];
|
||||
int command_performed = 0;
|
||||
|
||||
@@ -159,7 +159,8 @@ void greet_memory_mtrigger(char_data *actor)
|
||||
AFF_FLAGGED(ch, AFF_CHARM))
|
||||
continue;
|
||||
/* find memory line with command only */
|
||||
for (mem = SCRIPT_MEM(ch); mem && SCRIPT_MEM(ch); mem=mem->next) {
|
||||
for (mem = SCRIPT_MEM(ch); mem && SCRIPT_MEM(ch); mem = next_mem) {
|
||||
next_mem = mem->next;
|
||||
if (char_script_id(actor)!=mem->id) continue;
|
||||
if (mem->cmd) {
|
||||
command_interpreter(ch, mem->cmd); /* no script */
|
||||
@@ -245,7 +246,8 @@ void entry_memory_mtrigger(char_data *ch)
|
||||
for (actor = world[IN_ROOM(ch)].people; actor && SCRIPT_MEM(ch);
|
||||
actor = actor->next_in_room) {
|
||||
if (actor!=ch && SCRIPT_MEM(ch)) {
|
||||
for (mem = SCRIPT_MEM(ch); mem && SCRIPT_MEM(ch); mem = mem->next) {
|
||||
for (mem = SCRIPT_MEM(ch); mem && SCRIPT_MEM(ch); ) {
|
||||
struct script_memory *next_mem = mem->next;
|
||||
if (char_script_id(actor)==mem->id) {
|
||||
struct script_memory *prev;
|
||||
if (mem->cmd) command_interpreter(ch, mem->cmd);
|
||||
@@ -270,6 +272,7 @@ void entry_memory_mtrigger(char_data *ch)
|
||||
if (mem->cmd) free(mem->cmd);
|
||||
free(mem);
|
||||
}
|
||||
mem = next_mem;
|
||||
} /* for (mem =..... */
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -465,7 +465,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||
* will return the number of bags of gold.
|
||||
* Addition inspired by Jamie Nelson */
|
||||
else if (!str_cmp(var, "findmob")) {
|
||||
if (!field || !*field || !subfield || !*subfield) {
|
||||
if (!*field || !subfield || !*subfield) {
|
||||
script_log("findmob.vnum(mvnum) - illegal syntax");
|
||||
strcpy(str, "0");
|
||||
} else {
|
||||
@@ -486,7 +486,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
||||
}
|
||||
/* Addition inspired by Jamie Nelson. */
|
||||
else if (!str_cmp(var, "findobj")) {
|
||||
if (!field || !*field || !subfield || !*subfield) {
|
||||
if (!*field || !subfield || !*subfield) {
|
||||
script_log("findobj.vnum(ovnum) - illegal syntax");
|
||||
strcpy(str, "0");
|
||||
} else {
|
||||
|
||||
+33
-11
@@ -110,10 +110,13 @@ void update_pos(struct char_data *victim)
|
||||
|
||||
void check_killer(struct char_data *ch, struct char_data *vict)
|
||||
{
|
||||
if (PLR_FLAGGED(vict, PLR_KILLER) || PLR_FLAGGED(vict, PLR_THIEF))
|
||||
if (PLR_FLAGGED(vict, PLR_KILLER) || PLR_FLAGGED(vict, PLR_THIEF)) {
|
||||
return;
|
||||
if (PLR_FLAGGED(ch, PLR_KILLER) || IS_NPC(ch) || IS_NPC(vict) || ch == vict)
|
||||
}
|
||||
|
||||
if (PLR_FLAGGED(ch, PLR_KILLER) || IS_NPC(ch) || IS_NPC(vict) || ch == vict){
|
||||
return;
|
||||
}
|
||||
|
||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_KILLER);
|
||||
send_to_char(ch, "If you want to be a PLAYER KILLER, so be it...\r\n");
|
||||
@@ -122,6 +125,22 @@ void check_killer(struct char_data *ch, struct char_data *vict)
|
||||
GET_NAME(ch), GET_NAME(vict), world[IN_ROOM(vict)].name);
|
||||
}
|
||||
|
||||
bool pk_allowed(struct char_data *ch, struct char_data *victim)
|
||||
{
|
||||
/* NPCs are never restricted */
|
||||
if (IS_NPC(ch) || IS_NPC(victim))
|
||||
return true;
|
||||
|
||||
if (CONFIG_PK_SETTING == CONFIG_PK_OFF)
|
||||
return false;
|
||||
|
||||
if (CONFIG_PK_SETTING == CONFIG_PK_LIMITED)
|
||||
check_killer(ch, victim);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* start one char fighting another (yes, it is horrible, I know... ) */
|
||||
void set_fighting(struct char_data *ch, struct char_data *vict)
|
||||
{
|
||||
@@ -133,6 +152,12 @@ void set_fighting(struct char_data *ch, struct char_data *vict)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!pk_allowed(ch, vict)) {
|
||||
send_to_char(ch, "Player killing is not permitted.\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ch->next_fighting = combat_list;
|
||||
combat_list = ch;
|
||||
|
||||
@@ -142,8 +167,6 @@ void set_fighting(struct char_data *ch, struct char_data *vict)
|
||||
FIGHTING(ch) = vict;
|
||||
GET_POS(ch) = POS_FIGHTING;
|
||||
|
||||
if (!CONFIG_PK_ALLOWED)
|
||||
check_killer(ch, vict);
|
||||
}
|
||||
|
||||
/* remove a char from the list of fighting chars */
|
||||
@@ -603,6 +626,12 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
||||
return (-1); /* -je, 7/7/92 */
|
||||
}
|
||||
|
||||
/* Check for PK if this is not a PK MUD */
|
||||
if (!pk_allowed(ch, victim)) {
|
||||
send_to_char(ch, "Player killing is not permitted.\r\n");
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* peaceful rooms */
|
||||
if (ch->nr != real_mobile(DG_CASTER_PROXY) &&
|
||||
ch != victim && ROOM_FLAGGED(IN_ROOM(ch), ROOM_PEACEFUL)) {
|
||||
@@ -650,13 +679,6 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
||||
if (AFF_FLAGGED(victim, AFF_SANCTUARY) && dam >= 2)
|
||||
dam /= 2;
|
||||
|
||||
/* Check for PK if this is not a PK MUD */
|
||||
if (!CONFIG_PK_ALLOWED) {
|
||||
check_killer(ch, victim);
|
||||
if (PLR_FLAGGED(ch, PLR_KILLER) && (ch != victim))
|
||||
dam = 0;
|
||||
}
|
||||
|
||||
/* Set the maximum damage per round and subtract the hit points */
|
||||
dam = MAX(MIN(dam, 100), 0);
|
||||
GET_HIT(victim) -= dam;
|
||||
|
||||
@@ -34,6 +34,7 @@ void set_fighting(struct char_data *ch, struct char_data *victim);
|
||||
int skill_message(int dam, struct char_data *ch, struct char_data *vict,
|
||||
int attacktype);
|
||||
void stop_fighting(struct char_data *ch);
|
||||
bool pk_allowed(struct char_data *ch, struct char_data *victim);
|
||||
|
||||
|
||||
/* Global variables */
|
||||
|
||||
+2
-4
@@ -592,16 +592,14 @@ int get_number(char **name)
|
||||
{
|
||||
int i;
|
||||
char *ppos;
|
||||
char number[MAX_INPUT_LENGTH], tmp[MAX_INPUT_LENGTH];
|
||||
char number[MAX_INPUT_LENGTH];
|
||||
|
||||
*number = '\0';
|
||||
|
||||
if ((ppos = strchr(*name, '.')) != NULL) {
|
||||
*ppos++ = '\0';
|
||||
strlcpy(number, *name, sizeof(number));
|
||||
// avoid overlapping strings in strcpy which is undefined behaviour
|
||||
strcpy(tmp, ppos); /* strcpy: OK (always smaller) */
|
||||
strcpy(*name, tmp); /* strcpy: OK (always smaller) */
|
||||
strcpy(*name, ppos); /* strcpy: OK (always smaller) */
|
||||
|
||||
for (i = 0; *(number + i); i++)
|
||||
if (!isdigit(*(number + i)))
|
||||
|
||||
+2
-2
@@ -367,7 +367,7 @@ void parse_edit_action(int command, char *string, struct descriptor_data *d)
|
||||
s++;
|
||||
temp = *s;
|
||||
*s = '\0';
|
||||
char buf3[9];
|
||||
char buf3[13];
|
||||
sprintf(buf3, "%4d: ", (i - 1));
|
||||
strncat(buf, buf3, sizeof(buf) - strlen(buf) - 1);
|
||||
strncat(buf, t, sizeof(buf) - strlen(buf) - 1);
|
||||
@@ -421,7 +421,7 @@ void parse_edit_action(int command, char *string, struct descriptor_data *d)
|
||||
strncat(buf, *d->str, sizeof(buf) - strlen(buf) - 1);
|
||||
*s = temp;
|
||||
strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1);
|
||||
if (s && *s)
|
||||
if (*s)
|
||||
strncat(buf, s, sizeof(buf) - strlen(buf) - 1);
|
||||
RECREATE(*d->str, char, strlen(buf) + 3);
|
||||
|
||||
|
||||
+2
-1
@@ -1612,8 +1612,9 @@ void nanny(struct descriptor_data *d, char *arg)
|
||||
if (load_result == CLASS_UNDEFINED) {
|
||||
write_to_output(d, "\r\nThat's not a class.\r\nClass: ");
|
||||
return;
|
||||
} else
|
||||
} else {
|
||||
GET_CLASS(d->character) = load_result;
|
||||
}
|
||||
|
||||
if (d->olc) {
|
||||
free(d->olc);
|
||||
|
||||
+2
-2
@@ -473,7 +473,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
|
||||
break;
|
||||
|
||||
case SPELL_SLEEP:
|
||||
if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(victim))
|
||||
if ((CONFIG_PK_SETTING == CONFIG_PK_OFF) && !IS_NPC(ch) && !IS_NPC(victim))
|
||||
return;
|
||||
if (MOB_FLAGGED(victim, MOB_NOSLEEP))
|
||||
return;
|
||||
@@ -650,7 +650,7 @@ void mag_areas(int level, struct char_data *ch, int spellnum, int savetype)
|
||||
continue;
|
||||
if (!IS_NPC(tch) && GET_LEVEL(tch) >= LVL_IMMORT)
|
||||
continue;
|
||||
if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(tch))
|
||||
if ((CONFIG_PK_SETTING == CONFIG_PK_OFF) && !IS_NPC(ch) && !IS_NPC(tch))
|
||||
continue;
|
||||
if (!IS_NPC(ch) && IS_NPC(tch) && AFF_FLAGGED(tch, AFF_CHARM))
|
||||
continue;
|
||||
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
/**************************************************************************
|
||||
* 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
Submodule src/munit deleted from fbbdf1467e
@@ -380,6 +380,8 @@ extern const char *nrm, *grn, *cyn, *yel;
|
||||
#define CEDIT_MAP_SIZE 55
|
||||
#define CEDIT_MINIMAP_SIZE 56
|
||||
#define CEDIT_DEBUG_MODE 57
|
||||
#define CEDIT_PK_SETTING 58
|
||||
#define CEDIT_PT_SETTING 59
|
||||
|
||||
/* Hedit Submodes of connectedness. */
|
||||
#define HEDIT_CONFIRM_SAVESTRING 0
|
||||
|
||||
+6
-1
@@ -2102,9 +2102,11 @@ static void ExecuteMSDPPair( descriptor_t *apDescriptor, const char *apVariable,
|
||||
!strcmp(apDescriptor->pProtocol->pVariables[i]->pValueString, "Unknown") )
|
||||
{
|
||||
/* Store the new value if it's valid */
|
||||
char *pBuffer = alloca(VariableNameTable[i].Max+1);
|
||||
char *pBuffer = malloc(VariableNameTable[i].Max + 1);
|
||||
int j; /* Loop counter */
|
||||
|
||||
if ( pBuffer != NULL )
|
||||
{
|
||||
for ( j = 0; j < VariableNameTable[i].Max && *apValue != '\0'; ++apValue )
|
||||
{
|
||||
if ( isprint(*apValue) )
|
||||
@@ -2117,6 +2119,9 @@ static void ExecuteMSDPPair( descriptor_t *apDescriptor, const char *apVariable,
|
||||
free(apDescriptor->pProtocol->pVariables[i]->pValueString);
|
||||
apDescriptor->pProtocol->pVariables[i]->pValueString = AllocString(pBuffer);
|
||||
}
|
||||
|
||||
free(pBuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
else /* This variable only accepts numeric values */
|
||||
|
||||
+4
-2
@@ -410,8 +410,10 @@ void autoquest_trigger_check(struct char_data *ch, struct char_data *vict,
|
||||
break;
|
||||
case AQ_OBJ_RETURN:
|
||||
if (IS_NPC(vict) && (GET_MOB_VNUM(vict) == QST_RETURNMOB(rnum)))
|
||||
if (object && (GET_OBJ_VNUM(object) == QST_TARGET(rnum)))
|
||||
if (object && (GET_OBJ_VNUM(object) == QST_TARGET(rnum))) {
|
||||
generic_complete_quest(ch);
|
||||
extract_obj(object);
|
||||
}
|
||||
break;
|
||||
case AQ_ROOM_CLEAR:
|
||||
if (QST_TARGET(rnum) == world[IN_ROOM(ch)].number) {
|
||||
@@ -648,7 +650,7 @@ static void quest_show(struct char_data *ch, mob_vnum qm)
|
||||
send_to_char(ch, "There are no quests available here at the moment.\r\n");
|
||||
}
|
||||
|
||||
static void quest_stat(struct char_data *ch, char argument[MAX_STRING_LENGTH])
|
||||
static void quest_stat(struct char_data *ch, char *argument)
|
||||
{
|
||||
qst_rnum rnum;
|
||||
mob_rnum qmrnum;
|
||||
|
||||
+1
-1
@@ -1052,7 +1052,7 @@ static void read_line(FILE *shop_f, const char *string, void *data)
|
||||
{
|
||||
char buf[READ_SIZE];
|
||||
|
||||
if (!get_line(shop_f, buf) || !sscanf(buf, string, data)) {
|
||||
if (!get_line(shop_f, buf) || sscanf(buf, string, data) != 1) {
|
||||
log("SYSERR: Error in shop #%d, near '%s' with '%s'", SHOP_NUM(top_shop), buf, string);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
+2
-2
@@ -202,9 +202,9 @@ SPECIAL(mayor)
|
||||
{
|
||||
char actbuf[MAX_INPUT_LENGTH];
|
||||
|
||||
const char open_path[] =
|
||||
static const char open_path[] =
|
||||
"W3a3003b33000c111d0d111Oe333333Oe22c222112212111a1S.";
|
||||
const char close_path[] =
|
||||
static const char close_path[] =
|
||||
"W3a3003b33000c111d0d111CE333333CE22c222112212111a1S.";
|
||||
|
||||
static const char *path = NULL;
|
||||
|
||||
+2
-2
@@ -120,7 +120,7 @@ ASPELL(spell_summon)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CONFIG_PK_ALLOWED) {
|
||||
if (CONFIG_PK_SETTING == CONFIG_PK_OFF) {
|
||||
if (MOB_FLAGGED(victim, MOB_AGGRESSIVE)) {
|
||||
act("As the words escape your lips and $N travels\r\n"
|
||||
"through time and space towards you, you realize that $E is\r\n"
|
||||
@@ -265,7 +265,7 @@ ASPELL(spell_charm)
|
||||
else if (AFF_FLAGGED(victim, AFF_CHARM) || level < GET_LEVEL(victim))
|
||||
send_to_char(ch, "You fail.\r\n");
|
||||
/* player charming another player - no legal reason for this */
|
||||
else if (!CONFIG_PK_ALLOWED && !IS_NPC(victim))
|
||||
else if ((CONFIG_PK_SETTING == CONFIG_PK_OFF) && !IS_NPC(victim))
|
||||
send_to_char(ch, "You fail - shouldn't be doing it anyway.\r\n");
|
||||
else if (circle_follow(victim, ch))
|
||||
send_to_char(ch, "Sorry, following in circles is not allowed.\r\n");
|
||||
|
||||
+2
-2
@@ -1291,8 +1291,8 @@ struct recent_player
|
||||
* variables. */
|
||||
struct game_data
|
||||
{
|
||||
int pk_allowed; /**< Is player killing allowed? */
|
||||
int pt_allowed; /**< Is player thieving allowed? */
|
||||
int pk_setting; /**< Is player killing allowed? */
|
||||
int pt_setting; /**< Is player thieving allowed? */
|
||||
int level_can_shout; /**< Level player must be to shout. */
|
||||
int holler_move_cost; /**< Cost to holler in move points. */
|
||||
int tunnel_size; /**< Number of people allowed in a tunnel.*/
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
# 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
|
||||
@@ -1,47 +0,0 @@
|
||||
# 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`
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#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 }
|
||||
};
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#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
|
||||
@@ -1,14 +0,0 @@
|
||||
#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 }
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "testrunner.h"
|
||||
|
||||
#ifndef TEST_EXAMPLE_H
|
||||
#define TEST_EXAMPLE_H
|
||||
|
||||
extern MunitTest test_example_c_tests[];
|
||||
|
||||
UNIT_TEST(example_test);
|
||||
|
||||
#endif
|
||||
@@ -1,46 +0,0 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#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
|
||||
@@ -1,34 +0,0 @@
|
||||
#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 }
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "testrunner.h"
|
||||
|
||||
#ifndef TEST_HANDLER_H
|
||||
#define TEST_HANDLER_H
|
||||
|
||||
extern MunitTest handler_c_tests[];
|
||||
|
||||
UNIT_TEST(test_get_number);
|
||||
|
||||
#endif
|
||||
@@ -1,57 +0,0 @@
|
||||
#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;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
#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
|
||||
@@ -9,7 +9,6 @@ set(TOOLS
|
||||
sign
|
||||
split
|
||||
wld2html
|
||||
webster
|
||||
)
|
||||
|
||||
# common includes and flags
|
||||
|
||||
+8
-2
@@ -939,9 +939,15 @@ do \
|
||||
#define CONFIG_CONFFILE config_info.CONFFILE
|
||||
|
||||
/** Player killing allowed or not? */
|
||||
#define CONFIG_PK_ALLOWED config_info.play.pk_allowed
|
||||
#define CONFIG_PK_SETTING config_info.play.pk_setting
|
||||
#define CONFIG_PK_OFF 0 /* Players are prevented from damaging or fighting other players in code */
|
||||
#define CONFIG_PK_LIMITED 1 /* Players may damage and fight but will be flagged PLR_KILLER */
|
||||
#define CONFIG_PK_FREEFORALL 2 /* No restrictions or flags for player damaging or killing */
|
||||
/** Player thieving allowed or not? */
|
||||
#define CONFIG_PT_ALLOWED config_info.play.pt_allowed
|
||||
#define CONFIG_PT_SETTING config_info.play.pt_setting
|
||||
#define CONFIG_PT_OFF 0 /* Players are prevented from stealing from other players in code */
|
||||
#define CONFIG_PT_LIMITED 1 /* Players may steal from other players but will be flagged PLR_THIEF if caught */
|
||||
#define CONFIG_PT_FREEFORALL 2 /* No restrictions or flags for player stealing */
|
||||
/** What level to use the shout command? */
|
||||
#define CONFIG_LEVEL_CAN_SHOUT config_info.play.level_can_shout
|
||||
/** How many move points does holler cost? */
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
# tests/CMakeLists.txt
|
||||
# Unity-based unit tests for tbaMUD
|
||||
#
|
||||
# Each test executable is built from:
|
||||
# vendor/unity/unity.c — test framework
|
||||
# test_stubs.c — weak-symbol stubs for all unresolved mud globals
|
||||
# src/<module>.c — the source file(s) under test
|
||||
# test_<name>.c — the test file itself
|
||||
#
|
||||
# Only the source files being tested are compiled — in particular comm.c
|
||||
# (which contains main()) is never included.
|
||||
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
enable_testing()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Common settings shared by all test targets
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
set(UNITY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/unity/unity.c)
|
||||
set(STUBS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/test_stubs.c)
|
||||
|
||||
set(MUD_SRCDIR ${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
# Include paths: mud source dir for conf.h / structs.h etc.,
|
||||
# CMake binary dir for the generated conf.h (cmake builds place it there),
|
||||
# and the Unity header dir.
|
||||
set(TEST_INCLUDES
|
||||
${MUD_SRCDIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vendor/unity
|
||||
)
|
||||
|
||||
# Suppress warnings that fire in generated stubs / vendored code and in the
|
||||
# mud sources when compiled outside their normal full-build context.
|
||||
set(TEST_CFLAGS)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
|
||||
list(APPEND TEST_CFLAGS
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-function
|
||||
-Wno-unused-variable
|
||||
)
|
||||
endif()
|
||||
|
||||
# Helper macro: add_mud_test(name SRC1 [SRC2 …])
|
||||
# Creates an executable, registers it with CTest.
|
||||
macro(add_mud_test TEST_NAME)
|
||||
add_executable(${TEST_NAME}
|
||||
${UNITY_SRC}
|
||||
${STUBS_SRC}
|
||||
${ARGN}
|
||||
)
|
||||
target_include_directories(${TEST_NAME} PRIVATE ${TEST_INCLUDES})
|
||||
target_compile_options(${TEST_NAME} PRIVATE ${TEST_CFLAGS})
|
||||
add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
|
||||
endmacro()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_utils — covers src/utils.c
|
||||
# ---------------------------------------------------------------------------
|
||||
add_mud_test(test_utils
|
||||
${MUD_SRCDIR}/utils.c
|
||||
${MUD_SRCDIR}/random.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_utils.c
|
||||
)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_random — covers src/random.c and rand_number/dice in src/utils.c
|
||||
# ---------------------------------------------------------------------------
|
||||
add_mud_test(test_random
|
||||
${MUD_SRCDIR}/random.c
|
||||
${MUD_SRCDIR}/utils.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_random.c
|
||||
)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_interpreter — covers string helpers in src/interpreter.c
|
||||
# ---------------------------------------------------------------------------
|
||||
add_mud_test(test_interpreter
|
||||
${MUD_SRCDIR}/interpreter.c
|
||||
${MUD_SRCDIR}/utils.c
|
||||
${MUD_SRCDIR}/random.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_interpreter.c
|
||||
)
|
||||
|
||||
# crypt() is referenced from interpreter.c (nanny password hashing).
|
||||
# Reuse the crypt library detected by the top-level build when one is needed;
|
||||
# on platforms where crypt() is provided by libc, no extra link library is
|
||||
# required.
|
||||
if(CRYPT_LIBRARY)
|
||||
target_link_libraries(test_interpreter PRIVATE ${CRYPT_LIBRARY})
|
||||
endif()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_class — covers src/class.c
|
||||
# ---------------------------------------------------------------------------
|
||||
add_mud_test(test_class
|
||||
${MUD_SRCDIR}/class.c
|
||||
${MUD_SRCDIR}/utils.c
|
||||
${MUD_SRCDIR}/random.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_class.c
|
||||
)
|
||||
@@ -0,0 +1,96 @@
|
||||
# tests/Makefile.in
|
||||
# Autoconf template — processed by configure to produce tests/Makefile.
|
||||
#
|
||||
# Build and run the tbaMUD unit-test suite.
|
||||
# Usage (after running ./configure from the project root):
|
||||
#
|
||||
# cd tests && make # build all test binaries
|
||||
# cd tests && make test # build and run all tests
|
||||
|
||||
CC = @CC@
|
||||
MYFLAGS = @MYFLAGS@
|
||||
CFLAGS = @CFLAGS@ $(MYFLAGS)
|
||||
LIBS = @LIBS@ @CRYPTLIB@ @NETLIB@
|
||||
|
||||
SRCDIR = ../src
|
||||
UNITYDIR = vendor/unity
|
||||
|
||||
# Include paths:
|
||||
# ../src — mud headers and the generated conf.h
|
||||
# vendor/unity — Unity framework headers
|
||||
INCFLAGS = -I$(SRCDIR) -I$(UNITYDIR)
|
||||
|
||||
# Suppress warnings that fire in generated stubs / vendored code
|
||||
WARNFLAGS = -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable
|
||||
|
||||
COMPILE = $(CC) $(CFLAGS) $(WARNFLAGS) $(INCFLAGS)
|
||||
|
||||
# Common object files compiled into every test binary
|
||||
UNITY_SRC = $(UNITYDIR)/unity.c
|
||||
STUBS_SRC = test_stubs.c
|
||||
|
||||
# tbaMUD source files used by the tests
|
||||
UTILS_SRC = $(SRCDIR)/utils.c $(SRCDIR)/random.c
|
||||
|
||||
# All test binaries
|
||||
TESTS = test_utils test_random test_interpreter test_class
|
||||
|
||||
.PHONY: all test clean
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_utils — covers src/utils.c
|
||||
# ---------------------------------------------------------------------------
|
||||
test_utils: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) test_utils.c
|
||||
$(COMPILE) -o $@ $^ $(LIBS)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_random — covers src/random.c and rand_number/dice in src/utils.c
|
||||
# ---------------------------------------------------------------------------
|
||||
test_random: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) test_random.c
|
||||
$(COMPILE) -o $@ $^ $(LIBS)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_interpreter — covers string helpers in src/interpreter.c
|
||||
# ---------------------------------------------------------------------------
|
||||
test_interpreter: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) \
|
||||
$(SRCDIR)/interpreter.c test_interpreter.c
|
||||
$(COMPILE) -o $@ $^ $(LIBS)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# test_class — covers src/class.c
|
||||
# ---------------------------------------------------------------------------
|
||||
test_class: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) \
|
||||
$(SRCDIR)/class.c test_class.c
|
||||
$(COMPILE) -o $@ $^ $(LIBS)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Run all tests and produce JUnit XML files in test-results/
|
||||
# ---------------------------------------------------------------------------
|
||||
test: $(TESTS)
|
||||
@echo "=========================================="
|
||||
@echo "Running tbaMUD unit tests"
|
||||
@echo "=========================================="
|
||||
@mkdir -p test-results
|
||||
@status=0; \
|
||||
for t in $(TESTS); do \
|
||||
t_start=$$(date +%s%3N); \
|
||||
./$$t > test-results/$$t.out 2>&1; \
|
||||
rc=$$?; \
|
||||
t_end=$$(date +%s%3N); \
|
||||
elapsed=$$(awk "BEGIN{printf \"%.3f\", ($$t_end - $$t_start)/1000}"); \
|
||||
cat test-results/$$t.out; \
|
||||
python3 unity_to_junit.py $$t test-results/$$t.xml "$$elapsed" < test-results/$$t.out; \
|
||||
if [ $$rc -eq 0 ]; then \
|
||||
echo "[PASS] $$t"; \
|
||||
else \
|
||||
echo "[FAIL] $$t"; \
|
||||
status=1; \
|
||||
fi; \
|
||||
done; \
|
||||
exit $$status
|
||||
|
||||
clean:
|
||||
rm -f $(TESTS)
|
||||
rm -rf test-results
|
||||
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* @file test_class.c
|
||||
* Unit tests for pure functions in src/class.c:
|
||||
* parse_class, thaco, backstab_mult, level_exp
|
||||
*/
|
||||
|
||||
#include "unity.h"
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
#include "class.h"
|
||||
|
||||
extern FILE *logfile;
|
||||
|
||||
void setUp(void) { logfile = stderr; }
|
||||
void tearDown(void) { logfile = NULL; }
|
||||
|
||||
/* =========================================================
|
||||
* parse_class
|
||||
* ========================================================= */
|
||||
|
||||
void test_parse_class_magic_user_lowercase(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_MAGIC_USER, parse_class('m'));
|
||||
}
|
||||
|
||||
void test_parse_class_cleric_lowercase(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_CLERIC, parse_class('c'));
|
||||
}
|
||||
|
||||
void test_parse_class_warrior_lowercase(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_WARRIOR, parse_class('w'));
|
||||
}
|
||||
|
||||
void test_parse_class_thief_lowercase(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_THIEF, parse_class('t'));
|
||||
}
|
||||
|
||||
void test_parse_class_uppercase(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_MAGIC_USER, parse_class('M'));
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_CLERIC, parse_class('C'));
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_WARRIOR, parse_class('W'));
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_THIEF, parse_class('T'));
|
||||
}
|
||||
|
||||
void test_parse_class_invalid(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_UNDEFINED, parse_class('x'));
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_UNDEFINED, parse_class('?'));
|
||||
TEST_ASSERT_EQUAL_INT(CLASS_UNDEFINED, parse_class(' '));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* thaco
|
||||
* ========================================================= */
|
||||
|
||||
void test_thaco_magic_user_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(20, thaco(CLASS_MAGIC_USER, 1));
|
||||
}
|
||||
|
||||
void test_thaco_magic_user_level_10(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(17, thaco(CLASS_MAGIC_USER, 10));
|
||||
}
|
||||
|
||||
void test_thaco_cleric_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(20, thaco(CLASS_CLERIC, 1));
|
||||
}
|
||||
|
||||
void test_thaco_warrior_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(20, thaco(CLASS_WARRIOR, 1));
|
||||
}
|
||||
|
||||
void test_thaco_warrior_level_20(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(2, thaco(CLASS_WARRIOR, 20));
|
||||
}
|
||||
|
||||
void test_thaco_warrior_high_level_is_one(void)
|
||||
{
|
||||
/* Warriors hit thac0=1 around level 21 and stay there */
|
||||
TEST_ASSERT_EQUAL_INT(1, thaco(CLASS_WARRIOR, 21));
|
||||
TEST_ASSERT_EQUAL_INT(1, thaco(CLASS_WARRIOR, LVL_IMPL));
|
||||
}
|
||||
|
||||
void test_thaco_thief_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(20, thaco(CLASS_THIEF, 1));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* backstab_mult
|
||||
* ========================================================= */
|
||||
|
||||
void test_backstab_mult_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(2, backstab_mult(1));
|
||||
}
|
||||
|
||||
void test_backstab_mult_level_7(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(2, backstab_mult(7));
|
||||
}
|
||||
|
||||
void test_backstab_mult_level_8(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(3, backstab_mult(8));
|
||||
}
|
||||
|
||||
void test_backstab_mult_level_13(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(3, backstab_mult(13));
|
||||
}
|
||||
|
||||
void test_backstab_mult_level_14(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(4, backstab_mult(14));
|
||||
}
|
||||
|
||||
void test_backstab_mult_level_20(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(4, backstab_mult(20));
|
||||
}
|
||||
|
||||
void test_backstab_mult_level_21(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(5, backstab_mult(21));
|
||||
}
|
||||
|
||||
void test_backstab_mult_immortal(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(20, backstab_mult(LVL_IMMORT));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* level_exp
|
||||
* ========================================================= */
|
||||
|
||||
void test_level_exp_magic_user_level_0(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, level_exp(CLASS_MAGIC_USER, 0));
|
||||
}
|
||||
|
||||
void test_level_exp_magic_user_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(1, level_exp(CLASS_MAGIC_USER, 1));
|
||||
}
|
||||
|
||||
void test_level_exp_magic_user_level_2(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(2500, level_exp(CLASS_MAGIC_USER, 2));
|
||||
}
|
||||
|
||||
void test_level_exp_cleric_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(1, level_exp(CLASS_CLERIC, 1));
|
||||
}
|
||||
|
||||
void test_level_exp_thief_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(1, level_exp(CLASS_THIEF, 1));
|
||||
}
|
||||
|
||||
void test_level_exp_warrior_level_1(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(1, level_exp(CLASS_WARRIOR, 1));
|
||||
}
|
||||
|
||||
void test_level_exp_invalid_level_returns_zero(void)
|
||||
{
|
||||
/* Level > LVL_IMPL or level < 0 → logs error and returns 0 */
|
||||
TEST_ASSERT_EQUAL_INT(0, level_exp(CLASS_MAGIC_USER, -1));
|
||||
TEST_ASSERT_EQUAL_INT(0, level_exp(CLASS_MAGIC_USER, LVL_IMPL + 1));
|
||||
}
|
||||
|
||||
void test_level_exp_immortal_level(void)
|
||||
{
|
||||
/* LVL_IMMORT for mage → 8000000 */
|
||||
TEST_ASSERT_EQUAL_INT(8000000, level_exp(CLASS_MAGIC_USER, LVL_IMMORT));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* main
|
||||
* ========================================================= */
|
||||
|
||||
int main(void)
|
||||
{
|
||||
UNITY_BEGIN();
|
||||
|
||||
/* parse_class */
|
||||
RUN_TEST(test_parse_class_magic_user_lowercase);
|
||||
RUN_TEST(test_parse_class_cleric_lowercase);
|
||||
RUN_TEST(test_parse_class_warrior_lowercase);
|
||||
RUN_TEST(test_parse_class_thief_lowercase);
|
||||
RUN_TEST(test_parse_class_uppercase);
|
||||
RUN_TEST(test_parse_class_invalid);
|
||||
|
||||
/* thaco */
|
||||
RUN_TEST(test_thaco_magic_user_level_1);
|
||||
RUN_TEST(test_thaco_magic_user_level_10);
|
||||
RUN_TEST(test_thaco_cleric_level_1);
|
||||
RUN_TEST(test_thaco_warrior_level_1);
|
||||
RUN_TEST(test_thaco_warrior_level_20);
|
||||
RUN_TEST(test_thaco_warrior_high_level_is_one);
|
||||
RUN_TEST(test_thaco_thief_level_1);
|
||||
|
||||
/* backstab_mult */
|
||||
RUN_TEST(test_backstab_mult_level_1);
|
||||
RUN_TEST(test_backstab_mult_level_7);
|
||||
RUN_TEST(test_backstab_mult_level_8);
|
||||
RUN_TEST(test_backstab_mult_level_13);
|
||||
RUN_TEST(test_backstab_mult_level_14);
|
||||
RUN_TEST(test_backstab_mult_level_20);
|
||||
RUN_TEST(test_backstab_mult_level_21);
|
||||
RUN_TEST(test_backstab_mult_immortal);
|
||||
|
||||
/* level_exp */
|
||||
RUN_TEST(test_level_exp_magic_user_level_0);
|
||||
RUN_TEST(test_level_exp_magic_user_level_1);
|
||||
RUN_TEST(test_level_exp_magic_user_level_2);
|
||||
RUN_TEST(test_level_exp_cleric_level_1);
|
||||
RUN_TEST(test_level_exp_thief_level_1);
|
||||
RUN_TEST(test_level_exp_warrior_level_1);
|
||||
RUN_TEST(test_level_exp_invalid_level_returns_zero);
|
||||
RUN_TEST(test_level_exp_immortal_level);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
/**
|
||||
* @file test_interpreter.c
|
||||
* Unit tests for pure string-handling functions in src/interpreter.c:
|
||||
* is_number, is_abbrev, delete_doubledollar, any_one_arg, one_word
|
||||
*/
|
||||
|
||||
#include "unity.h"
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
#include "interpreter.h"
|
||||
|
||||
extern FILE *logfile;
|
||||
|
||||
void setUp(void) { logfile = stderr; }
|
||||
void tearDown(void) { logfile = NULL; }
|
||||
|
||||
/* =========================================================
|
||||
* is_number
|
||||
* ========================================================= */
|
||||
|
||||
void test_is_number_digits_only(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(is_number("42"));
|
||||
}
|
||||
|
||||
void test_is_number_zero(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(is_number("0"));
|
||||
}
|
||||
|
||||
void test_is_number_negative(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(is_number("-5"));
|
||||
}
|
||||
|
||||
void test_is_number_empty_string(void)
|
||||
{
|
||||
TEST_ASSERT_FALSE(is_number(""));
|
||||
}
|
||||
|
||||
void test_is_number_contains_letter(void)
|
||||
{
|
||||
TEST_ASSERT_FALSE(is_number("12x3"));
|
||||
}
|
||||
|
||||
void test_is_number_minus_only(void)
|
||||
{
|
||||
TEST_ASSERT_FALSE(is_number("-"));
|
||||
}
|
||||
|
||||
void test_is_number_float(void)
|
||||
{
|
||||
TEST_ASSERT_FALSE(is_number("3.14"));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* is_abbrev
|
||||
* ========================================================= */
|
||||
|
||||
void test_is_abbrev_exact_match(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(is_abbrev("north", "north"));
|
||||
}
|
||||
|
||||
void test_is_abbrev_valid_prefix(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(is_abbrev("nort", "north"));
|
||||
TEST_ASSERT_TRUE(is_abbrev("n", "north"));
|
||||
}
|
||||
|
||||
void test_is_abbrev_non_prefix(void)
|
||||
{
|
||||
TEST_ASSERT_FALSE(is_abbrev("south", "north"));
|
||||
}
|
||||
|
||||
void test_is_abbrev_empty_arg1(void)
|
||||
{
|
||||
TEST_ASSERT_FALSE(is_abbrev("", "north"));
|
||||
}
|
||||
|
||||
void test_is_abbrev_arg1_longer_than_arg2(void)
|
||||
{
|
||||
TEST_ASSERT_FALSE(is_abbrev("northward", "north"));
|
||||
}
|
||||
|
||||
void test_is_abbrev_case_insensitive(void)
|
||||
{
|
||||
TEST_ASSERT_TRUE(is_abbrev("Nor", "north"));
|
||||
TEST_ASSERT_TRUE(is_abbrev("NOR", "NORTH"));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* delete_doubledollar
|
||||
* ========================================================= */
|
||||
|
||||
void test_delete_doubledollar_no_dollars(void)
|
||||
{
|
||||
char s[] = "hello";
|
||||
delete_doubledollar(s);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", s);
|
||||
}
|
||||
|
||||
void test_delete_doubledollar_double_at_start(void)
|
||||
{
|
||||
char s[] = "$$hello";
|
||||
delete_doubledollar(s);
|
||||
TEST_ASSERT_EQUAL_STRING("$hello", s);
|
||||
}
|
||||
|
||||
void test_delete_doubledollar_double_in_middle(void)
|
||||
{
|
||||
char s[] = "hello$$world";
|
||||
delete_doubledollar(s);
|
||||
TEST_ASSERT_EQUAL_STRING("hello$world", s);
|
||||
}
|
||||
|
||||
void test_delete_doubledollar_four_dollars(void)
|
||||
{
|
||||
char s[] = "$$$$";
|
||||
delete_doubledollar(s);
|
||||
TEST_ASSERT_EQUAL_STRING("$$", s);
|
||||
}
|
||||
|
||||
void test_delete_doubledollar_single_dollar_unchanged(void)
|
||||
{
|
||||
char s[] = "hello$world";
|
||||
delete_doubledollar(s);
|
||||
TEST_ASSERT_EQUAL_STRING("hello$world", s);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* any_one_arg
|
||||
* ========================================================= */
|
||||
|
||||
void test_any_one_arg_basic(void)
|
||||
{
|
||||
char first[64];
|
||||
char *rest = any_one_arg("hello world", first);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", first);
|
||||
TEST_ASSERT_EQUAL_STRING(" world", rest);
|
||||
}
|
||||
|
||||
void test_any_one_arg_leading_spaces(void)
|
||||
{
|
||||
char first[64];
|
||||
any_one_arg(" hello world", first);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", first);
|
||||
}
|
||||
|
||||
void test_any_one_arg_single_word(void)
|
||||
{
|
||||
char first[64];
|
||||
char *rest = any_one_arg("hello", first);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", first);
|
||||
TEST_ASSERT_EQUAL_STRING("", rest);
|
||||
}
|
||||
|
||||
void test_any_one_arg_empty_string(void)
|
||||
{
|
||||
char first[64];
|
||||
any_one_arg("", first);
|
||||
TEST_ASSERT_EQUAL_STRING("", first);
|
||||
}
|
||||
|
||||
void test_any_one_arg_lowercases(void)
|
||||
{
|
||||
char first[64];
|
||||
any_one_arg("HELLO", first);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", first);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* one_word
|
||||
* ========================================================= */
|
||||
|
||||
void test_one_word_unquoted_like_any_one_arg(void)
|
||||
{
|
||||
char first[64];
|
||||
char *rest = one_word("hello world", first);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", first);
|
||||
TEST_ASSERT_EQUAL_STRING(" world", rest);
|
||||
}
|
||||
|
||||
void test_one_word_quoted_string(void)
|
||||
{
|
||||
char first[64];
|
||||
char *rest = one_word("\"hello world\" rest", first);
|
||||
TEST_ASSERT_EQUAL_STRING("hello world", first);
|
||||
/* rest points just past the closing quote */
|
||||
TEST_ASSERT_EQUAL_STRING(" rest", rest);
|
||||
}
|
||||
|
||||
void test_one_word_empty_quoted(void)
|
||||
{
|
||||
char first[64];
|
||||
one_word("\"\" rest", first);
|
||||
TEST_ASSERT_EQUAL_STRING("", first);
|
||||
}
|
||||
|
||||
void test_one_word_leading_spaces_skipped(void)
|
||||
{
|
||||
char first[64];
|
||||
one_word(" hello", first);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", first);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* main
|
||||
* ========================================================= */
|
||||
|
||||
int main(void)
|
||||
{
|
||||
UNITY_BEGIN();
|
||||
|
||||
/* is_number */
|
||||
RUN_TEST(test_is_number_digits_only);
|
||||
RUN_TEST(test_is_number_zero);
|
||||
RUN_TEST(test_is_number_negative);
|
||||
RUN_TEST(test_is_number_empty_string);
|
||||
RUN_TEST(test_is_number_contains_letter);
|
||||
RUN_TEST(test_is_number_minus_only);
|
||||
RUN_TEST(test_is_number_float);
|
||||
|
||||
/* is_abbrev */
|
||||
RUN_TEST(test_is_abbrev_exact_match);
|
||||
RUN_TEST(test_is_abbrev_valid_prefix);
|
||||
RUN_TEST(test_is_abbrev_non_prefix);
|
||||
RUN_TEST(test_is_abbrev_empty_arg1);
|
||||
RUN_TEST(test_is_abbrev_arg1_longer_than_arg2);
|
||||
RUN_TEST(test_is_abbrev_case_insensitive);
|
||||
|
||||
/* delete_doubledollar */
|
||||
RUN_TEST(test_delete_doubledollar_no_dollars);
|
||||
RUN_TEST(test_delete_doubledollar_double_at_start);
|
||||
RUN_TEST(test_delete_doubledollar_double_in_middle);
|
||||
RUN_TEST(test_delete_doubledollar_four_dollars);
|
||||
RUN_TEST(test_delete_doubledollar_single_dollar_unchanged);
|
||||
|
||||
/* any_one_arg */
|
||||
RUN_TEST(test_any_one_arg_basic);
|
||||
RUN_TEST(test_any_one_arg_leading_spaces);
|
||||
RUN_TEST(test_any_one_arg_single_word);
|
||||
RUN_TEST(test_any_one_arg_empty_string);
|
||||
RUN_TEST(test_any_one_arg_lowercases);
|
||||
|
||||
/* one_word */
|
||||
RUN_TEST(test_one_word_unquoted_like_any_one_arg);
|
||||
RUN_TEST(test_one_word_quoted_string);
|
||||
RUN_TEST(test_one_word_empty_quoted);
|
||||
RUN_TEST(test_one_word_leading_spaces_skipped);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
/**
|
||||
* @file test_random.c
|
||||
* Unit tests for src/random.c and the random-number helpers in src/utils.c
|
||||
* (rand_number, dice).
|
||||
*/
|
||||
|
||||
#include "unity.h"
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
|
||||
extern FILE *logfile;
|
||||
|
||||
void setUp(void) { logfile = stderr; }
|
||||
void tearDown(void) { logfile = NULL; }
|
||||
|
||||
/* =========================================================
|
||||
* circle_srandom / circle_random — deterministic sequence
|
||||
*
|
||||
* The Park-Miller generator with seed s produces:
|
||||
* G(s) = (16807 * s) mod 2147483647
|
||||
* Precomputed for seed=1:
|
||||
* call 1 → 16807
|
||||
* call 2 → 282475249
|
||||
* call 3 → 1622650073
|
||||
* ========================================================= */
|
||||
|
||||
void test_circle_random_deterministic_first(void)
|
||||
{
|
||||
circle_srandom(1);
|
||||
TEST_ASSERT_EQUAL_UINT32(16807UL, circle_random());
|
||||
}
|
||||
|
||||
void test_circle_random_deterministic_second(void)
|
||||
{
|
||||
circle_srandom(1);
|
||||
circle_random(); /* discard first */
|
||||
TEST_ASSERT_EQUAL_UINT32(282475249UL, circle_random());
|
||||
}
|
||||
|
||||
void test_circle_random_deterministic_third(void)
|
||||
{
|
||||
circle_srandom(1);
|
||||
circle_random();
|
||||
circle_random();
|
||||
TEST_ASSERT_EQUAL_UINT32(1622650073UL, circle_random());
|
||||
}
|
||||
|
||||
void test_circle_random_same_seed_same_sequence(void)
|
||||
{
|
||||
circle_srandom(42);
|
||||
unsigned long a = circle_random();
|
||||
unsigned long b = circle_random();
|
||||
|
||||
circle_srandom(42);
|
||||
TEST_ASSERT_EQUAL_UINT32(a, circle_random());
|
||||
TEST_ASSERT_EQUAL_UINT32(b, circle_random());
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* rand_number — result always in [from, to]
|
||||
* ========================================================= */
|
||||
|
||||
void test_rand_number_in_range(void)
|
||||
{
|
||||
int i;
|
||||
circle_srandom(12345);
|
||||
for (i = 0; i < 200; i++) {
|
||||
int v = rand_number(1, 10);
|
||||
TEST_ASSERT_GREATER_OR_EQUAL_INT(1, v);
|
||||
TEST_ASSERT_LESS_OR_EQUAL_INT(10, v);
|
||||
}
|
||||
}
|
||||
|
||||
void test_rand_number_same_low_high(void)
|
||||
{
|
||||
int i;
|
||||
circle_srandom(1);
|
||||
for (i = 0; i < 50; i++)
|
||||
TEST_ASSERT_EQUAL_INT(7, rand_number(7, 7));
|
||||
}
|
||||
|
||||
void test_rand_number_inverted_args(void)
|
||||
{
|
||||
/* rand_number logs SYSERR and swaps; result must still be in [1,10] */
|
||||
int i;
|
||||
circle_srandom(1);
|
||||
for (i = 0; i < 50; i++) {
|
||||
int v = rand_number(10, 1);
|
||||
TEST_ASSERT_GREATER_OR_EQUAL_INT(1, v);
|
||||
TEST_ASSERT_LESS_OR_EQUAL_INT(10, v);
|
||||
}
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* dice — num dice each of size sides
|
||||
* ========================================================= */
|
||||
|
||||
void test_dice_zero_dice(void)
|
||||
{
|
||||
circle_srandom(1);
|
||||
TEST_ASSERT_EQUAL_INT(0, dice(0, 6));
|
||||
}
|
||||
|
||||
void test_dice_zero_sides(void)
|
||||
{
|
||||
circle_srandom(1);
|
||||
TEST_ASSERT_EQUAL_INT(0, dice(3, 0));
|
||||
}
|
||||
|
||||
void test_dice_result_in_range(void)
|
||||
{
|
||||
int i;
|
||||
circle_srandom(99);
|
||||
for (i = 0; i < 200; i++) {
|
||||
int v = dice(2, 6);
|
||||
TEST_ASSERT_GREATER_OR_EQUAL_INT(2, v);
|
||||
TEST_ASSERT_LESS_OR_EQUAL_INT(12, v);
|
||||
}
|
||||
}
|
||||
|
||||
void test_dice_one_die_one_side(void)
|
||||
{
|
||||
circle_srandom(1);
|
||||
TEST_ASSERT_EQUAL_INT(1, dice(1, 1));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* main
|
||||
* ========================================================= */
|
||||
|
||||
int main(void)
|
||||
{
|
||||
UNITY_BEGIN();
|
||||
|
||||
/* circle_srandom / circle_random */
|
||||
RUN_TEST(test_circle_random_deterministic_first);
|
||||
RUN_TEST(test_circle_random_deterministic_second);
|
||||
RUN_TEST(test_circle_random_deterministic_third);
|
||||
RUN_TEST(test_circle_random_same_seed_same_sequence);
|
||||
|
||||
/* rand_number */
|
||||
RUN_TEST(test_rand_number_in_range);
|
||||
RUN_TEST(test_rand_number_same_low_high);
|
||||
RUN_TEST(test_rand_number_inverted_args);
|
||||
|
||||
/* dice */
|
||||
RUN_TEST(test_dice_zero_dice);
|
||||
RUN_TEST(test_dice_zero_sides);
|
||||
RUN_TEST(test_dice_result_in_range);
|
||||
RUN_TEST(test_dice_one_die_one_side);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
@@ -0,0 +1,507 @@
|
||||
/**
|
||||
* @file test_stubs.c
|
||||
* Stub definitions used by unit-test binaries.
|
||||
*
|
||||
* Every function here is declared __attribute__((weak)) so that a real
|
||||
* definition provided by a compiled source file (e.g. class.c providing
|
||||
* parse_class(), interpreter.c providing is_abbrev()) automatically wins
|
||||
* over the stub at link time.
|
||||
*
|
||||
* Global-variable stubs are plain definitions (zero-initialised by the
|
||||
* C standard for translation-unit scope). They satisfy the extern
|
||||
* declarations in mud headers without conflicting with any source file
|
||||
* that is deliberately excluded from the test build.
|
||||
*/
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
#include "comm.h"
|
||||
#include "db.h"
|
||||
#include "handler.h"
|
||||
#include "interpreter.h"
|
||||
#include "class.h"
|
||||
#include "dg_scripts.h"
|
||||
#include "protocol.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* =========================================================
|
||||
* Global variable stubs
|
||||
* ========================================================= */
|
||||
|
||||
/* comm.c */
|
||||
FILE *logfile = NULL; /* tests init to stderr in setUp */
|
||||
struct descriptor_data *descriptor_list = NULL;
|
||||
int no_specials = 0;
|
||||
int circle_restrict = 0;
|
||||
|
||||
/* db.c */
|
||||
struct room_data *world = NULL;
|
||||
room_rnum top_of_world = 0;
|
||||
struct weather_data weather_info; /* zero-init */
|
||||
struct char_data *character_list = NULL;
|
||||
struct index_data *mob_index = NULL;
|
||||
struct index_data *obj_index = NULL;
|
||||
mob_rnum top_of_mobt = 0;
|
||||
obj_rnum top_of_objt = 0;
|
||||
char *motd = NULL;
|
||||
char *imotd = NULL;
|
||||
char *GREETINGS = NULL;
|
||||
char *background = NULL;
|
||||
struct happyhour happy_data; /* zero-init */
|
||||
struct player_index_element *player_table = NULL;
|
||||
struct player_special_data dummy_mob; /* zero-init */
|
||||
struct config_data config_info; /* zero-init */
|
||||
time_t motdmod = 0;
|
||||
time_t newsmod = 0;
|
||||
|
||||
/* interpreter needs some start-room vnum stubs */
|
||||
ush_int r_mortal_start_room = 0;
|
||||
ush_int r_immort_start_room = 0;
|
||||
ush_int r_frozen_start_room = 0;
|
||||
|
||||
/* config.c */
|
||||
int selfdelete_fastwipe = 0;
|
||||
|
||||
/* constants.c – only needed when class.c is NOT in the build */
|
||||
__attribute__((weak)) const struct con_app_type con_app[26];
|
||||
__attribute__((weak)) const struct wis_app_type wis_app[26];
|
||||
|
||||
/* class.c – only needed when class.c is NOT in the build */
|
||||
__attribute__((weak)) const char *class_menu = "";
|
||||
__attribute__((weak)) const char *pc_class_types[] = { "\n" };
|
||||
|
||||
/* =========================================================
|
||||
* Function stubs (all weak so the real implementation wins)
|
||||
* ========================================================= */
|
||||
|
||||
/* ---------- comm.c ---------- */
|
||||
__attribute__((weak))
|
||||
size_t send_to_char(struct char_data *ch, const char *messg, ...)
|
||||
{ (void)ch; (void)messg; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
char *act(const char *str, int hide_invisible, struct char_data *ch,
|
||||
struct obj_data *obj, void *vict_obj, int type)
|
||||
{ (void)str; (void)hide_invisible; (void)ch;
|
||||
(void)obj; (void)vict_obj; (void)type; return NULL; }
|
||||
|
||||
__attribute__((weak))
|
||||
void write_to_q(const char *txt, struct txt_q *queue, int aliased)
|
||||
{ (void)txt; (void)queue; (void)aliased; }
|
||||
|
||||
__attribute__((weak))
|
||||
size_t write_to_output(struct descriptor_data *d, const char *txt, ...)
|
||||
{ (void)d; (void)txt; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
size_t vwrite_to_output(struct descriptor_data *d, const char *fmt, va_list args)
|
||||
{ (void)d; (void)fmt; (void)args; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
void echo_off(struct descriptor_data *d) { (void)d; }
|
||||
|
||||
__attribute__((weak))
|
||||
void echo_on(struct descriptor_data *d) { (void)d; }
|
||||
|
||||
/* ---------- modify.c ---------- */
|
||||
__attribute__((weak))
|
||||
void page_string(struct descriptor_data *d, char *str, int keep_internal)
|
||||
{ (void)d; (void)str; (void)keep_internal; }
|
||||
|
||||
__attribute__((weak))
|
||||
void parse_tab(char *str) { (void)str; }
|
||||
|
||||
/* ---------- handler.c ---------- */
|
||||
__attribute__((weak))
|
||||
bool affected_by_spell(struct char_data *ch, int spell)
|
||||
{ (void)ch; (void)spell; return FALSE; }
|
||||
|
||||
__attribute__((weak))
|
||||
void affect_from_char(struct char_data *ch, int type)
|
||||
{ (void)ch; (void)type; }
|
||||
|
||||
__attribute__((weak))
|
||||
void extract_char(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void extract_char_final(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void char_from_room(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void char_to_room(struct char_data *ch, room_rnum room)
|
||||
{ (void)ch; (void)room; }
|
||||
|
||||
__attribute__((weak))
|
||||
void free_char(struct char_data *ch) { (void)ch; }
|
||||
|
||||
/* ---------- interpreter.c ---------- */
|
||||
__attribute__((weak))
|
||||
int is_abbrev(const char *arg1, const char *arg2)
|
||||
{ (void)arg1; (void)arg2; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
int parse_class(char arg)
|
||||
{ (void)arg; return CLASS_UNDEFINED; }
|
||||
|
||||
/* ---------- class.c ---------- */
|
||||
__attribute__((weak))
|
||||
void set_title(struct char_data *ch, char *title) { (void)ch; (void)title; }
|
||||
|
||||
__attribute__((weak))
|
||||
void spell_level(int spell, int chclass, int level)
|
||||
{ (void)spell; (void)chclass; (void)level; }
|
||||
|
||||
/* ---------- players.c ---------- */
|
||||
__attribute__((weak))
|
||||
void save_char(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
int create_entry(char *name) { (void)name; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
int load_char(const char *name, struct char_data *ch)
|
||||
{ (void)name; (void)ch; return -1; }
|
||||
|
||||
__attribute__((weak))
|
||||
void save_player_index(void) {}
|
||||
|
||||
__attribute__((weak))
|
||||
void remove_player(int pfilepos) { (void)pfilepos; }
|
||||
|
||||
__attribute__((weak))
|
||||
long get_ptable_by_name(const char *name) { (void)name; return -1; }
|
||||
|
||||
/* ---------- act.wizard.c ---------- */
|
||||
__attribute__((weak))
|
||||
void snoop_check(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void add_llog_entry(struct char_data *ch, int type) { (void)ch; (void)type; }
|
||||
|
||||
/* ---------- db.c ---------- */
|
||||
__attribute__((weak))
|
||||
room_rnum real_room(room_vnum vnum) { (void)vnum; return NOWHERE; }
|
||||
|
||||
__attribute__((weak))
|
||||
void clear_char(struct char_data *ch) { (void)ch; if (ch) memset(ch, 0, sizeof(*ch)); }
|
||||
|
||||
__attribute__((weak))
|
||||
void reset_char(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void init_char(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void new_mobile_data(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void free_char_from_db(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
void Crash_crashsave(struct char_data *ch) { (void)ch; }
|
||||
|
||||
__attribute__((weak))
|
||||
int Crash_load(struct char_data *ch) { (void)ch; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
int Crash_delete_file(char *name) { (void)name; return 0; }
|
||||
|
||||
/* ---------- ban.c ---------- */
|
||||
__attribute__((weak))
|
||||
int isbanned(char *hostname) { (void)hostname; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
int valid_name(char *newname) { (void)newname; return 1; }
|
||||
|
||||
/* ---------- mail.c ---------- */
|
||||
__attribute__((weak))
|
||||
int has_mail(long recipient) { (void)recipient; return 0; }
|
||||
|
||||
/* ---------- improved-edit.c ---------- */
|
||||
__attribute__((weak))
|
||||
void send_editor_help(struct descriptor_data *d) { (void)d; }
|
||||
|
||||
/* ---------- dg_scripts.c ---------- */
|
||||
__attribute__((weak))
|
||||
void add_to_lookup_table(long uid, void *c) { (void)uid; (void)c; }
|
||||
|
||||
__attribute__((weak))
|
||||
void delete_variables(const char *charname) { (void)charname; }
|
||||
|
||||
__attribute__((weak))
|
||||
void read_saved_vars(struct char_data *ch) { (void)ch; }
|
||||
|
||||
/* ---------- dg_triggers.c ---------- */
|
||||
__attribute__((weak))
|
||||
int greet_mtrigger(struct char_data *actor, int dir)
|
||||
{ (void)actor; (void)dir; return 1; }
|
||||
|
||||
__attribute__((weak))
|
||||
void greet_memory_mtrigger(struct char_data *actor) { (void)actor; }
|
||||
|
||||
__attribute__((weak))
|
||||
int login_wtrigger(struct room_data *room, struct char_data *actor)
|
||||
{ (void)room; (void)actor; return 1; }
|
||||
|
||||
__attribute__((weak))
|
||||
int command_mtrigger(struct char_data *actor, char *cmd, char *argument)
|
||||
{ (void)actor; (void)cmd; (void)argument; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
int command_otrigger(struct char_data *actor, char *cmd, char *argument)
|
||||
{ (void)actor; (void)cmd; (void)argument; return 0; }
|
||||
|
||||
__attribute__((weak))
|
||||
int command_wtrigger(struct char_data *actor, char *cmd, char *argument)
|
||||
{ (void)actor; (void)cmd; (void)argument; return 0; }
|
||||
|
||||
/* ---------- act.informative.c ---------- */
|
||||
__attribute__((weak))
|
||||
void look_at_room(struct char_data *ch, int ignore_brief)
|
||||
{ (void)ch; (void)ignore_brief; }
|
||||
|
||||
/* ---------- protocol.c ---------- */
|
||||
__attribute__((weak))
|
||||
void MXPSendTag(descriptor_t *apDescriptor, const char *apTag)
|
||||
{ (void)apDescriptor; (void)apTag; }
|
||||
|
||||
__attribute__((weak))
|
||||
void AddRecentPlayer(char *charname, char *host, bool newplr, bool cpover)
|
||||
{ (void)charname; (void)host; (void)newplr; (void)cpover; }
|
||||
|
||||
/* ---------- OLC parse functions ---------- */
|
||||
__attribute__((weak))
|
||||
void aedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void cedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void hedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void ibtedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void medit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void msgedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void oedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void prefedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void qedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void redit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void sedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void trigedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
__attribute__((weak))
|
||||
void zedit_parse(struct descriptor_data *d, char *arg) { (void)d; (void)arg; }
|
||||
|
||||
/* ---------- ACMD stubs for all do_* functions ----------
|
||||
* These are function-pointer entries in the cmd_info[] table in interpreter.c.
|
||||
* The table is DATA (not called at test time), but the linker still requires
|
||||
* every symbol to resolve. Weak stubs satisfy the linker; the real do_*
|
||||
* implementations would override them if act*.c were compiled. */
|
||||
|
||||
#define STUB_ACMD(name) \
|
||||
__attribute__((weak)) ACMD(name) { (void)ch; (void)argument; (void)cmd; (void)subcmd; }
|
||||
|
||||
STUB_ACMD(do_action)
|
||||
STUB_ACMD(do_advance)
|
||||
STUB_ACMD(do_areas)
|
||||
STUB_ACMD(do_assist)
|
||||
STUB_ACMD(do_astat)
|
||||
STUB_ACMD(do_at)
|
||||
STUB_ACMD(do_attach)
|
||||
STUB_ACMD(do_backstab)
|
||||
STUB_ACMD(do_ban)
|
||||
STUB_ACMD(do_bandage)
|
||||
STUB_ACMD(do_bash)
|
||||
STUB_ACMD(do_cast)
|
||||
STUB_ACMD(do_changelog)
|
||||
STUB_ACMD(do_checkloadstatus)
|
||||
STUB_ACMD(do_commands)
|
||||
STUB_ACMD(do_consider)
|
||||
STUB_ACMD(do_copyover)
|
||||
STUB_ACMD(do_date)
|
||||
STUB_ACMD(do_dc)
|
||||
STUB_ACMD(do_detach)
|
||||
STUB_ACMD(do_diagnose)
|
||||
STUB_ACMD(do_dig)
|
||||
STUB_ACMD(do_display)
|
||||
STUB_ACMD(do_drink)
|
||||
STUB_ACMD(do_drop)
|
||||
STUB_ACMD(do_eat)
|
||||
STUB_ACMD(do_echo)
|
||||
STUB_ACMD(do_enter)
|
||||
STUB_ACMD(do_equipment)
|
||||
STUB_ACMD(do_examine)
|
||||
STUB_ACMD(do_exits)
|
||||
STUB_ACMD(do_export_zone)
|
||||
STUB_ACMD(do_file)
|
||||
STUB_ACMD(do_flee)
|
||||
STUB_ACMD(do_follow)
|
||||
STUB_ACMD(do_force)
|
||||
STUB_ACMD(do_gecho)
|
||||
STUB_ACMD(do_gen_comm)
|
||||
STUB_ACMD(do_gen_door)
|
||||
STUB_ACMD(do_gen_ps)
|
||||
STUB_ACMD(do_gen_tog)
|
||||
STUB_ACMD(do_get)
|
||||
STUB_ACMD(do_give)
|
||||
STUB_ACMD(do_gold)
|
||||
STUB_ACMD(do_goto)
|
||||
STUB_ACMD(do_grab)
|
||||
STUB_ACMD(do_group)
|
||||
STUB_ACMD(do_gsay)
|
||||
STUB_ACMD(do_happyhour)
|
||||
STUB_ACMD(do_hcontrol)
|
||||
STUB_ACMD(do_help)
|
||||
STUB_ACMD(do_helpcheck)
|
||||
STUB_ACMD(do_hide)
|
||||
STUB_ACMD(do_hindex)
|
||||
STUB_ACMD(do_history)
|
||||
STUB_ACMD(do_hit)
|
||||
STUB_ACMD(do_house)
|
||||
STUB_ACMD(do_ibt)
|
||||
STUB_ACMD(do_inventory)
|
||||
STUB_ACMD(do_invis)
|
||||
STUB_ACMD(do_kick)
|
||||
STUB_ACMD(do_kill)
|
||||
STUB_ACMD(do_last)
|
||||
STUB_ACMD(do_leave)
|
||||
STUB_ACMD(do_levels)
|
||||
STUB_ACMD(do_links)
|
||||
STUB_ACMD(do_load)
|
||||
STUB_ACMD(do_look)
|
||||
STUB_ACMD(do_map)
|
||||
STUB_ACMD(do_masound)
|
||||
STUB_ACMD(do_mat)
|
||||
STUB_ACMD(do_mdamage)
|
||||
STUB_ACMD(do_mdoor)
|
||||
STUB_ACMD(do_mecho)
|
||||
STUB_ACMD(do_mechoaround)
|
||||
STUB_ACMD(do_mfollow)
|
||||
STUB_ACMD(do_mforce)
|
||||
STUB_ACMD(do_mforget)
|
||||
STUB_ACMD(do_mgoto)
|
||||
STUB_ACMD(do_mhunt)
|
||||
STUB_ACMD(do_mjunk)
|
||||
STUB_ACMD(do_mkill)
|
||||
STUB_ACMD(do_mload)
|
||||
STUB_ACMD(do_mlog)
|
||||
STUB_ACMD(do_move)
|
||||
STUB_ACMD(do_mpurge)
|
||||
STUB_ACMD(do_mrecho)
|
||||
STUB_ACMD(do_mremember)
|
||||
STUB_ACMD(do_msend)
|
||||
STUB_ACMD(do_msgedit)
|
||||
STUB_ACMD(do_mteleport)
|
||||
STUB_ACMD(do_mtransform)
|
||||
STUB_ACMD(do_mzoneecho)
|
||||
STUB_ACMD(do_not_here)
|
||||
STUB_ACMD(do_oasis_aedit)
|
||||
STUB_ACMD(do_oasis_cedit)
|
||||
STUB_ACMD(do_oasis_copy)
|
||||
STUB_ACMD(do_oasis_hedit)
|
||||
STUB_ACMD(do_oasis_list)
|
||||
STUB_ACMD(do_oasis_medit)
|
||||
STUB_ACMD(do_oasis_oedit)
|
||||
STUB_ACMD(do_oasis_prefedit)
|
||||
STUB_ACMD(do_oasis_qedit)
|
||||
STUB_ACMD(do_oasis_redit)
|
||||
STUB_ACMD(do_oasis_sedit)
|
||||
STUB_ACMD(do_oasis_trigedit)
|
||||
STUB_ACMD(do_oasis_zedit)
|
||||
STUB_ACMD(do_order)
|
||||
STUB_ACMD(do_oset)
|
||||
STUB_ACMD(do_page)
|
||||
STUB_ACMD(do_peace)
|
||||
STUB_ACMD(do_plist)
|
||||
STUB_ACMD(do_pour)
|
||||
STUB_ACMD(do_practice)
|
||||
STUB_ACMD(do_purge)
|
||||
STUB_ACMD(do_put)
|
||||
STUB_ACMD(do_qcomm)
|
||||
STUB_ACMD(do_quest)
|
||||
STUB_ACMD(do_quit)
|
||||
STUB_ACMD(do_reboot)
|
||||
STUB_ACMD(do_recent)
|
||||
STUB_ACMD(do_remove)
|
||||
STUB_ACMD(do_reply)
|
||||
STUB_ACMD(do_report)
|
||||
STUB_ACMD(do_rescue)
|
||||
STUB_ACMD(do_rest)
|
||||
STUB_ACMD(do_restore)
|
||||
STUB_ACMD(do_return)
|
||||
STUB_ACMD(do_sac)
|
||||
STUB_ACMD(do_save)
|
||||
STUB_ACMD(do_saveall)
|
||||
STUB_ACMD(do_say)
|
||||
STUB_ACMD(do_scan)
|
||||
STUB_ACMD(do_score)
|
||||
STUB_ACMD(do_send)
|
||||
STUB_ACMD(do_set)
|
||||
STUB_ACMD(do_show)
|
||||
STUB_ACMD(do_show_save_list)
|
||||
STUB_ACMD(do_shutdown)
|
||||
STUB_ACMD(do_sit)
|
||||
STUB_ACMD(do_skillset)
|
||||
STUB_ACMD(do_sleep)
|
||||
STUB_ACMD(do_sneak)
|
||||
STUB_ACMD(do_snoop)
|
||||
STUB_ACMD(do_spec_comm)
|
||||
STUB_ACMD(do_split)
|
||||
STUB_ACMD(do_stand)
|
||||
/* do_start has a different prototype than ACMD — it's called directly */
|
||||
__attribute__((weak))
|
||||
void do_start(struct char_data *ch) { (void)ch; }
|
||||
|
||||
STUB_ACMD(do_stat)
|
||||
STUB_ACMD(do_steal)
|
||||
STUB_ACMD(do_switch)
|
||||
STUB_ACMD(do_tedit)
|
||||
STUB_ACMD(do_teleport)
|
||||
STUB_ACMD(do_tell)
|
||||
STUB_ACMD(do_time)
|
||||
STUB_ACMD(do_title)
|
||||
STUB_ACMD(do_toggle)
|
||||
STUB_ACMD(do_track)
|
||||
STUB_ACMD(do_trans)
|
||||
STUB_ACMD(do_tstat)
|
||||
STUB_ACMD(do_unban)
|
||||
STUB_ACMD(do_unfollow)
|
||||
STUB_ACMD(do_use)
|
||||
STUB_ACMD(do_users)
|
||||
STUB_ACMD(do_vdelete)
|
||||
STUB_ACMD(do_visible)
|
||||
STUB_ACMD(do_vnum)
|
||||
STUB_ACMD(do_vstat)
|
||||
STUB_ACMD(do_wake)
|
||||
STUB_ACMD(do_wear)
|
||||
STUB_ACMD(do_weather)
|
||||
STUB_ACMD(do_where)
|
||||
STUB_ACMD(do_whirlwind)
|
||||
STUB_ACMD(do_who)
|
||||
STUB_ACMD(do_whois)
|
||||
STUB_ACMD(do_wield)
|
||||
STUB_ACMD(do_wizhelp)
|
||||
STUB_ACMD(do_wizlock)
|
||||
STUB_ACMD(do_wiznet)
|
||||
STUB_ACMD(do_wizupdate)
|
||||
STUB_ACMD(do_wizutil)
|
||||
STUB_ACMD(do_write)
|
||||
STUB_ACMD(do_zcheck)
|
||||
STUB_ACMD(do_zlock)
|
||||
STUB_ACMD(do_zpurge)
|
||||
STUB_ACMD(do_zreset)
|
||||
STUB_ACMD(do_zunlock)
|
||||
|
||||
#undef STUB_ACMD
|
||||
@@ -0,0 +1,482 @@
|
||||
/**
|
||||
* @file test_utils.c
|
||||
* Unit tests for pure / near-pure functions in src/utils.c
|
||||
*/
|
||||
|
||||
#include "unity.h"
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
|
||||
/* Redirect mud log output so basic_mud_vlog() doesn't print the
|
||||
* "SYSERR: Using log() before stream was initialized!" warning. */
|
||||
extern FILE *logfile;
|
||||
|
||||
void setUp(void) { logfile = stderr; }
|
||||
void tearDown(void) { logfile = NULL; }
|
||||
|
||||
/* =========================================================
|
||||
* prune_crlf
|
||||
* ========================================================= */
|
||||
|
||||
void test_prune_crlf_strips_crlf(void)
|
||||
{
|
||||
char s[] = "hello\r\n";
|
||||
prune_crlf(s);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", s);
|
||||
}
|
||||
|
||||
void test_prune_crlf_strips_lf_only(void)
|
||||
{
|
||||
char s[] = "hello\n";
|
||||
prune_crlf(s);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", s);
|
||||
}
|
||||
|
||||
void test_prune_crlf_no_op_on_clean(void)
|
||||
{
|
||||
char s[] = "hello";
|
||||
prune_crlf(s);
|
||||
TEST_ASSERT_EQUAL_STRING("hello", s);
|
||||
}
|
||||
|
||||
void test_prune_crlf_multiple_trailing(void)
|
||||
{
|
||||
char s[] = "hi\r\n\r\n";
|
||||
prune_crlf(s);
|
||||
TEST_ASSERT_EQUAL_STRING("hi", s);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* str_cmp (may be an alias for strcasecmp on this platform)
|
||||
* ========================================================= */
|
||||
|
||||
void test_str_cmp_equal_strings(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, str_cmp("hello", "hello"));
|
||||
}
|
||||
|
||||
void test_str_cmp_case_insensitive(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, str_cmp("Hello", "hello"));
|
||||
TEST_ASSERT_EQUAL_INT(0, str_cmp("HELLO", "hello"));
|
||||
}
|
||||
|
||||
void test_str_cmp_ordering_less(void)
|
||||
{
|
||||
TEST_ASSERT_LESS_THAN(0, str_cmp("a", "b"));
|
||||
}
|
||||
|
||||
void test_str_cmp_ordering_greater(void)
|
||||
{
|
||||
TEST_ASSERT_GREATER_THAN(0, str_cmp("b", "a"));
|
||||
}
|
||||
|
||||
void test_str_cmp_empty_equal(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, str_cmp("", ""));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* strn_cmp (may be an alias for strncasecmp on this platform)
|
||||
* ========================================================= */
|
||||
|
||||
void test_strn_cmp_equal_prefix(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, strn_cmp("hello", "hello world", 5));
|
||||
}
|
||||
|
||||
void test_strn_cmp_differ_past_n(void)
|
||||
{
|
||||
/* First 5 chars same, so strn_cmp("hello!", "hellox", 5) == 0 */
|
||||
TEST_ASSERT_EQUAL_INT(0, strn_cmp("hello!", "hellox", 5));
|
||||
}
|
||||
|
||||
void test_strn_cmp_differ_within_n(void)
|
||||
{
|
||||
TEST_ASSERT_NOT_EQUAL(0, strn_cmp("abc", "xyz", 3));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* sprintbit
|
||||
* ========================================================= */
|
||||
|
||||
void test_sprintbit_no_bits_set(void)
|
||||
{
|
||||
static const char *names[] = { "FLAG_A", "FLAG_B", "\n" };
|
||||
char result[256];
|
||||
sprintbit(0, names, result, sizeof(result));
|
||||
TEST_ASSERT_EQUAL_STRING("NOBITS ", result);
|
||||
}
|
||||
|
||||
void test_sprintbit_single_bit(void)
|
||||
{
|
||||
static const char *names[] = { "FLAG_A", "FLAG_B", "\n" };
|
||||
char result[256];
|
||||
sprintbit(1, names, result, sizeof(result));
|
||||
TEST_ASSERT_EQUAL_STRING("FLAG_A ", result);
|
||||
}
|
||||
|
||||
void test_sprintbit_multiple_bits(void)
|
||||
{
|
||||
static const char *names[] = { "FLAG_A", "FLAG_B", "\n" };
|
||||
char result[256];
|
||||
sprintbit(3, names, result, sizeof(result));
|
||||
TEST_ASSERT_EQUAL_STRING("FLAG_A FLAG_B ", result);
|
||||
}
|
||||
|
||||
void test_sprintbit_undefined_bit(void)
|
||||
{
|
||||
/* Bit 2 is beyond the named array – should produce "UNDEFINED" */
|
||||
static const char *names[] = { "FLAG_A", "FLAG_B", "\n" };
|
||||
char result[256];
|
||||
sprintbit(4, names, result, sizeof(result));
|
||||
TEST_ASSERT_EQUAL_STRING("UNDEFINED ", result);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* sprinttype
|
||||
* ========================================================= */
|
||||
|
||||
void test_sprinttype_valid_index_zero(void)
|
||||
{
|
||||
static const char *names[] = { "ZERO", "ONE", "\n" };
|
||||
char result[64];
|
||||
sprinttype(0, names, result, sizeof(result));
|
||||
TEST_ASSERT_EQUAL_STRING("ZERO", result);
|
||||
}
|
||||
|
||||
void test_sprinttype_valid_index_one(void)
|
||||
{
|
||||
static const char *names[] = { "ZERO", "ONE", "\n" };
|
||||
char result[64];
|
||||
sprinttype(1, names, result, sizeof(result));
|
||||
TEST_ASSERT_EQUAL_STRING("ONE", result);
|
||||
}
|
||||
|
||||
void test_sprinttype_out_of_range(void)
|
||||
{
|
||||
static const char *names[] = { "ZERO", "ONE", "\n" };
|
||||
char result[64];
|
||||
sprinttype(5, names, result, sizeof(result));
|
||||
TEST_ASSERT_EQUAL_STRING("UNDEFINED", result);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* levenshtein_distance
|
||||
* ========================================================= */
|
||||
|
||||
void test_levenshtein_identical_strings(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, levenshtein_distance("hello", "hello"));
|
||||
}
|
||||
|
||||
void test_levenshtein_empty_and_nonempty(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(5, levenshtein_distance("", "hello"));
|
||||
TEST_ASSERT_EQUAL_INT(5, levenshtein_distance("hello", ""));
|
||||
}
|
||||
|
||||
void test_levenshtein_single_insertion(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(1, levenshtein_distance("abc", "abcd"));
|
||||
}
|
||||
|
||||
void test_levenshtein_single_deletion(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(1, levenshtein_distance("abcd", "abc"));
|
||||
}
|
||||
|
||||
void test_levenshtein_single_substitution(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(1, levenshtein_distance("abc", "axc"));
|
||||
}
|
||||
|
||||
void test_levenshtein_both_empty(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, levenshtein_distance("", ""));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* count_color_chars
|
||||
* ========================================================= */
|
||||
|
||||
void test_count_color_chars_no_codes(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, count_color_chars("hello"));
|
||||
}
|
||||
|
||||
void test_count_color_chars_empty(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, count_color_chars(""));
|
||||
}
|
||||
|
||||
void test_count_color_chars_single_color_code(void)
|
||||
{
|
||||
/* "\tR" is a two-char color escape; both are skipped (counted as overhead) */
|
||||
TEST_ASSERT_EQUAL_INT(2, count_color_chars("\tR"));
|
||||
}
|
||||
|
||||
void test_count_color_chars_double_tab(void)
|
||||
{
|
||||
/* "\t\t" is an escaped literal tab; costs 1 overhead char */
|
||||
TEST_ASSERT_EQUAL_INT(1, count_color_chars("\t\t"));
|
||||
}
|
||||
|
||||
void test_count_color_chars_mixed(void)
|
||||
{
|
||||
/* "\tRhello" → 2 overhead + 0 for "hello" */
|
||||
TEST_ASSERT_EQUAL_INT(2, count_color_chars("\tRhello"));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* count_non_protocol_chars
|
||||
* ========================================================= */
|
||||
|
||||
void test_count_non_protocol_chars_plain(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(5, count_non_protocol_chars("hello"));
|
||||
}
|
||||
|
||||
void test_count_non_protocol_chars_empty(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, count_non_protocol_chars(""));
|
||||
}
|
||||
|
||||
void test_count_non_protocol_chars_newlines_skipped(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(5, count_non_protocol_chars("\r\nhello"));
|
||||
}
|
||||
|
||||
void test_count_non_protocol_chars_bracket_tag(void)
|
||||
{
|
||||
/* "@[bold]hi" – "@[bold]" is a protocol tag; only "hi" counted */
|
||||
TEST_ASSERT_EQUAL_INT(2, count_non_protocol_chars("@[bold]hi"));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* atoidx
|
||||
* ========================================================= */
|
||||
|
||||
void test_atoidx_valid_number(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(42, (int)atoidx("42"));
|
||||
}
|
||||
|
||||
void test_atoidx_zero(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT(0, (int)atoidx("0"));
|
||||
}
|
||||
|
||||
void test_atoidx_negative_returns_nowhere(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL_INT((int)NOWHERE, (int)atoidx("-1"));
|
||||
}
|
||||
|
||||
void test_atoidx_overflow_returns_nowhere(void)
|
||||
{
|
||||
/* IDXTYPE_MAX is 65535 on this build; a larger value overflows */
|
||||
TEST_ASSERT_EQUAL_INT((int)NOWHERE, (int)atoidx("99999999"));
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* right_trim_whitespace
|
||||
* ========================================================= */
|
||||
|
||||
void test_right_trim_whitespace_trailing_spaces(void)
|
||||
{
|
||||
char *r = right_trim_whitespace("hello ");
|
||||
TEST_ASSERT_EQUAL_STRING("hello", r);
|
||||
free(r);
|
||||
}
|
||||
|
||||
void test_right_trim_whitespace_no_trailing(void)
|
||||
{
|
||||
char *r = right_trim_whitespace("hello");
|
||||
TEST_ASSERT_EQUAL_STRING("hello", r);
|
||||
free(r);
|
||||
}
|
||||
|
||||
void test_right_trim_whitespace_all_whitespace(void)
|
||||
{
|
||||
char *r = right_trim_whitespace(" ");
|
||||
TEST_ASSERT_EQUAL_STRING("", r);
|
||||
free(r);
|
||||
}
|
||||
|
||||
void test_right_trim_whitespace_empty(void)
|
||||
{
|
||||
char *r = right_trim_whitespace("");
|
||||
TEST_ASSERT_EQUAL_STRING("", r);
|
||||
free(r);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* remove_from_string
|
||||
* ========================================================= */
|
||||
|
||||
void test_remove_from_string_word_present(void)
|
||||
{
|
||||
char s[] = "hello world";
|
||||
remove_from_string(s, "world");
|
||||
/* "world" and the trailing NUL shift left; "hello " remains */
|
||||
TEST_ASSERT_EQUAL_STRING("hello ", s);
|
||||
}
|
||||
|
||||
void test_remove_from_string_word_absent(void)
|
||||
{
|
||||
char s[] = "hello world";
|
||||
remove_from_string(s, "nope");
|
||||
TEST_ASSERT_EQUAL_STRING("hello world", s);
|
||||
}
|
||||
|
||||
void test_remove_from_string_word_at_start(void)
|
||||
{
|
||||
char s[] = "hello world";
|
||||
remove_from_string(s, "hello");
|
||||
/* "hello" removed; " world" remains */
|
||||
TEST_ASSERT_EQUAL_STRING(" world", s);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* real_time_passed
|
||||
* ========================================================= */
|
||||
|
||||
void test_real_time_passed_hours(void)
|
||||
{
|
||||
time_t base = 1000000;
|
||||
struct time_info_data *t = real_time_passed(base + 3 * SECS_PER_REAL_HOUR, base);
|
||||
TEST_ASSERT_EQUAL_INT(3, t->hours);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->day);
|
||||
}
|
||||
|
||||
void test_real_time_passed_days(void)
|
||||
{
|
||||
time_t base = 1000000;
|
||||
struct time_info_data *t = real_time_passed(base + 2 * SECS_PER_REAL_DAY + SECS_PER_REAL_HOUR, base);
|
||||
TEST_ASSERT_EQUAL_INT(1, t->hours);
|
||||
TEST_ASSERT_EQUAL_INT(2, t->day);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* mud_time_passed
|
||||
* ========================================================= */
|
||||
|
||||
void test_mud_time_passed_hours(void)
|
||||
{
|
||||
time_t base = 1000000;
|
||||
struct time_info_data *t = mud_time_passed(base + 2 * SECS_PER_MUD_HOUR, base);
|
||||
TEST_ASSERT_EQUAL_INT(2, t->hours);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->day);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->month);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->year);
|
||||
}
|
||||
|
||||
void test_mud_time_passed_days(void)
|
||||
{
|
||||
time_t base = 1000000;
|
||||
struct time_info_data *t = mud_time_passed(base + SECS_PER_MUD_DAY, base);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->hours);
|
||||
TEST_ASSERT_EQUAL_INT(1, t->day);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->month);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->year);
|
||||
}
|
||||
|
||||
void test_mud_time_passed_months(void)
|
||||
{
|
||||
time_t base = 1000000;
|
||||
struct time_info_data *t = mud_time_passed(base + SECS_PER_MUD_MONTH, base);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->hours);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->day);
|
||||
TEST_ASSERT_EQUAL_INT(1, t->month);
|
||||
TEST_ASSERT_EQUAL_INT(0, t->year);
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
* main
|
||||
* ========================================================= */
|
||||
|
||||
int main(void)
|
||||
{
|
||||
UNITY_BEGIN();
|
||||
|
||||
/* prune_crlf */
|
||||
RUN_TEST(test_prune_crlf_strips_crlf);
|
||||
RUN_TEST(test_prune_crlf_strips_lf_only);
|
||||
RUN_TEST(test_prune_crlf_no_op_on_clean);
|
||||
RUN_TEST(test_prune_crlf_multiple_trailing);
|
||||
|
||||
/* str_cmp */
|
||||
RUN_TEST(test_str_cmp_equal_strings);
|
||||
RUN_TEST(test_str_cmp_case_insensitive);
|
||||
RUN_TEST(test_str_cmp_ordering_less);
|
||||
RUN_TEST(test_str_cmp_ordering_greater);
|
||||
RUN_TEST(test_str_cmp_empty_equal);
|
||||
|
||||
/* strn_cmp */
|
||||
RUN_TEST(test_strn_cmp_equal_prefix);
|
||||
RUN_TEST(test_strn_cmp_differ_past_n);
|
||||
RUN_TEST(test_strn_cmp_differ_within_n);
|
||||
|
||||
/* sprintbit */
|
||||
RUN_TEST(test_sprintbit_no_bits_set);
|
||||
RUN_TEST(test_sprintbit_single_bit);
|
||||
RUN_TEST(test_sprintbit_multiple_bits);
|
||||
RUN_TEST(test_sprintbit_undefined_bit);
|
||||
|
||||
/* sprinttype */
|
||||
RUN_TEST(test_sprinttype_valid_index_zero);
|
||||
RUN_TEST(test_sprinttype_valid_index_one);
|
||||
RUN_TEST(test_sprinttype_out_of_range);
|
||||
|
||||
/* levenshtein_distance */
|
||||
RUN_TEST(test_levenshtein_identical_strings);
|
||||
RUN_TEST(test_levenshtein_empty_and_nonempty);
|
||||
RUN_TEST(test_levenshtein_single_insertion);
|
||||
RUN_TEST(test_levenshtein_single_deletion);
|
||||
RUN_TEST(test_levenshtein_single_substitution);
|
||||
RUN_TEST(test_levenshtein_both_empty);
|
||||
|
||||
/* count_color_chars */
|
||||
RUN_TEST(test_count_color_chars_no_codes);
|
||||
RUN_TEST(test_count_color_chars_empty);
|
||||
RUN_TEST(test_count_color_chars_single_color_code);
|
||||
RUN_TEST(test_count_color_chars_double_tab);
|
||||
RUN_TEST(test_count_color_chars_mixed);
|
||||
|
||||
/* count_non_protocol_chars */
|
||||
RUN_TEST(test_count_non_protocol_chars_plain);
|
||||
RUN_TEST(test_count_non_protocol_chars_empty);
|
||||
RUN_TEST(test_count_non_protocol_chars_newlines_skipped);
|
||||
RUN_TEST(test_count_non_protocol_chars_bracket_tag);
|
||||
|
||||
/* atoidx */
|
||||
RUN_TEST(test_atoidx_valid_number);
|
||||
RUN_TEST(test_atoidx_zero);
|
||||
RUN_TEST(test_atoidx_negative_returns_nowhere);
|
||||
RUN_TEST(test_atoidx_overflow_returns_nowhere);
|
||||
|
||||
/* right_trim_whitespace */
|
||||
RUN_TEST(test_right_trim_whitespace_trailing_spaces);
|
||||
RUN_TEST(test_right_trim_whitespace_no_trailing);
|
||||
RUN_TEST(test_right_trim_whitespace_all_whitespace);
|
||||
RUN_TEST(test_right_trim_whitespace_empty);
|
||||
|
||||
/* remove_from_string */
|
||||
RUN_TEST(test_remove_from_string_word_present);
|
||||
RUN_TEST(test_remove_from_string_word_absent);
|
||||
RUN_TEST(test_remove_from_string_word_at_start);
|
||||
|
||||
/* real_time_passed */
|
||||
RUN_TEST(test_real_time_passed_hours);
|
||||
RUN_TEST(test_real_time_passed_days);
|
||||
|
||||
/* mud_time_passed */
|
||||
RUN_TEST(test_mud_time_passed_hours);
|
||||
RUN_TEST(test_mud_time_passed_days);
|
||||
RUN_TEST(test_mud_time_passed_months);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Convert Unity test-runner output to JUnit XML.
|
||||
|
||||
Usage:
|
||||
./test_binary | python3 unity_to_junit.py <suite_name> <output.xml> [elapsed_seconds]
|
||||
|
||||
Unity emits one result line per test:
|
||||
path/to/file.c:LINE:TEST_NAME:PASS
|
||||
path/to/file.c:LINE:TEST_NAME:FAIL:message
|
||||
path/to/file.c:LINE:TEST_NAME:IGNORE:message
|
||||
followed by a summary line:
|
||||
N Tests N Failures N Ignored
|
||||
"""
|
||||
|
||||
import re
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
||||
def parse_unity(lines):
|
||||
tests = []
|
||||
total = failures = ignored = 0
|
||||
for line in lines:
|
||||
line = line.rstrip("\n")
|
||||
m = re.match(
|
||||
r"^.+:\d+:([^:]+):(PASS|FAIL|IGNORE)(?::(.*))?$", line
|
||||
)
|
||||
if m:
|
||||
name, result, message = m.group(1), m.group(2), m.group(3) or ""
|
||||
tests.append((name, result, message))
|
||||
continue
|
||||
m2 = re.match(r"^(\d+) Tests (\d+) Failures (\d+) Ignored", line)
|
||||
if m2:
|
||||
total, failures, ignored = int(m2.group(1)), int(m2.group(2)), int(m2.group(3))
|
||||
if not total:
|
||||
total = len(tests)
|
||||
failures = sum(1 for _, r, _ in tests if r == "FAIL")
|
||||
ignored = sum(1 for _, r, _ in tests if r == "IGNORE")
|
||||
return tests, total, failures, ignored
|
||||
|
||||
|
||||
def build_xml(suite_name, tests, total, failures, ignored, elapsed):
|
||||
# Distribute total time evenly across tests for per-testcase timing.
|
||||
per_test = round(elapsed / total, 6) if total else 0.0
|
||||
suite = ET.Element(
|
||||
"testsuite",
|
||||
name=suite_name,
|
||||
tests=str(total),
|
||||
failures=str(failures),
|
||||
errors="0",
|
||||
skipped=str(ignored),
|
||||
time=f"{elapsed:.6f}",
|
||||
)
|
||||
for name, result, message in tests:
|
||||
case = ET.SubElement(
|
||||
suite, "testcase",
|
||||
name=name, classname=suite_name, time=f"{per_test:.6f}",
|
||||
)
|
||||
if result == "FAIL":
|
||||
f = ET.SubElement(case, "failure", message=message)
|
||||
f.text = message
|
||||
elif result == "IGNORE":
|
||||
ET.SubElement(case, "skipped", message=message)
|
||||
return ET.ElementTree(suite)
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 3 or len(sys.argv) > 4:
|
||||
print(f"usage: {sys.argv[0]} <suite_name> <output.xml> [elapsed_seconds]", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
suite_name, output_file = sys.argv[1], sys.argv[2]
|
||||
elapsed = float(sys.argv[3]) if len(sys.argv) == 4 else 0.0
|
||||
tests, total, failures, ignored = parse_unity(sys.stdin.readlines())
|
||||
tree = build_xml(suite_name, tests, total, failures, ignored, elapsed)
|
||||
ET.indent(tree, space=" ")
|
||||
tree.write(output_file, encoding="unicode", xml_declaration=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Vendored
+2637
File diff suppressed because it is too large
Load Diff
Vendored
+698
@@ -0,0 +1,698 @@
|
||||
/* =========================================================================
|
||||
Unity - A Test Framework for C
|
||||
ThrowTheSwitch.org
|
||||
Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||
SPDX-License-Identifier: MIT
|
||||
========================================================================= */
|
||||
|
||||
#ifndef UNITY_FRAMEWORK_H
|
||||
#define UNITY_FRAMEWORK_H
|
||||
#define UNITY
|
||||
|
||||
#define UNITY_VERSION_MAJOR 2
|
||||
#define UNITY_VERSION_MINOR 6
|
||||
#define UNITY_VERSION_BUILD 3
|
||||
#define UNITY_VERSION ((UNITY_VERSION_MAJOR << 16) | (UNITY_VERSION_MINOR << 8) | UNITY_VERSION_BUILD)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "unity_internals.h"
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Test Setup / Teardown
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
/* These functions are intended to be called before and after each test.
|
||||
* If using unity directly, these will need to be provided for each test
|
||||
* executable built. If you are using the test runner generator and/or
|
||||
* Ceedling, these are optional. */
|
||||
void setUp(void);
|
||||
void tearDown(void);
|
||||
|
||||
/* These functions are intended to be called at the beginning and end of an
|
||||
* entire test suite. suiteTearDown() is passed the number of tests that
|
||||
* failed, and its return value becomes the exit code of main(). If using
|
||||
* Unity directly, you're in charge of calling these if they are desired.
|
||||
* If using Ceedling or the test runner generator, these will be called
|
||||
* automatically if they exist. */
|
||||
void suiteSetUp(void);
|
||||
int suiteTearDown(int num_failures);
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Test Reset and Verify
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
/* These functions are intended to be called before or during tests in order
|
||||
* to support complex test loops, etc. Both are NOT built into Unity. Instead
|
||||
* the test runner generator will create them. resetTest will run teardown and
|
||||
* setup again, verifying any end-of-test needs between. verifyTest will only
|
||||
* run the verification. */
|
||||
void resetTest(void);
|
||||
void verifyTest(void);
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Configuration Options
|
||||
*-------------------------------------------------------
|
||||
* All options described below should be passed as a compiler flag to all files using Unity. If you must add #defines, place them BEFORE the #include above.
|
||||
|
||||
* Integers/longs/pointers
|
||||
* - Unity attempts to automatically discover your integer sizes
|
||||
* - define UNITY_EXCLUDE_STDINT_H to stop attempting to look in <stdint.h>
|
||||
* - define UNITY_EXCLUDE_LIMITS_H to stop attempting to look in <limits.h>
|
||||
* - If you cannot use the automatic methods above, you can force Unity by using these options:
|
||||
* - define UNITY_SUPPORT_64
|
||||
* - set UNITY_INT_WIDTH
|
||||
* - set UNITY_LONG_WIDTH
|
||||
* - set UNITY_POINTER_WIDTH
|
||||
|
||||
* Floats
|
||||
* - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
|
||||
* - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT
|
||||
* - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats
|
||||
* - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
|
||||
* - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default)
|
||||
* - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE
|
||||
* - define UNITY_DOUBLE_TYPE to specify something other than double
|
||||
* - define UNITY_EXCLUDE_FLOAT_PRINT to trim binary size, won't print floating point values in errors
|
||||
|
||||
* Output
|
||||
* - by default, Unity prints to standard out with putchar. define UNITY_OUTPUT_CHAR(a) with a different function if desired
|
||||
* - define UNITY_DIFFERENTIATE_FINAL_FAIL to print FAILED (vs. FAIL) at test end summary - for automated search for failure
|
||||
|
||||
* Optimization
|
||||
* - by default, line numbers are stored in unsigned shorts. Define UNITY_LINE_TYPE with a different type if your files are huge
|
||||
* - by default, test and failure counters are unsigned shorts. Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests.
|
||||
|
||||
* Test Cases
|
||||
* - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script
|
||||
|
||||
* Parameterized Tests
|
||||
* - you'll want to create a define of TEST_CASE(...), TEST_RANGE(...) and/or TEST_MATRIX(...) which basically evaluates to nothing
|
||||
|
||||
* Tests with Arguments
|
||||
* - you'll want to define UNITY_USE_COMMAND_LINE_ARGS if you have the test runner passing arguments to Unity
|
||||
|
||||
*-------------------------------------------------------
|
||||
* Basic Fail and Ignore
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
#define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, (message))
|
||||
#define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
|
||||
#define TEST_IGNORE_MESSAGE(message) UNITY_TEST_IGNORE(__LINE__, (message))
|
||||
#define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
|
||||
#define TEST_MESSAGE(message) UnityMessage((message), __LINE__)
|
||||
#define TEST_ONLY()
|
||||
#ifdef UNITY_INCLUDE_PRINT_FORMATTED
|
||||
#define TEST_PRINTF(message, ...) UnityPrintF(__LINE__, (message), ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/* It is not necessary for you to call PASS. A PASS condition is assumed if nothing fails.
|
||||
* This method allows you to abort a test immediately with a PASS state, ignoring the remainder of the test. */
|
||||
#define TEST_PASS() TEST_ABORT()
|
||||
#define TEST_PASS_MESSAGE(message) do { UnityMessage((message), __LINE__); TEST_ABORT(); } while (0)
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Build Directives
|
||||
*-------------------------------------------------------
|
||||
|
||||
* These macros do nothing, but they are useful for additional build context.
|
||||
* Tools (like Ceedling) can scan for these directives and make use of them for
|
||||
* per-test-executable #include search paths and linking. */
|
||||
|
||||
/* Add source files to a test executable's compilation and linking. Ex: TEST_SOURCE_FILE("sandwiches.c") */
|
||||
#define TEST_SOURCE_FILE(a)
|
||||
|
||||
/* Customize #include search paths for a test executable's compilation. Ex: TEST_INCLUDE_PATH("src/module_a/inc") */
|
||||
#define TEST_INCLUDE_PATH(a)
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Test Asserts (simple)
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
/* Boolean */
|
||||
#define TEST_ASSERT(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expression Evaluated To FALSE")
|
||||
#define TEST_ASSERT_TRUE(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expected TRUE Was FALSE")
|
||||
#define TEST_ASSERT_UNLESS(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expression Evaluated To TRUE")
|
||||
#define TEST_ASSERT_FALSE(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expected FALSE Was TRUE")
|
||||
#define TEST_ASSERT_NULL(pointer) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, " Expected NULL")
|
||||
#define TEST_ASSERT_NOT_NULL(pointer) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
|
||||
#define TEST_ASSERT_EMPTY(pointer) UNITY_TEST_ASSERT_EMPTY( (pointer), __LINE__, " Expected Empty")
|
||||
#define TEST_ASSERT_NOT_EMPTY(pointer) UNITY_TEST_ASSERT_NOT_EMPTY((pointer), __LINE__, " Expected Non-Empty")
|
||||
|
||||
/* Integers (of all sizes) */
|
||||
#define TEST_ASSERT_EQUAL_INT(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_size_t(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX8(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX16(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX32(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX64(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_CHAR(expected, actual) UNITY_TEST_ASSERT_EQUAL_CHAR((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_BITS(mask, expected, actual) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_BITS_HIGH(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT)(-1), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_BITS_LOW(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT)(0), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_BIT_HIGH(bit, actual) UNITY_TEST_ASSERT_BITS(((UNITY_UINT)1 << (bit)), (UNITY_UINT)(-1), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_BIT_LOW(bit, actual) UNITY_TEST_ASSERT_BITS(((UNITY_UINT)1 << (bit)), (UNITY_UINT)(0), (actual), __LINE__, NULL)
|
||||
|
||||
/* Integer Not Equal To (of all sizes) */
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT8(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT16(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT32(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT64(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT8(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT16(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT32(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT64(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_size_t(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX8(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX16(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX32(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX64(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_CHAR(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
|
||||
|
||||
/* Integer Greater Than/ Less Than (of all sizes) */
|
||||
#define TEST_ASSERT_GREATER_THAN(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_INT(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_INT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_INT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_INT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_INT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_size_t(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX8(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX16(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX32(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_CHAR(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_CHAR((threshold), (actual), __LINE__, NULL)
|
||||
|
||||
#define TEST_ASSERT_LESS_THAN(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_INT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_INT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_INT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_INT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_INT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_UINT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_UINT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_UINT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_UINT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_UINT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_size_t(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_HEX8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_HEX16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_HEX32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_HEX64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_CHAR(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_CHAR((threshold), (actual), __LINE__, NULL)
|
||||
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_size_t(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX8(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX16(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX32(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_CHAR(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
|
||||
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_size_t(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_CHAR(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
|
||||
|
||||
/* Integer Ranges (of all sizes) */
|
||||
#define TEST_ASSERT_INT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_size_t_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_CHAR_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_CHAR_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
|
||||
/* Integer Array Ranges (of all sizes) */
|
||||
#define TEST_ASSERT_INT_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT8_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT16_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT32_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT8_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT16_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT32_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_size_t_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX8_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX16_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX32_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
#define TEST_ASSERT_CHAR_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
|
||||
|
||||
|
||||
/* Structs and Strings */
|
||||
#define TEST_ASSERT_EQUAL_PTR(expected, actual) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_STRING(expected, actual) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, NULL)
|
||||
|
||||
/* Arrays */
|
||||
#define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_size_t_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_CHAR_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
|
||||
/* Arrays Compared To Single Value */
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT8(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT8((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT16(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT16((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT32((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT64((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT8(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT8((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT16(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT16((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT32((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT64((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_size_t(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX8(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX8((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX16(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX16((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_CHAR(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_CHAR((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
|
||||
/* Floating Point (If Enabled) */
|
||||
#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_NOT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_NOT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_NOT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_FLOAT_ARRAY_WITHIN((delta), (expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_FLOAT(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_FLOAT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_FLOAT(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_FLOAT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_FLOAT(threshold, actual) UNITY_TEST_ASSERT_LESS_THAN_FLOAT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_FLOAT(threshold, actual) UNITY_TEST_ASSERT_LESS_OR_EQUAL_FLOAT((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_NEG_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NAN((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_DETERMINATE(actual) UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
|
||||
|
||||
/* Double (If Enabled) */
|
||||
#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_NOT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_NOT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_NOT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_DOUBLE_ARRAY_WITHIN((delta), (expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE((expected), (actual), (num_elements), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_THAN_DOUBLE(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_DOUBLE((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_DOUBLE(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_DOUBLE((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_THAN_DOUBLE(threshold, actual) UNITY_TEST_ASSERT_LESS_THAN_DOUBLE((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_DOUBLE(threshold, actual) UNITY_TEST_ASSERT_LESS_OR_EQUAL_DOUBLE((threshold), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_NEG_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NAN((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual) UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
|
||||
|
||||
/* Shorthand */
|
||||
#ifdef UNITY_SHORTHAND_AS_OLD
|
||||
#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_INT
|
||||
#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_MEM
|
||||
#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_MEMORY((&expected), (&actual), sizeof(expected), __LINE__, NULL)
|
||||
#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_RAW
|
||||
#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) == (actual)), __LINE__, " Expected Equal")
|
||||
#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_NONE
|
||||
#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Test Asserts (with additional messages)
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
/* Boolean */
|
||||
#define TEST_ASSERT_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
|
||||
#define TEST_ASSERT_TRUE_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
|
||||
#define TEST_ASSERT_UNLESS_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, (message))
|
||||
#define TEST_ASSERT_FALSE_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, (message))
|
||||
#define TEST_ASSERT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, (message))
|
||||
#define TEST_ASSERT_EMPTY_MESSAGE(pointer, message) UNITY_TEST_ASSERT_EMPTY( (pointer), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EMPTY_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_EMPTY((pointer), __LINE__, (message))
|
||||
|
||||
/* Integers (of all sizes) */
|
||||
#define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_size_t_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_BITS_MESSAGE(mask, expected, actual, message) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_BITS_HIGH_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(-1), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_BITS_LOW_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(0), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(-1), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(0), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_CHAR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_CHAR((expected), (actual), __LINE__, (message))
|
||||
|
||||
/* Integer Not Equal To (of all sizes) */
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_CHAR((threshold), (actual), __LINE__, (message))
|
||||
|
||||
|
||||
/* Integer Greater Than/ Less Than (of all sizes) */
|
||||
#define TEST_ASSERT_GREATER_THAN_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_CHAR((threshold), (actual), __LINE__, (message))
|
||||
|
||||
#define TEST_ASSERT_LESS_THAN_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_CHAR((threshold), (actual), __LINE__, (message))
|
||||
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, (message))
|
||||
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, (message))
|
||||
|
||||
/* Integer Ranges (of all sizes) */
|
||||
#define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_INT8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_INT16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_INT32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT32_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_INT64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT64_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT8_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT16_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT32_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT64_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_size_t_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX8_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX16_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_CHAR_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_CHAR_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
|
||||
/* Integer Array Ranges (of all sizes) */
|
||||
#define TEST_ASSERT_INT_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_INT8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_INT16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_INT32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_INT64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_UINT64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_size_t_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_HEX64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
#define TEST_ASSERT_CHAR_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
|
||||
|
||||
|
||||
/* Structs and Strings */
|
||||
#define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, (message))
|
||||
|
||||
/* Arrays */
|
||||
#define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_INT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_UINT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_size_t_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_HEX64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_PTR_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_CHAR_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
|
||||
/* Arrays Compared To Single Value*/
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT8_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT8((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT16_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT16((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT32((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_INT64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT64((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT8_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT8((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT16_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT16((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT32((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_UINT64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT64((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_size_t_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX8_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX8((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX16_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX16((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_HEX64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_PTR_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_STRING_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_MEMORY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_CHAR_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_CHAR((expected), (actual), (num_elements), __LINE__, (message))
|
||||
|
||||
/* Floating Point (If Enabled) */
|
||||
#define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_FLOAT((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_FLOAT_ARRAY_WITHIN((delta), (expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_FLOAT_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_FLOAT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_FLOAT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_FLOAT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_FLOAT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_FLOAT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_LESS_THAN_FLOAT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_FLOAT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_LESS_OR_EQUAL_FLOAT((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NAN((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, (message))
|
||||
|
||||
/* Double (If Enabled) */
|
||||
#define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_DOUBLE((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_DOUBLE_ARRAY_WITHIN((delta), (expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_EACH_EQUAL_DOUBLE_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE((expected), (actual), (num_elements), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_THAN_DOUBLE_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_DOUBLE((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL_DOUBLE_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_DOUBLE((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_THAN_DOUBLE_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_LESS_THAN_DOUBLE((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_DOUBLE_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_LESS_OR_EQUAL_DOUBLE((threshold), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NAN((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, (message))
|
||||
|
||||
/* Shorthand */
|
||||
#ifdef UNITY_SHORTHAND_AS_OLD
|
||||
#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
|
||||
#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, (message))
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_INT
|
||||
#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
|
||||
#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_MEM
|
||||
#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_MEMORY((&expected), (&actual), sizeof(expected), __LINE__, message)
|
||||
#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_RAW
|
||||
#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) == (actual)), __LINE__, message)
|
||||
#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, message)
|
||||
#endif
|
||||
#ifdef UNITY_SHORTHAND_AS_NONE
|
||||
#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
|
||||
#endif
|
||||
|
||||
/* end of UNITY_FRAMEWORK_H */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Vendored
+1283
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user