Index: ChangeLog =================================================================== RCS file: /home/circledb/.cvs/circle/ChangeLog,v retrieving revision 1.203 retrieving revision 1.211 diff -u -p -r1.203 -r1.211 --- ChangeLog 2002/01/16 00:19:45 1.203 +++ ChangeLog 2002/04/16 02:23:37 1.211 @@ -3805,3 +3805,211 @@ change. -- gg - shop.c: destroy_shops(): Make usable without shutdown. -- gg - Released patchlevel 20. + +******** Patchlevel 21 *************************************************** + +1/6/2002 + +-- gg - Makefile.lcc, structs.h: bpl20 -> bpl21 + README.CYGWIN: Reword to avoid changes every patchlevel. + +-- gg - db.c: Remove write-only variable 'top_of_p_file'. + From Juliano Ravasi Ferraz . + +-- gg - licheck: Last-minute file rename broke printing license. + +1/27/2002 + +-- gg - act.other.c, act.wizard.c, ban.c, class.c, comm.c, db.c, fight.c, + house.c, interpreter.c, limits.c, modify.c, objsave.c, + spells.c, utils.c, utils.h: Variable argument mudlog(). + +-- gg - comm.c, comm.h, handler.c, interpreter.c, modify.c: Replace + SEND_TO_Q with varargs write_to_output(). + +-- gg - utils.c: strlcpy(): New. + sprintbit(), sprinttype(): 'length' parameter. + +-- gg - castle.c: tim(), tom(), dickndavid(): Use 'argument', not 'arg'. + +-- gg - utils.c, utils.h, configure.in: Add proper autoconf support for + strdup and strlcpy. + +-- gg - sysdep.h, utils.c, utils.h: Do autoconf checks for str(n)casecmp + and str(n)icmp. + +-- gg - s/str_dup/strdup/ -- it's now an autoconf check. + +-- gg - Variable argument send_to_char(). + comm.c: Remove sanity_check(). + +1/31/2002 + +-- gg - sysdep.h, conf.h.in: Added autoconf check for mcheck.h. + +-- gg - structs.h: Remove unused 'last_direction' from mob_special_data. + From: Juliano Ravasi Ferraz + +-- gg - structs.h: Make mob_special_data.attack_type a byte. + act.wizard.c: Cast attack_type to integer for array access. + From: Juliano Ravasi Ferraz + +-- gg - act.movement.c act.wizard.c comm.c handler.c magic.c, + spec_procs.c spells.c utils.c: Remove redundant prototypes. + +-- gg - class.c, fight.c, objsave.c, shop.c: Added some casts for + C++ warnings, some of which I think I removed recently.. + +-- gg - act.movement.c: do_doorcmd(): Since LOCK_DOOR is no longer + a toggle and does what it says, lockpicking needed a + new TOGGLE_LOCK macro to work properly. (Unless you + always wanted to pick the lock locked, that is.) + +-- gg - structs.h: 'struct index_data' needs to use the *_vnum types. + From: Anton Graham + +-- gg - spec_procs.c: SPECIAL(dump): Use SCMD_DROP for do_drop() call. + From: Juliano Ravasi Ferraz + +-- gg - interpreter.c: find_name() and get_ptable_by_name() did the + same thing. Delete find_name() as it doesn't relate + to other functions as much. + From: Juliano Ravasi Ferraz + db.c: get_{ptable,id}_by_name(): Don't use one_argument since + names don't have whitespace anyway. + +-- gg - db.h: Remove 'arg', 'buf', 'buf1', and 'buf2' global buffers. + +-- gg - fight.c: death_cry(), damage(); + spells.c: spell_locate_object(): + ->in_room to IN_ROOM() + +-- gg - act.wizard.c: do_restore(): Allow people to restore themselves. + That's what I get for changing my mind at the last minute + for '>=' instead of '>'. + +-- gg - perl -i -pe 's/([^_])number\(/$1rand_number\(/g;' *.[ch] + Renamed number() to rand_number() to avoid shadowing variables + and also avoid a BSD function reportedly with that name. + +-- gg - Fixed -Wshadow warnings, most having to do with 'index'. + +2/15/2002 + +-- gg - act.movement.c: Removed unused DOOR_LOCK macro. + From: Juliano Ravasi Ferraz + +-- gg - interpreter.c: special(): Delayed extraction can result in dead + mobiles during special procedure check so avoid anyone + to be removed. + From: Welcor + fight.c: perform_violence(): Likewise. + +2/20/2002 + +-- gg - comm.c: vwrite_to_output(): Fix sign/unsign warning. + write_to_descriptor(): Not worth using varargs here. + comm.h: Update write_to_descriptor() prototype. + +3/3/2002 + +-- gg - act.item.c: give_find_vict(): Use skip_spaces(). + From: Juliano Ravasi Ferraz + +-- gg - fight.c: make_corpse(): Fix odd test. "A || (!A && B)" + From: Juliano Ravasi Ferraz + +-- gg - act.item.c: do_put(): Remove extra-dimensional bags. + From: Juliano Ravasi Ferraz + +-- gg - utils.h: Fixed unused OBJAFF_FLAGGED. + From: "Kras Kresh" + +-- gg - shop.c: Give discounts (or price-inflation) based on charisma. + +-- gg - act.wizard.c: do_advance(): Run autowiz when demoting gods. + class.c: do_start(): Reset max hit/mana/move but don't reset playtime. + db.c: init_char(): Use macros for more structure accesses. Don't set + hit/mana/move for characters here, but do set them for the + first character (implementor). Also comment the height/weight + values better. + limits.c: check_autowiz(): Rename to run_autowiz() and change to run + instead of test. + gain_exp(), gain_exp_regardless(): check_autowiz -> run_autowiz. + +3/20/2002 + +-- gg - cnf/aclocal.m4: Use 'official' method of a 3rd argument to AC_DEFINE() + to generate autoheader hints instead of a local hack to + autoheader itself. + cnf/configure.in: Add checks for more functions, more prototypes, and + mcheck.h. + +-- gg - conf.h.in: Regenerated due to AC_CHECK_PROTO changes. + +-- gg - act.wizard.c: do_stat_character(): Adjusted formatting of output. + +-- gg - alias.c: write_aliases(), write_aliases(); objsave.c: Add buffer + length argument to get_filename(). + read_aliases(): Error-check fscanf() results. Avoids infinite loop + while sucking down memory. + utils.c: get_filename(): Need a buffer length argument to write + proper amount. + utils.h: get_filename() prototype adjustment. + +-- gg - structs.h: title_type is no longer used. + +4/9/2002 + +-- gg - castle.c: king_welmar(), castle_twin_proc(); + comm.c: process_output(); + db.c: parse_room(), char_to_store(), fread_string(), file_to_string(); + handler.c: create_money(); + shop.c: shopping_buy(); + spec_procs.c: mayor(), puff(); + utils.c: mudlog(): + String buffer size assumption comments. + +-- gg - configure: Regenerated from configure.in + +-- gg - act.informative.c: show_obj_to_char(): Might as well use snprintf(). + db.c: global: Remove unused spell_info[] extern; + load_help(): Avoid help entry overflows. + shop.c: evaluate_expression(): Increase 'name' buffer size. + act.item.c: name_from_drinkcon(); + act.wizard.c: perform_set(); + ban.c: load_banned(), do_ban(); + comm.c: make_prompt(), new_descriptor(), perform_subst(); + db.c: save_char(); + interpreter.c: nanny(); + mail.c: store_mail(); + mobact.c: aggressive_mob_on_a_leash(); + modify.c: show_string(); + shop.c: evaluate_expression(), shopping_list(); + spec_procs.c: cityguard(); + spell_parser.c: say_spell(), find_skill_num(); + spells.h: struct spell_info_type; + utils.c: strlcpy(): + String buffer size comments. + +-- gg - class.c; spec_procs.c: guild_guard(); structs.h: Fix use of integers + for room virtual numbers in guild_info[] array. + From: Edward J Glamkowski + class.c: find_class_bitvector(); + act.informative.c: do_who(), do_users(): + Make find_class_bitvector() use parse_class() and loop itself. + Partially from: Edward J Glamkowski + +-- gg - comm.c: make_prompt(): People with 'disp none' need prompt[] + cleared first. + +-- gg - utils.c: mudlog(): Fixed parenthesis lost in reformatting. + From: kras_kresh@hotmail.com + +4/15/2002 + +-- gg - Makefile.in, conf.h.in, sysdep.h: Check for snprintf(). + bsd-snprintf.c, bsd-snprintf.h: BSD-licensed replacements for + snprintf() and vsnprintf() for platforms lacking them. + cnf/configure.in: HAVE_(V)SNPRINTF checks. + configure: Regenerated. Index: autorun =================================================================== RCS file: /home/circledb/.cvs/circle/autorun,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -r1.5 -r1.6 --- autorun 2001/06/26 11:28:42 1.5 +++ autorun 2002/01/31 18:05:29 1.6 @@ -138,6 +138,8 @@ while ( : ) do 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 Index: configure =================================================================== RCS file: /home/circledb/.cvs/circle/configure,v retrieving revision 1.14 retrieving revision 1.16 diff -u -p -r1.14 -r1.16 --- configure 1999/08/02 00:33:11 1.14 +++ configure 2002/04/16 02:23:38 1.16 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.14.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -333,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.14.1" exit 0 ;; -with-* | --with-*) @@ -493,7 +493,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -537,7 +537,7 @@ do set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:540: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_MORE'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_MORE+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$MORE"; then @@ -570,7 +570,7 @@ done set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:573: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -600,7 +600,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:603: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -646,12 +646,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:654: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -681,8 +681,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:686: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -723,14 +723,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:728: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:733: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&6 echo "configure:761: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -793,7 +793,7 @@ if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} -Wall also needs -Wno-char-subscripts""... $ac_c" 1>&6 echo "configure:796: checking whether ${CC-cc} -Wall also needs -Wno-char-subscripts" >&5 -if eval "test \"`echo '$''{'ac_cv_char_warn'+set}'`\" = set"; then +if eval "test \"\${ac_cv_char_warn+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -829,7 +829,7 @@ echo "$ac_t""$ac_cv_char_warn" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -Wno-char-subscripts""... $ac_c" 1>&6 echo "configure:832: checking whether ${CC-cc} accepts -Wno-char-subscripts" >&5 -if eval "test \"`echo '$''{'ac_cv_gcc_ncs'+set}'`\" = set"; then +if eval "test \"\${ac_cv_gcc_ncs+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -877,7 +877,7 @@ fi echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6 echo "configure:880: checking for gethostbyaddr" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+set}'`\" = set"; then +if eval "test \"\${ac_cv_func_gethostbyaddr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyaddr=yes" else @@ -922,15 +923,15 @@ if eval "test \"`echo '$ac_cv_func_'geth else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6 -echo "configure:926: checking for gethostbyaddr in -lnsl" >&5 +echo "configure:927: checking for gethostbyaddr in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -965,12 +966,12 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:969: checking for socket" >&5 -if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then +echo "configure:970: checking for socket" >&5 +if eval "test \"\${ac_cv_func_socket+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1011,15 +1013,15 @@ if eval "test \"`echo '$ac_cv_func_'sock else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1015: checking for socket in -lsocket" >&5 +echo "configure:1017: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1054,12 +1056,12 @@ fi echo $ac_n "checking for malloc""... $ac_c" 1>&6 -echo "configure:1058: checking for malloc" >&5 -if eval "test \"`echo '$''{'ac_cv_func_malloc'+set}'`\" = set"; then +echo "configure:1060: checking for malloc" >&5 +if eval "test \"\${ac_cv_func_malloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc=yes" else @@ -1100,15 +1103,15 @@ if eval "test \"`echo '$ac_cv_func_'mall else echo "$ac_t""no" 1>&6 echo $ac_n "checking for malloc in -lmalloc""... $ac_c" 1>&6 -echo "configure:1104: checking for malloc in -lmalloc" >&5 +echo "configure:1107: checking for malloc in -lmalloc" >&5 ac_lib_var=`echo malloc'_'malloc | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1150,12 +1153,12 @@ fi echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:1154: checking for crypt" >&5 -if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then +echo "configure:1157: checking for crypt" >&5 +if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -1199,15 +1203,15 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1203: checking for crypt in -lcrypt" >&5 +echo "configure:1207: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1246,13 +1250,13 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1250: checking how to run the C preprocessor" >&5 +echo "configure:1254: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -1261,13 +1265,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1278,13 +1282,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1295,13 +1299,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1326,12 +1330,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1330: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:1334: checking for ANSI C header files" >&5 +if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1339,7 +1343,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1356,7 +1360,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1374,7 +1378,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1395,7 +1399,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1406,7 +1410,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1430,12 +1434,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1434: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then +echo "configure:1438: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1451,7 +1455,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1475,17 +1479,21 @@ for ac_hdr in fcntl.h sys/fcntl.h errno. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1479: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1483: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1515,17 +1523,21 @@ for ac_hdr in limits.h sys/time.h sys/se do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1519: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1527: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1555,17 +1567,21 @@ for ac_hdr in memory.h crypt.h assert.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1559: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1571: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1595,17 +1611,21 @@ for ac_hdr in sys/stat.h sys/socket.h sy do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1599: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1615: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1631,21 +1651,25 @@ else fi done -for ac_hdr in signal.h sys/uio.h +for ac_hdr in signal.h sys/uio.h mcheck.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1639: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:1659: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#endif #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1674,8 +1698,8 @@ done echo $ac_n "checking whether crypt needs over 10 characters""... $ac_c" 1>&6 -echo "configure:1678: checking whether crypt needs over 10 characters" >&5 -if eval "test \"`echo '$''{'ac_cv_unsafe_crypt'+set}'`\" = set"; then +echo "configure:1702: checking whether crypt needs over 10 characters" >&5 +if eval "test \"\${ac_cv_unsafe_crypt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1690,7 +1714,7 @@ else ac_cv_unsafe_crypt=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_unsafe_crypt=yes else @@ -1740,12 +1764,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1744: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:1768: checking for working const" >&5 +if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1815,111 +1839,129 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1819: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then +echo "configure:1843: checking for pid_t" >&5 +if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS +#include #include #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_pid_t=yes + eval "ac_cv_type_pid_t=yes" else rm -rf conftest* - ac_cv_type_pid_t=no + eval "ac_cv_type_pid_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:1852: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo "configure:1882: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS +#include #include #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_size_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:1885: checking for ssize_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then +echo "configure:1921: checking for ssize_t" >&5 +if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS +#include #include #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_ssize_t=yes + eval "ac_cv_type_ssize_t=yes" else rm -rf conftest* - ac_cv_type_ssize_t=no + eval "ac_cv_type_ssize_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 -if test $ac_cv_type_ssize_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:1918: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then +echo "configure:1960: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"\${ac_cv_header_time+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1928,7 +1970,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1949,7 +1991,6 @@ EOF fi - if test $ac_cv_header_netinet_in_h = no; then ac_cv_struct_in_addr = no else @@ -1964,19 +2005,19 @@ EOF fi echo $ac_n "checking for struct in_addr""... $ac_c" 1>&6 -echo "configure:1968: checking for struct in_addr" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_in_addr'+set}'`\" = set"; then +echo "configure:2009: checking for struct in_addr" >&5 +if eval "test \"\${ac_cv_struct_in_addr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_in_addr=yes else @@ -2003,19 +2044,19 @@ if test $ac_cv_header_sys_socket_h = no; ac_cv_socklen_t = no; else echo $ac_n "checking for typedef socklen_t""... $ac_c" 1>&6 -echo "configure:2007: checking for typedef socklen_t" >&5 -if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then +echo "configure:2048: checking for typedef socklen_t" >&5 +if eval "test \"\${ac_cv_socklen_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { socklen_t sl; sl=0; ; return 0; } EOF -if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_socklen_t=yes else @@ -2039,12 +2080,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2043: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then +echo "configure:2084: checking return type of signal handlers" >&5 +if eval "test \"\${ac_cv_type_signal+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2061,7 +2102,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2079,18 +2120,181 @@ cat >> confdefs.h <&6 +echo "configure:2125: checking for vprintf" >&5 +if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char vprintf(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_vprintf) || defined (__stub___vprintf) +choke me +#else +f = vprintf; +#endif + +; return 0; } +EOF +if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_vprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_VPRINTF 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +if test "$ac_cv_func_vprintf" != yes; then +echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +echo "configure:2178: checking for _doprnt" >&5 +if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _doprnt(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__doprnt) || defined (__stub____doprnt) +choke me +#else +f = _doprnt; +#endif + +; return 0; } +EOF +if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__doprnt=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DOPRNT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +for ac_func in gettimeofday select snprintf strcasecmp strdup strerror stricmp strlcpy strncasecmp strnicmp strstr vsnprintf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2234: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); +char (*f)(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + +; return 0; } +EOF +if { (eval echo configure:2263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + ORIGLIBS=$LIBS LIBS="$LIBS $NETLIB" for ac_func in inet_addr inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2089: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:2293: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2140,18 +2345,16 @@ done LIBS=$ORIGLIBS -ac_safe=`echo "accept" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo accept | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=accept; - echo $ac_n "checking if accept is prototyped""... $ac_c" 1>&6 -echo "configure:2149: checking if accept is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2352: checking if accept is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2184,26 +2387,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_ACCEPT_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "atoi" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo atoi | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=atoi; echo $ac_n "checking if atoi is prototyped""... $ac_c" 1>&6 -echo "configure:2201: checking if atoi is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2402: checking if atoi is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2236,26 +2437,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_ATOI_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "atol" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo atol | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=atol; - echo $ac_n "checking if atol is prototyped""... $ac_c" 1>&6 -echo "configure:2253: checking if atol is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2452: checking if atol is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2288,26 +2487,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_ATOL_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "bind" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo bind | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=bind; echo $ac_n "checking if bind is prototyped""... $ac_c" 1>&6 -echo "configure:2305: checking if bind is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2502: checking if bind is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2340,26 +2537,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_BIND_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "bzero" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo bzero | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=bzero; - echo $ac_n "checking if bzero is prototyped""... $ac_c" 1>&6 -echo "configure:2357: checking if bzero is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2552: checking if bzero is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2392,26 +2587,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_BZERO_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "chdir" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo chdir | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=chdir; echo $ac_n "checking if chdir is prototyped""... $ac_c" 1>&6 -echo "configure:2409: checking if chdir is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2602: checking if chdir is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2444,26 +2637,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_CHDIR_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "close" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo close | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=close; - echo $ac_n "checking if close is prototyped""... $ac_c" 1>&6 -echo "configure:2461: checking if close is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2652: checking if close is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2496,26 +2687,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_CLOSE_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "crypt" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo crypt | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=crypt; echo $ac_n "checking if crypt is prototyped""... $ac_c" 1>&6 -echo "configure:2513: checking if crypt is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2702: checking if crypt is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2548,26 +2737,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_CRYPT_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "fclose" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fclose | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fclose; - echo $ac_n "checking if fclose is prototyped""... $ac_c" 1>&6 -echo "configure:2565: checking if fclose is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2752: checking if fclose is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2600,26 +2787,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FCLOSE_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "fcntl" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fcntl | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fcntl; echo $ac_n "checking if fcntl is prototyped""... $ac_c" 1>&6 -echo "configure:2617: checking if fcntl is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2802: checking if fcntl is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2652,26 +2837,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FCNTL_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "fflush" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fflush | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fflush; - echo $ac_n "checking if fflush is prototyped""... $ac_c" 1>&6 -echo "configure:2669: checking if fflush is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2852: checking if fflush is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2704,26 +2887,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FFLUSH_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "fprintf" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fprintf | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fprintf; echo $ac_n "checking if fprintf is prototyped""... $ac_c" 1>&6 -echo "configure:2721: checking if fprintf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2902: checking if fprintf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2756,26 +2937,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FPRINTF_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "fputc" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fputc | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fputc; - echo $ac_n "checking if fputc is prototyped""... $ac_c" 1>&6 -echo "configure:2773: checking if fputc is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:2952: checking if fputc is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2808,26 +2987,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FPUTC_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "fputs" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fputs | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fputs; echo $ac_n "checking if fputs is prototyped""... $ac_c" 1>&6 -echo "configure:2825: checking if fputs is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3002: checking if fputs is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2860,26 +3037,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FPUTS_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "fread" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fread | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fread; - echo $ac_n "checking if fread is prototyped""... $ac_c" 1>&6 -echo "configure:2877: checking if fread is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3052: checking if fread is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2912,26 +3087,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FREAD_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "fscanf" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fscanf | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fscanf; echo $ac_n "checking if fscanf is prototyped""... $ac_c" 1>&6 -echo "configure:2929: checking if fscanf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3102: checking if fscanf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -2964,26 +3137,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FSCANF_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "fseek" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fseek | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fseek; - echo $ac_n "checking if fseek is prototyped""... $ac_c" 1>&6 -echo "configure:2981: checking if fseek is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3152: checking if fseek is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3016,26 +3187,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FSEEK_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "fwrite" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo fwrite | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=fwrite; echo $ac_n "checking if fwrite is prototyped""... $ac_c" 1>&6 -echo "configure:3033: checking if fwrite is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3202: checking if fwrite is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3068,26 +3237,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_FWRITE_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "getpeername" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo getpeername | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=getpeername; - echo $ac_n "checking if getpeername is prototyped""... $ac_c" 1>&6 -echo "configure:3085: checking if getpeername is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3252: checking if getpeername is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3120,26 +3287,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_GETPEERNAME_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "getpid" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo getpid | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=getpid; echo $ac_n "checking if getpid is prototyped""... $ac_c" 1>&6 -echo "configure:3137: checking if getpid is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3302: checking if getpid is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3172,26 +3337,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_GETPID_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "getrlimit" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo getrlimit | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=getrlimit; - echo $ac_n "checking if getrlimit is prototyped""... $ac_c" 1>&6 -echo "configure:3189: checking if getrlimit is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3352: checking if getrlimit is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3224,26 +3387,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_GETRLIMIT_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "getsockname" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo getsockname | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=getsockname; echo $ac_n "checking if getsockname is prototyped""... $ac_c" 1>&6 -echo "configure:3241: checking if getsockname is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3402: checking if getsockname is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3276,26 +3437,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_GETSOCKNAME_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "gettimeofday" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo gettimeofday | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=gettimeofday; - echo $ac_n "checking if gettimeofday is prototyped""... $ac_c" 1>&6 -echo "configure:3293: checking if gettimeofday is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3452: checking if gettimeofday is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3328,26 +3487,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_GETTIMEOFDAY_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "htonl" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo htonl | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=htonl; echo $ac_n "checking if htonl is prototyped""... $ac_c" 1>&6 -echo "configure:3345: checking if htonl is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3502: checking if htonl is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3380,26 +3537,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_HTONL_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "htons" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo htons | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=htons; - echo $ac_n "checking if htons is prototyped""... $ac_c" 1>&6 -echo "configure:3397: checking if htons is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3552: checking if htons is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3432,26 +3587,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_HTONS_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "inet_addr" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo inet_addr | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=inet_addr; echo $ac_n "checking if inet_addr is prototyped""... $ac_c" 1>&6 -echo "configure:3449: checking if inet_addr is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3602: checking if inet_addr is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3484,26 +3637,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_INET_ADDR_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "inet_aton" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo inet_aton | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=inet_aton; - echo $ac_n "checking if inet_aton is prototyped""... $ac_c" 1>&6 -echo "configure:3501: checking if inet_aton is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3652: checking if inet_aton is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3536,26 +3687,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_INET_ATON_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "inet_ntoa" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo inet_ntoa | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=inet_ntoa; echo $ac_n "checking if inet_ntoa is prototyped""... $ac_c" 1>&6 -echo "configure:3553: checking if inet_ntoa is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3702: checking if inet_ntoa is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3588,26 +3737,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_INET_NTOA_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "listen" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo listen | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=listen; - echo $ac_n "checking if listen is prototyped""... $ac_c" 1>&6 -echo "configure:3605: checking if listen is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3752: checking if listen is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3640,26 +3787,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_LISTEN_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "ntohl" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo ntohl | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=ntohl; echo $ac_n "checking if ntohl is prototyped""... $ac_c" 1>&6 -echo "configure:3657: checking if ntohl is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3802: checking if ntohl is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3692,26 +3837,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_NTOHL_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "perror" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo perror | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=perror; - echo $ac_n "checking if perror is prototyped""... $ac_c" 1>&6 -echo "configure:3709: checking if perror is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3852: checking if perror is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3744,26 +3887,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_PERROR_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "printf" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo printf | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=printf; echo $ac_n "checking if printf is prototyped""... $ac_c" 1>&6 -echo "configure:3761: checking if printf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3902: checking if printf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3796,26 +3937,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_PRINTF_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "qsort" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo qsort | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=qsort; - echo $ac_n "checking if qsort is prototyped""... $ac_c" 1>&6 -echo "configure:3813: checking if qsort is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:3952: checking if qsort is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3848,26 +3987,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_QSORT_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "read" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo read | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=read; echo $ac_n "checking if read is prototyped""... $ac_c" 1>&6 -echo "configure:3865: checking if read is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4002: checking if read is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3900,26 +4037,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_READ_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "remove" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo remove | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=remove; echo $ac_n "checking if remove is prototyped""... $ac_c" 1>&6 -echo "configure:3917: checking if remove is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4052: checking if remove is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -3952,26 +4087,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_REMOVE_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "rewind" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo rewind | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=rewind; echo $ac_n "checking if rewind is prototyped""... $ac_c" 1>&6 -echo "configure:3969: checking if rewind is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4102: checking if rewind is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4004,26 +4137,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_REWIND_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "select" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo select | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=select; echo $ac_n "checking if select is prototyped""... $ac_c" 1>&6 -echo "configure:4021: checking if select is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4152: checking if select is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4056,26 +4187,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SELECT_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "setitimer" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo setitimer | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=setitimer; echo $ac_n "checking if setitimer is prototyped""... $ac_c" 1>&6 -echo "configure:4073: checking if setitimer is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4202: checking if setitimer is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4108,26 +4237,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SETITIMER_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "setrlimit" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo setrlimit | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=setrlimit; echo $ac_n "checking if setrlimit is prototyped""... $ac_c" 1>&6 -echo "configure:4125: checking if setrlimit is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4252: checking if setrlimit is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4160,26 +4287,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SETRLIMIT_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "setsockopt" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo setsockopt | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=setsockopt; echo $ac_n "checking if setsockopt is prototyped""... $ac_c" 1>&6 -echo "configure:4177: checking if setsockopt is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4302: checking if setsockopt is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4212,26 +4337,74 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SETSOCKOPT_PROTO EOF echo "$ac_t""no" 1>&6 fi + +ac_safe=snprintf; + +echo $ac_n "checking if snprintf is prototyped""... $ac_c" 1>&6 +echo "configure:4352: checking if snprintf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* +fi + + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_SNPRINTF_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=socket; + echo $ac_n "checking if socket is prototyped""... $ac_c" 1>&6 -echo "configure:4229: checking if socket is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4402: checking if socket is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4264,26 +4437,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SOCKET_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "sprintf" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo sprintf | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=sprintf; echo $ac_n "checking if sprintf is prototyped""... $ac_c" 1>&6 -echo "configure:4281: checking if sprintf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4452: checking if sprintf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4316,26 +4487,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SPRINTF_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "sscanf" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo sscanf | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=sscanf; echo $ac_n "checking if sscanf is prototyped""... $ac_c" 1>&6 -echo "configure:4333: checking if sscanf is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4502: checking if sscanf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4368,26 +4537,124 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SSCANF_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=strcasecmp; + +echo $ac_n "checking if strcasecmp is prototyped""... $ac_c" 1>&6 +echo "configure:4552: checking if strcasecmp is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* + +fi + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_STRCASECMP_PROTO +EOF + echo "$ac_t""no" 1>&6 fi + +ac_safe=strdup; + +echo $ac_n "checking if strdup is prototyped""... $ac_c" 1>&6 +echo "configure:4602: checking if strdup is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* + +fi + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_STRDUP_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=strerror; + echo $ac_n "checking if strerror is prototyped""... $ac_c" 1>&6 -echo "configure:4385: checking if strerror is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4652: checking if strerror is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4420,26 +4687,224 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_STRERROR_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=stricmp; + +echo $ac_n "checking if stricmp is prototyped""... $ac_c" 1>&6 +echo "configure:4702: checking if stricmp is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* + +fi + + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_STRICMP_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=strlcpy; + +echo $ac_n "checking if strlcpy is prototyped""... $ac_c" 1>&6 +echo "configure:4752: checking if strlcpy is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* + +fi + + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_STRLCPY_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=strncasecmp; + +echo $ac_n "checking if strncasecmp is prototyped""... $ac_c" 1>&6 +echo "configure:4802: checking if strncasecmp is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* + +fi + + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_STRNCASECMP_PROTO EOF echo "$ac_t""no" 1>&6 fi + +ac_safe=strnicmp; + +echo $ac_n "checking if strnicmp is prototyped""... $ac_c" 1>&6 +echo "configure:4852: checking if strnicmp is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* + +fi -ac_safe=`echo "system" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo system | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_STRNICMP_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=system; echo $ac_n "checking if system is prototyped""... $ac_c" 1>&6 -echo "configure:4437: checking if system is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4902: checking if system is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4472,26 +4937,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_SYSTEM_PROTO EOF echo "$ac_t""no" 1>&6 fi - -ac_safe=`echo "time" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo time | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=time; echo $ac_n "checking if time is prototyped""... $ac_c" 1>&6 -echo "configure:4489: checking if time is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:4952: checking if time is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4524,26 +4987,24 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_TIME_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "unlink" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo unlink | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=unlink; - echo $ac_n "checking if unlink is prototyped""... $ac_c" 1>&6 -echo "configure:4541: checking if unlink is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:5002: checking if unlink is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4576,26 +5037,74 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_UNLINK_PROTO EOF echo "$ac_t""no" 1>&6 fi -ac_safe=`echo "write" | sed 'y%./+-%__p_%'` -ac_proto=NEED_`echo write | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO +ac_safe=vsnprintf; +echo $ac_n "checking if vsnprintf is prototyped""... $ac_c" 1>&6 +echo "configure:5052: checking if vsnprintf is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=no" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_prototype_$ac_safe=yes" +fi +rm -f conftest* + +fi + + +if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + cat >> confdefs.h <<\EOF +#define NEED_VSNPRINTF_PROTO +EOF + + echo "$ac_t""no" 1>&6 +fi + + +ac_safe=write; + echo $ac_n "checking if write is prototyped""... $ac_c" 1>&6 -echo "configure:4593: checking if write is prototyped" >&5 -if eval "test \"`echo '$''{'ac_cv_prototype_$ac_safe'+set}'`\" = set"; then +echo "configure:5102: checking if write is prototyped" >&5 +if eval "test \"\${ac_cv_prototype_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_prototype_$ac_safe=no" else @@ -4628,8 +5137,8 @@ fi if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else - cat >> confdefs.h <> confdefs.h <<\EOF +#define NEED_WRITE_PROTO EOF echo "$ac_t""no" 1>&6 @@ -4726,7 +5235,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.14.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -4986,7 +5495,7 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 # echo "Configuration completed. To compile, type: cd src; make" Index: cnf/aclocal.m4 =================================================================== RCS file: /home/circledb/.cvs/circle/cnf/aclocal.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -r1.5 -r1.6 --- cnf/aclocal.m4 1998/10/24 03:30:54 1.5 +++ cnf/aclocal.m4 2002/03/20 22:23:11 1.6 @@ -1,20 +1,6 @@ -define(MAKE_PROTO_SAFE, `echo "$1" | sed 'y%./+-%__p_%'`) -define(MAKE_PROTO_NAME, [dnl -changequote({, })dnl -{NEED_`echo $1 | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO} -changequote([, ])dnl -]) - -ifdef([AC_AUTOHEADER], -[ - define(AC_CHECK_PROTO, [@@@protos="$protos $1"@@@]) -], -[ AC_DEFUN(AC_CHECK_PROTO, [ -dnl Do the transliteration at runtime so arg 1 can be a shell variable. -ac_safe=MAKE_PROTO_SAFE($1) -ac_proto=MAKE_PROTO_NAME($1) +ac_safe=translit($1, './+-', '__p_'); AC_MSG_CHECKING([if $1 is prototyped]) AC_CACHE_VAL(ac_cv_prototype_$ac_safe, [# @@ -35,14 +21,14 @@ eval "ac_cv_prototype_$ac_safe=no",eval if eval "test \"`echo '$ac_cv_prototype_'$ac_safe`\" = yes"; then AC_MSG_RESULT(yes) else - AC_DEFINE_UNQUOTED($ac_proto) + 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 @@ -82,4 +68,3 @@ if test ${ac_cv_lib_crypt_crypt-no} = ye LIBS=$ORIGLIBS fi ]) - Index: cnf/configure.in =================================================================== RCS file: /home/circledb/.cvs/circle/cnf/configure.in,v retrieving revision 1.14 retrieving revision 1.16 diff -u -p -r1.14 -r1.16 --- cnf/configure.in 1999/08/02 00:24:06 1.14 +++ cnf/configure.in 2002/04/16 02:23:06 1.16 @@ -85,7 +85,7 @@ AC_CHECK_HEADERS(fcntl.h sys/fcntl.h err 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) +AC_CHECK_HEADERS(signal.h sys/uio.h mcheck.h) AC_UNSAFE_CRYPT @@ -96,8 +96,6 @@ AC_TYPE_SIZE_T AC_CHECK_TYPE(ssize_t, int) AC_HEADER_TIME -dnl Check for the 'typedef socklen_t' definition. Even uglier, yes. - 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 @@ -136,6 +134,8 @@ 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 @@ -184,13 +184,21 @@ 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) AC_OUTPUT(src/Makefile src/util/Makefile) Index: doc/README.CYGWIN =================================================================== RCS file: /home/circledb/.cvs/circle/doc/README.CYGWIN,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- doc/README.CYGWIN 2001/08/29 15:39:56 1.6 +++ doc/README.CYGWIN 2002/01/16 03:11:09 1.7 @@ -39,8 +39,9 @@ another form of Unix: gunzip which come with the full Cygwin package. 4) Start the "bash" shell and go to the directory where you have extracted - CircleMUD (we will assume "C:\circle30bpl20", or "/circle30bpl20" from - within bash). DO NOT go into the "src" directory yet. + CircleMUD (we will assume "C:\circle30bplXX", or "/circle30bplXX" from + within bash, where 'XX' is the current patchlevel). DO NOT go into the + "src" directory yet. 5) Run the shell script "./configure". This will automatically detect whether or not certain programs and library functions are available, and @@ -51,9 +52,10 @@ another form of Unix: an executable, you can also try "sh configure", "sh ./configure", "bash configure" and "bash ./configure" until one of them works. -6) NOW change to the /circle30bpl20/src directory, and type "make", and watch +6) NOW change to the /circle30bplXX/src directory, and type "make", and watch CircleMUD and the additional utilies included in the Circle distribution - automatically being compiled and placed in /circle30bpl20/bin. + automatically being compiled and placed in /circle30bplXX/bin. (Remember, + 'XX' is the current patchlevel number, e.g., 'circle30bpl20'.) 7) Make sure your TCP/IP stack is installed, correctly configured, and running. If you are already using TCP/IP applications from your Windows machine such @@ -68,7 +70,7 @@ another form of Unix: YOU MUST INSTALL AND CONFIGURE YOUR TCP/IP STACK, EVEN IF YOU ARE NOT CONNECTED TO THE INTERNET. -8) Go back to /circle30bpl20, and run the MUD either directly by typing +8) Go back to /circle30bplXX, and run the MUD either directly by typing "bin/circle", or by using the "./autorun" script. 9) Start a telnet program (SEE NOTE BELOW). Open a connection to your Index: doc/sources/FAQ.tex =================================================================== RCS file: FAQ.tex diff -N FAQ.tex --- /dev/null Tue May 5 13:32:27 1998 +++ /tmp/cvsvUh7cy Mon Apr 15 20:36:21 2002 @@ -0,0 +1,618 @@ +\documentclass[11pt]{article} +\usepackage{url} +\usepackage{times} +\usepackage{varioref} +% Document typeset from the original document that was typeset by Alex Fletcher. +% This document typeset by Alex Fletcher on Dec 9/2001 + +\addtolength{\topmargin}{-.5in} % repairing LaTeX's huge margins... +\addtolength{\textheight}{1in} % more margin hacking +\addtolength{\textwidth}{1in} % and here... +\addtolength{\oddsidemargin}{-0.5in} +\addtolength{\evensidemargin}{-0.5in} +\setlength{\parskip}{\baselineskip} +\setlength{\parindent}{0pt} + +\title{Frequently Asked Questions (FAQ) for CircleMUD with Answers} +\author{Alex Fletcher\\ +\texttt{furry@circlemud.org}} +\begin{document} + +\maketitle + +\begin{abstract} +This file is intended to cover common questions related to the CircleMUD distribution source by +Jeremy Elson \url{} and not general DikuMud questions. Any contributions and corrections are more than welcome. It is currently maintained by Alex Fletcher (aka Furry) \url{} Please direct corrections to this address. The original author was Ryan Watkins (aka VampLestat).\par +More information about CircleMUD, including up-to-date versions of this documentation in ASCII and Postscript, can be found at the CircleMUD Home Page \url{} or the FTP site \url{}. +\end{abstract} + +\tableofcontents + +\section{Introduction} +\subsection{I've never played a MUD before. What should I do?} +Do not try to use your own copy of CircleMUD! There are two levels of MUD users: players and administrators. Administrators do what you're trying to do now -- get a copy of a MUD's source code, compile it, and run it. Players use MUDs that are being administered by someone else. If you try to actually run a MUD before you've ever played one, you'll get very confused indeed! Your best bet for now is to play someone else's MUD first. There are a large number of excellent MUDs out there already, some of which are based on CircleMUD code. A good place to start looking is the Mud Connector \url{}. The CircleMUD web server also has a smaller CircleMUD Site List \url{}. + +\subsection{I'm new to C and/or coding. What do I do?} +First, a Mud is not a learning project. It has thousands of lines to it many of which are obscure and unclear to even moderately skilled programmers. Those little, ``Hello, world,'' programs are for learning, maybe little math tests, etc. A Mud is a pretty ambitious project to start with. That is like trying to run before you can walk, and while there's more difficult things than a mud to start with, there's a ton of easier things you should start with. +\par +Second, if you are persistent, get a good C reference book and read the code, try to comprehend what everything is doing (to some small extent). You should probably avoid \texttt{comm.c} as it is home to the socket functions which general C books don't cover and are usually explained in other books on network programming. +For some good resources to learn C, see Question 18.9 in the C FAQ \url{}. +\par +Third, try small projects, something similar to what already exists. This way, you can get away with a cut-and-paste job and changing some of the code. Adding a simple version of races is not all that difficult, just examine the class code in \texttt{class.c} and the \texttt{CON\_QCLASS} block in \texttt{interpreter.c}, cut, paste, and modify. Also look at \texttt{structs.h}, for \texttt{\#define CLASS\_} You'll begin understanding more and more of the code as you copy and change it, eventually you'll be able to write a whole function by yourself. Spend time learning, going with haste will hurt you more than it will help you. +\par +Remember that if you attempt to run a mud without knowing how to program in C, you will fail. Your mud will remain a stock mud, your friends will not play, and you will annoy off anyone you ask for help when you repeatedly show no drive to learn how to do it yourself. + +\subsection{I want to build my own mud. Where do I start?} +Many common questions arise from new mud admins. It is a good idea to pay attention to them and take their answers to heart. These include things like the following: +\par +{\em I don't have any coding experience with MUDs, but do have a lot of ideas for my own. I have played many MUDs for a LONG time, though.} +\par +Read the FAQ. Mud Experience doesn't help a huge amount. Code experience does. +\par +{\em I am interested in having a level system of 1-50 mortal and 51-60 imms. I am also interested in adding races and classes. How can I accomplish these things?} +\par +By checking the FTP Site under the contrib tree \url{}. Learn a lot from there. Especially the \texttt{code/} subdirectory. Above all, {\em know} the FAQ. +\par +{\em Also, is there anything that I should know about CircleMUD being a ``newbie'' to it?} +\par +See the above comment. + +\subsection{What is CircleMUD?} +CircleMUD is a DikuMud derivative, developed by Jeremy Elson \url{} +and is from the Gamma v0.0 of DikuMud created by Hans Henrik Staerfeldt, Katja Nyboe, Tom +Madsen, Michael Seifert and Sebastian Hammer at DIKU (Computer Science Instutute at Copenhagen University). Note that CircleMUD is a Diku derivative, so its users must follow the DIKU license agreement -- most notably that it cannot be used to make money in {\em ANY} way, the original developers' names must be in the login screen that the \texttt{credits} command always presents the same information, etc.\newline +Quoting from CircleMUD's \texttt{release.doc}: +\begin{quote} +``CircleMUD is highly developed from the programming side, but highly UNdeveloped on the game-playing side. So, if you're looking for a huge MUD with billions of spells, skills, classes, races, and areas, Circle will probably disappoint you severely. Circle still has only the 4 original Diku classes, the original spells, the original skills, and about a couple dozen areas. On the other hand, if you're looking for a highly stable, well-developed, well-organized ``blank slate'' MUD on which you can put your OWN ideas for spells, skills, classes, and areas, then Circle might be just what you're looking for.'' +\end{quote} +The latest full production release of Circle is 2.20, released on November 17, 1993. +Currently 3.0 is in beta, at patch level 20, released on January 15, 2002. + +\subsection{What is the history of CircleMUD?} +\begin{itemize} +\item Version 2.00: July 16, 1993 +\item Version 2.01: July 20, 1993 +\item Version 2.02: Early August +\item Version 2.10: September 1, 1993 +\item Version 2.11: September 19, 1993 +\item Version 2.20: November 17, 1993 +\end{itemize} +Version 3.00 is currently in beta right now and is up to patchlevel 19. The final release is due out Real Soon Now(tm). Don't bother posting requests for it. It will be out when the CircleMUD group gets it done, and it will be announced on the mailing list and the newsgroup \texttt{rec.games.mud.diku}. + +\subsection{Where is the original CircleMUD so I can check it out?} +CircleMUD is a public code base, freely distributable, but the authors of Circle do not actually run one personally. There used to be CircleMUD, and while the CircleMUD group continues to develop it, there is no original CircleMUD any more. To see other MUDs that are using the CircleMUD code base, check out the CircleMUD Site List \url{}. + +\subsection{What is UNIX?} +UNIX is not an operating system of itself, it's a type (flavour, if you will) of operating systems. Many different kinds of UNIXes exist. Some of them are free, some of them are not. How to tell if you have a UNIX operating system? Well, UNIXes have the `ps' command, tend to have a `\%' or `\#' prompt, give you a home directory, `who' will show who else is on the system, etc. Many UNIX systems (such as Linux) strive to be POSIX compatible, so you'll probably see POSIX mentioned, too. POSIX is, roughly, the standards which UNIX operating systems go by. It says what makes an operating system part of the UNIX family and so forth. Some UNIX operating systems are not 100\% POSIX compatible, actually, most aren't. The following are types of UNIX (but not all the existing flavours): Linux, FreeBSD, BSD, BSDi, Solaris. There are others. UNIX operating systems are command-based and Microsoft does not make a variant. + +\section{Resources} +\subsection{Where do I find the source code for CircleMUD?} +Circle's complete source code and areas are available for anonymous FTP at the CircleMUD FTP site \url{}. There is also a CircleMUD homepage \url{} for more CircleMUD information. The Ceramic Mouse \url{} presents an alternate interface to the FTP site. +\par +If you cannot use FTP or interact with the FTP server using Ceramic Mouse, you can contact one of the site maintainers \url{} and request a file. + +\subsection{Where do I find areas, etc. for CircleMUD?} +A number of CircleMUD based Implementors have submitted areas to the public and they are +archived at the same site as the CircleMUD source \url{}. There used to be a separate Code Snippet site, but that has since be rolled into the main FTP server to present everything in one central location. + +\subsection{I have questions about CircleMUD. Where should I go?} +If you have general questions about the MUD such as how to get it running, how to add new spells, how to add new skills, etc., the first place you should look is the documentation. `coding.doc' will have information about how to add new spells, skills, commands, etc. `building.doc' has +information about how to create new worlds, how to read the database files, etc. There are many other documents in the doc directory with useful information. +\par +There is also a new project, started in June of 1996, called the CircleMUD Documentation Project \url{} which will eventually be a repository for all Circle-related information. It is still being built as of this writing, but hopefully will become a valuable resource as more documentation is added. +\par +If you still have questions {\em after} reading the documentation, you can try asking on the CircleMUD mailing list (see next section). +\par +If you have a question you think is too ``newbie'' for the mailing list, try the help database \url{}. You can ask questions by sending mail to the help administrators \url{}. The webpage database is also, incidentally, where you should go to report bugs (also done by sending mail \url{}). + +\subsection{So, what's this about a mailing list?}\label{mailinglist} +There is a CircleMUD mailing list for coders, builders, and administrators. This list is for the discussion of CircleMUD, and not a place to learn C. +\par +To subscribe, send a message to the list server \url{} with a message body of \texttt{subscribe circle $<$first name$>$ $<$last name$>$}. +\par +To unsubscribe from the list send a message to the same address with the words \texttt{unsubscribe circle} as the message body. {\em DO NOT} send unsubscription requests to the list in general. There are hundreds of people on the list, and it will only irritate a ton of people who have no power to remove you from the list. Read the Mailing List FAQ \url{} for more information. + +\subsection{To what platforms has CircleMUD been ported?} +Version 3.0, although still officially in beta-testing, is very portable because it uses the GNU autoconf system, meaning you only need to type ``configure'' to have it automatically determine various features of your system and configure the code accordingly. 3.0 compiles without changes under most BSD and SVR4 systems, including SunOS, Solaris, Ultrix, IRIX, AIX, Linux, BSD/OS, HP/UX, Mac OS X, and others. +\par +Version 3.0 is also being ported to various non-UNIX platforms. As of patchlevel 14, you can compile Circle under OS/2 2.x and 3.x with the OS/2 port of gcc, Windows 95/NT using Microsoft Visual C++ versions 4.0 through 6.0, Borland (now Inprise) C++ 4.5, Watcom v.11, Cygnus GNU-WIN32, LCC, Macintosh OS 9 (and earlier) with CodeWarrior, Amiga, and Acorn RiscOS. +\par +The older version of the code, Version 2.20, compiles mainly on BSD UNIX systems but has some trouble under SVR4-based systems such as Solaris. The authors have personally compiled and tested v2.20 under Ultrix 4.0, IRIX 4.0.1, 4.0.4 and 4.0.5, SunOS 4.1.1 and 4.1.3, AIX 3.2, Linux 0.99.x and 1.0.x, and ConvexOS V10.2. Users have reported that v2.20 compiles with relatively minor changes under NeXTStep 2.1 and 3.0, and HP/UX 9.0. +\par +Jean-Jack Riethoven \url{} ported CircleMUD version 2.20 to the Amiga and has contributed his code for version 3.0 of CircleMUD. Questions about the Amiga source should be directed to Jean-Jack Riethoven, not the CircleMUD group. + +\subsection{How can I submit code or areas for use with CircleMUD?} +There is a special uploads area \url{} +on the CircleMUD ftp server for submissions of code, areas, utilities, scripts, and anything else that might be of use to CircleMUD users. When uploading anything, you should be certain to send a piece of email to the site maintainers \url{} indicating what you uploaded, what it is, and where it should be placed. These portions of code or areas will probably not be added to the full release of CircleMUD unless you make specific arrangements with the CircleMUD group. + +\subsection{How do I use a patch file and how can I make one?}\label{patchfile} +Patch files are created and used using the ``diff'' and ``patch'' utilities, respectively. They can both be downloaded from the GNU FTP site \url{} under the name ``diffutils-xxx.tar.gz''. There is also a port of these utilities for Microsoft Windows now available from the +Cygnus GNU Win32 Project \url{http://sourceware.cygnus.com/cygwin/}. +\par +These are the various parameters to use with \texttt{diff} (all work in general on unix based systems, but check out the help entries to be certain. +\begin{verbatim} + diff -wuprN [original_src_directory] [altered_src_directory] > Patch +\end{verbatim} +\texttt{-w} tells the output to ignore differences in spacing on the same line.\newline +\texttt{-u} is the unified output. ie. it tells diff to output the text what is called ``patch'' style. On some systems, you will have to use \texttt{-c} but it generates much larger and harder to follow patches.\newline +\texttt{-p} tells diff to indicate what function is being ``patched'' in each section. This may not be supported by all versions of ``diff.''\newline +\texttt{-r} is recursive, add r to the uN above if you want it to recursively add in any subdirectories. (be careful with this one)\newline +\texttt{-N} tells diff to treat files that are in one directory and not there in the other as being empty in the one they are not there. It allows entire files to be included into the patch.\newline +See the manpage for \texttt{diff} for other possible options including \texttt{-x} for excluding files. +\par +If you download a patch file and would like to add it to your code, first make sure to read any instructions that the patch author might have written. The command used to add the patch may vary depending on how the patch was created. This should given in the first line of the patch or in the instructions. Normally, if using GNU patch with a unified diff, the command should be: +\begin{verbatim} + patch -u < [patchfile] +\end{verbatim} +If the patch was created with a SYSV patcher (i.e. not a unified diff), the patch should be added with: +\begin{verbatim} + patch -c < [patchfile] +\end{verbatim} +Of course, if the instructions state otherwise, ignore any instructions given here and follow the instructions given with the patchfile instead.\newline +Finally, in modern patches, there are three characters of interest to note: +\begin{itemize} +\item ! : The line changes between new and old. +\item + : This line is added to the old to make the new. +\item - : This line is removed from the old to make the new. +\item The rest of the lines are just there to give you an idea of where to change. +\end{itemize} + +\section{Compiling CircleMUD} +\subsection{Why do I get many syntax errors with Sun's/HP-UX's ``cc'' compiler?} +Because Circle is written in ANSI C, and the standard C compilers distributed by Sun and HP are not capable of compiling ANSI C code. You can try the ANSI C compilers, but both cost extra money so your sysadmin may not have installed it. Most don't. The best solution is to get the GCC compiler from the GNU FTP site \url{} and install it, if you have enough time and space. + +\subsection{Why do I get all sorts of errors with ``crypt'' functions and header files?} +{\em (This information applies ONLY to Version 3.0 of the code.)} CircleMUD normally uses the UNIX \texttt{crypt()} function to encrypt players' passwords. Because of export restrictions imposed by the U.S., some systems do not have the \texttt{crypt()} function. ``configure'' will usually be able to figure out whether or not your system has \texttt{crypt()}, but if it guesses incorrectly and you see problems with the \texttt{crypt()} function or headers, you can manually disable password encryption by going into the \texttt{sysdep.h} source +file and uncommenting the line that reads: +\begin{verbatim} + #define NOCRYPT +\end{verbatim} +Be warned, however, that doing this causes the MUD to store players' passwords in plain text rather than as encrypted strings. Also, if you move from a system which has crypt to one that doesn't, players won't be able to log in with their old passwords! + +\subsection{When I try to compile, why do I get a lot of undefined symbols referenced in comm.o for functions like socket, accept, and bind?} +SVR4 systems require the socket and nsl libraries for network programs. You shouldn't see this error any more with version 3.0 because ``configure'' should automatically use those libraries for you; however, if you still have problems, try adding ``-lsocket -lnsl'' to the line in the \texttt{Makefile} that links all the object files together into the `circle' binary. +\par +If you're using V2.20 and you have this error, the best thing to do is simply to use V3.0 instead. If you insist on using 2.20, go into the \texttt{Makefile} and search for the comment next to ``SVR4''. + +\subsection{Every time I try to compile Circle (or any other piece of software) under Linux, it gives me errors and says it cannot find include header files in the \texttt{linux/} and \texttt{asm/} directories. What can I do?} +Under Linux, you cannot compile any program unless you install the kernel source code because the kernel source includes the ANSI C header files. You need the files in \texttt{/usr/include/linux/}, which are distributed separately from the rest of \texttt{/usr/include/}. +\par +If your system does not have them already, you will have to set up your include files manually. The easiest way to get these is to download kernel source from one of the kernel.org mirrors +\url{}. Get the kernel source that matches the kernel you're running (type `uname -a' to find your kernel version). Then unpack the kernel into the \texttt{/usr/src/} directory. It is about 20 megabytes compressed, and about 60 megabytes uncompressed. +\par +Read the \texttt{README} file that comes with the kernel, and make the symbolic links you need for \texttt{/usr/include/asm/} and \texttt{/usr/include/linux/}. Now compile the MUD. This will take care of most of the errors. You may have to do `make config' and `make dep' in \texttt{/usr/src/linux/} as well, in order to make \texttt{linux/config.h} and other files that get generated by these steps. +\par +You can remove the whole kernel source tree except for \texttt{include/} at this point and get most of your space back. +\par +(Thanks to Michael Chastain for providing this answer.) + +\subsection{I'm getting compilation errors from a header file, and I didn't even change it?} +Okay, if you really didn't change ``structs.h'' then the error isn't in ``structs.h''. We have seen numerous cases where this has happened, the first, is that the header file you included right before the header file messing has an error in it. We can't really say much beyond that, but look for a missing semicolon, are any other errors you can find. +\par +If you include files out of order, it can mess things up. For example, B.h has stuff in it that is defined in A.h, and if you include B.h before A.h, you can get errors, your best bet here is to mess with the order of the headers, making sure you put ``conf.h'' and ``sysdep.h'' at the top, followed by ``structs.h'', ``utils.h'', etc. Any file specific headers should be the last one included just for coding style. + +\subsection{I'm trying to compile the mud on Windows '95 and am having problems, what can I do?} +The first thing to do is to make sure you are compiling a recent version of the source code. Patch Level 11 and onwards all support Windows 95 winsock sockets now. Second, you should ensure that you have carefully read the \texttt{README.WIN} file for instructions on what to include. +Next, ensure that you are using a C compiler that supports long filenames (for example, MSVC 4.0 does, MSVC 1.0 does not). If you happen to be trying to patch something into your code, you should use one of the Cygnus Tools mentioned in section~\vref{patchfile}. + +\subsection{How can I do a ``grep'' on Windows 95?} +\begin{enumerate} +\item Select ``start menu''-$>$``find''-$>$``files or folders'' +\item Enter the files/dirs to search in. +\item Select ``Advanced'' +\item In the ``Containing Text'' input box, type in the text you want. +\item Double click on a match to bring up the file that matched. +\end{enumerate} +Even better is to use MSVC's find command (if you have it). + +\subsection{While compiling the mud, why do I get errors like ``foo.c:1231: Undefined symbol `\_whereamI' referenced from text segment''} +You forgot to include a source file into the make. Go edit your \texttt{Makefile} and make sure all the necessary *.c files are in there, in particular, whichever C file defines the function that the compiler is complaining is undefined. If all else fails, try deleting all the *.o files and recompiling from scratch. + +\subsection{What is a parse error and how do I fix it?} +A parsing error is often a missing or extra semicolon, parenthesis, or bracket (\{). If the parse error is before a semicolon at the end of a line of code, it is something on that line. If it is at the beginning of a line within a function, it is usually a missing semicolon on the previous line. If it is at the beginning of a function, count your brackets (especially the \{\} ones) in the previous function. I can't think of any other parse errors. These are the ones I commonly see. With a bit of practice, they are very easy to locate and fix. For a more detailed explanation, check out the C Language FAQ \url{}. + +\subsection{I have this piece of code that calls bcopy(), bzero(), and bcmp() and it won't compile, so what can I do?} +All three of these functions are fairly standard on BSD systems. However, they are not considered to be very portable, and thus should be redefined. For example, the equivalents for SYSV are: +\begin{verbatim} + #define bcopy(from,to,len) memmove(to,from,len) + #define bzero(mem,len) memset(mem,0,len) + #define bcmp(a,b,len) memcmp(a,b,len) +\end{verbatim} + +\subsection{My compiler doesn't have ``strdup()'', what can I do?} +Use Circle's built-in \texttt{str\_dup()} function instead. + +\subsection{I am having trouble with my ``makefile'', what could be the problem?} +If you used cut and paste to insert items into your makefile, it is likely that you accidentally put spaces at the beginning of lines where tabs are needed. To check the tabs in your makefile, you can issue the \texttt{cat -v -t -e Makefile}, which will show all tabs as \texttt{\^I} and will show a \texttt{\$} at the end of each line to show any terminating white space. This is how the makefile must be constructed: +\begin{verbatim} + foo.o: foo.c conf.h sysdep.h structs.h utils.h interpreter.h \ + handler.h db.h + {TAB}$(CC) -c $(CFLAGS) +\end{verbatim} +To add these lines properly, you can use \texttt{gcc} to assist you with the following shell script (from Daniel Koepke): +\begin{verbatim} + #!/bin/sh + gcc -MM $1 >> Makefile + echo "{TAB}\$(CC) -c \$(CFLAGS) $1" >> Makefile +\end{verbatim} +To use this script, replace \texttt{\{TAB\}} with a tab, and then run the script like: \texttt{add\_file foo.c} + +\subsection{How can I handle directories in C?} +{\em Note that this seems only to be valid for UNIX OSes.} Handling of directories is accomplished through the \texttt{dirent.h} and \texttt{sys/types.h} files. The function \texttt{opendir()} returns a ``DIR*'' pointer (it's like {\em but not the same as} the ``FILE *'' pointer) when you pass it the name of a directory to open or NULL if it can't open the dir. After the directory has been opened, you can step through the files or search for particular files, etc. using \texttt{readdir()}, \texttt{seekdir()}, and \texttt{scandir()}. When you reach the end of the directory list, you can either go back to the start with \texttt{rewinddir()} or close the directory with \texttt{closedir()}. The following code (which has not been tested) should open a directory and go through it one by one and prints the filenames: +\begin{verbatim} + struct dirent * ffile; + DIR * my_dir; + + if (!(my_dir = opendir("foo"))) + return; + + while (1) { + if (!(dirent = readdir(my_dir))) + break; + printf("%s\n", dirent->d_name); + } + + closedir(my_dir); +\end{verbatim} +The dirent structure contains only two useful elements, the file's name (\texttt{d\_name}) and the files length (\texttt{d\_reclen}).\newline +Thanks to Daniel Koepke for the above. +\par +For Windows based machines (the Cygwin tools support the above code), the following code should be used instead: +\begin{verbatim} +#include + +struct _finddata_t filedata; +long fh; + +if( (fh = _findfirst( "*.*", &filedata )) == -1L ) { + printf( "No files in current directory!\n" ); +} else { + printf( "Listing of .c files\n\n" ); + printf( " %-12s %.24s %9ld\n",filedata.name, ctime( &( + filedata.time_write ) ), filedata.size ); + while( _findnext( hf, &filedata ) == 0 ) { + printf( " %-12s %.24s %9ld\n", filedata.name, ctime( &( + filedata.time_write ) ), filedata.size ); + } + _findclose(hf) +} + +/* note: filedata.attrib is a bitvector; + _A_ARCH has the archive bit set (does nothing) + _A_HIDDEN is hidden + _A_NORMAL nothing to see here + _A_RDONLY is read only + _A_SUBDIR is a directory + _A_SYSTEM is a system file (really does nothing) + .. + so if(filedata.attrib & _A_SUBDIR) { + print "File is a directory!\n"; + } +*/ +\end{verbatim} +Please note that this is the file name without the path. DOS oriented functions do not gracefully or consistently deal with directory options where the directory/file being accessed is not in the current working directory. You'll have to remember what it is! You can try other things .. but it {\em really} does not handle {\em relative} paths well using the \_[system function] set of functions. The whole thing is rather ugly. +\par +Thanks for Patrick Dughi for the above. + +\section{Running CircleMUD} +\subsection{I typed ``autorun'' but then my terminal just froze.} +\texttt{autorun} is a script which automatically runs, logs, and reboots the game for long-term runs. You should run autorun in the background by typing ``./autorun \&'' -- the MUD will start running in the background and you'll get the normal UNIX prompt back immediately (see section~\vref{loginprompt}). The game will then run unattended until you explicitly shut it down. +\par +On some systems, you may need to prepend ``nohup'' to the autorun command since some systems will kill off any processes left running when you leave the shell. + +\subsection{I typed ``bin/circle'' and got lots of boot messages, but then it said ``Entering game loop'' and froze.} +It is not frozen, it is just waiting for people to connect. You have to run the MUD in the background by typing ``bin/circle \&'' and then use telnet to connect to the game (see next section). + +\subsection{Okay, I think the MUD is running but why don't I get a login prompt?}\label{loginprompt} +In order to play the MUD, you must connect to it using the telnet command, i.e. ``telnet localhost 4000''. + +\subsection{How come I get this error when running my mud: ``Error reading board: No such file or directory''} +This is not a bad thing, all it means is that you have some boards on the mud and that it can't find the file for them. Since it can't find the file, the mud will just create the file on the fly and use that, so the next time something is posted to the board, the files will exist. However, if you did have files for the boards and you are suddenly getting this error, it means that the board files have been deleted or something similar. + +\subsection{I just got this SIGPIPE, what is it and what can I do about it?} +Often it appears that other people send your system SIGPIPEs when their connection is closed, in fact, it is not the person sending the SIGPIPE, it is your system. The SIGPIPE is generated when your program attempts to write to descriptor which has no one listening to it. This occurs if the character is sent a message by the mud after connecting, but before the socket is flagged with an exception or reads 0 bytes. By default, CircleMUD ignores these SIGPIPEs, with the line \texttt{my\_signal(SIGPIPE, SIG\_IGN)} in \texttt{signal\_setup()}. Where most people see the problems with SIGPIPE is while debugging with GDB. By default, GDB responds to a SIGPIPE by stopping the program, printing that a SIGPIPE was received, and passing it to the program. You can change the action taken by GDB by using the `\texttt{handle}' command. To stop the program from stopping at SIGPIPE, you would give GDB the command `\texttt{handle SIGPIPE nostop}' + +\subsection{When I run Circle under Linux, it tells me ``gethostbyaddr: connection refused'' when the MUD boots, and then dies. Why?} +You need to make sure you have Networking and TCP/IP support compiled into your Linux kernel, even if you aren't actually connected to the Internet. Generally the default install of Linux supports networking, so if you have done this, double check that the networking is installed as per your specific distribution, and otherwise seek further help from your distribution's official site. + +\subsection{When I run Circle under Windows, it tells me ``Winsock error \#10047'' when the MUD boots, and then dies. Why?} +You need to configure TCP/IP networking from the Network Control Panel, even if you are not connected to the Internet. From the Network Control Panel, select ``Add Protocol'', and under the vendor ``Microsoft'', choose ``TCP/IP''. It may ask you to insert your Windows CDROM in order to copy the drivers onto your hard drive. + +\subsection{When I run Circle under Windows, players can't rent -- their equipment is just dropped on the ground, syslogs don't work, so what is the problem?} +The reason that objects aren't saved when your players quit is that certain unzip programs are buggy and don't completely recreate the MUD's directory structure (in particular, it doesn't create directories which have no files in them.) This is fixed in Circle 3.0 patchlevel 12 and above. Before patchlevel 12, you can fix it simply by manually creating the needed directories: +\begin{verbatim} + cd \Circle30bpl11 + cd lib\plrobjs + mkdir A-E + mkdir F-J + mkdir K-O + mkdir P-T + mkdir U-Z + mkdir ZZZ +\end{verbatim} +Object saving should then work. It is also advised that you look at the {\bf AUTOEQ} option in \texttt{structs.h} for another possibility. +\par +The syslogs are a different story; no data is written to the system logs because the code currently is configured simply to write all errors to the standard error file +descriptor (stderr), and Windows doesn't seem to let you redirect stderr to a file the same way UNIX does. Patch level 12 and above allow you to direct logs to a specific file instead. + +\subsection{When someone logs on to my Windows MUD, the console screen gives: ``gethostbyaddr: No such file or directory''} +This means the MUD can't resolve the IP address of the connecting player's source site into a hostname. You probably don't have DNS correctly configured in the Windows Network Control Panel menu (under configuration of the TCP protocol). Make sure you have the IP address of your ISP's DNS server listed. + +\subsection{My Mud crashed and my connection got closed. What can I do?} +Just because your connection got closed from the mud (for example, if you get too much information sent to you and the telnet session gets closed), this doesn't always mean that the game itself crashed. Before reporting something as a crash bug, make sure that the game itself crashed, and above all, try to duplicate the circumstances before reporting it as a crash bug. You can also try using gdb to find out why the mud is crashing if it gives you a core dump. + +\subsection{Ok, what's this ``gdb'' thing?} +GDB has some online help, though it is not the best. It does at least give a summary of commands and what they're supposed to do. What follows is Sammy's short intro to gdb with some bug hunting notes following it:\newline +If you've got a core file, go to your top circle directory and type:\par +\texttt{$>$ gdb bin/circle lib/core}\newline +If you want to hunt bugs in real time (causing bugs to find the cause as opposed to checking a core to see why the mud crashed earlier) use:\par +\texttt{$>$ gdb bin/circle}\newline +If you're working with a core, gdb should show you where the crash occurred. If you get an actual line that failed, you've got it made. If not, the included message should help. If you're working in real time, now's the time to crash the mud so you can see what gdb catches. +\par +When you've got the crash info, you can type ``\texttt{where}'' to see which function called the crash function, which function called that one, and so on all the way up to ``\texttt{main()}''.\par +I should explain about ``\texttt{context}'' You may type ``\texttt{print ch}'' which you would expect to show you the ch variable, but if you're in a function that doesn't get a ch passed to it (real\_mobile, etc), you can't see ch because it's not in that context. To change contexts (the function +levels you saw with where) type ``\texttt{up}'' to go up. You start at the bottom, but once you go up, and up, and up, you can always go back ``\texttt{down}''. You may be able to go up a couple functions to see a function with ch in it, if finding out who caused the crash is useful (it normally isn't). +\par +The ``\texttt{print}'' command is probably the single most useful command, and lets you print any variable, and arithmetic expressions (makes a nice calculator if you know C math). Any of the following are valid and sometimes useful: +\begin{verbatim} + print ch (fast way to see if ch is a valid pointer, 0 if it's not) + print *ch (prints the contents of ch, rather than the pointer address) + print ch->player.name (same as GET_NAME(ch)) + print world[ch->in_room].number (vnum of the room the char is in) +\end{verbatim} +Note that you can't use macros (all those handy pseudo functions like \texttt{GET\_NAME} and \texttt{GET\_MAX\_HIT}), so you'll have to look up the full structure path of variables you need. +\par +Type ``\texttt{list}'' to see the source before and after the line you're currently looking at. There are other list options but I'm unfamiliar with them.\newline +(From Sammy \url{})\par +For more information, you can try checking out the GDB Debugger manual \url{}. + +\subsection{How can I hunt bugs more effectively?} +There are only a couple of commands to use in gdb, though with some patience they can be very powerful. The only commands I've ever used are: +\begin{verbatim} +run well, duh. +print [variable] also duh, though it does more than you might think +list shows you the source code in context +break [function] set a breakpoint at a function +clear [function] remove a breakpoint +step execute one line of code +cont continue running after a break or ctrl-c +\end{verbatim} +I've run into nasty problems quite a few times. The cause is often a memory problem, usually with pointers, pointers to nonexistent memory. If you free a structure, or a string or something, the pointer isn't always set to NULL, so you may have code that checks for a NULL pointer that thinks the pointer is ok since it's not NULL. You should make sure you always set pointers to NULL after freeing them. +\par +Ok, now for the hard part. If you know where the problem is, you should be able to duplicate it with a specific sequence of actions. That makes things much easier. What you'll have to do is pick a function to ``break'' at. The ideal place to break is immediately before the crash. For example, if the crash occurred when you tried to save a mob with medit, you might be able to ``break mobs\_to\_file''. Try that one first. +\par +When you `medit save', the mud will hang. GDB will either give you segfault info, or it will be stopped at the beginning of mobs\_to\_file. If it segfaulted, pick an earlier function, like copy\_mobile, or even do\_medit. +\par +When you hit a breakpoint, print the variables that are passed to the function to make sure they look ok. Note that printing the contents of pointers is possible with a little playing around. For example, if you \texttt{print ch}, you get a hex number that shows you the memory location where ch is at. It's a little helpful, but try \texttt{print *ch} and you'll notice that it prints the contents of the ch structure, which is usually more useful. \texttt{print ch-$>$player} will give you the name of the person who entered the command you're looking at, and some other info. If you get a \texttt{no ch in this context} it is because the ch variable wasn't passed to the function you're currently looking at. +\par +Ok, so now you're ready to start stepping. When GDB hit your breakpoint, it showed you the first line of executable code in your function, which will sometimes be in your variable declarations if you initialized any variables (ex: int i = 0). As you're stepping through lines of code, you'll see one line at a time. Note that the line you see hasn't been run yet. It's actually the {\bf next} line to be executed. So if the line is \texttt{a = b + c;}, printing a will show you what a was before this line, not the sum of b and c. +\par +If you have an idea of where the crash is occurring, you can keep stepping till you get to that part of the code (tip: pressing return will repeat the last GDB command, so you can type step once, then keep pressing return to step quickly). If you have no idea where the problem is, the quick and dirty way to find your crash is to keep pressing return rapidly (don't hold the return key or you'll probably miss it). When you get the seg fault, you can't step any more, so it should be obvious when that happens. +\par +Now that you've found the exact line where you get the crash, you should start the mud over and step more slowly this time. What I've found that works really well to save time is to create a dummy function. This one will work just fine: +\begin{verbatim} + void dummy(void){} +\end{verbatim} +Put that somewhere in the file you're working on. Then, right before the crash, put a call to dummy in the code (ex: \texttt{dummy();}). Then set your breakpoint at dummy, and when you hit the breakpoint, step once to get back to the crashing code. +\par +Now you're in total control. You should be looking at the exact line that gave you the crash last time. Print {\bf every} variable on this line. Chances are one of them will be a pointer to an unaccessible memory location. For example, printing \texttt{ch-$>$player.name} may give you an error. If it does, work your way back and print \texttt{ch-$>$player} to make sure that one's valid, and if it isn't, try printing ch. +\par +Somewhere in there you're going to have an invalid pointer. Once you know which one it is, it's up to you to figure out why it's invalid. You may have to move \texttt{dummy()} up higher in the code and step slowly, checking your pointer all the way to see where it changes from valid to invalid. You may just need to NULL a free'd pointer, or you may have to add a check for a NULL pointer, or you may have screwed up a loop. I've done all that and more. +\par +Well, that's it in a nutshell. There's a lot more to GDB that I haven't even begun to learn, but if you get comfortable with print and stepping you can fix just about any bug. I spent hours on the above procedure trying to get my ascii object and mail saving working right, but it could have taken weeks without gdb. The only other suggestion I have is to check out the online gdb help. It's not very helpful for learning, but you can see what commands are available and play around with them to see if you can find any new tools. +\par +(From Sammy \url{}) + +\subsection{I just added n levels to my mud (from the stock 34). How do I set my imp's up to level n without a pfile wipe?} +You can write a quick and nasty function that will advance your imp (and imp only) to the max level (LVL\_IMPL). This can be done with a quick idnum check so that only the original player (the first imp, he with id 1) can use the command to get to maximum level. +\begin{verbatim} +ACMD(do_upme) +{ + if (GET_IDNUM(ch) != 1) { + send_to_char("You think IMP positions are that easy to come by? " + "Go Figure...\n\r", ch); + } else { + GET_LEVEL(ch) = LVL_IMPL; + send_to_char("Advanced.\n\r", ch); + } +} +\end{verbatim} +Remember that you will need to prototype it and add a call to it into the command table, but that is left as an exercise to the reader. + +\subsection{I decided to wipe my pfile away anyway. What steps should I take to do this?} +In order: +\begin{enumerate} +\item Shutdown the mud with ``shutdown die'' so that it won't restart. +\item Remove the player file, \texttt{lib/etc/players} +\item Restart the mud and login to recreate your imp character. +\end{enumerate} +You should probably also remove files in \texttt{plrobjs}, unless you want the recreated characters to come back with the same equipment they had when they were deleted. + +\subsection{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?} +The simple way to do this is to find all the ``pk\_allowed'' checks and replace them with a \texttt{can\_murder(ch, vict)} function call. Prototype the function in \texttt{utils.h}. Then, in \texttt{utils.c}, create a \texttt{can\_murder()} function something like this: +\begin{verbatim} +int can_murder(struct char_data *ch, struct char_data *victim) { + if (pk_allowed == TRUE) + return TRUE; + if (IS_NPC(ch) || IS_NPC(victim)) + return TRUE; /* you can always kill these */ + if (PLR_FLAGGED(ch, PLR_ASSASSIN)) + return TRUE; /* they can kill anyone */ + /* Add further checks here */ +} +\end{verbatim} + +\subsection{Why does it say ``Connection closed by foreign host.'' and not display the ``Byebye!'' message I'm trying to send before cutting someone off?} +This usually happens if you are doing something like this: +\begin{verbatim} + send_to_char("Bye bye. Come back soon, ya hear?", ch); + close_socket(ch->desc); +\end{verbatim} +The \texttt{close\_socket} immediately dispatches/closes the connection, while \texttt{send\_to\_char} puts the message on the output queue to be dispatched next +\texttt{game\_loop} cycle. Therefore, the socket is gone. On some systems (i.e., old linux), this can even cause a infinite loop attempting to write to a closed socket. The proper way of doing this and other ``Byebye'' messages is to set the CON state of the player to CLOSE, like this: +\begin{verbatim} + send_to_char("Bye bye. Come back soon, ya hear?", ch); + STATE(ch->desc) = CON_CLOSED; +\end{verbatim} +This will then cycle to the next \texttt{game\_loop}, dispatch the output queues (therefore sending the byebye message) and then close the socket. Further note, in some bizarre cases, this only seems to send about 40 characters and no escape codes. Sending more than 40 characters or escape codes (like the clear screen sequence) will crash the process reporting a problem similar to writing to a closed socket. + +\subsection{I run my mud on a unix system and the pfile/rent file works great, but on my home system it's all screwed up. What gives?} +Some operating systems write binary data least-significant-digit-first, while others write it most-significant-first (big endian vs. little endian). Moving player files, rent files, mail files, and board files from one of these systems to the other will result in corrupted files. The solutions to this problem include: +\begin{itemize} +\item Don't bother trying to move those files. +\item Edit your code to always write in one format. +\item Develop a binary to ascii conversion tool (and ascii to binary) for all binary files. +\item Develop an ascii read/write system to allow portability. +\end{itemize} +Some ASCII systems for objects, boards, and player files have been designed and are available on the CircleMUD FTP server \url{} in the contributions section. There are also plans for future versions of CircleMUD to remove all binary based files. + +\subsection{How do I get the CircleMUD to autoload when the Unix server is restarted?} +In \texttt{/etc/rc.d/rc.local} find where things like sendmail and (maybe) gpm are started. Add something like: +\begin{verbatim} + cd /home/mudlogin/circlebpl15/ + su mudlogin -c ./autorun & + cd +\end{verbatim} +Of course, change the ``\texttt{mudlogin}'' to whatever the name of the account is that normally has control of the mud, and change the path in the first \texttt{cd} to wherever the mud is run from.\newline +For more info: \texttt{man su} + +\subsection{My server shuts down my MUD every time I logoff. How do I keep the MUD running when I logoff?} +Instead of typing ``\texttt{autorun \&}'' to start the autorun script (which starts and keeps the mud running), type ``\texttt{nohup autorun \&}''. Running the autorun via nohup will keep the script and the MUD running when you logoff of the server. For more information type ``\texttt{man nohup}'' at the prompt on your server. + +\section{Code Changes for CircleMUD 2.20} +\subsection{How do I fix the bug where people can junk more coins than available?} +Apparently in Circle 2.2, you can drop any amount of coins, and then be rewarded with more coins than you had in the first place. Here is the fix from Jeremy Elson:\newline +Around line 480 of \texttt{act.obj1.c}, you will find the code: +\begin{verbatim} + if (!str_cmp("coins", arg) || !str_cmp("coin", arg)) + perform_drop_gold(ch, amount, mode, RDR); + else { + /* code to drop multiple items. anyone want to write it? -je */ + send_to_char("Sorry, you can't do that (yet)...\n\r", ch); +--> return; + } + .... +\end{verbatim} +It should be changed to: +\begin{verbatim} + if (!str_cmp("coins", arg) || !str_cmp("coin", arg)) + perform_drop_gold(ch, amount, mode, RDR); + else { + /* code to drop multiple items. anyone want to write it? -je */ + send_to_char("Sorry, you can't do that (yet)...\n\r", ch); + } +--> return; + .... +\end{verbatim} + +\subsection{How do I fix the ``vstat'' bug that crashes the MUD?} +To the fix for the vstat bug, from Jeremy Elson: +\par +In the file act.wizard.c, in the function \texttt{do\_vstat}, in the mobile section of the switch (around line 1150), you'll find the code: +\begin{verbatim} + mob = read_mobile(r_num, REAL); + do_stat_character(ch, mob); + extract_char(mob); +\end{verbatim} +Add the line \texttt{char\_to\_room(mob, 0)} before \texttt{extract\_char()}, like this: +\begin{verbatim} + mob = read_mobile(r_num, REAL); + do_stat_character(ch, mob); + char_to_room(mob, 0); + extract_char(mob); +\end{verbatim} + +\subsection{ How do I fix the ``wizlock'' bug that lets lower immortals lock out higher immortals?} +Simple, insert this code into `\texttt{do\_wizlock()}' in `\texttt{act.wizard.c}': +\begin{verbatim} + if (value < 0 || value > LEVEL_IMPL) { + send_to_char("Invalid wizlock value.\n\r", ch); + return; + } + ++ /* Do not allow people to wizlock above their level. ++ * This bug came with Circle 2.20 source -- VampLestat ++ */ ++ if (value > GET_LEVEL(ch)) { ++ send_to_char("You may only wizlock below your level.\n\r", ch); ++ return; ++ } + restrict = value; +\end{verbatim} + +\subsection{ How do I fix the ``mudlog'' bug that lets people see me log in, even if I'm wizinvis?} +For all the mudlog calls for entering the game, quitting, and so forth, you must change +\begin{verbatim} + mudlog(MAX(LEVEL_IMMORT, ... +\end{verbatim} +to +\begin{verbatim} + mudlog(MAX(GET_LEVEL(i), ... +\end{verbatim} +where ``i'' is either ``ch'' or ``d-$>$character'' depending on the call. + +\section{CircleMUD 3.0 Questions} +\subsection{Are there any bugs in the current release?} +There are no bugs. Only features. Seriously though, if perchance you find a bug, please mail it (along with a possible fix) to \url{} the bugs database \url{} and the CircleMUD list. Once in the bug database, it will be routed to the correct person. Note that no confirmation is sent back automatically. You can view the status of the bug at the bugs database \url{}. + +\subsection{How do I access Online Creation?} +Online Creation is not yet part of the Circle beta release. When it does become part of the release, it'll be accessed through a command called olc. Update: OLC will probably be in a future release rather than 3.0. In the mean time, check out the CircleMUD FTP server +\url{}. + +\subsection{How does the new bitvector system work?} +The new bitvector system in CircleMUD 3.0 is an ascii based one. The old numeric values can still be used, but the new system should make sorting flags out substantially easier. The system uses an ``a'' as the value for 1, ``b'' for 2, ``c'' for 4, ``d'' for 8, etc. Once ``z'' is reached, the next letter in sequence is ``A''. Detailed information about how to use bitvectors with CircleMUD can be found in the CircleMUD Building Manual \url{}. + +\subsection{When will the production release of Circle 3.0 be?} +I don't know. Don't ask again. Same for the next patch level. If you must have bleeding edge stuff, check out the CVS snapshot \url{} if you do not want to set up an anonymous CVS account. Don't ask when the next CVS snapshot will be, we'll do it when we have some changes worth it. +\par +There is anonymous read-only access available for the CVS repository. You can access this from your own server (assuming that you also have CVS installed on your machine. To connect to the CircleMUD CVS repository, you need to issue the following commands at your shell prompt: +\begin{verbatim} + setenv CVSROOT :pserver:cvs@cambot.circlemud.org:/home/circledb/cvs + cvs login + (password = cvs) + cvs checkout circle +\end{verbatim} + +\subsection{If someone logs in and just sits at the password prompt, the MUD hangs (i.e., no one else can connect or do anything) until the person enters their password.} +Your system's POSIX non-blocking I/O might be broken. Look in the source file \texttt{sysdep.h} at the comment above the line that says ``\texttt{\#define POSIX\_NONBLOCK\_BROKEN}'' for a possible fix. Once this is done, recompile the mud and try again. If you use the \texttt{POSIX\_NONBLOCK\_BROKEN} constant and it fixes your problem, please send mail to the bugs database \url{} and let us know exactly what kind of system you are using and what you had to do to fix it. + +\subsection{Why does CircleMUD use BUF switches all through the code, what's happening here?} +From Jeremy: +\par +This code is the new output buffering system that I wrote for Circle in the early (non-released) beta versions of 3.0. The old DikuMud code for queueing output (which stayed with Circle until version 2.20) was memory- and time-inefficient in many cases (and, in my opinion, was inefficient for the normal behavior of most MUDs). +\par +First, I should explain what output queueing is and why it is necessary. On each pass through the \texttt{game\_loop()}, the MUD performs a number of steps: check to see if there are any new players connecting, kick out people with bad links, read input over the network for all players, then process the input for each player that has sent a complete line over the net. The processing step is usually where output is generated because it is where MUD commands are processed (e.g., ``kill'' might generate output of ``Kill who?'') When output is generated, it is not immediately sent out to the player, but instead queued for output in a buffer. After all players' commands are processed (and each command generates the appropriate output for various players), the next step of the \texttt{game\_loop()} is to send all the queued output out over the network. +\par +The new output system that Circle now uses allocates a small, fixed size buffer (1024 bytes) for each descriptor in which output can be queued. When output is generated (via such functions as \texttt{send\_to\_char()}, \texttt{act()}, etc.), it is written to the fixed size buffer until the buffer fills. When the buffer fills, we switch over to a larger (12K) buffer instead. A ``buffer switch'', therefore, is when the 1024-byte fixed buffer overflows. +\par +When a large (12K) buffer is needed, it is taken from a pool of 12K buffers that already been created. It is used for the duration of that pass through the \texttt{game\_loop()} and then returned to the pool immediately afterwards, when the output is sent to the descriptor. If a large buffer +is needed but none are in the pool, one is created (thereby increasing the size of the pool); the ``\texttt{buf\_largecount}'' variable records the current pool size. +\par +If a player has {\em already} gone from their small to large buffer, and so much output is generated that it fills even the large buffer, the descriptor is changed to the overflow state, meaning that all future output for the duration of the current pass through the game loop is discarded. This is a buffer overflow, and the only state in which output is lost. +\par +Now that I've described how the system works, I'll describe the rationale. The main purpose for the two-tiered buffer system is to save memory and reduce CPU usage. From a memory standpoint: Allocating a fixed 12K buffer for each socket is a simple scheme (and very easy to code), but on a large MUD, 100 12K buffers can add up to a lot of wasted memory. (1.2 megs of memory used for buffering on a 100-player MUD may not seem like very much, but keep in mind that one of Circle's big selling points several years ago, when memory was expensive, was that it had a very small memory footprint (3 or 4 megs total!) And from a CPU standpoint: the original DikuMud used a dynamically allocated buffer scheme to queue output, which unfortunately meant that for {\em each} player, on {\em each} pass through the game loop, dozens of tiny buffers (often one for every line of output, depending on the code to execute the command) were allocated with \texttt{malloc()}, {\em individually} written to the system using individual calls to \texttt{write()}, and then \texttt{free()}'d. My system saves hundreds or thousands of calls per second to \texttt{malloc()} and \texttt{free()}, and reduces the number of system calls {\bf drastically} (to at most one per player per pass through the game loop). +\par +The trick is to choose the size of the small and large buffers correctly in order to find the optimal behavior. I consider ``optimal'' to mean that 90\% of the time, most players stay within the limits of their small buffer (for example, when wandering through town or mindlessly killing some monster while watching damage messages go by). Hopefully, a large buffer switch is only necessary when a player executes a special command that generates an unusually large amount of output, such as ``who'', ``read board'', or ``where sword''. This critically depends on the fact that not everyone will be executing such a special large-output command at the same instant. +\par +For example, imagine you have 10 players on your MUD. They are all wandering around town, and every once in a while one of them types ``who'', or reads the board, meaning that they are seeing more than 1024 bytes of output at a time. On such a MUD, I would hope that there would only be a {\em single} 12K buffer allocated which gets passed around among all the 10 players as needed. Now, all players think they can queue up to 12K of output per command without getting truncated even though only one 12K buffer actually exists -- they are all sharing it. +\par +But - there's a problem with this. There are certain cases when {\em many} players have to see a lot of output at the same instant (i.e. on the {\em same} pass through the \texttt{game\_loop()}), all of them will need a large buffer at the same time and the pool will get very big. For example, if +an evil god types ``force all who''; or if the MUD lags for several seconds, then suddenly gets unlagged causing many commands to be processed at the same moment; or if 20 people are all trying to kill the same MOB and are all seeing 20 damage messages (more than 1024 bytes) on the same pass through the \texttt{game\_loop()}. +\par +Unfortunately, the current patchlevel of Circle has no way to destroy large buffers so such cases are pathological and cause wasted memory. Unfortunately since I don't run a MUD I can't actually tell how often this happens on a real MUD. (If there are any IMPs out there who run large MUDs (say, $>$= 30-50 players on regularly), and you've read this far, please send me the output of ``show stats'' after your MUD has been played for at least several hours.) +\par +Hopefully this clears up the way buffers work. + +\subsection{How do I add a new class? How do I add more levels?} +Adding a new class is fairly easy in 3.0, in fact, someone has taken the time to put together a fairly complete document on adding a class, in this case a Knight class. The \texttt{class.txt} is available on the FTP site \url{}. +\par +The same applies for levels, in the file \texttt{levels.bpl14.txt} \url{} which can be found in the same place. + +\subsection{Is there a complete ``coding.doc''?} +No. Look at the \texttt{README.NOW} in the docs directory. It isn't complete, nor does anyone have the entire thing. It is being worked upon. +\par +{\em RTFM} +\par +Further information on CircleMUD can be found in other documents in the docs directory, on the CircleMUD webpages \url{}, on the FTP server \url{}, and on the CircleMUD Mailing List (see section~\vref{mailinglist}). +\end{document} +\end Index: doc/sources/README =================================================================== RCS file: README diff -N README --- /dev/null Tue May 5 13:32:27 1998 +++ /tmp/cvs6w82iD Mon Apr 15 20:36:21 2002 @@ -0,0 +1,14 @@ +These files are the LaTeX source files for the CircleMUD Documentation +Project. + +Use them as you will, but if you find any errors, typos, or have suggestions +for improvement, please submit them to the CircleMUD Development Team at +either: + bugs@circlemud.org +or + furry@circlemud.org + +Please note that these are the first drafts, and changes will be forthcoming +with future Patch Levels. + +-Ae. Index: doc/sources/act.tex =================================================================== RCS file: act.tex diff -N act.tex --- /dev/null Tue May 5 13:32:27 1998 +++ /tmp/cvsXDiN8H Mon Apr 15 20:36:21 2002 @@ -0,0 +1,210 @@ +\documentclass[11pt]{article} +\usepackage{url} +\usepackage{times} +\usepackage{varioref} +\usepackage{multicol} +% Document typeset from the original document that was typeset by Jeremy Elson. +% This document typeset by Alex Fletcher on Dec 4/2001 + +\addtolength{\topmargin}{-.5in} % repairing LaTeX's huge margins... +\addtolength{\textheight}{1in} % more margin hacking +\addtolength{\textwidth}{1in} % and here... +\addtolength{\oddsidemargin}{-0.5in} +\addtolength{\evensidemargin}{-0.5in} +\setlength{\parskip}{\baselineskip} +\setlength{\parindent}{20pt} +\newenvironment{Ventry}[1] + {\begin{list}{}{\renewcommand{\makelabel}[1]{\textsf{##1:}\hfil} + \settowidth{\labelwidth}{\textsf{#1:}} + \setlength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + } + } + {\end{list}} + +\title{The \texttt{act()} Function} +\author{Alex Fletcher\\ +{\it Based on text from the DikuMud authors}} +\begin{document} + +\maketitle + +\begin{abstract} +This document is intended to give an overview of the \texttt{act()} function and give a summary of the various flags and the associated descriptive control characters. The \texttt{act()} function is one of the primary functions for sending a message from the game to a character or number of characters in a room. +\end{abstract} + +\tableofcontents + +\section{The \texttt{act()} Function} +\subsection{Overview}\label{overview} +The \texttt{act()} function is used to process and send strings of text to characters in a room. It can be used to send the same basic string to a number of characters filling in certain segments -- designated by control characters -- in different ways, dependant on what each character can see and who each character is. Once the text string passed to the function has been parsed, it is capitalized and a newline is added to its tail. + +\subsection{The Function}\label{function} +The \texttt{act()} function is found in the \texttt{comm.c} source file and is described as: +\begin{verbatim} + void act(const char *str, int hide_invisible, struct char_data *ch, + struct obj_data *obj, const void *vict_obj, int type) +\end{verbatim} +These pieces are used as follows: +\begin{Ventry}{hide\_invisible} +\item[str] This is the basic string, a null terminated character array, including control characters (see section~\vref{controlcharacters}~`Control Characters'), to be sent to characters designated by the targets. +\item[hide\_invisible] A \texttt{TRUE} or \texttt{FALSE} value indicating whether or not to hide the entire output from any characters that cannot see the ``performing character''. +\item[ch] The ``performing character''. This is the character that the output string is associated with. The character is used to determine the room for the output of the action in question. +\item[obj] An object (an actual item -- \texttt{obj\_data}) used in the course of the action. +\item[vict\_obj] This can be either a character involved in the action, another object, or even a predefined string of text. +\item[type] One of \texttt{TO\_VICT}, \texttt{TO\_CHAR}, \texttt{TO\_NOTVICT}, or \texttt{TO\_ROOM}. This indicates who it is to be targeted at. +\end{Ventry} + +\subsection{The Parameters}\label{parameters} +Of the various parameters passed to the \texttt{act()} function, the \texttt{str} is the most important, as it is the basis for the actual final output. If this parameter is a null-pointer or points to a null-character, then the function returns immediately. The next important parameter is the \texttt{ch} parameter. This, as mentioned, points to the central character associated with the output string and action. +\par +\texttt{obj} is an object of type \texttt{struct obj\_data~*} that is passed to the function. If there is no object to pass to the function, then a \texttt{NULL} or \texttt{0} should be passed in this location. +\par +The next parameter \texttt{vict\_obj} can be a number of things ranging from a game object (\texttt{strcut obj\_data~*}), through to a character (\texttt{struct char\_data~*}), and even a null terminated character array (\texttt{char~*}). +\par +Do note, however, that \texttt{obj} and \texttt{vict\_obj} are both ignored if there is no control character reference (see section~\vref{controlcharacters}~`Control Characters') to them and the \texttt{type} is set to \texttt{TO\_ROOM} or \texttt{TO\_CHAR}. In these cases, \texttt{NULL} should be supplied as the input to the function. +\par +The \texttt{hide\_invisible} flag dictates whether or not the action output should be hidden from characters that cannot see \texttt{ch}. If the flag is set to \texttt{TRUE} (non-zero), then this is the case. +\par +The \texttt{type} determines who the output is to be sent to. There are four options for this (all defined in \texttt{comm.h}) described below: +\begin{Ventry}{TO\_NOTVICT} +\item[TO\_ROOM] This sends the output to everybody in the room, except \texttt{ch}. +\item[TO\_VICT] This option sends the output to the character pointed to by \texttt{vict\_obj}. Obviously, in this case, \texttt{vict\_obj} must point at a character rather than an object. +\item[TO\_NOTVICT] In another case where \texttt{vict\_obj} must point to a character. This sends the output to everybody in the room except \texttt{ch} and \texttt{vict\_obj}. +\item[TO\_CHAR] Finally, this option sends the output to the \texttt{ch}. +\item[TO\_SLEEP] This is a special option that must be combined with one of the above options. It tells \texttt{act()} that the output is to be sent even to characters that are sleeping. It is combined with a bitwise `or'. For example, \texttt{TO\_VICT $|$ TO\_SLEEP}. +\end{Ventry} +When the string has been parsed, it is capitalized and a newline is added. + +\subsection{Control Characters}\label{controlcharacters} +In a manner similar to the \texttt{printf()} family of functions, \texttt{act()} uses control characters. However, instead of using the {\bf \%} symbol, \texttt{act()} uses the {\bf \$} character to indicate control characters. +\begin{description} +\item[\$n] Write name, short description, or ``{\it someone}'', for \texttt{ch}, depending on whether \texttt{ch} is a PC, a NPC, or an invisible PC/NPC. +\item[\$N] Like {\bf \$n}, except insert the text for \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must point to an object of type \texttt{struct char\_data~*}. +\item[\$m] ``{\it him},'' ``{\it her},'' or ``{\it it},'' depending on the gender of \texttt{ch}. +\item[\$M] Like {\bf \$m}, for \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{struct char\_data~*}. +\item[\$s] ``{\it his},'' ``{\it her},'' or ``{\it it},'' depending on the gender of \texttt{ch}. +\item[\$S] Like {\bf \$s}, for \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{struct char\_data~*}. +\item[\$e] ``{\it he},'' ``{\it she},'' ``{\it it},'' depending on the gender of \texttt{ch}. +\item[\$E] Like {\bf \$e}, for \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{struct char\_data~*}. +\item[\$o] Name or ``{\it something}'' for \texttt{obj}, depending on visibility. +\item[\$O] Like {\bf \$o}, for \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{struct obj\_data~*}. +\item[\$p] Short description or ``{\it something}'' for \texttt{obj}. +\item[\$P] Like {\bf \$p} for \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{struct obj\_data~*}. +\item[\$a] ``{\it an}'' or ``{\it a}'', depending on the first character of \texttt{obj}'s name. +\item[\$A] Like {\bf \$a}, for \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{struct obj\_data~*}. +\item[\$T] Prints the string pointed to by \texttt{vict\_obj}. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{char~*}. +\item[\$F] Processes the string pointed to by \texttt{vict\_obj} with the \texttt{fname()} function prior to printing. NOTE: \texttt{vict\_obj} must be a pointer of type \texttt{char~*}. +\item[\$u] Processes the buffer and uppercases the first letter of the previous word (the word immediately prior to the control code). If there is no previous word, no action is taken. + \item[\$U] Processes the buffer and uppercases the first letter of the following word (the word immediately after to the control code). If there is no following word, no action is taken. +\item[\$\$] Print the character `\$'. +\end{description} + +\subsection{Examples}\label{examples} +In all of the following examples, \texttt{ch} points to male character {\bf Ras}, \texttt{vict} always points to the female character {\bf Anna}. \texttt{obj1} is {\it a small sword}, and \texttt{obj2} is {\it a small sack}. + +\begin{verbatim} + act("$n smiles happily.", TRUE, ch, NULL, NULL, TO_ROOM); +\end{verbatim} +This is sent to the room that {\bf Ras} is currently in, and the string that they see if they can see him is: +\begin{quote} +{\em Ras smiles happily.} +\end{quote} +If a character cannot see Ras, then they will not see the action at all. + +\begin{verbatim} + act("You kiss $M.", FALSE, ch, NULL, vict, TO_CHAR); +\end{verbatim} +In this action, {\bf Ras} is kissing {\bf Anna}, and Ras will see: +\begin{quote} +{\em You kiss her.} +\end{quote} + +\begin{verbatim} + act("$n gives $p to $N.", TRUE, ch, obj1, vict, TO_NOTVICT); +\end{verbatim} +The output from this string is sent to everyone in the room except for {\bf Ras} and {\bf Anna}. Of course, if they cannot see Ras, then they will not see any output at all. The string that each character in the room will see is: +\begin{quote} +{\em Ras gives a small sword to Anna.} +\end{quote} +If a character cannot see Anna, then {\it someone} will be used in place of her name, and if they cannot see the small sword, then {\it something} will be used in its place. + +\begin{verbatim} + act("$n gives you $p.", FALSE, ch, obj1, vict, TO_VICT); +\end{verbatim} +Similar to the prior example, this is the output for {\bf Anna}. She will see this even if she cannot see {\bf Ras}, and the output that she will get is: +\begin{quote} +{\em Ras gives you a small sword.} +\end{quote} +Just as per the last example, if she cannot see Ras, {\it someone} will be used in place of his name, and if she cannot see the sword, then {\it something} will be used in its place. + +\begin{verbatim} + act("$n puts $p in $s $O.", TRUE, ch, obj1, obj2, TO_ROOM); +\end{verbatim} +This action uses two objects rather than two characters, and is displayed to the entire room (with the exception of {\bf Ras} of course). If the character can see Ras, they will see: +\begin{quote} +{\em Ras puts a small sword in his small sack.} +\end{quote} +Otherwise, they will see nothing. Again, as per the prior two examples, {\it something} will be used in place of any objects that the viewing character cannot see. + +\begin{verbatim} + act("The $F opens quietly.", FALSE, ch, NULL, EXIT(ch, door)->keyword, TO_ROOM); +\end{verbatim} +If the keywords for the door were {\it gate wooden}, then this would send the output string of: +\begin{quote} +{\em The gate opens quietly.} +\end{quote} +to all of the characters in the room with the exception of Ras. +\par +In addition to these examples, a multitude of other examples can be found scattered throughout the CircleMUD source code. +\appendix +% +% The following is a reiteration of some of the above sections into a one-page, two column +% quick reference sheet. +% +\newpage +\pagestyle{empty} +\setlength{\topskip}{0cm} +\setlength{\footskip}{0cm} +\section{\texttt{act()} Reference Sheet} +\begin{verbatim} + void act(const char *str, int hide_invisible, struct char_data *ch, + struct obj_data *obj, const void *vict_obj, int type) +\end{verbatim} +\begin{Ventry}{hide\_invisible} +\item[str] String to be parsed. +\item[hide\_invisible] If \texttt{TRUE}, hide from characters that cannot see the ``performer''. +\item[ch] The ``performer''. Also determines the room for the output. +\item[obj] \texttt{struct obj\_data~*} +\item[vict\_obj] Predefined string of text, or second character or object. +\item[type] \texttt{TO\_VICT}, \texttt{TO\_CHAR}, \texttt{TO\_NOTVICT}, or \texttt{TO\_ROOM}. +\end{Ventry} + \vspace*{0.5cm} +\renewcommand{\columnseprule}{0.5pt} +\begin{multicols}{2} +\begin{description} +\item[\$a] ``{\it an}'' or ``{\it a}'', depending on the first character of \texttt{obj}'s name. +\item[\$A] Like {\bf \$a}, for \texttt{vict\_obj} which is of type \texttt{struct obj\_data~*}. +\item[\$e] ``{\it he},'' ``{\it she},'' ``{\it it},'' depending on the gender of \texttt{ch}. +\item[\$E] Like {\bf \$e}, for \texttt{vict\_obj} which is of type \texttt{struct char\_data~*}. +\item[\$F] Processes the string pointed to by \texttt{vict\_obj} (pointer of type \texttt{char~*}) with the \texttt{fname()} function prior to printing. +\item[\$n] Write name, short description, or ``{\it someone}'', for \texttt{ch}, depending on whether \texttt{ch} is a PC, a NPC, or an invisible PC/NPC. +\item[\$N] Like {\bf \$n}, except insert the text for \texttt{vict\_obj} which is of type \texttt{struct char\_data~*}. +\item[\$m] ``{\it him},'' ``{\it her},'' or ``{\it it},'' depending on the gender of \texttt{ch}. +\item[\$M] Like {\bf \$m}, for \texttt{vict\_obj} which is of type \texttt{struct char\_data~*}. +\item[\$o] Name or ``{\it something}'' for \texttt{obj}, depending on visibility. +\item[\$O] Like {\bf \$o}, for \texttt{vict\_obj} which is of type \texttt{struct obj\_data~*}. +\item[\$p] Short description or ``{\it something}'' for \texttt{obj}. +\item[\$P] Like {\bf \$p} for \texttt{vict\_obj} which is of type \texttt{struct obj\_data~*}. +\item[\$s] ``{\it his},'' ``{\it her},'' or ``{\it it},'' depending on the gender of \texttt{ch}. +\item[\$S] Like {\bf \$s}, for \texttt{vict\_obj} which is of type \texttt{struct char\_data~*}. +\item[\$T] Prints the string pointed to by \texttt{vict\_obj} which is of type \texttt{char~*}. +\item[\$u] Processes the buffer and uppercases the first letter of the previous word (the word immediately prior to the control code). + \item[\$U] Processes the buffer and uppercases the first letter of the following word (the word immediately after to the control code). +\item[\$\$] Print the character `\$'. +\end{description} + + +\end{multicols} +\end{document} +\end Index: doc/sources/admin.tex =================================================================== RCS file: admin.tex diff -N admin.tex --- /dev/null Tue May 5 13:32:27 1998 +++ /tmp/cvsIhn7QO Mon Apr 15 20:36:21 2002 @@ -0,0 +1,261 @@ +\documentclass[11pt]{article} +\usepackage{url} +% Document typeset from the original document that was typeset by Jeremy Elson. +% This document typeset by Alex Fletcher on Dec 5/2001 + +\addtolength{\topmargin}{-.5in} % repairing LaTeX's huge margins... +\addtolength{\textheight}{1in} % more margin hacking +\addtolength{\textwidth}{1in} % and here... +\addtolength{\oddsidemargin}{-0.5in} +\addtolength{\evensidemargin}{-0.5in} +\setlength{\parskip}{\baselineskip} +\setlength{\parindent}{20pt} + +\title{The CircleMUD Administrator's Manual} +\author{Jeremy Elson\\ +$<$jelson@circlemud.org$>$} +\begin{document} + +\maketitle + +\begin{abstract} +This document describes how to configure CircleMUD and how to compile it for the first time. It also discusses how to run the server including documentation of command-line options, a description of system logs and how to use them, and a description of daily and long-term maintenance required by the MUD. The intended audience is implementors new to CircleMUD or MUD administration in general. +\par +More information about CircleMUD, including up-to-date versions of this documentation in ASCII and Postscript, can be found at the CircleMUD Home Page \url{} or FTP site \url{}. +\end{abstract} + +\tableofcontents + +\section{Welcome to CircleMUD!} + +\subsection{Background and Introduction} +CircleMUD is a derivative of DikuMud, the Multi-User Dungeon developed at DIKU, the Department of Computer Science at the University of Copenhagen. The original CircleMUD, version 1.0, was run by Jeremy Elson at the Johns Hopkins University's Department of Computer Science with moderate popularity from January until September of 1992. The version 1.0 code, which was never released to the public, was archived and remained inactive for several months after the death of the original CircleMUD. In the summer of 1993, it was taken out of storage and cleaned up with the intention of making it a public code base that anyone could freely download and use to start a MUD. Version 2.0, the first publically available version, was released in June of 1993. Circle has been maintained as a public code base ever since then, although we do not actually run a MUD of our own. The original CircleMUD has not run since it went down in 1992, nor will it ever run again. +\par +Hundreds of carefully spent hours have gone into the development of Circle, but it is not a finished product -- it is only a beginning. It has only a small number of spells and skills, a small world with relatively few areas, and only the 4 original DikuMud classes. From a gamer's point of view, it pales in comparison to other MUDs which have dozens of spells spread over a dozen classes, a rich palette of skills, and thousands upon thousands rooms, mobiles, and objects. +\par +Yet from a programmer's point of view, Circle is very highly developed. While the look and feel of the original DikuMud has been maintained, most of the underlying code and many of the structures have been optimized, reworked, or completely redesigned to be efficient, compact, and easily changeable and extensible. Dozens of features which have become standard in the MUDding world over the past few years, although they were not part of the original DikuMud release, were added to Circle as well. +\par +The result is that CircleMUD is a launching pad for your own MUD ideas. Our hope in releasing it is that it will free potential MUD implementors from having to worry about dealing with bug-ridden code or wasting time reinventing the wheel by re-coding standard MUD features, allowing them to devote more effort towards creatively shaping Circle into their own unique vision of how a MUD should look and feel. The reason why Circle has so few specialized spells, skills, classes, and races is to encourage implementors just like you to create your own unique system instead of just another stock MUD that everyone has seen before. +\par +So, it is with this message that we inflict our code on the world: don't just put another generic MUD on the Net -- give us something new and exciting, and have as much fun as possible in the process! + +\subsection{Are you a Player or an Administrator?} +If you're playing a game like Zork or Doom, you're both the administrator and the player of the game: you're the one who has to download the software and get it running, and you're also the one who gets to play. MUDding isn't that way at all, because there's usually a very strong division between people who play MUDs and people who administer MUDs. If you've never played a MUD before, jumping right in and trying to run one of your own will probably just get you hopelessly confused. Instead of trying to compile and run the CircleMUD package yourself (which is presumably what you're trying to do if you're reading this document), you should play someone else's copy of CircleMUD. There is a partial list of sites \url{} using CircleMUD on the CircleMUD web server. + +\subsection{So, you're sure you want to run your own MUD?} +If you're already an old hand at playing MUDs and you've decided you want to start one of your own, here is our advice: take a vailum, lie down, and hide in a dark closet until the desire goes away. Just playing MUDs is masochistic enough, isn't it? Or are you trying to shave that extra point off your GPA, jump down that one last notch on your next job evaluation, or get rid of that pesky Significant Other for good? If you think silly distractions like having friends and seeing daylight are preventing you from realizing your full potential in the MUD world, being a MUD Administrator is the job for you. +\par +Don't get me wrong: running a production MUD can be great fun. It can also be overburdened by politics and plagued by spiteful players devoted to making your life difficult, and otherwise be a highly frustrating endeavour. That's why I don't do it any more. + +\subsection{Giving Credit Where Credit is Due} +If I haven't scared you away yet, and you're still sure you want to use CircleMUD, please stop for a moment and look at the CircleMUD license in the file \texttt{license.doc}. It outlines the terms under which you must use CircleMUD. +\par +The license is simple. It boils down to the message, ``Don't rip off other people's work.'' Unfortunately, this simple message ended up becoming somewhat long-winded because I am trying to prevent people from abusing DikuMud in the future as they have in the past. +\par +Also, out of courtesy if nothing else, please keep the \texttt{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. How would {\em you} feel if someone took {\em your} code and then took credit for it? +\par +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. + +\section{Getting Started} + +\subsection{Section Requirements} +CircleMUD 3.0 was originally written as UNIX software and will automatically configure itself (using GNU autoconf) and compile under most versions of UNIX, both BSD and System V derivatives. With minor adjustments (documented below), the same source should compile under Microsoft Windows 95 and NT, IBM OS/2, and the Amiga. Users have also reported getting Circle to compile and run under MkLinux, the port of Linux to the Power Macintosh. CircleMUD will {\em not} work under DOS, Windows 3.x, Windows for Workgroups 3.x, or Mac System 7. +\par +Specifically, the following variants of UNIX have been tested and are known to work with Circle: +\begin{itemize} +\item SunOS 4.1.4 +\item Solaris 2.3 and above +\item Irix 5.2, 6.2 +\item AIX 3.2 +\item Ultrix 4.x +\item HP-UX 9.x +\item Linux 1.x, 2.x +\item BSD/OS 2.1 +\item Mac OS X (10.0 and above) +\end{itemize} +If your system is not listed, don't despair; because of the \texttt{autoconf} program, Circle will compile under most versions of UNIX on its own. A large effort was made to make Circle v3.0 more portable by converting many of its system calls over to POSIX compliance. Converting Circle to POSIX vastly helps portability on modern operating systems, most of which are POSIX-compliant. Unfortunately, on some older systems that are not (such as NextSTEP 2.x), it may be more difficult to compile 3.0 than it was to compile earlier versions of the code. (POSIX stands for Portable Operating System Interface for UNIX and is an effort to standardize the way UNIX programs talk to the operating system. For more information, see Stevens' excellent book, {\em Advanced Programming in the UNIX Environment}.) +\par +For a small, private MUD, or a MUD used only for testing and development, about 10 MB of disk space and 16 MB of memory should be sufficient. For large, public MUDs with a large player base, 30 to 50MB of disk space and at least 32 MB of memory are recommended. Free memory is much more important than CPU speed; CircleMUD uses virtually no CPU time. +\par +Historically, CircleMUD has always been developed under different variants of UNIX. The original CircleMUD was run on a DECstation 3100 running Ultrix 4.0, which remained Circle's development platform until v2.0. Starting with v2.0, Circle was developed under various versions of Linux and Solaris over the years ranging from Linux 0.99.11 through the current Linux 2.2.x and including Solaris x86 5.6. + +\subsection{Downloading and Unpacking the Source} +The first step in setting up CircleMUD is to make sure you have the most recent version of the source; if you downloaded CircleMUD from an unofficial mirror site, it could be out of date. You can always find the most recent version of the source at CircleMUD's official FTP site \url{} +\par +The archive is offered several formats: one which ends in \texttt{.tar.gz}, one which ends in \texttt{.zip} and one which ends in \texttt{.lha}. The files have the same contents but have been compressed using different programs. You should ensure that you get a copy that you can unpack on your operating system. +\par +Next, unpack the archive. If you have the \texttt{.tar.gz} version, unpack it using \texttt{gzip} (GNU unzip) and the \texttt{tar} archiver. If you don't already have them, both of these utilities can be downloaded from the GNU FTP site \url{}. To unpack the archive on a UNIX system, type: +\begin{verbatim} + gzip -dc circle30xxx.tar.gz | tar xvf - +\end{verbatim} +\par +If you downloaded the \texttt{.zip} or \texttt{.lha} 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 {\em not} do either of these things by default.) The best unzip program is probably Info-Zip's unzip program \url{}; it is compatible with all UNIX variants, Windows, OS/2, the Amiga, and pretty much every other computer on the planet. If you have Windows 95/98 or NT, another good choice is WinZip \url{}. +\par +For the next few sections, please note that the Cygnus Tools (Cygwin) are available for the Windows platform, which allow users to use Unix tools on that operating system. + +\subsection{Configuring CircleMUD} +{\bf Note: This section applies {\em only} to UNIX users. If you're using Windows, OS/2, or the Amiga, read \texttt{README.WIN}, \texttt{README.OS2} or \texttt{README.AMIGA} instead.} +\par +Circle must be configured using the \texttt{configure} program which attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create Makefiles and a header file called \texttt{conf.h}. +\par +From Circle's root directory, simply type +\begin{verbatim} + ./configure +\end{verbatim} +If you're using \texttt{csh}, it may not execute ``configure'' properly, giving you an error message like ``\texttt{Permission denied}''. If this occurs, try ``\texttt{sh ./configure}'' instead. +\par +\texttt{configure} can take several minutes to run if you're using a slow computer. It will print out various status messages while it works, telling you what characteristics of your computer it has found. It should create two Makefiles (\texttt{src/Makefile} and \texttt{src/util/Makefile}) and one header file (\texttt{src/conf.h}). +\par +You should only need to run \texttt{configure} once -- right after you unpack CircleMUD from its archive. You will probably compile the source dozens of times as you add new features, but \texttt{configure} only needs to be run before the first time you compile. Please note that there is one exception to this rule: if you move your MUD to a different computer, you must run \texttt{configure} again before you can recompile the source code. To rerun configure after moving the source, make sure to delete the file called \texttt{config.cache} and then run \texttt{configure} again. + +\subsection{Compiling CircleMUD} +{\bf Note: This section applies {\em only} to UNIX or Cygwin users. If you're using Windows, OS/2, or the Amiga, read \texttt{README.WIN}, \texttt{README.OS2}, or \texttt{README.AMIGA} instead.} +\par +The \texttt{src} directory contains the source code for the main MUD server; \texttt{src/util} has the source for a dozen or so MUD maintenance utilities. There are two Makefiles, one in each source directory, but all compiling is normally performed from the \texttt{src} directory only. To compile the only CircleMUD server itself, type ``\texttt{make}''. Use ``\texttt{make utils}'' to compile the utilities, or ``\texttt{make all}'' to compile both the server and the utilities. It is also possible to compile individual utilities from the \texttt{src/util} directory: from \texttt{src/util}, type ``\texttt{make [utility-name]}''. All compiled binaries go to the \texttt{bin} directory. +\par +The stock (unmodified) CircleMUD code should compile with no warnings or errors. +\par +Despite my best efforts there's a chance that you'll have problems compiling Circle if you're using some version of UNIX that I've never seen before. It's impossible to give general advice on how to port software, except to say that you should ask a friend who knows a lot about both UNIX and C to help you. Also, if you have problems, you should definitely look at the CircleMUD FAQ (Frequently Asked Questions list with Answers), which you'll find in Circle's home directory. +\par +If you do port Circle to some other platform successfully, please share your hard work with others by sending a description of what you had to do to get Circle to compile on your system to \url{}. Be sure to include the specific name of your operating system and hardware. Full details on porting to a new system can be found in the Porting CircleMUD document. +\par +The Makefile directs all compiled programs to the \texttt{/bin} directory. Although not recommended, you may want to put Circle's \texttt{/bin} directory in your \$PATH. The reason that this is not recommended is that most of the resources are referenced using relative paths, and thus require that you run the programs from the base CircleMUD directory. + +\section{Running CircleMUD} +{\bf Note: This section applies {\em only} to UNIX or Cygwin users. If you're using Windows, OS/2, or the Amiga, read \texttt{README.WIN}, \texttt{README.OS2}, or \texttt{README.AMIGA} instead.} + +\subsection{Execution and \texttt{autorun}} +\begin{enumerate} +\item type 'autorun \&' +\item Wait a few moments for the server to boot. +\item type: \texttt{telnet localhost 4000} +\end{enumerate} +\par +Circle should always be run from circle's ``root'' directory, not the \texttt{/bin} directory. You can run it manually by typing \texttt{bin/circle} (useful for testing and debugging). For running the game ``for real,'' it is better to use the \texttt{autorun} shell script provided in Circle's root directory. +\par +Autorun lets Circle run itself for long periods of time. It continuously runs the game as well as removing old system logs, moving newer system logs to the \texttt{log} directory, and saving certain log entries to permanent files. +\par +Autorun can be controlled by creating files with certain names. You can use the '\texttt{touch}' command to create a file, and, of course, the '\texttt{rm}' command to remove a file. If a file called '\texttt{.fastboot}' exists, the CircleMUD will reboot immediately if it crashes or is shut down instead of waiting 40 seconds as it normally does. A file called '\texttt{.killscript}' will cause the script to terminate itself; i.e.\ if you want to bring the game down. If you want to temporarily prevent the MUD from rebooting, create a file called ``\texttt{pause}''; the script will go into a wait loop until '\texttt{pause}' is removed. +\par +Although you can create these files manually, the{\bf shutdown} command from within the MUD has several options which will create these files for you. See the {\bf shutdown} help entry in \texttt{wizhelp.doc} for more information. + +\subsection{Command-Line Options} +Circle recognizes a number of command-line options. You can use them by actually specifying them on the command-line when running Circle manually or, by adding them to the \texttt{FLAGS} variable in your autorun script to use the options automatically every time you run the MUD with autorun.\newline +\newline +The syntax is: +\begin{verbatim} + circle [-m] [-q] [-r] [-s] [-d ] [port] +\end{verbatim} +\begin{description} +\item[-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 which are not world-related (i.e, new commands or spells).\newline +CircleMUD uses split world files (in the lib/world hierarchy); each directory (i.e.\ wld, obj, mob, shp, and zon) has a file called "\texttt{index}" which specifies which files should be loaded at boot-time. The file "\texttt{index.mini}" specifies which parts of the world should be loaded with the -m option. +\item[-q] Quick Boot. Prevents checking of timed 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 space, use the -q option. -q is automatically activated when you use -m. +\item[-r] Restricted Game. Allows you to decide at run-time whether or not the game will allow new characters to be created. Using -r is equivalent to typing "\texttt{wizlock 1}" (see \texttt{wizhelp.doc} for more information). +\item[-s] Special Routines Disabled. Allows you to suppress the assigning and calling of all mobile, object, and world special procedures. Historically used as a debugging tool in conjunction with the -d option (see below), but now obsolete because Circle checks to make sure entities exist before attempting to assign a special procedure to them. +\item[-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. For example, you may wish to make a copy of the entire world in a separate directory, so that you can test additions to the world files without subjecting players to unnecessary hazards. The default data directory is '\texttt{lib}'. Any core dumps (may they never happen to you!) will take place in the selected data directory. +\item[port] Port Selection. Allows you to choose on which port the game is to listen for connections. The default port is 4000, which is historically the port used by most DikuMuds. You can change the default in \texttt{config.c} and the \texttt{PORT=} line of the autorun script. (The \texttt{PORT=} line of \texttt{config.c} simply passes the value as a command-line parameter to Circle.) The port specified on the command line or by the autorun script will take precedence over the port specified in \texttt{config.c}. +\end{description} + +\subsection{Creating an Implementor Character} +The first character to log in to the MUD will be made the maximum (Implementor) level. If you log in and aren't made an implementor, then the playerfile probably is not empty -- take the MUD down, delete the playerfile (\texttt{lib/etc/players}), and start the MUD again. You should fix your stats using the RESTORE command when you first create the character (i.e.\ type "\texttt{RESTORE $<$your-name$>$}". +\par +Once you are logged in as an implementor, type WIZHELP for a list of privileged commands. Documentation of those commands is contained in the file \texttt{wizhelp.doc}. \texttt{wizhelp.doc} is in the standard help file format, so you can simply add it to the help index file if you want online help available for wizard commands. (\texttt{wizhelp.doc} is not contained in the online help by +default as a security precaution.) +\par +To create additional wizard characters, log them in normally as level 1. Then, advance them using your implementor character, using the \texttt{ADVANCE} command. See \texttt{wizhelp.doc} for more information. + +\section{Customizing CircleMUD} +Once you get over the initial euphoria of having your own MUD compile and run successfully for the first time, you should be aware of some of the files which control how Circle looks and feels so that you can configure it for your personal taste. + +\subsection{\texttt{config.c}} +The most useful file for configuration is the config.c source file. It has dozens of options useful for customizing your MUD. Before you open your MUD to players, you should carefully read through config.c from beginning to end, checking what options are available as well as making sure they're all set the way you want them. Remember, you have to recompile and rerun the MUD before any changes you make to \texttt{config.c} take effect, of course. + +\subsection{Text Files} +The place where most of your day-to-day changes will be is in the \texttt{lib/text} directory, which contains all of the text files read by players. The most visible file is ``\texttt{motd}'', (Message Of The Day), which is the message that mortals seen (though not necessarily read!) when they log in. Similarly, the ``\texttt{imotd}'' (Immortal MOTD) is seen by immortals when they log in. Other interesting files are ``\texttt{news}'' (for the \texttt{NEWS} command), ``\texttt{help}'' (for the \texttt{HELP} command with no arguments), ``\texttt{help\_table}'' (for \texttt{HELP} with an argument), and others. +\par +One file is particularly important: ``\texttt{policy}''. Despite what anyone tells you, and your best efforts to the contrary, your MUD will have political problems. If anyone tells you that you can run a MUD without politics, they're wrong. If you tell your players that you're going to run a revolutionary MUD that doesn't have any politics, you're lying. Every MUD has political problems sooner or later. Unfortunately, this usually occurs ``sooner''. There are various ways to make political problems easier to handle, but the best way is to decide on some ground rules from the very beginning, and then set those decisions down in writing. That's what the ``\texttt{policy}'' file is for. You probably know what kind of political problems MUDs have (you are not trying to run a MUD without ever having played one, are you!?) -- stuff like playerkilling, thieving, kill stealing, client use, multi-char playing, reimbursements, etc. Decide on your policies early and make sure your characters know what those policies are. +\par +It is also important to write down a set of rules dictating what immortals are allowed to do and not allowed to do. That's what the ``\texttt{handbook}'' (Immortal Handbook) is for. Immortals will always try to bend you as far as they can, so it's important for you to decide on answers to questions before those questions come up. Can immortals assist players? What about giving a single 'cure light' for a player about to die? Can immortals kill mobiles for their own enjoyment? Can they kill players for the same reason? Are they allowed to make policy? Break policy? Moderate disputes? Turn over each others' decisions? + +\subsection{World Files} +The root of the area hierarchy is \texttt{lib/world/}. \texttt{lib/world/} has 5 subdirectories: wld, mob, obj, shp, and zon, which is where the world, mobile, object, shop, and zone files go, respectively. Each directory has a set of world files in it with the appropriate extension (i.e.\ the obj subdir will have a bunch of files ending with ``\texttt{.obj}'', such as 30.obj, 31.obj, etc.) plus two special files called ``\texttt{index}'' and ``\texttt{index.mini}''. ``\texttt{index}'' is a list of which world files are to be loaded by Circle. This makes the job of adding new areas easier -- just add the new area files to +your area directory, and then add the name of the new file to ``\texttt{index}''. ``\texttt{index.mini}'' controls which (smaller) set of world files should be loaded in the debugging mode (Mini-Mud Mode, explained below.) + +\section{System Logs} +CircleMUD writes a wide variety of information to standard output and standard error. If you're using the autorun script, the boot messages are put into a file called ``\texttt{syslog}''. During Circle's boot sequence, the system log keeps a record of everything the MUD is doing to initialize itself; this can be useful to determine what the problem is if the MUD dies while it is booting. Once the game is up and running, the syslog contains player information, recording when players connect, disconnect, rent, unrent, quit, die, hit death traps, etc. The game also records status information about itself, falling generally into two categories: usage information and errors. + +\subsection{Player Information} +The player information recorded by Circle's system logs will serve you very well as your players start to make wild claims about strange bugs resulting in them losing equipment or points. Many mudders prey on the insecurities of a new mud administrator who is terrified that his or her MUD is riddled with bugs and will do anything to satisfy grumpy players -- don't let yourself fall into that trap! CircleMUD is bound to contain bugs, but most of the core systems have been well tested, so you should take claims such as ``I magically lost all my stuff!'' with a grain of salt and check your system logs. +\par +If a player ever asks you for reimbursement of equipment, money, gold, experience points (XP), or whatever, your gut reaction should always be to check the logs first. + +\begin{quote} +As a sidebar, let me point out that the value of system logs is twofold: 1) they actually provide you with valuable information, and 2) they make your players paranoid. When I first started mudding and I heard about this mysterious ``system log'', it made me incredibly paranoid. Now that I've done a good deal of MUD administration, I've seen the same paranoia in \underline{many} other players. +\par +That paranoia is a very good thing. The system logs become an abstract and shapeless but omnipresent force on the MUD. Players hear about ``the System Log'' and then get paranoid that everything they do is being recorded, so they tend to behave, lest the evil System Log betray their wrongdoings to the Gods. +\par +For this reason, when you go to check your logs, it's a good idea to say something like ``Hold on... let me go check the system logs, OK?'' because it reinforces the syslog's presence in the collective +psyche of your players. +\end{quote} + +Back to the point. When someone claims that they've been wronged by the evil system, always check the logs. The logs give you power to say things like ``What do you mean your items disappeared in rent? It says right here in the logs `Rasmussen has quit the game.' You did not rent at all, you just {\em quit}!'' +\par +To diffuse disputes such as, ``The game dumped my stuff, but I had enough money!!'' or ``I logged in and my stuff was gone, there must be a bug!!'', two types of log entries are written. First, every time a character rents, the log records the character's per diem rent rate as well as the total amount of money on hand and in the bank. Second, the log records makes a record of all characters' equipment dumped due to insufficient funds. +\par +Remember, rent is specified as a daily rate but is amortized on a per-second basis! In other words, if you rent at the rate of 100 coins per day and come back 36 hours later, you'll be charged 150 coins. +\par +The \texttt{autorun} script saves 6 levels of raw system logs. In addition, it greps the logs for certain pieces of extra-juicy information to save indefinitely. +\par +The system logs are your friends. Love them. + +\subsection{Usage Information} +Every 5 minutes, the game counts how many people are playing and records that information in the system log. Optionally, if you define RUSAGE in \texttt{comm.c}, it will also record system resource information such as CPU time and memory used. The usage information currently logged by Circle is, as you can see, somewhat sparse; local MUD admins are encouraged to add +to this code as is appropriate for their particular site. +\par +Usage information isn't critical, but it is interesting to look at the usage patterns to determine when your peak playing hours are. If you're good at using `cut' and other Unix utilities, you can even dazzle your friends by graphing your MUD's system usage. +\par +{\it Note: friends not included with the CircleMUD distribution.} + +\subsection{Errors} +Just as your first gut instinct should be to look at the logs if a player starts begging you for something, your first gut instinct in the event of a crash or unexpected shutdown should also be to look at the system logs. +\par +A Unix utility called `\texttt{tail}' is used to look at the last few lines of a text file; it is very useful for looking at the last entries in the system log to see the last thing that happened before the shutdown. Often, Circle will report an error in the logs just before it crashes. This method is +particularly useful if the MUD crashes during its boot sequence, because the logging during boot is intensive. +\par +If Circle shuts down unexpectedly and there is no core dump in the \texttt{/lib} directory, the game probably detected an internal error and killed itself. Such shutdowns are always preceded by entries in the system log describing the error. +\par +If there is no error message at the end of the log, then there probably IS a core dump, so you can use `\texttt{dbx}', `\texttt{gdb}', etc. to examine the core dump and determine the reason for the crash. The file \texttt{hacker.doc}, generously provided by Furey of MERC Industries, offers useful insight into the art and science of debugging -- you'd be well advised to give it a look-see. +\par +Circle sometimes encounters a serious but non-fatal error; in this case, the error will be written to the system log with the prefix SYSERR, but the MUD will not shut itself down. You should always be aware of any SYSERRs which occur -- they are often useful for foreseeing imminent danger or averting problems before they become critical. If a SYSERR does occur, try to determine if a change you've made recently has caused it. Ignoring SYSERRs is like ignoring compiler warnings: you can be tempted to ignore them because the game keeps going even if they exist, but you can easily get yourself into trouble by not listening. The autorun script saves all SYSERRs to the file \texttt{log/errors}. + +\section{MUD Maintenance} +\subsection{Technical Maintenance} +Once you get the MUD up and running, you will surely want to modify it -- adding new areas, new features, new code, and new ideas, however these topics are beyond the scope of this document. See \texttt{coding.doc}, \texttt{areas.doc}, and other creation documents for more information about how to customize your MUD once you get it up and running. This section simply focuses on some of the simple maintenance that'll be necessary to keep your MUD running smoothly. Make sure not to get so caught up in being a God that you forgot you're also supposed to be acting as a software engineer! +\par +First, you should look at the log/errors file regularly to make sure there are no recurring problems, particularly problems that may have been caused by code you've added. If the MUD crashes, it will usually generate what is called a ``core dump'' -- a big file called ``\texttt{core}'' in your lib directory, created by the operating system to record the state the game was in the moment before it crashed. You should look at the core dump using a debugger such as ``\texttt{gdb}'' or ``\texttt{dbx}'' to determine why the MUD crashed. See the file ``\texttt{hacker.doc}'' for more information about debugging. +\par +You probably will want to clean out the playerfile on a regular basis to remove deadweight characters (i.e.\ people who log in and look around for 10 minutes, and then never come back). You can decide how often to purge the playerfile -- every day if disk space is tight, or every month if it isn't. The \texttt{purgeplay} utility program included in the \texttt{src/util} directory removes deadweight players. Make sure to run the ``\texttt{purgeobjs}'' script (in the \texttt{lib/plrobjs} directory) after you purge the playerfile. \texttt{purgeobjs} removes the object files of players who no longer exist in the playerfile. +\par +The '\texttt{automaint}' script in the main circle directory will automatically purge the playerfile and player objects for you. {\em DO NOT RUN THIS SCRIPT WHILE THE MUD IS RUNNING!} Doing so will make your life (more) difficult. + +\subsection{Diplomatic Maintenance} +Okay, so now you have your wonderful CircleMUD up and running smoothly and all is right with the world. Right? +\par +Wrong. +\par +Well, technically, right. Circle requires very little day-to-day attention in order to keep the program itself running smoothly. But the MUD itself is just a series of instructions running on a computer, processing data. Never lose sight of the fact that there will be dozens, hundreds, or maybe even thousands of people connecting to your MUD -- and they are not programs. They are people! +\par +From the technical side, there are relatively few things you have to do to keep the game running. But you cannot just dump a MUD on the Internet and then ignore it! Spend time on your MUD. Try to keep up with the boards, and make an effort to respond to the complaints, ideas, and +suggestions posted there. Take a look at the `\texttt{bug}', `\texttt{typo}', and `\texttt{idea}' files from time to time -- and maybe even respond to some of the ideas using Mudmail. Try to respond to Mudmail you receive from players in a timely manner. Make sure that your `\texttt{news}', `\texttt{policy}' and other text files are up-to-date and suit the political climate on your MUD. +\par +If you cannot or just do not want to deal with the player politics, make sure that you choose someone who can and will, and make them responsible for dealing with it. If no one does it, your MUD will stagnate and die. + +\section{Final Thoughts} +Try to remember that running a MUD should be fun. It can sometimes be easy to lose sight of the ultimate goal of personal enjoyment that MUDs are supposed to provide, particularly when MUDs start to get crushed under the weight of their own politics or the egos of the administrators. If you find that your MUD is more of a source of frustration than enjoyment, don't be afraid to close it. +\par +Good luck with your MUD! Always feel free to write to us and let us know what you think of the MUD, and the interesting things you've done with it. We cannot promise a timely response, but we love hearing from people who are using our code. +\par +For further information and updates, you can be certain to check out the CircleMUD homepages \url{}, the associated pages of Ceramic Mouse \url{}, and the CircleMUD Mailing List \url{}. + +\end{document} +\end Index: doc/sources/building.tex =================================================================== RCS file: building.tex diff -N building.tex --- /dev/null Tue May 5 13:32:27 1998 +++ /tmp/cvsZjsvaX Mon Apr 15 20:36:21 2002 @@ -0,0 +1,1403 @@ +\documentclass[11pt]{article} +\usepackage{url} +\usepackage{times} +\usepackage{varioref} +% Document typeset from the original document that was typeset by Jeremy Elson. +% This document typeset by Alex Fletcher on Dec 4/2001 + +\addtolength{\topmargin}{-.5in} % repairing LaTeX's huge margins... +\addtolength{\textheight}{1in} % more margin hacking +\addtolength{\textwidth}{1in} % and here... +\addtolength{\oddsidemargin}{-0.5in} +\addtolength{\evensidemargin}{-0.5in} +\setlength{\parskip}{\baselineskip} +\setlength{\parindent}{20pt} +\newenvironment{Ventry}[1] + {\begin{list}{}{\renewcommand{\makelabel}[1]{\textsf{##1:}\hfil} + \settowidth{\labelwidth}{\textsf{#1:}} + \setlength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + } + } + {\end{list}} + +\title{The CircleMUD Builder's Manual} +\author{Jeremy Elson\\ +$<$jelson@circlemud.org$>$} +\begin{document} + +\maketitle + +\begin{abstract} +This document describes how to create CircleMUD areas, and specifies the file formats for worlds, monsters, objects, shops, and zones, as well as providing examples of each. All information necessary to build worlds can be found in this document. +\par +The intended audience is world builders interested in creating new worlds, implementors who need to decode existing world files, and coders extending the current world specification. Thanks to Jeff Fink (Teker) for documenting the shop format (as well as for submitting the shop code itself!), and Alex Fletcher (Furry) for writing parts of the Introduction. +\par +More information about CircleMUD, including up-to-date versions of this documentation in ASCII and Postscript, can be found at the CircleMUD Home Page \url{} or +FTP site \url{} +\end{abstract} + +\tableofcontents + +\section{Introduction} +\subsection{Your Job as a Tinyworld Architect} +As a {\bf Tinyworld Architect} or {\bf Builder}, your job is to create the virtual world in which players can roam around, solve puzzles, find treasures, and gain experience. A Builder creates the rooms, objects, and monsters with which players will interact, defining their textual descriptions, stats, abilities, and other special properties. A Builder should not be confused with the MUD's {\bf Coder}, whose job it is to modify the C code that makes the CircleMUD server actually run. A Builder does not need to be a programmer, and building is not programming; building is done by writing data files in a particular format, which this document describes in detail. +\par +There is a standard world included with the CircleMUD distribution which is intended to serve as a stepping stone and a basic guide to demonstrate what kind of worlds you can build for your MUD. To {\em only} use the standard CircleMUD world, without adding any original work, is to guarantee your MUD will be boring and largely ignored. MUDs are judged in many ways, but one of the most important is the number and quality of areas available. The areas are what tend to make a MUD original. For example, one MUD could be based upon a magic-rich world and the code and areas would reflect this, while another could revolve around cities and thieves. Each of these MUDs would have its areas designed in such a way to flesh out this theme. In essence, building an area is like writing a book. It needs to have a plot, needs to be descriptive, and needs to be populated with memorable people and places. +\par +Writing an area requires inspiration and imagination before all else. Ideas for areas often come from literature; for example, an area that traces Alice's adventures through Wonderland or Dante's trip through the Inferno. Areas usually start out on paper long before they reach a computer; a general map of the region can help to solidify the idea and a specific map of each individual room is absolutely required so that the rooms can be linked together in a way that makes sense geographically. Taking notes on ideas for which monsters should be encountered in the area, their descriptions, and in what location the monsters should appear can also help when planning an area. + +\subsection{Game Balance} +{\bf Game Balance} is a term that brings a different thing to mind for every person that hears it. What is most important about game balance is to keep in mind for whom each area is designed -- for example, high level players, newbies, or small groups. The objects and monsters found +in the area should match the level, abilities, and needs of the players expected to use the area. Most players do not like to be given vast treasure with no difficulty in getting it, but on the other hand, nobody likes to fight the most difficult monster on the MUD and get nothing for doing it. The job of the chief builder of a MUD and the authors of the individual areas is to find a happy medium between these two extremities. The process of finding that medium on your MUD is what makes MUDs original. +\par +The main factor that affects game balance is the areas that make up the MUD. Because of this, each area should be checked against the others to ensure that one area is not impossibly hard or absurdly easy or rewarding relative to the rest of the world. Each area that comes with the MUD or +is added later should be checked by one or more implementors or builders, and the characteristics of the monsters and objects should be changed to suit to the balance of the MUD. Each new area that becomes part of the world should not be added until it has been similarly balanced to the implementors' satisfaction. Understandably, builders want their zones to be popular, but they sometimes attempt to achieve this goal by purposefully making their zone unbalanced, adding powerful weapons or armor with no harmful side-effects or monsters that are easy to kill yet give massive numbers of experience points. Such zones are destined both to become very popular and invariably to bring about the death of your MUD's game balance. +\par +An area's balance should be an integral part of the design process, not something to be tacked on as an afterthought. Too often, an area will be designed with outrageously good weapons and armor which throws off the balance of the game. Naturally, after such zone is added, players complain bitterly if it is ever removed or toned down. Also, because the rent system saves hitrolls, damrolls, and ac-apply's, veteran players will be able to hold on to their old, spectacular equipment unless it is explicitly taken from them, even after the area has been changed. This does nothing but generate bad feelings on all sides. Therefore, the wise implementor will always carefully check a zone for balance {\em before} it is added to the production MUD. It is generally not a good idea to ``let the players balance the area'' by unleashing an unbalanced area on them and watching to see where the hordes of players go. + +\subsection{Making Your Areas Interesting} +An interesting area will always attract more players than a bland one. There are many ways to make an area interesting. Try to be as descriptive as possible; don't hold back on writing extra descriptions. Players are so accustomed to not having richly described areas that finding an extra description can often be a real treat. Also, one oft forgotten thing to describe are the door exits. Describing all of these can give a feel of standing out in a field and looking off to the north and seeing something like: + +\begin{quote} +The fields stretch off towards the large hills on the horizon. Far to the north you see what appears to be a plume of smoke. +\end{quote} + +With door descriptions like these, an area will feel more fleshed out to the player. Many players (both experienced and first timers) read the descriptions carefully the first time they walk through an area, and having many extra descriptions helps them fill out their idea of what things actually look like. +\par +One thing that should never be done is to have generic room descriptions like ``You stand in a big room. It is very dark.'' Descriptions like these detract in general from the rest of the world, and +if they are found room after room can bore a player to tears. Such a +description could be changed to: + +\begin{quote} +You stand in a room of very large size. Shadows cower along the walls and almost seem to be moving as you look around yourself. The floor is made of heavy stones which are very dark in color. The ceiling is quite some distance above you, but you can still make out objects hanging from it, ruining the smoothness that is characteristic of the rest of the room. +\end{quote} + +Another way to make an area interesting is to create some sort of plot line for it, or a coherent theme, rather than a collection of haphazardly related rooms. The plot can be complex like infiltrating a castle to garner the war plans of the evil Lord Zygol, simple like ridding the caves of goblins, or anything in between. Often the plot in an area can be advanced by some fairly simple puzzles or descriptions. With the help of special procedures written in C by the MUD's coder, involved puzzles of Zork-like complexity can be readily created. +\par +Not all monsters have to be designed to be killed, nor does every shopkeeper have to buy or sell something -- they could just be created so that they refuse to trade with any player characters. The players will then wonder why the shopkeeper exists. Perhaps giving him a jewel will make him more friendly. In this way, an area can be made infinitely more exciting by coding some special procedures for it. Perhaps random teleporters throughout the area, perhaps some procedures that have monsters respond to questions from players. +\par +All in all, the best way to make an area interesting is to use variety, intelligence, and imagination in building. Try to imagine what it would be like for you to walk through and what you might try looking at or doing, and then try to incorporate that into your area. Show your area to others and take their advice. By taking all of this extra effort in creating your area, you will be rewarded by leaving a lasting memory of your area in the minds of many players. + +\subsection{Using World-Building Programs} +In the old days, the only tool that was used (or required) to write a MUD area was a simple text editor. However, in the course of time, various people have written programs to help builders create worlds without having to understand the complex details of the world file format. World-building programs are becoming more popular, especially the fancy graphical builders that run under Microsoft Windows. You may prefer to use one of them rather than trying to use a simple text editor and understanding the format on your own. New world-builders are constantly being written +and released, so any attempt to describe them here will almost certainly be obsolete by the time you read it. However, some of them can be found +in the \texttt{contrib/} section of CircleMUD's official FTP site +\url{}. + +\section{The Mechanics of World Building} +\subsection{Overview of the MUD World} +CircleMUD's world is divided into distinct sections called {\bf zones}. Each zone typically consists of a single, modular, geographically coherent region of the MUD's virtual world with a consistent storyline. Each zone can define its own physical space (the {\bf world}), monsters (usually called {\bf mobiles}), {\bf objects} (such as armor, weapons and treasures), and {\bf shops}, in which a mobile in a particular room can buy and sell objects to players. +\par +A single zone typically contains up to than 100 rooms, 100 monster definitions and 100 object definitions, but a large region can be subdivided into several zones at the author's discretion. For example, the City of Midgaard is divided into two zones, one for the main city and one for the southern residential area. In addition to this, with the new zone system describing top and bottom rooms of a zone, zones can contain very few rooms and indeed can overlap with other zones if desired. A zone can also use mobiles and objects defined by another zone, but this practice is discouraged because it makes zones less modular, meaning that it becomes more difficult to add or remove one zone without affecting another zone. +\par +Each room, mobile and object within a zone is given a unique number called a {\bf Virtual Number} or {\bf Vnum}. The Vnums for the rooms, mobiles and objects are independent, so there can be both a room number 3001 and an object number 3001. When defining and referencing parts of a zone, the zone author always refers to each entity by its Vnum and {\em never} by name. Vnums are normally not seen by players. Each zone itself also has a Vnum. A common convention is to number the zone with the Vnums of its component rooms, divided by 100. For example, Midgaard is zone 30, consisting of rooms 3000 to 3099. Mobile and object numbering follows the same convention. +\par +The author of the zone can define aspects of each room such as the terrain type, special properties like whether the room has its own light source or is a death trap, and other parameters. A very important aspect of each room is the position of other rooms in relation to it; for example, from room 3014, one can go north to reach room 3005, east to room 3015, etc. Great care should be given to making the room links logical and consistent. A player who moves east and then immediately west should find herself back in the same room in which she started. +\par +Each mobile is given characteristics such as number of hit points, bare hand damage capability, strength, and special skills and abilities. Objects have parameters such as weight, value, and magical properties. The author can also choose how these three pieces of the world are combined to form the initial state of the zone: for example, the number of each mobile that exist and in which rooms they stand, the equipment that each mobile uses, objects which might be on the floor, and the doors which may be initially locked or unlocked. +\par +When the CircleMUD server runs the zone, it sets each zone to its initial state as defined by the author, and then makes the zone ``come alive'' by randomly making mobiles wander through the zone and, if desired, attack players. While the players are using the zone (killing the mobiles and picking up equipment) the server periodically resets the zone to its initial state (a {\bf zone reset}) to prepare the zone for the next group of players. + +\subsection{Learning By Example} +Before descending into the details of MUD building, it should be noted that the formats of the world files are sufficiently complex that it is probably not possible to gain a complete understanding of them merely by reading this documentation. This document is designed to be a reference manual and therefore may not serve as a particularly good tutorial. While there are examples provided at the end of each section, they are only meant to be representative and are not comprehensive examples of all possible ways to use the features that will be described. The most effective way is to learn by example: examine some of the areas that come with CircleMUD and try to figure out the meanings of the numbers in different rooms, objects, mobiles, and zone files, using this manual as a guide. Once you're proficient at reading world files, you'll find that creating them is a much easier task. + +\subsection{CircleMUD World Files} +Each CircleMUD zone is defined by five types of files: world files, mobile files, object files, shop files, and zone files. World files (*.wld) define the actual rooms and the links from one room to another. Mobiles (*.mob) are the monsters which inhabit the MUD. Objects (*.obj) are the weapons, armor, treasure, and other objects manipulated by players and monsters. Shop files (*.shp) define the MUD's shopkeepers, controlling what they buy, sell, and say. Finally, Zone files (*.zon) bring all the previous elements together to define the initial state of the zone, describing how monsters should be equipped, where monsters should be placed, where objects on the ground should be, which doors should be locked, etc. These five types of files are collectively referred to as {\bf the world}, or sometimes the {\bf tinyworld files}. +\par +CircleMUD uses {\bf split world files} to make the world easier to manipulate. Instead of all the rooms being lumped together in a single, cumbersome file, the rooms are split into many different files, one file for each area of the world. All five types of files are split in a similar manner. Circle has one directory for the room files (\texttt{lib/world/wld/}), one directory for the object files (\texttt{lib/world/obj/}), and so forth. +\par +Circle doesn't care how the world files are split or what the names of the files are, but certain conventions have developed to make management of the world easier. Each file typically contains information for only a single zone and the filename is typically the zone number, with an extension indicating one of the 5 file types. For example, the file \texttt{30.wld} contains rooms 3000 to 3099 of zone 30; \texttt{42.mob} contains mobiles 4200 to 4299 of zone 42, etc. +\par +Also in each of these directories is a file called ``\texttt{index}'' that tells the server which files from that directory should be loaded when the server boots and a file called ``\texttt{index.mini}'' which (minimal) set of files should be loaded when the server is booted with the \texttt{-m} option. +\par +Every world file used by Circle (including the index files) must be terminated by the dollar sign (\$) to tell the server that the file has ended. Without the dollar sign, the server will not boot properly. +\par +The \texttt{split} utility that comes with CircleMUD can be used to divide a large file into a number of smaller files; for example, if you have a large zone that you'd like to break into several smaller zones. See the CircleMUD Utility Manual for more information on how to use \texttt{split}. + +\subsection{Using Bitvectors}\label{usingbitvectors} +When learning about the formats of CircleMUD world files, you'll frequently see references to {\bf bitvectors}. A bitvector is a group of flags which each can be either on or off. Bitvectors and their flags are used in many ways within CircleMUD, such as to define the personality of mobiles, the characteristics of rooms, etc. Understanding how to use bitvectors is essential if you want to build a CircleMUD world. +\par +At every point where this document says a bitvector is required, it will be accompanied by a table describing the flags which you can use with that bitvector. The table will look something like this: +\begin{verbatim} + 1 a DIRTY The room is dirty. + 2 b STINKY The room stinks. + 4 c MUSHY The floor of the room feels mushy. + 8 d SWAMPY The room resembles a swamp. +\end{verbatim} + +Note there are four columns in the table. The first column contains the numeric value of the flag. The second contains the alphabetic representation of the flag. The third is the name of the flag, and the fourth is a description of what the flag does. +\par +There are two ways you can construct a bitvector with the table above: the numeric method and the alphabetic method. The numeric method is to select all flags you'd like to activate, take the numbers of those flags as listed in the first column of the table, and add them all up. The resulting sum will be the bitvector. The alphabetic method is much easier: just write down all the letters of the flags you'd like to use with no spaces in between. For both numeric and alphabetic bitvectors, use ``0'' to indicate a bitvector where none of the flags are set. +\par +For example, imagine you want to create a room that is dirty, mushy, and resembles a swamp, but does not stink. Using the numeric method, you'd look up the numbers of those three flags (1 for dirty, 4 for mushy, and 8 for swampy), and add them up to get 13. Using the alphabetic method, the bitvector would simply be ``acd''. Bitvectors are case-sensitive; ``acd'' is very different from ``Acd'' and ``ACD''. +\par +At every point where the CircleMUD format requires a bitvector, you can write either a numeric bitvector or an alphabetic bitvector. They are completely interchangeable. However, be forewarned that if you use alphabetic bitvectors, your area will not be compatible with MUDs based on the original DikuMud. Alphabetic bitvectors are a CircleMUD enhancement and may not be supported by MUDs based on Gamma Diku. +\par +In some bitvector tables, you will see values whose descriptions say ``Reserved for internal use'' or ``Do not use''. You should never set those flag values in your world files. + +\subsection{Adding New Areas to the MUD} +After an area is written, there are three steps required to add it to the MUD for testing: copying the files into the proper directories, adding the new filenames to the appropriate index files, and running the MUD in syntax-check mode to make sure the new area is formatted correctly. +\par +All world-related files go in the directory \texttt{lib/world/}. In this example, we will imagine that your new area is zone number 57 (which should consist of rooms, objects and mobiles numbered 5701-5799). Your zone probably has 5 files: \texttt{57.wld}, \texttt{57.mob}, \texttt{57.obj}, \texttt{57.shp}, and \texttt{57.zon}. The first step is to copy each of these files into their appropriate +subdirectory: \texttt{57.wld} should be copied to the directory \texttt{lib/world/wld/}; \texttt{57.mob} should be copied to the directory \texttt{lib/world/mob/}, and so forth. +\par +The next step is to add the name of the newly copied world files to the \texttt{index} file contained in each of the world subdirectories. Note you will need to change 5 index files: one for each of the world files that you copied in the previous step. Adding the filenames to the index files tells CircleMUD that the files should be loaded; they will {\em not} be loaded simply by virtue of being in the correct directory. First, edit the file \texttt{lib/world/wld/index}; you should see a list of the current world (room) files. Add a single line that says \texttt{57.wld} in the correct numeric order. Next, add a similar line in the other index files: add \texttt{57.mob} to \texttt{lib/world/mob/index}; add \texttt{57.obj} to \texttt{lib/world/obj/index}, etc. At the same time, if the area is to be a central core area for the game, it should also be added to the \texttt{index.mini} file. +\par +Now you can try to boot the MUD with the new world. If you're adding a new area which hasn't been debugged yet, it's usually a good idea to run Circle in its syntax-checking mode first. From Circle's root directory, type \texttt{bin/circle -c} to run Circle's syntax checker. If the check runs with no \texttt{SYSERR} messages, the syntax of the area is probably correct and the MUD can be safely booted. Otherwise, check the CircleMUD SYSERR List for more information on how to correct the formatting errors. also, see the CircleMUD Administrator's Guide for more information on how to run CircleMUD. + +\section{World (Room) Files} +\subsection{The Format of a Room} +The format of a room is: +\begin{verbatim} +# +~ + +~ + +{zero or more direction fields and/or extra descriptions} +S +\end{verbatim} + +There can be between 0 and 6 direction fields in the standard CircleMUD code. There should not be more than one direction field for a particular direction. {\it For more information on adding directions to the standard ``neswud'', see the Coding CircleMUD document.} No Extra Descriptions are required but an unlimited number are allowed. Each room is terminated with the literal letter \texttt{S}. + +\begin{description} +\item[Virtual Number] +This number is critical; it is the identity of the room within the game. All other files will use this number to refer to this room. From within the game, this number can be used with ``goto'' to go to this room. The virtual numbers must appear in increasing order in the world file. +\item[Room Name] This string is the room's title, which is displayed before the room description when players look at the room, or displayed alone if players are using ``brief.'' +\item[Room Description] The description of the room seen when they type ``look,'' or when they enter the room with brief mode off. +\item[Zone Number] This number is obsolete and no longer used. Historically it contained the zone number of the current room but it is currently ignored for everything except debugging messages. It is maintained as part of the format for backwards compatibility. +\item[Room Bitvector] A bitvector (see section~\vref{usingbitvectors}~`Using Bitvectors'), with the following values: +\begin{verbatim} + 1 a DARK Room is dark. + 2 b DEATH Room is a death trap; char `dies' + (no xp lost). + 4 c NOMOB MOBs (monsters) cannot enter room. + 8 d INDOORS Room is indoors. + 16 e PEACEFUL Room is peaceful (violence not + allowed). + 32 f SOUNDPROOF Shouts, gossips, etc. won't be + heard in room. + 64 g NOTRACK `track' can't find a path through + this room. + 128 h NOMAGIC All magic attempted in this room + will fail. + 256 i TUNNEL Only one person allowed in room at + a time. + 512 j PRIVATE Cannot teleport in or GOTO if two + people here. + 1024 k GODROOM Only LVL_GOD and above allowed to + enter. + 2048 l HOUSE Reserved for internal use. + Do not set. + 4096 m HOUSE_CRASH Reserved for internal use. + Do not set. + 8192 n ATRIUM Reserved for internal use. + Do not set. + 16384 o OLC Reserved for internal use. + Do not set. + 32768 p BFS_MARK Reserved for internal use. + Do not set. +\end{verbatim} +\item[Sector Type] A single number ({\em not} a bitvector) defining the type of terrain in the room. Note that this value is not the number of movement points needed but just a number to identify the sector type (the movement loss is controlled by the array \texttt{movement\_loss[]} in the file \texttt{constants.c}). The Sector Type can be one of the following: +\begin{verbatim} + 0 INSIDE Indoors (small number of move points + needed). + 1 CITY The streets of a city. + 2 FIELD An open field. + 3 FOREST A dense forest. + 4 HILLS Low foothills. + 5 MOUNTAIN Steep mountain regions. + 6 WATER_SWIM Water (swimmable). + 7 WATER_NOSWIM Unswimmable water - boat required for + passage. + 8 UNDERWATER Underwater. + 9 FLYING Wheee! +\end{verbatim} +\item[Direction Fields and Extra Descriptions] This section defines the room's exits, if any, as well as any extra descriptions such as signs or strange objects that might be in the room. This section can be empty if the room has no exits and no extra descriptions. Otherwise, it can have any number of \texttt{D} (Direction Field) and \texttt{E} (Extra Description) sections, in any order. After all exits and extra descriptions have been listed, the end of the room is signaled with the letter \texttt{S}. The Direction Fields and Extra Descriptions are described in more detail in the following sections. +\end{description} + +\subsection{The Direction Field} +The general format of a direction field is: +\begin{verbatim} +D + +~ +~ + +\end{verbatim} +\begin{description} +\item[Direction Number] The compass direction that this Direction Field describes. It must be one of the following numbers: +\begin{verbatim} + 0 North + 1 East + 2 South + 3 West + 4 Up + 5 Down +\end{verbatim} +\item[General Description] The description shown to the player when she types ``look $<$direction$>$''. This should not be confused with the room description itself. Unlike the room description which is automatically viewed when a player walks into a room, the General Description of an exit is only seen when a player looks in the direction of the exit (e.g., ``look north''). +\item[Keyword List] A list of acceptable terms that can be used to manipulate the door with +commands such as ``open,'' ``close,'' ``lock,'' ``unlock,'' etc. The list should be separated by spaces, such as \verb*=door oak big~= +\item[Door Flag] Can take one of three values (0, 1 or 2): +\begin{description} +\item[0] An unrestricted exit that has no door, or a special door cannot be opened or closed with the ``open'' and ``close'' commands. The latter is useful for secret doors, trap doors, or other doors that are opened and closed by something other than the normal commands, like a special procedure assigned to the room or an object in the room. +\item[1] Normal doors that can be opened, closed, locked, unlocked, and picked. +\item[2] Pickproof doors: if locked, can be opened only with the key. +\end{description} +The initial state of all doors is open, but doors can be opened, closed, and locked automatically when zones reset; see Section zone file documentation for details. +\item[Key Number] The virtual number of the key required to lock and unlock the door in the direction given. A value of -1 means that there is no keyhole; i.e., no key will open this door. If the Door Flag for this door is 0, the Key Number is ignored. +\item[Room Linked] The virtual number of the room to which this exit leads. If this number is -1 (NOWHERE), the exit will not actually lead anywhere; useful if you'd like the exit to show up on ``exits,'' or if you'd like to add a description for ``look $<$direction$>$'' without actually adding an exit in that direction. +\end{description} + +\subsection{Room Extra Descriptions} +Extra descriptions are used to make rooms more interesting, and make them more interactive. Extra descriptions are accessed by players when they type ``look at $<$thing$>$'', where $<$thing$>$ is any word you choose. For example, you might write a room description which includes the tantalizing sentence, ``The wall looks strange here.'' Using extra descriptions, players could then see additional detail by typing ``look at wall.'' There can be an unlimited +number of Extra Descriptions in each room.\newline +The format of an extra description is simple: +\begin{verbatim} +E +~ + +~ +\end{verbatim} +\begin{description} +\item[Keyword List] A space-separated list of keywords which will access the description in this \texttt{E} section. +\item[Description Text] The text that will be displayed when a player types ``look $<$keyword$>$,'' where $<$keyword$>$ is one of the keywords specified in the Keyword List of this \texttt{E} section. +\end{description} + +\subsection{World File Example} +Here is a sample entry from a CircleMUD world file: +\begin{verbatim} +#18629 +The Red Room~ + It takes you a moment to realize that the red glow here is +coming from a round portal on the floor. It looks almost as +if someone had painted a picture of a dirt running through a +field on the floor of this room. Oddly enough, it is so +realistic you can feel the wind in the field coming out of the +picture. +~ +186 ad 0 +D0 +You see a big room up there. +~ +~ +0 -1 18620 +D1 +You see a small room. +~ +oak door~ +1 18000 18630 +E +portal floor~ +It looks as if you could go down into it... but you can't be +sure of where you will end up, or if you can get back. +~ +S +\end{verbatim} +This room is virtual number 18629, called ``The Red Room''. It is dark and indoors, with an ``INDOORS'' sector type. It has an exit north and east. The north exit leads to room 18620; if a player types ``look north'' it will say ``You see a big room up there.'' The exit east is a normal, pickable door that leads to room 18630 and which takes key number 18000. There is one extra description for ``portal'' and ``floor''. + +\section{Mobile (Monster) Files} +\subsection{The Format of a Mobile} +The format of a mobile is: +\begin{verbatim} +# +~ +~ + +~ + +~ + +{type-specific information; see below for details} +\end{verbatim} +The format of mobiles varies depending on the Type Flag. See below for documentation of the formats of the various types. +\begin{description} +\item[Virtual Number] This number is critical; it is the identity of the mobile within the game. It is the number that will be used to reference the mobile from zone files and is the number used to ``load'' mobiles from within the game. The virtual numbers must appear in increasing order in the mob file. +\item[Alias List] The list of keywords, separated by spaces, that can be used by players to identify the mobile. The mobile can only be identified using the keywords that appear in its alias list; it cannot be identified by a word that appears only in its name. Great care should be taken to ensure that the spellings of names and aliases match. Fill words such as ``the,'' ``a,'' and ``an'' should not appear in the Alias List. +\item[Short Description] The description of the mobile used by the MUD when the mobile takes some action. For example, a short description of ``The Beastly Fido'' would result in messages such as ``The Beastly Fido leaves south.'' and ``The Beastly Fido hits you hard.'' The Short Description should never end with a punctuation mark because it will be inserted into the middle of sentences such as those above. +\item[Long Description] The description displayed when a mobile is in its default position; for example, ``The Beastly Fido is here, searching through garbage for food.'' When the mobile is in a position other than its default position, such as sleeping or incapacitated, the short description is used instead; for example, ``The Beastly Fido is lying here, incapacitated.'' Unlike the Short Description, the Long Description should end with appropriate punctuation. +\item[Detailed Description] The description displayed for a mobile when a player looks at the mobile by typing ``look at $<$mobile$>$.'' +\item[Action Bitvector] A bitvector (see section~\vref{usingbitvectors}~`Using Bitvectors') with the following values: +\begin{verbatim} + 1 a SPEC This flag must be set on mobiles + which have special procedures + written in C. In addition to + setting this bit, the procedure + must be assigned in spec_assign.c, + and the specproc itself must (of + course) must be written. See the + section on Special Procedures in + the file coding.doc for more + information. + 2 b SENTINEL Mobiles wander around randomly by + default; this bit should be set + for mobiles which are to remain + stationary. + 4 c SCAVENGER The mob should pick up valuables + it finds on the ground. More + expensive items will be taken + first. + 8 d ISNPC Reserved for internal use. + Do not set. + 16 e AWARE Set for mobs which cannot be + backstabbed. Replaces the + ACT_NICE_THIEF bit from Diku + Gamma. + 32 f AGGRESSIVE Mob will hit all players in the + room it can see. See also the + WIMPY bit. + 64 g STAY_ZONE Mob will not wander out of its own + zone -- good for keeping your mobs + as only part of your own area. + 128 h WIMPY Mob will flee when being attacked + if it has less than 20% of its hit + points. If the WIMPY bit is set + in conjunction with any of the + forms of the AGGRESSIVE bit, the + mob will only attack mobs that are + unconscious (sleeping or + incapacitated). + 256 i AGGR_EVIL Mob will attack players that are + evil-aligned. + 512 j AGGR_GOOD Mob will attack players that are + good-aligned. + 1024 k AGGR_NEUTRAL Mob will attack players that are + neutrally aligned. + 2048 l MEMORY Mob will remember the players + that initiate attacks on it, and + initiate an attack on that player + if it ever runs into him again. + 4096 m HELPER The mob will attack any player it + sees in the room that is fighting + with a mobile in the room. Useful + for groups of mobiles that travel + together; i.e. three snakes in a + pit, to force players to fight all + three simultaneously instead of + picking off one at a time. + 8192 n NOCHARM Mob cannot be charmed. + 16384 o NOSUMMON Mob cannot be summoned. + 32768 p NOSLEEP Sleep spell cannot be cast on mob. + 65536 q NOBASH Large mobs such as trees that can + not be bashed. + 131072 r NOBLIND Mob cannot be blinded. + 262144 s NOTDEADYET Reserved for internal use. + Do not set. +\end{verbatim} +\item[Action Bitvector] A bitvector (see section~\vref{usingbitvectors}~`Using Bitvectors') with the following values: +\begin{verbatim} + 1 a BLIND Mob is blind. + 2 b INVISIBLE Mob is invisible. + 4 c DETECT_ALIGN Mob is sensitive to the alignment + of others. + 8 d DETECT_INVIS Mob can see invisible characters + and objects. + 16 e DETECT_MAGIC Mob is sensitive to magical + presence. + 32 f SENSE_LIFE Mob can sense hidden life. + 64 g WATERWALK Mob can traverse unswimmable + water sectors. + 128 h SANCTUARY Mob is protected by sanctuary + (half damage). + 256 i GROUP Reserved for internal use. + Do not set. + 512 j CURSE Mob is cursed. + 1024 k INFRAVISION Mob can see in dark. + 2048 l POISON Reserved for internal use. + Do not set. + 4096 m PROTECT_EVIL Mob is protected from evil + characters. No effect at present. + 8192 n PROTECT_GOOD Mob is protected from good + characters. No effect at present. + 16384 o SLEEP Reserved for internal use. + Do not set. + 32768 p NOTRACK Mob cannot be tracked. + 65536 q UNUSED16 Unused (room for future + expansion). + 131072 r UNUSED17 Unused (room for future + expansion). + 262144 s SNEAK Mob can move quietly (room not + informed). + 524288 t HIDE Mob is hidden (only visible with + sense life). + 1048576 u UNUSED20 Unused (room for future + expansion). + 2097152 v CHARM Reserved for internal use. + Do not set. +\end{verbatim} +\item[Alignment] A number from -1000 to 1000 representing the mob's initial alignment. +\begin{verbatim} + -1000...-350 Evil + -349...349 Neutral + 350...1000 Good +\end{verbatim} +\item[Type Flag] This flag is a single letter which indicates what type of mobile is currently being defined, and controls what information CircleMUD expects to find next (i.e., in the file from the current point to the end of the current mobile). +\par +Standard CircleMUD 3.0 supports two types of mobiles: \texttt{S} (for Simple), and \texttt{E} (for Enhanced). Type \texttt{C} (Complex) mobiles was part of the original DikuMUD Gamma and part of CircleMUD until version 3.0, but are no longer supported by CircleMUD v3.0 and above. +\par +Check with your local implementor to see if there are any additional types supported on your particular MUD. +\end{description} + +\subsection{Type S Mobiles} +For type S mobs, the type-specific information should be in the following format: +\begin{verbatim} + + + +\end{verbatim} +\begin{description} +\item[Level] The level of the monster, from 1 to 30. +\item[THAC0] ``To Hit Armor Class 0'' -- a measure of the ability of the monster to penetrate armor and cause damage, ranging from 0 to 20. Lower numbers mean the monster is more likely to penetrate armor. The formal definition of THAC0 is the minimum roll required on a 20-sided die required to hit an opponent of equivalent Armor Class 0. +\item[Armor Class] The ability of the monster to avoid damage. Range is from -10 to 10, with lower values indicating better armor. Roughly, the scale is: +\begin{verbatim} + AC 10 Naked person + AC 0 Very heavily armored person (full plate mail) + AC -10 Armored Battle Tank (hopefully impossible for + players) +\end{verbatim} +Note on THAC0 and Armor Class (AC): When an attacker is trying to hit a victim, the attacker's THAC0 and the victim's AC, plus a random roll of the dice, determines whether or not the attacker can hit the victim. (If a hit occurs, a different formula determines how much damage is done.) An attacker with a low THAC0 is theoretically just as likely to hit a victim with a low AC as an attacker with a high THAC0 is to hit a victim with a high AC. Lower attacker THAC0's and higher victim AC's favor the attacker; higher attacker THAC0's and lower victim AC's favor the victim. +\item[Max Hit Points] The maximum number of hit points the mobile is given, which must be given in the form ``xdy+z'' where x, y, and z are integers. For example, \texttt{4d6+10} would mean sum 4 rolls of a 6 sided die and add 10 to the result. Each individual instance of a mob will have the same max number of hit points from the time it is loaded into the game right up to the time it dies; the dice will only be rolled once when a particular instance of the mob is created. In other words, a particular copy of a mob will always have the same number of max hit points during its life, but different copies of the same mob may have different numbers of max hit points. +\par +Note that all three numbers, the ``\texttt{d}'' and the ``\texttt{+}'' must always appear, even if some of the numbers are 0. For example, if you want every copy of a mob to always have exactly 100 hit points, write \texttt{0d0+100}. +\item[Bare Hand Damage (BHD)] The amount of damage the mob can do per round when not armed with a weapon. Also specified as ``xdy+z'' and subject to the same formatting rules as Max Hit Points. However, unlike Max Hit Points, the dice are rolled once per round of violence; the BHD of a mob will vary from round to round, within the limits you set. +\par +For BHD, xdy specifies the dice rolls and z is the strength bonus added both to BHD and weapon-inflicted damage. For example, a monster with a BHD of 1d4+10 will do between 11 and 14 hitpoints each round without a weapon. If the monster picks up and wields a tiny stick which gives 1d2 damage, then the monster will do 1d2 + 10 points of damage per round with the stick. +\item[Gold] The number of gold coins the mobile is initially loaded with. +\item[Experience] The number of experience points the mobile is initially loaded with. +\item[Load Position] The position the mobile is in when loaded into the game, which should be one of the following numbers: +\begin{verbatim} + 0 POSITION_DEAD Reserved for internal use. + Do not set. + 1 POSITION_MORTALLYW Reserved for internal use. + Do not set. + 2 POSITION_INCAP Reserved for internal use. + Do not set. + 3 POSITION_STUNNED Reserved for internal use. + Do not set. + 4 POSITION_SLEEPING The monster is sleeping. + 5 POSITION_RESTING The monster is resting. + 6 POSITION_SITTING The monster is sitting. + 7 POSITION_FIGHTING Reserved for internal use. + Do not set. + 8 POSITION_STANDING The monster is standing. +\end{verbatim} +\item[Default Position] The position to which monsters will return after a fight, which should be one of the same numbers as given above for Load Position. In addition, the Default Position defines when the mob's long description is displayed (see ``Long Description'' above). +\item[Sex] One of the following: +\begin{verbatim} + 0 Neutral (it/its) + 1 Male (he/his) + 2 Female (she/her) +\end{verbatim} +\end{description} + +\subsection{Type S Mobile Example} +\begin{verbatim} +#3062 +fido dog~ +the beastly fido~ +A beastly fido is mucking through the garbage looking for food. +~ +The fido is a small dog that has a foul smell and pieces of +rotted meat hanging around his teeth. +~ +afghq p -200 S +0 20 10 1d6+4 1d4+0 +0 25 +8 8 1 +\end{verbatim} +\par This is mobile vnum 3062. The Fido's action bitvector indicates that it has a special procedure (bit a), is aggressive (bit f), stays in its own zone (bit g), is wimpy (bit h), and cannot be bashed (bit q). Also, the Fido cannot be tracked (affection bit p), and has an initial alignment of -200. After the \texttt{S} flag we see that the Fido is level 0, has a THAC0 of 20, an Armor Class of 10, 1d6+4 hit points (a random value from 5 to 10), and will do 1d4 hit points of bare hand damage per round. The Fido has 0 gold and 25 experience points, has a load position and default position of STANDING, and is male. + +\subsection{Type E Mobiles} +Type E mobiles are specific to Circle 3.0 and are designed to provide an easy way for MUD implementors to extend the mobile format to fit their own needs. A type E mobile is an extension of type S mobiles; a type E mobile is a type S mobile with extra data at the end. After the last line normally found in type S mobs (the one ending with the mob's sex), type E mobiles end with a section called the Enhanced section. This section consists of zero or more enhanced mobile specifications (or {\bf E-specs}), one per line. Each E-spec consists of a keyword followed by a colon (``:'') and a value. The valid keywords are listed below. The literal letter \texttt{E} must then come after all E-specs to signal the end of the mob.\newline +The format of an E mobile is as follows: +\begin{verbatim} + + + +{E-spec list} +E +\end{verbatim} + +\subsection{Type E Mobile Example} +Let's say that you wanted to create an enhanced Fido like the one in the previous example, but one that has a bare-hand attack type of 4 so that the Fido bites players instead of hitting them. Let's say you also wanted to give this Fido the a strength of 18. You might write: +\begin{verbatim} +#3062 +fido dog~ +the beastly fido~ +A beastly fido is mucking through the garbage looking for food. +~ +The fido is a small dog that has a foul smell and pieces +of rotted meat hanging around his teeth. +~ +afghq p -200 E +0 20 10 1d6+4 1d4+0 +0 25 +8 8 1 +BareHandAttack: 4 +Str: 18 +E +\end{verbatim} +In the above example, the two E-specs used were BareHandAttack and Str. Any number of the E-specs can be used in an Enhanced section and they may appear in any order. The format is simple: the E-spec keyword, followed by a colon, followed by a value. Note that unlike type S mobiles, type E mobiles require a terminator at the end of the record (the letter \texttt{E}). + +\subsection{E-Spec Keywords Valid in CircleMUD 3.0} +The only keywords supported under Circle 3.0 are BareHandAttack, Str, StrAdd, Int, Wis, Dex, Con, and Cha. However, the E-Specs have been designed such that new ones are quite easy to add; check with your local implementor to see if your particular MUD has added any additional E-Specs. Future versions of CircleMUD will have considerably more features available in the Enhanced section such as the ability to individually set mobs' skill proficiencies. +\begin{description} +\item[BareHandAttack] This controls the description of violence given during battles, in messages such as ``The Beastly fido bites you very hard.'' BareHandAttack should be one of the following numbers: +\begin{verbatim} + 0 hit/hits + 1 sting/stings + 2 whip/whips + 3 slash/slashes + 4 bite/bites + 5 bludgeon/bludgeons + 6 crush/crushes + 7 pound/pounds + 8 claw/claws + 9 maul/mauls + 10 thrash/thrashes + 11 pierce/pierces + 12 blast/blasts + 13 punch/punches + 14 stab/stabs +\end{verbatim} +Messages given when attackers miss or kill their victims are taken from the file \texttt{lib/misc/messages}. The attack type number for weapons is 300 plus the number listed in the table above, so to modify the message given to players when they are mauled, attack type number 309 in \texttt{lib/misc/messages} should be changed. Note that adding new attack types requires code changes and {\em cannot} be accomplished simply by adding new messages to \texttt{lib/misc/messages} (see the CircleMUD Coding Manual for more information). +\item[Str, Int, Wis, Dex, Con, Cha] The mobile's Strength, Intelligence, Wisdom, Dexterity, Constitution and Charisma, respectively. These values should be between 3 and 18, but can be between 1 and 25 (which is the default statistic maximum). +\item[StrAdd] The mobile's strength addition, which can range from 1 to 99. +\end{description} + +\section{Object Files} +\subsection{The Format of an Object} +\begin{verbatim} +# +~ +~ +~ +~ + + + +{Zero or more Extra Descriptions and/or Affect Fields} +\end{verbatim} +There can be an unlimited number of Extra Descriptions and up to 6 Affect Fields. +\begin{description} +\item[Virtual Number] This number is critical; it is the identity of the object within the game. It is the number that will be used to reference the object from zone files and is the number used to ``load'' objects from within the game. The virtual numbers must appear in increasing order in the object file. +\item[Alias List] The list of keywords, separated by spaces, that can be used by players to identify the object. The object can only be identified using the keywords that appear in its alias list; it cannot be identified by a word that appears only in its name. Great care should be taken to ensure that the spellings of names and aliases match. Fill words such as ``the,'' ``a,'' and ``an'' should not appear in the Alias List. +\item[Short Description] The description of the object used by the MUD when the object is used. +For example, a short description of ``a long, green stick'' would result in messages such as ``The Beastly Fido picks up the long, green stick.'' The Short Description should never end with a punctuation mark because it will be inserted into the middle of sentences. +\item[Long Description] The description displayed when the object is seen lying on the ground, +for example, ``A furled umbrella is lying here.'' Unlike the Short Description, the Long Description should end with appropriate punctuation. +\item[Action Description] Action Descriptions are primarily used for magical objects (staves, wands, scrolls, and potions) to specify what message displayed to the room when the magical item is used. The Action Description should be given in the act format specified in act.doc. If no Action Description is present, a default message will be used: +\begin{Ventry}{Potions} +\item[Staves] Rasmussen taps $<$object$>$ three times on the ground.\\ + \$n taps \$p three times on the ground. +\item[Wands] Rasmussen points $<$object$>$ at $<$target$>$.\\ + \$n points \$p at \$N. +\item[Scrolls] Rasmussen recites $<$object$>$.\\ + \$n recites \$p. +\item[Potions] Rasmussen quaffs $<$object$>$.\\ + \$n quaffs \$p. +\end{Ventry} +For more information on the character codes used in the above strings, see the {\bf \texttt{act()} Function} document. For objects which are readable papers, the Action Description contains the text on the paper. +\item[Type Flag] A number which specifies what type of object is being defined; also controls the meanings of value0 through value4. The Type Flag must be one of the following numbers: +\begin{verbatim} + 1 LIGHT Item is a light source. + 2 SCROLL Item is a magical scroll. + 3 WAND Item is a magical wand. + 4 STAFF Item is a magical staff. + 5 WEAPON Item is a weapon. + 6 FIREWEAPON Currently not implemented. Do not use. + 7 MISSILE Currently not implemented. Do not use. + 8 TREASURE Item is treasure other than gold coins + (e.g. gems). + 9 ARMOR Item is armor. + 10 POTION Item is a magical potion. + 11 WORN Currently not implemented. Do not use. + 12 OTHER Miscellaneous object with no special + properties. + 13 TRASH Trash -- junked by cleaners, not bought + by shopkeepers. + 14 TRAP Currently not implemented. Do not use. + 15 CONTAINER Item is a container. + 16 NOTE Item is a note (can be written on). + 17 DRINKCON Item is a drink container. + 18 KEY Item is a key. + 19 FOOD Item is food. + 20 MONEY Item is money (gold coins). + 21 PEN Item is a pen. + 22 BOAT Item is a boat; allows you to + traverse SECT_WATER_NOSWIM. + 23 FOUNTAIN Item is a fountain. +\end{verbatim} +\item[Extra (Effects) Bitvector] A bitvector (see section~\vref{usingbitvectors}~`Using Bitvectors'), to define the ``special effects'' of the object. Flags that are marked as ``cosmetic'' merely add an interesting message to the object when it is examined, but has no substantive effect otherwise. The flags have the following values: +\begin{verbatim} + 1 a GLOW Item is glowing (cosmetic). + 2 b HUM Item is humming (cosmetic). + 4 c NORENT Item cannot be rented. + 8 d NODONATE Item cannot be donated. + 16 e NOINVIS Item cannot be made invisible. + 32 f INVISIBLE Item is invisible. + 64 g MAGIC Item has a magical aura and can't + be enchanted. + 128 h NODROP Item is cursed and cannot be + dropped. + 256 i BLESS Item is blessed (cosmetic). + 512 j ANTI_GOOD Item can't be used by good-aligned + characters. + 1024 k ANTI_EVIL Item can't be used by evil-aligned + characters. + 2048 l ANTI_NEUTRAL Item can't be used by neutrally- + aligned characters. + 4096 m ANTI_MAGIC_USER Item can't be used by the Mage + class. + 8192 n ANTI_CLERIC Item can't be used by the Cleric + class. + 16384 o ANTI_THIEF Item can't be used by the Thief + class. + 32768 p ANTI_WARRIOR Item can't be used by the Warrior + class. + 65536 q NOSELL Shopkeepers will not buy or sell + the item. +\end{verbatim} +\item[Wear Bitvector] A bitvector (see section~\vref{usingbitvectors}~`Using Bitvectors') with the following values: +\begin{verbatim} + 1 a WEAR_TAKE Item can be taken (picked up off + the ground). + 2 b WEAR_FINGER Item can be worn on the fingers. + 4 c WEAR_NECK Item can be worn around the neck. + 8 d WEAR_BODY Item can be worn on the body. + 16 e WEAR_HEAD Item can be worn on the head. + 32 f WEAR_LEGS Item can be worn on the legs. + 64 g WEAR_FEET Item can be worn on the feet. + 128 h WEAR_HANDS Item can be worn on the hands. + 256 i WEAR_ARMS Item can be worn on the arms. + 512 j WEAR_SHIELD Item can be used as a shield. + 1024 k WEAR_ABOUT Item can be worn about the body. + 2048 l WEAR_WAIST Item can be worn around the waist. + 4096 m WEAR_WRIST Item can be worn around the wrist. + 8192 n WEAR_WIELD Item can be wielded; e.g. weapons. + 16384 o WEAR_HOLD Item can be held (the ``hold'' + command). +\end{verbatim} +Note that the TAKE bit controls whether or not an item can be picked up using the ``get'' command, whereas the HOLD bit controls if the object can be worn using the ``hold'' command. +\item[Value 0, Value 1, Value 2, Value 3] These values are very central. They define the object's abilities based on the Type Flag. See the subsection ``Object Value Definitions'' below for a detailed description of the four Value fields. +\item[Weight] The weight of the object. The weight controls how many strength points a character must have to take the object, and is used to calculate when bags and other containers become full. +\item[Cost] The value of the object in gold coins; used by shopkeepers. +\item[Rent Per Day] The cost per day to rent the object in the Reception. +\end{description} + +\subsection{Object Value Definitions} +The meaning of an object's four values (value 0 through value 3) vary depending on the Type Flag of the object. +\par +In the table below, ``unused'' means that the server ignores the value; it can be set to any number (but 0 is always a safe bet). ``unimplemented'' indicates a Type Flag currently not recognized by the server. +\par +An index of spell numbers for use with magical objects can be found in the Appendix Spell Numbers. +\begin{Ventry}{DRINK CONTAINER} +\item[LIGHT] (Type Flag 1) +\begin{verbatim} + value 0: unused + value 1: unused + value 2: Capacity of light in hours. + 0: Burned out light. + -1: Eternal light source. + value 3: unused +\end{verbatim} +\item[SCROLL] (Type Flag 2) +\begin{verbatim} + value 0: Level at which scroll's spells are + cast. + value 1: Spell number 1 + value 2: Spell number 2 + value 3: Spell number 3 +\end{verbatim} +\item[WAND] (Type Flag 3) +\begin{verbatim} + value 0: Level at which wand's spell is + cast + value 1: Charge capacity of wand (>= 1) + value 2: Current number of charges remaining + value 3: Spell number +\end{verbatim} +\item[STAFF] (Type Flag 4) +\begin{verbatim} + value 0: Level at which staff's spell is + cast + value 1: Charge capacity of staff (>= 1) + value 2: Current number of charges remaining + value 3: Spell number +\end{verbatim} +\item[WEAPON] (Type Flag 5) +\begin{verbatim} + value 0: unused + value 1: Number of damage dice + value 2: Size of damage dice + value 3: Weapon type for damage messages, + one of: + 0 hit/hits + 1 sting/stings + 2 whip/whips + 3 slash/slashes + 4 bite/bites + 5 bludgeon/bludgeons + 6 crush/crushes + 7 pound/pounds + 8 claw/claws + 9 maul/mauls + 10 thrash/thrashes + 11 pierce/pierces + 12 blast/blasts + 13 punch/punches + 14 stab/stabs +\end{verbatim} +\item[FIREWEAPON] (Type Flag 6) unimplemented (do not use) +\item[MISSILE] (Type Flag 7) unimplemented (do not use) +\item[TREASURE] (Type Flag 8) +\begin{verbatim} + value 0: unused + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[ARMOR] (Type Flag 9) +\begin{verbatim} + value 0: AC-apply of the armor. Note that + the effective change to AC is this + value times a multiplier based on + where the armor is worn. Values + >0 enhance the AC; values <0 damage + the AC (cursed armor, for example). + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[POTION] (Type Flag 10) +\begin{verbatim} + value 0: Level at which the potion's spells + are cast. + value 1: Spell number 1 + value 2: Spell number 2 + value 3: Spell number 3 + If less than 3 spells are desired, set + unused values to -1. +\end{verbatim} +\item[WORN] (Type Flag 11) unimplemented (do not use) +\item[OTHER] (Type Flag 12) +\begin{verbatim} + value 0: unused + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[TRASH] (Type Flag 13) +\begin{verbatim} + value 0: unused + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[TRAP] (Type Flag 14) unimplemented (do not use) +\item[ CONTAINER] (Type Flag 15) +\begin{verbatim} + value 0: Capacity (max containable weight) + of container + value 1: Container flag bitvector (MUST be + a numeric bitvector) + 1 CLOSEABLE Container can be + closed and locked. + 2 PICKPROOF Lock on container + can't be picked. + 4 CLOSED Container is closed + when loaded. + 8 LOCKED Container is locked + when loaded. + value 2: The vnum of the key object that + opens this container. -1 if it has + no key. + value 3: Reserved for internal use -- always + set as 0. +\end{verbatim} +\item[NOTE] (Type Flag 16) +\begin{verbatim} + value 0: Language of writing + (unimplemented). + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[DRINK CONTAINER] (Type Flag 17) See Appendix Item Values for Drink Containers. +\item[KEY] (Type Flag 18) +\begin{verbatim} + value 0: unused + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[FOOD] (Type Flag 19) +\begin{verbatim} + value 0: The number of hours of hunger + satisfied by this food. + value 1: unused + value 2: unused + value 3: Non-zero if the food is poisoned, + 0 otherwise. +\end{verbatim} +\item[MONEY] (Type Flag 20) +\begin{verbatim} + value 0: The number of gold coins in the + pile. + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[PEN] (Type Flag 21) +\begin{verbatim} + value 0: unused + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[BOAT] (Type Flag 22) +\begin{verbatim} + value 0: unused + value 1: unused + value 2: unused + value 3: unused +\end{verbatim} +\item[FOUNTAIN] (Type Flag 23) See Appendix Item Values for Drink Containers. +\end{Ventry} + +\subsection{Object Extra Descriptions} +Object Extra Descriptions allow players to examine certain aspects of objects defined by the world builder, just like Room Extra Descriptions. There can be an unlimited number of Extra Descriptions per object. The format is exactly the same as for rooms: +\begin{verbatim} +E +~ + +~ +\end{verbatim} +\begin{description} +\item[Keyword List] A space-separated list of keywords which will access the description in this E section. +\item[Description Text] The text that will be displayed when a player types ``look $<$keyword$>$,'' where $<$keyword$>$ is one of the keywords specified in the Keyword List of this E section. +\end{description} + +\subsection{Object Affect Fields} +Object Affect Fields give objects magical properties. They affect characters when the object is worn, not when picked up. There can be up to six affect fields per object.\newline +The format of an Object Affect Field is: +\begin{verbatim} +A + +\end{verbatim} +\begin{description} +\item[Location] The aspect of the character affected by the object. It must be one of the following numbers: +\begin{verbatim} + 0 NONE No effect (typically not used). + 1 STR Apply to strength. + 2 DEX Apply to dexterity. + 3 INT Apply to intelligence. + 4 WIS Apply to wisdom. + 5 CON Apply to constitution. + 6 CHA Apply to charisma. + 7 CLASS Unimplemented. Do not use. + 8 LEVEL Unimplemented. Do not use. + 9 AGE Apply to character's MUD age, in MUD + years. + 10 CHAR_WEIGHT Apply to weight. + 11 CHAR_HEIGHT Apply to height. + 12 MANA Apply to MAX mana points. + 13 HIT Apply to MAX hit points. + 14 MOVE Apply to MAX movement points. + 15 GOLD Unimplemented. Do not use. + 16 EXP Unimplemented. Do not use. + 17 AC Apply to armor class (AC). + 18 HITROLL Apply to hitroll. + 19 DAMROLL Apply to damage roll bonus. + 20 SAVING_PARA Apply to save throw: paralyze + 21 SAVING_ROD Apply to save throw: rods + 22 SAVING_PETRI Apply to save throw: petrif + 23 SAVING_BREATH Apply to save throw: breath + 24 SAVING_SPELL Apply to save throw: spells +\end{verbatim} +\item[Value] The number used to modify the Location. +\end{description} +For example, an A field which reads: +\begin{verbatim} +A +12 50 +\end{verbatim} +will add 50 to the maximum mana of the character. + +\subsection{Object File Example} +\begin{verbatim} +#901 +shield minotaur~ +a dark minotaur shield~ +A dark minotaur shield has been left here.~ +~ +9 dgh 513 +12 0 0 0 +15 5000 1350 +E +shield minotaur~ +A strong, sturdy shield. It brings to mind legends of a shield +that provided protection from poisonous gases. +~ +A +23 -4 +A +4 2 +\end{verbatim} +This object is virtual number 901, is a Type 9 object (armor), cannot be donated, has a magical aura, and cannot be dropped. It can be picked up and worn as a shield. It has an AC-apply of 12, weighs 15 pounds, is valued at 5000 coins and costs 1350 coins per day to rent. Its Affect fields indicate that this object affects breath weapon saving throws by -4 and increases Wisdom by 2. + +\section{Zone Files} +Zone files are the files that control how areas are configured and how they reset. They integrate the mobiles, objects, and rooms to create an inhabited world. +\par +A zone file contains certain initial information (specified below), followed by a series of reset commands. Each time a zone is reset, the server executes all the commands in order from beginning to end. All zones are reset when the server first boots, and periodically reset again while the game is running. + +\subsection{The Format of a Zone File} +\begin{verbatim} +# +~ + +{zero or more zone commands} +S +\end{verbatim} +Lines starting with \texttt{*} are considered comments and ignored. Zone commands themselves may also be followed by a comment which does not need to be delimited by a single \texttt{*}. Please note that the initial lines of a zone file may {\bf not} have comments on them at all. The zone's commands must then be terminated by the literal letter \texttt{S}. +\begin{description} +\item[Virtual Number] An arbitrary number used to identify the zone. Zone numbers are traditionally the room numbers of the zone divided by 100; for example, Midgaard, which consists of rooms 3000 through 3099, is zone 30. +\item[Zone Name] A label given to the zone so that it can be identified in system logs. +\item[Bottom Room Number] The lowest numbered room belonging to this zone. This should be a larger number than the TopRoom of the previous zone. +\item[Top Room Number] The highest numbered room belonging to this zone. A room belongs to a zone if its virtual number falls in the range from BottomRoom to TopRoom of that zone. +\item[Lifespan] The number of real-time minutes between zone resets for this zone. When the age of the zone (measured in minutes since the last time that zone has been reset) reaches the zone's lifespan, the zone is queued for reset. The zone is then reset when it reaches the front of the queue, and the conditions of the Reset Mode (see below) are satisfied. +\item[Reset Mode] Can take one of three values (0, 1, or 2): +\begin{description} +\item[0] Never reset the zone. In this case, the age of the zone is never updated, and it will never be queued for reset. Thus, the value of the Lifespan is effectively ignored. +\item[1] Reset the zone only after it reaches its Lifespan {\em and} after the zone becomes deserted, i.e. as soon as there are no players located within the zone (checked once every minute). This can make a zone more ``fair'' because it will keep the hard mobs from reappearing in the zone until everyone leaves, but on a busy MUD it can prevent a zone from ever being reset since the zone may never stay empty for more than one minute. +\item[2] Reset the zone as soon as it reaches its Lifespan, regardless of who or what is in it. This is the most commonly used Reset Mode. +\end{description} +\end{description} + +\subsection{Zone Commands} +Each command consists of a letter, identifying the command-type, followed by three or four arguments. The first argument, common to all the commands, is called the ``if-flag.'' If the if-flag for a command is 1, that command is only executed if the command immediately before it was executed as well. If the if-flag is 0, the command is always executed. If-flags are useful for things like equipping mobiles--you don't want to try to equip a mobile that has not been loaded. +\par +Commands that load mobiles and objects also include a ``max existing'' argument. This specifies the maximum number of copies of the mobile or object that are allowed to exist in the entire world at once. If the number currently existing is greater than or equal to the ``max existing'' limit, the command is not executed. +\par +The valid zone-reset commands are M, O, G, E, P, D, and R. +\begin{description} +\item[M: load a mobile] Format: M $<$if-flag$>$ $<$mob vnum$>$ $<$max existing$>$ $<$room vnum$>$\newline +Mob vnum is the vnum of the mob to be loaded. Room vnum is the vnum of the room in which the mob should be placed. The mob will be loaded into the room. +\item[O: load an object] Format: O $<$if-flag$>$ $<$obj vnum$>$ $<$max existing$>$ $<$room vnum$>$\newline +Obj vnum is the vnum of the obj to be loaded. Room vnum is the vnum of the room in which the obj should be placed. The object will be loaded and left lying on the ground. +\item[G: give object to mobile] Format: G $<$if-flag$>$ $<$obj vnum$>$ $<$max existing$>$\newline +Obj vnum is the vnum of the obj to be given. The object will be loaded and placed in the inventory of the last mobile loaded with an ``M'' command.\newline +This command will usually be used with an if-flag of 1, since attempting to give an object to a non-existing mobile will result in an error. +\item[E: equip mobile with object] Format: E $<$if-flag$>$ $<$obj vnum$>$ $<$max existing$>$ $<$equipment position$>$\newline +Obj vnum is the vnum of the obj to be equipped. The object will be loaded and added to the equipment list of the last mobile loaded with an ``M'' command. Equipment Position should be one of the following: +\begin{verbatim} + 0 Used as light + 1 Worn on right finger + 2 Worn on left finger + 3 First object worn around neck + 4 Second object worn around neck + 5 Worn on body + 6 Worn on head + 7 Worn on legs + 8 Worn on feet + 9 Worn on hands + 10 Worn on arms + 11 Worn as shield + 12 Worn about body + 13 Worn around waist + 14 Worn around right wrist + 15 Worn around left wrist + 16 Wielded as a weapon + 17 Held +\end{verbatim} +This command will usually be used with an if-flag of 1, since attempting to give an object to a non-existing mobile will result in an error. +\item[P: put object in object] Format: P $<$if-flag$>$ $<$obj vnum 1$>$ $<$max existing$>$ $<$obj vnum 2$>$\newline +An object with Obj Vnum 1 will be loaded, and placed inside of the copy of Obj Vnum 2 most recently loaded.\newline +This command will usually be used with an if-flag of 1, since attempting to put an object inside of a non-existing object will result in an error. +\item[D: set the state of a door] Format: D $<$if-flag$>$ $<$room vnum$>$ $<$exit num$>$ $<$state$>$\newline +Room vnum is the virtual number of the room with the door to be set. Exit num being one of: +\begin{verbatim} + 0 North + 1 East + 2 South + 3 West + 4 Up + 5 Down +\end{verbatim} +State being one of: +\begin{verbatim} + 0 Open + 1 Closed + 2 Closed and locked +\end{verbatim} +Care should be taken to set both sides of a door correctly. Closing the north exit of one room does not automatically close the south exit of the room on the other side of the door. +\item[R: remove object from room] Format: R $<$if-flag$>$ $<$room vnum$>$ $<$obj vnum$>$\newline +If an object with vnum Obj Vnum exists in the room with vnum Room Vnum, it will be removed from the room and purged. +\end{description} + +\subsection{Zone File Example} +A sample zone file annotated with comments follows. +\begin{verbatim} +#30 * This is zone number 30 +Northern Midgaard Main City~ * The name of the zone +3099 15 2 * Top of zone is room #3099; it +* * resets every 15 minutes; resets +* * regardless of people +* +* Mobile +M 0 3010 1 3062 Load the Postmaster to room 3062 +* Shopkeepers +M 0 3003 1 3011 Load the Weaponsmith into room 3011 +* Now, give the weaponsmith items (to be placed in his inventory) +* max 100 of each of these objects can exist at a time in the +* world at any given time. +G 1 3020 100 Dagger +G 1 3021 100 Small Sword +G 1 3022 100 Long Sword +G 1 3023 100 Wooden Club +G 1 3024 100 Warhammer +G 1 3025 100 Flail +* and lastly, give him a long sword to wield +E 1 3022 100 16 Long Sword +* Load Boards +O 0 3099 2 3000 Mortal Bulletin Board in room 3000 +O 1 3096 5 3003 Social Bulletin Board in room 3003 +O 1 3096 5 3018 Social Bulletin Board in room 3018 +O 1 3096 5 3022 Social Bulletin Board in room 3022 +O 1 3096 5 3028 Social Bulletin Board in room 3028 +* "S" must appear after all commands for a particular zone +S +\end{verbatim} + +\section{Shop Files} +CircleMUD v3.0 now has a new shop file format. Since the old format is still supported, both formats will be documented. If you'd like to convert shop files in the old format to that of the new format, compile and run the utility \texttt{shopconv}. 3.0 shops must have a special marker (described below) to tell the server that the file is in the new format. + +\subsection{CircleMUD v3.0 Shop Format} +The overall format of a v3.0 Shop File is: +\begin{verbatim} +CircleMUD v3.0 Shop File~ + + +. +. +. + +$~ +\end{verbatim} +3.0 shop files start with the literal line ``\texttt{CircleMUD v3.0 Shop File\~{}}'', followed by any number of shop definitions, and terminated by \$\~{}. The format of a shop definition is: +\begin{verbatim} +#~ + + + + . + . + . + +-1 + + + [Buy Namelist 1] + [Buy Namelist 1] + [Buy Namelist 1] + . + . + . + [Buy Namelist n] +-1 +~ +~ +~ +~ +~ +~ +~ + + + + + + + + . + . + . + +-1 +