Cleaned up old (CircleMUD) stuff
This commit is contained in:
parent
a72075a840
commit
3fe7b6aade
@ -1,79 +0,0 @@
|
|||||||
Release history:
|
|
||||||
|
|
||||||
Version 3.1 (yes, no beta pl): November 18, 2002
|
|
||||||
|
|
||||||
For older releases and Changelog entries, see the Changelog-3.0 file in
|
|
||||||
the doc/ directory.
|
|
||||||
|
|
||||||
|
|
||||||
Legend
|
|
||||||
------
|
|
||||||
JE = Jeremy Elson (jelson@circlemud.org) Since Jul 16, 1993
|
|
||||||
AE = Alex Fletcher (furry@circlemud.org) Since Feb 23, 1995
|
|
||||||
GG = George Greer (greerga@circlemud.org) Since Oct 14, 1997
|
|
||||||
DK = Daniel A. Koepke (dkoepke@circlemud.org) Since Jul 11, 1999
|
|
||||||
|
|
||||||
<joke> New applicants must have a last name alphabetically after
|
|
||||||
'Koepke' and will only be accepted on December 2, 2001. </joke>
|
|
||||||
|
|
||||||
--- CircleMUD 3.1
|
|
||||||
|
|
||||||
11/19/2002
|
|
||||||
|
|
||||||
-- ae - act.informative.c, act.item.c, act.social.c, act.wizard.c, act.other.c,
|
|
||||||
alias.c, castle.c:
|
|
||||||
Began adding descriptions of each SYSERR in comments following
|
|
||||||
the actually log lines in the code. These are marked with a
|
|
||||||
'SYSERR_DESC:' tag, in the hopes that we can write a program
|
|
||||||
that will automatically collect the log message and descriptive
|
|
||||||
comments and compile a single document containing all of the
|
|
||||||
information.
|
|
||||||
|
|
||||||
-- ae - alias.c: Changed double log entries (with 'perror()' statements) to
|
|
||||||
put strerror() statements at the end of the single log line
|
|
||||||
rather than on a separate line.
|
|
||||||
|
|
||||||
12/02/2002
|
|
||||||
|
|
||||||
-- ae - utils.h: Changed core_dump_real() prototype. If we're going to fully
|
|
||||||
prototype everything else, why isn't this one? Pointed out
|
|
||||||
by Jesper R.jest.l<jesper@aradja.com>
|
|
||||||
|
|
||||||
01/06/2003
|
|
||||||
|
|
||||||
-- dk - interpreter.c: one_word() no longer ignores fill words, which caused
|
|
||||||
some keywords to be ignored in help file loading (the only
|
|
||||||
thing this function is used for in stock). Run into by
|
|
||||||
Thomas Arp <t_arp@stofanet.dk>.
|
|
||||||
|
|
||||||
01/15/2003
|
|
||||||
|
|
||||||
-- gg - comm.c: free_bufpool(); mail.c: free_mail_index(): New.
|
|
||||||
Idea (not code) from Thomas Arp <t_arp@STOFANET.DK>
|
|
||||||
|
|
||||||
-- gg - db.c: destroy_db(): Don't leak memory from followers list.
|
|
||||||
Only matters (briefly) when using 'shutdown' command.
|
|
||||||
|
|
||||||
-- gg - house.c: hcontrol_list_houses(): Correct a sizeof() in strlcpy().
|
|
||||||
|
|
||||||
03/31/2003
|
|
||||||
|
|
||||||
-- ae - act.movement.c: do_rest() had people going into the SITTING position
|
|
||||||
if they had a previously undefined position. Discovered by
|
|
||||||
Thomas Arp <t_arp@stofanet.dk>.
|
|
||||||
|
|
||||||
04/09/2003
|
|
||||||
|
|
||||||
-- ae - boards.c: Board_clear_board() has a memory clearing "bug" that can
|
|
||||||
cause issue on some systems. Found by Burkhard Knopf
|
|
||||||
<burkhard.knopf@tu-clausthal.de>
|
|
||||||
|
|
||||||
04/19/2003
|
|
||||||
|
|
||||||
-- ae - 25.obj, 120.obj, 72.wld: some typos fixed courtesy of Ken Ray
|
|
||||||
<kenr86@HOTMAIL.COM>
|
|
||||||
|
|
||||||
05/29/2003
|
|
||||||
|
|
||||||
-- ae - spells.c: fixed an output type in locate_object courtesy of
|
|
||||||
Edward Glamkowski <eglamkowski@angelfire.com>
|
|
1431
old-codebase/FAQ
1431
old-codebase/FAQ
File diff suppressed because it is too large
Load Diff
@ -1,209 +0,0 @@
|
|||||||
|
|
||||||
CircleMUD README File
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
Welcome to CircleMUD 3.1! I hope you enjoy your stay.
|
|
||||||
|
|
||||||
More information about CircleMUD can be found at the CircleMUD Home Page:
|
|
||||||
http://www.circlemud.org. That site has the latest source distributions,
|
|
||||||
code contributions, areas, and documentation (online in HTML form, and
|
|
||||||
downloadable in ASCII or Postscript). CircleMUD's official FTP site is
|
|
||||||
ftp://ftp.circlemud.org.
|
|
||||||
|
|
||||||
There is a mailing list for CircleMUD administrators and coders available.
|
|
||||||
To subscribe, write mail to listserv@post.queensu.ca with a message body
|
|
||||||
of "subscribe circle". Write to listserv@post.queensu.ca to send mail to
|
|
||||||
the list. We also now have email addresses for getting help
|
|
||||||
(help@circlemud.org), and reporting bugs (bugs@circlemud.org).
|
|
||||||
|
|
||||||
Use of this software in any capacity implies that you have read, understood,
|
|
||||||
and agreed to abide by the terms and conditions set down by the CircleMUD
|
|
||||||
license contained in the file license.doc.
|
|
||||||
|
|
||||||
Also, out of courtesy if nothing else, please keep the 'credits' file
|
|
||||||
intact. You can add your own credits on top of the existing file, but I'd
|
|
||||||
appreciate it if you would not simply remove it and all references to the
|
|
||||||
word "Circle" everywhere in the MUD.
|
|
||||||
|
|
||||||
Jeremy Elson
|
|
||||||
jelson@circlemud.org
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Downloading CircleMUD
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
You can find version 3.1 of CircleMUD at the following anonymous FTP sites:
|
|
||||||
|
|
||||||
ftp.circlemud.org:/pub/CircleMUD/3.x
|
|
||||||
ftp2.circlemud.org:/pub/CircleMUD/3.x
|
|
||||||
ftp.stormhaven.org:/pub/CircleMUD/3.x
|
|
||||||
|
|
||||||
You can also find information at the WWW site:
|
|
||||||
|
|
||||||
http://www.circlemud.org/
|
|
||||||
|
|
||||||
The archive is offered in several formats -- for example, one that ends in
|
|
||||||
.tar.gz, one that ends in .bz2, and one that ends in .zip. All of these
|
|
||||||
archives have the exact same contents, but have been compressed using
|
|
||||||
different compression programs. UNIX users usually use the .tar.gz or .bz2
|
|
||||||
versions; Windows and OS/2 users typically use the .zip version.
|
|
||||||
|
|
||||||
The archive will be called something like "circleXXXX.tar.gz" (where
|
|
||||||
"XXXX" is the version number).
|
|
||||||
|
|
||||||
Once you download the archive, you must decompress it. If you have the
|
|
||||||
.tar.gz version, uncompress it using gzip (GNU unzip) and the tar
|
|
||||||
archiver. (Both of these utilities can be downloaded from
|
|
||||||
ftp.gnu.ai.mit.edu:/pub/gnu if you don't have them.) To unpack the
|
|
||||||
archive on a UNIX system, type:
|
|
||||||
|
|
||||||
gzip -dc circle30xxxx.tar.gz | tar xvf -
|
|
||||||
|
|
||||||
If you have the .zip version, make sure to use an UNZIP program capable
|
|
||||||
of handling long filenames and which preserves the original directory
|
|
||||||
structure of the archive (PKUNZIP 2.04 does NOT do either of these things
|
|
||||||
by default). The best unzip program is the one made by the Info-Zip
|
|
||||||
team; it is compatible with all UNIX variants, Windows, OS/2, the Amiga,
|
|
||||||
and every other computer on the planet. For more information, see the
|
|
||||||
URL http://www.cdrom.com/pub/infozip/UnZip.html. If you have Windows
|
|
||||||
95, another good choice is WinZip (http://www.winzip.com/).
|
|
||||||
|
|
||||||
|
|
||||||
Compiling CircleMUD
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
CircleMUD compiles under a large number of operating systems; instructions
|
|
||||||
for compiling on each platform is in a different file.
|
|
||||||
|
|
||||||
From here, read:
|
|
||||||
|
|
||||||
doc/README.UNIX - If you have any type UNIX system, including Linux,
|
|
||||||
MkLinux, Ultrix, HP/UX, Solaris, SunOS, IRIX, FreeBSD,
|
|
||||||
OpenBSD, NetBSD, BSDi, Macintosh OS X, etc.
|
|
||||||
|
|
||||||
doc/README.WIN - If you have Windows 95 or NT.
|
|
||||||
|
|
||||||
doc/README.OS2 - If you are using OS/2 Warp Connect v3.0 or OS/2 v2.x.
|
|
||||||
|
|
||||||
doc/README.AMIGA - If you are using an Amiga running AmigaDOS. (If you're
|
|
||||||
running NetBSD or Linux on an Amiga, use README.UNIX
|
|
||||||
instead.)
|
|
||||||
|
|
||||||
doc/README.ARC - If you are using an Acorn running RiscOS.
|
|
||||||
|
|
||||||
doc/README.VMS - If you happen to be on OpenVMS.
|
|
||||||
|
|
||||||
|
|
||||||
If you are interested in porting CircleMUD to a new platform, see the
|
|
||||||
file doc/porting.txt for some tips.
|
|
||||||
|
|
||||||
Version 3.1 source currently does NOT compile under DOS, Windows 3.x, or
|
|
||||||
Windows for Workgroups. Also, we currently do not distribute binaries,
|
|
||||||
although the FTP site does have a very old Amiga binary of CircleMUD 2.20.
|
|
||||||
|
|
||||||
For a small, private MUD, or a MUD used only for testing and development,
|
|
||||||
about 10 megs of disk space and 16 megs of memory should be sufficient.
|
|
||||||
For large, public MUDs with a large player base, 30 megs to 50 megs of
|
|
||||||
disk space and at least 32 megs of memory are recommended. Free memory
|
|
||||||
is much more important than CPU speed; CircleMUD uses virtually no CPU
|
|
||||||
time.
|
|
||||||
|
|
||||||
|
|
||||||
Other Documentation
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
If this information isn't enough to get you running, there's a lot more
|
|
||||||
information available. All documentation (other than this file) is in
|
|
||||||
the "doc" directory and available on-line at http://www.circlemud.org/.
|
|
||||||
|
|
||||||
The README file in the doc directory describes each documentation file
|
|
||||||
in detail, but there are several main files which should be of interest:
|
|
||||||
|
|
||||||
"The CircleMUD Administrator's Guide" (admin.pdf)
|
|
||||||
A good place to start after reading this README file, admin.txt gives
|
|
||||||
an overall description of how Circle works, how to get it to compile and
|
|
||||||
run for the first time, information about customizing and configuration
|
|
||||||
options and command-line arguments, and tips on maintenance and day-to-day
|
|
||||||
MUD administration.
|
|
||||||
|
|
||||||
"The CircleMUD Builder's Manual" (building.pdf)
|
|
||||||
For the builders in your group, this documents the world-file format
|
|
||||||
and describes how to create new rooms, objects, and monsters. Also, it
|
|
||||||
describes how to add new areas to the MUD and gives some tips about game
|
|
||||||
balance and world-file debugging.
|
|
||||||
|
|
||||||
"The CircleMUD Coder's Manual" (coding.pdf)
|
|
||||||
For the coders in your group, a technical reference describing some of
|
|
||||||
the more basic coding tasks such as how to add new commands, spells,
|
|
||||||
skills, socials, and classes. Note that it assumes the reader already has
|
|
||||||
an excellent knowledge of C; the manual is not a C tutorial.
|
|
||||||
|
|
||||||
"The CircleMUD SYSERR List" (syserr.txt, syserr.ps)
|
|
||||||
A comprehensive list of all the possible SYSERR messages CircleMUD
|
|
||||||
can generate, and a description of what can cause each problem and how to
|
|
||||||
solve it. An excellent guide for troubleshooting and area debugging.
|
|
||||||
[NOTE: This document is not complete at this time]
|
|
||||||
|
|
||||||
|
|
||||||
Getting Help
|
|
||||||
------------
|
|
||||||
|
|
||||||
If you have strange problems -- and you can't figure out the answer by
|
|
||||||
reading the documentation -- fear not, there are many other resources
|
|
||||||
available. The best is probably our email alias specifically for newbie
|
|
||||||
questions: help@circlemud.org. Write to that address for basic questions
|
|
||||||
about getting Circle up and running.
|
|
||||||
|
|
||||||
For more advanced discussion, you can use the CircleMUD Mailing List.
|
|
||||||
You can subscribe by writing mail to "listserv@post.queensu.ca" with a
|
|
||||||
message body of "subscribe circle". If you want to write mail to the
|
|
||||||
list, address it to "circle@post.queensu.ca". Over 400 CircleMUD imps
|
|
||||||
read that list regularly.
|
|
||||||
|
|
||||||
If that doesn't work, you can always contact me directly by writing to
|
|
||||||
jelson@circlemud.org. Or, take a look at the CircleMUD Home Page which is
|
|
||||||
at http://www.circlemud.org which has extensive, up-to-date documentation
|
|
||||||
and patches on-line.
|
|
||||||
|
|
||||||
Finally, if you have USENET access and are very brave, you can try posting
|
|
||||||
to the newsgroups rec.games.mud.diku or rec.games.mud.admin.
|
|
||||||
|
|
||||||
No matter how you choose to get help, make sure to always include the
|
|
||||||
following information in your mail:
|
|
||||||
|
|
||||||
-- The exact version of CircleMUD you're using (e.g., "CircleMUD 2.20",
|
|
||||||
"CircleMUD 3.0 beta patchlevel 12", etc.).
|
|
||||||
-- The EXACT text of any error messages, compiler errors, link errors,
|
|
||||||
or any other errors you're getting.
|
|
||||||
-- The exact type of hardware, operating system name and version, and
|
|
||||||
compiler you're using.
|
|
||||||
-- A description of ANY changes you've made, no matter how small, that
|
|
||||||
might have contributed to the error.
|
|
||||||
-- If you are having trouble getting Circle running for the very first
|
|
||||||
time, also be sure to include the output of 'configure' and the file
|
|
||||||
'config.log'.
|
|
||||||
|
|
||||||
Remember, I get dozens of pieces of email every day. If you don't bother to
|
|
||||||
give me an excellent description of your problem, I will be somewhat annoyed
|
|
||||||
and will not be able to help you. For example, this email that I received:
|
|
||||||
|
|
||||||
hi I need some help with CircleMUD....i tried compiling it on my system
|
|
||||||
but I got all sorts of errors, and when i type bin/circle like it says
|
|
||||||
in the manual it doesn't work. Can you help???? you can log into my
|
|
||||||
system if you want, the password is mud5.
|
|
||||||
|
|
||||||
Letters like that are always ignored. I get a lot of them.
|
|
||||||
|
|
||||||
|
|
||||||
Good luck, and have fun!
|
|
||||||
|
|
||||||
Jeremy Elson
|
|
||||||
aka Ras/Rasmussen
|
|
||||||
jelson@circlemud.org
|
|
||||||
|
|
||||||
|
|
||||||
USE OF THIS SOFTWARE IN ANY CAPACITY IMPLIES THAT YOU HAVE READ, UNDERSTOOD,
|
|
||||||
AND AGREED TO ABIDE BY THE TERMS AND CONDITIONS SET DOWN BY THE CIRCLEMUD
|
|
||||||
LICENSE.
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cat << EOF
|
|
||||||
This script will purge your playerfile, and then delete the object files
|
|
||||||
of all players not in the playerfile. A log of all deleted players, and
|
|
||||||
the reason for their deletion, will be kept in lib/etc/DELETED. If you
|
|
||||||
would like to adjust the allowable idle times before players are deleted,
|
|
||||||
edit src/util/purgeplay.c and recompile it.
|
|
||||||
|
|
||||||
***************************************************************************
|
|
||||||
Note, you should NEVER run this script while the MUD is running. Also, you
|
|
||||||
may wish to make a backup of your playerfile and/or object files before
|
|
||||||
purging them.
|
|
||||||
***************************************************************************
|
|
||||||
|
|
||||||
Press return to continue with the purge, Ctrl-C to quit...
|
|
||||||
EOF
|
|
||||||
read dummy
|
|
||||||
echo "Last chance to bail out. Press return now to purge old players."
|
|
||||||
read dummy
|
|
||||||
|
|
||||||
echo "Purging playerfile, please wait..."
|
|
||||||
cd lib/etc
|
|
||||||
echo `date` >> DELETED
|
|
||||||
../../bin/purgeplay players >> DELETED
|
|
||||||
|
|
||||||
if [ ! -z players.new ]; then
|
|
||||||
mv players players.old
|
|
||||||
mv players.new players
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Done."
|
|
||||||
|
|
||||||
cd ../plrobjs
|
|
||||||
purgeobjs
|
|
||||||
cd ../..
|
|
||||||
exit
|
|
@ -1,166 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# CircleMUD autorun script
|
|
||||||
# Contributions by Fred Merkel, Stuart Lamble, and Jeremy Elson
|
|
||||||
# New log rotating code contributed by Peter Ajamian
|
|
||||||
# Copyright (c) 1996 The Trustees of The Johns Hopkins University
|
|
||||||
# All Rights Reserved
|
|
||||||
# See license.doc for more information
|
|
||||||
#
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# This script can be used to run CircleMUD over and over again (i.e., have it
|
|
||||||
# automatically reboot if it crashes). It will run the game, and copy some
|
|
||||||
# of the more useful information from the system logs to the 'log' directory
|
|
||||||
# for safe keeping.
|
|
||||||
#
|
|
||||||
# You can control the operation of this script by creating and deleting files
|
|
||||||
# in Circle's root directory, either manually or by using the 'shutdown'
|
|
||||||
# command from within the MUD.
|
|
||||||
#
|
|
||||||
# Creating a file called .fastboot makes the script wait only 5 seconds
|
|
||||||
# between reboot attempts instead of the usual 60. If you want a quick
|
|
||||||
# reboot, use the "shutdown reboot" command from within the MUD.
|
|
||||||
#
|
|
||||||
# Creating a file called .killscript makes the script terminate (i.e., stop
|
|
||||||
# rebooting the MUD). If you want to shut down the MUD and make it stay
|
|
||||||
# shut down, use the "shutdown die" command from within the MUD.
|
|
||||||
#
|
|
||||||
# Finally, if a file called pause exists, the script will not reboot the MUD
|
|
||||||
# again until pause is removed. This is useful if you want to turn the MUD
|
|
||||||
# off for a couple of minutes and then bring it back up without killing the
|
|
||||||
# script. Type "shutdown pause" from within the MUD to activate this feature.
|
|
||||||
#
|
|
||||||
|
|
||||||
# The port on which to run the MUD
|
|
||||||
PORT=4000
|
|
||||||
|
|
||||||
# Default flags to pass to the MUD server (see admin.txt for a description
|
|
||||||
# of all flags).
|
|
||||||
FLAGS='-q'
|
|
||||||
|
|
||||||
# Number of syslog.# files to keep in the log directory.
|
|
||||||
BACKLOGS=6
|
|
||||||
|
|
||||||
# Each record in the following variable contains information for one log file.
|
|
||||||
# The fields are filename:maxlines:pattern where filename is the name of the
|
|
||||||
# log file, maxlines is the maximum number of lines in the file (0 for
|
|
||||||
# unlimited) and pattern is a pattern which must be matched for a line to get
|
|
||||||
# copied from syslog to this log file.
|
|
||||||
LOGFILES='
|
|
||||||
delete:0:self-delete
|
|
||||||
dts:0:death trap
|
|
||||||
rip:0:killed
|
|
||||||
restarts:0:Running
|
|
||||||
levels:0:advanced
|
|
||||||
rentgone:0:equipment lost
|
|
||||||
usage:0:usage
|
|
||||||
newplayers:0:new player
|
|
||||||
errors:0:SYSERR
|
|
||||||
godcmds:0:(GC)
|
|
||||||
badpws:0:Bad PW
|
|
||||||
'
|
|
||||||
|
|
||||||
# The following is the number of lines in syslog.CRASH. Set to 0 to disable
|
|
||||||
# crashlogs.
|
|
||||||
LEN_CRASHLOG=30
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
#############
|
|
||||||
# Functions #
|
|
||||||
#############
|
|
||||||
|
|
||||||
# The proc_syslog function will grep the logs for the various different info
|
|
||||||
# and rotate the logs in the log directory.
|
|
||||||
proc_syslog () {
|
|
||||||
# Return if there's no syslog
|
|
||||||
if ! [ -s syslog ]; then return; fi
|
|
||||||
|
|
||||||
# Create the crashlog
|
|
||||||
if [ -n "$LEN_CRASHLOG" -a "$LEN_CRASHLOG" -gt 0 ]; then
|
|
||||||
tail -n $LEN_CRASHLOG syslog > syslog.CRASH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Append to the specialty logfiles and truncate to maximum length if
|
|
||||||
# applicable
|
|
||||||
OLD_IFS=$IFS
|
|
||||||
IFS='
|
|
||||||
'
|
|
||||||
for rec in $LOGFILES; do
|
|
||||||
name=log/`echo $rec|cut -f 1 -d:`
|
|
||||||
len=`echo $rec|cut -f 2 -d:`
|
|
||||||
pattern=`echo $rec|cut -f 3- -d:`
|
|
||||||
|
|
||||||
fgrep $pattern syslog >> $name
|
|
||||||
if [ $len -gt 0 ]; then
|
|
||||||
temp=`mktemp $name.XXXXXX`
|
|
||||||
tail -n $len $name > $temp
|
|
||||||
mv -f $temp $name
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS=$OLD_IFS
|
|
||||||
|
|
||||||
# Find the # to set the new log file to.
|
|
||||||
if [ -s log/syslog.$BACKLOGS ]; then
|
|
||||||
declare -i newlog=$BACKLOGS+1
|
|
||||||
else
|
|
||||||
declare -i newlog=1
|
|
||||||
while [ -s log/syslog.$newlog ]; do newlog=$newlog+1; done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Rotate the logs.
|
|
||||||
declare -i y=2
|
|
||||||
while [ $y -lt $newlog ]; do
|
|
||||||
declare -i x=$y-1
|
|
||||||
mv -f log/syslog.$y log/syslog.$x
|
|
||||||
y=$y+1
|
|
||||||
done
|
|
||||||
mv -f syslog log/syslog.$newlog
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
########
|
|
||||||
# Main #
|
|
||||||
########
|
|
||||||
|
|
||||||
# Check to see if there is a syslog which would indicate that autorun
|
|
||||||
# was improperly killed (ie maybe the system was rebooted or ?).
|
|
||||||
if [ -s syslog ]; then
|
|
||||||
echo Improper shutdown of autorun detected, rotating syslogs before startup. >> syslog
|
|
||||||
proc_syslog
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The main loop
|
|
||||||
while ( : ) do
|
|
||||||
|
|
||||||
DATE=`date`
|
|
||||||
echo "autorun starting game $DATE" > syslog
|
|
||||||
echo "running bin/circle $FLAGS $PORT" >> syslog
|
|
||||||
|
|
||||||
# On Cygwin, you may need to precede this next line with './' for
|
|
||||||
# './bin/circle' as the command.
|
|
||||||
bin/circle $FLAGS $PORT >> syslog 2>&1
|
|
||||||
|
|
||||||
if [ -r .killscript ]; then
|
|
||||||
DATE=`date`;
|
|
||||||
echo "autoscript killed $DATE" >> syslog
|
|
||||||
rm .killscript
|
|
||||||
proc_syslog
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -r .fastboot ]; then
|
|
||||||
sleep 60
|
|
||||||
else
|
|
||||||
rm .fastboot
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ -r pause ]; do
|
|
||||||
sleep 60
|
|
||||||
done
|
|
||||||
|
|
||||||
proc_syslog
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
done
|
|
@ -1,29 +0,0 @@
|
|||||||
From: Peter Ajamian <peter@pajamian.dhs.org>
|
|
||||||
|
|
||||||
This is something I did a few weeks ago but didn't get around to
|
|
||||||
submitting it until now. Basically There have always been a few things
|
|
||||||
about the autorun script which have always irked me, this "improved"
|
|
||||||
version is my attempt to correct those deficiencies as well as to add a
|
|
||||||
little bit of extra functionality to the script. The script addresses
|
|
||||||
the following deficiencies:
|
|
||||||
- syslog rotation: When a new MUD is started an error is produced
|
|
||||||
during the syslog rotation after the first 6 times the MUD is run. This
|
|
||||||
is because there is no check for the existance of the files being
|
|
||||||
rotated.
|
|
||||||
- autorun crashes append to log instead of rotating: If autorun crashes,
|
|
||||||
or is manually killed, or a server reboot is done without first shutting
|
|
||||||
down the MUD then the new syslog will continue to append to the old one
|
|
||||||
instead of rotating the syslogs and starting a fresh one. This is
|
|
||||||
because the syslogs are currently rotated only _after_ the mud is
|
|
||||||
properly shut down. To correct for this I have allowed for syslog
|
|
||||||
rotation before the MUD boots as well. Also this script will detect
|
|
||||||
improper shutdown of autorun and make a note in the syslog before
|
|
||||||
rotating them.
|
|
||||||
- Better customization of grep-generated logs: Various options have been
|
|
||||||
added to the autorun script to allow for easy customization of
|
|
||||||
grep-generated logs. See the comments in the script for details.
|
|
||||||
|
|
||||||
You may want to do some compatibility testing on varying platforms
|
|
||||||
because this uses various commands that were are not present in the
|
|
||||||
current autorun (cut, mktemp, and maybe others I can't think of now).
|
|
||||||
This script also uses functions.
|
|
@ -1,33 +0,0 @@
|
|||||||
LAB runloop
|
|
||||||
|
|
||||||
if exists .killscript then
|
|
||||||
delete .killscript quiet
|
|
||||||
SKIP the_end
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists .fastboot then
|
|
||||||
wait 3
|
|
||||||
delete .fastboot quiet
|
|
||||||
else
|
|
||||||
wait 5
|
|
||||||
endif
|
|
||||||
|
|
||||||
bin/Circle
|
|
||||||
|
|
||||||
search nonum log/syslog "self-delete" >> log/delete
|
|
||||||
search nonum log/syslog "death trap" >> log/dts
|
|
||||||
search nonum log/syslog "killed" >> log/rip
|
|
||||||
search nonum log/syslog "Running" >> log/restarts
|
|
||||||
search nonum log/syslog "advanced" >> log/levels
|
|
||||||
search nonum log/syslog "equipment lost" >> log/rentgone
|
|
||||||
search nonum log/syslog "usage" >> log/usage
|
|
||||||
search nonum log/syslog "new player" >> log/newplayers
|
|
||||||
search nonum log/syslog "SYSERR" >> log/errors
|
|
||||||
search nonum log/syslog "(GC)" >> log/godcmds
|
|
||||||
search nonum log/syslog "Bad PW" >> log/badpws
|
|
||||||
|
|
||||||
delete log/syslog quiet
|
|
||||||
|
|
||||||
SKIP runloop BACK
|
|
||||||
|
|
||||||
LAB the_end
|
|
@ -1,75 +0,0 @@
|
|||||||
/* REXX */
|
|
||||||
/* Note: This is an example Autorun REXX Script for use with OS/2 and
|
|
||||||
CircleMUD. You may use it as is, or as the basis for your own
|
|
||||||
script.
|
|
||||||
April 18, 1996 - David A. Carver */
|
|
||||||
|
|
||||||
/* CircleMUD autorun script
|
|
||||||
* Originally by Fred C. Merkel
|
|
||||||
* Copyright (c) 1993 The Trustees of The Johns Hopkins University
|
|
||||||
* All Rights Reserved
|
|
||||||
* See license.doc for more information
|
|
||||||
*
|
|
||||||
* If .fastboot exists, the script will sleep for only 5 seconds between
|
|
||||||
* reboot attempts. If .killscript exists, the script commit suicide (and
|
|
||||||
* remove .killscript). If pause exists, the script will repeatedly sleep for
|
|
||||||
* 60 seconds and will not restart the mud until pause is removed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'echo off'
|
|
||||||
|
|
||||||
PORT=4000
|
|
||||||
FLAGS=''
|
|
||||||
|
|
||||||
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
|
|
||||||
call SysLoadFuncs
|
|
||||||
|
|
||||||
Do forever
|
|
||||||
call SysCls
|
|
||||||
say center('CrapWeasel MUD',79)
|
|
||||||
say center('AutoRun Procedure',79)
|
|
||||||
'del syslog'
|
|
||||||
Say "AutoRun starting game " || DATE()
|
|
||||||
"set EMXOPT=-h150"
|
|
||||||
|
|
||||||
"bin\circle " FLAGS PORT || " >> syslog"
|
|
||||||
|
|
||||||
|
|
||||||
say 'Extracting little log information'
|
|
||||||
'del log\*.* /n'
|
|
||||||
'fgrep -w "self-delete" syslog >> log/delete'
|
|
||||||
'fgrep -w "death trap" syslog >> log/dts'
|
|
||||||
'fgrep -w "killed" syslog >> log/rip'
|
|
||||||
'fgrep -w "Running" syslog >> log/restarts'
|
|
||||||
'fgrep -w "advanced" syslog >> log/levels'
|
|
||||||
'fgrep -w "equipment lost" syslog >> log/rentgone'
|
|
||||||
'fgrep -w "usage" syslog >> log/usage'
|
|
||||||
'fgrep -w "olc" syslog >> log/olc'
|
|
||||||
'fgrep -w "new player" syslog >> log/newplayers'
|
|
||||||
'fgrep -w "SYSERR" syslog >> log/errors'
|
|
||||||
'fgrep -w "(GC)" syslog >> log/godcmds'
|
|
||||||
'fgrep -w "Bad PW" syslog >> log/badpws'
|
|
||||||
'fgrep -w "has connected" syslog >> log/whocon'
|
|
||||||
|
|
||||||
Do while stream("pause","c","query exists")<>""
|
|
||||||
Say "Pausing..."
|
|
||||||
Call SysSleep(10)
|
|
||||||
end
|
|
||||||
|
|
||||||
if (stream("fastboot","c","query exists")="") then do
|
|
||||||
Say "Waiting 40 seconds to reboot"
|
|
||||||
Call SysSleep(40)
|
|
||||||
end
|
|
||||||
else do
|
|
||||||
"del fastboot"
|
|
||||||
Say "Waiting 5 seconds to reboot"
|
|
||||||
Call SysSleep(5)
|
|
||||||
end
|
|
||||||
|
|
||||||
if (stream("killscr","c","query exists")<>"") then do
|
|
||||||
Say "Exiting autorun"
|
|
||||||
"echo autoscript killed "DATE() ">> syslog"
|
|
||||||
"del killscr"
|
|
||||||
exit
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,107 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
# autorun -- maintain a Circle mud server
|
|
||||||
# Copyright (c)1995 Vi'Rage Studios
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# csh original by Fred C. Merkel, PERL conversion by D. Hall
|
|
||||||
|
|
||||||
# .fastboot sleep for only 5 seconds, instead of the default 20
|
|
||||||
# .killscript script will exit, and mud will not reboot
|
|
||||||
# .pause pause (sleep 1 minute intervals) until .pause it removed
|
|
||||||
|
|
||||||
$port = 4000;
|
|
||||||
$flags = "-q";
|
|
||||||
|
|
||||||
$home = ".";
|
|
||||||
$bin = "$home/bin";
|
|
||||||
$lib = "$home/lib";
|
|
||||||
$log = "$home/log";
|
|
||||||
|
|
||||||
chdir $home;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
|
|
||||||
# Open SYSLOG and dup STDERR into SYSLOG
|
|
||||||
open (SYSLOG, ">> syslog");
|
|
||||||
open (STDERR, ">& SYSLOG");
|
|
||||||
|
|
||||||
print SYSLOG "autoscript starting game ", `date`;
|
|
||||||
open (SERVER, "bin/circle $flags $port |");
|
|
||||||
|
|
||||||
while (<SERVER>) {
|
|
||||||
print SYSLOG;
|
|
||||||
}
|
|
||||||
|
|
||||||
# First we open everything
|
|
||||||
open (SYSLOG, "<syslog");
|
|
||||||
open (DELETE, ">>log/delete");
|
|
||||||
open (DTRAPS, ">>log/dtraps");
|
|
||||||
open (DEATHS, ">>log/deaths");
|
|
||||||
open (REBOOT, ">>log/reboots");
|
|
||||||
open (LEVELS, ">>log/levels");
|
|
||||||
open (NORENT, ">>log/norent");
|
|
||||||
open (USAGE, ">>log/usage");
|
|
||||||
open (NEWPLR, ">>log/newplrs");
|
|
||||||
open (SYSERR, ">>log/errors");
|
|
||||||
open (GODCMD, ">>log/godcmds");
|
|
||||||
open (BADPWS, ">>log/badpws");
|
|
||||||
|
|
||||||
# Then we stash everything
|
|
||||||
while (<SYSLOG>) {
|
|
||||||
print DELETE if /self-delete/;
|
|
||||||
print DTRAPS if /death trap/;
|
|
||||||
print DEATHS if /killed/;
|
|
||||||
print REBOOT if /Running/;
|
|
||||||
print LEVELS if /advanced/;
|
|
||||||
print NORENT if /equipment lost/;
|
|
||||||
print USAGE if /usage/;
|
|
||||||
print NEWPLR if /new player/;
|
|
||||||
print SYSERR if /SYSERR/;
|
|
||||||
print GODCMD if /\(GC\)/;
|
|
||||||
print BADPWs if /Bad PW/;
|
|
||||||
}
|
|
||||||
close (SYSLOG);
|
|
||||||
|
|
||||||
# Rotate SYSLOG files
|
|
||||||
unlink ('log/syslog.6');
|
|
||||||
rename ('log/syslog.5', 'log/syslog.6');
|
|
||||||
rename ('log/syslog.4', 'log/syslog.5');
|
|
||||||
rename ('log/syslog.3', 'log/syslog.4');
|
|
||||||
rename ('log/syslog.2', 'log/syslog.3');
|
|
||||||
rename ('log/syslog.1', 'log/syslog.2');
|
|
||||||
rename ('syslog' , 'log/syslog.1');
|
|
||||||
|
|
||||||
# should we stay dead?
|
|
||||||
if (-r '.killscript') {
|
|
||||||
unlink '.killscript';
|
|
||||||
open (SYSLOG, '>> log/syslog.1');
|
|
||||||
print SYSLOG "autoscript killed ", `date`;
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
# or just play dead?
|
|
||||||
while (-r '.pause') {
|
|
||||||
sleep 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
# or reboot as soon as possible?
|
|
||||||
if (-r '.fastboot') {
|
|
||||||
unlink '.fastboot';
|
|
||||||
sleep 5;
|
|
||||||
} else {
|
|
||||||
sleep 20
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,92 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# CircleMUD autorun script
|
|
||||||
# Contributions by Fred Merkel, Stuart Lamble, and Jeremy Elson
|
|
||||||
# Copyright (c) 1996 The Trustees of The Johns Hopkins University
|
|
||||||
# All Rights Reserved
|
|
||||||
# See license.doc for more information
|
|
||||||
#
|
|
||||||
#############################################################################
|
|
||||||
#
|
|
||||||
# This script can be used to run CircleMUD over and over again (i.e., have it
|
|
||||||
# automatically reboot if it crashes). It will run the game, and copy some
|
|
||||||
# of the more useful information from the system logs to the 'log' directory
|
|
||||||
# for safe keeping.
|
|
||||||
#
|
|
||||||
# You can control the operation of this script by creating and deleting files
|
|
||||||
# in Circle's root directory, either manually or by using the 'shutdown'
|
|
||||||
# command from within the MUD.
|
|
||||||
#
|
|
||||||
# Creating a file called .fastboot makes the script wait only 5 seconds
|
|
||||||
# between reboot attempts instead of the usual 60. If you want a quick
|
|
||||||
# reboot, use the "shutdown reboot" command from within the MUD.
|
|
||||||
#
|
|
||||||
# Creating a file called .killscript makes the script terminate (i.e., stop
|
|
||||||
# rebooting the MUD). If you want to shut down the MUD and make it stay
|
|
||||||
# shut down, use the "shutdown die" command from within the MUD.
|
|
||||||
#
|
|
||||||
# Finally, if a file called pause exists, the script will not reboot the MUD
|
|
||||||
# again until pause is removed. This is useful if you want to turn the MUD
|
|
||||||
# off for a couple of minutes and then bring it back up without killing the
|
|
||||||
# script. Type "shutdown pause" from within the MUD to activate this feature.
|
|
||||||
#
|
|
||||||
|
|
||||||
# The port on which to run the MUD
|
|
||||||
PORT=4000
|
|
||||||
|
|
||||||
# Default flags to pass to the MUD server (see admin.txt for a description
|
|
||||||
# of all flags).
|
|
||||||
FLAGS='-q'
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
while ( : ) do
|
|
||||||
|
|
||||||
DATE=`date`
|
|
||||||
echo "autorun starting game $DATE" >> syslog
|
|
||||||
echo "running bin/circle $FLAGS $PORT" >> syslog
|
|
||||||
|
|
||||||
bin/circle $FLAGS $PORT >> syslog 2>&1
|
|
||||||
|
|
||||||
tail -30 syslog > syslog.CRASH
|
|
||||||
|
|
||||||
fgrep "self-delete" syslog >> log/delete
|
|
||||||
fgrep "death trap" syslog >> log/dts
|
|
||||||
fgrep "killed" syslog >> log/rip
|
|
||||||
fgrep "Running" syslog >> log/restarts
|
|
||||||
fgrep "advanced" syslog >> log/levels
|
|
||||||
fgrep "equipment lost" syslog >> log/rentgone
|
|
||||||
fgrep "usage" syslog >> log/usage
|
|
||||||
fgrep "new player" syslog >> log/newplayers
|
|
||||||
fgrep "SYSERR" syslog >> log/errors
|
|
||||||
fgrep "(GC)" syslog >> log/godcmds
|
|
||||||
fgrep "Bad PW" syslog >> log/badpws
|
|
||||||
|
|
||||||
rm log/syslog.1
|
|
||||||
mv log/syslog.2 log/syslog.1
|
|
||||||
mv log/syslog.3 log/syslog.2
|
|
||||||
mv log/syslog.4 log/syslog.3
|
|
||||||
mv log/syslog.5 log/syslog.4
|
|
||||||
mv log/syslog.6 log/syslog.5
|
|
||||||
mv syslog log/syslog.6
|
|
||||||
touch syslog
|
|
||||||
|
|
||||||
if [ -r .killscript ]; then
|
|
||||||
DATE=`date`;
|
|
||||||
echo "autoscript killed $DATE" >> syslog
|
|
||||||
rm .killscript
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -r .fastboot ]; then
|
|
||||||
sleep 60
|
|
||||||
else
|
|
||||||
rm .fastboot
|
|
||||||
sleep 5
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ -r pause ]; do
|
|
||||||
sleep 60
|
|
||||||
done
|
|
||||||
|
|
||||||
done
|
|
12
old-codebase/bin/.gitignore
vendored
12
old-codebase/bin/.gitignore
vendored
@ -1,12 +0,0 @@
|
|||||||
autowiz
|
|
||||||
delobjs
|
|
||||||
listrent
|
|
||||||
mudpasswd
|
|
||||||
play2to3
|
|
||||||
purgeplay
|
|
||||||
shopconv
|
|
||||||
showplay
|
|
||||||
sign
|
|
||||||
split
|
|
||||||
wld2html
|
|
||||||
circle
|
|
@ -1 +0,0 @@
|
|||||||
This is the directory for compiled binaries.
|
|
@ -1,48 +0,0 @@
|
|||||||
$!
|
|
||||||
$! VMS_CIRCLEMUD.COM
|
|
||||||
$! Written By: Robert Alan Byer
|
|
||||||
$! byer@mail.ourservers.net
|
|
||||||
$!
|
|
||||||
$! This command procedure is called from [-]VMS_AUTORUN.COM to run CIRCLE.EXE
|
|
||||||
$! as a standalone detached process.
|
|
||||||
$!
|
|
||||||
$! The CIRCLE.EXE accepts the following parameters.
|
|
||||||
$!
|
|
||||||
$! -m Mini-Mud Mode. Mini-mud will be one of your most powerful
|
|
||||||
$! debugging tools; it causes Circle to boot with an abridged
|
|
||||||
$! world, cutting the boot time down to several seconds. It
|
|
||||||
$! is useful for testing features with are not world-related.
|
|
||||||
$! (i.e. new commands or spells)
|
|
||||||
$!
|
|
||||||
$! -q Quick boot. Prevents checking of times out object files.
|
|
||||||
$! Every time Circle boots, it checks every object file to
|
|
||||||
$! see if it has timed out; if so, it is deleted. This is
|
|
||||||
$! done primarily to save disk space. If time is more important
|
|
||||||
$! to you than disk space, use the -q option. "-q" is
|
|
||||||
$! automatically activated when you use "-m"
|
|
||||||
$!
|
|
||||||
$! -d Data directory. Useful as a debugging and development tool,
|
|
||||||
$! if you want to keep one or more sets of game data in addition
|
|
||||||
$! to the standard set, and choose which set is to be used at
|
|
||||||
$! run-time. Example, you can copy the entire world into a
|
|
||||||
$! seperate directory so you can test additions without
|
|
||||||
$! messing up the existing world files. The default directory
|
|
||||||
$! is "lib". Any core dumps (may they never happen to you!)
|
|
||||||
$! will take place in the selected data directory.
|
|
||||||
$!
|
|
||||||
$! port Port selection. Allows you to choose on which port the
|
|
||||||
$! game is to listen for connections. The default is 4000,
|
|
||||||
$! which is historically the port used by most DikuMUDs.
|
|
||||||
$!
|
|
||||||
$!
|
|
||||||
$! Define The Symbol For CIRCLE.EXE
|
|
||||||
$!
|
|
||||||
$ CIRCLE :== $CIRCLEMUD_ROOT:[BIN]CIRCLE.EXE
|
|
||||||
$!
|
|
||||||
$! Run CircleMUD.
|
|
||||||
$!
|
|
||||||
$ CIRCLE
|
|
||||||
$!
|
|
||||||
$! Time To Exit This Procedure.
|
|
||||||
$!
|
|
||||||
$ EXIT
|
|
@ -1,16 +0,0 @@
|
|||||||
$!
|
|
||||||
$! VMS_CIRCLEMUD_UTILS.COM
|
|
||||||
$! Written By: Robert Alan Byer
|
|
||||||
$! byer@mail.ourservers.net
|
|
||||||
$!
|
|
||||||
$! Define The CircleMUD Symbols.
|
|
||||||
$!
|
|
||||||
$ DELOBJS :== $CIRCLEMUD_BIN:DELOBJS.EXE
|
|
||||||
$ LISTRENT :== $CIRCLEMUD_BIN:LISTRENT.EXE
|
|
||||||
$ MUDPASSWD :== $CIRCLEMUD_BIN:MUDPASSWD.EXE
|
|
||||||
$ PLAY2TO3 :== $CIRCLEMUD_BIN:PLAY2TO3.EXE
|
|
||||||
$ PURGEPLAY :== $CIRCLEMUD_BIN:PURGEPLAY.EXE
|
|
||||||
$ SHOPCONV :== $CIRCLEMUD_BIN:SHOPCONV.EXE
|
|
||||||
$ SHOWPLAY :== $CIRCLEMUD_BIN:SHOWPLAY.EXE
|
|
||||||
$ SPLIT :== $CIRCLEMUD_BIN:SPLIT.EXE
|
|
||||||
$ WLD2HTML :== $CIRCLEMUD_BIN:WLD2HTML.EXE
|
|
1
old-codebase/cnf/.gitignore
vendored
1
old-codebase/cnf/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
autom4te.cache
|
|
@ -1,2 +0,0 @@
|
|||||||
These files are for generating the 'configure' script. They are useless
|
|
||||||
to everyone except for hackers who know how to use GNU autoconf. JE 28 Oct 97
|
|
@ -1,17 +0,0 @@
|
|||||||
/* Define if we're compiling CircleMUD under any type of UNIX system. */
|
|
||||||
#undef CIRCLE_UNIX
|
|
||||||
|
|
||||||
/* Define if the system is capable of using crypt() to encrypt. */
|
|
||||||
#undef CIRCLE_CRYPT
|
|
||||||
|
|
||||||
/* Define if we don't have proper support for the system's crypt(). */
|
|
||||||
#undef HAVE_UNSAFE_CRYPT
|
|
||||||
|
|
||||||
/* Define is the system has struct in_addr. */
|
|
||||||
#undef HAVE_STRUCT_IN_ADDR
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/socket.h> doesn't define. */
|
|
||||||
#undef socklen_t
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#undef ssize_t
|
|
174
old-codebase/cnf/aclocal.m4
vendored
174
old-codebase/cnf/aclocal.m4
vendored
@ -1,174 +0,0 @@
|
|||||||
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
|
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
|
||||||
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
|
||||||
# This file is free software; the Free Software Foundation
|
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
|
||||||
# with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
# PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
|
||||||
# serial 1 (pkg-config-0.24)
|
|
||||||
#
|
|
||||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
# General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
#
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
|
||||||
# ----------------------------------
|
|
||||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
|
||||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
|
||||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
|
||||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
|
||||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
|
||||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
|
||||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
|
||||||
|
|
||||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
|
||||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
|
||||||
fi
|
|
||||||
if test -n "$PKG_CONFIG"; then
|
|
||||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
|
||||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
|
||||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
PKG_CONFIG=""
|
|
||||||
fi
|
|
||||||
fi[]dnl
|
|
||||||
])# PKG_PROG_PKG_CONFIG
|
|
||||||
|
|
||||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
||||||
#
|
|
||||||
# Check to see whether a particular set of modules exists. Similar
|
|
||||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
|
||||||
#
|
|
||||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
||||||
# only at the first occurence in configure.ac, so if the first place
|
|
||||||
# it's called might be skipped (such as if it is within an "if", you
|
|
||||||
# have to call PKG_CHECK_EXISTS manually
|
|
||||||
# --------------------------------------------------------------
|
|
||||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
||||||
if test -n "$PKG_CONFIG" && \
|
|
||||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
|
||||||
m4_default([$2], [:])
|
|
||||||
m4_ifvaln([$3], [else
|
|
||||||
$3])dnl
|
|
||||||
fi])
|
|
||||||
|
|
||||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
|
||||||
# ---------------------------------------------
|
|
||||||
m4_define([_PKG_CONFIG],
|
|
||||||
[if test -n "$$1"; then
|
|
||||||
pkg_cv_[]$1="$$1"
|
|
||||||
elif test -n "$PKG_CONFIG"; then
|
|
||||||
PKG_CHECK_EXISTS([$3],
|
|
||||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
|
||||||
test "x$?" != "x0" && pkg_failed=yes ],
|
|
||||||
[pkg_failed=yes])
|
|
||||||
else
|
|
||||||
pkg_failed=untried
|
|
||||||
fi[]dnl
|
|
||||||
])# _PKG_CONFIG
|
|
||||||
|
|
||||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
|
||||||
# -----------------------------
|
|
||||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
||||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
|
||||||
_pkg_short_errors_supported=yes
|
|
||||||
else
|
|
||||||
_pkg_short_errors_supported=no
|
|
||||||
fi[]dnl
|
|
||||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
|
||||||
|
|
||||||
|
|
||||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
|
||||||
# [ACTION-IF-NOT-FOUND])
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Note that if there is a possibility the first call to
|
|
||||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
|
||||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# --------------------------------------------------------------
|
|
||||||
AC_DEFUN([PKG_CHECK_MODULES],
|
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
||||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
|
||||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
|
||||||
|
|
||||||
pkg_failed=no
|
|
||||||
AC_MSG_CHECKING([for $1])
|
|
||||||
|
|
||||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
|
||||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
|
||||||
|
|
||||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
|
||||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
|
||||||
See the pkg-config man page for more details.])
|
|
||||||
|
|
||||||
if test $pkg_failed = yes; then
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
_PKG_SHORT_ERRORS_SUPPORTED
|
|
||||||
if test $_pkg_short_errors_supported = yes; then
|
|
||||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
|
||||||
else
|
|
||||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
|
||||||
fi
|
|
||||||
# Put the nasty error message in config.log where it belongs
|
|
||||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
|
||||||
|
|
||||||
m4_default([$4], [AC_MSG_ERROR(
|
|
||||||
[Package requirements ($2) were not met:
|
|
||||||
|
|
||||||
$$1_PKG_ERRORS
|
|
||||||
|
|
||||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
|
||||||
installed software in a non-standard prefix.
|
|
||||||
|
|
||||||
_PKG_TEXT])[]dnl
|
|
||||||
])
|
|
||||||
elif test $pkg_failed = untried; then
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
m4_default([$4], [AC_MSG_FAILURE(
|
|
||||||
[The pkg-config script could not be found or is too old. Make sure it
|
|
||||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
|
||||||
path to pkg-config.
|
|
||||||
|
|
||||||
_PKG_TEXT
|
|
||||||
|
|
||||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
|
||||||
])
|
|
||||||
else
|
|
||||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
|
||||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
$3
|
|
||||||
fi[]dnl
|
|
||||||
])# PKG_CHECK_MODULES
|
|
||||||
|
|
||||||
m4_include([local.m4])
|
|
@ -1,2 +0,0 @@
|
|||||||
aclocal -I .
|
|
||||||
autoconf
|
|
@ -1,220 +0,0 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
|
||||||
AC_INIT(src/act.comm.c)
|
|
||||||
AC_CONFIG_MACRO_DIR([.])
|
|
||||||
AC_SUBST(MYFLAGS)
|
|
||||||
AC_SUBST(NETLIB)
|
|
||||||
AC_SUBST(CRYPTLIB)
|
|
||||||
|
|
||||||
AC_CONFIG_HEADER(src/conf.h)
|
|
||||||
AC_DEFINE(CIRCLE_UNIX)
|
|
||||||
|
|
||||||
dnl Find the 'more' program
|
|
||||||
AC_CHECK_PROGS(MORE, less most more cat)
|
|
||||||
|
|
||||||
dnl Checks for programs.
|
|
||||||
AC_PROG_CC
|
|
||||||
|
|
||||||
dnl If we're using gcc, use gcc options.
|
|
||||||
dnl If not, test for various common switches to make a 'cc' compiler
|
|
||||||
dnl compile ANSI C code.
|
|
||||||
if test $ac_cv_prog_gcc = yes; then
|
|
||||||
|
|
||||||
dnl Determine if gcc -Wall causes warnings on isascii(), etc.
|
|
||||||
AC_CACHE_CHECK(whether ${CC-cc} -Wall also needs -Wno-char-subscripts,
|
|
||||||
ac_cv_char_warn,
|
|
||||||
[
|
|
||||||
OLDCFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -Wall -Werror"
|
|
||||||
AC_TRY_COMPILE([#include <ctype.h>],
|
|
||||||
[ int i; char c = '0';
|
|
||||||
i = isascii(c);
|
|
||||||
i = isdigit(c);
|
|
||||||
i = isprint(c);
|
|
||||||
], ac_cv_char_warn=no, ac_cv_char_warn=yes)
|
|
||||||
CFLAGS=$OLDCFLAGS
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl If Determine if gcc can accept -Wno-char-subscripts
|
|
||||||
AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-char-subscripts, ac_cv_gcc_ncs,
|
|
||||||
[
|
|
||||||
OLDCFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -Wno-char-subscripts"
|
|
||||||
AC_TRY_COMPILE(, , ac_cv_gcc_ncs=yes, ac_cv_gcc_ncs=no)
|
|
||||||
CFLAGS=$OLDCFLAGS
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl If Determine if gcc can accept -fno-builtin
|
|
||||||
AC_CACHE_CHECK(whether ${CC-cc} accepts -fno-builtin, ac_cv_gcc_fnb,
|
|
||||||
[
|
|
||||||
OLDCFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -fno-builtin"
|
|
||||||
AC_TRY_COMPILE(, , ac_cv_gcc_fnb=yes, ac_cv_gcc_fnb=no)
|
|
||||||
CFLAGS=$OLDCFLAGS
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl If gcc -Wall gives no warnings with isascii(), use "-Wall";
|
|
||||||
dnl Otherwise, if gcc -Wall gives isascii warnings:
|
|
||||||
dnl If we can use -Wno-char-subscripts, use "-Wall -Wno-char-subscripts"
|
|
||||||
dnl If can't use -Wno-char-subscripts, use no flags at all.
|
|
||||||
|
|
||||||
if test ${ac_cv_char_warn:-ERROR} = no; then
|
|
||||||
MYFLAGS="-Wall"
|
|
||||||
else
|
|
||||||
if test ${ac_cv_gcc_ncs:-ERROR} = yes; then
|
|
||||||
MYFLAGS="-Wall -Wno-char-subscripts"
|
|
||||||
else
|
|
||||||
MYFLAGS=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
dnl We aren't using gcc so we can't assume any special flags.
|
|
||||||
MYFLAGS=""
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Checks for libraries. We check for the library only if the function is
|
|
||||||
dnl not available without the library.
|
|
||||||
AC_CHECK_FUNC(gethostbyaddr, ,
|
|
||||||
[AC_CHECK_LIB(nsl, gethostbyaddr, NETLIB="-lnsl $NETLIB")])
|
|
||||||
|
|
||||||
AC_CHECK_FUNC(socket, ,
|
|
||||||
[AC_CHECK_LIB(socket, socket, NETLIB="-lsocket $NETLIB")])
|
|
||||||
|
|
||||||
AC_CHECK_FUNC(malloc, ,
|
|
||||||
[AC_CHECK_LIB(malloc, malloc)])
|
|
||||||
|
|
||||||
AC_CHECK_FUNC(crypt, AC_DEFINE(CIRCLE_CRYPT),
|
|
||||||
[AC_CHECK_LIB(crypt, crypt, AC_DEFINE(CIRCLE_CRYPT) CRYPTLIB="-lcrypt")]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl Checks for header files.
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_HEADER_SYS_WAIT
|
|
||||||
AC_CHECK_HEADERS(fcntl.h sys/fcntl.h errno.h net/errno.h string.h strings.h)
|
|
||||||
AC_CHECK_HEADERS(limits.h sys/time.h sys/select.h sys/types.h unistd.h)
|
|
||||||
AC_CHECK_HEADERS(memory.h crypt.h assert.h arpa/telnet.h arpa/inet.h)
|
|
||||||
AC_CHECK_HEADERS(sys/stat.h sys/socket.h sys/resource.h netinet/in.h netdb.h)
|
|
||||||
AC_CHECK_HEADERS(signal.h sys/uio.h mcheck.h)
|
|
||||||
|
|
||||||
AC_UNSAFE_CRYPT
|
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
AC_C_CONST
|
|
||||||
AC_TYPE_PID_T
|
|
||||||
AC_TYPE_SIZE_T
|
|
||||||
AC_CHECK_TYPE(ssize_t, int)
|
|
||||||
AC_HEADER_TIME
|
|
||||||
|
|
||||||
dnl Check for the 'struct in_addr' definition. Ugly, yes.
|
|
||||||
if test $ac_cv_header_netinet_in_h = no; then
|
|
||||||
ac_cv_struct_in_addr = no
|
|
||||||
else
|
|
||||||
if test $ac_cv_header_sys_types_h = yes; then
|
|
||||||
headers=`cat << EOF
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
EOF
|
|
||||||
`
|
|
||||||
else
|
|
||||||
headers="#include <netinet/in.h>"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for struct in_addr], ac_cv_struct_in_addr,
|
|
||||||
[ AC_TRY_COMPILE([$headers],[struct in_addr tp; tp.s_addr;], ac_cv_struct_in_addr=yes, ac_cv_struct_in_addr=no)])
|
|
||||||
|
|
||||||
if test $ac_cv_struct_in_addr = yes; then
|
|
||||||
AC_DEFINE(HAVE_STRUCT_IN_ADDR)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
dnl Check for the 'typedef socklen_t' definition. Even uglier, yes.
|
|
||||||
if test $ac_cv_header_sys_socket_h = no; then
|
|
||||||
ac_cv_socklen_t = no;
|
|
||||||
else
|
|
||||||
AC_CACHE_CHECK([for typedef socklen_t], ac_cv_socklen_t,
|
|
||||||
[ AC_TRY_COMPILE([#include <sys/socket.h>],[socklen_t sl; sl=0;], ac_cv_socklen_t=yes, ac_cv_socklen_t=no)])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $ac_cv_socklen_t = no; then
|
|
||||||
AC_DEFINE(socklen_t, int)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
dnl Checks for library functions.
|
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
AC_FUNC_VPRINTF
|
|
||||||
AC_CHECK_FUNCS(gettimeofday select snprintf strcasecmp strdup strerror stricmp strlcpy strncasecmp strnicmp strstr vsnprintf)
|
|
||||||
|
|
||||||
dnl Check for functions that parse IP addresses
|
|
||||||
ORIGLIBS=$LIBS
|
|
||||||
LIBS="$LIBS $NETLIB"
|
|
||||||
AC_CHECK_FUNCS(inet_addr inet_aton)
|
|
||||||
LIBS=$ORIGLIBS
|
|
||||||
|
|
||||||
dnl Check for prototypes
|
|
||||||
AC_CHECK_PROTO(accept)
|
|
||||||
AC_CHECK_PROTO(atoi)
|
|
||||||
AC_CHECK_PROTO(atol)
|
|
||||||
AC_CHECK_PROTO(bind)
|
|
||||||
AC_CHECK_PROTO(bzero)
|
|
||||||
AC_CHECK_PROTO(chdir)
|
|
||||||
AC_CHECK_PROTO(close)
|
|
||||||
AC_CHECK_PROTO(crypt)
|
|
||||||
AC_CHECK_PROTO(fclose)
|
|
||||||
AC_CHECK_PROTO(fcntl)
|
|
||||||
AC_CHECK_PROTO(fflush)
|
|
||||||
AC_CHECK_PROTO(fprintf)
|
|
||||||
AC_CHECK_PROTO(fputc)
|
|
||||||
AC_CHECK_PROTO(fputs)
|
|
||||||
AC_CHECK_PROTO(fread)
|
|
||||||
AC_CHECK_PROTO(fscanf)
|
|
||||||
AC_CHECK_PROTO(fseek)
|
|
||||||
AC_CHECK_PROTO(fwrite)
|
|
||||||
AC_CHECK_PROTO(getpeername)
|
|
||||||
AC_CHECK_PROTO(getpid)
|
|
||||||
AC_CHECK_PROTO(getrlimit)
|
|
||||||
AC_CHECK_PROTO(getsockname)
|
|
||||||
AC_CHECK_PROTO(gettimeofday)
|
|
||||||
AC_CHECK_PROTO(htonl)
|
|
||||||
AC_CHECK_PROTO(htons)
|
|
||||||
AC_CHECK_PROTO(inet_addr)
|
|
||||||
AC_CHECK_PROTO(inet_aton)
|
|
||||||
AC_CHECK_PROTO(inet_ntoa)
|
|
||||||
AC_CHECK_PROTO(listen)
|
|
||||||
AC_CHECK_PROTO(ntohl)
|
|
||||||
AC_CHECK_PROTO(perror)
|
|
||||||
AC_CHECK_PROTO(printf)
|
|
||||||
AC_CHECK_PROTO(qsort)
|
|
||||||
AC_CHECK_PROTO(read)
|
|
||||||
AC_CHECK_PROTO(remove)
|
|
||||||
AC_CHECK_PROTO(rewind)
|
|
||||||
AC_CHECK_PROTO(select)
|
|
||||||
AC_CHECK_PROTO(setitimer)
|
|
||||||
AC_CHECK_PROTO(setrlimit)
|
|
||||||
AC_CHECK_PROTO(setsockopt)
|
|
||||||
AC_CHECK_PROTO(snprintf)
|
|
||||||
AC_CHECK_PROTO(socket)
|
|
||||||
AC_CHECK_PROTO(sprintf)
|
|
||||||
AC_CHECK_PROTO(sscanf)
|
|
||||||
AC_CHECK_PROTO(strcasecmp)
|
|
||||||
AC_CHECK_PROTO(strdup)
|
|
||||||
AC_CHECK_PROTO(strerror)
|
|
||||||
AC_CHECK_PROTO(stricmp)
|
|
||||||
AC_CHECK_PROTO(strlcpy)
|
|
||||||
AC_CHECK_PROTO(strncasecmp)
|
|
||||||
AC_CHECK_PROTO(strnicmp)
|
|
||||||
AC_CHECK_PROTO(system)
|
|
||||||
AC_CHECK_PROTO(time)
|
|
||||||
AC_CHECK_PROTO(unlink)
|
|
||||||
AC_CHECK_PROTO(vsnprintf)
|
|
||||||
AC_CHECK_PROTO(write)
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([SQLITE3], sqlite3)
|
|
||||||
AC_SUBST(SQLITE3_CFLAGS)
|
|
||||||
AC_SUBST(SQLITE3_LIBS)
|
|
||||||
|
|
||||||
AC_OUTPUT(src/Makefile src/util/Makefile)
|
|
||||||
#
|
|
||||||
echo "Configuration completed. To compile, type: cd src; make"
|
|
@ -1,77 +0,0 @@
|
|||||||
AC_DEFUN(AC_CHECK_PROTO,
|
|
||||||
[
|
|
||||||
ac_safe=translit($1, './+-', '__p_');
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([if $1 is prototyped])
|
|
||||||
AC_CACHE_VAL(ac_cv_prototype_$ac_safe, [#
|
|
||||||
if test $ac_cv_gcc_fnb = yes; then
|
|
||||||
OLDCFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -fno-builtin"
|
|
||||||
fi
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#define NO_LIBRARY_PROTOTYPES
|
|
||||||
#define __COMM_C__
|
|
||||||
#define __ACT_OTHER_C__
|
|
||||||
#include "src/sysdep.h"
|
|
||||||
#ifdef $1
|
|
||||||
error - already defined!
|
|
||||||
#endif
|
|
||||||
void $1(int a, char b, int c, char d, int e, char f, int g, char h);
|
|
||||||
],dnl
|
|
||||||
,
|
|
||||||
eval "ac_cv_prototype_$ac_safe=no",eval "ac_cv_prototype_$ac_safe=yes")
|
|
||||||
if test $ac_cv_gcc_fnb = yes; then
|
|
||||||
CFLAGS=$OLDCFLAGS
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
else
|
|
||||||
AC_DEFINE(builtin(format, NEED_%s_PROTO, translit($1, 'a-z', 'A-Z')), , Check for a prototype to $1.)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl @@@t1="MAKE_PROTO_SAFE($1)"; t2="MAKE_PROTO_NAME($t1)"; literals="$literals $t2"@@@])
|
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN(AC_UNSAFE_CRYPT, [
|
|
||||||
AC_CACHE_CHECK([whether crypt needs over 10 characters], ac_cv_unsafe_crypt, [
|
|
||||||
if test ${ac_cv_header_crypt_h-no} = yes; then
|
|
||||||
use_crypt_header="#include <crypt.h>"
|
|
||||||
fi
|
|
||||||
if test ${ac_cv_lib_crypt_crypt-no} = yes; then
|
|
||||||
ORIGLIBS=$LIBS
|
|
||||||
LIBS="-lcrypt $LIBS"
|
|
||||||
fi
|
|
||||||
AC_TRY_RUN(
|
|
||||||
changequote(<<, >>)dnl
|
|
||||||
<<
|
|
||||||
#define _XOPEN_SOURCE
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
$use_crypt_header
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
char pwd[11], pwd2[11];
|
|
||||||
|
|
||||||
strncpy(pwd, (char *)crypt("FooBar", "BazQux"), 10);
|
|
||||||
pwd[10] = '\0';
|
|
||||||
strncpy(pwd2, (char *)crypt("xyzzy", "BazQux"), 10);
|
|
||||||
pwd2[10] = '\0';
|
|
||||||
if (strcmp(pwd, pwd2) == 0)
|
|
||||||
exit(0);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
>>
|
|
||||||
changequote([, ])dnl
|
|
||||||
, ac_cv_unsafe_crypt=yes, ac_cv_unsafe_crypt=no, ac_cv_unsafe_crypt=no)])
|
|
||||||
if test $ac_cv_unsafe_crypt = yes; then
|
|
||||||
AC_DEFINE(HAVE_UNSAFE_CRYPT)
|
|
||||||
fi
|
|
||||||
if test ${ac_cv_lib_crypt_crypt-no} = yes; then
|
|
||||||
LIBS=$ORIGLIBS
|
|
||||||
fi
|
|
||||||
])
|
|
8864
old-codebase/configure
vendored
8864
old-codebase/configure
vendored
File diff suppressed because it is too large
Load Diff
12
old-codebase/log/.gitignore
vendored
12
old-codebase/log/.gitignore
vendored
@ -1,12 +0,0 @@
|
|||||||
syslog*
|
|
||||||
badpws
|
|
||||||
delete
|
|
||||||
dts
|
|
||||||
errors
|
|
||||||
godcmds
|
|
||||||
levels
|
|
||||||
newplayers
|
|
||||||
rentgone
|
|
||||||
restarts
|
|
||||||
rip
|
|
||||||
usage
|
|
@ -1 +0,0 @@
|
|||||||
This directory is for log files.
|
|
@ -1,136 +0,0 @@
|
|||||||
#!perl
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Portions of this script are Copyright 1998 by dean takemori.
|
|
||||||
#
|
|
||||||
# This is a MacPerl script which attempts to impliment autorun functionality
|
|
||||||
# for MacOS. It's a bit of a bastardisation of MacPerl and "standard" unix
|
|
||||||
# style perl. I won't claim that it's pretty. Parts of it come from the
|
|
||||||
# Autorun perl script for unix that is distributed with CircleMUD and it is
|
|
||||||
# therefore subject to the following.
|
|
||||||
|
|
||||||
# Copyright (c)1995 Vi'Rage Studios
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# csh original by Fred C. Merkel, PERL conversion by D. Hall
|
|
||||||
|
|
||||||
# .fastboot sleep for only 5 seconds, instead of the default 20
|
|
||||||
# .killscript script will exit, and mud will not reboot
|
|
||||||
# .pause pause (sleep 1 minute intervals) until .pause it removed
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
use 5.004;
|
|
||||||
use Mac::MoreFiles;
|
|
||||||
use Mac::Processes;
|
|
||||||
|
|
||||||
# launchContinue() must be set or MacPerl will quit after LaunchApplication().
|
|
||||||
# The creator code "dtCM" is registered with Apple Computer for CircleMUD.
|
|
||||||
# However, if you have multiple copies of Circle on disk (a production MUD
|
|
||||||
# and a testing MUD for example), you may wish to specify by FULL PATH,
|
|
||||||
# which application to run.
|
|
||||||
|
|
||||||
$spec = $Application{'dtCM'};
|
|
||||||
#$spec = "volume:apps:myapp";
|
|
||||||
|
|
||||||
my($app);
|
|
||||||
$app = new LaunchParam(
|
|
||||||
'launchControlFlags' => launchContinue(),
|
|
||||||
'launchAppSpec' => $spec
|
|
||||||
) or die ($^E);
|
|
||||||
|
|
||||||
my($psn, $spec_found);
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
LaunchApplication($app) or die($^E);
|
|
||||||
do
|
|
||||||
{
|
|
||||||
# Now, every 60 seconds, scan the running processes for one whose
|
|
||||||
# AppSpec matches the one we set up earlier.
|
|
||||||
sleep(60);
|
|
||||||
$spec_found = 0;
|
|
||||||
foreach $psn (keys(%Process))
|
|
||||||
{
|
|
||||||
if ( $spec eq $Process{$psn}->processAppSpec() )
|
|
||||||
{
|
|
||||||
$spec_found = 1;
|
|
||||||
break; # out of the foreach
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while ($spec_found == 1);
|
|
||||||
|
|
||||||
# If we're here, then the App is no longer running.
|
|
||||||
# First we open everything
|
|
||||||
open (SYSLOG, ":syslog") or die($^E);
|
|
||||||
open (DELETE, ">>:log:delete");
|
|
||||||
open (DTRAPS, ">>:log:dtraps");
|
|
||||||
open (DEATHS, ">>:log:deaths");
|
|
||||||
open (REBOOT, ">>:log:reboots");
|
|
||||||
open (LEVELS, ">>:log:levels");
|
|
||||||
open (NORENT, ">>:log:norent");
|
|
||||||
open (USAGE, ">>:log:usage");
|
|
||||||
open (NEWPLR, ">>:log:newplrs");
|
|
||||||
open (SYSERR, ">>:log:errors");
|
|
||||||
open (GODCMD, ">>:log:godcmds");
|
|
||||||
open (BADPWS, ">>:log:badpws");
|
|
||||||
|
|
||||||
# Then we stash everything
|
|
||||||
while (<SYSLOG>)
|
|
||||||
{
|
|
||||||
print DELETE if /self-delete/;
|
|
||||||
print DTRAPS if /death trap/;
|
|
||||||
print DEATHS if /killed/;
|
|
||||||
print REBOOT if /Running/;
|
|
||||||
print LEVELS if /advanced/;
|
|
||||||
print NORENT if /equipment lost/;
|
|
||||||
print USAGE if /usage/;
|
|
||||||
print NEWPLR if /new player/;
|
|
||||||
print SYSERR if /SYSERR/;
|
|
||||||
print GODCMD if /\(GC\)/;
|
|
||||||
print BADPWs if /Bad PW/;
|
|
||||||
}
|
|
||||||
close (SYSLOG);
|
|
||||||
|
|
||||||
# Rotate SYSLOG files
|
|
||||||
if (-e ":log:syslog.6") { unlink (":log:syslog.6"); }
|
|
||||||
if (-e ":log:syslog.6") { rename (":log:syslog.5", ":log:syslog.6"); }
|
|
||||||
if (-e ":log:syslog.6") { rename (":log:syslog.4", ":log:syslog.5"); }
|
|
||||||
if (-e ":log:syslog.6") { rename (":log:syslog.3", ":log:syslog.4"); }
|
|
||||||
if (-e ":log:syslog.6") { rename (":log:syslog.2", ":log:syslog.3"); }
|
|
||||||
if (-e ":log:syslog.6") { rename (":log:syslog.1", ":log:syslog.2"); }
|
|
||||||
rename (":syslog" , ":log:syslog.1");
|
|
||||||
|
|
||||||
# should we stay dead?
|
|
||||||
if (-r ".killscript")
|
|
||||||
{
|
|
||||||
unlink(".killscript");
|
|
||||||
open (SYSLOG, ">>:log:syslog.1");
|
|
||||||
print (SYSLOG "autoscript killed ", localtime()); #seconds since epoch
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
# or just play dead?
|
|
||||||
while (-r ".pause")
|
|
||||||
{ sleep(60); }
|
|
||||||
|
|
||||||
# or reboot as soon as possible?
|
|
||||||
if (-r ".fastboot")
|
|
||||||
{
|
|
||||||
unlink(".fastboot");
|
|
||||||
sleep(5);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ sleep(20); }
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
$!
|
|
||||||
$! VMS_AUTORUN.COM
|
|
||||||
$! Written By: Robert Alan Byer
|
|
||||||
$! Vice-President
|
|
||||||
$! A-Com Computing, Inc.
|
|
||||||
$! ByerRA@aol.com
|
|
||||||
$! byer@mail.all-net.net
|
|
||||||
$!
|
|
||||||
$! This script is used to run the CircleMUD executable as a detached
|
|
||||||
$! process.
|
|
||||||
$!
|
|
||||||
$! This ONLY runs the CircleMUD CIRCLE executable, it does NOT do anything
|
|
||||||
$! else extra that the Unix "autorun" script does.
|
|
||||||
$!
|
|
||||||
$! To have the CIRCLE executable execute under a different UIC, change the
|
|
||||||
$! variable UIC below.
|
|
||||||
$!
|
|
||||||
$! To customize the CIRCLE startup, edit the [.BIN]VMS_CIRCLEMUD.COM file.
|
|
||||||
$!
|
|
||||||
$!
|
|
||||||
$! Define The UIC The CIRCLE.EXE Is To Execute Under.
|
|
||||||
$!
|
|
||||||
$ UIC = "SYSTEM"
|
|
||||||
$!
|
|
||||||
$! Run [.BIN]VMS_CIRCLEMUD.COM As A Detached Process.
|
|
||||||
$!
|
|
||||||
$ RUN/DETACHED -
|
|
||||||
/PROCESS_NAME= "CircleMUD" -
|
|
||||||
/UIC=['UIC'] -
|
|
||||||
/INPUT=CIRCLEMUD_BIN:VMS_CIRCLEMUD.COM -
|
|
||||||
/OUTPUT=SYSLOG.LOG -
|
|
||||||
/ERROR=SYSLOG.ERROR -
|
|
||||||
SYS$SYSTEM:LOGINOUT.EXE
|
|
||||||
$!
|
|
||||||
$! Time To Exit.
|
|
||||||
$!
|
|
||||||
$ EXIT
|
|
Loading…
Reference in New Issue
Block a user